Skip to content

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.

StageAccepted artifactClaude Code surfaceCanonical procedure
Planintent.mdInteractive discovery session; repository contextCapture intent
Designspec.mdProject skills in .claude/skills/; CLAUDE.md for durable repository contextWrite the spec
Buildplan.md, diff, testsPlan permission mode, claude -w, subagents, deterministic hooksBuild from an accepted plan
TestTest evidenceThe same session runs tests, builds, and visual checks; claude -p supports repeatable checksClose the feedback loop
DeployReviewed pull requestclaude-code-action, review automation, protected merge and release environmentsLayer review and approvals
MaintainIncident record and next intent.mdScheduled external runner or routine invokes a bounded claude -p triage taskClose production back into planning

Prerequisites: a Git repository, a clean working tree, Claude Code authenticated, and the repository’s test commands recorded in CLAUDE.md.

  1. Start read-only planning:

    Terminal window
    claude --permission-mode plan
  2. 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.
  3. Save the accepted plan in the repository, then create an isolated session:

    Terminal window
    claude -w feature-slug
  4. 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.
  5. 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 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.

Use print mode when the inputs, permissions, output, timeout, and failure behavior are predetermined:

Terminal window
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.

  • claude --help shows --permission-mode, --worktree, --print, and --output-format.
  • A Plan-mode session can inspect the repository without changing application files.
  • The accepted plan.md points back to intent.md and spec.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.

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.