core/capabilities/execution/implement/SKILL.md
Implements a single task from the plan using TDD discipline. Reads the task spec, writes tests first, writes minimal passing code, refactors, and commits. Use when executing a planned task, writing code for a feature, or when the user says "implement this", "write the code", "build this task", or "execute the plan".
npx skillsauth add xoai/sage implementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Write code for one task. Follow TDD. Stay in scope. Commit.
Core Principle: Implementation is the mechanical part. The thinking was done in the spec and plan. Your job now is to faithfully translate the plan into working, tested code — not to redesign, optimize, or "improve" beyond what was specified.
During the execution phase of any workflow, when a task from the plan is ready for implementation.
Read the full task specification from the plan. Understand:
If anything is unclear, ASK before proceeding. Guessing at requirements causes rework. It is always faster to ask one question than to rewrite 200 lines of code.
Reference the codebase-scan output and .sage/conventions.md:
Your implementation MUST follow existing conventions unless the task explicitly requires deviating from them.
Follow the tdd skill strictly:
Before declaring the task complete, check:
This is the critical persistence step. After committing, update the plan file to record completion. This is NOT optional — it IS the state persistence mechanism.
In the plan file (.sage/work/<feature>/plan.md):
- [ ] → - [x]✅ DONE (commit: <hash>)**Last updated:** timestamp**Status:** to completeWhy this matters: If the session ends unexpectedly — terminal closed, context window full, connection dropped — the plan file on disk shows exactly which tasks are done. The next session reads the plan file, sees the checkboxes, and resumes from the right place. This works because artifacts are the source of truth.
Write a semantic commit message:
<type>(<scope>): <short description>
<what was done and why, referencing the task>
Types: feat, fix, refactor, test, docs, chore
MUST (violation = broken code or lost work):
tdd skill is mandatory and has no exceptions.scope-guard skill is active. Do what the task says.SHOULD (violation = suboptimal but working):
MAY (context-dependent):
On Tier 1 platforms (Claude Code, Codex), each task implementation MAY be dispatched to a fresh subagent with clean context. The subagent receives:
The subagent implements, tests, self-reviews, and commits. Then the spec-review and quality-review run as separate subagents (adversarial review).
On Tier 2 platforms, the same process runs sequentially in one session.
testing
Root cause diagnosis with evidence, Reproducing test, Minimal patch
tools
Session resumption with context
tools
Configure Sage preset and project settings. Switch between base, startup, enterprise, or opensource constitution presets. Use when the user says "configure sage", "change preset", or "sage settings".
development
Brief (medium+ tasks), Spec, Implementation plan