AI-native SDLC with Claude Code
The Claude Code SDLC track implements the shared six-stage lifecycle with Plan mode, CLAUDE.md, skills, hooks, subagents, worktrees, print mode, and GitHub automation. Use this page as the tool adapter: it names the native surface for each gate and links to the single canonical procedure for that stage.
The lifecycle itself stays tool-independent. Read the AI-native SDLC overview first, then return here when the procedure asks how Claude Code performs a step.
Stage map
Section titled “Stage map”| Stage | Accepted artifact | Claude Code surface | Canonical procedure |
|---|---|---|---|
| Plan | intent.md | Interactive discovery session; repository context | Capture intent |
| Design | spec.md | Project skills in .claude/skills/; CLAUDE.md for durable repository context | Write the spec |
| Build | plan.md, diff, tests | Plan permission mode, claude -w, subagents, deterministic hooks | Build from an accepted plan |
| Test | Test evidence | The same session runs tests, builds, and visual checks; claude -p supports repeatable checks | Close the feedback loop |
| Deploy | Reviewed pull request | claude-code-action, review automation, protected merge and release environments | Layer review and approvals |
| Maintain | Incident record and next intent.md | Scheduled external runner or routine invokes a bounded claude -p triage task | Close production back into planning |
Configure the build path
Section titled “Configure the build path”Prerequisites: a Git repository, a clean working tree, Claude Code authenticated, and the repository’s test commands recorded in CLAUDE.md.
-
Start read-only planning:
Terminal window claude --permission-mode plan -
Ask Claude to read the accepted artifacts and propose proof before edits:
Read docs/intents/FEATURE.md and docs/specs/FEATURE.md. Inspect the repository.Propose an ordered implementation plan with exact files, risks, test-first steps,and rollback. Do not edit application files. Stop for approval. -
Save the accepted plan in the repository, then create an isolated session:
Terminal window claude -w feature-slug -
Implement only the accepted slice:
Read docs/plans/FEATURE.md and CLAUDE.md. Implement only milestone 1.Run the named typecheck, lint, unit, integration, and visual checks.If proof fails, diagnose and fix the implementation; do not weaken the tests.Finish with the changed files, commands run, and remaining risks. -
Review the diff and evidence before committing. Keep production deployment behind the repository’s human approval gate.
Claude Code’s -w/--worktree creates an isolated Git worktree for the session. Project-specific helpers can still be preferable when they also allocate ports, copy ignored local configuration, or initialize local databases.
Put policy in the right layer
Section titled “Put policy in the right layer”- Put explanatory repository knowledge in
CLAUDE.md. - Put reusable, on-demand workflows in
.claude/skills/SKILL_NAME/SKILL.md. - Put specialized delegation in
.claude/agents/. - Put deterministic allow, deny, logging, and validation behavior in hooks.
- Put branch protection, required checks, and production approval in the hosting and deployment platform. A prompt is not a release control.
Automate bounded checks
Section titled “Automate bounded checks”Use print mode when the inputs, permissions, output, timeout, and failure behavior are predetermined:
claude -p \ --permission-mode plan \ --output-format json \ "Review the current diff against docs/specs/FEATURE.md. Report only blocking findings."Use a write-capable permission mode only inside an isolated environment with scoped credentials. Never treat --dangerously-skip-permissions as a normal CI shortcut.
Prove the adapter works
Section titled “Prove the adapter works”claude --helpshows--permission-mode,--worktree,--print, and--output-format.- A Plan-mode session can inspect the repository without changing application files.
- The accepted
plan.mdpoints back tointent.mdandspec.md. - The implementation session runs the repository’s actual quality gates and reports their exit status.
- Merging and production release still require the named human or platform approval.
Common failure modes
Section titled “Common failure modes”Claude edits before the plan is accepted. Start with --permission-mode plan, split discovery from implementation, and keep the accepted plan as a committed artifact.
A hook is described correctly but does not block the action. Validate the current nested hook schema and decision JSON against the official hooks documentation; do not rely on an old flat command example.
Parallel sessions collide. Use one worktree per task and allocate ports and local state explicitly. A worktree isolates files, not shared cloud resources.