agentleFS
KoshuxKoshux/agentic-sdlc-scaffold/.claude/skills/implement-spec/SKILL.md

implement-spec

Skill0 starsChanged 4 months agoMITView on GitHub

Implement a spec-backed feature through the full 7-stage SDLC. Verifies the Stage 2.5 spec review is recorded, enforces branch-from-latest-main, implementation log before code, container preflight before tests, Stage 5.5 self-review, and Stage 5.6 PR triage — then stops before merge. Use when given a spec number or spec file and asked to implement it.

  • Commits and pushes

35 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use audit-choices, close-spec and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dzhngSkill

    audit-choices

    Audit the choices an implementing agent made, not its diff — a pure decision audit that traces the session's history into a choices ledger, changes no code, and never blocks an unsupervised run. Working code still embeds architecture the user never chose; surface it because future work inherits it. Use when the user wants to review the decisions the AI made on their behalf, before merging or committing AI-implemented work, when integrating a delegated subagent's pass, or when a fix "works" but might be a point fix.

    Also in 3 projects that use this

  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 3 projects that use this

  • LucasMatuszewskiSkill

    audit-agents

    Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.

    Also in 3 projects that use this

  • loulanyueSkill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 8 projects that use this

  • Halcyon666Skill

    write-skills

    Creates high-quality Agent Skills (SKILL.md files) that follow the open Agent Skills specification. Use when asked to create a skill, write a SKILL.md, package agent instructions, build a reusable capability, or turn a workflow into a shareable skill. Produces spec-compliant, concise, well-structured skills optimized for agent discovery and execution.

    Also in 3 projects that use this

  • RoentekSkill

    writing-beats

    Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.

    Also in 9 projects that use this

  • +6 more from dzhng

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 4 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 32 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the spec: docs/specs/SPEC-<NNN>-*.md.

    line 16
  2. Very specific:

    Read .claude/rules/00-core-workflow.md and .claude/rules/testing.md.

    line 17
  3. Very specific:

    Read the area rules the spec touches: .claude/rules/database.md, .claude/rules/backend.md, .claude/rules/frontend.md as applicable.

    line 18
  4. Very specific:

    Use .claude/rules/codemap.md to map each change to the files it touches.

    line 20
  5. Distinctive:

    Never branch from another feature branch.

    line 39
  6. Very specific:

    Create IMPLEMENTATION_<YYYY-MM-DD_HH-MM>.md at the repo root before the first code change, following …

    line 44
  7. Distinctive:

    Parallelisation check first: If the spec decomposes into 2+ genuinely independent units (non-overlapping files, no ordering dependency — …

    line 54
  8. Very specific:

    No placeholder code. No TODO comments in production paths.

    line 68
  9. Distinctive:

    Start exactly the services the tests require — never assume they are running:

    line 72
  10. Very specific:

    Wait for healthy status. A stopped service is a setup failure, not a code bug — fix the setup, never the test.

    line 78
  11. Very specific:

    Run only the tests relevant to the change (.claude/rules/testing.md.

    line 84
  12. Distinctive:

    Before browser/e2e verification, re-surface the spec prompt's data-sync (production snapshot) decision — Required / Not required / Decide …

    line 94
  13. Very specific:

    Run the self-code-review skill on git diff origin/main...HEAD before push.

    line 102

“Common” is measured: kept by at least 6 in 10 of the 32 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spec Implementation Workflow

You are implementing a spec-backed feature. Run the gates below in order — never skip or reorder. Full lifecycle reference: docs/sdlc.md. Integrity rules: .claude/rules/00-core-workflow.md.

Before writing any code

  1. Read the spec: docs/specs/SPEC-<NNN>-*.md.
  2. Read .claude/rules/00-core-workflow.md and .claude/rules/testing.md.
  3. Read the area rules the spec touches: .claude/rules/database.md, .claude/rules/backend.md, .claude/rules/frontend.md as applicable.
  4. Use .claude/rules/codemap.md to map each change to the files it touches.

Gate 0 — Verify Stage 2.5 is recorded

The spec must carry a recorded Stage 2.5 spec-review pass under its header (see docs/templates/SPEC-TEMPLATE.md). If there is no record, stop and run the spec-review skill first. Implementing an unreviewed spec bakes design errors and reinvented infrastructure into code — far more expensive to unwind than the review is to run.

Gate 1 — Branch from latest main

git fetch origin
git checkout main && git pull origin main
git checkout -b feature/spec-<NNN>-<short-name>
git branch --show-current   # confirm

Never branch from another feature branch. If the branch already exists, stop and confirm with the operator before proceeding.

Gate 2 — Implementation log (hook-enforced)

Create IMPLEMENTATION_<YYYY-MM-DD_HH-MM>.md at the repo root before the first code change, following docs/templates/IMPLEMENTATION-LOG-TEMPLATE.md: objective, branch name, plan (checkbox list), progress section, regression-risk table. Update it in real time, not retrospectively. Creating the log first is the rule; .claude/hooks/enforce-implementation-log.cjs enforces it at completion time — it blocks finishing the task while working-tree changes exist without a changed IMPLEMENTATION_*.md — not per-edit.

Gate 3 — Implement

Parallelisation check first. If the spec decomposes into 2+ genuinely independent units (non-overlapping files, no ordering dependency — e.g. an unrelated backend route and frontend page), adopt the orchestrate skill's protocol: complete and freeze the shared prerequisites yourself, then fan out backend-implementer / frontend-implementer workers. If the units are coupled, sequential, or small, work sequentially. When in doubt, sequential. See docs/parallelisation.md.

Then follow the spec's implementation phases in order:

  • Schema first if Prisma changes are involved: edit schema.prisma → pnpm prisma migrate dev → pnpm db:generate → pnpm zod:generate (see .claude/rules/database.md).
  • Backend before frontend.
  • pnpm tsc --noEmit after every phase that touches types.
  • No placeholder code. No TODO comments in production paths.

Gate 4 — Infrastructure preflight (before any test run)

Start exactly the services the tests require — never assume they are running:

docker compose up -d postgres-main && docker compose ps

Wait for healthy status. A stopped service is a setup failure, not a code bug — fix the setup, never the test. On a Windows host, run compose from WSL Bash (.claude/rules/windows-wsl2.md).

Gate 5 — Targeted tests

Run only the tests relevant to the change (.claude/rules/testing.md; full matrix in docs/testing.md):

  • pnpm tsc --noEmit — always, all affected packages
  • Backend unit tests — pnpm --filter api-core vitest run <path>, targeted to changed controllers/services
  • Backend integration tests — if API paths changed
  • Frontend e2e — if UI pages or middleware changed (pnpm e2e from frontend/)
  • Migration round-trip — if the Prisma schema changed

Before browser/e2e verification, re-surface the spec prompt's data-sync (production snapshot) decision — Required / Not required / Decide at implement time — and act on it.

Anti-cyclic-loop rule applies: read failures fully, distinguish setup from product failures, never retry the same approach twice.

Gate 6 — Stage 5.5 self code review

Run the self-code-review skill on git diff origin/main...HEAD before push. Fix every HIGH finding on this branch, or file an iteration spec (SPEC-<NNN><letter>-<short-name> — policy in .claude/rules/00-core-workflow.md). Record the pass in the implementation log under ## Self Code Review. Non-skippable except trivial single-line/doc-only changes.

Gate 7 — Push, open PR, Stage 5.6 triage

git push origin feature/spec-<NNN>-<short-name>

Open the PR. If the repo has a PR-bot reviewer, its review lands a few minutes later — triage it without being re-instructed via the pr-review skill: validate every finding against the live codebase + spec (bots emit false positives — never blind-apply), fix valid ones on-branch, record declined ones with a one-line reason under ## Automated PR Review (Stage 5.6), re-run relevant tests + tsc, push.

Gate 8 — STOP (operator boundary)

Do not merge to main. Ever. Browser verification: if the chrome-devtools MCP server is connected, self-verify via the browser-verify skill; otherwise record it as pending operator review. Either way, final browser sign-off and merge belong to the operator.

Close with a completion summary: files changed, tests passed and what they proved, what remains for operator review, open risks or deferred items from the spec.

Spec to implement: $ARGUMENTS

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.