Feature Delivery Loop
Use this skill when the user wants a feature, fix, or PR handled from planning through execution and hardening.
Non-Negotiable Rules
- •Ground in repository reality before proposing implementation details.
- •Ask questions until requirements are decision complete.
- •Generate a local, untracked plan file at
docs/plans/<slug>.mdbefore implementation. - •Require explicit user approval before any mutating implementation step.
- •Review all code changes for bugs, regressions, missed edge cases, and project guideline compliance.
- •Fix findings and repeat review until the stop condition is met.
- •Stop only when the review checklist is clean and targeted checks/tests are green.
- •Plan files are ephemeral PR artifacts and must not be committed.
- •Track plan and delivery progress in Beads for the full lifecycle of the task.
- •Every mutating edit batch must be followed by an explicit review pass before moving on.
- •Passing lint/tests is supporting evidence, not a substitute for scenario and edge-case review.
Stage Workflow
Stage 0: Beads Tracking Setup
- •Determine whether a Beads issue already exists for the request.
- •If no issue exists, create one and capture the issue ID:
bd create "<title>" --type task --description "<summary>" --silent
- •Keep the issue ID available as the source-of-truth tracking key for the task.
- •If
bdis unavailable, ask the user whether to initialize Beads or explicitly waive Beads tracking for this task before proceeding.
Stage 1: Intake and Context
- •Confirm request type:
feature,fix, orPR hardening. - •Inspect relevant codepaths, configs, types, and existing tests.
- •Capture current behavior and likely impact surface.
- •Post a Beads comment summarizing intake context and planned discovery focus.
Stage 2: Requirement Clarification Loop
Keep asking questions until all of these are explicit:
- •Goal and success criteria.
- •In-scope and out-of-scope behavior.
- •Audience and usage context.
- •Constraints and non-goals.
- •Rollback or compatibility expectations.
- •Test and acceptance expectations.
If any item is unresolved, continue asking questions.
Stage 3: Plan File Generation
Create docs/plans/<slug>.md as an untracked local artifact with this structure:
# <Task Title> ## Summary ## Context ## Requirements ## Questions Resolved ## In Scope ## Out of Scope ## Public Interfaces and Type Changes ## Implementation Steps ## Test Strategy ## Risk and Edge-Case Checklist ## Approval Status - Requested by agent on: <timestamp> - Approved by user: <yes/no + timestamp> ## Beads Tracking - Issue ID: <bd-xxx> - Current status: <open|in_progress|done> - Last progress update: <timestamp>
<slug> must be a concise kebab-case name derived from the request.
If the plan file is accidentally staged, unstage it before continuing.
After creating or updating the plan, add a Beads comment with plan path and summary.
Stage 4: Approval Gate
Before implementation:
- •Present the plan summary and plan file path.
- •Ask for explicit approval.
- •Do not implement until user approval is explicit (
yes,approved, or equivalent). - •Record approval decision in Beads comments.
If the user requests plan changes, update the plan and ask for approval again.
Stage 5: Execute Plan
- •Implement exactly what is approved.
- •Keep scope aligned to plan.
- •Update the plan file progress as work completes.
- •Set Beads issue status to
in_progressat execution start:
bd update <issue-id> --status in_progress
- •Add Beads progress comments at meaningful milestones (completed steps, blockers, scope clarifications).
- •After each mutating edit batch, run a micro-review checkpoint:
jj diff --name-only jj diff -- <changed-file>
Do not continue implementing the next batch until this checkpoint is complete.
Stage 6: Review for Bugs, Edge Cases, and Project Guidelines
Review with a findings-first mindset:
- •Functional regressions.
- •Input validation and malformed/empty states.
- •Error handling, retries, and failure paths.
- •Concurrency/race conditions and stale state.
- •Permissions, auth, and security boundaries.
- •API/type contract mismatches.
- •Missing tests for changed behavior.
- •Conformance with project-recommended conventions and practices (read and enforce AGENTS.md, CLAUDE.md, and applicable skill guidance).
Mandatory review protocol for every changed file:
- •Diff-driven inspection with line-level evidence (
path:line) for each finding or explicit pass note. - •State transition matrix for stateful flows (forms/dialogs/async UI):
- •Local pristine + upstream unchanged
- •Local pristine + upstream changed
- •Local dirty + upstream unchanged
- •Local dirty + upstream changed
- •Submit/action behavior under each relevant state
- •Close/reopen/reset behavior
- •Confirm there is no silent stale overwrite path (for example, submitting stale server-backed values without warning or guard).
- •Cover negative paths explicitly: cancel, retry, partial failure, disabled actions, and empty/loading/error states.
- •For each changed behavior, require either:
- •an automated test, or
- •a documented manual scenario with steps and expected results.
- •Record review evidence in the final report and in Beads iteration comments.
Stage 7: Fix and Repeat
- •Fix all findings from Stage 6.
- •Re-run relevant tests/checks.
- •Re-review all touched files (not only the last edited file) for new regressions.
- •Add a Beads comment for each review/fix iteration, including findings summary and resolution status.
- •Repeat Stages 6 and 7 until no findings remain.
Stop Condition
You may finish only when all are true:
- •Review checklist has zero unresolved findings.
- •Targeted tests/checks relevant to the changes are green.
- •Guideline/practice compliance checks have zero unresolved findings.
- •Plan file reflects final implemented state.
- •Every changed file has explicit review evidence (finding or pass note), including edge-case/state coverage.
- •Each changed behavior has validation evidence (automated test or documented manual scenario).
- •Beads issue is updated with final summary and marked complete:
bd update <issue-id> --status done
If checks cannot run, report why, what was attempted, and residual risk.
Output Format for Review Findings
When reviewing, report findings in severity order with file references:
- •
Severity(high|medium|low) - •
Issue - •
Evidence(path:line) - •
Fix - •
Status - •
Validation(test added|existing test run|manual scenario)