maestro-flow 0.5.46 → 0.5.47
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/skills/domain-add/SKILL.md +9 -0
- package/.agents/skills/learn-decompose/SKILL.md +12 -0
- package/.agents/skills/learn-follow/SKILL.md +41 -0
- package/.agents/skills/learn-investigate/SKILL.md +14 -0
- package/.agents/skills/learn-second-opinion/SKILL.md +14 -0
- package/.agents/skills/maestro-amend/SKILL.md +11 -0
- package/.agents/skills/maestro-companion/SKILL.md +11 -0
- package/.agents/skills/maestro-composer/SKILL.md +11 -0
- package/.agents/skills/maestro-guard/SKILL.md +25 -0
- package/.agents/skills/maestro-init/SKILL.md +28 -0
- package/.agents/skills/maestro-overlay/SKILL.md +11 -0
- package/.agents/skills/maestro-player/SKILL.md +11 -0
- package/.agents/skills/maestro-quick/SKILL.md +29 -0
- package/.agents/skills/maestro-swarm-workflow/SKILL.md +25 -0
- package/.agents/skills/maestro-tools-execute/SKILL.md +29 -0
- package/.agents/skills/maestro-tools-register/SKILL.md +29 -0
- package/.agents/skills/maestro-ui-codify/SKILL.md +11 -0
- package/.agents/skills/maestro-universal-workflow/SKILL.md +59 -0
- package/.agents/skills/maestro-update/SKILL.md +38 -0
- package/.agents/skills/manage-codebase-rebuild/SKILL.md +29 -0
- package/.agents/skills/manage-drift-realign/SKILL.md +12 -0
- package/.agents/skills/manage-harvest/SKILL.md +30 -6
- package/.agents/skills/manage-issue/SKILL.md +23 -0
- package/.agents/skills/manage-issue-discover/SKILL.md +28 -0
- package/.agents/skills/manage-kg-extractors/SKILL.md +27 -1
- package/.agents/skills/manage-knowhow/SKILL.md +26 -0
- package/.agents/skills/manage-knowhow-capture/SKILL.md +24 -0
- package/.agents/skills/manage-knowledge-audit/SKILL.md +13 -0
- package/.agents/skills/manage-status/SKILL.md +22 -0
- package/.agents/skills/manage-wiki/SKILL.md +28 -0
- package/.agents/skills/odyssey-improve/SKILL.md +50 -0
- package/.agents/skills/odyssey-planex/SKILL.md +46 -0
- package/.agents/skills/odyssey-review-test-fix/SKILL.md +50 -0
- package/.agents/skills/odyssey-ui/SKILL.md +50 -0
- package/.agents/skills/quality-auto-test/SKILL.md +12 -0
- package/.agents/skills/quality-debug/SKILL.md +11 -0
- package/.agents/skills/quality-refactor/SKILL.md +11 -0
- package/.agents/skills/quality-retrospective/SKILL.md +11 -0
- package/.agents/skills/quality-review/SKILL.md +11 -0
- package/.agents/skills/quality-sync/SKILL.md +10 -0
- package/.agents/skills/quality-test/SKILL.md +12 -0
- package/.agents/skills/security-audit/SKILL.md +11 -0
- package/.agents/skills/spec-add/SKILL.md +27 -0
- package/.agents/skills/spec-load/SKILL.md +25 -0
- package/.agents/skills/spec-remove/SKILL.md +26 -0
- package/.agents/skills/spec-setup/SKILL.md +30 -0
- package/.agy/skills/domain-add/SKILL.md +9 -0
- package/.agy/skills/learn-decompose/SKILL.md +12 -0
- package/.agy/skills/learn-follow/SKILL.md +41 -0
- package/.agy/skills/learn-investigate/SKILL.md +14 -0
- package/.agy/skills/learn-second-opinion/SKILL.md +14 -0
- package/.agy/skills/maestro-amend/SKILL.md +11 -0
- package/.agy/skills/maestro-companion/SKILL.md +11 -0
- package/.agy/skills/maestro-composer/SKILL.md +11 -0
- package/.agy/skills/maestro-guard/SKILL.md +25 -0
- package/.agy/skills/maestro-init/SKILL.md +28 -0
- package/.agy/skills/maestro-overlay/SKILL.md +11 -0
- package/.agy/skills/maestro-player/SKILL.md +11 -0
- package/.agy/skills/maestro-quick/SKILL.md +29 -0
- package/.agy/skills/maestro-swarm-workflow/SKILL.md +25 -0
- package/.agy/skills/maestro-tools-execute/SKILL.md +29 -0
- package/.agy/skills/maestro-tools-register/SKILL.md +29 -0
- package/.agy/skills/maestro-ui-codify/SKILL.md +11 -0
- package/.agy/skills/maestro-universal-workflow/SKILL.md +59 -0
- package/.agy/skills/maestro-update/SKILL.md +38 -0
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +29 -0
- package/.agy/skills/manage-drift-realign/SKILL.md +12 -0
- package/.agy/skills/manage-harvest/SKILL.md +30 -6
- package/.agy/skills/manage-issue/SKILL.md +23 -0
- package/.agy/skills/manage-issue-discover/SKILL.md +28 -0
- package/.agy/skills/manage-kg-extractors/SKILL.md +27 -1
- package/.agy/skills/manage-knowhow/SKILL.md +26 -0
- package/.agy/skills/manage-knowhow-capture/SKILL.md +24 -0
- package/.agy/skills/manage-knowledge-audit/SKILL.md +13 -0
- package/.agy/skills/manage-status/SKILL.md +22 -0
- package/.agy/skills/manage-wiki/SKILL.md +28 -0
- package/.agy/skills/odyssey-improve/SKILL.md +50 -0
- package/.agy/skills/odyssey-planex/SKILL.md +46 -0
- package/.agy/skills/odyssey-review-test-fix/SKILL.md +50 -0
- package/.agy/skills/odyssey-ui/SKILL.md +50 -0
- package/.agy/skills/quality-auto-test/SKILL.md +12 -0
- package/.agy/skills/quality-debug/SKILL.md +11 -0
- package/.agy/skills/quality-refactor/SKILL.md +11 -0
- package/.agy/skills/quality-retrospective/SKILL.md +11 -0
- package/.agy/skills/quality-review/SKILL.md +11 -0
- package/.agy/skills/quality-sync/SKILL.md +10 -0
- package/.agy/skills/quality-test/SKILL.md +12 -0
- package/.agy/skills/security-audit/SKILL.md +11 -0
- package/.agy/skills/spec-add/SKILL.md +27 -0
- package/.agy/skills/spec-load/SKILL.md +25 -0
- package/.agy/skills/spec-remove/SKILL.md +26 -0
- package/.agy/skills/spec-setup/SKILL.md +30 -0
- package/.claude/commands/domain-add.md +9 -0
- package/.claude/commands/learn-decompose.md +12 -0
- package/.claude/commands/learn-follow.md +41 -0
- package/.claude/commands/learn-investigate.md +14 -0
- package/.claude/commands/learn-second-opinion.md +14 -0
- package/.claude/commands/maestro-amend.md +11 -0
- package/.claude/commands/maestro-companion.md +11 -0
- package/.claude/commands/maestro-composer.md +11 -0
- package/.claude/commands/maestro-guard.md +25 -0
- package/.claude/commands/maestro-init.md +28 -0
- package/.claude/commands/maestro-overlay.md +11 -0
- package/.claude/commands/maestro-player.md +11 -0
- package/.claude/commands/maestro-quick.md +29 -0
- package/.claude/commands/maestro-swarm-workflow.md +25 -0
- package/.claude/commands/maestro-tools-execute.md +29 -0
- package/.claude/commands/maestro-tools-register.md +29 -0
- package/.claude/commands/maestro-ui-codify.md +11 -0
- package/.claude/commands/maestro-universal-workflow.md +59 -0
- package/.claude/commands/maestro-update.md +38 -0
- package/.claude/commands/manage-codebase-rebuild.md +29 -0
- package/.claude/commands/manage-drift-realign.md +12 -0
- package/.claude/commands/manage-harvest.md +30 -6
- package/.claude/commands/manage-issue-discover.md +28 -0
- package/.claude/commands/manage-issue.md +23 -0
- package/.claude/commands/manage-kg-extractors.md +27 -1
- package/.claude/commands/manage-knowhow-capture.md +24 -0
- package/.claude/commands/manage-knowhow.md +26 -0
- package/.claude/commands/manage-knowledge-audit.md +13 -0
- package/.claude/commands/manage-status.md +22 -0
- package/.claude/commands/manage-wiki.md +28 -0
- package/.claude/commands/odyssey-improve.md +50 -0
- package/.claude/commands/odyssey-planex.md +46 -0
- package/.claude/commands/odyssey-review-test-fix.md +50 -0
- package/.claude/commands/odyssey-ui.md +50 -0
- package/.claude/commands/quality-auto-test.md +12 -0
- package/.claude/commands/quality-debug.md +11 -0
- package/.claude/commands/quality-refactor.md +11 -0
- package/.claude/commands/quality-retrospective.md +11 -0
- package/.claude/commands/quality-review.md +11 -0
- package/.claude/commands/quality-sync.md +10 -0
- package/.claude/commands/quality-test.md +12 -0
- package/.claude/commands/security-audit.md +11 -0
- package/.claude/commands/spec-add.md +27 -0
- package/.claude/commands/spec-load.md +25 -0
- package/.claude/commands/spec-remove.md +26 -0
- package/.claude/commands/spec-setup.md +30 -0
- package/.codex/skills/codify-to-knowhow/SKILL.md +2 -0
- package/.codex/skills/domain-add/SKILL.md +26 -0
- package/.codex/skills/domain-discover/SKILL.md +46 -0
- package/.codex/skills/domain-list/SKILL.md +29 -0
- package/.codex/skills/learn-decompose/SKILL.md +2 -0
- package/.codex/skills/learn-follow/SKILL.md +34 -0
- package/.codex/skills/learn-investigate/SKILL.md +33 -0
- package/.codex/skills/learn-retro/SKILL.md +33 -0
- package/.codex/skills/learn-second-opinion/SKILL.md +30 -0
- package/.codex/skills/maestro-amend/SKILL.md +11 -0
- package/.codex/skills/maestro-companion/SKILL.md +11 -0
- package/.codex/skills/maestro-composer/SKILL.md +11 -0
- package/.codex/skills/maestro-guard/SKILL.md +25 -0
- package/.codex/skills/maestro-help/SKILL.md +2 -0
- package/.codex/skills/maestro-init/SKILL.md +16 -0
- package/.codex/skills/maestro-learn/SKILL.md +2 -0
- package/.codex/skills/maestro-overlay/SKILL.md +1 -0
- package/.codex/skills/maestro-player/SKILL.md +2 -0
- package/.codex/skills/maestro-quick/SKILL.md +17 -0
- package/.codex/skills/maestro-tools-execute/SKILL.md +31 -0
- package/.codex/skills/maestro-tools-register/SKILL.md +29 -0
- package/.codex/skills/maestro-ui-codify/SKILL.md +2 -0
- package/.codex/skills/maestro-update/SKILL.md +38 -0
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +2 -0
- package/.codex/skills/manage-codebase-refresh/SKILL.md +11 -0
- package/.codex/skills/manage-drift-realign/SKILL.md +2 -0
- package/.codex/skills/manage-harvest/SKILL.md +30 -8
- package/.codex/skills/manage-issue/SKILL.md +24 -0
- package/.codex/skills/manage-issue-discover/SKILL.md +2 -0
- package/.codex/skills/manage-knowhow/SKILL.md +26 -0
- package/.codex/skills/manage-knowhow-capture/SKILL.md +23 -0
- package/.codex/skills/manage-learn/SKILL.md +2 -0
- package/.codex/skills/manage-status/SKILL.md +22 -0
- package/.codex/skills/manage-wiki/SKILL.md +28 -0
- package/.codex/skills/odyssey-debug/SKILL.md +44 -0
- package/.codex/skills/odyssey-improve/SKILL.md +49 -0
- package/.codex/skills/odyssey-planex/SKILL.md +44 -0
- package/.codex/skills/odyssey-review-test-fix/SKILL.md +48 -0
- package/.codex/skills/odyssey-ui/SKILL.md +49 -0
- package/.codex/skills/quality-auto-test/SKILL.md +2 -0
- package/.codex/skills/quality-debug/SKILL.md +2 -0
- package/.codex/skills/quality-refactor/SKILL.md +2 -0
- package/.codex/skills/quality-retrospective/SKILL.md +2 -0
- package/.codex/skills/quality-review/SKILL.md +2 -0
- package/.codex/skills/quality-sync/SKILL.md +24 -0
- package/.codex/skills/quality-test/SKILL.md +2 -0
- package/.codex/skills/security-audit/SKILL.md +30 -0
- package/.codex/skills/spec-add/SKILL.md +28 -0
- package/.codex/skills/spec-load/SKILL.md +26 -0
- package/.codex/skills/spec-map/SKILL.md +1 -0
- package/.codex/skills/spec-remove/SKILL.md +28 -0
- package/.codex/skills/spec-setup/SKILL.md +28 -0
- package/.codex/skills/wiki-connect/SKILL.md +11 -0
- package/.codex/skills/wiki-digest/SKILL.md +11 -0
- package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js +3 -1
- package/dashboard/dist-server/dashboard/src/server/agents/api-explore-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.d.ts +5 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js +25 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/embedding.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/db/queries.d.ts +4 -0
- package/dashboard/dist-server/src/graph/kg/db/queries.js +35 -19
- package/dashboard/dist-server/src/graph/kg/db/queries.js.map +1 -1
- package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js +19 -11
- package/dashboard/dist-server/src/graph/kg/extraction/orchestrator.js.map +1 -1
- package/dist/src/agents/api-explore/config.d.ts +11 -1
- package/dist/src/agents/api-explore/config.d.ts.map +1 -1
- package/dist/src/agents/api-explore/config.js +17 -16
- package/dist/src/agents/api-explore/config.js.map +1 -1
- package/dist/src/agents/api-explore/index.js +4 -4
- package/dist/src/agents/api-explore/index.js.map +1 -1
- package/dist/src/agents/api-explore/llm.d.ts +2 -0
- package/dist/src/agents/api-explore/llm.d.ts.map +1 -1
- package/dist/src/agents/api-explore/llm.js +16 -4
- package/dist/src/agents/api-explore/llm.js.map +1 -1
- package/dist/src/agents/api-explore/runner.d.ts.map +1 -1
- package/dist/src/agents/api-explore/runner.js +16 -12
- package/dist/src/agents/api-explore/runner.js.map +1 -1
- package/dist/src/commands/explore.d.ts.map +1 -1
- package/dist/src/commands/explore.js +19 -2
- package/dist/src/commands/explore.js.map +1 -1
- package/dist/src/commands/install.js +7 -28
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/moa.d.ts.map +1 -1
- package/dist/src/commands/moa.js +17 -2
- package/dist/src/commands/moa.js.map +1 -1
- package/dist/src/commands/search.d.ts.map +1 -1
- package/dist/src/commands/search.js +2 -0
- package/dist/src/commands/search.js.map +1 -1
- package/dist/src/graph/kg/db/queries.d.ts +4 -0
- package/dist/src/graph/kg/db/queries.d.ts.map +1 -1
- package/dist/src/graph/kg/db/queries.js +35 -19
- package/dist/src/graph/kg/db/queries.js.map +1 -1
- package/dist/src/graph/kg/extraction/orchestrator.d.ts.map +1 -1
- package/dist/src/graph/kg/extraction/orchestrator.js +19 -11
- package/dist/src/graph/kg/extraction/orchestrator.js.map +1 -1
- package/dist/src/hooks/plugins/explore-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/explore-plugin.js +3 -2
- package/dist/src/hooks/plugins/explore-plugin.js.map +1 -1
- package/package.json +1 -1
|
@@ -45,6 +45,8 @@ $ARGUMENTS
|
|
|
45
45
|
**Session**: `.workflow/scratch/{YYYYMMDD}-review-odyssey-{slug}/`
|
|
46
46
|
**Output**: `session.json` | `evidence.ndjson` | `explore.json` | `understanding.md`
|
|
47
47
|
|
|
48
|
+
**Output boundary**: ALL session artifacts MUST target the session directory (`.workflow/scratch/{YYYYMMDD}-review-odyssey-{slug}/`) or `.workflow/state.json` only. Source code modifications during S_FIX are in-scope but MUST be committed per action. NEVER write session artifacts outside these paths.
|
|
49
|
+
|
|
48
50
|
**session.json — review-specific fields:**
|
|
49
51
|
```json
|
|
50
52
|
{ "target": "", "dimensions": [], "review_result": {"remaining_actionable": 0},
|
|
@@ -90,6 +92,54 @@ All invariants defined in base.
|
|
|
90
92
|
Applies to: **S_ARCHAEOLOGY, S_EXPLORE, S_REVIEW, S_FIX, S_GENERALIZE**. Logic in base.
|
|
91
93
|
</self_iteration>
|
|
92
94
|
|
|
95
|
+
<execution>
|
|
96
|
+
Follow base execution discipline completely. Actions defined in state_machine below.
|
|
97
|
+
|
|
98
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
99
|
+
|
|
100
|
+
**GATE 1: INTAKE → ARCHAEOLOGY**
|
|
101
|
+
- REQUIRED: Target resolved to file list, SESSION_DIR created, session.json initialized.
|
|
102
|
+
- REQUIRED: phase_goals[] derived from flags, understanding.md §1 written.
|
|
103
|
+
- BLOCKED if: no target specified (E001) or target path not found (E002).
|
|
104
|
+
|
|
105
|
+
**GATE 2: ARCHAEOLOGY → EXPLORE**
|
|
106
|
+
- REQUIRED: Git history analysis completed (timeline + blame agents), evidence phase=archaeology logged.
|
|
107
|
+
- REQUIRED: understanding.md §2 updated.
|
|
108
|
+
- BLOCKED if: both archaeology agents failed AND delegate failed (partial results via W003 are acceptable).
|
|
109
|
+
|
|
110
|
+
**GATE 3: EXPLORE → REVIEW**
|
|
111
|
+
- REQUIRED: explore.json written with call_chains/recent_changes/error_gaps/similar_patterns (or W006 skip logged).
|
|
112
|
+
- REQUIRED: Evidence phase=explore logged, understanding.md §3 updated, G2 marked done.
|
|
113
|
+
- BLOCKED if: exploration started but not completed (W006 skip is acceptable, incomplete is not).
|
|
114
|
+
|
|
115
|
+
**GATE 4: REVIEW → FIX**
|
|
116
|
+
- REQUIRED: All dimension agents completed, findings merged with severity classification.
|
|
117
|
+
- REQUIRED: review_result written to session.json, understanding.md §4 with severity matrix, G1 marked done.
|
|
118
|
+
- BLOCKED if: zero dimensions reviewed (W002 partial is allowed, zero is not).
|
|
119
|
+
|
|
120
|
+
**GATE 5: FIX → CONFIRM**
|
|
121
|
+
- REQUIRED: Current severity tier fully addressed — all findings in tier fixed or individually classified.
|
|
122
|
+
- REQUIRED: Per-fix evidence phase=fix logged, auto-commit per tier.
|
|
123
|
+
- BLOCKED if: tier incomplete — no partial tier advancement.
|
|
124
|
+
|
|
125
|
+
**GATE 6: CONFIRM → GENERALIZE**
|
|
126
|
+
- REQUIRED: Tests pass, remaining_actionable == 0, new findings == 0.
|
|
127
|
+
- REQUIRED: confirmation written, understanding.md §5 updated, G3 marked done.
|
|
128
|
+
- BLOCKED if: needs_rework → route back to S_FIX.
|
|
129
|
+
|
|
130
|
+
**GATE 7: GENERALIZE → DISCOVER**
|
|
131
|
+
- REQUIRED: ALL 3 layers (syntax/semantic/structural) attempted with evidence logged.
|
|
132
|
+
- REQUIRED: generalization_stats written with by_layer entries for all 3 layers, G4 marked done.
|
|
133
|
+
- BLOCKED if: any layer not attempted (thoroughness floor violation).
|
|
134
|
+
|
|
135
|
+
**GATE 8: DISCOVER → RECORD**
|
|
136
|
+
- REQUIRED: All hits triaged with per-item classification and reason.
|
|
137
|
+
- REQUIRED: remaining_actionable == 0 OR loops >= max_loops with per-item reasons logged.
|
|
138
|
+
- REQUIRED: G5 marked done.
|
|
139
|
+
- BLOCKED if: unclassified hits remain.
|
|
140
|
+
|
|
141
|
+
</execution>
|
|
142
|
+
|
|
93
143
|
<state_machine>
|
|
94
144
|
|
|
95
145
|
<states>
|
|
@@ -41,6 +41,8 @@ $ARGUMENTS
|
|
|
41
41
|
**Session**: `.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`
|
|
42
42
|
**Output**: `session.json` | `evidence.ndjson` | `understanding.md`
|
|
43
43
|
|
|
44
|
+
**Output boundary**: ALL session artifacts MUST target the session directory (`.workflow/scratch/{YYYYMMDD}-ui-odyssey-{slug}/`) or `.workflow/state.json` only. Source code modifications during S_FIX are in-scope but MUST be committed per action. NEVER write session artifacts outside these paths.
|
|
45
|
+
|
|
44
46
|
**session.json — ui-specific fields:**
|
|
45
47
|
```json
|
|
46
48
|
{ "target": "", "dimensions": [],
|
|
@@ -89,6 +91,54 @@ $ARGUMENTS
|
|
|
89
91
|
Applies to: **S_SURVEY, S_AUDIT, S_DIVERGE, S_GENERALIZE**. Logic in base.
|
|
90
92
|
</self_iteration>
|
|
91
93
|
|
|
94
|
+
<execution>
|
|
95
|
+
Follow base execution discipline completely. Actions defined in state_machine below.
|
|
96
|
+
|
|
97
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
98
|
+
|
|
99
|
+
**GATE 1: INTAKE → SURVEY**
|
|
100
|
+
- REQUIRED: Target resolved, SESSION_DIR created, session.json initialized.
|
|
101
|
+
- REQUIRED: phase_goals[] derived from flags, understanding.md §1 written.
|
|
102
|
+
- BLOCKED if: no target specified (E001) or target path not found (E002).
|
|
103
|
+
|
|
104
|
+
**GATE 2: SURVEY → AUDIT**
|
|
105
|
+
- REQUIRED: Design system inventory + current state analysis completed.
|
|
106
|
+
- REQUIRED: Evidence phase=survey logged, understanding.md §2 updated, G1 marked done.
|
|
107
|
+
- BLOCKED if: survey incomplete — token scan and styling analysis must both be attempted.
|
|
108
|
+
|
|
109
|
+
**GATE 3: AUDIT → DIVERGE**
|
|
110
|
+
- REQUIRED: All 6 dimension agents completed (or --dimensions subset), findings merged with severity classification.
|
|
111
|
+
- REQUIRED: audit_result written to session.json, understanding.md §3 with severity matrix, G2 marked done.
|
|
112
|
+
- BLOCKED if: zero dimensions reviewed (W002 partial is allowed, zero is not).
|
|
113
|
+
|
|
114
|
+
**GATE 4: DIVERGE → FIX**
|
|
115
|
+
- REQUIRED: Both parallel agents (Polish + Delight) completed, ideas consolidated with audit findings.
|
|
116
|
+
- REQUIRED: diverge_result written, understanding.md §4 updated, G3 marked done.
|
|
117
|
+
- BLOCKED if: divergent exploration not attempted.
|
|
118
|
+
|
|
119
|
+
**GATE 5: FIX → VERIFY**
|
|
120
|
+
- REQUIRED: ALL findings/ideas within fix_threshold fixed by priority tier.
|
|
121
|
+
- REQUIRED: Per-fix evidence phase=fix logged.
|
|
122
|
+
- BLOCKED if: tier incomplete — each tier must be fully addressed before advancing.
|
|
123
|
+
|
|
124
|
+
**GATE 6: VERIFY → GENERALIZE**
|
|
125
|
+
- REQUIRED: Tests pass (lint, unit, visual regression), delegate verification completed.
|
|
126
|
+
- REQUIRED: confirmation written, understanding.md §5 updated, G4 marked done.
|
|
127
|
+
- BLOCKED if: needs_rework → route back to S_FIX.
|
|
128
|
+
|
|
129
|
+
**GATE 7: GENERALIZE → DISCOVER**
|
|
130
|
+
- REQUIRED: ALL 3 layers (syntax/semantic/structural) attempted with evidence logged.
|
|
131
|
+
- REQUIRED: generalization_stats written with by_layer entries for all 3 layers, G5 marked done.
|
|
132
|
+
- BLOCKED if: any layer not attempted (thoroughness floor violation).
|
|
133
|
+
|
|
134
|
+
**GATE 8: DISCOVER → RECORD**
|
|
135
|
+
- REQUIRED: All hits triaged with per-item classification and reason.
|
|
136
|
+
- REQUIRED: remaining_actionable == 0 OR loops >= max_loops with per-item reasons logged.
|
|
137
|
+
- REQUIRED: G6 marked done.
|
|
138
|
+
- BLOCKED if: unclassified hits remain.
|
|
139
|
+
|
|
140
|
+
</execution>
|
|
141
|
+
|
|
92
142
|
<state_machine>
|
|
93
143
|
|
|
94
144
|
<states>
|
|
@@ -54,8 +54,20 @@ Flags, artifact context resolution, and output formats defined in workflow auto-
|
|
|
54
54
|
- Browse: `maestro search --category test`
|
|
55
55
|
- Load task-relevant entries: `maestro load --type knowhow --id <id1> [id2...]`
|
|
56
56
|
4. All are optional — proceed without if unavailable.
|
|
57
|
+
|
|
58
|
+
**Output boundary**: ALL file writes MUST target `.workflow/scratch/{YYYYMMDD}-auto-test-P{N}-{slug}/` or `.workflow/state.json` only. Source code modifications are limited to test files generated by this command. NEVER modify existing production source code.
|
|
57
59
|
</context>
|
|
58
60
|
|
|
61
|
+
<invariants>
|
|
62
|
+
1. **Test code isolation** — generated tests MUST be written to test directories following existing project conventions. NEVER modify production source code to make tests pass.
|
|
63
|
+
2. **RED-GREEN integrity** — tests MUST be written to fail first (RED), then verified to pass against implementation (GREEN). NEVER write tests that pass trivially or assert nothing.
|
|
64
|
+
3. **Layer ordering is strict** — L0→L3 execution is sequential and fail-fast. NEVER skip a layer or run L2 before L1 passes.
|
|
65
|
+
4. **Existing tests are sacred** — NEVER modify, delete, or overwrite existing test files. New tests are additive only.
|
|
66
|
+
5. **Convergence requires evidence** — pass rate and confidence score MUST be computed from actual execution results. NEVER infer or estimate pass rates without running tests.
|
|
67
|
+
6. **Iteration has bounds** — outer iteration MUST NOT exceed `--max-iter` (default 5). Inner test_defect fix MUST NOT exceed 3 attempts per scenario before escalating.
|
|
68
|
+
7. **Traceability is mandatory for spec source** — when route=spec, every test scenario MUST trace back to a REQ-*.md requirement. Untraceable tests are flagged.
|
|
69
|
+
</invariants>
|
|
70
|
+
|
|
59
71
|
<execution>
|
|
60
72
|
Follow '~/.maestro/workflows/auto-test.md' completely.
|
|
61
73
|
|
|
@@ -50,8 +50,19 @@ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
|
|
|
50
50
|
- Role knowledge: `maestro search --category debug` → select relevant → `maestro load --type knowhow --id`
|
|
51
51
|
|
|
52
52
|
**Output**: `DEBUG_DIR = .workflow/scratch/{YYYYMMDD}-debug-P{N}-{slug}/` (P{N} = phase number when phase-scoped; omit for standalone). Output directory rules defined in workflow debug.md Step 4.
|
|
53
|
+
|
|
54
|
+
**Output boundary**: ALL file writes MUST target `DEBUG_DIR` or `.workflow/state.json` only. NEVER modify source code, test files, or other artifacts outside these paths during investigation.
|
|
53
55
|
</context>
|
|
54
56
|
|
|
57
|
+
<invariants>
|
|
58
|
+
1. **Investigation is read-only on source** — debug MUST NOT modify source code, test files, or execution artifacts. Diagnosis produces understanding.md, evidence.ndjson, and reports only.
|
|
59
|
+
2. **Root cause requires reproduction** — NEVER declare a root cause confirmed without evidence (code trace, log entry, or reproduction steps). Hypothesis without evidence stays "suspected".
|
|
60
|
+
3. **Evidence is append-only** — evidence.ndjson entries MUST only be appended, NEVER modified or deleted. Each entry is an immutable observation.
|
|
61
|
+
4. **Confidence is multi-factor** — root cause confidence MUST use the multi-factor scoring model (Step 7.0). NEVER use bare high/medium/low without dimensional breakdown.
|
|
62
|
+
5. **Prior investigations are consulted** — when related debug artifacts exist, check understanding.md for prior root causes. NEVER re-investigate an already-confirmed root cause without new symptoms.
|
|
63
|
+
6. **Fix direction is not fix execution** — debug produces `fix_direction` and `affected_files` but NEVER applies fixes. Fix execution belongs to plan→execute cycle.
|
|
64
|
+
</invariants>
|
|
65
|
+
|
|
55
66
|
<execution>
|
|
56
67
|
Follow '~/.maestro/workflows/debug.md' completely.
|
|
57
68
|
|
|
@@ -38,8 +38,19 @@ If not provided, prompt user for scope.
|
|
|
38
38
|
- Browse: `maestro search --category coding`
|
|
39
39
|
- Identify task-relevant entries, then load: `maestro load --type knowhow --id <id1> [id2...]`
|
|
40
40
|
4. All are optional — proceed without if unavailable.
|
|
41
|
+
|
|
42
|
+
**Output boundary**: Refactoring modifies source files within the declared scope only. Ancillary outputs (reflection-log.md) MUST target `.workflow/scratch/{YYYYMMDD}-refactor-{slug}/`. NEVER modify files outside the confirmed scope without re-confirmation.
|
|
41
43
|
</context>
|
|
42
44
|
|
|
45
|
+
<invariants>
|
|
46
|
+
1. **Plan before change** — NEVER apply refactoring changes without a confirmed plan. Every modification traces to a plan item.
|
|
47
|
+
2. **Behavioral equivalence** — refactoring MUST preserve existing behavior. All tests MUST pass after each individual change, not just at the end.
|
|
48
|
+
3. **Scope is locked after confirmation** — once the user confirms the refactoring plan, do NOT expand scope to include additional files or changes without re-confirmation.
|
|
49
|
+
4. **Incremental verification** — each discrete refactoring step MUST be verified (tests run) before proceeding to the next. NEVER batch multiple unrelated changes into a single verification.
|
|
50
|
+
5. **No feature creep** — refactoring MUST NOT add new functionality, change APIs, or alter public interfaces. If a beneficial API change is discovered, log it as a recommendation, do NOT apply it.
|
|
51
|
+
6. **Rollback safety** — if any test fails after a refactoring step, revert that specific change before attempting alternatives. NEVER proceed with failing tests.
|
|
52
|
+
</invariants>
|
|
53
|
+
|
|
43
54
|
<execution>
|
|
44
55
|
Follow '~/.maestro/workflows/refactor.md' completely.
|
|
45
56
|
|
|
@@ -40,8 +40,19 @@ Arguments: $ARGUMENTS
|
|
|
40
40
|
- `--lens <name>` — Restrict to specific lens (technical|process|quality|decision); default: all four
|
|
41
41
|
|
|
42
42
|
Modes (scan/single/range/all) and storage paths defined in workflow retrospective.md Argument Shape and Stages 1-7.
|
|
43
|
+
|
|
44
|
+
**Output boundary**: ALL file writes MUST target the phase's retrospective directory (`.workflow/scratch/{YYYYMMDD}-retrospective-P{N}/`), `.workflow/state.json`, `.workflow/issues.jsonl`, or `.workflow/specs/` (append-only). NEVER modify source code, verification.json, review.json, plan.json, or other existing artifacts.
|
|
43
45
|
</context>
|
|
44
46
|
|
|
47
|
+
<invariants>
|
|
48
|
+
1. **Source artifacts are read-only** — NEVER modify verification.json, review.json, plan.json, or any execution artifact. Retrospective reads these for analysis only.
|
|
49
|
+
2. **Stable insight IDs** — `INS-{8hex}` MUST be deterministic from `hash(phase_num + lens + title)`. Re-runs MUST NOT create duplicate insights.
|
|
50
|
+
3. **Routing requires confirmation** — unless `-y` flag is set, every external write (issues.jsonl, spec entry, knowhow capture) MUST be confirmed by user before execution.
|
|
51
|
+
4. **Lens independence** — each lens agent (technical/process/quality/decision) operates independently. One lens's findings MUST NOT suppress or override another's.
|
|
52
|
+
5. **Append-only for specs** — learnings.md entries are appended as `<spec-entry>` blocks. NEVER overwrite or restructure existing entries.
|
|
53
|
+
6. **Archive before overwrite** — if retrospective.json already exists for a phase, the existing file MUST be archived before writing a new version.
|
|
54
|
+
</invariants>
|
|
55
|
+
|
|
45
56
|
<execution>
|
|
46
57
|
Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order.
|
|
47
58
|
|
|
@@ -56,8 +56,19 @@ Each artifact's type determines its outputs at `.workflow/{a.path}/`:
|
|
|
56
56
|
- Role knowledge: `maestro search --category review` → select relevant → `maestro load --type knowhow --id`
|
|
57
57
|
|
|
58
58
|
**Output**: `REVIEW_DIR = .workflow/scratch/{YYYYMMDD}-review-P{N}-{slug}/` (P{N} = phase number, enables directory-level identification as state.json fallback)
|
|
59
|
+
|
|
60
|
+
**Output boundary**: ALL file writes MUST target `REVIEW_DIR` or `.workflow/state.json` only. NEVER modify source code, execution artifacts, or files outside these paths.
|
|
59
61
|
</context>
|
|
60
62
|
|
|
63
|
+
<invariants>
|
|
64
|
+
1. **Review is read-only on source** — NEVER modify source code, test files, or execution artifacts. Review produces reports only.
|
|
65
|
+
2. **Findings require evidence** — every finding MUST reference file:line and include a code snippet or concrete description. No vague or unanchored findings.
|
|
66
|
+
3. **Verdict is data-driven** — NEVER change verdict severity to accommodate user preference without new evidence. Verdicts flow from findings, not negotiation.
|
|
67
|
+
4. **Dimension independence** — each review dimension produces findings independently. One dimension's results MUST NOT suppress or override another's.
|
|
68
|
+
5. **Prior review delta** — when a prior review.json exists for the same phase, findings MUST be compared. Do NOT re-report already-resolved findings as new.
|
|
69
|
+
6. **Spec conflict integrity** — if code contradicts a spec entry, flag via `maestro spec conflict mark`. NEVER silently accept the contradiction or edit the spec inline.
|
|
70
|
+
</invariants>
|
|
71
|
+
|
|
61
72
|
<execution>
|
|
62
73
|
Follow '~/.maestro/workflows/review.md' completely.
|
|
63
74
|
|
|
@@ -27,8 +27,18 @@ $ARGUMENTS -- optional flags:
|
|
|
27
27
|
- `--full` -- Complete resync of all tracked files (ignores git diff, rebuilds all docs)
|
|
28
28
|
- `--since <commit|HEAD~N>` -- Diff since specific commit (default: last sync timestamp)
|
|
29
29
|
- `--dry-run` -- Show what would be updated without writing changes
|
|
30
|
+
|
|
31
|
+
**Output boundary**: ALL file writes MUST target `.workflow/codebase/`, `.workflow/state.json`, or `doc-index.json` only. NEVER modify source code or files outside `.workflow/`. `--dry-run` MUST suppress all writes.
|
|
30
32
|
</context>
|
|
31
33
|
|
|
34
|
+
<invariants>
|
|
35
|
+
1. **Source code is read-only** — sync reads source files to generate documentation. NEVER modify source code, test files, or any non-documentation files.
|
|
36
|
+
2. **Dry-run is side-effect-free** — when `--dry-run` is set, NO file writes occur. Report only what would change.
|
|
37
|
+
3. **Impact trace before refresh** — NEVER regenerate a doc file without first tracing which source changes affect it via doc-index.json. Untargeted full-refresh requires explicit `--full` flag.
|
|
38
|
+
4. **Idempotent sync** — running sync twice with the same diff MUST produce identical results. State.json timestamp prevents redundant re-runs.
|
|
39
|
+
5. **Incremental by default** — without `--full`, only changed components are refreshed. NEVER silently expand to a full rebuild.
|
|
40
|
+
</invariants>
|
|
41
|
+
|
|
32
42
|
<execution>
|
|
33
43
|
Follow '~/.maestro/workflows/sync.md' completely.
|
|
34
44
|
|
|
@@ -26,8 +26,20 @@ UAT-style conversational testing for a completed phase. Interactive scenario wal
|
|
|
26
26
|
Phase or task: $ARGUMENTS (optional)
|
|
27
27
|
|
|
28
28
|
Flags, artifact context resolution, and output directory format defined in workflow test.md.
|
|
29
|
+
|
|
30
|
+
**Output boundary**: ALL file writes MUST target `.workflow/scratch/{YYYYMMDD}-test-P{N}-{slug}/`, `.workflow/state.json`, or `.workflow/issues.jsonl` only. NEVER modify source code or execution artifacts outside these paths. `--frontend-verify` additionally writes `e2e-results.json` to the same scratch directory.
|
|
29
31
|
</context>
|
|
30
32
|
|
|
33
|
+
<invariants>
|
|
34
|
+
1. **UAT is observational** — test execution observes behavior and records results. NEVER modify source code during testing. Source fixes belong to debug→plan→execute cycle.
|
|
35
|
+
2. **Severity is inferred, not asked** — severity MUST be inferred from user's natural language description of issues. NEVER explicitly ask the user to assign severity levels.
|
|
36
|
+
3. **One scenario at a time** — tests MUST be presented individually for user verification. NEVER batch-present multiple scenarios or assume outcomes.
|
|
37
|
+
4. **Evidence before verdict** — UAT confidence MUST be scored with the 4-dimension factor model from actual test results. NEVER emit a verdict without running the readiness gate.
|
|
38
|
+
5. **Existing UAT is resumable** — when uat.md exists for the target phase, offer resume. NEVER silently overwrite prior test progress.
|
|
39
|
+
6. **Frontend-verify is deterministic** — `--frontend-verify` mode uses browser assertions with concrete pass/fail per criterion. NEVER treat "no response" or timeout as pass.
|
|
40
|
+
7. **Auto-fix has bounds** — `--auto-fix` gap-fix loop MUST NOT exceed 2 iterations. Persistent failures escalate to debug, not infinite retry.
|
|
41
|
+
</invariants>
|
|
42
|
+
|
|
31
43
|
<execution>
|
|
32
44
|
**Mode select:** `--frontend-verify` → 走下方 **Frontend Verify Mode**(确定性浏览器 smoke,**不是**对话式 UAT);否则 Follow '~/.maestro/workflows/test.md' completely.
|
|
33
45
|
|
|
@@ -34,8 +34,19 @@ $ARGUMENTS — Parse tier and scope:
|
|
|
34
34
|
| quick | ✓ | ✓ | — | — | — | — |
|
|
35
35
|
| standard | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
36
36
|
| deep | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
37
|
+
|
|
38
|
+
**Output boundary**: ALL file writes MUST target `.workflow/scratch/{YYYYMMDD}-security-audit-{tier}-{slug}/` or `.workflow/state.json` only. NEVER modify source code, configuration files, or dependencies. Audit is read-only analysis.
|
|
37
39
|
</context>
|
|
38
40
|
|
|
41
|
+
<invariants>
|
|
42
|
+
1. **Audit is read-only** — NEVER modify source code, configuration, dependencies, or CI/CD files during audit. Security audit produces reports only.
|
|
43
|
+
2. **Findings require file:line evidence** — every finding MUST reference a specific file:line location and include the vulnerable code pattern. No vague or category-only findings.
|
|
44
|
+
3. **Severity NEVER downgraded without justification** — if a finding matches a known OWASP category, its severity follows OWASP guidance. Downgrading requires documented rationale (e.g., compensating control exists).
|
|
45
|
+
4. **Tier coverage is mandatory** — all scan phases required by the selected tier MUST complete. NEVER skip a tier-required phase silently; failures are logged as W00x warnings.
|
|
46
|
+
5. **False positive marking requires evidence** — marking a finding as false positive MUST include the compensating control or code path that prevents exploitation. NEVER dismiss findings without counter-evidence.
|
|
47
|
+
6. **Secrets are never logged** — if secrets are discovered, report their location (file:line) and type but NEVER include the actual secret value in the report output.
|
|
48
|
+
</invariants>
|
|
49
|
+
|
|
39
50
|
<execution>
|
|
40
51
|
|
|
41
52
|
### Phase Gates (MANDATORY, BLOCKING)
|
|
@@ -46,9 +46,36 @@ Scope-to-directory mapping, category-to-file mapping, and entry format defined i
|
|
|
46
46
|
```
|
|
47
47
|
</context>
|
|
48
48
|
|
|
49
|
+
<invariants>
|
|
50
|
+
1. **Idempotent append** — duplicate entry ID MUST be rejected (E003-level check on title + category match before write)
|
|
51
|
+
2. **Category validation** — category MUST be one of: coding, arch, quality, debug, test, review, learning, ui. Invalid category → E003
|
|
52
|
+
3. **Scope isolation** — writes target ONLY the scope-resolved directory; project scope NEVER writes to global (~/.maestro/specs/), global scope NEVER writes to project (.workflow/specs/)
|
|
53
|
+
4. **Confirmation gate** — MUST ask_user before appending entry (unless -y flag); NEVER write without user confirmation in interactive mode
|
|
54
|
+
5. **Entry format invariance** — all entries MUST use `<spec-entry>` closed-tag format with id, keywords, and category attributes
|
|
55
|
+
6. **Output boundary** — ALL file writes MUST target the scope-resolved specs directory (.workflow/specs/, ~/.maestro/specs/, .workflow/collab/specs/, or .workflow/collab/{uid}/specs/) and optionally .workflow/knowhow/ for --ref mode. NEVER modify source code or files outside these paths
|
|
56
|
+
</invariants>
|
|
57
|
+
|
|
49
58
|
<execution>
|
|
50
59
|
Follow '~/.maestro/workflows/specs-add.md' completely.
|
|
51
60
|
|
|
61
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
62
|
+
|
|
63
|
+
**GATE 1: Parse → Validate**
|
|
64
|
+
- REQUIRED: Category and content both parsed from arguments.
|
|
65
|
+
- REQUIRED: Category is a valid value (coding, arch, quality, debug, test, review, learning, ui).
|
|
66
|
+
- REQUIRED: Scope resolved to a valid directory path.
|
|
67
|
+
- BLOCKED if: E001 (missing args), E003 (invalid category), E004 (invalid scope), E005 (personal scope without uid).
|
|
68
|
+
|
|
69
|
+
**GATE 2: Validate → Format**
|
|
70
|
+
- REQUIRED: Specs directory exists for the resolved scope.
|
|
71
|
+
- REQUIRED: No duplicate entry with identical title + category already present in target file.
|
|
72
|
+
- BLOCKED if: E002 (specs not initialized).
|
|
73
|
+
|
|
74
|
+
**GATE 3: Format → Write**
|
|
75
|
+
- REQUIRED: `<spec-entry>` block formatted with id, keywords, category attributes.
|
|
76
|
+
- REQUIRED: User confirmation via ask_user (unless -y flag).
|
|
77
|
+
- BLOCKED if: user declines confirmation — abort without writing.
|
|
78
|
+
|
|
52
79
|
**Confirmation gate**: Unless -y flag is passed, after formatting the `<spec-entry>` block but before appending to the target file, ask_user showing the formatted entry, target file path, and scope. Proceed only on user confirm.
|
|
53
80
|
</execution>
|
|
54
81
|
|
|
@@ -59,8 +59,33 @@ When loading entries with `ref` attribute, only the summary is shown with a load
|
|
|
59
59
|
Use the load command to read the full referenced document.
|
|
60
60
|
</context>
|
|
61
61
|
|
|
62
|
+
<invariants>
|
|
63
|
+
1. **Read-only** — NEVER modify, create, or delete any spec files during load. This command is purely a read operation
|
|
64
|
+
2. **Output to context only** — loaded specs are injected into the conversation context; NEVER write loaded content to new files or modify existing files
|
|
65
|
+
3. **Scope layering** — global scope MUST merge both ~/.maestro/specs/ and .workflow/specs/; project scope loads .workflow/specs/ only; team adds .workflow/collab/specs/; personal adds .workflow/collab/{uid}/specs/
|
|
66
|
+
4. **Category primary doc** — when --category is specified, the primary category doc MUST be loaded in full before cross-file matching
|
|
67
|
+
5. **Entry-level filtering** — --keyword filtering operates at `<spec-entry>` level via keywords attribute, NOT at file level; unmatched entries in a matching file are excluded
|
|
68
|
+
6. **Output boundary** — this command produces NO file writes. All output is conversation-context injection only
|
|
69
|
+
</invariants>
|
|
70
|
+
|
|
62
71
|
<execution>
|
|
63
72
|
Follow '~/.maestro/workflows/specs-load.md' completely.
|
|
73
|
+
|
|
74
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
75
|
+
|
|
76
|
+
**GATE 1: Parse → Discover**
|
|
77
|
+
- REQUIRED: Arguments parsed — at least one of --category or --keyword is provided, or empty args triggers full load.
|
|
78
|
+
- REQUIRED: Scope resolved (default: global+project merged).
|
|
79
|
+
- BLOCKED if: invalid scope value or invalid category value.
|
|
80
|
+
|
|
81
|
+
**GATE 2: Discover → Load**
|
|
82
|
+
- REQUIRED: At least one spec directory exists in the resolved scope chain.
|
|
83
|
+
- BLOCKED if: E001 — .workflow/specs/ not initialized AND no global specs available. Warn and abort.
|
|
84
|
+
|
|
85
|
+
**GATE 3: Load → Display**
|
|
86
|
+
- REQUIRED: Spec files read and entries parsed.
|
|
87
|
+
- REQUIRED: Keyword filtering applied if --keyword was provided.
|
|
88
|
+
- BLOCKED if: no readable spec files found in any scope layer.
|
|
64
89
|
</execution>
|
|
65
90
|
|
|
66
91
|
<error_codes>
|
|
@@ -33,8 +33,34 @@ $ARGUMENTS -- expects `<entry-id>` (e.g., `spec-learnings-003`, `spec-coding-con
|
|
|
33
33
|
- `--cascade` — When the target spec is a ref-type entry (created via `spec-add --ref` and linked to a knowhow document), also delete the referenced knowhow file. Without this flag, ref-type removal leaves an orphan knowhow file.
|
|
34
34
|
</context>
|
|
35
35
|
|
|
36
|
+
<invariants>
|
|
37
|
+
1. **Confirmation required** — MUST ask_user before deletion (unless -y flag); NEVER remove entries silently
|
|
38
|
+
2. **Referential integrity** — before removing, check if other spec entries reference the target entry; warn user if references exist
|
|
39
|
+
3. **Cascade explicit** — ref-type entries MUST NOT cascade-delete the linked knowhow file unless --cascade is explicitly passed; default leaves orphan knowhow intact
|
|
40
|
+
4. **Atomic removal** — use `maestro wiki remove-entry` for atomic operation; NEVER manually edit spec files to remove entries
|
|
41
|
+
5. **Index consistency** — wiki index MUST be auto-updated after removal; stale index entries are a hard failure
|
|
42
|
+
6. **Output boundary** — file modifications MUST target ONLY the spec container file (.workflow/specs/*.md) and optionally the referenced knowhow file (.workflow/knowhow/*) when --cascade is used. NEVER modify source code or files outside these paths
|
|
43
|
+
</invariants>
|
|
44
|
+
|
|
36
45
|
<execution>
|
|
37
46
|
Follow '~/.maestro/workflows/specs-remove.md' completely.
|
|
47
|
+
|
|
48
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
49
|
+
|
|
50
|
+
**GATE 1: Parse → Lookup**
|
|
51
|
+
- REQUIRED: Entry ID parsed from arguments.
|
|
52
|
+
- BLOCKED if: E001 — no entry ID provided.
|
|
53
|
+
|
|
54
|
+
**GATE 2: Lookup → Confirm**
|
|
55
|
+
- REQUIRED: .workflow/specs/ directory exists.
|
|
56
|
+
- REQUIRED: Entry found in wiki index as a spec sub-node.
|
|
57
|
+
- REQUIRED: Entry content loaded for user preview.
|
|
58
|
+
- BLOCKED if: E002 (specs not initialized), E003 (entry not found), E004 (wrong type).
|
|
59
|
+
|
|
60
|
+
**GATE 3: Confirm → Remove**
|
|
61
|
+
- REQUIRED: User confirmed removal via ask_user (unless -y flag).
|
|
62
|
+
- REQUIRED: If --cascade and entry has ref attribute, user additionally confirmed knowhow file deletion.
|
|
63
|
+
- BLOCKED if: user declines — abort without modification.
|
|
38
64
|
</execution>
|
|
39
65
|
|
|
40
66
|
<error_codes>
|
|
@@ -28,9 +28,39 @@ $ARGUMENTS (no arguments expected)
|
|
|
28
28
|
- Project must contain source files to scan # (see code: E002)
|
|
29
29
|
</context>
|
|
30
30
|
|
|
31
|
+
<invariants>
|
|
32
|
+
1. **Non-destructive** — NEVER overwrite existing spec files; if a file already exists, skip it and report as already-initialized
|
|
33
|
+
2. **Idempotent** — safe to re-run on an initialized project; re-running MUST NOT duplicate entries or corrupt existing content
|
|
34
|
+
3. **Confirmation gate** — MUST ask_user showing all files to be created before writing; NEVER write without user confirmation
|
|
35
|
+
4. **Output boundary** — ALL file writes MUST target .workflow/specs/ (spec files) and .workflow/knowhow/ (recipe knowhow) only. NEVER modify source code, .workflow/state.json, or files outside these paths
|
|
36
|
+
5. **Core files mandatory** — coding-conventions.md, architecture-constraints.md, and learnings.md MUST always be created (unless they already exist)
|
|
37
|
+
6. **Signal-driven optionals** — optional spec files (quality-rules.md, test-conventions.md, ui-conventions.md) MUST only be created when corresponding framework/tool signals are detected in the codebase; NEVER create optional files without evidence
|
|
38
|
+
</invariants>
|
|
39
|
+
|
|
31
40
|
<execution>
|
|
32
41
|
Follow '~/.maestro/workflows/specs-setup.md' completely.
|
|
33
42
|
|
|
43
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
44
|
+
|
|
45
|
+
**GATE 1: Precondition → Scan**
|
|
46
|
+
- REQUIRED: .workflow/ directory exists.
|
|
47
|
+
- REQUIRED: Project contains source files to scan.
|
|
48
|
+
- BLOCKED if: E001 (.workflow/ not initialized), E002 (no source files).
|
|
49
|
+
|
|
50
|
+
**GATE 2: Scan → Plan**
|
|
51
|
+
- REQUIRED: Codebase scan completed — framework, language, and tooling signals collected.
|
|
52
|
+
- REQUIRED: Core spec file list determined (always 3: coding-conventions, architecture-constraints, learnings).
|
|
53
|
+
- REQUIRED: Optional spec files determined by detected signals only.
|
|
54
|
+
|
|
55
|
+
**GATE 3: Plan → Write**
|
|
56
|
+
- REQUIRED: User confirmed the full list of files to create via ask_user (showing core specs, optional specs, recipe knowhow, and detected signals).
|
|
57
|
+
- BLOCKED if: user declines — abort without writing.
|
|
58
|
+
|
|
59
|
+
**GATE 4: Write → Report**
|
|
60
|
+
- REQUIRED: All confirmed files written to .workflow/specs/ and .workflow/knowhow/.
|
|
61
|
+
- REQUIRED: Existing files skipped (not overwritten).
|
|
62
|
+
- REQUIRED: .proposed.md files created when slug collision detected (W003).
|
|
63
|
+
|
|
34
64
|
**Confirmation gate**: After scanning codebase and determining which files/directories will be created (core specs, optional specs, recipe knowhow), ask_user showing the full list of files to create with their categories and detected signals. Proceed only on user confirm.
|
|
35
65
|
</execution>
|
|
36
66
|
|
|
@@ -36,6 +36,15 @@ Domain term lifecycle: discover/manual → register → active → (optional) de
|
|
|
36
36
|
- `maestro domain deprecate <canonical> --successor <new>` — deprecate a term
|
|
37
37
|
</context>
|
|
38
38
|
|
|
39
|
+
<invariants>
|
|
40
|
+
1. **Single-term atomic operation** — each invocation registers exactly ONE term; NEVER batch-write multiple terms in a single execution
|
|
41
|
+
2. **Glossary append-only** — existing terms in `glossary.yaml` SHALL NOT be modified or removed; only new entries are appended
|
|
42
|
+
3. **Duplicate guard** — MUST check for exact canonical name match AND near-matches before writing; NEVER create duplicate entries
|
|
43
|
+
4. **Confirmation mandatory** — MUST present term details (canonical, definition, aliases, tier, path) via ask_question before any glossary write; NEVER write without user confirmation
|
|
44
|
+
5. **Schema compliance** — every term entry MUST include canonical name, definition, tier, and at least one alias/keyword; incomplete entries SHALL NOT be persisted
|
|
45
|
+
6. **Domain directory prerequisite** — `.workflow/domain/` MUST exist before writing; NEVER auto-create the directory (E002 if missing)
|
|
46
|
+
</invariants>
|
|
47
|
+
|
|
39
48
|
<execution>
|
|
40
49
|
Follow '~/.maestro/workflows/domain-add.md' completely.
|
|
41
50
|
|
|
@@ -30,8 +30,19 @@ $ARGUMENTS — target path/module and optional flags.
|
|
|
30
30
|
|
|
31
31
|
**Storage read**: target files + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
|
|
32
32
|
**Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
|
|
33
|
+
|
|
34
|
+
**Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
|
|
33
35
|
</context>
|
|
34
36
|
|
|
37
|
+
<invariants>
|
|
38
|
+
1. **Read-only analysis** — NEVER modify source code files under analysis; all writes go to `.workflow/` only
|
|
39
|
+
2. **Evidence-anchored findings** — every pattern MUST include at least one `file:line` anchor from source; unanchored patterns SHALL NOT be persisted
|
|
40
|
+
3. **Dedup before persist** — MUST cross-reference against existing `learnings.md` and `coding-conventions.md` before writing; duplicate entries SHALL NOT be appended
|
|
41
|
+
4. **Parallel agent isolation** — each dimension agent operates independently; NEVER share state between agents during analysis
|
|
42
|
+
5. **Confirmation gate** — unless `-y` is set, MUST present all findings and target files via ask_question before any writes
|
|
43
|
+
6. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
|
|
44
|
+
</invariants>
|
|
45
|
+
|
|
35
46
|
<state_machine>
|
|
36
47
|
|
|
37
48
|
<states>
|
|
@@ -102,6 +113,7 @@ Flag contradictions (finding conflicts with documented convention). Merge duplic
|
|
|
102
113
|
<error_codes>
|
|
103
114
|
| Code | Condition | Recovery |
|
|
104
115
|
|------|-----------|----------|
|
|
116
|
+
| E001 | No target path/module provided | Prompt user for target |
|
|
105
117
|
| E002 | No source files in target | Check target has .ts/.js files |
|
|
106
118
|
| W001 | One+ dimension agent failed | Proceed with available dimensions |
|
|
107
119
|
| W002 | .workflow/specs/learnings.md missing or malformed | Treat all patterns as new; create file on persist |
|
|
@@ -35,8 +35,46 @@ $ARGUMENTS — target and optional flags.
|
|
|
35
35
|
|
|
36
36
|
**Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` + `.workflow/specs/learnings.md` (dedup)
|
|
37
37
|
**Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append `.workflow/specs/learnings.md`
|
|
38
|
+
|
|
39
|
+
**Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-follow-{slug}-{date}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
|
|
38
40
|
</context>
|
|
39
41
|
|
|
42
|
+
<invariants>
|
|
43
|
+
1. **Read-only traversal** — NEVER modify source code or wiki entries under analysis; all writes go to `.workflow/` only
|
|
44
|
+
2. **Forcing questions mandatory** — each section MUST have all 4 forcing questions applied; NEVER skip questions even for trivial sections
|
|
45
|
+
3. **Anchor requirement** — every extracted pattern MUST include a `file:line` anchor; unanchored patterns SHALL NOT be persisted to learnings.md
|
|
46
|
+
4. **Convention cross-ref** — MUST check every finding against `coding-conventions.md` and mark status (documented/candidate); NEVER persist without status tag
|
|
47
|
+
5. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
|
|
48
|
+
6. **Confirmation gate** — unless `-y` is set, MUST present findings and target files via ask_question before any writes
|
|
49
|
+
7. **Depth contract** — `--depth shallow` MUST NOT descend into function bodies; `--depth deep` MUST cover every branch and sub-expression
|
|
50
|
+
</invariants>
|
|
51
|
+
|
|
52
|
+
<execution>
|
|
53
|
+
|
|
54
|
+
### Phase Gates (MANDATORY, BLOCKING)
|
|
55
|
+
|
|
56
|
+
**GATE 1: Resolve → Context Building** (S_RESOLVE → S_CONTEXT)
|
|
57
|
+
- REQUIRED: Target resolved to a readable source (file path, wiki entry, or search result).
|
|
58
|
+
- BLOCKED if: target unresolvable after user prompt (E001/E002).
|
|
59
|
+
|
|
60
|
+
**GATE 2: Reading → Extraction** (S_READ → S_EXTRACT)
|
|
61
|
+
- REQUIRED: All sections traversed with 4 forcing questions applied per section.
|
|
62
|
+
- REQUIRED: Depth contract honored — shallow stays at top-level, deep covers every branch.
|
|
63
|
+
- BLOCKED if: any section skipped without forcing questions.
|
|
64
|
+
|
|
65
|
+
**GATE 3: Extraction → Persistence** (S_EXTRACT → S_PERSIST)
|
|
66
|
+
- REQUIRED: All extracted patterns have file:line anchors.
|
|
67
|
+
- REQUIRED: Convention cross-ref completed against coding-conventions.md (or marked "unknown status" if W002).
|
|
68
|
+
- BLOCKED if: unanchored patterns remain in extraction results.
|
|
69
|
+
|
|
70
|
+
**GATE 4: Persistence → Completion** (S_PERSIST → END)
|
|
71
|
+
- REQUIRED: Unless `-y`, ask_question showing files to write and spec-entries to append — user must confirm.
|
|
72
|
+
- REQUIRED: KNW-follow-{slug}-{date}.md written with understanding map.
|
|
73
|
+
- REQUIRED: learnings.md appended (not overwritten) with new spec-entry blocks.
|
|
74
|
+
- BLOCKED if: user declines confirmation — offer to adjust findings before retry.
|
|
75
|
+
|
|
76
|
+
</execution>
|
|
77
|
+
|
|
40
78
|
<state_machine>
|
|
41
79
|
|
|
42
80
|
<states>
|
|
@@ -114,6 +152,9 @@ Write understanding map: Key Concepts, Patterns (table: name/location/convention
|
|
|
114
152
|
<error_codes>
|
|
115
153
|
| Code | Condition | Recovery |
|
|
116
154
|
|------|-----------|----------|
|
|
155
|
+
| E001 | No target path/wiki-id/topic provided | Prompt user for target |
|
|
156
|
+
| E002 | Target path not found and wiki/grep search returned no results | Check path or broaden search terms |
|
|
157
|
+
| W001 | Wiki forward/backlinks unavailable | Proceed without context web; note reduced coverage |
|
|
117
158
|
| W002 | coding-conventions.md not found | All patterns marked "unknown status" |
|
|
118
159
|
| W003 | Target > 1000 lines | Auto-switch to shallow; use --depth deep to override |
|
|
119
160
|
</error_codes>
|
|
@@ -33,8 +33,20 @@ $ARGUMENTS — question text and optional flags.
|
|
|
33
33
|
- `.workflow/specs/learnings.md` — appended `<spec-entry>` blocks
|
|
34
34
|
|
|
35
35
|
**Storage read**: source files in scope + `maestro search` + `.workflow/specs/learnings.md` + `debug-notes.md` + `codebase/architecture.md`
|
|
36
|
+
|
|
37
|
+
**Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-investigate-{slug}/` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
|
|
36
38
|
</context>
|
|
37
39
|
|
|
40
|
+
<invariants>
|
|
41
|
+
1. **Read-only investigation** — NEVER modify source code files; all writes go to `.workflow/` only
|
|
42
|
+
2. **Evidence append-only** — `evidence.ndjson` MUST be appended line-by-line; NEVER overwrite or truncate existing evidence entries
|
|
43
|
+
3. **Scope lock** — once `--scope` is resolved in S_FRAME, NEVER expand search scope without explicit user confirmation via S_ESCALATE
|
|
44
|
+
4. **Hypothesis cap** — MUST NOT generate more than `--max-hypotheses` (default 3) before triggering escalation; NEVER silently exceed the cap
|
|
45
|
+
5. **Structured evidence format** — every evidence entry MUST include `{ts, type, source, relevance, content, note}`; incomplete entries SHALL NOT be appended
|
|
46
|
+
6. **3-strike escalation** — after all hypotheses fail, MUST escalate to user via ask_question; NEVER silently conclude as INCONCLUSIVE without user interaction
|
|
47
|
+
7. **Confirmation gate** — unless `-y` is set, MUST present report.md path and spec-entries via ask_question before final writes
|
|
48
|
+
</invariants>
|
|
49
|
+
|
|
38
50
|
<state_machine>
|
|
39
51
|
|
|
40
52
|
<states>
|
|
@@ -136,7 +148,9 @@ Append to .workflow/specs/learnings.md: confirmed → roles="implement", disprov
|
|
|
136
148
|
<error_codes>
|
|
137
149
|
| Code | Condition | Recovery |
|
|
138
150
|
|------|-----------|----------|
|
|
151
|
+
| E001 | No question text provided | Prompt user for investigation question |
|
|
139
152
|
| E002 | --scope path not found | Check path |
|
|
153
|
+
| W001 | Prior knowledge search returned no results | Proceed without prior context; note cold-start |
|
|
140
154
|
| W002 | Very few evidence matches (<3) | Broaden search terms or expand scope |
|
|
141
155
|
| W003 | All hypotheses inconclusive | Investigation marked INCONCLUSIVE |
|
|
142
156
|
</error_codes>
|
|
@@ -36,8 +36,19 @@ $ARGUMENTS — target and optional mode flag.
|
|
|
36
36
|
**Pre-load** (optional): `Skill("spec-load")` for conventions + `maestro search "<target topic>"` for related entries.
|
|
37
37
|
|
|
38
38
|
**Output**: `.workflow/knowhow/KNW-opinion-{slug}-{YYYY-MM-DD}.md`
|
|
39
|
+
|
|
40
|
+
**Output boundary**: ALL file writes MUST target `.workflow/knowhow/KNW-opinion-{slug}-{YYYY-MM-DD}.md` and `.workflow/specs/learnings.md` only. NEVER modify source code or files outside these paths.
|
|
39
41
|
</context>
|
|
40
42
|
|
|
43
|
+
<invariants>
|
|
44
|
+
1. **Read-only analysis** — NEVER modify source code, wiki entries, or plan files under review; all writes go to `.workflow/` only
|
|
45
|
+
2. **Agent independence** — in review mode, each of the 3 agents (Pragmatist/Purist/Strategist) MUST operate independently without shared state; NEVER pass one agent's findings to another
|
|
46
|
+
3. **Evidence-backed verdicts** — every finding MUST include a `location` reference (file:line or section); ungrounded opinions SHALL NOT appear in the report
|
|
47
|
+
4. **Mode contract** — MUST execute exactly the mode specified (review/challenge/consult); NEVER mix mode behaviors within a single execution
|
|
48
|
+
5. **Append-only learnings** — `.workflow/specs/learnings.md` MUST be appended, NEVER overwritten or truncated
|
|
49
|
+
6. **Confirmation gate** — unless `-y` is set, MUST present findings and target files via ask_question before any writes
|
|
50
|
+
</invariants>
|
|
51
|
+
|
|
41
52
|
<state_machine>
|
|
42
53
|
|
|
43
54
|
<states>
|
|
@@ -106,8 +117,11 @@ Interactive loop:
|
|
|
106
117
|
<error_codes>
|
|
107
118
|
| Code | Condition | Recovery |
|
|
108
119
|
|------|-----------|----------|
|
|
120
|
+
| E001 | No target provided | Prompt user for target (path, wiki ID, HEAD, staged, or phase) |
|
|
109
121
|
| E002 | Unknown --mode value | Use: review, challenge, or consult |
|
|
122
|
+
| E003 | Target resolution failed — path not found, wiki ID invalid, or no staged changes | Check target exists |
|
|
110
123
|
| W001 | One review agent failed | Proceed with available perspectives |
|
|
124
|
+
| W002 | Specs/wiki pre-load unavailable | Proceed without convention context; note reduced coverage |
|
|
111
125
|
</error_codes>
|
|
112
126
|
|
|
113
127
|
<success_criteria>
|