manage-knowhow
Manage knowhow entries (workflow and system)
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/catlog22/maestro-flow/HEAD/.claude/commands/manage-knowhow.md -o ~/.claude/commands/manage-knowhow.mdmanage-knowhow.md
<purpose>
Manage knowhow across two stores: workflow (`.workflow/knowhow/`) and system memory (`~/.claude/projects/*/memory/`). Operations: list, search, view, edit, delete, prune.
</purpose>
<required_reading>
@~/.maestro/workflows/knowhow.md
</required_reading>
<context>
Arguments: $ARGUMENTS
Dual store architecture (paths, formats, index) defined in workflow knowhow.md.
**Subcommands:**
- `list` — List entries from both stores (default if no arguments)
- `search <query>` — Full-text search across both stores
- `view <id|file>` — Display a workflow entry by ID or system file by name
- `edit <file>` — Edit a system memory file (MEMORY.md or topic file)
- `delete <id|file>` — Remove an entry/file (with confirmation)
- `prune` — Bulk cleanup by criteria
**Flags:**
- `--store <workflow|system|all>` — Target store (default: `all` for list/search, inferred for other ops)
- `--tag <tag>` — Filter by tag (workflow store)
- `--type <compact|tip>` — Filter by entry type (workflow store)
- `--before <YYYY-MM-DD>` — Entries before date
- `--after <YYYY-MM-DD>` — Entries after date
- `--dry-run` — Preview destructive ops without executing
- `--confirm` — Skip confirmation prompt
</context>
<execution>
Follow '~/.maestro/workflows/knowhow.md' Part A (KnowHow Management) completely.
</execution>
<error_codes>
| Code | Severity | Description | Stage |
|------|----------|-------------|-------|
| E001 | error | No memory stores found — for workflow store run `/manage-knowhow-capture`; for system store create `~/.claude/projects/{project}/memory/MEMORY.md` manually | resolve_paths |
| E002 | error | Entry ID or filename not found | execute_view, execute_delete |
| E003 | error | Prune requires at least one filter (--tag, --type, --before, --after) | execute_prune |
| E004 | error | Cannot delete MEMORY.md — use `edit` subcommand instead | execute_delete |
| W001 | warning | Workflow index has orphaned files or dangling references | integrity_check |
| W002 | warning | MEMORY.md references non-existent topic file | integrity_check |
| W003 | warning | MEMORY.md exceeds 200 lines — content will be truncated at load | execute_edit |
</error_codes>
<success_criteria>
- [ ] Both store paths correctly resolved
- [ ] Subcommand correctly detected from arguments
- [ ] Store auto-detected from argument format (KNW-*/TIP-* vs filename)
- [ ] List: both stores displayed with appropriate formatting
- [ ] Search: results from both stores, ranked by relevance
- [ ] View: correct store selected, full content displayed
- [ ] Edit: system memory files editable, MEMORY.md kept under 200 lines
- [ ] Delete: MEMORY.md protected, confirmation required, references checked
- [ ] Prune: workflow-only, filters validated, index updated
- [ ] Integrity check catches orphans and broken links
- [ ] Next step routed
</success_criteria>
<completion>
### Next-step routing
| Condition | Suggestion |
|-----------|-----------|
| Want to capture new knowhow | `/manage-knowhow-capture` |
| View project state | `/manage-status` |
| Prune stale entries | `/manage-knowledge-audit --scope knowhow` |
</completion>Read-only code exploration via Bash + CLI semantic dual-source analysis, with schema-validated structured output.
Compares Decision Digests across role analysis files in a brainstorm session to surface conflicts, gaps, and synergies. Read-only — returns structured text for the orchestrator to apply.
Autonomous executor for non-interactive impeccable commands. Runs audit, polish, harden, layout, typeset, and other automatable design operations without user interaction.
Generates multi-file role analysis for a brainstorm session — analysis.md index + per-feature files + optional findings under {output_dir}/{role}/.
Resident pipeline supervisor agent. Message-driven lifecycle for cross-checkpoint quality observation and health monitoring.
Unified worker agent for team pipelines. Executes role-specific logic loaded from a role_spec file within a built-in task lifecycle (discover, execute, report).
UI design token management and prototype generation — W3C Design Tokens Format, state-based components, WCAG AA validation, responsive layout templates.
Evaluates technical topics, proposals, or decisions across multiple dimensions with evidence-based scoring and recommendations.