[PREP] Claude Certified Architect - Foundations Practice Plan
Claude Certified Architect - Foundations Practice Plan
Current Strengths (Already Implemented in This Project)
- .claude/rules/ with YAML frontmatter path-scoping (python rules)
- CLAUDE.md hierarchy (project-level, concise)
- Hooks for programmatic enforcement (guard-task, loop-detection, build-sensor, stop-verify)
- Plan mode usage with structured plans
- Context management (token-efficiency-reminder, subagent-init with compact context)
- Custom skills with SKILL.md
Gaps to Address
| Gap | Domain | Priority |
|---|---|---|
No context: fork skills | D3 | High |
No .mcp.json with env var expansion | D2 | High |
No --output-format json CI patterns | D3 | Medium |
No argument-hint in skills | D3 | Low |
| No structured error responses in tools | D2 | Medium |
| No batch API usage | D4 | Medium |
Practice Exercises
Week 1: Agentic Architecture (Domain 1 - 27%)
Exercise 1A: Build an Agentic Loop
- Write a Python script using Claude API that implements the loop: send -> check stop_reason -> execute tool -> append result -> loop
- Handle both “tool_use” and “end_turn” stop reasons
- Avoid anti-patterns: no natural language parsing for termination, no arbitrary caps
Exercise 1B: Multi-Agent Coordinator
- Build a coordinator that spawns 2+ subagents via Task tool calls
- Pass context EXPLICITLY in subagent prompts (no inherited context)
- Emit multiple Task calls in a single response for parallelism
- Implement iterative refinement: coordinator evaluates output, re-delegates if gaps found
Exercise 1C: Programmatic Enforcement
- Create a hook that blocks a tool call unless a prerequisite tool has been called first
- Example: block
process_refunduntilget_customerhas returned verified ID - Compare with prompt-only approach and measure failure rate difference
Exercise 1D: Session Management
- Practice
--resume <session-name>for continuing conversations - Try
fork_sessionto explore two approaches from shared baseline - Test: resume a stale session vs start fresh with injected summary
Week 2: Tool Design & MCP (Domain 2 - 18%)
Exercise 2A: Tool Description Quality
- Create 3 tools with minimal descriptions, test selection reliability
- Expand descriptions with: input formats, example queries, edge cases, boundaries
- Measure improvement in selection accuracy
Exercise 2B: Structured Error Responses
- Implement MCP tool returning:
errorCategory,isRetryable, human-readable description - Test agent behavior with: transient error (retry), validation error (fix input), business error (explain)
- Verify agent distinguishes access failures from valid empty results
Exercise 2C: MCP Server Configuration
- Create
.mcp.jsonwith env var expansion (${GITHUB_TOKEN}) - Add a personal server in
~/.claude.json - Verify both available simultaneously
- Expose a content catalog as MCP resource
Exercise 2D: Tool Distribution
- Test agent with 15+ tools vs 4-5 focused tools
- Observe degradation in selection reliability with too many tools
- Practice: restrict subagent tools to role-specific subset
Week 3: Claude Code Configuration (Domain 3 - 20%)
Exercise 3A: Configuration Hierarchy
- Verify project-level CLAUDE.md applies to all team members
- Create user-level
~/.claude/CLAUDE.mdwith personal preferences - Use
@importto reference external standards files - Diagnose: “team member not getting instructions” = user-level instead of project-level
Exercise 3B: Path-Specific Rules
- Create rule with
paths: ["**/*.test.*"]for test conventions - Create rule with
paths: ["src/api/**/*"]for API conventions - Verify rules load ONLY when editing matching files
- Compare with subdirectory CLAUDE.md approach
Exercise 3C: Skills with Frontmatter
- Create a skill with
context: fork(isolates verbose output) - Add
allowed-toolsrestriction (e.g., only file write) - Add
argument-hintfor required parameters - Test: verify forked skill doesn’t pollute main conversation
Exercise 3D: CI/CD Integration
- Run Claude Code with
-pflag in a script - Use
--output-format json+--json-schemafor structured CI output - Implement: code review that posts findings as PR comments
- Include prior findings on re-review to avoid duplicates
Exercise 3E: Plan Mode Decision
- Practice: single-file bug fix -> direct execution
- Practice: multi-file migration (45+ files) -> plan mode first
- Practice: Explore subagent for verbose discovery, then direct execution for implementation
Week 4: Prompt Engineering & Structured Output (Domain 4 - 20%)
Exercise 4A: Explicit Criteria
- Write review prompt with specific categorical criteria (not “be conservative”)
- Define: which issues to report (bugs, security) vs skip (minor style)
- Add concrete code examples for each severity level
Exercise 4B: Few-shot Prompting
- Create 2-4 examples for ambiguous tool selection scenario
- Show reasoning for WHY one action chosen over alternatives
- Test: verify model generalizes to novel patterns (not just matching examples)
Exercise 4C: Structured Output via tool_use
- Define extraction tool with JSON schema (required + optional fields)
- Use
tool_choice: "any"to guarantee structured output - Use forced tool selection for prerequisite steps
- Design schema with nullable fields for absent info, enum with “other” + detail
Exercise 4D: Validation-Retry Loop
- Implement: extract -> validate -> if fail: append error + retry
- Test: format mismatch (retry works) vs absent info (retry futile)
- Add
detected_patternfield for systematic false positive analysis - Self-correction: extract calculated_total + stated_total, flag discrepancies
Exercise 4E: Batch Processing
- Submit batch of docs via Message Batches API with
custom_id - Handle failures: resubmit only failed docs by custom_id
- Calculate: submission frequency based on SLA (4h window for 30h SLA with 24h processing)
- Pre-test prompts on sample before batch-processing full volume
Week 5: Context Management & Reliability (Domain 5 - 15%)
Exercise 5A: Context Preservation
- Extract transactional facts into persistent “case facts” block
- Trim verbose tool output to relevant fields before accumulation
- Place key findings at BEGINNING of aggregated inputs
- Test “lost in the middle” effect with long documents
Exercise 5B: Escalation Patterns
- Write system prompt with explicit escalation criteria + few-shot examples
- Test: customer requests human -> immediate escalation (no investigation first)
- Test: policy gap -> escalate; straightforward case -> resolve
- Test: multiple customer matches -> ask for identifiers, not heuristic selection
Exercise 5C: Error Propagation
- Simulate subagent timeout -> return structured error to coordinator
- Include: failure type, attempted query, partial results, alternatives
- Coordinator proceeds with partial results, annotates gaps in final output
- Test: distinguish access failure from valid empty result
Exercise 5D: Large Codebase Exploration
- Use scratchpad files to persist findings across context boundaries
- Spawn subagents for specific questions, main agent coordinates
- Use
/compactwhen context fills with discovery output - Design crash recovery: agent exports state to manifest, coordinator loads on resume
Exercise 5E: Human Review Routing
- Model outputs field-level confidence scores
- Route low-confidence extractions to human review
- Analyze accuracy by document type AND field
- Implement stratified random sampling of high-confidence extractions
Practice Exam Prep
- Re-read sample questions (pages 25-33 of exam guide)
- For each question, identify: which domain, which anti-pattern is the distractor
- Key decision framework:
- “Most effective FIRST step” = lowest effort, highest leverage (usually expand descriptions or add criteria)
- “Reliability issue” with critical business logic = programmatic enforcement (hooks)
- “Self-review” = always prefer independent instance
- “Batch API” = only latency-tolerant, never blocking
- “Root cause” = trace the actual failure point, not blame downstream agents
Resources
- Exam guide PDF (this document’s source)
- Anthropic docs: Claude Agent SDK, MCP protocol, Claude Code
- Practice exam (link provided separately by Anthropic)
- Hands-on: this project’s
.claude/setup is a working reference for Domain 3