Implement Feature Skill
[!IMPORTANT]
Implement an approved feature plan with fresh-context slices, TDD, evidence, and PR-ready output.
Optional args: slug=, ticket=<id/url>, mode=interactive|autonomous|channel, channel=, auto_continue=true|false, profile=business|hybrid|technical.
Instructions
When the user asks to perform this workflow, execute the following steps:
Implement Feature Workflow
Goal: Build an approved feature through TDD slices and route completed work to verification.
Steps
- Load plan:
- Search
docs/prd/ and docs/srs/ for a matching [slug]; if absent, use the newest matching artifact.
- If multiple candidates exist, ask the user to choose or input the target slug.
- PRD or ticket
- SRS/FRS technical design if present
- Implementation plan
- Matched framework and common skills
- If stable
REQ-*, AC-*, trace, or required SRS/test lanes are missing, stop and route to plan-feature, design-solution, or implementation-readiness.
snc_tier/model_tier from handoff (score per common-task-complexity-routing if absent); high adds specialist-architecture-guard and specialist-security-reviewer before verify-work.
- Prepare workspace:
- Confirm clean or intentionally dirty git state.
- Create branch or worktree only when project workflow expects it.
- Provision dependencies BEFORE tests (
npm ci/pnpm i/yarn, flutter pub get, ./gradlew dependencies, or pip install -e . from the lockfile); isolated worktrees lack ignored toolchains.
- If install fails from network, auth, or time budget, report
verification_infra_failed with the exact command/error; never claim tests passed or silently skip verification.
- Initialize or update
docs/srs/srs-task-list.md with small vertical slices.
- Implement slices:
- For each slice, write or update the failing test first.
- Before the test, record its observable contract, distinct fault, smallest layer, minimal cases, and exact focused command (the Test Intent Record).
- Consume the named
REQ-* and AC-* for each slice; do not invent scope from code inspection.
- For new behavior, do not keep pre-test implementation code as a reference: observe the expected RED first.
- For legacy or bug-fix slices, characterize only when needed, then make the intended change RED while preserving unrelated existing code.
- Implement the smallest passing code.
- Refactor without expanding scope.
- Run the focused target in foreground, single-run, sequential mode; classify invalid RED, unexpected GREEN, timeout, and cleanup instead of retrying blindly.
- Keep slice evidence near the task item.
- Use sub-agents only when the runtime supports them and ownership is disjoint.
- If a fix path is unclear, stop and apply root-cause debugging before more code changes.
- Maintain context hygiene:
- Start fresh context for large independent slices when possible.
- Preserve decisions in
docs/srs/srs-task-list.md or docs/prd/prd-plan-[slug].md.
- If behavior or scope changes, update
docs/prd/prd-[slug].md and docs/srs/srs-[slug].md before closing the slice.
- Avoid carrying raw logs; summarize failures and fixes.
- Prepare handoff:
- Run fresh local automated checks before claiming success.
- Update requirement trace notes for changed AC coverage.
- Capture evidence in
docs/srs/srs-walkthrough.md.
- For autonomous/channel mode, delegate only with disjoint files, owner, AC IDs, expected artifact, and verification command.
- Route next step to
verify-work.
Runtime Contract
- Use for approved plans ready to build; failing test first, no pre-test implementation kept as reference.
- Required inputs: PRD/ticket with stable
REQ-*/AC-* trace and required SRS/test lanes.
- Return BLOCKED only when required trace, owner, or test lanes are missing.
Handoff Payload
slug, operator_profile (carried, not re-inferred), snc_tier, model_tier, completed slices, tests run, changed contracts, delegation packets, outcome report, next workflow.
Blocking Questions
- Ask max 3 at a time with a recommended default and 2-3 options.
Output Template
# Implementation Handoff: [Name]
## Completed Slices
## Tests Run
## Changed Contracts
## Requirement Trace Updates
## Evidence
## Known Risks
## Delegation Packets
## Outcome Report
feature_status: partially_implemented | implemented | blocked
requirement_trace: BRD-OBJ-* -> REQ-* -> AC-* -> SRS-* -> evidence
completed_evidence: []; missing_evidence: []; decision_needed: []; recommended_next_workflow: verify-work | plan-feature | design-solution
## Next Workflow
verify-work
## Cost Report
Call `get_session_cost(workflow="implement-feature")` before final handoff.
1---2name: implement-feature-23description: Implement an approved feature plan with fresh-context slices, TDD, evidence, and PR-ready output.4---5# Implement Feature Skill67> [!IMPORTANT]8> Implement an approved feature plan with fresh-context slices, TDD, evidence, and PR-ready output.910Optional args: slug=<feature>, ticket=<id/url>, mode=interactive|autonomous|channel, channel=<id>, auto_continue=true|false, profile=business|hybrid|technical.1112## Instructions1314When the user asks to perform this workflow, execute the following steps:151617# Implement Feature Workflow1819Goal: Build an approved feature through TDD slices and route completed work to verification.2021## Steps22231. Load plan:24 - Search `docs/prd/` and `docs/srs/` for a matching `[slug]`; if absent, use the newest matching artifact.25 - If multiple candidates exist, ask the user to choose or input the target slug.26 - PRD or ticket27 - SRS/FRS technical design if present28 - Implementation plan29 - Matched framework and common skills30 - If stable `REQ-*`, `AC-*`, trace, or required SRS/test lanes are missing, stop and route to `plan-feature`, `design-solution`, or `implementation-readiness`.31 - `snc_tier`/`model_tier` from handoff (score per `common-task-complexity-routing` if absent); `high` adds `specialist-architecture-guard` and `specialist-security-reviewer` before `verify-work`.322. Prepare workspace:33 - Confirm clean or intentionally dirty git state.34 - Create branch or worktree only when project workflow expects it.35 - Provision dependencies BEFORE tests (`npm ci`/`pnpm i`/`yarn`, `flutter pub get`, `./gradlew dependencies`, or `pip install -e .` from the lockfile); isolated worktrees lack ignored toolchains.36 - If install fails from network, auth, or time budget, report `verification_infra_failed` with the exact command/error; never claim tests passed or silently skip verification.37 - Initialize or update `docs/srs/srs-task-list.md` with small vertical slices.383. Implement slices:39 - For each slice, write or update the failing test first.40 - Before the test, record its observable contract, distinct fault, smallest layer, minimal cases, and exact focused command (the Test Intent Record).41 - Consume the named `REQ-*` and `AC-*` for each slice; do not invent scope from code inspection.42 - For new behavior, do not keep pre-test implementation code as a reference: observe the expected RED first.43 - For legacy or bug-fix slices, characterize only when needed, then make the intended change RED while preserving unrelated existing code.44 - Implement the smallest passing code.45 - Refactor without expanding scope.46 - Run the focused target in foreground, single-run, sequential mode; classify invalid RED, unexpected GREEN, timeout, and cleanup instead of retrying blindly.47 - Keep slice evidence near the task item.48 - Use sub-agents only when the runtime supports them and ownership is disjoint.49 - If a fix path is unclear, stop and apply root-cause debugging before more code changes.504. Maintain context hygiene:51 - Start fresh context for large independent slices when possible.52 - Preserve decisions in `docs/srs/srs-task-list.md` or `docs/prd/prd-plan-[slug].md`.53 - If behavior or scope changes, update `docs/prd/prd-[slug].md` and `docs/srs/srs-[slug].md` before closing the slice.54 - Avoid carrying raw logs; summarize failures and fixes.555. Prepare handoff:56 - Run fresh local automated checks before claiming success.57 - Update requirement trace notes for changed AC coverage.58 - Capture evidence in `docs/srs/srs-walkthrough.md`.59 - For autonomous/channel mode, delegate only with disjoint files, owner, AC IDs, expected artifact, and verification command.60 - Route next step to `verify-work`.6162## Runtime Contract63- Use for approved plans ready to build; failing test first, no pre-test implementation kept as reference.64- Required inputs: PRD/ticket with stable `REQ-*`/`AC-*` trace and required SRS/test lanes.65- Return BLOCKED only when required trace, owner, or test lanes are missing.66## Handoff Payload67- `slug`, `operator_profile` (carried, not re-inferred), `snc_tier`, `model_tier`, completed slices, tests run, changed contracts, delegation packets, outcome report, next workflow.68## Blocking Questions69- Ask max 3 at a time with a recommended default and 2-3 options.7071## Output Template7273```md74# Implementation Handoff: [Name]75## Completed Slices76## Tests Run77## Changed Contracts78## Requirement Trace Updates79## Evidence80## Known Risks81## Delegation Packets82## Outcome Report83feature_status: partially_implemented | implemented | blocked84requirement_trace: BRD-OBJ-* -> REQ-* -> AC-* -> SRS-* -> evidence85completed_evidence: []; missing_evidence: []; decision_needed: []; recommended_next_workflow: verify-work | plan-feature | design-solution86## Next Workflow87verify-work88## Cost Report89Call `get_session_cost(workflow="implement-feature")` before final handoff.90```91