mnemosyne: Command for Claude Code

.claude/commands/feature-validate.md

feature-validate is a command for Claude Code from rand/mnemosyne. It costs 13 tokens per session (1,809 once invoked), scanned A, original, MIT.

A command that checks whether a feature specification is clear and complete. It uses semantic analysis to find problems, vague wording, missing measures, and extracted requirements.

In plain words
What is it for?
Run it on one feature or all specifications to see validation results, quality scores, issues, and suggested fixes.
Why use it?
It helps catch weaknesses in a specification before development starts.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is rand/mnemosyne's own configuration. It tells Claude Code how to work on mnemosyne itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mnemosyne configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is uv run python3 specflow_integration.py ../../.mnemosyne/artifacts/specs/<feature-id>.md --json.

Reuse

Borrowing it

Nothing to install: this file belongs to rand/mnemosyne. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/rand/mnemosyne/main/.claude/commands/feature-validate.md
Clone the repo
git clone --depth 1 https://github.com/rand/mnemosyne

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for feature-validate

README.md
[![agentmods](https://agentmods.dev/badge/commands/rand/mnemosyne/feature-validate/github.svg)](https://agentmods.dev/commands/rand/mnemosyne/feature-validate)
Your own site
<a href="https://agentmods.dev/commands/rand/mnemosyne/feature-validate"><img src="https://agentmods.dev/badge/commands/rand/mnemosyne/feature-validate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for feature-validate

Your own site · 80×15
<a href="https://agentmods.dev/commands/rand/mnemosyne/feature-validate"><img src="https://agentmods.dev/badge/commands/rand/mnemosyne/feature-validate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 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,809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00013 $0.01809
Opus 5.5 $0.00005 $0.00724
Sonnet 5.5 $0.00003 $0.00362
Haiku 4.5 $0.00001 $0.00181

Measured 1mo ago against content hash d2032dc458e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

feature-validate 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 1mo 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-validate.md · 205 lines

How it starts

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

I will help you validate a feature specification using AI-powered semantic analysis.

Usage:

  • /feature-validate <feature-id> - Validate a specific feature spec
  • /feature-validate --all - Validate all specs in artifacts/specs/
  • /feature-validate <feature-id> --fix - Validate and suggest specific fixes

Instructions for me:

  1. Load feature spec:

    • Read .mnemosyne/artifacts/specs/<feature-id>.md
    • If --all: Glob .mnemosyne/artifacts/specs/*.md
    • If not found: "Error: Feature spec '' not found"
    • Parse YAML frontmatter for spec metadata
  2. Run DSPy validation:

    • Execute validation using optimized ReviewerModule v1:
      cd src/orchestration/dspy_modules
      uv run python3 specflow_integration.py ../../.mnemosyne/artifacts/specs/<feature-id>.md --json
      
    • Parse JSON output for validation results:
      • is_valid: Overall validation status (bool)
      • issues: List of specific problems found
      • suggestions: Actionable improvement recommendations
      • requirements: LLM-extracted requirements from spec
      • ambiguities: Detected vague terms and missing metrics
      • completeness_score: 0.0-1.0 quality score
  3. Interpret results:

    • Excellent (score ≥ 0.9): "✓ Spec quality: Excellent"
    • Good (score ≥ 0.8): "✓ Spec quality: Good"
    • Fair (score ≥ 0.7): "⚠️ Spec quality: Fair - improvements recommended"
    • Poor (score < 0.7): "✗ Spec quality: Poor - significant issues found"
  4. Display validation report:

    ✓ Validation complete
    
    Feature ID: <feature-id>
    Feature Name: <feature-name>
    Spec Location: .mnemosyne/artifacts/specs/<feature-id>.md
    Spec Version: <version>
    
    Validation Method: DSPy ReviewerModule v1 (semantic analysis)
    
    == QUALITY ASSESSMENT ==
    
    Completeness Score: <score>% (<rating>)
    Requirements Extracted: <count>
    Issues Found: <count>
    Ambiguities Detected: <count>
    Validation Status: <✓ Pass | ⚠️ Warning | ✗ Fail>
    
    == EXTRACTED REQUIREMENTS ==
    
    [First 5 requirements extracted by LLM:]
    1. <requirement>
    2. <requirement>
    3. <requirement>
    4. <requirement>
    5. <requirement>
    
    [If more than 5:]
    ... and <N> more requirements
    
    == ISSUES ==
    
    [If issues found:]
    ✗ <issue 1>
    ✗ <issue 2>
    ✗ <issue 3>
    
    [If no issues:]
    ✓ No issues detected
    
    == AMBIGUITIES ==
    
    [If ambiguities found:]
    🔍 <location>: <term>
       Question: <clarifying question>
       Impact: <why this matters>
    
    [If no ambiguities:]
    ✓ No ambiguities detected
    
    == SUGGESTIONS ==
    
    [If suggestions available:]
    💡 <suggestion 1>
    💡 <suggestion 2>
    💡 <suggestion 3>
    
    [If no suggestions:]
    ✓ Spec meets quality standards
    
    == NEXT STEPS ==
    
    [If score >= 0.8:]
    - Review spec: cat .mnemosyne/artifacts/specs/<feature-id>.md
    - Create implementation plan: /feature-plan <feature-id>
    
    [If score < 0.8:]
    - Address issues above (priority: high)
    - Clarify ambiguities: /feature-clarify <feature-id>
    - Re-validate: /feature-validate <feature-id>
    - After fixes, create plan: /feature-plan <feature-id>
    
  5. Detailed fix suggestions (if --fix flag): For each issue/ambiguity, provide:

    • Location: Exact section/line in spec
    • Problem: What's wrong
    • Fix: Specific text to add/change
    • Example: Show before/after

    Format:

    == FIX #1: <issue summary> ==
    
    Location: <section> - <line range>
    Problem: <specific issue>
    
    Suggested Fix:
    Replace: "<current text>"
    With: "<improved text>"
    
    Example:
    Before: "API must be fast"
    After: "API must respond within 200ms (p95 latency) under normal load (1000 req/s)"
    
    Rationale: <why this fix improves spec quality>
    
  6. Validation for --all flag:

    • Run validation on each spec sequentially
    • Display summary table:
      == BATCH VALIDATION RESULTS ==
      
      | Feature ID         | Score | Status   | Issues | Ambiguities |
      |--------------------|-------|----------|--------|-------------|
      | jwt-auth           | 92%   | ✓ Pass   | 0      | 0           |
      | api-rate-limiting  | 78%   | ⚠️ Warn  | 2      | 3           |
      | user-dashboard     | 65%   | ✗ Fail   | 5      | 7           |
      
      Summary:
      - Total Specs: 3
      - Passed (≥80%): 1
      - Warning (70-79%): 1
      - Failed (<70%): 1
      
      Average Score: 78%
      
      Recommended Actions:
      - Fix critical issues in: user-dashboard
      - Review and improve: api-rate-limiting
      

Read the full file on GitHub · 205 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. 1mo ago First seen · 205 lines · 13 tokens per session scan A d2032dc458e8

Subscribe to this mod's changes

feature-validate is a command published in the GitHub repository rand/mnemosyne (101 stars, last pushed 11mo ago), licensed MIT. It adds 13 tokens to every session and 1,809 once invoked, about $0.0001 per session on Opus 5.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.