Help us improve
Share bugs, ideas, or general feedback.
From afc
Automates full feature development pipeline from natural language description through clarify, spec, plan, implement, review, and clean phases with critic loops and gates.
npx claudepluginhub jhlee0409/all-for-claudecode --plugin afcHow this skill is triggered — by the user, by Claude, or both
Slash command
/afc:autoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Runs clarify? → spec → plan → implement → review → clean fully automatically from a single feature description.
Enforces a gated Spec → Plan → Build → Test → Review → Ship lifecycle for multi-file features and projects, preventing AI coding agents from skipping specification and verification steps.
Provides full SDLC workflow for implementing features, fixing bugs, refactoring, testing, releasing, publishing, and deploying.
Auto-loop execution workflow with quality gates. Use when starting any non-trivial implementation task. Provides automatic task decomposition, code implementation, testing (L1-L4), and iterative quality gates until completion. Invoke with /autoworker.
Share bugs, ideas, or general feedback.
Runs clarify? → spec → plan → implement → review → clean fully automatically from a single feature description. Tasks are generated automatically at implement start (no separate tasks phase). Critic Loop runs at each phase (unified safety cap: 5). Convergence terminates early when quality is sufficient. Pre-implementation gates (clarify, TDD pre-gen, blast-radius) run conditionally. Skill Advisor: 5 checkpoints (A–E) at phase boundaries; max 5 auxiliary invocations per pipeline. See
skills/auto/skill-advisor.mdfor details.
$ARGUMENTS — (required) Feature description in natural language!cat .claude/afc.config.md 2>/dev/null || echo "[CONFIG NOT FOUND] .claude/afc.config.md not found. Create it with /afc:init."
Always read .claude/afc.config.md first. Values referenced as {config.*}:
{config.ci} — full CI command{config.gate} — phase gate command{config.test} — test command{config.architecture} — architecture rules{config.code_style} — code style rulesIf config missing: ask user to run /afc:init. If declined → abort.
Always read
${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.mdbefore running any Critic pass. Core: minimum 1 concern per criterion + mandatory Adversarial failure scenario each pass + quantitative evidence required. "PASS" as a single word is prohibited. On ESCALATE: pause and present options via AskUserQuestion even in auto mode.
$ARGUMENTS is empty → print "Please enter a feature description." and abortBRANCH_NAME. Determine feature name (2-3 keywords, kebab-case)."${CLAUDE_SKILL_DIR}/../../scripts/afc-preflight-check.sh"
Exit 1 → abort. Warnings (exit 0) → print and continue."${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" start {feature}
Creates afc/pre-auto safety snapshot, activates Stop Gate Hook, starts change tracking..claude/afc/specs/{feature}/ → record as PIPELINE_ARTIFACT_DIRADVISOR_COUNT = 0, ADVISOR_TRANSFORM_USED = false
afc_state_write "advisorCount" "0"
afc_state_write "advisorTransformUsed" "false"
Auto pipeline started: {feature}
├─ Clarify? → 1/5 Spec → 2/5 Plan → 3/5 Implement → 4/5 Review → 5/5 Clean
└─ Running fully automatically (tasks auto-generated, pre-implementation gates conditional)
$ARGUMENTS implies 10+ files or multiple unrelated concerns → warn and ask: "(1) Proceed (2) Reduce scope (3) Abort".ALL 3 criteria must be met to trigger fast-path:
| Criterion | Check |
|---|---|
| Trivial scope | Explicitly mentions 1-2 specific files or a single-line fix |
| No script impact | Does not reference .sh scripts, hooks, or pipeline logic |
| Low ambiguity | Clarify gate score < 2 |
If ALL 3 met (fast-path):
⚡ Fast path detected — skipping spec/plan phases{config.ci} — on fail or if > 2 files modified: rollback (git reset --hard afc/pre-auto) and restart with full pipeline"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase fast-path
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" ci-pass
Fast path complete: {feature}
├─ Mode: ⚡ Fast path (spec/plan skipped)
├─ Changed files: {N}
├─ CI: ✓
└─ Review: mini-review passed
If ANY criterion fails: proceed to Phase 0.5 (full pipeline).
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase clarify
Score $ARGUMENTS on 5 ambiguity signals (vague scope, missing quantifiers, undefined entities, unclear boundaries, multiple interpretations). If score >= 3: generate at most 3 questions via AskUserQuestion. Apply answers to refine $ARGUMENTS. In full-auto mode: auto-resolve with best-guess, tag [AUTO-RESOLVED: clarify].
If score < 3: skip silently.
Evaluate BEFORE Phase 1. See
skills/auto/skill-advisor.md#checkpoint-a--pre-specfor full evaluation prompts, invocation patterns, and state management. Budget: max 2 skills, max 1 Transform. Skip ifADVISOR_COUNT >= 5.
Signals: A1 (idea-level request → ideate Transform), A2 (domain expertise needed → consult({domain}) Enrich).
After advisor skill completes, append result summary to context.md:
## Advisor: {skill_name} (Checkpoint A)
- Insight: {1-line key finding}
- Action: {1-line required action or "none"}
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase spec
Execute /afc:spec logic inline:
{config.architecture} layer$ARGUMENTS for external library/API references not in codebase. If found: WebSearch (or Context7) for latest stable version, key constraints. Tag researched items [RESEARCHED]. Skip if all internal..claude/afc/specs/{feature}/spec.md[NEEDS CLARIFICATION] items: research first, then auto-resolve remaining as [AUTO-RESOLVED].claude/afc/memory/retrospectives/ files (if exist) — flag [AUTO-RESOLVED] patterns that previously went wrongdocs/critic-loop-rules.md):
→ TC: should_...)?docs/critic-loop-rules.md✓ 1/5 Spec complete (US: {N}, FR: {N}, researched: {N}, Critic: converged ({N} passes, {M} fixes, {E} escalations))Evaluate AFTER Phase 1, BEFORE Phase 2. See
skills/auto/skill-advisor.md#checkpoint-b--post-specfor full invocation patterns. Budget: max 2 skills. Skip ifADVISOR_COUNT >= 5.
Signals: B1 (sensitive data/trust boundary → security Enrich), B2 (cross-architectural boundary → architect Enrich). If both >= 3: launch parallel. Security/architecture conflicts → ESCALATE.
After advisor skill completes, append result summary to context.md:
## Advisor: {skill_name} (Checkpoint B)
- Insight: {1-line key finding}
- Action: {1-line required action or "none"}
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase plan
Execute /afc:plan logic inline:
.claude/afc/specs/{feature}/research.md. 1-2 topics → resolve directly..claude/afc/memory/quality-history/ — trend summary.claude/afc/memory/decisions/ — conflict check.claude/afc/memory/reviews/ — recurring finding patterns.claude/afc/specs/{feature}/plan.md. Include structure-analysis-based estimates for numerical targets.docs/critic-loop-rules.md):
{config.ci} failure scenarios; check each risk pattern from Project Context{config.architecture} rules.claude/afc/memory/research/{feature}.mdafc-architect agent to record architectural decisions. If conflicts found → ESCALATE.claude/afc/specs/{feature}/context.md:
# Session Context: {feature}
## Goal
- Original request: $ARGUMENTS
- Current objective: Implement {feature}
## Acceptance Criteria (from spec.md)
{copy ALL FR-*, NFR-*, SC-* items and GWT acceptance scenarios verbatim}
## Key Decisions
- {what}: {rationale}
## Discoveries
- {file path}: {finding}
✓ 2/5 Plan complete (Critic: converged ({N} passes, {M} fixes, {E} escalations), files: {N}, ADR: {N} recorded, Implementation Context: {W} words)Evaluate AFTER Phase 2, BEFORE Phase 3. See
skills/auto/skill-advisor.md#checkpoint-c--post-planfor full invocation patterns. Budget: max 2 skills. Skip ifADVISOR_COUNT >= 5.
Signals: C1 (high interconnection risk → dependency analysis Observe), C2 (unresolved domain uncertainties → consult({domain}) Enrich).
After advisor skill completes, append result summary to context.md:
## Advisor: {skill_name} (Checkpoint C)
- Insight: {1-line key finding}
- Action: {1-line required action or "none"}
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase implement
Context optimization: If extensive exploration occurred in previous phases, consider /rewind → Summarize from here to compact investigation-heavy sections while preserving plan/spec context intact.
Session context reload: read .claude/afc/specs/{feature}/context.md. If complexity-analysis.md exists, read it and flag high-risk files for extra verification.
Follow all orchestration rules in skills/implement/SKILL.md (mode selection, batch/swarm, failure recovery).
Generate tasks.md from plan.md File Change Map. Required format:
- [ ] T{NNN} {[P]} {[US*]} {description} `{file path}` {depends: [TXXX]}
Principles: 1 task = 1 file, same file = sequential, different files = [P] candidate. Append Coverage Mapping (every FR-/NFR- mapped to at least one task).
Check retrospective for past [P] conflict patterns. Run DAG and parallel overlap validation scripts — no critic loop, script-based only. Fix conflicts before proceeding.
Progress: ├─ Tasks generated: {N} ({P} parallelizable), Coverage: FR {M}%, NFR {K}%
Trigger: tasks.md contains at least 1 task targeting a .sh file in scripts/.
"${CLAUDE_SKILL_DIR}/../../scripts/afc-test-pre-gen.sh" ".claude/afc/specs/{feature}/tasks.md" "spec/"
Verify skeletons are parseable: {config.test} should show Pending examples. Create tests-pre.md listing expectations per task. Progress: ├─ TDD pre-gen: {N} skeletons generated
Trigger: plan.md File Change Map lists >= 3 files.
"${CLAUDE_SKILL_DIR}/../../scripts/afc-blast-radius.sh" ".claude/afc/specs/{feature}/plan.md" "${CLAUDE_PROJECT_DIR}"
Exit 1 (cycle) → ESCALATE. High fan-out (>5 dependents) → warning + RISK note. Save to impact.md. Progress: ├─ Blast radius: {N} planned, {M} dependents
{config.test} before task execution. Failure → ask user to proceed/fix/abort.## Implementation Context and relevant FR/AC from spec.md${CLAUDE_SKILL_DIR}/../../docs/phase-gate-protocol.md first. On gate pass: "${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase-tag {phase_number}[x] updates in tasks.md{config.ci}:
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" ci-pass/afc:debug logic inline (RCA → hypothesis → targeted fix → re-run). If debug-fix fails 3× → abortTrigger: spec.md has GWT acceptance scenarios AND {config.test} is non-empty.
Map GWT → test cases (Given=Arrange, When=Act, Then=Assert). Run {config.test}. Failures reveal spec-implementation gaps — apply targeted fix or record as SC shortfall for Phase 4.
Progress: ├─ Acceptance tests: {N} generated, {M} passing
Critic Loop until convergence (safety cap: 5, follow docs/critic-loop-rules.md):
git diff changed files vs plan.md File Change Map. "M of N files match" count required.{config.architecture} rules. "N of M rules checked" count required.docs/critic-loop-rules.md.claude/afc/specs/{feature}/retrospective.md✓ 3/5 Implement complete ({completed}/{total} tasks, CI: ✓, Critic: converged ({N} passes, {M} fixes, {E} escalations))Evaluate AFTER Phase 3, BEFORE Phase 4. See
skills/auto/skill-advisor.md#checkpoint-d--post-implementfor full invocation patterns. Budget: max 2 skills. Skip ifADVISOR_COUNT >= 5.
Signals: D1 (testable files changed without test coverage → test generation Enrich), D2 (historical quality issues → pre-review QA Observe).
After advisor skill completes, append result summary to context.md:
## Advisor: {skill_name} (Checkpoint D)
- Insight: {1-line key finding}
- Action: {1-line required action or "none"}
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase review
Follow all review perspectives in skills/review/SKILL.md (A through H). Context reload: re-read context.md and spec.md before starting.
Collect changed files via git diff HEAD — read full content of each (not just diff). For each changed file, find dependents via LSP(findReferences) or Grep fallback. Build Impact Map. Affected files are cross-reference context, not full review targets.
For Parallel Batch and Review Swarm only — pre-scan: collect outbound call chain context and include Impact Map in each agent's ## Cross-File Context.
| File count | Mode |
|---|---|
| ≤5 | Direct review — no delegation |
| 6–10 | Parallel Batch — 2–3 files per agent, single message |
| 11+ | Review Swarm — N workers = min(5, file count / 2), single message |
Launch in a single message:
afc:afc-architect — architecture compliance vs rules and ADRs, update MEMORY.mdafc:afc-security — vulnerability scan with false-positive awareness, update MEMORY.mdA. Code Quality ({config.code_style}, direct), B. Architecture (delegated), C. Security (delegated), D. Performance (direct), E. Pattern Compliance (direct), F. Reusability (direct), G. Maintainability (direct), H. Extensibility (direct).
After all reviews complete, orchestrator MUST verify behavioral findings. Not optional — skipping is a review defect.
node_modules//vendor/ — verify against types/docs instead)If Checkpoint D produced QA_FINDINGS → include as Priority Hints. New test files (from D1) → include in review scope.
[AUTO-RESOLVED] items — does implementation match the guess? Mismatches → Critical..claude/afc/memory/reviews/ files — scan for recurring finding patterns..claude/afc/memory/retrospectives/ files — apply prevention rules.Critic Loop until convergence (safety cap: 5, follow docs/critic-loop-rules.md):
{M}/{N}, every GWT has code path, no spec constraint violated?{M} of {N} verified count required..claude/afc/memory/retrospectives/{YYYY-MM-DD}.md (concrete + root cause + prevention rule + severity).review-report.md (copied to .claude/afc/memory/reviews/{feature}-{date}.md in Clean).✓ 4/5 Review complete (Critical:{N} Warning:{N} Info:{N}, Cross-boundary: {M} verified, SC shortfalls: {N})Evaluate AFTER Phase 4, BEFORE Phase 5. See
skills/auto/skill-advisor.md#checkpoint-e--post-reviewfor full invocation patterns. Budget: max 1 skill. Skip ifADVISOR_COUNT >= 5.
Signal: E1 (recurring problem patterns → learner Observe).
After advisor skill completes, append result summary to context.md:
## Advisor: {skill_name} (Checkpoint E)
- Insight: {1-line key finding}
- Action: {1-line required action or "none"}
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase clean
.claude/afc/specs/{feature}/ (current pipeline). Do not delete other subdirectories.{config.gate} / {config.ci} first (linters detect unused imports/variables). Use dedicated tools (ts-prune, knip) before LLM-based scan. Remove empty directories.{config.ci}. Auto-fix on failure (max 2 attempts)..claude/afc/memory/[AUTO-RESOLVED] items → .claude/afc/memory/decisions/retrospective.md → .claude/afc/memory/retrospectives/review-report.md → .claude/afc/memory/reviews/{feature}-{date}.mdresearch.md (if not already persisted) → .claude/afc/memory/research/{feature}.md.claude/afc/memory/quality-history/{feature}-{date}.json with full phase metrics (clarify, spec, plan, implement, review, totals)..claude/afc/memory/checkpoint.md AND ~/.claude/projects/{ENCODED_PATH}/memory/checkpoint.md"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" log pipeline-end "Pipeline complete: {feature}"
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" end
✓ 5/5 Clean complete (deleted: {N}, dead code: {N}, CI: ✓)Auto pipeline complete: {feature}
├─ 1/5 Spec: US {N}, FR {N}, researched {N}
├─ 2/5 Plan: Critic converged ({N} passes), ADR {N} recorded, Implementation Context {W} words
├─ 3/5 Implement: {completed}/{total} tasks ({P} parallel), CI ✓
│ ├─ TDD: {triggered/skipped}, Blast Radius: {triggered/skipped}
│ ├─ Acceptance Tests: {N} generated ({M} passing) / skipped
│ └─ Critic: converged ({N} passes, {M} fixes, {E} escalations)
├─ 4/5 Review: Critical:{N} Warning:{N} Info:{N}
│ ├─ Perspectives: Quality, Architecture*, Security*, Performance, Patterns, Reusability, Maintainability, Extensibility
│ └─ (* = delegated to persistent-memory agent)
├─ 5/5 Clean: {N} artifacts deleted, {N} dead code removed
├─ Skill Advisor: {ADVISOR_COUNT} auxiliary skills invoked
│ {for each invoked: ├─ [{checkpoint}] {skill}: {summary}}
├─ Changed files: {N}
├─ Auto-resolved: {N} ({M} validated in review)
├─ Agent memory: architect {updated/skipped}, security {updated/skipped}
├─ Retrospective: {present/absent}
└─ .claude/afc/specs/{feature}/ cleaned up
Abort and report to user when:
{config.ci} fails 3 consecutive timesOn abort:
Pipeline aborted (Phase {N}/5)
├─ Reason: {abort cause}
├─ Completed phases: {completed list}
├─ Rollback: git reset --hard afc/pre-auto
├─ Checkpoint: .claude/afc/memory/checkpoint.md (last phase gate passed)
├─ Artifacts: .claude/afc/specs/{feature}/ (partial — manual deletion needed if Clean did not run)
└─ Resume: /afc:resume → /afc:implement (checkpoint-based)
[P] marker is assigned in tasks.md, it must execute in parallel. Sequential substitution is prohibited.## Implementation Context.context.md is written at Plan completion and read at Implement start (survives context compaction)./afc:debug logic.run_in_background: true on Task calls: agents must run in foreground so results are returned before the next step.docs/orchestration-modes.md for sequential/batch/swarm specifics.