npx skills add ...
npx skills add klerith/fernando-skills --skill spec-impl
Implements an approved spec. Validates that the state means "Approved" (in any language), creates a git branch named after the spec, switches to it, and starts the implementation step by step with pauses to review diffs.
npx skills add klerith/fernando-skills --skill spec-impl
Current repository state:
!git status --short
Current branch:
!git branch --show-current
Specs available in this folder:
!ls specs/ 2>/dev/null || echo "The specs/ folder does not exist"
Branch-creation config:
!cat specs/.spec-config.yml 2>/dev/null || echo "AutoCreateBranch: true (default, no config file)"
Follow these four phases in strict order. Do not advance to the next phase if the previous one did not complete correctly.
The received argument is: $ARGUMENTS
If $ARGUMENTS is empty:
specs/ (you already have them above).If $ARGUMENTS has a value:
specs/. The user may have written the full name (01-mvp-arkanoid), only the number (01), or only the slug (mvp-arkanoid). Try to find the correct file in any of those cases.Read the spec file you located in Phase 1 using the Read tool or cat.
In the file's contents, look for the line that contains the spec's state. The header label is typically **Status:** (English) or **Estado:** (Spanish), but it may use any language. Match by position (status line near the top of the spec) and by the surrounding state machine, not by the exact label.
Absolute rule: You can only continue if the state means "Approved" — regardless of the language used.
Treat any of the following (and their equivalents in other languages) as the Approved state and continue:
ApprovedAprobadoAprovadoApprouvéGenehmigtApprovatoAnything else (Draft / Borrador, In review / En revisión, Implemented / Implementado, Obsolete / Obsoleto, or any unrecognized value) means stop and show the error message below.
| State category | Examples (any language) | Action |
|---|---|---|
| Approved | Approved, Aprobado, Aprovado, Approuvé, … | Continue to Phase 3. |
| Draft | Draft, Borrador, … | Stop. Show the error message below. |
| In review | In review, En revisión, … | Stop. Show the error message below. |
| Implemented | Implemented, Implementado, … | Stop. Show the error message below. |
| Obsolete | Obsolete, Obsoleto, … | Stop. Show the error message below. |
| State line not found / unrecognized value | — | Stop. The file does not follow the expected format. Tell this to the user. |
If you are unsure whether a value means "approved", do not assume. Stop and ask the user to clarify or to update the spec to the canonical wording.
Standard error message when the state does not mean Approved:
Do not offer alternatives, do not suggest "I can still start if you want". The block is intentional.
Once you have confirmed the state means Approved:
Check the working tree first. Look at the git status --short output in the session context above. If it is not empty, stop and show the pending changes, then ask:
Wait for the answer. Do not stash or commit on the user's behalf unless they explicitly ask for it. If the working tree is clean, skip straight to step 1 without mentioning it.
Derive the branch name from the spec file's full name, without the extension. Format: spec-NN-slug. Examples:
01-mvp-arkanoid.md → branch spec-01-mvp-arkanoid02-powerups.md → branch spec-02-powerupsRead the AutoCreateBranch flag from the Branch-creation config shown in the session context above.
true (the default).false (in any capitalization) disables automatic branch creation.If AutoCreateBranch is true (default): proceed without asking.
git checkout -b spec-NN-slug.git log --oneline on the branch, and tell the user which steps of the plan already look done and which step you propose to resume from. Wait for confirmation on the resume point before implementing anything.git checkout spec-NN-slug and confirm the change was successful before continuing.If AutoCreateBranch is false: ask before touching git. Show:
true case above.Visually confirm to the user the spec is ready and which branch is active:
Do not start implementing yet. First show the spec summary to the user so they have it fresh. Extract and show:
**Objective:** / **Objetivo:** / equivalent label).## Scope / ## Alcance / equivalent section).## Implementation plan / ## Plan de implementación / equivalent).## Acceptance criteria / ## Criterios de aceptación / equivalent).Match section headings by meaning, not by exact wording — the spec may be authored in any language.
After showing the spec summary, tell the user:
Wait for explicit confirmation ("yes", "go ahead", "go", or equivalent). Do not start without it.
Once confirmed, follow these rules during the entire implementation:
Never commit automatically. Not per step, not at the end. You write the code and show the diff; committing is the user's decision and the user's command. Only commit if they explicitly ask you to.
One rule above all: implement what the spec says. If something in the spec looks suboptimal to you, mention it as an observation but implement what was agreed. Changes to the spec go into the spec, not into the code by surprise.
Work rhythm:
Step N completed. Could you review the diff and let me know if I continue with Step N+1?If during the implementation you find an ambiguity the spec does not resolve:
If the user asks for something that is out of the spec's scope:
When finishing the last step:
Branch creation is controlled by the AutoCreateBranch flag in specs/.spec-config.yml. It defaults to true (create the branch automatically, as shown above). Set it to false to make Phase 3 ask [y/N] before creating the branch.