AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Afc:implement

skill-jhlee0409-all-for-claudecode-implement · by jhlee0409

Execute code implementation — implement features, refactors, or planned changes

No reviews yet
0 installs
27 views
0.0% view→install

Install

$ agentstack add skill-jhlee0409-all-for-claudecode-implement

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-jhlee0409-all-for-claudecode-implement)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Afc:implement? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

/afc:implement — Execute Code Implementation

> Executes implementation phase by phase with dependency-aware scheduling. > Generates tasks.md automatically from plan.md if absent. Swarm mode activates for high-parallelism phases.

Arguments

  • $ARGUMENTS — (optional) Specific task ID or phase to run (e.g., T005, phase3)

Project Config (auto-loaded)

!cat .claude/afc.config.md 2>/dev/null || echo "[CONFIG NOT FOUND] .claude/afc.config.md not found. Create it with /afc:init."

Config Load

Always read .claude/afc.config.md first (read manually if not auto-loaded above).

If config file is missing:

  1. Ask the user: ".claude/afc.config.md not found. Run /afc:init to set up the project?"
  2. If user accepts → run /afc:init, then restart this command with the original $ARGUMENTS
  3. If user declines → abort

Execution Steps

0. Safety Snapshot

Before starting implementation, create a rollback point:

git tag -f afc/pre-implement
  • On failure: immediately rollback with git reset --hard afc/pre-implement
  • Tag is automatically overwritten on the next /afc:implement run
  • Skip if running inside /afc:auto pipeline (the afc/pre-auto tag already exists)

Standalone safety activation (skip if inside /afc:auto): If no active pipeline state exists, activate it for the duration of this command:

"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" start {feature-name-from-plan.md}
"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase implement

This enables Stop Gate and CI Gate hooks during standalone implementation. Release on completion (Step 7) or failure rollback.

1. Load Context

  1. Current branchBRANCH_NAME
  2. Load from .claude/afc/specs/{feature}/:
  • plan.md (required) — abort if missing: "plan.md not found. Run /afc:plan first."
  • spec.md (for reference)
  • research.md (if present)
  • tasks.md (if present — may be generated in Step 1.3)
  1. Recent changes: run git log --oneline -20
  2. Smoke test: run {config.gate} before starting:
  • Fails → diagnose before implementing (fix first or report to user)
  1. Baseline test (if {config.test} is non-empty): run {config.test}:
  • Fails → ask user: "(1) Proceed anyway (2) Fix first (3) Abort"
  • Empty → skip

1.3. Task List Generation (if tasks.md absent)

  1. Parse plan.md File Change Map: extract files, actions, descriptions, Depends On, Phase
  2. Generate tasks.md:
  • Convert each row to: - [ ] T{NNN} {[P]} {description} \{file}\ {depends: [TXXX]}
  • Assign [P] to tasks in the same Phase with no file dependency overlap
  • Map Depends On column to depends: [TXXX] references
  • Include phase gate validation task per phase
  • Include coverage mapping at bottom (FR/NFR → tasks, Entity → tasks, Constraint → tasks)
  1. Validate:

``bash "${CLAUDE_SKILL_DIR}/../../scripts/afc-dag-validate.sh" .claude/afc/specs/{feature}/tasks.md "${CLAUDE_SKILL_DIR}/../../scripts/afc-parallel-validate.sh" .claude/afc/specs/{feature}/tasks.md ``

  1. If validation fails → fix and re-validate (max 2 attempts)
  2. Save to .claude/afc/specs/{feature}/tasks.md

If tasks.md already exists: use as-is, skip generation.

1.5. Parse Task List

  1. Extract each task's ID, [P] marker, description, file paths, depends: list
  2. Group by phase; build dependency graph (validate DAG — abort if circular)
  3. Identify already-completed [x] tasks
  4. Load Implementation Context section from plan.md (used in sub-agent prompts)

1.7. Retrospective Check

If .claude/afc/memory/retrospectives/ exists, load the most recent 3 files and scan for patterns relevant to the current task (file conflicts, unexpected dependencies, CI failures after parallel execution). Flag similar patterns. Skip gracefully if absent. Do not load more than 3 files — diminishing returns beyond recent history.

2. Check Progress

  • If completed tasks exist, display:

`` Progress: {completed}/{total} ({percent}%) Next: {first incomplete task ID} - {description} ``

  • If a specific task/phase is specified via $ARGUMENTS, start from that item

3. Phase-by-Phase Execution

Execute each phase in order. Choose orchestration mode based on whether multi-agent coordination overhead is justified.

Mode Selection

| Condition | Mode | |-----------|------| | No [P] markers | Sequential | | [P] tasks but delegation criteria NOT met | Sequential | | [P] tasks, ALL criteria met, moderate parallelism | Parallel Batch | | [P] tasks, ALL criteria met, high parallelism (multiple rounds needed) | Swarm |

