maestro-flow 0.4.11 → 0.4.13
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/.agents/agents/cli-explore-agent.md +1 -3
- package/.agents/agents/cross-role-reviewer.md +173 -0
- package/.agents/agents/role-design-author.md +220 -0
- package/.agents/agents/ui-design-agent.md +1 -18
- package/.agents/agents/workflow-analyzer.md +1 -1
- package/.agents/agents/workflow-external-researcher.md +1 -1
- package/.agents/skills/learn-decompose/SKILL.md +6 -6
- package/.agents/skills/learn-follow/SKILL.md +4 -4
- package/.agents/skills/learn-investigate/SKILL.md +6 -6
- package/.agents/skills/learn-retro/SKILL.md +7 -7
- package/.agents/skills/learn-second-opinion/SKILL.md +4 -4
- package/.agents/skills/maestro/SKILL.md +61 -27
- package/.agents/skills/maestro-amend/SKILL.md +1 -0
- package/.agents/skills/maestro-analyze/SKILL.md +37 -4
- package/.agents/skills/maestro-blueprint/SKILL.md +133 -0
- package/.agents/skills/maestro-brainstorm/SKILL.md +120 -103
- package/.agents/skills/maestro-fork/SKILL.md +1 -1
- package/.agents/skills/maestro-guard/SKILL.md +3 -2
- package/.agents/skills/maestro-help/SKILL.md +48 -14
- package/.agents/skills/maestro-help/index/catalog.json +29 -11
- package/.agents/skills/maestro-help/phases/01-parse-intent.md +1 -1
- package/.agents/skills/maestro-help/phases/02-search-present.md +6 -4
- package/.agents/skills/maestro-help/phases/03-workflow-guide.md +60 -33
- package/.agents/skills/maestro-impeccable/SKILL.md +13 -11
- package/.agents/skills/maestro-init/SKILL.md +3 -3
- package/.agents/skills/maestro-milestone-audit/SKILL.md +5 -3
- package/.agents/skills/maestro-milestone-complete/SKILL.md +7 -5
- package/.agents/skills/maestro-milestone-release/SKILL.md +1 -1
- package/.agents/skills/maestro-plan/SKILL.md +16 -4
- package/.agents/skills/maestro-ralph/SKILL.md +297 -226
- package/.agents/skills/maestro-ralph-execute/SKILL.md +82 -67
- package/.agents/skills/maestro-roadmap/SKILL.md +43 -81
- package/.agents/skills/manage-harvest/SKILL.md +1 -0
- package/.agents/skills/manage-issue-discover/SKILL.md +1 -1
- package/.agents/skills/manage-knowhow/SKILL.md +1 -1
- package/.agents/skills/manage-learn/SKILL.md +4 -4
- package/.agents/skills/quality-auto-test/SKILL.md +6 -6
- package/.agents/skills/quality-refactor/SKILL.md +1 -1
- package/.agents/skills/quality-retrospective/SKILL.md +2 -2
- package/.agents/skills/security-audit/SKILL.md +24 -0
- package/.agents/skills/spec-remove/SKILL.md +6 -2
- package/.agents/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
- package/.agents/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
- package/.agents/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
- package/.agents/skills/team-lifecycle-v4/templates/architecture.md +3 -3
- package/.agents/skills/team-lifecycle-v4/templates/epics.md +2 -2
- package/.agents/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
- package/.agents/skills/team-lifecycle-v4/templates/requirements.md +2 -2
- package/.agy/agents/cli-explore-agent.md +1 -3
- package/.agy/agents/cross-role-reviewer.md +170 -0
- package/.agy/agents/role-design-author.md +217 -0
- package/.agy/agents/ui-design-agent.md +1 -18
- package/.agy/agents/workflow-analyzer.md +1 -1
- package/.agy/agents/workflow-external-researcher.md +1 -1
- package/.agy/skills/learn-decompose/SKILL.md +6 -6
- package/.agy/skills/learn-follow/SKILL.md +4 -4
- package/.agy/skills/learn-investigate/SKILL.md +6 -6
- package/.agy/skills/learn-retro/SKILL.md +7 -7
- package/.agy/skills/learn-second-opinion/SKILL.md +4 -4
- package/.agy/skills/maestro/SKILL.md +61 -27
- package/.agy/skills/maestro-amend/SKILL.md +1 -0
- package/.agy/skills/maestro-analyze/SKILL.md +37 -4
- package/.agy/skills/maestro-blueprint/SKILL.md +133 -0
- package/.agy/skills/maestro-brainstorm/SKILL.md +120 -103
- package/.agy/skills/maestro-fork/SKILL.md +1 -1
- package/.agy/skills/maestro-guard/SKILL.md +3 -2
- package/.agy/skills/maestro-help/SKILL.md +48 -14
- package/.agy/skills/maestro-help/index/catalog.json +29 -11
- package/.agy/skills/maestro-help/phases/01-parse-intent.md +1 -1
- package/.agy/skills/maestro-help/phases/02-search-present.md +6 -4
- package/.agy/skills/maestro-help/phases/03-workflow-guide.md +60 -33
- package/.agy/skills/maestro-impeccable/SKILL.md +13 -11
- package/.agy/skills/maestro-init/SKILL.md +3 -3
- package/.agy/skills/maestro-milestone-audit/SKILL.md +5 -3
- package/.agy/skills/maestro-milestone-complete/SKILL.md +7 -5
- package/.agy/skills/maestro-milestone-release/SKILL.md +1 -1
- package/.agy/skills/maestro-plan/SKILL.md +16 -4
- package/.agy/skills/maestro-ralph/SKILL.md +297 -226
- package/.agy/skills/maestro-ralph-execute/SKILL.md +82 -67
- package/.agy/skills/maestro-roadmap/SKILL.md +43 -81
- package/.agy/skills/manage-harvest/SKILL.md +1 -0
- package/.agy/skills/manage-issue-discover/SKILL.md +1 -1
- package/.agy/skills/manage-knowhow/SKILL.md +1 -1
- package/.agy/skills/manage-learn/SKILL.md +4 -4
- package/.agy/skills/quality-auto-test/SKILL.md +6 -6
- package/.agy/skills/quality-refactor/SKILL.md +1 -1
- package/.agy/skills/quality-retrospective/SKILL.md +2 -2
- package/.agy/skills/security-audit/SKILL.md +24 -0
- package/.agy/skills/spec-remove/SKILL.md +6 -2
- package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
- package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
- package/.agy/skills/team-lifecycle-v4/templates/architecture.md +3 -3
- package/.agy/skills/team-lifecycle-v4/templates/epics.md +2 -2
- package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
- package/.agy/skills/team-lifecycle-v4/templates/requirements.md +2 -2
- package/.claude/agents/cli-explore-agent.md +1 -3
- package/.claude/agents/cross-role-reviewer.md +171 -0
- package/.claude/agents/role-design-author.md +218 -0
- package/.claude/agents/ui-design-agent.md +1 -18
- package/.claude/agents/workflow-analyzer.md +1 -1
- package/.claude/agents/workflow-external-researcher.md +1 -1
- package/.claude/commands/learn-decompose.md +6 -6
- package/.claude/commands/learn-follow.md +4 -4
- package/.claude/commands/learn-investigate.md +6 -6
- package/.claude/commands/learn-retro.md +7 -7
- package/.claude/commands/learn-second-opinion.md +4 -4
- package/.claude/commands/maestro-amend.md +1 -0
- package/.claude/commands/maestro-analyze.md +37 -4
- package/.claude/commands/maestro-blueprint.md +131 -0
- package/.claude/commands/maestro-brainstorm.md +133 -116
- package/.claude/commands/maestro-fork.md +1 -1
- package/.claude/commands/maestro-guard.md +3 -2
- package/.claude/commands/maestro-impeccable.md +13 -11
- package/.claude/commands/maestro-init.md +3 -3
- package/.claude/commands/maestro-milestone-audit.md +5 -3
- package/.claude/commands/maestro-milestone-complete.md +7 -5
- package/.claude/commands/maestro-milestone-release.md +1 -1
- package/.claude/commands/maestro-plan.md +16 -4
- package/.claude/commands/maestro-ralph-execute.md +82 -67
- package/.claude/commands/maestro-ralph.md +297 -226
- package/.claude/commands/maestro-roadmap.md +43 -81
- package/.claude/commands/maestro.md +61 -27
- package/.claude/commands/manage-harvest.md +1 -0
- package/.claude/commands/manage-issue-discover.md +1 -1
- package/.claude/commands/manage-knowhow.md +1 -1
- package/.claude/commands/manage-learn.md +4 -4
- package/.claude/commands/quality-auto-test.md +6 -6
- package/.claude/commands/quality-refactor.md +1 -1
- package/.claude/commands/quality-retrospective.md +2 -2
- package/.claude/commands/security-audit.md +24 -0
- package/.claude/commands/spec-remove.md +6 -2
- package/.claude/skills/maestro-help/SKILL.md +48 -14
- package/.claude/skills/maestro-help/index/catalog.json +29 -11
- package/.claude/skills/maestro-help/phases/01-parse-intent.md +1 -1
- package/.claude/skills/maestro-help/phases/02-search-present.md +6 -4
- package/.claude/skills/maestro-help/phases/03-workflow-guide.md +60 -33
- package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +1 -1
- package/.claude/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
- package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
- package/.claude/skills/team-lifecycle-v4/templates/architecture.md +3 -3
- package/.claude/skills/team-lifecycle-v4/templates/epics.md +2 -2
- package/.claude/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
- package/.claude/skills/team-lifecycle-v4/templates/requirements.md +2 -2
- package/.codex/skills/learn-decompose/SKILL.md +4 -4
- package/.codex/skills/learn-follow/SKILL.md +3 -3
- package/.codex/skills/learn-investigate/SKILL.md +3 -3
- package/.codex/skills/learn-retro/SKILL.md +3 -3
- package/.codex/skills/learn-second-opinion/SKILL.md +3 -3
- package/.codex/skills/maestro/SKILL.md +75 -38
- package/.codex/skills/maestro-amend/SKILL.md +157 -0
- package/.codex/skills/maestro-analyze/SKILL.md +72 -23
- package/.codex/skills/maestro-blueprint/SKILL.md +123 -0
- package/.codex/skills/maestro-brainstorm/SKILL.md +277 -46
- package/.codex/skills/maestro-composer/SKILL.md +1 -1
- package/.codex/skills/maestro-execute/SKILL.md +13 -4
- package/.codex/skills/maestro-fork/SKILL.md +2 -0
- package/.codex/skills/maestro-guard/SKILL.md +3 -2
- package/.codex/skills/maestro-help/SKILL.md +28 -18
- package/.codex/skills/maestro-help/catalog.json +29 -11
- package/.codex/skills/maestro-impeccable/SKILL.md +13 -11
- package/.codex/skills/maestro-init/SKILL.md +7 -7
- package/.codex/skills/maestro-plan/SKILL.md +27 -9
- package/.codex/skills/maestro-ralph/SKILL.md +740 -601
- package/.codex/skills/maestro-roadmap/SKILL.md +56 -72
- package/.codex/skills/maestro-update/SKILL.md +169 -0
- package/.codex/skills/maestro-verify/SKILL.md +11 -2
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +9 -5
- package/.codex/skills/manage-harvest/SKILL.md +11 -3
- package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
- package/.codex/skills/manage-knowhow/SKILL.md +1 -1
- package/.codex/skills/manage-learn/SKILL.md +3 -3
- package/.codex/skills/quality-refactor/SKILL.md +2 -2
- package/.codex/skills/quality-retrospective/SKILL.md +12 -5
- package/.codex/skills/security-audit/SKILL.md +24 -0
- package/.codex/skills/spec-remove/SKILL.md +8 -2
- package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/templates/architecture.md +3 -3
- package/.codex/skills/team-lifecycle-v4/templates/epics.md +2 -2
- package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +3 -3
- package/.codex/skills/team-lifecycle-v4/templates/requirements.md +2 -2
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +13 -7
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +8 -1
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts +16 -2
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +58 -187
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +16 -16
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/spec-seeds.d.ts +33 -0
- package/dist/src/tools/spec-seeds.d.ts.map +1 -0
- package/dist/src/tools/spec-seeds.js +200 -0
- package/dist/src/tools/spec-seeds.js.map +1 -0
- package/dist/src/tools/spec-writer.d.ts.map +1 -1
- package/dist/src/tools/spec-writer.js +7 -9
- package/dist/src/tools/spec-writer.js.map +1 -1
- package/dist/src/utils/update-notices.js +12 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +1 -1
- package/templates/business-test-report.json +1 -1
- package/templates/index.json +1 -1
- package/templates/roadmap.md +15 -9
- package/templates/state.json +18 -17
- package/workflows/agy-instructions.md +2 -0
- package/workflows/analyze.md +79 -11
- package/workflows/auto-test.md +12 -7
- package/workflows/blueprint.md +431 -0
- package/workflows/brainstorm.md +617 -496
- package/workflows/business-test.md +7 -7
- package/workflows/claude-instructions.md +2 -0
- package/workflows/codebase-rebuild.md +4 -4
- package/workflows/codex-instructions.md +16 -83
- package/workflows/debug.md +1 -1
- package/workflows/harvest.md +184 -10
- package/workflows/impeccable.md +2 -0
- package/workflows/init.md +9 -8
- package/workflows/issue-analyze.md +14 -100
- package/workflows/issue-discover.md +2 -3
- package/workflows/issue-execute.md +1 -1
- package/workflows/issue-gaps-analyze.md +2 -0
- package/workflows/learn.md +1 -1
- package/workflows/maestro-chain-execute.md +10 -228
- package/workflows/maestro.md +2 -1
- package/workflows/milestone-audit.md +12 -4
- package/workflows/milestone-complete.md +14 -9
- package/workflows/milestone-release.md +82 -0
- package/workflows/plan.md +91 -25
- package/workflows/retrospective.md +1 -1
- package/workflows/roadmap-common.md +1 -1
- package/workflows/roadmap.md +14 -4
- package/workflows/spec-generate.md +26 -13
- package/workflows/specs-add.md +6 -1
- package/workflows/specs-load.md +6 -1
- package/workflows/specs-setup.md +6 -1
- package/workflows/sync.md +13 -0
- package/workflows/tools-spec.md +4 -0
- package/workflows/ui-design.md +5 -5
- package/workflows/ui-style.md +1 -1
- package/workflows/wiki-manage.md +2 -0
- package/.agents/agents/conceptual-planning-agent.md +0 -247
- package/.agy/agents/conceptual-planning-agent.md +0 -244
- package/.claude/agents/conceptual-planning-agent.md +0 -245
|
@@ -28,10 +28,10 @@ Generator-Critic loop: max 3 iterations per layer to distinguish test defects fr
|
|
|
28
28
|
**Load spec package:**
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
1. Read ${PHASE_DIR}/index.json -> extract
|
|
32
|
-
2. IF --spec provided: SPEC_DIR = .workflow
|
|
33
|
-
ELSE IF index.json.
|
|
34
|
-
ELSE: try .workflow
|
|
31
|
+
1. Read ${PHASE_DIR}/index.json -> extract blueprint_ref (if present)
|
|
32
|
+
2. IF --spec provided: SPEC_DIR = .workflow/blueprint/{blueprint_ref}/
|
|
33
|
+
ELSE IF index.json.blueprint_ref: SPEC_DIR = .workflow/blueprint/{blueprint_ref}/
|
|
34
|
+
ELSE: try .workflow/blueprint/SPEC-*/ (most recent)
|
|
35
35
|
|
|
36
36
|
3. IF SPEC_DIR found:
|
|
37
37
|
- Read requirements/_index.md (requirement summary + traceability matrix)
|
|
@@ -189,7 +189,7 @@ Write `business-test-plan.json` to `.tests/business/`:
|
|
|
189
189
|
```json
|
|
190
190
|
{
|
|
191
191
|
"phase": "{phase}",
|
|
192
|
-
"
|
|
192
|
+
"blueprint_ref": "{SPEC_DIR name or 'degraded'}",
|
|
193
193
|
"spec_mode": "full|degraded",
|
|
194
194
|
"generated_at": "{ISO timestamp}",
|
|
195
195
|
"layers": {
|
|
@@ -363,7 +363,7 @@ Write `.tests/business/business-test-report.json`:
|
|
|
363
363
|
```json
|
|
364
364
|
{
|
|
365
365
|
"phase": "{phase}",
|
|
366
|
-
"
|
|
366
|
+
"blueprint_ref": "{spec reference}",
|
|
367
367
|
"spec_mode": "full|degraded",
|
|
368
368
|
"completed_at": "{ISO timestamp}",
|
|
369
369
|
"execution_mode": "gen-code|agent",
|
|
@@ -432,7 +432,7 @@ Write `.tests/business/business-test-summary.md`:
|
|
|
432
432
|
```markdown
|
|
433
433
|
---
|
|
434
434
|
phase: {phase}
|
|
435
|
-
|
|
435
|
+
blueprint_ref: {spec reference}
|
|
436
436
|
completed_at: {ISO timestamp}
|
|
437
437
|
verdict: passed|gaps_found
|
|
438
438
|
---
|
|
@@ -21,6 +21,8 @@ Available CLI endpoints are dynamically defined by the config file
|
|
|
21
21
|
|
|
22
22
|
### Search — Query Before Acting
|
|
23
23
|
|
|
24
|
+
**Before planning or implementing any task, search wiki and spec first** — the knowledge base contains reusable methods, tools, and hard-won experience. Load the right knowledge at the right time: search before you plan, load relevant entries before you implement, and revisit when you hit unfamiliar territory mid-task.
|
|
25
|
+
|
|
24
26
|
When tackling unfamiliar domains or cross-cutting concerns, search existing knowledge first:
|
|
25
27
|
- `maestro spec load --category <cat>` — load rules by category (coding/arch/debug/test/review/learning)
|
|
26
28
|
- `maestro spec load --keyword <kw>` — cross-category keyword match
|
|
@@ -72,7 +72,7 @@ Used in Step 2-4 to produce architecture-aware documentation.
|
|
|
72
72
|
|
|
73
73
|
```
|
|
74
74
|
Group components into features by:
|
|
75
|
-
directory proximity, naming patterns, import relationships,
|
|
75
|
+
directory proximity, naming patterns, import relationships, blueprint/ mapping.
|
|
76
76
|
|
|
77
77
|
For each feature group: derive name, collect component IDs, map requirements and phase.
|
|
78
78
|
Build feature entry:
|
|
@@ -91,7 +91,7 @@ Back-fill component.feature_ids with assigned feature IDs.
|
|
|
91
91
|
### Step 4: Map Requirements (if .spec exist)
|
|
92
92
|
|
|
93
93
|
```
|
|
94
|
-
If .workflow
|
|
94
|
+
If .workflow/blueprint/ exist: parse each SPEC-*/requirements/REQ-*.md,
|
|
95
95
|
match to features by keyword analysis. Build requirement entry:
|
|
96
96
|
{
|
|
97
97
|
"id": "REQ-{NNN}",
|
|
@@ -102,13 +102,13 @@ match to features by keyword analysis. Build requirement entry:
|
|
|
102
102
|
"acceptance_criteria": ["{criteria}"]
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
If no
|
|
105
|
+
If no blueprint: requirements = [] (populated later by maestro-blueprint).
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
### Step 5: Record Architecture Decisions (if ADRs exist)
|
|
109
109
|
|
|
110
110
|
```
|
|
111
|
-
If .workflow
|
|
111
|
+
If .workflow/blueprint/*/architecture/ADR-*.md exist: parse each ADR,
|
|
112
112
|
map to components by keyword analysis. Build ADR entry:
|
|
113
113
|
{
|
|
114
114
|
"id": "ADR-{NNN}",
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Codex Code Guidelines
|
|
2
|
+
## Delegate & CLI
|
|
2
3
|
|
|
4
|
+
- **Delegate Usage**: @~/.maestro/workflows/delegate-usage.md
|
|
5
|
+
- **CLI Endpoints Config**: @~/.maestro/cli-tools.json
|
|
6
|
+
|
|
7
|
+
**Strictly follow the cli-tools.json configuration**
|
|
8
|
+
|
|
9
|
+
Available CLI endpoints are dynamically defined by the config file
|
|
3
10
|
|
|
4
11
|
## Code Quality Standards
|
|
5
12
|
|
|
@@ -55,96 +62,22 @@
|
|
|
55
62
|
- Treat all pre-existing uncommitted changes as intentional work-in-progress by other tools
|
|
56
63
|
|
|
57
64
|
|
|
58
|
-
## System
|
|
59
|
-
|
|
60
|
-
**Direct Binary Calls**: Always call binaries directly in `functions.shell`, set `workdir`, avoid shell wrappers (`bash -lc`, `cmd /c`, etc.)
|
|
61
|
-
|
|
62
|
-
**Text Editing Priority**:
|
|
63
|
-
1. Use `apply_patch` tool for all routine text edits
|
|
64
|
-
2. Fall back to `sed` for single-line substitutions if unavailable
|
|
65
|
-
3. Avoid Python editing scripts unless both fail
|
|
66
|
-
|
|
67
|
-
**apply_patch invocation**:
|
|
68
|
-
```json
|
|
69
|
-
{
|
|
70
|
-
"command": ["apply_patch", "*** Begin Patch\n*** Update File: path/to/file\n@@\n- old\n+ new\n*** End Patch\n"],
|
|
71
|
-
"workdir": "<workdir>",
|
|
72
|
-
"justification": "Brief reason"
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Windows UTF-8 Encoding** (before commands):
|
|
77
|
-
```powershell
|
|
78
|
-
[Console]::InputEncoding = [Text.UTF8Encoding]::new($false)
|
|
79
|
-
[Console]::OutputEncoding = [Text.UTF8Encoding]::new($false)
|
|
80
|
-
chcp 65001 > $null
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Context Acquisition (MCP Tools Priority)
|
|
84
|
-
|
|
85
|
-
**For task context gathering and analysis, ALWAYS prefer MCP tools**:
|
|
65
|
+
## Knowledge System
|
|
86
66
|
|
|
87
|
-
|
|
88
|
-
- Semantic search with real-time codebase index
|
|
89
|
-
- Use for: finding implementations, understanding architecture, locating patterns
|
|
90
|
-
- Example: `mcp__ace-tool__search_context(project_root_path="/path", query="authentication logic")`
|
|
67
|
+
### Search — Query Before Acting
|
|
91
68
|
|
|
92
|
-
|
|
93
|
-
- Use `smart_search(query="...")` for keyword/regex search
|
|
94
|
-
- Use `smart_search(action="find_files", pattern="*.ts")` for file discovery
|
|
95
|
-
- Supports modes: `auto`, `hybrid`, `exact`, `ripgrep`
|
|
69
|
+
**Before planning or implementing any task, search wiki and spec first** — the knowledge base contains reusable methods, tools, and hard-won experience. Load the right knowledge at the right time: search before you plan, load relevant entries before you implement, and revisit when you hit unfamiliar territory mid-task.
|
|
96
70
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
71
|
+
- `maestro spec load --category <cat>` — load rules by category (coding/arch/debug/test/review/learning)
|
|
72
|
+
- `maestro spec load --keyword <kw>` — cross-category keyword match
|
|
73
|
+
- `maestro wiki search "<query>"` — full-text search across all knowhow
|
|
74
|
+
- `maestro wiki list --category <cat>` → `maestro wiki load <id>` — browse then load full detail
|
|
100
75
|
|
|
101
|
-
|
|
102
|
-
```
|
|
103
|
-
ACE search_context (semantic) → smart_search (structured) → read_file (batch read) → shell commands (fallback)
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**NEVER** use shell commands (`cat`, `find`, `grep`) when MCP tools are available.
|
|
107
|
-
|
|
108
|
-
## Workflow Session Awareness
|
|
109
|
-
|
|
110
|
-
| Workflow | Directory | Summary File |
|
|
111
|
-
|----------|-----------|-------------|
|
|
112
|
-
| `workflow-plan` | `.workflow/active/WFS-*/` | `workflow-session.json` |
|
|
113
|
-
| `workflow-lite-plan` | `.workflow/.lite-plan/{date}-{slug}/` | `plan.json` |
|
|
114
|
-
| `analyze-with-file` | `.workflow/.analysis/ANL-*/` | `conclusions.json` |
|
|
115
|
-
| `multi-cli-plan` | `.workflow/.multi-cli-plan/*/` | `session-state.json` |
|
|
116
|
-
| `lite-fix` | `.workflow/.lite-fix/*/` | `fix-plan.json` |
|
|
117
|
-
| Other | `.workflow/.debug/`, `.workflow/.scratchpad/`, `.workflow/archives/` | — |
|
|
118
|
-
|
|
119
|
-
Before starting work, scan recent sessions (7 days) to avoid conflicts and reuse prior work:
|
|
120
|
-
- Overlapping file scope → warn, suggest referencing prior session
|
|
121
|
-
- Complementary findings → feed into current task context
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
## Knowledge Capture
|
|
76
|
+
### Knowledge Capture
|
|
125
77
|
|
|
126
78
|
- **Spec writes** → always `<spec-entry>` closed-tag format with `category`, `keywords`, `date`, `source`. Never raw Markdown. Route through `spec-add` when possible.
|
|
127
79
|
- **Capture signal** → when execution surfaces non-obvious knowledge (plan deviation, retry pattern, root cause, constraint violation), ask user once whether to persist it. Match category to content: decisions→`arch`, pitfalls→`debug`/`learning`, patterns→`coding`, rules→`quality`.
|
|
128
80
|
- **Promotion** → at milestone close, scan learnings for repeated keywords (≥2 entries) and offer to graduate them into formal conventions.
|
|
129
81
|
- **Traceability** → every entry needs a source anchor: `file:line`, `INS-{id}`, commit, or phase path.
|
|
130
82
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
**Before**:
|
|
134
|
-
- [ ] Understand PURPOSE and TASK clearly
|
|
135
|
-
- [ ] Use ACE search_context first, fallback to smart_search for discovery
|
|
136
|
-
- [ ] Use read_file to batch read context files, find 3+ patterns
|
|
137
|
-
- [ ] Check RULES templates and constraints
|
|
138
|
-
|
|
139
|
-
**During**:
|
|
140
|
-
- [ ] Follow existing patterns exactly
|
|
141
|
-
- [ ] Write tests alongside code
|
|
142
|
-
- [ ] Run tests after every change
|
|
143
|
-
- [ ] Commit working code incrementally
|
|
144
|
-
|
|
145
|
-
**After**:
|
|
146
|
-
- [ ] All tests pass
|
|
147
|
-
- [ ] Coverage meets target
|
|
148
|
-
- [ ] Build succeeds
|
|
149
|
-
- [ ] All EXPECTED deliverables met
|
|
150
|
-
- [ ] Non-obvious knowledge surfaced? → offer `spec-add`
|
|
83
|
+
|
package/workflows/debug.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Debug issues using scientific method with subagent isolation. Supports three modes:
|
|
4
4
|
|
|
5
5
|
1. **Standalone**: User describes issue, gather symptoms via 5 questions
|
|
6
|
-
2. **From UAT**: --from-uat reads uat.md gaps as pre-filled symptoms (skip gathering)
|
|
6
|
+
2. **From UAT**: --from-uat reads uat.md gaps as pre-filled symptoms (skip gathering). Input-only: does not write back to uat.md/test artifacts (test workflow is the sole caller and owns uat.md writes).
|
|
7
7
|
3. **Parallel**: --parallel spawns one debug agent per gap cluster concurrently
|
|
8
8
|
|
|
9
9
|
Output: understanding.md + evidence.ndjson per investigation.
|
package/workflows/harvest.md
CHANGED
|
@@ -9,7 +9,7 @@ Unlike `retrospective.md` which is phase-scoped and post-execution, harvest oper
|
|
|
9
9
|
## Prerequisites
|
|
10
10
|
|
|
11
11
|
- `.workflow/` initialized (`.workflow/state.json` exists)
|
|
12
|
-
- At least one artifact source present (analysis, brainstorm, debug, lite-plan, lite-fix, scratchpad, or active session)
|
|
12
|
+
- At least one artifact source present (analysis, brainstorm, import, debug, lite-plan, lite-fix, scratchpad, or active session)
|
|
13
13
|
- For wiki routing: `maestro wiki` CLI available
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -27,16 +27,21 @@ Unlike `retrospective.md` which is phase-scoped and post-execution, harvest oper
|
|
|
27
27
|
/manage-harvest <target> --to issue → force all findings to issue
|
|
28
28
|
/manage-harvest <target> --to auto → auto-classify routing (default)
|
|
29
29
|
/manage-harvest <target> --dry-run → preview without writing
|
|
30
|
+
/manage-harvest --prune → classify artifacts, graduate to knowhow, archive from state.json
|
|
31
|
+
/manage-harvest --prune --age 14 → only graduate artifacts older than 14 days
|
|
32
|
+
/manage-harvest --prune --dry-run → preview prune plan without modifying state.json
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
| Flag | Effect |
|
|
33
36
|
|------|--------|
|
|
34
37
|
| `--to <target>` | Force routing target: `wiki`, `spec`, `issue`, `auto` (default: auto) |
|
|
35
|
-
| `--source <type>` | Filter by source type: `analysis`, `brainstorm`, `debug`, `lite-plan`, `lite-fix`, `scratchpad`, `session`, `all` |
|
|
38
|
+
| `--source <type>` | Filter by source type: `analysis`, `brainstorm`, `import`, `debug`, `lite-plan`, `lite-fix`, `scratchpad`, `session`, `all` |
|
|
36
39
|
| `--recent N` | Only scan artifacts updated within last N days (default: 30) |
|
|
37
40
|
| `--dry-run` | Preview extracted items without writing to any store |
|
|
38
41
|
| `-y` / `--yes` | Skip confirmation prompts, accept all routing |
|
|
39
42
|
| `--min-confidence N` | Minimum extraction confidence 0.0-1.0 (default: 0.5) |
|
|
43
|
+
| `--prune` | State hygiene mode: classify artifacts, graduate harvested ones to knowhow, archive from state.json, prune accumulated_context. **Note:** `harvest --prune` *promotes* artifacts to knowhow (and trims state.json); this differs from `knowhow.md`'s `prune` operation which *deletes* knowhow entries. The two `--prune` flags share a name but operate on different stores in opposite directions. |
|
|
44
|
+
| `--age N` | Graduation age threshold in days (default: 14). Only artifacts older than N days are prune candidates. Used with `--prune` |
|
|
40
45
|
|
|
41
46
|
---
|
|
42
47
|
|
|
@@ -44,10 +49,11 @@ Unlike `retrospective.md` which is phase-scoped and post-execution, harvest oper
|
|
|
44
49
|
|
|
45
50
|
```
|
|
46
51
|
Verify .workflow/ exists (else E001). Parse flags and first non-flag token:
|
|
47
|
-
mode: "scan" (no target) | "session" (ID match) | "path" (explicit path)
|
|
52
|
+
mode: "scan" (no target) | "session" (ID match) | "path" (explicit path) | "prune" (--prune flag)
|
|
48
53
|
Defaults: target_filter=auto, source_filter=all, recent_days=30,
|
|
49
|
-
dry_run=false, auto_yes=false, min_confidence=0.5
|
|
54
|
+
dry_run=false, auto_yes=false, min_confidence=0.5, age_threshold=14
|
|
50
55
|
Invalid --to → E002. Invalid --source → E003.
|
|
56
|
+
If --prune: mode = "prune", jump to Stage 9 (skip Stages 2-8).
|
|
51
57
|
```
|
|
52
58
|
|
|
53
59
|
---
|
|
@@ -61,12 +67,13 @@ Scan `.workflow/` for harvestable artifacts. Each source type has a known struct
|
|
|
61
67
|
| Source Type | Scan Path | Key Files | ID Pattern |
|
|
62
68
|
|-------------|-----------|-----------|------------|
|
|
63
69
|
| `analysis` | `.workflow/.analysis/ANL-*/` | `conclusions.json`, `*.md` | `ANL-*` |
|
|
64
|
-
| `brainstorm` | `.workflow/scratch/brainstorm-*/` | `guidance-specification.md`, `
|
|
70
|
+
| `brainstorm` | `.workflow/scratch/brainstorm-*/` | `guidance-specification.md`, `*/analysis.md`, `design-research.md` | directory name |
|
|
65
71
|
| `lite-plan` | `.workflow/.lite-plan/*/` | `plan.json`, `plan-overview.md` | directory name |
|
|
66
72
|
| `lite-fix` | `.workflow/.lite-fix/*/` | `fix-plan.json` | directory name |
|
|
67
73
|
| `debug` | `.workflow/.debug/*/` | `debug-log.md`, `hypothesis-*.md` | directory name |
|
|
68
74
|
| `scratchpad` | `.workflow/.scratchpad/` | `*.md`, `*.json` | filename |
|
|
69
75
|
| `session` | `.workflow/active/WFS-*/` | `workflow-session.json` | `WFS-*` |
|
|
76
|
+
| `import` | `.workflow/scratch/*-import-*/` | `context-package.json`, `source.*` | directory name |
|
|
70
77
|
| `knowhow` | `.workflow/knowhow/` | `*.md`, `digest-*.md` | filename |
|
|
71
78
|
|
|
72
79
|
Scan each source type (filtered by `--source`). For each matching directory/file within `--recent` window, extract: `source_type`, `id`, `path`, `title` (from JSON or H1), `updated_at`, `summary`, `file_count`.
|
|
@@ -125,11 +132,17 @@ Parse content to identify discrete knowledge items. Each source type has specifi
|
|
|
125
132
|
- `risks[]` → each risk is a fragment
|
|
126
133
|
- Markdown sections with `## ` headings → section-level fragments
|
|
127
134
|
|
|
128
|
-
**Brainstorm (`guidance-specification.md` +
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
135
|
+
**Brainstorm (`guidance-specification.md` + `{role}/analysis.md` + `design-research.md`):**
|
|
136
|
+
- guidance §4-§N Role Decisions tables → each row is a decision fragment
|
|
137
|
+
- guidance §10 Feature Decomposition rows → each feature is a fragment
|
|
138
|
+
- guidance §12 Cross-Role Resolutions table → each resolution is a decision fragment
|
|
139
|
+
- `{role}/analysis.md` §2 Decision Digest tables → decision / interface / position fragments by role
|
|
140
|
+
- `{role}/analysis.md` §3 Cross-Cutting Foundations subsections → architectural / data-model / pitfall fragments by role
|
|
141
|
+
- `{role}/analysis.md` §4 File Index → navigate to sub-files:
|
|
142
|
+
- `{role}/analysis-F-{id}-{slug}.md` → per-feature decision fragments (one file = one fragment)
|
|
143
|
+
- `{role}/findings-{slug}.md` → finding / discovery fragments
|
|
144
|
+
- `{role}/analysis.md` §5 Outstanding TODOs → task fragments
|
|
145
|
+
- `design-research.md` "Extractable Patterns" sections → pattern reference fragments
|
|
133
146
|
|
|
134
147
|
**Lite-plan (`plan.json`):**
|
|
135
148
|
- `tasks[]` → each with rationale → decision fragments
|
|
@@ -141,6 +154,14 @@ Parse content to identify discrete knowledge items. Each source type has specifi
|
|
|
141
154
|
- `fix_strategy` → pattern fragment
|
|
142
155
|
- `verification` → test/validation fragment
|
|
143
156
|
|
|
157
|
+
**Import (`context-package.json` + `source.*`):**
|
|
158
|
+
- `requirements[]` → each requirement is a feature fragment
|
|
159
|
+
- `constraints[]` → each constraint is a decision fragment
|
|
160
|
+
- `non_goals[]` → each non-goal is a scope fragment
|
|
161
|
+
- `insights[]` → each insight is a knowledge fragment
|
|
162
|
+
- `domain.terminology[]` → each term is a terminology fragment
|
|
163
|
+
- `open_questions[]` → each question is a task/investigation fragment
|
|
164
|
+
|
|
144
165
|
**Debug (`debug-log.md`, `hypothesis-*.md`):**
|
|
145
166
|
- Final diagnosis → bug fragment
|
|
146
167
|
- Verified hypothesis → pattern/knowhow fragment
|
|
@@ -174,6 +195,8 @@ fragment = {
|
|
|
174
195
|
|
|
175
196
|
Filter by `--min-confidence`.
|
|
176
197
|
|
|
198
|
+
**Context Package shortcut**: If any artifact has a `context-package.json` (check `state.json.artifacts[].context_package`), harvest can use it as a pre-extracted summary — skip detailed file parsing and directly convert context-package fields to fragments. The per-item `ref` field provides traceability to original sources.
|
|
199
|
+
|
|
177
200
|
---
|
|
178
201
|
|
|
179
202
|
## Stage 4: classify_routing
|
|
@@ -351,3 +374,154 @@ Next:
|
|
|
351
374
|
→ Connect wiki graph: Skill({ skill: "wiki-connect", args: "--fix" })
|
|
352
375
|
→ View specs: Skill({ skill: "spec-load", args: "--role implement" })
|
|
353
376
|
```
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## Stage 9: state_hygiene (--prune)
|
|
381
|
+
|
|
382
|
+
When `--prune` flag is present, skip Stages 2-8 and run state.json hygiene instead. Manages three concerns: **artifact graduation** (harvested → archived via knowhow), **accumulated_context pruning** (remove resolved/stale entries), and **integrity validation**.
|
|
383
|
+
|
|
384
|
+
### 9a. Load state
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
Read .workflow/state.json → { artifacts[], accumulated_context{}, current_milestone, milestones[] }
|
|
388
|
+
Read .workflow/harvest/harvest-log.jsonl → build harvested_map: { [source_id]: { fragment_count, routed_count, last_harvested } }
|
|
389
|
+
Defaults: age_threshold = --age value (default 14 days), dry_run = --dry-run flag
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### 9b. Classify artifacts
|
|
393
|
+
|
|
394
|
+
For each artifact in `artifacts[]`, assign a classification:
|
|
395
|
+
|
|
396
|
+
| Classification | Criteria | Action |
|
|
397
|
+
|---|---|---|
|
|
398
|
+
| `active` | milestone == current_milestone OR age < age_threshold OR referenced by active plan (type=plan, status=completed, linked execute not completed) | **Keep** in artifacts[] |
|
|
399
|
+
| `graduated` | harvested == true AND not active | **Graduate** → knowhow → archive |
|
|
400
|
+
| `stale` | harvested == false AND not active AND age > age_threshold | **Suggest** harvest first |
|
|
401
|
+
| `protected` | type ∈ {plan, execute} AND linked downstream artifact is active | **Keep** regardless of age |
|
|
402
|
+
|
|
403
|
+
Age = days since `completed_at` (or `created_at` if never completed).
|
|
404
|
+
|
|
405
|
+
"Referenced by active plan": artifact X is protected if any plan artifact has `depends_on == X.id` or any execute artifact in same phase is active.
|
|
406
|
+
|
|
407
|
+
### 9c. Classify accumulated_context
|
|
408
|
+
|
|
409
|
+
Scan `accumulated_context` sub-arrays:
|
|
410
|
+
|
|
411
|
+
| Field | Prune Criteria | Keep Criteria |
|
|
412
|
+
|---|---|---|
|
|
413
|
+
| `key_decisions[]` | Entry exists verbatim in `specs/architecture-constraints.md` (deduplicated to spec) | Not yet in specs |
|
|
414
|
+
| `deferred[]` | status ∈ {"resolved", "cancelled", "superseded"} | status ∈ {"open", "deferred"} |
|
|
415
|
+
| `blockers[]` | status == "resolved" | status ∈ {"open", "investigating"} |
|
|
416
|
+
|
|
417
|
+
### 9d. Preview
|
|
418
|
+
|
|
419
|
+
```
|
|
420
|
+
=== STATE HYGIENE PLAN ===
|
|
421
|
+
|
|
422
|
+
Artifacts (23 total):
|
|
423
|
+
active: 8 (keep)
|
|
424
|
+
graduated: 11 (→ knowhow → archive)
|
|
425
|
+
stale: 3 (suggest harvest first)
|
|
426
|
+
protected: 1 (keep)
|
|
427
|
+
|
|
428
|
+
Accumulated Context:
|
|
429
|
+
key_decisions: 12 total → 4 prunable (already in specs)
|
|
430
|
+
deferred: 5 total → 2 prunable (resolved)
|
|
431
|
+
blockers: 3 total → 1 prunable (resolved)
|
|
432
|
+
|
|
433
|
+
Stale artifacts (not yet harvested):
|
|
434
|
+
ANL-003 analysis 2026-03-15 "Security audit P2"
|
|
435
|
+
BRN-002 brainstorm 2026-03-10 "Cache strategy"
|
|
436
|
+
WFS-005 session 2026-03-08 "Feature toggle impl"
|
|
437
|
+
→ Run: /manage-harvest ANL-003 BRN-002 WFS-005 (harvest before graduating)
|
|
438
|
+
|
|
439
|
+
Estimated state.json reduction: 23 → 9 artifacts, 20 → 13 context entries
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
`--dry-run` → display and exit. Otherwise (unless `-y`), AskUserQuestion:
|
|
443
|
+
- "Proceed" — apply all
|
|
444
|
+
- "Graduate only" — archive graduated artifacts, skip accumulated_context prune
|
|
445
|
+
- "Harvest stale first" — run harvest on stale artifacts, then re-classify
|
|
446
|
+
- "Abort"
|
|
447
|
+
|
|
448
|
+
### 9e. Graduate to knowhow
|
|
449
|
+
|
|
450
|
+
For each `graduated` artifact:
|
|
451
|
+
|
|
452
|
+
1. **Build compact summary** from harvest-log entries:
|
|
453
|
+
- Fragment count, routing breakdown (N wiki, N spec, N issue)
|
|
454
|
+
- Top 3 fragment titles as representative items
|
|
455
|
+
- Original path for disk reference
|
|
456
|
+
|
|
457
|
+
2. **Create knowhow entry**:
|
|
458
|
+
```bash
|
|
459
|
+
maestro wiki create --type knowhow \
|
|
460
|
+
--slug "graduated-{type}-{short_id}" \
|
|
461
|
+
--title "Graduated: {type} {id}" \
|
|
462
|
+
--tags "graduated,{type},{milestone}" \
|
|
463
|
+
--body "{compact_summary}"
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
3. **Archive in state.json**: Move from `artifacts[]` to `artifact_archive[]`:
|
|
467
|
+
```json
|
|
468
|
+
{
|
|
469
|
+
"id": "ANL-001",
|
|
470
|
+
"type": "analyze",
|
|
471
|
+
"milestone": "M1",
|
|
472
|
+
"path": "scratch/20260315-analyze-P2-security",
|
|
473
|
+
"graduated_at": "ISO-8601",
|
|
474
|
+
"knowhow_ref": "graduated-analyze-ANL-001",
|
|
475
|
+
"summary": "Security audit P2 — 8 fragments → 3 wiki, 2 spec, 3 issue"
|
|
476
|
+
}
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
4. **Files on disk**: NOT deleted. The `.workflow/{path}/` directory remains for reference. Only the state.json entry moves.
|
|
480
|
+
|
|
481
|
+
### 9f. Prune accumulated_context
|
|
482
|
+
|
|
483
|
+
For each prunable entry identified in 9c:
|
|
484
|
+
- `key_decisions[]`: remove entry, log `[PRUNE] key_decision: "{text}" (deduplicated to spec)`
|
|
485
|
+
- `deferred[]`: remove entry, log `[PRUNE] deferred: "{title}" (status: {status})`
|
|
486
|
+
- `blockers[]`: remove entry, log `[PRUNE] blocker: "{title}" (resolved)`
|
|
487
|
+
|
|
488
|
+
### 9g. Apply
|
|
489
|
+
|
|
490
|
+
1. **Backup**: Copy `state.json` → `state.json.backup-prune-{timestamp}`
|
|
491
|
+
2. **Write**: Updated state.json with:
|
|
492
|
+
- `artifacts[]` = active + protected entries only
|
|
493
|
+
- `artifact_archive[]` = existing archive + newly graduated
|
|
494
|
+
- `accumulated_context` = pruned version
|
|
495
|
+
- `last_pruned`: ISO-8601 timestamp
|
|
496
|
+
3. **Validate**: Re-read and confirm artifact count matches expected
|
|
497
|
+
|
|
498
|
+
### 9h. Report
|
|
499
|
+
|
|
500
|
+
Append prune results to harvest report:
|
|
501
|
+
|
|
502
|
+
```
|
|
503
|
+
=== PRUNE COMPLETE ===
|
|
504
|
+
|
|
505
|
+
Graduated: 11 artifacts → knowhow
|
|
506
|
+
Archived: 11 entries moved to artifact_archive[]
|
|
507
|
+
Pruned: 4 key_decisions + 2 deferred + 1 blocker = 7 context entries
|
|
508
|
+
|
|
509
|
+
State reduction: 23 → 9 artifacts, 20 → 13 context entries
|
|
510
|
+
Backup: .workflow/state.json.backup-prune-20260521T143022
|
|
511
|
+
|
|
512
|
+
Stale (not harvested, action needed):
|
|
513
|
+
→ /manage-harvest ANL-003 BRN-002 WFS-005
|
|
514
|
+
|
|
515
|
+
Next:
|
|
516
|
+
→ Review graduated knowhow: maestro wiki list --type knowhow --tags graduated
|
|
517
|
+
→ Re-run prune after harvesting stale: /manage-harvest --prune
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Safety invariants
|
|
521
|
+
|
|
522
|
+
1. **Never prune current milestone artifacts** — active classification takes precedence
|
|
523
|
+
2. **Never delete files on disk** — only state.json entries move; files remain for reference/audit
|
|
524
|
+
3. **Backup before write** — always create `state.json.backup-prune-{timestamp}`
|
|
525
|
+
4. **Stale before graduate** — stale artifacts are flagged, not silently archived (knowledge would be lost)
|
|
526
|
+
5. **Spec dedup is conservative** — key_decision pruned only if verbatim match found in specs
|
|
527
|
+
6. **Idempotent** — re-running `--prune` with no changes produces empty plan
|
package/workflows/impeccable.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Impeccable Harvest Workflow
|
|
2
2
|
|
|
3
|
+
> **Note**: Post-harvest hook, distinct from `/maestro-impeccable` command. This file is the harvest workflow invoked AFTER an impeccable run; it is not the impeccable command entry itself (see `chainMap['impeccable_*']` in `maestro.md`).
|
|
4
|
+
|
|
3
5
|
Post-execution knowledge capture for maestro-impeccable commands. Extracts design decisions and persists to `.workflow/knowhow/` + `specs/`.
|
|
4
6
|
|
|
5
7
|
---
|
package/workflows/init.md
CHANGED
|
@@ -42,13 +42,14 @@ state.json exists → Path C (existing) | source files exist → Path B (brownfi
|
|
|
42
42
|
- "Keep exploring" → continue questioning
|
|
43
43
|
|
|
44
44
|
If `--auto` flag: skip interactive questioning, extract from @ referenced document.
|
|
45
|
-
If `--from-brainstorm
|
|
46
|
-
- Locate
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
45
|
+
If `--from <source>` (alias: `--from-brainstorm`):
|
|
46
|
+
- Locate source directory (`.workflow/scratch/brainstorm-*/`, `.workflow/scratch/*-import-*/`, etc.)
|
|
47
|
+
- Load `context-package.json` (preferred) or fall back to `guidance-specification.md`:
|
|
48
|
+
- `domain` (name, description, problem_statement) → project vision + core value
|
|
49
|
+
- `requirements[]` → project goals (Active requirements)
|
|
50
|
+
- `constraints[locked]` → key decisions
|
|
51
|
+
- `non_goals[]` → constraints + Out of Scope requirements
|
|
52
|
+
- `domain.terminology[]` → project glossary context
|
|
52
53
|
- Skip interactive questioning (context already gathered)
|
|
53
54
|
|
|
54
55
|
2. **Workflow Preferences** -- Configure project workflow settings:
|
|
@@ -86,7 +87,7 @@ state.json exists → Path C (existing) | source files exist → Path B (brownfi
|
|
|
86
87
|
- "Skip mapping" → proceed
|
|
87
88
|
4. Run Workflow Preferences (same as Path A step 2) → `.workflow/config.json`
|
|
88
89
|
5. Ask user for project vision, goals, constraints (same deep questioning as Path A step 1)
|
|
89
|
-
- If `--from
|
|
90
|
+
- If `--from <source>` (alias: `--from-brainstorm`): load context-package.json (skip questioning)
|
|
90
91
|
- For brownfield: infer Validated requirements from existing code (what does codebase already do?)
|
|
91
92
|
6. Create `.workflow/project.md` (include inferred Validated requirements + new Active requirements)
|
|
92
93
|
|
|
@@ -3,109 +3,23 @@
|
|
|
3
3
|
> **DEPRECATED**: Superseded by `issue-gaps-analyze.md` which adds batch support and context.md output.
|
|
4
4
|
> Use `maestro-analyze --gaps [ISS-ID]` instead.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This workflow's executable steps have been removed to prevent divergent implementations.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Migration
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
| Old usage | New usage |
|
|
11
|
+
|-----------|-----------|
|
|
12
|
+
| `manage-issue-analyze ISS-ID` | `/maestro-analyze --gaps ISS-ID` |
|
|
13
|
+
| `manage-issue-analyze` (batch) | `/maestro-analyze --gaps` |
|
|
14
|
+
| `manage-issue-plan ISS-ID` (follow-up) | `/maestro-plan --gaps ISS-ID` |
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
## See Also
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
- `issue-gaps-analyze.md` — current implementation (single + batch, classification, parallel exploration, context.md)
|
|
19
|
+
- `issue-gaps-analyze.codex.md` — codex variant using `spawn_agents_on_csv` waves
|
|
20
|
+
- `issue-execute.md` — downstream execution after planning
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
Extract ISS-ID (required, pattern ISS-\d{8}-\d{3}).
|
|
19
|
-
Flags: --tool gemini|qwen (default: gemini), --depth standard|deep (default: standard)
|
|
20
|
-
```
|
|
22
|
+
## Notes
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
### Step 2: Load Issue and Validate
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
Load ISS-ID from .workflow/issues/issues.jsonl → fatal if file missing or ID not found.
|
|
28
|
-
Status check: open/registered → proceed; other → warn but continue (non-destructive).
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
### Step 3: Gather Codebase Context
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
Extract keywords from issue title, description, location, affected_components.
|
|
37
|
-
|
|
38
|
-
Standard depth: grep keywords in source files → top 20 paths, read 10 lines around
|
|
39
|
-
top 5 matches.
|
|
40
|
-
Deep depth: standard grep + semantic Agent search (error handling, data flow, deps),
|
|
41
|
-
merge results.
|
|
42
|
-
|
|
43
|
-
Build CODEBASE_CONTEXT: related files, key snippets (max 50 lines), dependency chain.
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
### Step 4: Run CLI Analysis
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
Delegate root cause analysis with issue details + CODEBASE_CONTEXT:
|
|
52
|
-
|
|
53
|
-
maestro delegate "Root cause analysis for {ISS-ID}: {ISSUE.title}
|
|
54
|
-
ISSUE: title, description, severity, location, fix_direction
|
|
55
|
-
CODEBASE CONTEXT: {CODEBASE_CONTEXT}
|
|
56
|
-
TASK: Identify root cause (file:line) → assess impact → list related files → rate confidence → suggest fix
|
|
57
|
-
EXPECTED: JSON { root_cause, impact, related_files[], confidence, suggested_approach }
|
|
58
|
-
CONSTRAINTS: Evidence-only, no speculation
|
|
59
|
-
" --to {TOOL} --mode analysis
|
|
60
|
-
|
|
61
|
-
Validate response: all required fields present.
|
|
62
|
-
Parse failure → save raw output to issue feedback for review.
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
### Step 5: Build Analysis Record
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
Construct IssueAnalysis:
|
|
71
|
-
{ root_cause, impact, related_files, confidence, suggested_approach, analyzed_at: NOW_ISO, analyzed_by: TOOL }
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
### Step 6: Update Issue in JSONL
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
Read-modify-write issues.jsonl:
|
|
80
|
-
Set issue.analysis = ANALYSIS, updated_at = NOW_ISO
|
|
81
|
-
Append issue_history: actor "analysis-agent", note "confidence: {confidence}"
|
|
82
|
-
Status unchanged (analysis is metadata enrichment).
|
|
83
|
-
Verify: re-read file, confirm analysis field present.
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
### Step 7: Display Summary and Next Steps
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
Display: root cause, impact, confidence, related files, suggested approach.
|
|
92
|
-
|
|
93
|
-
Next steps:
|
|
94
|
-
- manage-issue-plan {ISS-ID} (generate solution | --tool {TOOL})
|
|
95
|
-
- manage-issue status {ISS-ID}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Output
|
|
101
|
-
|
|
102
|
-
- **Updated**: `.workflow/issues/issues.jsonl` -- issue record enriched with `analysis` field
|
|
103
|
-
- **Analysis fields**: root_cause, impact, related_files, confidence, suggested_approach, analyzed_at, analyzed_by
|
|
104
|
-
|
|
105
|
-
## Quality Criteria
|
|
106
|
-
|
|
107
|
-
- Analysis grounded in actual codebase evidence (file:line references)
|
|
108
|
-
- JSON result validated before writing to JSONL
|
|
109
|
-
- Issue status unchanged (analysis is non-destructive enrichment)
|
|
110
|
-
- Read-modify-write pattern preserves other issues in JSONL
|
|
111
|
-
- Next-step routing guides user to solution planning
|
|
24
|
+
- Issue records analyzed by the new pipeline still write to `.workflow/issues/issues.jsonl` with `analysis` field (root_cause, impact, related_files, confidence, suggested_approach, analyzed_at, analyzed_by).
|
|
25
|
+
- Status is unchanged by analysis (non-destructive enrichment).
|
|
@@ -148,7 +148,7 @@ Display summary: session ID, mode, raw/unique counts, per-perspective breakdown,
|
|
|
148
148
|
Next steps:
|
|
149
149
|
- manage-issue list --severity critical
|
|
150
150
|
- manage-issue list
|
|
151
|
-
- manage-issue-discover by-prompt
|
|
151
|
+
- see also: /manage-issue-discover usage docs (by-prompt mode for focused scans)
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
---
|
|
@@ -211,8 +211,7 @@ Display summary: session, prompt, rounds, raw/unique counts, per-dimension + sev
|
|
|
211
211
|
|
|
212
212
|
Next steps:
|
|
213
213
|
- manage-issue list --source discovery
|
|
214
|
-
- manage-issue-discover (full 8-perspective scan)
|
|
215
|
-
- manage-issue-discover by-prompt "..." (explore another area)
|
|
214
|
+
- see also: /manage-issue-discover usage docs (full 8-perspective scan and by-prompt mode)
|
|
216
215
|
```
|
|
217
216
|
|
|
218
217
|
---
|