Practice exercises for Chapter 18 of the Agent Factory curriculum.
Before starting these exercises, you need:
- Claude Code installed and working on your machine (CLI access via
claudecommand) - Chapter 14 completed: General Agents (CLAUDE.md basics, Skills, Settings hierarchy, command hooks)
- Chapter 16 completed: Spec-Driven Development with Claude Code
- Git and GitHub CLI (
gh) installed and authenticated - Node.js 18+ and Python 3.11+ for starter code files
- A text editor for viewing and modifying configuration files
claude-code-teams-cicd-exercises/
├── EXERCISE-GUIDE.md # Complete guide with all 15 exercises
├── README.md # This file
├── module-1-configuration-architecture/
│ ├── exercise-1.1-monorepo-hierarchy/ # Build a team config hierarchy
│ └── exercise-1.2-debug-broken-config/ # Diagnose and fix broken configs
├── module-2-skills-execution-strategy/
│ ├── exercise-2.1-skills-with-frontmatter/ # Create skills with frontmatter
│ └── exercise-2.2-execution-mode-classifier/ # Classify plan vs direct mode
├── module-3-iterative-refinement/
│ ├── exercise-3.1-data-transformer/ # Test-driven iteration with messy data
│ └── exercise-3.2-technique-comparison/ # Compare refinement techniques
├── module-4-cicd-pipeline/
│ ├── exercise-4.1-github-actions-workflow/ # Build a CI review workflow
│ └── exercise-4.2-debug-broken-pipeline/ # Fix broken CI configurations
├── module-5-review-architecture/
│ ├── exercise-5.1-multi-pass-review-script/ # Design multi-pass review
│ └── exercise-5.2-self-vs-independent-review/ # Compare review strategies
├── module-6-session-mastery/
│ ├── exercise-6.1-multi-day-investigation/ # Multi-session investigation
│ └── exercise-6.2-debug-stale-context/ # Diagnose stale session context
└── module-7-capstones/
├── capstone-A-full-team-infrastructure/ # Complete team setup (2-4 hrs)
├── capstone-B-production-ci-pipeline/ # Production CI pipeline (2-4 hrs)
└── capstone-C-audit-your-setup/ # Self-assessment audit (2 hrs)
- Clone or download this exercise pack
- Read
EXERCISE-GUIDE.mdfor the complete walkthrough - Start with Module 1 and work sequentially
- Each exercise folder contains an
INSTRUCTIONS.mdand starter files
| Module | Exercise | Ch 18 Lesson | Topic |
|---|---|---|---|
| 1 | 1.1 Monorepo Hierarchy | Lesson 1: CLAUDE.md Configuration Hierarchy | Three-level hierarchy, .claude/rules/, /memory |
| 1 | 1.2 Debug Broken Config | Lesson 1 + Lesson 2: Path-Specific Rules | Precedence tracing, glob patterns |
| 2 | 2.1 Skills with Frontmatter | Lesson 3: Custom Skills with Frontmatter | context:fork, allowed-tools, argument-hint |
| 2 | 2.2 Execution Mode Classifier | Lesson 4: Plan Mode vs Direct Execution | Decision tree for mode selection |
| 3 | 3.1 Data Transformer | Lesson 5: Iterative Refinement Techniques | Test-driven iteration, concrete examples |
| 3 | 3.2 Technique Comparison | Lesson 5: Iterative Refinement Techniques | Interview pattern, single-message vs sequential |
| 4 | 4.1 GitHub Actions Workflow | Lesson 6: Claude Code in CI/CD Pipelines | -p flag, --json-schema, CLAUDE.md as CI context |
| 4 | 4.2 Debug Broken Pipeline | Lesson 6: Claude Code in CI/CD Pipelines | Missing flags, wrong triggers, duplicate comments |
| 5 | 5.1 Multi-Pass Review Script | Lesson 7: Multi-Pass Review Architecture | Per-file + cross-file passes, session isolation |
| 5 | 5.2 Self vs Independent Review | Lesson 7: Multi-Pass Review Architecture | Self-review limitations, confidence calibration |
| 6 | 6.1 Multi-Day Investigation | Lesson 8: Session Management | --resume, named sessions, fork_session |
| 6 | 6.2 Debug Stale Context | Lesson 8: Session Management | Stale tool results, context recovery |
| 7 | Capstone A | Lessons 1-7 combined | Full team infrastructure |
| 7 | Capstone B | Lessons 5-7 combined | Production CI pipeline |
| 7 | Capstone C | All lessons | Self-assessment audit |
Work through modules sequentially. Each module builds on concepts from the previous one.
- Modules 1-2 (Configuration): Foundation skills. Complete these first.
- Module 3 (Refinement): Interaction techniques. Requires Module 1-2 understanding.
- Modules 4-5 (CI/CD and Review): Pipeline engineering. Requires Modules 1-3.
- Module 6 (Sessions): Advanced session management. Can be done alongside Modules 4-5.
- Module 7 (Capstones): Integration projects. Requires all previous modules.
| Exercise Type | Estimated Time |
|---|---|
| Standard exercises (1.1-6.2) | 15-45 minutes each |
| Capstone A | 2-4 hours |
| Capstone B | 2-4 hours |
| Capstone C | 1-2 hours |
| Complete pack | 12-20 hours |
- Read each exercise's INSTRUCTIONS.md completely before starting
- Use
/memoryfrequently to verify configuration loading - When debugging, read all configuration files before changing any
- Keep a notes file for reflection questions; they surface important patterns
- If you get stuck, re-read the corresponding Chapter 18 lesson