agentleFS
PiloTracerPiloTracer/pilo.ai.logicbison/skills/feature-spec/skill.md

feature-spec

Skill0 starsChanged 5 months agoMITView on GitHub

Author, review, or amend feature SPECs per FEATURE_STANDARD. Use when creating a new {FEATURE_SPEC_ROOT}/<slug>/SPEC, reviewing before Approved, writing an amendment, checking SPEC status, or triaging a free-text feature request (intake) to the right executor. Ensures §15 Concept registry and mandatory H2 sections. Does not implement code.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

24 rules. 0 are common, 8 are distinctive, and 16 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 16

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    SPEC template: use FEATURE_STANDARD §3 H2 headings exactly - no omissions.

    line 21
  2. Distinctive:

    §15 required: before Approved (or explicit N/A with reason).

    line 22
  3. Very specific:

    Operator handoff: every response that ends a turn follows the Operator handoff contract — terse output.

    line 27
  4. Very specific:

    Document clarity: every generated document follows the Document clarity contract — Status + Needs header, separate Decisions/Open questions …

    line 28
  5. Very specific:

    If the request is underspecified and the owner is not available to probe now, also add it to {PLANS_ROOT}/UNKNOWNS.md so it surfaces at …

    line 93
  6. Very specific:

    Brownfield check (hard stop): if {FEATURE_SPEC_ROOT}/<slug>/ already exists → stop with the blocked-report shape:

    line 114
  7. Very specific:

    Readiness check (warning only - proceed if user confirms): read latest {HANDOFF} for Plan-master-ready: row.

    line 118
  8. Very specific:

    If the text after - is not a valid slug (kebab-case, ≤4 words, no spaces/capitals) treat it as a free-text purpose:

    line 125
  9. Very specific:

    Read FEATURE_STANDARD §2–§3, §8 (naming), §15.

    line 135
  10. Distinctive:

    Check for related ADRs / foundation docs.

    line 137
  11. Very specific:

    Create {FEATURE_SPEC_ROOT}/<slug>/YYYYMMDD-SPEC.md with all §3 H2 sections.

    line 138
  12. Very specific:

    When creating for brownfield catalog or cross-cutting surfaces (shell, layout, analytics): add optional §14 Implementation map …

    line 141
  13. Distinctive:

    Stop: if user has not stated problem scope - ask once for one-paragraph purpose.

    line 144
  14. Very specific:

    Read the SPEC and FEATURE_STANDARD §3, §7 (DoD), §9 (anti-patterns).

    line 156
  15. Distinctive:

    Check every mandatory H2 present (§3 template).

    line 157
  16. Distinctive:

    Check §15 filled or justified N/A.

    line 158
  17. Distinctive:

    Check ADR references exist and are not contradicted.

    line 159
  18. Distinctive:

    Do not edit the original SPEC file.

    line 190
  19. Distinctive:

    Read-only. Report: path, Status header, last modified, §15 present?, linked ADRs, amendment siblings.

    line 199
  20. Very specific:

    If .work/docs/features/<slug>/README.md already exists → read it, then offer: overwrite / amend / abort.

    line 210
  21. Very specific:

    Use @plan-verify coverage output if available.

    line 219
  22. Very specific:

    Read scaffold from .ai/templates/work/docs/features/example-slug/README.md.template (self-hosted: …

    line 223
  23. Very specific:

    Write (or update) .work/docs/features/<slug>/README.md with:

    line 224
  24. Very specific:

    If a formal SPEC exists at .work/features/<slug>/, link it as Source SPEC.

    line 234

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

feature-spec

Orchestrate feature SPEC artifacts under {FEATURE_SPEC_ROOT}/<feature-slug>/ per .work/standards/*FEATURE_STANDARD* (path from .cursorrules REPLACE:FEATURE_STANDARD_FILE).

Tool-agnostic. Pairs with: concept-run (§15 registry), plan-foundation P3, code-implementation (reads Approved SPECs).

Canonical path: .ai/skills/feature-spec/skill.md

Hard rules:

  • SPEC template: use FEATURE_STANDARD §3 H2 headings exactly - no omissions.
  • §15 required before Approved (or explicit N/A with reason).
  • Approved SPECs are immutable - changes go in YYYYMMDD-SPEC-amendment-NN-<slug>.md siblings.
  • High-risk SPECs (threat model / FEATURE_STANDARD §2) need ≥2 reviewers before Approved.
  • No code in this skill unless user explicitly asks to implement after Approved.
  • Filename: {FEATURE_SPEC_ROOT}/<slug>/YYYYMMDD-SPEC.md (date = today when creating).
  • Operator handoff: every response that ends a turn follows the Operator handoff contract — terse output; approvals under **Needs your approval:** citing path:L<n>; questions numbered under **Needs your answer:**; exactly one **Next step:** command; one line when nothing is needed (Form A). Decisions and questions never mixed; empty sections omitted.
  • Document clarity: every generated document follows the Document clarity contract — Status + Needs header, separate Decisions/Open questions lists, one ## Next action, no placeholder scaffolding left behind.

Parse invocation

User saysModeAction
@feature-spec intake - <free sentence>intakeClassify an unstructured request → route to the right executor
@feature-spec create - <slug | free-text purpose>createNew SPEC from template (derives slug if given a sentence)
@feature-spec review - <path>reviewChecklist against FEATURE_STANDARD
@feature-spec amend - <path>amendNew amendment file
@feature-spec status - <path or slug>statusRead-only: exists? status header? §15?
@feature-spec approve - <path>approveSet header Approved after review passes
@feature-spec document - <slug>documentBrownfield feature documentation (.work/docs/features/<slug>/)

Slug: kebab-case, informative (user-auth, not feature1).


Step 0 - Pick a mode

ModeAction
intakeIntake protocol
createCreate protocol
reviewReview protocol
amendAmend protocol
statusStatus protocol
approveRun review first; on pass, update **Status:** to Approved
documentDocument protocol

Intake protocol

The free-text front door: classify one unstructured request, route it to the right executor, and record it so nothing is lost. Never auto-executes the cross-cutting / brownfield paths - those carry their own gates; intake only dispatches.

IN1 - CLASSIFY (by blast radius)

First matching row wins, read top-down:

Signal in the requestClassRoute to
Repo has no foundation/master plan yetbrownfield@plan-verify brownfield → @plan-repair brownfield, then re-run intake
Vague intent / no measurable outcome statableunderspecified@plan-foundation probe (or @plan-master probe), then re-classify
Touches ≥2 milestones, adds a new NFR target, or shifts scopecross-cutting@plan-master probe → @plan-master revise / @plan-repair master - <goal>
Single surface/endpoint/screen, no new cross-cutting NFRlocalcontinue into CR0.5 → create

Override: @feature-spec intake - <sentence> ; force=<class> skips IN1 and uses the named class (local | cross-cutting | brownfield | underspecified).

IN2 - ROUTE

State the detected class and the single next command.

  • local → proceed into CR0.5 (derive slug) then CR1.
  • cross-cutting / brownfield / underspecified → stop and hand off the command; do not run it (each has its own gate).

IN3 - RECORD (request never lost)

Append one line to {PLANS_ROOT}/NEXT.md under a ### Intake queue heading (create the heading if absent):

- <YYYY-MM-DD> · <class> · "<original sentence>" → <next command>

If the request is underspecified and the owner is not available to probe now, also add it to {PLANS_ROOT}/UNKNOWNS.md so it surfaces at session close.

Intake report

## @feature-spec intake - <short label>

**Request:** "<sentence>"  ·  **Class:** local | cross-cutting | brownfield | underspecified
**Run next:** <single command>
**Recorded:** {PLANS_ROOT}/NEXT.md § Intake queue

End the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.


Create protocol

<a id="cr0---brownfield--readiness-gates"></a>

CR0 - Brownfield + readiness gates

  1. Brownfield check (hard stop): if {FEATURE_SPEC_ROOT}/<slug>/ already exists → stop with the blocked-report shape:
    • Required: slug folder does not already exist
    • Detected: {FEATURE_SPEC_ROOT}/<slug>/ already contains files (list)
    • Run first: @feature-spec amend - <slug> (to add a SPEC amendment), or pick a different slug, or delete the existing folder if it is a stale stub
  2. Readiness check (warning only - proceed if user confirms): read latest {HANDOFF} for Plan-master-ready: row. If absent or no, emit:
    • Warning: SPEC will not slot into an Approved master plan yet (plan-master-ready: no or unknown). The SPEC is still useful for plan-foundation P3, but make sure your team expects out-of-plan SPECs.
    • Run first (optional): @plan-foundation certify plan-master-ready → @plan-master status
    • Then continue with create if user confirms in the same message.

CR0.5 - Free-text argument (derive slug)

If the text after - is not a valid slug (kebab-case, ≤4 words, no spaces/capitals) treat it as a free-text purpose:

  1. Propose a kebab-case slug derived from the request (e.g. "let users export invoices to CSV" → invoice-csv-export). State it; proceed unless the user objects in the same message.
  2. Carry the original sentence verbatim into SPEC §1 Purpose (no need to re-ask the one-paragraph purpose in CR1).
  3. Re-run CR0 brownfield/readiness checks against the derived slug.

Explicit kebab-case slug → skip this step.

CR1 - Author the SPEC

  1. Read FEATURE_STANDARD §2–§3, §8 (naming), §15.
  2. Confirm slug does not collide with existing bounded-context folder name alone (use verb phrase if needed).
  3. Check for related ADRs / foundation docs; list in SPEC header.
  4. Create {FEATURE_SPEC_ROOT}/<slug>/YYYYMMDD-SPEC.md with all §3 H2 sections.
  5. Fill §15 Concept / NFR registry - one row per MOD-01…MOD-08 with Applies yes/no + reason (or run @concept-run list for trigger hints).
  6. Set **Status:** Draft.
  7. When creating for brownfield catalog or cross-cutting surfaces (shell, layout, analytics): add optional §14 Implementation map (FEATURE_STANDARD) with primary file paths from @plan-verify coverage or user inventory.
  8. Output create report with path and open questions (§13). Any operator-required approval/question (e.g. open §13 questions) must ALSO appear in the closing handoff block (enumerated, with path:line); end the report with the Operator handoff close per SKILL_DEPENDENCIES.md.

Stop if user has not stated problem scope - ask once for one-paragraph purpose.


Blocked-report shape

Per SKILL_DEPENDENCIES.md § Blocked report shape - header: ## @feature-spec <command> - blocked (prerequisite).


Review protocol

  1. Read the SPEC and FEATURE_STANDARD §3, §7 (DoD), §9 (anti-patterns).
  2. Check every mandatory H2 present (§3 template).
  3. Check §15 filled or justified N/A.
  4. Check ADR references exist and are not contradicted.
  5. High-risk features: flag if single-reviewer approval requested.
  6. Output review report:
## feature-spec review - <slug>

**Path:** … · **Status:** Draft | Approved | …

### Checklist
| # | Check | Result | Notes |
|---|-------|--------|-------|
| 1 | All §3 H2 sections | pass/fail | |
| 2 | §15 concept registry | pass/fail | |
| 3 | ADR alignment | pass/fail/skip | |
| 4 | Test plan (§12) actionable | pass/fail | |
| 5 | Out of scope explicit (§2) | pass/fail | |

### Verdict
approve-ready | needs-revision - <bullets>

End the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md; any operator-required approval/question above (e.g. high-risk reviewer waiver) must ALSO appear in that closing handoff block (enumerated, with path:line), not only in the checklist.


Amend protocol

  1. Confirm base SPEC is Approved or Implemented (not Draft-only unless user waives).
  2. Create {FEATURE_SPEC_ROOT}/<slug>/YYYYMMDD-SPEC-amendment-NN-<short-slug>.md.
  3. Structure: Purpose of amendment, Binding changes (numbered), Evidence (ADR/questionnaire link), SPEC sections affected.
  4. Do not edit the original SPEC file.
  5. Cross-link from amendment to base SPEC and any ADR.

End the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.


Status protocol

Read-only. Report: path, Status header, last modified, §15 present?, linked ADRs, amendment siblings. End the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md.


<a id="document-protocol-brownfield--existing-features"></a>

Document protocol (brownfield / existing features)

Creates or updates .work/docs/features/<slug>/README.md — human-readable feature documentation without requiring formal SPEC lifecycle. Idempotent: updates existing doc in place (no amend system needed; this is not a binding SPEC).

D0 - Brownfield detection

If .work/docs/features/<slug>/README.md already exists → read it, then offer: overwrite / amend / abort. Default: amend (append new findings).

D1 - Discover

Scan the codebase for the feature's surface:

  • Entry points (routes, commands, UI paths)
  • Key source files (primary module, tests, migrations)
  • Any existing SPEC (.work/features/<slug>/) or ADR references

Use @plan-verify coverage output if available. If the feature has an existing formal SPEC, read it and carry forward its §1 Purpose, §14 Implementation map, and §2 In scope.

D2 - Author

  1. Read scaffold from .ai/templates/work/docs/features/example-slug/README.md.template (self-hosted: templates/work/docs/features/example-slug/README.md.template).
  2. Write (or update) .work/docs/features/<slug>/README.md with:
SectionContent
PurposeOne-paragraph description of what the feature does
How to useUsage instructions, examples, CLI/web UI paths
Entry pointsLayer → path table (routes, modules, screens)
Key filesImportant source files and their roles
ChangelogDate + change rows (append-only)

If a formal SPEC exists at .work/features/<slug>/, link it as Source SPEC. Do NOT reproduce behavioural rules, data models, or §15 registry — that belongs in the SPEC.

D3 - Report

## @feature-spec document - <slug>

**Path:** `.work/docs/features/<slug>/README.md`
**Template:** `templates/work/docs/features/example-slug/README.md.template`
**Status:** documented | updated
**Source SPEC:** yes/no (link if yes)
**Surface scanned:** <list of routes/modules checked>

End the report with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md; any operator-required approval/question (e.g. D0 overwrite/amend/abort choice) must ALSO appear in that closing handoff block (enumerated, with path:line), not only in the report body.


Integration

Skill / docWhen
@concept-run listFilling §15
@plan-foundation P3Foundation-phase SPEC batch
@code-implementation startRequires Approved SPEC for feature tasks
FEATURE_STANDARD §7DoD before marking Implemented

Anti-patterns

  • Merging code before SPEC Approved.
  • Editing Approved SPEC in place (use amend).
  • Skipping §15 "because M1 is small".
  • Empty §2 Out of scope.
  • Burying operator actions/questions in prose instead of the closing handoff block.

Completion checklist

#CheckResult
1FEATURE_STANDARD §3 compliance (create/approve)pass/fail/skip
2§15 registry (create/approve)pass/fail/skip
3Slug/path validpass
4Surface scanned (document mode)pass/skip
5No unauthorized code changespass

End the checklist with the Operator handoff close (Form A Next: … or Form B **Needs your approval:** / **Needs your answer:** / **Next step:**) per SKILL_DEPENDENCIES.md; any operator-required approval/question must ALSO appear in that closing handoff block (enumerated, with path:line), not only in the checklist.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.