Service Implementation
Purpose
Change production code within an agreed boundary and leave enough evidence for another engineer to verify the result.
Change context
- Read the assigned task, requirements, architecture notes, and write scope.
- Read the failing test and implementation contract from
tdd-workflow when present.
- Read the recommendation from
engineering-quality when the route includes maintainability or refactoring work.
- Inspect nearby code before choosing patterns.
- Confirm tests or validation commands before editing.
- Check for dirty files and avoid overwriting unrelated user changes.
Change method
- Reproduce the current behavior or failure before editing when the task permits it.
- Make the smallest coherent change that satisfies the acceptance criteria and failing test.
- Reuse local patterns and dependencies. Add an abstraction only when it protects a real boundary or removes proven duplication.
- Keep interface, data, migration, and backward-compatibility effects explicit.
- Add or adjust a boundary or failure test if the existing contract could pass an incorrect implementation.
- Run the narrow verification first, then the affected suite. Report any check that could not run and why.
- Update the canonical documentation, runbook, ADR, or project note when behavior or operating steps change.
Engineering constraints
- Apply
engineering-quality to new production code and focused refactors.
- Use current primary documentation before relying on external technology behavior. Context7 MCP is the preferred documentation source when available.
- Preserve dirty or unrelated files. Do not overwrite work that is outside the assigned scope.
- Obtain approval immediately before an irreversible, production-facing, costly, or security-sensitive action.
- Keep comments about hidden constraints and tradeoffs; let names and structure explain ordinary behavior.
Evidence
- Files and behavior changed
- Acceptance criteria satisfied
- Tests and validation commands with results
- Documentation or project memory updated
- Remaining risk, rollback, and deferred work
Ready when
- The diff stays within the stated write scope.
- The code has clear responsibilities, dependencies, side effects, and failure behavior.
- Existing behavior is preserved unless the requirement changes it explicitly.
- No test was weakened, skipped, or deleted merely to obtain a passing run.
- Validation evidence is reproducible.
Handoff
Hand off the changed files, test evidence, residual risk, rollback path, and documentation updates to qa-eval or pr-review.
References
references/implementation-contract.md: Use this as the implementation handoff contract.
1---2name: service-implementation3description: Implement a bounded feature, bug fix, module, service, or migration after the expected behavior, write scope, interfaces, and validation commands are known. Use when production code must change. Preserve unrelated work and existing contracts; do not use this skill to plan a broad product or to perform an unscoped rewrite.4---56# Service Implementation78## Purpose910Change production code within an agreed boundary and leave enough evidence for another engineer to verify the result.1112## Change context1314- Read the assigned task, requirements, architecture notes, and write scope.15- Read the failing test and implementation contract from `tdd-workflow` when present.16- Read the recommendation from `engineering-quality` when the route includes maintainability or refactoring work.17- Inspect nearby code before choosing patterns.18- Confirm tests or validation commands before editing.19- Check for dirty files and avoid overwriting unrelated user changes.2021## Change method22231. Reproduce the current behavior or failure before editing when the task permits it.242. Make the smallest coherent change that satisfies the acceptance criteria and failing test.253. Reuse local patterns and dependencies. Add an abstraction only when it protects a real boundary or removes proven duplication.264. Keep interface, data, migration, and backward-compatibility effects explicit.275. Add or adjust a boundary or failure test if the existing contract could pass an incorrect implementation.286. Run the narrow verification first, then the affected suite. Report any check that could not run and why.297. Update the canonical documentation, runbook, ADR, or project note when behavior or operating steps change.3031## Engineering constraints3233- Apply `engineering-quality` to new production code and focused refactors.34- Use current primary documentation before relying on external technology behavior. Context7 MCP is the preferred documentation source when available.35- Preserve dirty or unrelated files. Do not overwrite work that is outside the assigned scope.36- Obtain approval immediately before an irreversible, production-facing, costly, or security-sensitive action.37- Keep comments about hidden constraints and tradeoffs; let names and structure explain ordinary behavior.3839## Evidence4041- Files and behavior changed42- Acceptance criteria satisfied43- Tests and validation commands with results44- Documentation or project memory updated45- Remaining risk, rollback, and deferred work4647## Ready when4849- The diff stays within the stated write scope.50- The code has clear responsibilities, dependencies, side effects, and failure behavior.51- Existing behavior is preserved unless the requirement changes it explicitly.52- No test was weakened, skipped, or deleted merely to obtain a passing run.53- Validation evidence is reproducible.5455## Handoff5657Hand off the changed files, test evidence, residual risk, rollback path, and documentation updates to `qa-eval` or `pr-review`.5859## References6061- `references/implementation-contract.md`: Use this as the implementation handoff contract.