feature-specify

A command for creating structured feature specifications: documents that describe user scenarios, requirements, and acceptance criteria for a planned change.

In plain words
What is it for?
Use it to create a new specification from a short description or git branch, update an existing specification, or display a saved one.
Why use it?
It gives a feature a consistent written definition before implementation, reducing ambiguity about what should be built and how it will be judged complete.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rand/mnemosyne/feature-specify
Clone the repo
git clone --depth 1 https://github.com/rand/mnemosyne

Made for: Claude Code.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,998 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.01998
Opus 5 $0.00006 $0.00999
Sonnet 5 $0.00002 $0.00400
Haiku 4.5 $0.00001 $0.00200

Measured 2d ago against content hash d9e71aac9003, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

feature-specify scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/feature-specify.md · 245 lines

How it starts

The opening of the file, as written. The whole thing — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.

I will help you create a feature specification following the specification workflow. This will capture user scenarios, requirements, and acceptance criteria in a structured format.

Usage:

  • /feature-specify <brief description> - Create new feature spec
  • /feature-specify --from-branch - Create spec from current git branch
  • /feature-specify --show <feature-id> - Display existing spec

Instructions for me:

  1. Generate feature ID:

    • If --from-branch: Use current git branch name
      git branch --show-current
      
    • Otherwise: Convert description to kebab-case (e.g., "JWT Authentication" → "jwt-authentication")
    • Max 50 characters
    • Format: {category}-{name} (e.g., auth-jwt, ui-dashboard, api-rate-limiting)
  2. Check for existing spec:

    • Look for .mnemosyne/artifacts/specs/<feature-id>.md
    • If exists: Ask if user wants to update (increment version) or view
    • If updating: Parse current version and increment
  3. Gather feature details (if creating new): Ask the user about:

    a) Feature Overview:

    • Feature name (human-readable)
    • Brief description (1-2 sentences)
    • Why this feature? (business value)

    b) User Scenarios (prioritized): For each scenario (start with P0/P1):

    • Priority: P0 (critical), P1 (high), P2 (medium), P3 (nice-to-have)
    • Actor: "As a [user type]..."
    • Goal: "I want [capability]..."
    • Benefit: "So that [value]..."
    • Acceptance Criteria: 3-7 specific, testable criteria

    c) Requirements:

    • Functional requirements
    • Non-functional requirements (performance, security, etc.)
    • Constraints or limitations

    d) Success Criteria:

    • How will we know this is successful?
    • What metrics matter?
  4. Check constitution alignment:

    • Load .mnemosyne/artifacts/constitution/project-constitution.md
    • Verify feature aligns with core principles
    • Flag any conflicts (e.g., performance requirement vs. constitution)
    • If misaligned: Ask user to clarify or adjust
  5. Format spec as markdown:

    ---
    type: feature_spec
    id: <feature-id>
    name: <feature-name>
    branch: <branch-name>
    version: 1.0.0
    status: draft
    created_at: <ISO 8601 timestamp>
    updated_at: <ISO 8601 timestamp>
    memory_id: <will be filled after storage>
    references: [<constitution-memory-id>]
    ---
    
    # Feature: <feature-name>
    
    ## Overview
    
    <brief description>
    
    **Business Value**: <why this matters>
    
    ## User Scenarios (Prioritized)
    
    ### P0: <Scenario Name>
    
    **As a** <actor>
    **I want** <goal>
    **So that** <benefit>
    
    **Acceptance Criteria**:
    - [ ] <criterion 1>
    - [ ] <criterion 2>
    - [ ] <criterion 3>
    
    ### P1: <Scenario Name>
    
    ...
    
    ## Requirements
    
    ### Functional
    - <requirement>
    
    ### Non-Functional
    - **Performance**: <requirement>
    - **Security**: <requirement>
    - **Scalability**: <requirement>
    
    ### Constraints
    - <constraint>
    
    ## Success Criteria
    
    - <criterion>
    
    ## Open Questions
    
    - [ ] <question needing clarification>
    
    ## Related
    
    - Constitution: `.mnemosyne/artifacts/constitution/project-constitution.md`
    - Parent Feature: <if sub-feature>
    
  6. Write spec file:

    • Create .mnemosyne/artifacts/specs/<feature-id>.md
    • Ensure .mnemosyne/artifacts/specs/ directory exists
  7. Store memory entry:

    • Use Mnemosyne CLI: mnemosyne remember
    • Arguments:
      • Content: Feature overview + first P0 scenario + "...see .mnemosyne/artifacts/specs/.md for full spec"
      • Namespace: project:<project-name> (detect from git)
      • Importance: 8 (specs are important)
      • Type: feature_spec
      • Tags: spec,feature,
      • Context: "Feature specification for "
    • Capture memory_id from output
  8. Create memory link to constitution:

    • Get constitution memory_id from .mnemosyne/artifacts/constitution/project-constitution.md frontmatter
    • Link spec → constitution with relationship "builds_upon"
    • Update spec's references field in frontmatter

Read the full file on GitHub · 245 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 245 lines · 12 tokens per session scan A d9e71aac9003

Subscribe to this mod's changes

feature-specify is a command published in the GitHub repository rand/mnemosyne (84 stars, last pushed 9mo ago), licensed MIT. It adds 12 tokens to every session and 1,998 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other commands, from other repositories