CCA-F Certification Prep · lesson 9 of 10
CCA-F Cheatsheet
The single-page condensed brain dump. Read every day in the final week.
Domains + weights
- Agentic Architecture & Orchestration — 27%
- Tool Design & MCP Integration — 18%
- Claude Code Configuration & Workflows — 20%
- Prompt Engineering & Structured Output — 20%
- Context Management & Reliability — 15%
Five agentic patterns
| Pattern | Use when |
|---|---|
| Prompt chaining | Steps known in advance |
| Routing | Multiple specialized handlers |
| Parallelization (sectioning / voting) | Independent subtasks OR consensus |
| Orchestrator-workers | Dynamic decomposition needed |
| Evaluator-optimizer | Quality > speed; iterative refinement |
Default: simplest pattern that works. Workflow > agent unless dynamism required.
Tool design rules
- One tool, one verb.
- Description = teacher's note: "Use when X, not when Y."
- Enums > strings; optional > required; default values reduce hallucination.
- Return short structured output; large blobs → resource URI.
- Annotate destructive / idempotent / read-only.
- Errors are structured (
is_error: true,type,message).
Error types
- transient (retry) | permanent (adapt) | validation (model retries) | uncertain (defensive read) | user_declined | unavailable (graceful).
MCP — who decides
- Tools → model.
- Resources → application (host attaches).
- Prompts → user (slash command).
MCP transports
- stdio = local subprocess.
- SSE = legacy remote.
- Streamable HTTP = current remote standard; OAuth 2.1.
Claude Code config precedence
CLI flags > .claude/settings.local.json > .claude/settings.json (shared) > ~/.claude/settings.json (user) > enterprise.
Deny always beats allow. Allow skips confirmation prompt.
CLAUDE.md hierarchy
~/.claude/CLAUDE.md (personal) ← project shared ← project local (gitignored) ← subdir.
Slash command vs Skill vs Subagent
| Slash | Skill | Subagent | |
|---|---|---|---|
| Invoked by | User typing /x | Model (auto) | Model (delegate) |
| Loaded when idle | None | Description only | None |
| Contents | Prompt template | Prompt + files + scripts | New agent w/ own context |
Prompt-engineering ladder (in order)
- Clear and direct → 2. Few-shot → 3. Let it think → 4. XML tags → 5. Role → 6. Prefill → 7. Chain.
Structured output — three techniques
- Force tool use (
tool_choice: {type: "tool", name}) — most reliable. - Prefill
{or<output>. - Prompt-only — least reliable.
CALM (context mgmt)
- Cache stable prefixes.
- Align prefix structure.
- Limit history.
- Monitor cache hits + tokens.
Compaction strategies
- Progressive summarization | State object | Sliding window | Retrieval-on-demand | Subagent delegation.
Prompt-caching mechanics
cache_control: {type: "ephemeral"}.- 5-min TTL default; 1h tier where available.
- Up to 4 breakpoints.
- Cache write ≈ 125% input; cache read ≈ 10%.
- Pays off after ~2 reuses.
- Any prefix change invalidates.
Batch API
- 50% input + output discount.
- Async, ≤24h SLA.
- Use
custom_idfor mapping. - Caches inside the batch.
- For interactive flows: do NOT use batch.
Model choice
| Want | Model |
|---|---|
| Best reasoning | Opus 4.7 (claude-opus-4-7) |
| Balanced production | Sonnet 4.6 (claude-sonnet-4-6) |
| Cheap + fast | Haiku 4.5 (claude-haiku-4-5-20251001) |
Idempotency rules
- Idempotent → retry safe.
- Non-idempotent → defensive read first; require user
confirm.
Six scenarios — anchors
- Support → routing + tools + escalation.
- Code-gen Claude Code → CLAUDE.md + plan mode + slash commands.
- Research → orchestrator-workers + subagents + provenance.
- Dev productivity → MCP heavy + read-only defaults.
- CI/CD →
--print+ narrow allow + hooks. - Extraction → forced tool use + Batch API + validation loop.
Test-day discipline
- Read each question twice.
- "Obvious" is usually wrong by one trade-off.
- When two answers look right, pick the one that respects principles over conditionals, and least privilege over convenience.
- Flag uncertainties; review at end.