The template opens with a machine-readable navigation guide for AI token optimization:
---
description: Define toolkit specification (SDD - Spec-Driven Development)
---
## Outline
The text the user typed after `/metaspec.sdd.specify` is the **toolkit specification description**.
**PURPOSE: Toolkit Specification (SDD)** 🎯
This command is for defining **toolkit implementation specifications**:
- Focus: HOW to implement the toolkit
- Output: `specs/toolkit/001-{name}/spec.md`
- Must depend on specification specs
- Implementation-focused
### 📖 Navigation Guide (Quick Reference with Line Numbers)
**🎯 AI Token Optimization**: Use `read_file` with `offset` and `limit` to read only needed sections.
| Step | Lines | Size | read_file Usage |
|------|-------|------|-----------------|
| 1. Setup & Verify | 103-159 | 56 lines | `read_file(target_file, offset=103, limit=56)` |
| 2. Gather Content | 160-239 | 79 lines | `read_file(target_file, offset=160, limit=79)` |
| 3. Generate Sections | 240-2673 | 2433 lines | See components below ⬇️ **LARGE** |
| 4. Write File | 2674-2722 | 48 lines | `read_file(target_file, offset=2674, limit=48)` |
Technique: Precision-guided navigation — embedding line-number indices inside templates so AI agents use read_file(offset, limit) to stream only the relevant slice, avoiding full-file reads of 3000+ line templates. Claimed 84–99% token savings.
Excerpt 2: Generator vs AI Commands Guidance (from the same template, lines ~2116-2211)
**🎯 Generator vs AI Commands** ⭐⭐⭐ UPDATED
| Subsection | Lines | Size | Usage |
|------------|-------|------|-------|
| **🎯 Generator vs AI Commands** ⭐⭐⭐ UPDATED | 2116-2211 | 96 lines | `read_file(target_file, offset=2116, limit=96)` |
| Step 1-4: Analysis Logic | 2214-2293 | 80 lines |
| **Step 5: Define Generator** ⭐ UPDATED | 2294-2487 | 193 lines |
| **✅ Verification Checklist** ⭐⭐ ENHANCED | 2488-2513 | 25 lines |
Technique: Layered specification — the template is a meta-document that both describes what to do and provides the scaffolding for the output. The distinction between "Generator" (code that produces files) vs "AI Commands" (prompts that instruct AI) is an explicit architectural separation enforced through the spec.
Excerpt 3: AGENTS.md Constitutional Principle Reference
From memory/constitution.md (referenced in AGENTS.md):
The constitution is organized into three parts:
Part I: Project Core Values (Managed by: /speckit.constitution)
- AI-First Design
- Progressive Enhancement
- Minimal Viable Abstraction
- Domain Specificity
Part II: Specification Design Principles (Managed by: /metaspec.sds.constitution)
- Entity Clarity
- Validation Completeness
- Operation Semantics
- Implementation Neutrality
Technique: Constitutional governance — a supreme document that all other specs must not contradict. Constitutional design in multi-level spec systems.
Prompting Techniques Summary
- Precision-guided navigation — line-number table of contents in large templates
- SDS/SDD separation — spec definition vs spec implementation as distinct namespaces
- Constitutional inheritance — constitution.md as supreme authority over all generated specs
- Jinja2 template metaprogramming — templates that generate templates