$spec-load
$spec-load "--category coding"
$spec-load "--keyword auth"
$spec-load "--category coding --keyword auth"
$spec-load "--category review"
File → Primary Category mapping:
| File | Primary Category |
|---|---|
coding-conventions.md |
coding |
architecture-constraints.md |
arch |
test-conventions.md |
test |
review-standards.md |
review |
debug-notes.md |
debug |
quality-rules.md |
quality |
learnings.md |
learning |
tools.md |
tools |
--category loading: Loads category's primary doc in full + matching entries from other files.
Keyword filtering: When --keyword is provided, only entries with matching keyword in their <spec-entry keywords="..."> attribute are returned.
Output boundary: This command produces NO file writes. All output is conversation-context injection only.
Phase Gates (MANDATORY, BLOCKING)
GATE 1: Parse → Discover
- REQUIRED: Arguments parsed — at least one of --category or --keyword provided, or empty args triggers full load.
- BLOCKED if: invalid category value.
GATE 2: Discover → Load
- REQUIRED: At least one spec directory exists.
- BLOCKED if: E001 —
.workflow/specs/not initialized and no CLI fallback available.
GATE 3: Load → Display
- REQUIRED: Spec files read and entries parsed.
- REQUIRED: Keyword filtering applied if --keyword was provided.
- BLOCKED if: no readable spec files found.
Step 1: Validate Specs Directory
Verify .workflow/specs/ exists (E001).
Step 2: Parse Arguments
Extract optional --category and --keyword flags.
Step 3: Load via CLI
Run maestro load --type spec [--category <category>] [--keyword <word>]. If CLI unavailable, read files directly and apply keyword/category filter.
Step 4: Display Results
Show matched entries grouped by filename and category, with <spec-entry> tags stripped.
<error_codes>
| Code | Severity | Description |
|---|---|---|
| E001 | fatal | .workflow/specs/ not initialized -- run $spec-setup first |
| W001 | warning | No matching specs for keyword -- showing all in category |
| </error_codes> |
<success_criteria>
-
.workflow/specs/directory validated - Category and keyword parsed from arguments
- Files loaded per category mapping
- Keyword filtering applied at entry level (via
<spec-entry>keywords) - Tools auto-discovered from knowhow/ by category + tool flag
- Results displayed with file references and stripped tags </success_criteria>