maestro-flow 0.4.9 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agy/agents/cli-explore-agent.md +186 -0
- package/.agy/agents/conceptual-planning-agent.md +244 -0
- package/.agy/agents/impeccable-agent.md +97 -0
- package/.agy/agents/team-supervisor.md +142 -0
- package/.agy/agents/team-worker.md +236 -0
- package/.agy/agents/ui-design-agent.md +286 -0
- package/.agy/agents/workflow-analyzer.md +114 -0
- package/.agy/agents/workflow-codebase-mapper.md +76 -0
- package/.agy/agents/workflow-collab-planner.md +142 -0
- package/.agy/agents/workflow-debugger.md +102 -0
- package/.agy/agents/workflow-executor.md +131 -0
- package/.agy/agents/workflow-external-researcher.md +86 -0
- package/.agy/agents/workflow-integration-checker.md +82 -0
- package/.agy/agents/workflow-nyquist-auditor.md +84 -0
- package/.agy/agents/workflow-phase-researcher.md +84 -0
- package/.agy/agents/workflow-plan-checker.md +89 -0
- package/.agy/agents/workflow-planner.md +194 -0
- package/.agy/agents/workflow-project-researcher.md +73 -0
- package/.agy/agents/workflow-research-synthesizer.md +70 -0
- package/.agy/agents/workflow-reviewer.md +81 -0
- package/.agy/agents/workflow-roadmapper.md +81 -0
- package/.agy/agents/workflow-verifier.md +119 -0
- package/.agy/skills/codify-to-knowhow/SKILL.md +172 -0
- package/.agy/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
- package/.agy/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
- package/.agy/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
- package/.agy/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
- package/.agy/skills/learn-decompose/SKILL.md +118 -0
- package/.agy/skills/learn-follow/SKILL.md +129 -0
- package/.agy/skills/learn-investigate/SKILL.md +154 -0
- package/.agy/skills/learn-retro/SKILL.md +159 -0
- package/.agy/skills/learn-second-opinion/SKILL.md +124 -0
- package/.agy/skills/maestro/SKILL.md +221 -0
- package/.agy/skills/maestro-amend/SKILL.md +162 -0
- package/.agy/skills/maestro-analyze/SKILL.md +135 -0
- package/.agy/skills/maestro-brainstorm/SKILL.md +118 -0
- package/.agy/skills/maestro-collab/SKILL.md +174 -0
- package/.agy/skills/maestro-composer/SKILL.md +180 -0
- package/.agy/skills/maestro-execute/SKILL.md +133 -0
- package/.agy/skills/maestro-fork/SKILL.md +88 -0
- package/.agy/skills/maestro-guard/SKILL.md +101 -0
- package/.agy/skills/maestro-help/SKILL.md +267 -0
- package/.agy/skills/maestro-help/index/catalog.json +184 -0
- package/.agy/skills/maestro-help/phases/01-parse-intent.md +122 -0
- package/.agy/skills/maestro-help/phases/02-search-present.md +181 -0
- package/.agy/skills/maestro-help/phases/03-workflow-guide.md +186 -0
- package/.agy/skills/maestro-impeccable/SKILL.md +250 -0
- package/.agy/skills/maestro-init/SKILL.md +80 -0
- package/.agy/skills/maestro-learn/SKILL.md +142 -0
- package/.agy/skills/maestro-merge/SKILL.md +66 -0
- package/.agy/skills/maestro-milestone-audit/SKILL.md +70 -0
- package/.agy/skills/maestro-milestone-complete/SKILL.md +77 -0
- package/.agy/skills/maestro-milestone-release/SKILL.md +98 -0
- package/.agy/skills/maestro-overlay/SKILL.md +177 -0
- package/.agy/skills/maestro-plan/SKILL.md +172 -0
- package/.agy/skills/maestro-player/SKILL.md +176 -0
- package/.agy/skills/maestro-quick/SKILL.md +67 -0
- package/.agy/skills/maestro-ralph/SKILL.md +546 -0
- package/.agy/skills/maestro-ralph-execute/SKILL.md +255 -0
- package/.agy/skills/maestro-roadmap/SKILL.md +170 -0
- package/.agy/skills/maestro-tools-execute/SKILL.md +119 -0
- package/.agy/skills/maestro-tools-register/SKILL.md +159 -0
- package/.agy/skills/maestro-ui-codify/SKILL.md +81 -0
- package/.agy/skills/maestro-update/SKILL.md +175 -0
- package/.agy/skills/maestro-verify/SKILL.md +111 -0
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +77 -0
- package/.agy/skills/manage-codebase-refresh/SKILL.md +59 -0
- package/.agy/skills/manage-harvest/SKILL.md +96 -0
- package/.agy/skills/manage-issue/SKILL.md +72 -0
- package/.agy/skills/manage-issue-discover/SKILL.md +83 -0
- package/.agy/skills/manage-knowhow/SKILL.md +76 -0
- package/.agy/skills/manage-knowhow-capture/SKILL.md +78 -0
- package/.agy/skills/manage-learn/SKILL.md +64 -0
- package/.agy/skills/manage-status/SKILL.md +51 -0
- package/.agy/skills/manage-wiki/SKILL.md +61 -0
- package/.agy/skills/quality-auto-test/SKILL.md +135 -0
- package/.agy/skills/quality-debug/SKILL.md +122 -0
- package/.agy/skills/quality-refactor/SKILL.md +69 -0
- package/.agy/skills/quality-retrospective/SKILL.md +79 -0
- package/.agy/skills/quality-review/SKILL.md +130 -0
- package/.agy/skills/quality-sync/SKILL.md +53 -0
- package/.agy/skills/quality-test/SKILL.md +119 -0
- package/.agy/skills/security-audit/SKILL.md +157 -0
- package/.agy/skills/skill-iter-tune/SKILL.md +381 -0
- package/.agy/skills/skill-iter-tune/phases/01-setup.md +144 -0
- package/.agy/skills/skill-iter-tune/phases/02-execute.md +292 -0
- package/.agy/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
- package/.agy/skills/skill-iter-tune/phases/04-improve.md +198 -0
- package/.agy/skills/skill-iter-tune/phases/05-report.md +166 -0
- package/.agy/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
- package/.agy/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
- package/.agy/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
- package/.agy/skills/spec-add/SKILL.md +67 -0
- package/.agy/skills/spec-load/SKILL.md +70 -0
- package/.agy/skills/spec-remove/SKILL.md +50 -0
- package/.agy/skills/spec-setup/SKILL.md +47 -0
- package/.agy/skills/team-coordinate/SKILL.md +267 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/monitor.md +348 -0
- package/.agy/skills/team-coordinate/roles/coordinator/role.md +362 -0
- package/.agy/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
- package/.agy/skills/team-coordinate/specs/pipelines.md +97 -0
- package/.agy/skills/team-coordinate/specs/quality-gates.md +112 -0
- package/.agy/skills/team-coordinate/specs/role-spec-template.md +198 -0
- package/.agy/skills/team-executor/SKILL.md +180 -0
- package/.agy/skills/team-executor/roles/executor/commands/monitor.md +235 -0
- package/.agy/skills/team-executor/roles/executor/role.md +171 -0
- package/.agy/skills/team-executor/specs/session-schema.md +264 -0
- package/.agy/skills/team-lifecycle-v4/SKILL.md +189 -0
- package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +92 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/role.md +64 -0
- package/.agy/skills/team-lifecycle-v4/roles/planner/role.md +82 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/role.md +65 -0
- package/.agy/skills/team-lifecycle-v4/roles/supervisor/role.md +188 -0
- package/.agy/skills/team-lifecycle-v4/roles/tester/role.md +84 -0
- package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +92 -0
- package/.agy/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
- package/.agy/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
- package/.agy/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
- package/.agy/skills/team-lifecycle-v4/templates/architecture.md +254 -0
- package/.agy/skills/team-lifecycle-v4/templates/epics.md +196 -0
- package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.agy/skills/team-lifecycle-v4/templates/requirements.md +224 -0
- package/.agy/skills/team-quality-assurance/SKILL.md +148 -0
- package/.agy/skills/team-quality-assurance/roles/analyst/role.md +85 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +235 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
- package/.agy/skills/team-quality-assurance/roles/executor/role.md +62 -0
- package/.agy/skills/team-quality-assurance/roles/generator/role.md +65 -0
- package/.agy/skills/team-quality-assurance/roles/scout/role.md +72 -0
- package/.agy/skills/team-quality-assurance/roles/strategist/role.md +69 -0
- package/.agy/skills/team-quality-assurance/specs/pipelines.md +115 -0
- package/.agy/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.agy/skills/team-review/SKILL.md +149 -0
- package/.agy/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
- package/.agy/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
- package/.agy/skills/team-review/roles/coordinator/commands/monitor.md +209 -0
- package/.agy/skills/team-review/roles/coordinator/role.md +132 -0
- package/.agy/skills/team-review/roles/fixer/role.md +74 -0
- package/.agy/skills/team-review/roles/reviewer/role.md +66 -0
- package/.agy/skills/team-review/roles/scanner/role.md +77 -0
- package/.agy/skills/team-review/specs/dimensions.md +82 -0
- package/.agy/skills/team-review/specs/finding-schema.json +82 -0
- package/.agy/skills/team-review/specs/pipelines.md +102 -0
- package/.agy/skills/team-review/specs/team-config.json +27 -0
- package/.agy/skills/team-tech-debt/SKILL.md +133 -0
- package/.agy/skills/team-tech-debt/roles/assessor/role.md +76 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/monitor.md +198 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/role.md +123 -0
- package/.agy/skills/team-tech-debt/roles/executor/role.md +76 -0
- package/.agy/skills/team-tech-debt/roles/planner/role.md +68 -0
- package/.agy/skills/team-tech-debt/roles/scanner/role.md +90 -0
- package/.agy/skills/team-tech-debt/roles/validator/role.md +78 -0
- package/.agy/skills/team-tech-debt/specs/pipelines.md +47 -0
- package/.agy/skills/team-tech-debt/specs/team-config.json +129 -0
- package/.agy/skills/team-testing/SKILL.md +144 -0
- package/.agy/skills/team-testing/roles/analyst/role.md +101 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/monitor.md +242 -0
- package/.agy/skills/team-testing/roles/coordinator/role.md +134 -0
- package/.agy/skills/team-testing/roles/executor/role.md +95 -0
- package/.agy/skills/team-testing/roles/generator/role.md +95 -0
- package/.agy/skills/team-testing/roles/strategist/role.md +81 -0
- package/.agy/skills/team-testing/specs/pipelines.md +101 -0
- package/.agy/skills/team-testing/specs/team-config.json +93 -0
- package/.agy/skills/wiki-connect/SKILL.md +64 -0
- package/.agy/skills/wiki-digest/SKILL.md +70 -0
- package/.agy/skills/workflow-skill-designer/SKILL.md +506 -0
- package/.agy/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
- package/.agy/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
- package/.agy/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
- package/.agy/skills/workflow-skill-designer/phases/04-validation.md +471 -0
- package/package.json +3 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-tools-register
|
|
3
|
+
description: Register tool specs - extract, generate, or optimize
|
|
4
|
+
argument-hint: [<description>] [--extract <path>] [--optimize <name>]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- replace_file_content
|
|
12
|
+
- run_command
|
|
13
|
+
- send_message
|
|
14
|
+
- view_file
|
|
15
|
+
- write_to_file
|
|
16
|
+
---
|
|
17
|
+
<purpose>
|
|
18
|
+
Codify reusable business processes as knowhow documents with `tool: true` in `.workflow/knowhow/`. Once registered, tools are auto-discovered by `spec load --category` and spec-injector — plan agents pick up design/architecture flows, test agents pick up verification methods, implement agents pick up execution steps.
|
|
19
|
+
|
|
20
|
+
When to register: during planning to standardize a business process (e.g. payment reconciliation, OAuth integration steps); after execution to capture a validated procedure (e.g. database migration rollback); before testing to register verification methods for test agents (e.g. E2E checkout flow, API idempotency verification); during retrospective/harvest to extract reusable process knowledge from artifacts.
|
|
21
|
+
|
|
22
|
+
Four modes: Extract (from code/docs), Generate (from description), Optimize (improve existing), Promote (existing knowhow → tool in place).
|
|
23
|
+
Short processes (<10 steps) inline; long processes (>=10 steps) use ref mode with knowhow detail doc.
|
|
24
|
+
</purpose>
|
|
25
|
+
|
|
26
|
+
<required_reading>
|
|
27
|
+
@~/.maestro/workflows/tools-spec.md
|
|
28
|
+
</required_reading>
|
|
29
|
+
|
|
30
|
+
<context>
|
|
31
|
+
$ARGUMENTS — Intent description
|
|
32
|
+
|
|
33
|
+
**Examples**:
|
|
34
|
+
```
|
|
35
|
+
/maestro-tools-register extract OAuth PKCE token exchange flow from src/auth/
|
|
36
|
+
/maestro-tools-register generate Stripe webhook idempotency verification
|
|
37
|
+
/maestro-tools-register generate E2E checkout flow with payment gateway mock setup
|
|
38
|
+
/maestro-tools-register optimize e2e-checkout tool
|
|
39
|
+
/maestro-tools-register promote RCP-db-migration-rollback as test tool
|
|
40
|
+
/maestro-tools-register promote knowhow-auth-api to coding tool
|
|
41
|
+
```
|
|
42
|
+
</context>
|
|
43
|
+
|
|
44
|
+
<execution>
|
|
45
|
+
|
|
46
|
+
### Step 1: Intent Detection
|
|
47
|
+
|
|
48
|
+
Parse $ARGUMENTS to determine mode:
|
|
49
|
+
- Contains "extract" → extract mode
|
|
50
|
+
- Contains "optimize/improve" → optimize mode
|
|
51
|
+
- Contains "promote" or references existing knowhow doc (path/ID) → promote mode
|
|
52
|
+
- Other → generate mode
|
|
53
|
+
- Empty → ask user with ask_question
|
|
54
|
+
|
|
55
|
+
### Step 2: Gather Information
|
|
56
|
+
|
|
57
|
+
**Extract mode**:
|
|
58
|
+
- Identify source (current conversation, specified files, codebase scan)
|
|
59
|
+
- Extract step sequence, prerequisites, expected outputs
|
|
60
|
+
|
|
61
|
+
**Generate mode**:
|
|
62
|
+
- Confirm tool name, applicable roles, target scenario
|
|
63
|
+
- If unclear, ask user with ask_question
|
|
64
|
+
|
|
65
|
+
**Optimize mode**:
|
|
66
|
+
- Load existing tool: `maestro spec load --category coding --keyword <name>`
|
|
67
|
+
- Analyze improvement points (step splitting, prerequisites, error handling)
|
|
68
|
+
|
|
69
|
+
**Promote mode** (existing knowhow → tool):
|
|
70
|
+
- Locate document: `maestro wiki list --keyword <name>` or by path in `.workflow/knowhow/`
|
|
71
|
+
- Read document, verify it contains actionable steps (numbered list or ## Steps section)
|
|
72
|
+
- If no actionable steps, suggest extract mode instead
|
|
73
|
+
- Determine category (Step 3) and summary ("Use when ...")
|
|
74
|
+
- Update frontmatter via: `maestro wiki update <id> --frontmatter '{"tool": true, "category": "<cat>", "summary": "<summary>"}'`
|
|
75
|
+
- Do NOT recreate the document — modify in place
|
|
76
|
+
|
|
77
|
+
**For all modes** — identify the usage timing: when should an agent or user invoke this tool? This becomes the first line of the entry description (see Step 5).
|
|
78
|
+
|
|
79
|
+
### Step 3: Determine Category
|
|
80
|
+
|
|
81
|
+
**Core principle**: `category` = **who consumes this tool** (which agent type discovers and uses it), not what the content is about.
|
|
82
|
+
|
|
83
|
+
| Category | Consumer Agent | Decision Question | Signal Words |
|
|
84
|
+
|---|---|---|---|
|
|
85
|
+
| `coding` | code-developer, workflow-executor | 开发者实现时需要这个流程吗? | build, deploy, integrate, configure, setup, migrate, api-contract |
|
|
86
|
+
| `test` | tdd-developer, test-fix-agent | 测试者验证行为时需要这个流程吗? | verify, validate, assert, e2e, regression, coverage, idempotency |
|
|
87
|
+
| `review` | workflow-reviewer | 审查者需要这个作为 checklist 吗? | audit, checklist, compliance, quality-gate, standard |
|
|
88
|
+
| `arch` | workflow-planner | 规划者设计方案时需要这个吗? | design, architecture, decompose, trade-off, migration-strategy |
|
|
89
|
+
| `debug` | debug-explore-agent | 调试者排查问题时需要这个吗? | diagnose, trace, investigate, root-cause, reproduce |
|
|
90
|
+
|
|
91
|
+
**Multi-consumer split**: If content serves multiple consumers (e.g., API doc for both dev and test), split into separate documents:
|
|
92
|
+
- API contract (what endpoints look like) → `category: coding` (AST-*, tool: false)
|
|
93
|
+
- API verification steps (how to test) → `category: test` (RCP-*, tool: true)
|
|
94
|
+
- Ask user when ambiguous: "This tool content serves both developers and testers. Split into separate documents?"
|
|
95
|
+
|
|
96
|
+
**Ambiguous cases**: Choose the **primary consumer** — the agent that would fail without this knowledge.
|
|
97
|
+
|
|
98
|
+
### Step 4: Decide Inline vs Ref
|
|
99
|
+
|
|
100
|
+
- Steps <10 and no code blocks → **inline mode**
|
|
101
|
+
- Steps >=10 or contains code examples/config → **ref mode**
|
|
102
|
+
|
|
103
|
+
### Step 5: Write
|
|
104
|
+
|
|
105
|
+
**Description format**: First line after `### Title` must state **when to use** this tool (the usage timing from Step 2). This is critical for ref entries — `spec load` only shows the first 200 chars after the heading as the summary.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
### {Title}
|
|
109
|
+
|
|
110
|
+
Use when {timing/trigger condition}.
|
|
111
|
+
|
|
112
|
+
1. Step one ...
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Create knowhow tool document** in `.workflow/knowhow/` with `tool: true` in YAML frontmatter:
|
|
116
|
+
```yaml
|
|
117
|
+
---
|
|
118
|
+
title: <Title>
|
|
119
|
+
type: recipe
|
|
120
|
+
category: <category>
|
|
121
|
+
keywords: [<keywords>]
|
|
122
|
+
tool: true
|
|
123
|
+
summary: "Use when <timing>. <scope description>"
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Steps
|
|
127
|
+
1. Step one ...
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Optionally register spec ref entry** for index discoverability:
|
|
131
|
+
```bash
|
|
132
|
+
maestro spec add <category> "<title>" "Use when <timing>. <scope summary>" --keywords "<csv>" \
|
|
133
|
+
--ref "knowhow/RCP-<slug>.md" --knowhow-type recipe
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Step 6: Verify
|
|
137
|
+
|
|
138
|
+
- `maestro spec load --category <category> --keyword <keyword>` to confirm loadable
|
|
139
|
+
- Display result: title, category, keywords, storage location
|
|
140
|
+
|
|
141
|
+
</execution>
|
|
142
|
+
|
|
143
|
+
<error_codes>
|
|
144
|
+
| Code | Severity | Description |
|
|
145
|
+
|------|----------|-------------|
|
|
146
|
+
| E001 | fatal | `.workflow/specs/` does not exist — run `maestro spec init` |
|
|
147
|
+
| E002 | warning | Duplicate tool name detected — confirm overwrite/optimize |
|
|
148
|
+
| E003 | fatal | category parameter empty — tools must declare a category |
|
|
149
|
+
</error_codes>
|
|
150
|
+
|
|
151
|
+
<success_criteria>
|
|
152
|
+
- [ ] Tool registered as knowhow document with `tool: true` frontmatter
|
|
153
|
+
- [ ] category correctly set
|
|
154
|
+
- [ ] keywords auto-extracted (3-5 terms)
|
|
155
|
+
- [ ] Description starts with "Use when ..." (usage timing)
|
|
156
|
+
- [ ] Loadable via `spec load --category <category>`
|
|
157
|
+
- [ ] Long processes use ref mode with knowhow file created
|
|
158
|
+
- [ ] Ref knowhow YAML includes `summary` with usage timing
|
|
159
|
+
</success_criteria>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-ui-codify
|
|
3
|
+
description: Extract design system from code, generate reference package, persist as knowledge assets
|
|
4
|
+
argument-hint: <source-path> [--package-name <name>] [--output-dir <path>] [--overwrite]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- define_subagent
|
|
7
|
+
- grep_search
|
|
8
|
+
- invoke_subagent
|
|
9
|
+
- manage_subagents
|
|
10
|
+
- replace_file_content
|
|
11
|
+
- run_command
|
|
12
|
+
- send_message
|
|
13
|
+
- view_file
|
|
14
|
+
- write_to_file
|
|
15
|
+
---
|
|
16
|
+
<purpose>
|
|
17
|
+
Codify UI design system from existing source code. 4-phase pipeline:
|
|
18
|
+
|
|
19
|
+
1. **Validate** (inline): Parameter validation, workspace setup, file discovery
|
|
20
|
+
2. **Extract** (3 parallel agents): Style Agent + Animation Agent + Layout Agent produce design-tokens.json, animation-tokens.json, layout-templates.json
|
|
21
|
+
3. **Package** (agent): Copy tokens to package directory, generate preview.html + preview.css
|
|
22
|
+
4. **Knowhow** (manifest + skill): Build knowhow-manifest.json, call codify-to-knowhow to persist as knowledge assets
|
|
23
|
+
|
|
24
|
+
Position in pipeline: code -> **ui-codify** -> knowhow + specs
|
|
25
|
+
</purpose>
|
|
26
|
+
|
|
27
|
+
<deferred_reading>
|
|
28
|
+
- [ui-codify.md](~/.maestro/workflows/ui-codify.md) — read always (main workflow orchestrator)
|
|
29
|
+
- [ui-codify-extract.md](~/.maestro/workflows/ui-codify-extract.md) — read when Phase 2 starts (style extraction with 3 agents)
|
|
30
|
+
- [ui-codify-package.md](~/.maestro/workflows/ui-codify-package.md) — read when Phase 3 starts (reference package generation)
|
|
31
|
+
- [ui-codify-knowhow.md](~/.maestro/workflows/ui-codify-knowhow.md) — read when Phase 4 starts (knowledge asset generation)
|
|
32
|
+
</deferred_reading>
|
|
33
|
+
|
|
34
|
+
<context>
|
|
35
|
+
$ARGUMENTS — source path (required) with optional flags.
|
|
36
|
+
|
|
37
|
+
Flags:
|
|
38
|
+
- `<source-path>` (positional, required): Directory containing CSS/SCSS/JS/TS/HTML source files
|
|
39
|
+
- `--package-name <name>`: Package name for reference output (default: auto-generated from source directory)
|
|
40
|
+
- `--output-dir <path>`: Output directory for reference package (default: `.workflow/reference_style`)
|
|
41
|
+
- `--overwrite`: Allow overwriting existing package directory
|
|
42
|
+
</context>
|
|
43
|
+
|
|
44
|
+
<execution>
|
|
45
|
+
## 1. Load UI Specs
|
|
46
|
+
|
|
47
|
+
Load project UI conventions before extracting design system:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
maestro spec load --category ui
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If specs not initialized, continue without — the workflow still produces valid output.
|
|
54
|
+
|
|
55
|
+
## 2. Execute Workflow
|
|
56
|
+
|
|
57
|
+
Route to `~/.maestro/workflows/ui-codify.md` and follow completely.
|
|
58
|
+
|
|
59
|
+
The workflow orchestrates 4 phases with deferred loading of phase-specific workflow files. Each phase reads its workflow file only when execution reaches that phase.
|
|
60
|
+
</execution>
|
|
61
|
+
|
|
62
|
+
<error_codes>
|
|
63
|
+
| Code | Severity | Description | Stage |
|
|
64
|
+
|------|----------|-------------|-------|
|
|
65
|
+
| E001 | error | Source path argument required | parse_input |
|
|
66
|
+
| E002 | error | Source path not found or not a directory | validate |
|
|
67
|
+
| E003 | error | Package directory exists without --overwrite flag | validate |
|
|
68
|
+
| W001 | warning | animation-tokens.json not found (optional, extraction continues) | extract |
|
|
69
|
+
</error_codes>
|
|
70
|
+
|
|
71
|
+
<success_criteria>
|
|
72
|
+
- [ ] UI specs loaded via `spec load --category ui` (if available)
|
|
73
|
+
- [ ] Source path validated and file discovery completed
|
|
74
|
+
- [ ] design-tokens.json generated with color, typography, spacing tokens
|
|
75
|
+
- [ ] layout-templates.json generated with component patterns (universal/specialized)
|
|
76
|
+
- [ ] animation-tokens.json generated (optional, W001 if missing)
|
|
77
|
+
- [ ] preview.html + preview.css generated as interactive showcase
|
|
78
|
+
- [ ] knowhow-manifest.json created with AST/DCS assets and spec entries
|
|
79
|
+
- [ ] codify-to-knowhow called and completed successfully
|
|
80
|
+
- [ ] Temporary workspace cleaned up
|
|
81
|
+
</success_criteria>
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-update
|
|
3
|
+
description: Detect version, preview changes, apply workflow upgrades
|
|
4
|
+
argument-hint: [--dry-run] [--force]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- grep_search
|
|
8
|
+
- replace_file_content
|
|
9
|
+
- run_command
|
|
10
|
+
- view_file
|
|
11
|
+
- write_to_file
|
|
12
|
+
---
|
|
13
|
+
<purpose>
|
|
14
|
+
Detect the current `.workflow/` schema version, show available migrations, and interactively apply them step-by-step. Uses a migration registry that supports incremental version upgrades (e.g., 1.0 → 2.0 → 3.0).
|
|
15
|
+
|
|
16
|
+
Each migration step is previewed before execution. The user confirms each step in a loop.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<context>
|
|
20
|
+
$ARGUMENTS — optional flags.
|
|
21
|
+
|
|
22
|
+
**Flags:**
|
|
23
|
+
- `--dry-run` -- Preview migration plan without executing
|
|
24
|
+
- `--force` -- Skip confirmation prompts (apply all pending migrations)
|
|
25
|
+
|
|
26
|
+
**Migration registry:** `src/migrations/`
|
|
27
|
+
- Each migration is a standalone file (e.g., `v1-to-v2.ts`) exporting a `MigrationDef`
|
|
28
|
+
- All migrations are registered via `src/migrations/index.ts`
|
|
29
|
+
- Registry auto-chains: detects current version → walks chain → applies in order
|
|
30
|
+
- To add a new migration: create `src/migrations/v{N}-to-v{N+1}.ts`, register in `index.ts`
|
|
31
|
+
|
|
32
|
+
**CLI runner:** `src/migrations/run.ts`
|
|
33
|
+
- Executable entrypoint: `npx tsx src/migrations/run.ts [root] [--dry-run] [--force] [--json]`
|
|
34
|
+
- Outputs JSON (with `--json`) or human-readable text
|
|
35
|
+
|
|
36
|
+
**State version source:** `.workflow/state.json` → `version` field
|
|
37
|
+
</context>
|
|
38
|
+
|
|
39
|
+
<execution>
|
|
40
|
+
|
|
41
|
+
### Step 1: Detect Current State
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
1. Read .workflow/state.json
|
|
45
|
+
2. Extract version field (default "1.0" if missing)
|
|
46
|
+
3. Display:
|
|
47
|
+
|
|
48
|
+
=== Maestro Workflow Update ===
|
|
49
|
+
Project: {project_name}
|
|
50
|
+
Version: {version}
|
|
51
|
+
Location: {.workflow/ path}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Step 2: Dry-Run Preview
|
|
55
|
+
|
|
56
|
+
Run the migration CLI in dry-run + JSON mode to get the full plan:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx tsx src/migrations/run.ts "$(pwd)" --dry-run --json
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Parse the JSON output. If status is `up-to-date`:
|
|
63
|
+
```
|
|
64
|
+
Already up to date (v{version})
|
|
65
|
+
```
|
|
66
|
+
→ EXIT
|
|
67
|
+
|
|
68
|
+
Otherwise display the migration plan:
|
|
69
|
+
```
|
|
70
|
+
Pending Migrations ({N} step(s)):
|
|
71
|
+
|
|
72
|
+
1. [v{from} → v{to}] {name}
|
|
73
|
+
{description}
|
|
74
|
+
|
|
75
|
+
2. [v{from} → v{to}] {name}
|
|
76
|
+
{description}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If `--dry-run` flag was passed by user → display plan and EXIT.
|
|
80
|
+
|
|
81
|
+
### Step 3: Interactive Confirmation Loop
|
|
82
|
+
|
|
83
|
+
For each migration step (unless `--force`):
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
LOOP for step_index = 1 to N:
|
|
87
|
+
|
|
88
|
+
Display:
|
|
89
|
+
--- Step {step_index}/{N}: {name} ---
|
|
90
|
+
Version: v{from} → v{to}
|
|
91
|
+
|
|
92
|
+
Changes:
|
|
93
|
+
{description, indented}
|
|
94
|
+
|
|
95
|
+
IF NOT --force:
|
|
96
|
+
ask_question: "Apply this migration?"
|
|
97
|
+
Options: [yes / skip / abort]
|
|
98
|
+
|
|
99
|
+
- "yes" → proceed to Step 4 (execute)
|
|
100
|
+
- "skip" → WARN "Skipping may break the migration chain"
|
|
101
|
+
continue to next step
|
|
102
|
+
- "abort" → display summary of what was applied so far → EXIT
|
|
103
|
+
|
|
104
|
+
IF --force:
|
|
105
|
+
→ proceed to Step 4 (execute)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Step 4: Execute Single Migration
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
1. Create backup:
|
|
112
|
+
Bash: cp .workflow/state.json .workflow/state.json.backup-v{from}-{timestamp}
|
|
113
|
+
|
|
114
|
+
2. Run migration:
|
|
115
|
+
Bash: npx tsx src/migrations/run.ts "$(pwd)" --json
|
|
116
|
+
|
|
117
|
+
NOTE: The runner executes ALL pending migrations. For step-by-step control,
|
|
118
|
+
read state.json, call the migration function directly, or use the runner
|
|
119
|
+
which stops on first failure.
|
|
120
|
+
|
|
121
|
+
3. Parse result JSON and display:
|
|
122
|
+
|
|
123
|
+
{status_icon} Step {N} completed: {name}
|
|
124
|
+
Summary: {summary}
|
|
125
|
+
Changes:
|
|
126
|
+
- {change_1}
|
|
127
|
+
- {change_2}
|
|
128
|
+
- ...
|
|
129
|
+
|
|
130
|
+
4. If failed:
|
|
131
|
+
Display: "Migration failed: {summary}"
|
|
132
|
+
Display: "Backup available at: {backup_path}"
|
|
133
|
+
Display: "Restore with: cp {backup_path} .workflow/state.json"
|
|
134
|
+
→ EXIT
|
|
135
|
+
|
|
136
|
+
5. Continue loop to next step
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Step 5: Summary
|
|
140
|
+
|
|
141
|
+
After all steps completed (or user aborted):
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
=== Migration Complete ===
|
|
145
|
+
Applied: {applied_count} / {total_count} migration(s)
|
|
146
|
+
Skipped: {skipped_count}
|
|
147
|
+
Version: v{original} → v{final}
|
|
148
|
+
Backup: .workflow/state.json.backup-v{original}-{timestamp}
|
|
149
|
+
|
|
150
|
+
Next steps:
|
|
151
|
+
/manage-status -- Verify project state
|
|
152
|
+
/maestro -- Continue workflow
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
</execution>
|
|
156
|
+
|
|
157
|
+
<error_codes>
|
|
158
|
+
| Code | Severity | Condition | Recovery |
|
|
159
|
+
|------|----------|-----------|----------|
|
|
160
|
+
| E001 | error | .workflow/state.json not found | Run /maestro-init first |
|
|
161
|
+
| E002 | error | state.json parse error | Check file for corruption |
|
|
162
|
+
| E003 | error | Migration function failed | Restore from backup |
|
|
163
|
+
| W001 | warning | Skipped migration may break version chain | Re-run /maestro-update later |
|
|
164
|
+
| W002 | warning | tsx not available | Install tsx: npm i -D tsx |
|
|
165
|
+
</error_codes>
|
|
166
|
+
|
|
167
|
+
<success_criteria>
|
|
168
|
+
- [ ] Current version detected from state.json
|
|
169
|
+
- [ ] Dry-run preview shows full migration plan without execution
|
|
170
|
+
- [ ] Each step confirmed interactively (unless --force)
|
|
171
|
+
- [ ] Backup created before each migration
|
|
172
|
+
- [ ] Migration executed and result displayed with change list
|
|
173
|
+
- [ ] Abort stops cleanly with partial summary
|
|
174
|
+
- [ ] Summary shows applied/skipped counts and version change
|
|
175
|
+
</success_criteria>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maestro-verify
|
|
3
|
+
description: Use after execution to verify goals are actually achieved with evidence-based structural checks
|
|
4
|
+
argument-hint: [phase] [--skip-tests] [--skip-antipattern] [--dir <path>]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- replace_file_content
|
|
12
|
+
- run_command
|
|
13
|
+
- send_message
|
|
14
|
+
- view_file
|
|
15
|
+
- write_to_file
|
|
16
|
+
---
|
|
17
|
+
<purpose>
|
|
18
|
+
Verify execution results through three complementary methods:
|
|
19
|
+
1. **Goal-Backward verification** — 3-layer check (Truths → Artifacts → Wiring) that validates goals are actually achieved
|
|
20
|
+
2. **Anti-pattern scan** — detect stubs, placeholders, TODO/FIXME, empty returns in modified files
|
|
21
|
+
3. **Nyquist test coverage validation** — requirement-to-test mapping with gap classification
|
|
22
|
+
|
|
23
|
+
Supports dual-level verification:
|
|
24
|
+
- **Single plan**: `verify --dir scratch/plan-xxx` — verifies one plan, writes `verification.json` into plan dir
|
|
25
|
+
- **Milestone**: `verify` (no args) — aggregates all execute artifacts for current milestone into `scratch/{YYYYMMDD}-verify-M{N}-{slug}/milestone-verification.json`
|
|
26
|
+
|
|
27
|
+
Registers VRF artifact in state.json on completion.
|
|
28
|
+
</purpose>
|
|
29
|
+
|
|
30
|
+
<required_reading>
|
|
31
|
+
@~/.maestro/workflows/verify.md
|
|
32
|
+
</required_reading>
|
|
33
|
+
|
|
34
|
+
<deferred_reading>
|
|
35
|
+
- [verification.json](~/.maestro/templates/verification.json) — read when generating output
|
|
36
|
+
- [validation.json](~/.maestro/templates/validation.json) — read when generating test output
|
|
37
|
+
</deferred_reading>
|
|
38
|
+
|
|
39
|
+
<context>
|
|
40
|
+
$ARGUMENTS — phase number or no args for milestone-wide, with optional flags.
|
|
41
|
+
|
|
42
|
+
Flags (`--skip-tests`, `--skip-antipattern`, `--dir`), scope routing, output paths, and VRF artifact registration schema are defined in workflow `verify.md`.
|
|
43
|
+
|
|
44
|
+
### Pre-load context (before verification)
|
|
45
|
+
|
|
46
|
+
1. **Codebase docs**: If `.workflow/codebase/` exists, read `ARCHITECTURE.md` for expected module wiring and `FEATURES.md` for component mapping. Use in Layer 3 (Connection) checks.
|
|
47
|
+
2. **Review specs**: Run `maestro spec load --category review` to load review standards. Use as quality baseline for anti-pattern scan and constraint checks.
|
|
48
|
+
3. **Wiki constraints**: Run `maestro wiki search "architecture constraint" --json 2>/dev/null`. If results found, include documented invariants as additional truth checks in Layer 1.
|
|
49
|
+
4. **Role Knowledge**:
|
|
50
|
+
- Browse: `maestro wiki list --category review`
|
|
51
|
+
- Load task-relevant entries: `maestro wiki load <id1> [id2...]`
|
|
52
|
+
5. All are optional — proceed without if unavailable.
|
|
53
|
+
</context>
|
|
54
|
+
|
|
55
|
+
<execution>
|
|
56
|
+
Follow '~/.maestro/workflows/verify.md' completely.
|
|
57
|
+
|
|
58
|
+
### Post-verify Knowledge Inquiry
|
|
59
|
+
|
|
60
|
+
| Condition | Ask | Route |
|
|
61
|
+
|-----------|-----|-------|
|
|
62
|
+
| Anti-pattern blockers found (TODO/FIXME/stubs) | "Update quality-rules.md?" | spec-add quality |
|
|
63
|
+
| Architecture constraint violations | "Update architecture-constraints.md?" | spec-add arch |
|
|
64
|
+
| Recurring test coverage gap (same module across tasks) | "Add to test-conventions.md?" | spec-add test |
|
|
65
|
+
|
|
66
|
+
On confirm → `Skill("spec-add", "<category> <content>")`.
|
|
67
|
+
|
|
68
|
+
**Next-step routing on completion:**
|
|
69
|
+
- All checks pass, no gaps → /quality-review
|
|
70
|
+
- Gaps found (must-have failures or anti-pattern blockers) → /maestro-plan --gaps
|
|
71
|
+
- Low test coverage (Nyquist gaps) → /quality-auto-test
|
|
72
|
+
|
|
73
|
+
**Gap-fix closure loop:**
|
|
74
|
+
Gaps found → maestro-plan --gaps → maestro-execute → maestro-verify (re-run)
|
|
75
|
+
|
|
76
|
+
**Completion status:**
|
|
77
|
+
```
|
|
78
|
+
--- COMPLETION STATUS ---
|
|
79
|
+
STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_RETRY
|
|
80
|
+
CONCERNS: {description if applicable}
|
|
81
|
+
NEXT: /quality-review
|
|
82
|
+
--- END STATUS ---
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Status mapping:
|
|
86
|
+
- **DONE** — All checks pass, no gaps → NEXT: /quality-review
|
|
87
|
+
- **DONE_WITH_CONCERNS** — Gaps found (must-have failures or anti-pattern blockers) → NEXT: /maestro-execute (after /maestro-plan --gaps)
|
|
88
|
+
- **NEEDS_RETRY** — Verification could not complete (missing artifacts, corrupt data)
|
|
89
|
+
</execution>
|
|
90
|
+
|
|
91
|
+
<error_codes>
|
|
92
|
+
| Code | Severity | Condition | Recovery |
|
|
93
|
+
|------|----------|-----------|----------|
|
|
94
|
+
| E001 | error | No executed plans found for verification | Run maestro-execute first |
|
|
95
|
+
| E002 | error | Plan directory not found | Check --dir path |
|
|
96
|
+
| E003 | error | No execution results found (missing summaries) | Run maestro-execute first |
|
|
97
|
+
| W001 | warning | Test coverage below configured threshold | Review coverage gaps |
|
|
98
|
+
| W002 | warning | Anti-pattern blockers found in modified files | Fix blockers before proceeding |
|
|
99
|
+
</error_codes>
|
|
100
|
+
|
|
101
|
+
<success_criteria>
|
|
102
|
+
- [ ] Must-haves established (from convergence.criteria in tasks)
|
|
103
|
+
- [ ] All truths verified with status and evidence (Layer 1)
|
|
104
|
+
- [ ] All artifacts checked at L1 (exists), L2 (substantive), L3 (wired) (Layer 2)
|
|
105
|
+
- [ ] All key links verified with evidence (Layer 3)
|
|
106
|
+
- [ ] Anti-patterns scanned and categorized (unless skipped)
|
|
107
|
+
- [ ] Nyquist test coverage assessed (unless skipped)
|
|
108
|
+
- [ ] Fix plans generated for identified gaps
|
|
109
|
+
- [ ] verification.json written to plan dir (single plan) or milestone verify dir
|
|
110
|
+
- [ ] VRF artifact registered in state.json
|
|
111
|
+
</success_criteria>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manage-codebase-rebuild
|
|
3
|
+
description: Rebuild all codebase documentation from scratch
|
|
4
|
+
argument-hint: [--focus <area>] [--force] [--skip-commit]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- replace_file_content
|
|
12
|
+
- run_command
|
|
13
|
+
- send_message
|
|
14
|
+
- view_file
|
|
15
|
+
- write_to_file
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<purpose>
|
|
19
|
+
Perform a full rebuild of the .workflow/codebase/ documentation system from scratch. Scans the entire project source to identify components, features, requirements, and ADRs, then spawns parallel workflow-codebase-mapper agents to generate all documentation artifacts. This is a destructive operation that overwrites existing codebase docs.
|
|
20
|
+
|
|
21
|
+
Can run before or after `/maestro-init` -- works on any codebase with source files. Also serves the previous `spec-map` use case via `--focus <area>` for scoped dimension analysis.
|
|
22
|
+
</purpose>
|
|
23
|
+
|
|
24
|
+
<required_reading>
|
|
25
|
+
@~/.maestro/workflows/codebase-rebuild.md
|
|
26
|
+
</required_reading>
|
|
27
|
+
|
|
28
|
+
<context>
|
|
29
|
+
$ARGUMENTS -- optional flags.
|
|
30
|
+
|
|
31
|
+
**Flags:**
|
|
32
|
+
- `--focus <area>` -- Scope mapper agents to a single domain (e.g., `auth`, `api`, `database`). When omitted, all 4 mappers run on the full codebase.
|
|
33
|
+
- `--force` -- Skip confirmation prompt and proceed directly
|
|
34
|
+
- `--skip-commit` -- Do not auto-commit after rebuild
|
|
35
|
+
|
|
36
|
+
**Mapper agent assignments (when `--focus` omitted):**
|
|
37
|
+
| Agent | Focus | Output file |
|
|
38
|
+
|-------|-------|-------------|
|
|
39
|
+
| Mapper 1 | **Tech stack** -- languages, frameworks, dependencies, build system | `tech-stack.md` |
|
|
40
|
+
| Mapper 2 | **Architecture** -- layers, module boundaries, data flow, entry points | `architecture.md` |
|
|
41
|
+
| Mapper 3 | **Features** -- capabilities, API surface, user-facing functionality | `features.md` |
|
|
42
|
+
| Mapper 4 | **Cross-cutting concerns** -- error handling, logging, auth, config, testing | `concerns.md` |
|
|
43
|
+
|
|
44
|
+
**State files:**
|
|
45
|
+
- `.workflow/` -- must be initialized (project.md, state.json exist)
|
|
46
|
+
- `.workflow/codebase/` -- target directory (will be cleared and rebuilt)
|
|
47
|
+
- `.workflow/codebase/doc-index.json` -- generated documentation index
|
|
48
|
+
</context>
|
|
49
|
+
|
|
50
|
+
<execution>
|
|
51
|
+
Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
|
|
52
|
+
|
|
53
|
+
**When `--focus <area>` is set:** pass the area string to each mapper agent as scoping context; only regenerate the docs relevant to that scope (leave others untouched unless missing).
|
|
54
|
+
|
|
55
|
+
**Next-step routing on completion:**
|
|
56
|
+
- View updated project state → `/manage-status`
|
|
57
|
+
- Incremental updates later → `/manage-codebase-refresh`
|
|
58
|
+
</execution>
|
|
59
|
+
|
|
60
|
+
<error_codes>
|
|
61
|
+
| Code | Severity | Condition | Recovery |
|
|
62
|
+
|------|----------|-----------|----------|
|
|
63
|
+
| E001 | error | .workflow/ not initialized | Run maestro-init first to create .workflow/ |
|
|
64
|
+
| W001 | warning | A mapper agent failed (partial results) | Retry failed mapper or accept partial results |
|
|
65
|
+
| W002 | warning | `.workflow/codebase/` already exists -- user prompted for rebuild/skip | check_existing |
|
|
66
|
+
</error_codes>
|
|
67
|
+
|
|
68
|
+
<success_criteria>
|
|
69
|
+
- [ ] User confirmed rebuild (or --force used)
|
|
70
|
+
- [ ] .workflow/codebase/ cleared and rebuilt from scratch (or scoped subset when --focus set)
|
|
71
|
+
- [ ] All 4 mapper agents spawned (failures logged as W001)
|
|
72
|
+
- [ ] doc-index.json generated and valid
|
|
73
|
+
- [ ] All documentation files regenerated
|
|
74
|
+
- [ ] state.json updated with rebuild timestamp
|
|
75
|
+
- [ ] project.md Tech Stack section updated if changes detected
|
|
76
|
+
- [ ] Next step routing: `/manage-status` or `/manage-codebase-refresh` for incremental updates later
|
|
77
|
+
</success_criteria>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: manage-codebase-refresh
|
|
3
|
+
description: Refresh codebase docs from recent changes
|
|
4
|
+
argument-hint: [--since <date>] [--deep]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- replace_file_content
|
|
12
|
+
- run_command
|
|
13
|
+
- send_message
|
|
14
|
+
- view_file
|
|
15
|
+
- write_to_file
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<purpose>
|
|
19
|
+
Incrementally refresh .workflow/codebase/ documentation based on changes since the last rebuild or refresh. Detects which files have changed (via git diff), identifies which codebase docs are affected, selectively re-runs mapper agents on those areas only, and updates timestamps. Much faster than a full rebuild for ongoing maintenance.
|
|
20
|
+
</purpose>
|
|
21
|
+
|
|
22
|
+
<required_reading>
|
|
23
|
+
@~/.maestro/workflows/codebase-refresh.md
|
|
24
|
+
</required_reading>
|
|
25
|
+
|
|
26
|
+
<context>
|
|
27
|
+
$ARGUMENTS -- optional flags.
|
|
28
|
+
|
|
29
|
+
**Flags:**
|
|
30
|
+
- `--since <date>` -- Override change detection window (ISO date or relative like "3d")
|
|
31
|
+
- `--deep` -- Force deeper re-scan even for files with minor changes
|
|
32
|
+
|
|
33
|
+
**State files:**
|
|
34
|
+
- `.workflow/` -- must be initialized
|
|
35
|
+
- `.workflow/codebase/` -- must contain existing docs (from prior rebuild)
|
|
36
|
+
- `.workflow/codebase/doc-index.json` -- documentation index with timestamps
|
|
37
|
+
- `.workflow/state.json` -- contains `codebase_last_rebuilt` timestamp
|
|
38
|
+
</context>
|
|
39
|
+
|
|
40
|
+
<execution>
|
|
41
|
+
Follow '~/.maestro/workflows/codebase-refresh.md' completely.
|
|
42
|
+
</execution>
|
|
43
|
+
|
|
44
|
+
<error_codes>
|
|
45
|
+
| Code | Meaning |
|
|
46
|
+
|------|----------------------------------------------------------|
|
|
47
|
+
| E001 | .workflow/ not initialized |
|
|
48
|
+
| E002 | No codebase/ docs exist, use codebase-rebuild instead |
|
|
49
|
+
| W001 | No changes detected since last refresh |
|
|
50
|
+
</error_codes>
|
|
51
|
+
|
|
52
|
+
<success_criteria>
|
|
53
|
+
- [ ] Changed files detected via git diff since last refresh
|
|
54
|
+
- [ ] Affected documentation entries identified from doc-index.json
|
|
55
|
+
- [ ] Only affected docs refreshed (selective mapper re-run)
|
|
56
|
+
- [ ] doc-index.json timestamps updated per affected entry
|
|
57
|
+
- [ ] state.json updated with codebase_last_refreshed timestamp
|
|
58
|
+
- [ ] Next step routing: `/manage-status` or `/spec-load` to use updated docs
|
|
59
|
+
</success_criteria>
|