Basic Memory — Prompts
Prompt File 1: .claude/commands/spec.md
Technique: Tool-driven step-by-step prompt with conditional branching by argument.
---
allowed-tools: mcp__basic-memory__write_note, mcp__basic-memory__read_note, mcp__basic-memory__search_notes, mcp__basic-memory__edit_note
argument-hint: [create|status|show|review] [spec-name]
description: Manage specifications in our development process
---
## Context
Specifications are managed in the Basic Memory "specs" project. All specs live in a centralized location accessible across all repositories via MCP tools.
See SPEC-1 and SPEC-2 in the "specs" project for the full specification-driven development process.
### If command is "create":
1. Get next SPEC number by searching existing specs in "specs" project
2. Create new spec using template from SPEC-2
3. Use mcp__basic-memory__write_note with project="specs"
4. Include standard sections: Why, What, How, How to Evaluate
### If command is "review":
1. Read the specified spec and its "How to Evaluate" section
2. Review current implementation against success criteria with careful evaluation of:
- **Functional completeness** - All specified features working
- **Test coverage analysis** - Actual test files and coverage percentage
- Count existing test files vs required components/APIs/composables
3. Provide honest, accurate assessment - do not overstate completeness
4. Document findings and update spec with review results using mcp__basic-memory__edit_note
5. If gaps found, clearly identify what still needs to be implemented/tested
Technique used: Conditional imperative prompt (argument dispatches to different sub-flows); explicit tool restriction via allowed-tools frontmatter; anti-sycophancy instruction ("do not overstate completeness").
Technique: Declarative format specification that agents internalize as writing instructions.
Key excerpt:
## Observations
An observation is a categorized fact about the entity. Written as a Markdown list item.
Syntax: `- [category] content text #tag1 #tag2 (context)`
Examples:
- [design] Files are the source of truth #architecture (All state comes from files)
- [tech] Using SQLite for storage #implementation
- [note] Need to add error handling #todo
## Relations
- Explicit: `- relation_type [[Entity]] (optional context)`
- `- depends_on [[Content Parser]] (Need for semantic extraction)`
- `- "based on" [[Design Notes]]`
Technique used: Schema-as-prompt — the format doc is written for both human editors and LLM tool callers, making the note format self-documenting and guiding agent behavior without an explicit system prompt.
The tool docstring is injected into the MCP protocol and serves as a runtime prompt:
Creates a markdown note with semantic observations and relations.
If the note already exists, returns an error by default. Pass overwrite=True
to replace the existing note. For incremental updates, use edit_note instead.
Technique: Constraint injection via MCP tool descriptions to prevent agent mistakes (duplicate writes, wrong tool choice).