norbertsuski/sdd-toolkit/sdd-goal-implement
Claude Code and agent skill by norbertsuski/sdd-toolkit
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Autonomously implement technical plans from CONTEXT_ROOT/changes/<change-id>/plan.md under your AI coding assistant's /goal — no human interaction at any point. Sibling of /sdd-implement for unattended runs, in an interactive /goal session or headless via your AI coding assistant -p. Flips the plan's Automated Progress rows, verifies each phase through an automatic quality-gate stack (plan success criteria, deliberate-break check, full suite), commits each phase on green with Conventional Commi…
Install
npx vskill@latest install norbertsuski/sdd-toolkit/sdd-goal-implementSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as norbertsuski/sdd-toolkit/sdd-goal-implement.
Implement Plan Autonomously (under /goal)
You are tasked with implementing an approved technical plan from $CONTEXT_ROOT/changes/<change-id>/plan.md (legacy: context/changes/<change-id>/plan.md) without human interaction. Plans contain phases with specific changes and a canonical ## Progress section at the bottom that drives execution state (see references/progress-format.md). This skill is the autonomous sibling of /sdd-implement: it shares the same plan contracts — plan resolution, ## Progress as single source of truth, touched-file tracking, Conventional-Commits protocol, change.md lifecycle — but every decision a human would make is replaced by an explicit automatic policy.
This skill operates under the CONTEXT_ROOT handed to it (the resolved base) — it does not run its own discovery. app: may be absent for flat roots; do not require it.
Positioning & invocation
Run this skill inside a /goal session. The goal condition is the session-level stop test; this skill is the execution policy that satisfies it.
- Interactive: set the goal first, then invoke the skill —
/goal <condition>followed by/sdd-goal-implement <change-id> [phase N]. - Headless:
your AI coding assistant -p "/goal <condition> /sdd-goal-implement <change-id>" --allowedTools "Read,Glob,Grep,Write,Edit,Bash,Task,TaskCreate,TaskUpdate,TaskList,TaskGet" --permission-mode acceptEdits.
Copy-paste /goal condition template (fill in <change-id> and a turn bound <N>, typically 20):
The goal evaluator reads only the conversation transcript — it cannot run commands or read files. Everything the condition tests for must therefore be narrated in your response text: gate verdicts, commit SHAs, pending Manual rows. A gate that passed silently is indistinguishable from a gate that never ran. Narrate.
Non-interaction policy
Nobody is watching the run. Never invoke interactive question tools — there is nobody to answer, and under headless invocation the call fails the run. Every decision is made by the policies in this document. When something is genuinely ambiguous and no policy below resolves it, pick the conservative interpretation, narrate the choice in your response text, and record it in the run report. Conservative means: the reading that touches fewer files, changes less behavior, and stays closest to the plan's literal text.
Setup
When this command is invoked:
- Resolve the plan:
- If invoked as
/sdd-goal-implement <change-id> [phase N], resolve to$CONTEXT_ROOT/changes/<change-id>/plan.md. - If invoked with
@$CONTEXT_ROOT/changes/<change-id>/plan.md(legacy:context/changes/<change-id>/plan.md) or a full path, accept it. - Refuse if the resolved path starts with `$CONTEXT_ROOT/archive/` (legacy:
context/archive/) — print "This change is archived. Open a new change with/sdd-newinstead." and STOP. - If no plan was provided or the resolved file does not exist, print one line —
Cannot start: no plan resolved from "<input>". Provide a change-id or plan path.— and STOP. Do not guess a change-id.
- Load context:
- Read the plan completely. The
## Progresssection at the bottom is authoritative for execution state — checkmarks (- [x]) live ONLY there. Phase blocks contain plain-bullets (no checkboxes). - Read
$CONTEXT_ROOT/foundation/lessons.mdif present and internalize each entry before starting any phase — these are the team's accepted recurring rules and must shape every implementation choice in this run. - Read all files mentioned in the plan (referenced research, frame, source files in the same change folder).
- Read files fully — never use limit/offset parameters; you need complete context.
- Resolve `audience` per
../sdd-shape/references/plain-mode.md's "Audience resolution": read$CONTEXT_ROOT/.sdd.local.yml, else ask+write there; defaulttechnical. Whenaudience: plain, write the run report (below) in plain language per../sdd-shape/references/plain-mode.md. This run is unattended either way;audiencechanges only the wording of the final report and the suggested follow-up.
- Preflight the gates: collect the commands from every phase's Automated success criteria and verify each is runnable in this environment (the binary or package script exists — e.g. check
package.jsonscripts,command -v,Makefiletargets). A criterion whose command cannot run is a structural mismatch for the phase that needs it: narrate the missing command now (PREFLIGHT: <command> not runnable — Phase <N> will stop unless fixed), and when execution reaches that phase, print the STOP block and halt. Do not silently skip an unverifiable criterion.
Preflight the index: run git diff --cached --name-only. Any pre-existing staged entry outside this change's scope would be silently bundled into every phase commit (git commit commits the whole index; explicit git add never unstages other entries). If the index is non-empty with such entries, print Cannot start: pre-existing staged changes would be bundled into phase commits: <paths>. Commit or unstage them first. and STOP — never git reset or unstage the user's index yourself.
- Update `change.md`: after confirming pending Automated work, apply
../sdd-run/references/verification-freshness.md— setstatus: implementingfrom{planned, plan_reviewed, implemented, impl_reviewed}and bumpupdatedbefore editing. If no Automated row is pending, do not downgrade.
- Create phase tasks: count total phases (from
## Phase N:headers) and create one TaskCreate entry per phase (subject: "Phase N: [Phase Name]",activeForm: "Implementing Phase N"). Set the current phasein_progressvia TaskUpdate before starting work; mark itcompletedwhen its gates pass and its commit lands.
- Find the next pending step: scan the
## Progresssection for the first- [ ]row under a `#### Automated` subsection in document order — that is where you start. Rows under#### Manualare outside your jurisdiction (see "Manual rows" below); skip over them when locating the resume point. If aphase Nargument was passed, jump to the first Automated- [ ]inside### Phase N:instead.
Mismatch taxonomy
Plans are carefully designed, but reality can be messy. When the codebase does not match what the plan describes, classify the mismatch and act — never edit Phase blocks to make the plan fit.
Minor — a moved file, a renamed symbol, import drift, a trivial API or config delta. The plan's intent is intact; only a coordinate changed. Adapt the implementation to reality, narrate the adaptation in one or two lines (ADAPT: plan says src/auth.ts, file is now src/auth/index.ts), and include it in the run report.
Structural — a missing dependency, an architecture that differs from what the plan assumes, a referenced file or API that does not exist, a phase that depends on output a prior phase never produced. The plan cannot be followed as written and adapting would mean redesigning it. Print the STOP block and halt.
When in doubt between the two, treat it as structural. A wrong guess that halts costs one resume; a wrong guess that adapts can ship a redesign nobody approved.
Per-phase gate stack
Implement the phase fully, then run this fixed sequence — the single canonical order for everything between "code written" and "commit landed." Gates run cheap-first; staging sits where the break-check needs it; the commit ritual is the tail. After each gate, print a one-line verdict in your response text — GATE <name>: PASS or GATE <name>: FAIL (<summary>, attempt <k>/2) — so the goal evaluator sees it.
- (a) Plan criteria — run the phase's
#### Automatedsuccess-criteria commands from the plan, in order. Each command is one gate with its own verdict line.
- Stage the touched-file set —
git addeach file by path (set definition and dirty-path handling: see "Tracking files touched during a phase"). Staging _here_, before the break-check, is what makes the break-check's restore exact.
- (b) Deliberate-break check — only for phases that add or change tests. With the phase's files staged, verify the new or changed test actually protects something:
- Invert or weaken the protected behavior in production code — a worktree-only edit, never staged.
- Run the relevant test (scoped run, e.g. the single test file).
- Confirm it fails. Red here is the pass condition:
GATE break-check: PASS (test went red on broken code). - Restore unconditionally via
git checkout -- <file>— this resets the worktree to the staged version exactly, so the break can never leak into the commit. - Narrate the sequence (what was broken, that the test went red, that the file was restored).
If the test stays green on broken code, the assertion protects nothing — that is a gate failure. Fix it by strengthening the assertion, never by weakening the production code or skipping the check. The break edit must never be committed; the restore in step 4 is unconditional, including on the failure path.
- (c) Repo-wide checks — full test suite, lint, typecheck, wherever the plan or the repository defines them (e.g. a
ci:localscript,make check test). One verdict line each.
- (d) Commit — the commit-only-on-green invariant: never start the commit ritual while any gate above is red. There is no override. If a self-fix to gate (b)/(c) changed files, re-run step 2 to capture them, then run the Autonomous commit ritual.
Self-fix escalation
A failing gate gets at most 2 self-fix attempts. Number them in the verdict lines (attempt 1/2, attempt 2/2). If the same gate fails a third time, the problem is deeper than mechanical drift — print the STOP block and halt rather than burning turns.
Boundaries on what a fix may do:
- Never weaken an assertion, delete a test, or relax a lint/typecheck rule to make a gate pass, unless the plan explicitly says so. Fix the code to meet the check, not the check to meet the code.
- When a test's expected value is ambiguous — the plan and the implementation disagree and there is no independent source for the right answer — do not guess. Mark the step uncertain in the run report, leave the gate's verdict honest, and let the STOP path or the report surface it for a human.
STOP block format
The STOP block is the human-facing failure surface and the signal the goal evaluator reads as "not done". Print it exactly in this shape, then halt — no further edits, no commit:
Before halting, leave the working tree honest: completed Progress rows stay flipped, in-progress work stays in the worktree uncommitted, and any deliberate-break edit is restored. Resume needs no extra state — the first pending Automated row is the re-entry point.
Tracking files touched during a phase
The commit ritual stages files from a touched-file set maintained in working memory throughout each phase. This set is the canonical input to git add — never fall back to git status heuristics for staging decisions.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sdd-goal-implement/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/norbertsuski/sdd-toolkit/sdd-goal-implement)