SuperAPI AI Directory

feature-dev

Coding & development

View repository

Updated 11-24 17:17

About this skill

Feature Dev

Deliver the requested feature using the project's existing patterns. Scale the workflow to the change; the phases below are checkpoints, not mandatory separate turns, reports, or agent passes.

Scope and decisions

The user's request and existing authorization take precedence over workflow defaults. A request to implement authorizes implementation and fixes needed to complete that scope. A request for design or review alone does not.

Ask when a missing decision materially changes product behavior, a public contract, scope, or an irreversible action. Research discoverable facts first. State routine implementation assumptions and proceed; honor delegated choices without asking the user to approve the same decision again. The only default checkpoint is design approval when a design trigger applies. If the user requests another approval checkpoint, present a concrete proposal and wait there.

Discovery and exploration

Define the expected behavior, constraints, non-goals, and evidence of completion. Inspect the affected entry points, exports, immediate callers, shared utilities, and nearby tests. Follow dependencies far enough to understand the change's impact; a full repository map or fixed file count is unnecessary.

Use lightweight progress tracking for work spanning several steps. Optional read-only workers can investigate independent questions when delegation is available and permitted; ask them for file:line entry points, the execution flow and data flow, side effects, cross-cutting concerns such as auth, logging, and caching, risks, and the essential files, then read those files yourself before designing. For a large feature, run two or three such passes in parallel, each with a different focus: similar existing features, the architecture and abstractions of the affected area, or user-facing and testing patterns. Otherwise work locally. Keep one writer in a checkout.

Clarification

Resolve material unknowns using repository evidence and focused questions. Keep independent work moving while a question is pending. Do not add a question phase when the request and code already establish the answer.

Before design, check the request and findings for gaps in scope boundaries, edge cases, error handling, integration points, backward compatibility, and performance or security needs. Ask about the gaps that change the design, in one organized batch; assume and state the rest.

Design

Describe the intended implementation and validation briefly before editing; for multi-file changes, name the files to change and the build order.

When the change adds or changes a lifecycle, a protocol, or concurrent access to shared state, list its states and the invariants that must hold, in the user's words. For each invariant, find the shortest sequence of events that could break it, such as a retry during a cancel. Plan a test that replays that sequence step by step against the real code. When the orders of events are too many to trace by hand, find these sequences with the model-check skill.

Present alternatives when the change does any of these:

  • changes a public contract: API, CLI, configuration, file format, or event;
  • changes a data model, schema, or persisted state;
  • spans several modules or layers;
  • introduces a new abstraction, dependency, or extension point.

Then give two or three approaches that differ in structure, not in naming. Use these lenses as prompts, not a quota: minimal change with maximum reuse, clean boundaries for maintainability, and a pragmatic balance. For each approach, give the files and components it touches, its data flow, its trade-offs and risks, and how it would be validated. When invariants or extensibility distinguish the approaches, explain what types or a shared boundary enforce, what depends on caller discipline, and which components the next typical extension would change. Do not estimate future line counts or add abstractions without a concrete gain.

When delegation is available and permitted, and the user has not chosen an approach, get the approaches from two or three read-only workers in fresh contexts. Give each worker the request, the constraints, the essential files, and one lens. Ask one worker for the most direct approach that meets the constraints with the existing patterns, and another for an approach of a different structure. Do not show a worker the approaches of the others: workers that see each other converge on one idea. Read the files that each approach names, and drop an approach that the code contradicts.

Recommend the approach that best fits this task's scale, urgency, complexity, and conventions, and explain why. Then wait for the user's choice, unless the user asked you to proceed without design approval or already chose an approach.

When none of these triggers applies, state the single approach and proceed.

Implementation

Implement the authorized scope with one writer. If handing off to an isolated worker, supply the request, relevant files, decisions, constraints, acceptance criteria, validation commands, and authority boundaries.

After an edit by a script or a search-and-replace, confirm that the change is in the file: a replace that matched nothing reports no error.

Reuse existing code and match project conventions. Add or update tests when they protect a changed requirement or regression risk. Reuse adequate existing checks for mechanical or low-impact edits. Update documentation when the feature changes what a reader needs to know. For a new critical guard or a regression fix, verify that its test fails without the guard or fix, then restore it and rerun the test. Do not mutate every condition as a routine quota.

If evidence invalidates the approach, revise it within scope. Ask only when the revision needs a material user decision or authority not already granted.

Review and validation

Inspect the actual diff for correctness, security, requirement coverage, meaningful tests, convention fit, and unnecessary complexity or duplication. Use independent review only when its benefit justifies it and the host permits it; there is no review-worker quota.

Verify findings against the code. Keep only findings caused by the change that break behavior or a stated project rule, each with file:line, impact, and a fix; drop speculation and style points no rule covers. Before changing failure handling based on a shared flag or status, identify its distinct causes and check the changed behavior against each affected outcome. Fix confirmed issues within the authorized scope. Report unrelated issues separately without expanding the task or asking permission to fix ordinary defects in the requested work.

Run the relevant project checks and any required final checks. Determine success from the check's exit status, not from empty or truncated output. When piping output, preserve the check's failure status, such as with pipefail; the last command's success is not the check's success. A new linter or type warning in a changed file is a failure, unless the user accepts it. After a failure, fix its in-scope cause and rerun affected checks. Broaden or repeat validation only for new changes, failures, or an unresolved risk. If runtime or visual inspection is part of the requested result, perform it before completion.

Completion

Continue until the acceptance criteria are met, required checks pass, and no confirmed in-scope blocker remains. A first implementation or a clean-looking diff is not completion. If blocked by missing access, a user decision, or an unrelated baseline failure, state the evidence and what remains unverified.

Summarize what changed, files touched, key decisions with the chosen approach and its rationale, assumptions made, validation actually performed, material limitations, and follow-ups. Do not claim a check passed if it was skipped.