| name | build |
| license | MIT |
| description | Writes implementation code, runs test suites, and validates changes against acceptance criteria for a pre-planned task. Use this skill when the 'Research' and 'Strategy' phases are complete and you are ready to apply a single, well-defined code change. Trigger words: implement task from plan, execute planned change, fix bug in task, add test for task, build feature slice.
|
| metadata | {"version":"1.0.0","user-invocable":"true","argument-hint":"<task reference or description> e.g. 'Task 2 from user-auth' or 'add rate limiting to the API'"} |
Build
When to use
Use for executing focused implementation tasks from an established plan. Not for broad architectural design, planning, or large-scale refactoring.
Process
- Read: Review the pre-defined task, spec, and relevant code. Stop and clarify if the scope is vague or exceeds a single task.
- Implement: Apply the smallest useful code change that satisfies the task requirements.
- Verify:
- TDD: Write/update tests for new behavior or bug fixes.
- Reproduction: For bugs, confirm the failure with a test before fixing.
- Full Suite: Run the strongest available project checks (e.g.
bundle exec rspec) to prevent regressions.
- Manual Check: Perform task-specific verification (e.g.,
curl an endpoint or check logs).
- Final Gate: Confirm behavior matches the task, no unrelated scope was added, and all tests pass.
Example: TDD Loop (Code-Level)
Task: "Implement User#admin? based on the role attribute."
- Write failing spec:
it "returns true if the user is an admin" do
user = User.new(role: "admin")
expect(user.admin?).to be true
end
- Run spec ā Confirm failure:
bundle exec rspec spec/models/user_spec.rb (Fails with NoMethodError: undefined method 'admin?')
- Implement (minimal):
def admin?
role == "admin"
end
- Run spec ā Confirm pass:
bundle exec rspec spec/models/user_spec.rb (Passes)
Example: Bug fix with verification
Task: "Fix 500 error on Search when query is nil"
ā Reproduce: Add a test case to spec/requests/search_spec.rb passing q: nil.
ā Verify Failure: Run the spec and see it crash in SearchService.
ā Fix: Add a null-object or guard in SearchService: query.to_s.strip.
ā Verify Pass: Re-run the spec.
ā Regression check: Run all search-related specs.
Rules
- Explicit Failure: Handle failure paths explicitly instead of leaving them implicit.
- Honest Verification: If a critical check could not be run, state it clearly.