name: using-oac
Purpose: Guide Claude through context-aware development using the 6-stage OAC workflow.
When to use: Automatically invoked for every development task to ensure proper context discovery, planning, and validation.
Execute these stages in order for every development task:
Goal: Understand the task and discover relevant context files.
Actions:
Analyze the user's request to understand:
Invoke the /context-discovery skill to find relevant context files:
Capture the list of context files returned by ContextScout
Output: List of context files to load, understanding of task scope
Goal: Create an execution plan and get user approval before proceeding.
Actions:
Simple tasks (1-3 files, <30 min):
Complex tasks (4+ files, >30 min):
/task-breakdown skill for detailed subtasksPresent the plan to the user with:
REQUEST APPROVAL - Wait for user confirmation before proceeding
Critical: NEVER proceed to Stage 3 without explicit user approval.
Output: Approved execution plan
Goal: Pre-load ALL discovered context files so they're available during execution.
Actions:
Read EVERY context file discovered in Stage 1:
Read tool to load each fileInternalize the loaded context:
Why This Matters: This stage prevents nested ContextScout calls during execution. By loading ALL context upfront, subagents invoked in Stage 4 can use the pre-loaded context without needing to call ContextScout themselves. This maintains the flattened delegation hierarchy required by Claude Code.
/external-scout to fetch current API docs:
/external-scout drizzle schemas/external-scout react hooksOutput: All context loaded (internal + external) and ready for execution
Goal: Implement the solution following loaded context and standards.
Actions:
For Simple Tasks (direct execution):
Implement the solution directly:
Self-review before completion:
For Complex Tasks (delegated execution):
Invoke /task-breakdown skill to create detailed subtasks:
Execute subtasks in order:
/code-execution skill for implementation subtasks/test-generation skill for test subtasks/code-review skill for review subtasksTrack progress through subtask completion
Output: Implementation complete, all deliverables created
Goal: Verify the implementation works correctly.
Actions:
Run tests (if they exist):
Validate against acceptance criteria:
STOP on failure:
Critical: Do not proceed to Stage 6 if validation fails.
Output: Validated, working implementation
Goal: Finalize the task with documentation and cleanup.
Actions:
Update documentation (if needed):
Summarize what was done:
Cleanup (if applicable):
Present completion summary to user
Output: Task complete, documented, and summarized
OAC Pattern (nested - NOT supported in Claude Code):
Main Agent → TaskManager → CoderAgent → ContextScout
Claude Code Pattern (flat - CORRECT):
Main Agent → ContextScout (via /context-discovery)
Main Agent → TaskManager (via /task-breakdown)
Main Agent → CoderAgent (via /code-execution)
Rule: Only the main agent can invoke subagents. Subagents cannot call other subagents.
Why: Prevents nested ContextScout calls during execution.
How: Stage 3 loads ALL context upfront, so execution stages (4-6) have everything they need.
Critical checkpoints:
Never skip approval - it prevents wasted work and ensures alignment.
Simple tasks: Stages 1-2-3-4-5-6 executed inline by main agent
Complex tasks: Stages 1-2-3 by main agent, Stage 4 delegated to TaskManager + specialists
Use these skills at the appropriate stages:
| Skill | When to Invoke | Purpose |
|---|---|---|
/context-discovery |
Stage 1 | Find relevant context files |
/external-scout |
Stage 3 | Fetch external library documentation |
/task-breakdown |
Stage 4 (complex tasks) | Create detailed subtasks |
/code-execution |
Stage 4 (subtasks) | Implement code subtasks |
/test-generation |
Stage 4 (subtasks) | Create test subtasks |
/code-review |
Stage 4 (subtasks) | Review code subtasks |
Stage 1: Analyze → Invoke /context-discovery → Get validation patterns, security standards
Stage 2: Plan → "Add email regex validation to registration endpoint" → Request approval
Stage 3: Load context → Read validation patterns, security standards
Stage 4: Execute → Implement validation, add tests, self-review
Stage 5: Validate → Run tests, verify criteria met
Stage 6: Complete → Update API docs, summarize changes
Stage 1: Analyze → Invoke /context-discovery → Get auth patterns, security standards, architecture guides
Stage 2: Plan → "Multi-phase: JWT service, middleware, endpoints, tests" → Request approval
Stage 3: Load context → Read all discovered context files
Stage 4: Execute → Invoke /task-breakdown → TaskManager creates subtasks → Execute subtasks using /code-execution, /test-generation, /code-review
Stage 5: Validate → Run full test suite, verify all acceptance criteria
Stage 6: Complete → Update docs, summarize implementation, archive session
❌ Skipping Stage 1 - Coding without context discovery leads to inconsistent patterns
❌ Skipping Stage 2 approval - Implementing without user buy-in wastes effort
❌ Nested subagent calls - Subagents calling other subagents (not supported in Claude Code)
❌ Context discovery during execution - Should be done in Stage 1, loaded in Stage 3
❌ Proceeding with failed validation - Stage 5 failures must be fixed before Stage 6
For complex tasks requiring TaskManager delegation:
Session Location: .tmp/sessions/{YYYY-MM-DD}-{task-slug}/
Session Files:
context.md - Task context, discovered files, requirementsprogress.md - Execution progress trackingCleanup: After Stage 6, ask user if session files should be deleted
context-discovery - Stage 1 context discoveryexternal-scout - Stage 3 external library documentationtask-breakdown - Stage 4 complex task delegationcode-execution - Stage 4 code implementationtest-generation - Stage 4 test creationcode-review - Stage 4 code review✅ Every task follows all 6 stages in order
✅ Context discovered before execution
✅ User approval obtained before implementation
✅ All context pre-loaded (no nested discovery)
✅ Validation passes before completion
✅ Documentation updated and task summarized