Default is direct execution: main agent executes tasks directly unless all 4 parallel delegation criteria are met. See docs/orchestration-modes.md for full criteria, execution patterns, failure recovery, and dependency resolution.

Sequential Mode

Execute one at a time in order. On start: ▶ {ID}: {description}. On complete: ✓ {ID} complete.

Dependent task chaining: When Task B depends on Task A (same worker), use SendMessage to resume the existing worker instead of spawning a new one. This preserves Task A's full context (file reads, decisions, test results) for Task B.

Parallel Batch Mode

For moderate independent [P] tasks. Launch multiple Task() calls in a single message (concurrent). See docs/orchestration-modes.md for prompt template, verification steps, and failure recovery.

Key constraints:

  • Pre-validate no file overlap before launching (downgrade to sequential if overlapping)
  • After each batch: poll TaskList manually for newly-unblocked tasks (auto-unblocking not guaranteed in sub-agent mode)
  • Verification failures → main agent fixes directly, no re-delegation
  • run_in_background: true is never used on Task calls
Swarm Mode

For high-parallelism phases requiring multiple orchestrator rounds. Orchestrator pre-assigns tasks — workers never self-claim. Max 5 concurrent sub-agents (platform limit). See docs/orchestration-modes.md for full swarm protocol, worker prompt template, and failure recovery.

Phase Completion Gate

> Always read ${CLAUDE_SKILL_DIR}/../../docs/phase-gate-protocol.md first and perform all steps in order. > Cannot advance to the next phase without passing the gate. Abort and report after 3 consecutive CI failures.

After passing the gate:

"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" phase-tag {phase_number}

4. Task Execution Pattern

For each task:

  1. Read files: always read before modifying
  2. TDD cycle (when plan.md Test Strategy marks target file as "required"):
  • Red → Green → Refactor
  • If {config.tdd} is strict or guide: enforce order. If off or unset: recommended only.
  1. Implement: write code following plan.md design
  2. Type/Lint check: verify with {config.gate}
  3. Update tasks.md: mark completed tasks as [x]

5. Final Verification

{config.ci}
  • Pass → output final report
  • Fail → Debug-based RCA:
  1. Execute /afc:debug logic inline with the CI error as input
  2. RCA: error trace → data flow → hypothesis → targeted fix
  3. Re-run {config.ci} after fix
  4. If debug-fix cycle fails 3 times → report to user with diagnosis details

6. Implement Critic Loop

After CI passes, run a convergence-based Critic Loop to verify design alignment.

> Always read ${CLAUDE_SKILL_DIR}/../../docs/critic-loop-rules.md first and follow it.

Critic Loop until convergence (safety cap: 5):

Fast-path: If total changed files ≤ 3 AND no new public API surface: run SCOPEADHERENCE + CORRECTNESS only (skip ARCHITECTURE and SIDEEFFECT_SAFETY). Adversarial pass: 1 perspective instead of 3. This reduces overhead for small, contained changes without sacrificing correctness.

Full critic (when fast-path does not apply):

  • SCOPE_ADHERENCE: Compare git diff changed files against plan.md File Change Map. "M of N files match."
  • ARCHITECTURE: Validate against {config.architecture} rules. "N of M rules checked."
  • CORRECTNESS: Cross-check against spec.md acceptance criteria. "N of M AC verified."
  • SIDEEFFECTSAFETY: Verify callee behavior compatibility for changed call order/error handling/state flow. "{M} of {N} behavioral changes verified."
  • Adversarial 3-perspective (mandatory each pass): Skeptic, Devil's Advocate, Edge-case Hunter — one failure scenario each. Realistic → FAIL + fix. Unrealistic → quantitative rationale.
  • FAIL → auto-fix + re-run {config.ci}. ESCALATE → pause for user. DEFER → record reason.

7. Final Output

Standalone cleanup (if pipeline was activated in Step 0):

"${CLAUDE_SKILL_DIR}/../../scripts/afc-pipeline-manage.sh" end
Implementation complete
├─ Tasks: {completed}/{total}
├─ Phases: {phase count} complete
├─ CI: {config.ci} passed
├─ Changed files: {file count}
└─ Next step: /afc:review (optional)

Notes

  • Read existing code first: always read file contents before modifying.
  • No over-modification: do not refactor beyond what is in plan.md.
  • Architecture compliance: follow {config.architecture} rules.
  • {config.ci} gate: must pass on phase completion. Do not bypass.
  • File overlap: strictly prohibited between parallel tasks.
  • Error classification: stop on deterministic (same) errors; allow retries for transient (different) errors. Hard cap: 5 retries.
  • Real-time tasks.md updates: mark checkbox on each task completion.
  • Orchestration modes reference: docs/orchestration-modes.md

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.