Prepare a grounded dive session with context from multiple sources
Prepare a grounded dive session by compiling context from multiple sources (local files, git, Open Horizons, issues, or specific files). Use it before starting focused work to establish intent and workflow.
/plugin marketplace add cloud-atlas-ai/wm/plugin install wm@wminheritCompile a session grounding manifest from available context sources, keyed by intent.
Platform Support:
/dive-prep [--intent <type>] [options]
Intent types: fix, plan, review, explore, ship (default: explore)
Options:
--oh <endeavor-id> - Include Open Horizons context for this endeavor--issue <id> - Include issue/ticket context (GitHub, Linear, etc.)--files <glob> - Include specific files as context--no-local - Skip local context detectionA dive can pull grounding context from multiple sources:
| Source | What it provides | When used |
|---|---|---|
| Local | CLAUDE.md, .superego/, cwd structure | Always (auto-detected) |
| Git | Branch, recent commits, changed files | Always (auto-detected) |
| OH | Endeavors, guardrails, metis, mission context | Preferred when connected |
| Issue | Ticket details, acceptance criteria | If --issue provided |
| Files | Specific code/docs for focus | If --files provided |
OH is the preferred source when available because it's purpose-built for strategic alignment. It provides the "why" (mission context), the "don't" (guardrails), and the "learned" (metis) that local context alone can't provide.
Check if OH MCP is available by testing oh_get_contexts:
When OH is available but no --oh flag provided, prompt:
OH connected. Link to an endeavor for strategic context?
[Select endeavor] [Skip - local only]
This encourages OH usage when available since it's purpose-built for strategic alignment.
If not provided via --intent, ask:
What's your intent for this session?
[ ] fix - Fix a bug or issue
[ ] plan - Design an approach
[ ] review - Reflect on recent work
[ ] explore - Understand something
[ ] ship - Get something deployed
Always gather from current directory:
If OH connected and --oh provided:
oh_suggest_dive_pack({
endeavor_id: "<endeavor-id>",
intent_type: "<intent>"
})
Returns: mission context, guardrails, metis, related endeavors
If --issue provided:
If --files provided:
Show gathered context, let user confirm in <30s:
Dive Context Summary
====================
Intent: fix
Local:
✓ CLAUDE.md (project instructions)
✓ .superego/ (metacognitive config)
✓ Branch: feature/dive-packs (3 uncommitted files)
OH Context (optional):
✓ Endeavor: Dive Prep feature
✓ Mission: Open Horizons System
✓ Guardrails: 2 active
[ ] Include metis: "Contracts prevent drift"
[ ] Include sibling: MetisCandidate capture
Workflow: fix-workflow
Stage → sg review → handle findings → commit → PR
[Accept] [Edit] [Cancel]
Based on intent, include appropriate workflow:
fix:
1. Understand the issue
2. Write failing test (if applicable)
3. Implement fix
4. Stage changes
5. Run `sg review` - handle findings (P1-P3 fix, P4 discard)
6. Commit with clear message
7. PR → CodeRabbit review → iterate
8. Done when PR approved
plan:
1. Review available context (local docs, OH mission if available)
2. Identify options and trade-offs
3. Draft plan with concrete steps (no time estimates)
4. Surface risks and dependencies
5. Document decision rationale
6. Log findings (to OH if connected, else local)
review:
1. Gather recent work artifacts (commits, logs)
2. Identify patterns, learnings, surprises
3. Surface insights worth capturing
4. Document review findings
explore:
1. Understand the problem space
2. Read relevant code/docs
3. Ask clarifying questions
4. Document findings
5. Identify next steps or blockers
ship:
1. Verify all tests pass
2. Check constraints and guardrails
3. Review changes for completeness
4. Create PR with full context
5. Address review feedback
6. Deploy when approved
Write .wm/dive_context.md with curated grounding:
# Dive Session
**Intent:** fix
**Started:** 2026-01-03T10:30:00Z
## Context
### Project
[From CLAUDE.md - key instructions]
### Focus
[What we're working on - from OH endeavor, issue, or user input]
### Constraints
[From OH guardrails, .superego/, or user input]
### Relevant Knowledge
[From OH metis, or key patterns noted]
## Workflow
[Selected workflow steps]
## Sources
- Local: CLAUDE.md, .superego/
- Git: feature/dive-packs branch
- OH: endeavor bd9d6ace (if connected)
✓ Dive session prepared
Context loaded to .wm/dive_context.md
Intent: fix
Workflow: fix-workflow
Ready to work. Start with: [first workflow step]
If OH is not configured:
.wm/dive_context.mdclaude mcp add oh-mcp -- npx -y @cloud-atlas-ai/oh-mcp-server"This still provides value: explicit intent, workflow guidance, and documented constraints. But OH adds the strategic layer that makes dives more grounded.
With OH context:
$ /dive-prep --intent fix --oh bd9d6ace
Gathering context...
✓ Local: CLAUDE.md, .superego/
✓ Git: feature/dive-packs (3 uncommitted)
✓ OH: Dive Prep feature → Open Horizons System
[Shows curation UI]
✓ Dive session prepared
.wm/dive_context.md written
Intent: fix
Ready to work.
Local only:
$ /dive-prep --intent explore
Gathering context...
✓ Local: CLAUDE.md
✓ Git: main (clean)
What are you exploring?
> How the authentication flow works
✓ Dive session prepared
.wm/dive_context.md written
Intent: explore
Focus: How the authentication flow works
With issue:
$ /dive-prep --intent fix --issue GH-123
Gathering context...
✓ Local: CLAUDE.md
✓ Git: fix/auth-bug
✓ Issue: GH-123 "Login fails with special characters"
✓ Dive session prepared
Intent: fix
Focus: Login fails with special characters (GH-123)
You are an elite AI agent architect specializing in crafting high-performance agent configurations. Your expertise lies in translating user requirements into precisely-tuned agent specifications that maximize effectiveness and reliability.