create-features
Skill2 starsChanged 6 days agoMITView on GitHub
Generate sequentially numbered feature specifications (vertical slices) from a user flow document. USE THIS SKILL when user mentions: create features, generate features, slice flow, create feature specs, slice journey, feature specification, create vertical slices, or any request to break down a user journey into technical feature specifications (features/feature-01-*.md). This skill creates numbered feature specs with functional/non-functional requirements, HTTP error contract, concurrency/TOCTOU analysis, layer scope, and Lack of Information Log following DDD patterns.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adr-amendSkill
- adr-createSkill
- adr-review-alternativesSkill
- adr-validateSkill
- agents-maintainerSkill
- audit-docsSkill
- explore-domainSkill
- sdlc-guideSkill
- setup-sdlcSkill
- inception-workshopSkill
- prd-workshopSkill
- user-story-mappingSkill
- modify-flowSkill
- reverse-engineer-domainSkill
- create-moduleSkill
- implement-flowSkill
- create-entity-lifecycleSkill
- create-flow-documentationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 5 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
STOP GATES ARE ABSOLUTE (WITH EXPLICIT BATCH OVERRIDE): After generating feature specification file(s) in Step 4/5, you MUST halt your turn …
- Very specific: line 55
If domain entities/rules need modeling: Invoke /create-entity-lifecycle (Phase 3).
- Very specific: line 56
If domain models already exist: Invoke /implement-flow (Phase 4) with the target feature.
- Very specific: line 70
Check docs/product/working-on/active/[change]/features/ for existing specs and determine the next sequential number (01, 02, 03...).
- Very specific: line 71
Check AGENTS.md (or CLAUDE.md) and the repo's architecture doc (e.g.
- Distinctive: line 86
Read the flow doc's "Edge Cases & Invariant Integrity", "Technical Failures", and "Alternative Paths".
- Distinctive: line 98
Crucial Rule: Do NOT rely solely on the target flow document's "Enforced Invariants" section, which may omit cross-context rules or lag …
- Distinctive: line 99
Search the entire invariants tree across all bounded contexts:
- Very specific: line 104
If not: mark it as ⚠️ Implementation Trap, add an explicit requirement (F[X]-R[Y]), and mandate a dedicated test before coding begins.
- Very specific: line 112
Use checklist items with explicit IDs: F[X]-R1, F[X]-R2, etc.
- Very specific: line 135
Always save under docs/product/working-on/active/[change]/features/feature-NN-[name].md, never in the living tree.
- Very specific: line 140
MANDATORY TOOL CALL: Read templates/feature-specification.md via read_file before writing.
- Very specific: line 144
Document any judgment calls, assumptions, fallback status codes, or tie-breakers made by the LLM in the 🧠 Agent Design Decisions & …
- Very specific: line 154
If the feature changes the behaviour of a domain service, name its doc under docs/product/bounded-contexts/{ctx}/domain-services/ in the …
- Distinctive: line 160
Stop and present the generated feature specification document(s) to the user with clickable file links.
- Very specific: line 164
All entries in the Lack of Information Log (D1, D2...).
- Distinctive: line 170
Before ending your turn, verify every item below with concrete evidence (not just a checkmark).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PROTOCOL: CREATE-FEATURES (EXECUTION LEVEL 3)
<state_machine> CURRENT_STEP -> REQUIRED_TOOL -> REQUIRED_OUTPUT -> MANDATORY_HALT Step 1: Read Flow -> read_file (flow, AGENTS.md, ADRs) -> Vertical slice boundaries (F1, F2...) -> Continue to Step 2 Step 2: Edge/INV -> grep / read_file (all bounded-contexts/INV-) -> Concurrency, TOCTOU & cross-context invariant catalogue -> Continue to Step 3 Step 3: Contracts -> define requirements & HTTP error mapping -> F[X]-R[Y] checklist + HTTP Error Contract table -> Continue to Step 4 Step 4: Write Specs -> read_file(templates/feature-specification.md) -> working-on/active/[change]/features/feature-NN-.md -> Continue to Step 5 Step 5: Review Gate -> present summary & Lack of Information Log -> User review prompt -> 🛑 HALT TURN (Wait for user) </state_machine>
<execution_invariants>
- WORKFLOW IMMUTABILITY: You may reason freely INSIDE each step to analyze flows, concurrency, and cross-context invariants, but you are strictly forbidden from skipping, reordering, or merging steps (
workflow structure = immutable | step reasoning = flexible). - STOP GATES ARE ABSOLUTE (WITH EXPLICIT BATCH OVERRIDE): After generating feature specification file(s) in Step 4/5, you MUST halt your turn immediately and wait for user approval before invoking
/create-entity-lifecycleor/implement-flow— unless the user explicitly requested unattended batch execution in their prompt. - TEMPLATE LOCK: Reconstructing template headers or tables from internal memory is strictly forbidden. You MUST call
read_fileontemplates/feature-specification.mdbefore writing any feature specification file. - STRICT OUTPUT LOCATION: Save feature specifications exclusively under
docs/product/working-on/active/[change]/features/feature-NN-[name].md(or.sdlc/config.jsonoverride), NEVER in the livingbounded-contexts/tree. - ESCAPE HATCH: If the situation does not fit the contract, do not silently improvise and do not force-fit: declare the deviation in one line and ask. </execution_invariants>
<output_contract>
- TARGET_PATH:
docs/product/working-on/active/[change]/features/feature-NN-[name].md - SOURCE_TEMPLATE:
templates/feature-specification.md(MUST callread_filebefore writing) - SCHEMA_INVARIANCE: Preserve every H1/H2/H3 section heading, metadata field, requirement ID format (
F[X]-R[Y]), HTTP Error Contract table, Concurrency/TOCTOU table, Layer Scope, and🧠 Agent Design Decisions & Assumptionstable verbatim. - ESCAPE_HATCH: Never silently omit or invent template sections. If a section genuinely does not apply to a slice (e.g.,
HTTP Error Contractfor an internal cron/queue worker), preserve the heading and write"N/A — [1-line rationale]", or halt and ask the user before deviating. </output_contract>
Paths: the locations shown are the pack defaults; if
.sdlc/config.jsonexists (written by/setup-sdlc), honour itsdocsRoot/productDocsDir/adrDiroverrides.
🔄 Position in the SDLC Workflow
flowchart LR
P2["Phase 2: Flow Spec<br/>(/create-flow-documentation)"] --> P2b["Phase 2b: Feature Slicing<br/>(/create-features)"]
P2b --> P3["Phase 3: Domain Model<br/>(/create-entity-lifecycle)"]
P2b & P3 --> P4["Phase 4: Implementation<br/>(/implement-flow)"]- Inputs:
docs/product/bounded-contexts/[context]/flows/[flow-name].md+ Architectural references (AGENTS.md/CLAUDE.md, the repo's architecture doc e.g.docs/ARCHITECTURE.md,docs/adr/). - Outputs:
docs/product/working-on/active/[change]/features/feature-[01]-[feature-name].md,feature-[02]-[feature-name].md... - Next Steps:
- If domain entities/rules need modeling: Invoke
/create-entity-lifecycle(Phase 3). - If domain models already exist: Invoke
/implement-flow(Phase 4) with the target feature.
- If domain entities/rules need modeling: Invoke
📋 Step-by-Step Execution Workflow
Step 1: Read Flow Documentation, ADRs & Architecture
- Read the Target Flow Specification:
- Locate and read
docs/product/bounded-contexts/[context]/flows/[flow-name].md. - Analyze the complete interaction sequence: sequence diagrams, flowchart decision branches, entity state transitions, and step-by-step walkthrough.
- Extract the user value, primary actor, and boundaries.
- Locate and read
- Inspect Existing Features & Bounded Context Layout:
- Check
docs/product/working-on/active/[change]/features/for existing specs and determine the next sequential number (01,02,03...). Don't look in the living tree. - Check
AGENTS.md(orCLAUDE.md) and the repo's architecture doc (e.g.docs/ARCHITECTURE.md) for directory layout, DDD package boundaries, and verification commands. - Review relevant ADRs in
docs/adr/README.md(e.g., CQRS, Transactional Outbox, Auth, Error Mapping).
- Check
- Identify Vertical Slices (Feature Boundaries):
- A single flow journey often contains multiple distinct user capabilities or sequential phases (e.g. Journey 01 contains: (1) Event & CfP creation form submission, and (2) Dashboard redirection & CfP link copying).
- Slice the journey into cohesive, independently verifiable vertical features.
- Assign sequential IDs:
F1(feature-01-[name].md),F2(feature-02-[name].md), etc.
Step 2: Extract Edge Cases, Concurrency & Invariant Integrity Analysis
For each feature slice, conduct a thorough technical analysis:
- Extract & Catalogue All Edge Cases and Implementation Traps:
- Read the flow doc's "Edge Cases & Invariant Integrity", "Technical Failures", and "Alternative Paths".
- Catalogue each item and flag potential ⚠️ Implementation Traps (e.g. naive validation that breaks business rules, race conditions on duplicate slugs).
- Evaluate Concurrency, TOCTOU & Invariant Integrity:
- Analyze potential race conditions and check-then-act vulnerabilities:
- Uniqueness (TOCTOU): Concurrent inserts with duplicate slug/keys $\rightarrow$
UNIQUE INDEX+ Domain Exception +409 Conflict. - Quotas & Limits: Concurrent actions exceeding free tier limits $\rightarrow$ atomic count check / transaction isolation.
- State Machine Race: Concurrent mutations on the same aggregate $\rightarrow$ optimistic locking / conditional update.
- Dual-Write Consistency: State saved but event dispatch dropped $\rightarrow$ Transactional Outbox in single DB transaction.
- Idempotency & Replays: Repeated requests or duplicate webhooks $\rightarrow$ idempotency key / graceful no-op.
- Uniqueness (TOCTOU): Concurrent inserts with duplicate slug/keys $\rightarrow$
- Analyze potential race conditions and check-then-act vulnerabilities:
- Cross-Check Active Invariants Across Bounded Contexts (Combat Flow Tunnel Vision):
- Crucial Rule: Do NOT rely solely on the target flow document's "Enforced Invariants" section, which may omit cross-context rules or lag behind the codebase.
- Search the entire invariants tree across all bounded contexts:
docs/product/bounded-contexts/**/invariants/INV-*.mddocs/product/discovered/invariants/INV-RAW-*.md
- Identify every invariant whose statement constrains any operation this feature performs (e.g. calling a domain service, mutating aggregate status, calculating dates, filtering roles/publishers).
- For each matching INV, ask: "Does this new code path enforce it?"
- If not: mark it as ⚠️ Implementation Trap, add an explicit requirement (
F[X]-R[Y]), and mandate a dedicated test before coding begins. - Tabulate every checked invariant in the feature specification's
🛡️ Concurrency, TOCTOU & Invariant Integrity Analysistable.
- If not: mark it as ⚠️ Implementation Trap, add an explicit requirement (
Step 3: Define the Executable Contract & HTTP Error Contract
- Define Functional & Non-Functional Requirements:
- Use checklist items with explicit IDs:
F[X]-R1,F[X]-R2, etc. - Map requirements to existing or planned acceptance tests (e.g., an E2E spec or integration tests).
- Use checklist items with explicit IDs:
Construct HTTP Error Contract Table:
- Map every potential failure condition to:
- Condition
- Domain Exception class
- Domain Error Code
- HTTP Status code
- User-visible message
| Condition | Domain Exception | Error Code | HTTP | User-visible message | |-----------|------------------|------------|------|----------------------| | CfP end date <= start date | `CfpDatesInvalidError` | `CFP_DATES_INVALID` | 400 | `End date must be after start date` | | Duplicate slug | `SlugExistsError` | `SLUG_EXISTS` | 409 | `Conference slug already exists` |- Map every potential failure condition to:
Step 4: Generate Feature Specification File(s)
- File Location:
- Always save under
docs/product/working-on/active/[change]/features/feature-NN-[name].md, never in the living tree. This holds for modifications and for brand-new flows. If no change folder exists, create it with itsproposal.mdfirst. - For multi-slice proposals, write detailed specs only for the slice about to start; later slices stay outlines in the proposal's Delivery Slices table and are specified when resumed (features may change or become obsolete before they ship).
- Lifecycle: the change folder moves to
working-on/grace-period/and is purged later (/modify-flowStep 6). Living docs get the shipped behaviour in the same PR as the code and must not link to feature specs.
- Always save under
- Template Compliance (
OUTPUT CONTRACT):- MANDATORY TOOL CALL: Read
templates/feature-specification.mdviaread_filebefore writing. - Preserve every section heading and table column from
templates/feature-specification.mdin exact order. Do not omit or rename sections.
- MANDATORY TOOL CALL: Read
Populate the Lack of Information Log:
- Document any judgment calls, assumptions, fallback status codes, or tie-breakers made by the LLM in the
🧠 Agent Design Decisions & Assumptionssection:
| # | Topic / Area | Documentation State / Gap | Decision / Judgment Made | Status | |---|--------------|---------------------------|--------------------------|--------| | D1 | Slug collision policy | Conflict between auto-suffix in BR and 409 in E2E | Hard-fail with `SlugExistsError` (409) | 📋 Proposed |- Document any judgment calls, assumptions, fallback status codes, or tie-breakers made by the LLM in the
- Define Layer Scope:
- Outline impact across Contracts, Domain, Application, Infrastructure, and Interface layers per DDD guidelines.
- If the feature changes the behaviour of a domain service, name its doc under
docs/product/bounded-contexts/{ctx}/domain-services/in the layer scope, so the implementation plan and the post-implementation doc update include it.
Step 5: 🛑 Review Gate (User Review & Approval)
- Stop and present the generated feature specification document(s) to the user with clickable file links.
- Summarize:
- Number of feature slices created and their scopes.
- Key requirements and HTTP error contracts.
- All entries in the Lack of Information Log (
D1,D2...).
- Do NOT proceed to implementation or downstream domain modeling until the user reviews and approves the feature specification.
<self_validation_gate> Before ending your turn, verify every item below with concrete evidence (not just a checkmark). If any item cannot be cited with real evidence from this turn, DO NOT produce your final response — return to the failed step and fix the violation first:
- Step 1 & 2 Grounding Evidence: List the flow doc,
AGENTS.md, ADRs, and cross-contextINV-*files read viaread_file:<paths> - Template Read Evidence: Exact path passed to
read_file(templates/feature-specification.md):<path> - Output & Schema Evidence: Exact
docs/product/working-on/active/[change]/features/feature-NN-[name].mdpath(s) written, number ofF[X]-R[Y]requirements defined, and any"N/A — [rationale]"section noted:<paths, N requirements> - Halt Gate Evidence: Confirm turn stops at Step 5 for user review with 0 production code edits (or cite explicit user batch override):
<0 code edits></self_validation_gate>
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
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.

