maestro-flow 0.3.46 → 0.3.48
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/.claude/agents/ui-design-agent.md +1 -0
- package/.claude/agents/workflow-executor.md +3 -0
- package/.claude/commands/learn-decompose.md +91 -146
- package/.claude/commands/learn-follow.md +102 -137
- package/.claude/commands/learn-investigate.md +102 -167
- package/.claude/commands/learn-retro.md +100 -243
- package/.claude/commands/learn-second-opinion.md +95 -135
- package/.claude/commands/maestro-amend.md +95 -232
- package/.claude/commands/maestro-analyze.md +1 -6
- package/.claude/commands/maestro-collab.md +104 -265
- package/.claude/commands/maestro-composer.md +113 -293
- package/.claude/commands/maestro-execute.md +10 -17
- package/.claude/commands/maestro-impeccable.md +89 -0
- package/.claude/commands/maestro-plan.md +1 -6
- package/.claude/commands/maestro-player.md +111 -340
- package/.claude/commands/maestro-quick.md +9 -0
- package/.claude/commands/maestro-ralph-execute.md +167 -210
- package/.claude/commands/maestro-ralph.md +245 -426
- package/.claude/commands/maestro-ui-codify.md +13 -0
- package/.claude/commands/maestro-ui-craft.md +364 -0
- package/.claude/commands/maestro-ui-design.md +12 -1
- package/.claude/commands/maestro-verify.md +12 -13
- package/.claude/commands/maestro.md +142 -72
- package/.claude/commands/manage-knowhow-capture.md +45 -170
- package/.claude/commands/quality-auto-test.md +9 -0
- package/.claude/commands/quality-debug.md +11 -25
- package/.claude/commands/quality-refactor.md +9 -0
- package/.claude/commands/quality-review.md +5 -14
- package/.claude/commands/spec-add.md +1 -1
- package/.claude/commands/spec-load.md +3 -2
- package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
- package/.codex/skills/learn-decompose/SKILL.md +1 -1
- package/.codex/skills/learn-investigate/SKILL.md +2 -1
- package/.codex/skills/maestro/SKILL.md +420 -313
- package/.codex/skills/maestro-analyze/SKILL.md +126 -417
- package/.codex/skills/maestro-brainstorm/SKILL.md +129 -451
- package/.codex/skills/maestro-collab/SKILL.md +134 -547
- package/.codex/skills/maestro-execute/SKILL.md +3 -1
- package/.codex/skills/maestro-impeccable/SKILL.md +112 -0
- package/.codex/skills/maestro-plan/SKILL.md +88 -437
- package/.codex/skills/maestro-player/SKILL.md +191 -333
- package/.codex/skills/maestro-quick/SKILL.md +2 -0
- package/.codex/skills/maestro-ralph/SKILL.md +327 -710
- package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
- package/.codex/skills/maestro-ui-codify/SKILL.md +1 -0
- package/.codex/skills/maestro-ui-craft/SKILL.md +341 -0
- package/.codex/skills/maestro-ui-design/SKILL.md +10 -0
- package/.codex/skills/maestro-verify/SKILL.md +116 -409
- package/.codex/skills/quality-auto-test/SKILL.md +145 -443
- package/.codex/skills/quality-refactor/SKILL.md +1 -1
- package/.codex/skills/quality-test/SKILL.md +229 -517
- package/.codex/skills/spec-add/SKILL.md +1 -1
- package/README.md +4 -1
- package/README.zh-CN.md +3 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +3 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js +110 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js +56 -0
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +3 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +1 -3
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/agents/cli-history-store.d.ts +5 -0
- package/dist/src/agents/cli-history-store.d.ts.map +1 -1
- package/dist/src/agents/cli-history-store.js +65 -13
- package/dist/src/agents/cli-history-store.js.map +1 -1
- package/dist/src/cli.js +13 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/command-help.d.ts +3 -0
- package/dist/src/commands/command-help.d.ts.map +1 -0
- package/dist/src/commands/command-help.js +60 -0
- package/dist/src/commands/command-help.js.map +1 -0
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +17 -0
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +12 -2
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/impeccable.d.ts +10 -0
- package/dist/src/commands/impeccable.d.ts.map +1 -0
- package/dist/src/commands/impeccable.js +181 -0
- package/dist/src/commands/impeccable.js.map +1 -0
- package/dist/src/commands/spec.js +1 -1
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +5 -1
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +10 -7
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/core/addon-registry.d.ts +31 -0
- package/dist/src/core/addon-registry.d.ts.map +1 -0
- package/dist/src/core/addon-registry.js +28 -0
- package/dist/src/core/addon-registry.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.js +2 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.js +2 -2
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/impeccable/critique-storage.d.ts +28 -0
- package/dist/src/tools/impeccable/critique-storage.d.ts.map +1 -0
- package/dist/src/tools/impeccable/critique-storage.js +120 -0
- package/dist/src/tools/impeccable/critique-storage.js.map +1 -0
- package/dist/src/tools/impeccable/design-parser.d.ts +90 -0
- package/dist/src/tools/impeccable/design-parser.d.ts.map +1 -0
- package/dist/src/tools/impeccable/design-parser.js +696 -0
- package/dist/src/tools/impeccable/design-parser.js.map +1 -0
- package/dist/src/tools/impeccable/detect-csp.d.ts +6 -0
- package/dist/src/tools/impeccable/detect-csp.d.ts.map +1 -0
- package/dist/src/tools/impeccable/detect-csp.js +130 -0
- package/dist/src/tools/impeccable/detect-csp.js.map +1 -0
- package/dist/src/tools/impeccable/is-generated.d.ts +4 -0
- package/dist/src/tools/impeccable/is-generated.d.ts.map +1 -0
- package/dist/src/tools/impeccable/is-generated.js +56 -0
- package/dist/src/tools/impeccable/is-generated.js.map +1 -0
- package/dist/src/tools/impeccable/live/accept.d.ts +50 -0
- package/dist/src/tools/impeccable/live/accept.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/accept.js +556 -0
- package/dist/src/tools/impeccable/live/accept.js.map +1 -0
- package/dist/src/tools/impeccable/live/bootstrap.d.ts +2 -0
- package/dist/src/tools/impeccable/live/bootstrap.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/bootstrap.js +244 -0
- package/dist/src/tools/impeccable/live/bootstrap.js.map +1 -0
- package/dist/src/tools/impeccable/live/complete.d.ts +7 -0
- package/dist/src/tools/impeccable/live/complete.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/complete.js +67 -0
- package/dist/src/tools/impeccable/live/complete.js.map +1 -0
- package/dist/src/tools/impeccable/live/completion.d.ts +24 -0
- package/dist/src/tools/impeccable/live/completion.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/completion.js +26 -0
- package/dist/src/tools/impeccable/live/completion.js.map +1 -0
- package/dist/src/tools/impeccable/live/inject.d.ts +41 -0
- package/dist/src/tools/impeccable/live/inject.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/inject.js +394 -0
- package/dist/src/tools/impeccable/live/inject.js.map +1 -0
- package/dist/src/tools/impeccable/live/poll.d.ts +24 -0
- package/dist/src/tools/impeccable/live/poll.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/poll.js +180 -0
- package/dist/src/tools/impeccable/live/poll.js.map +1 -0
- package/dist/src/tools/impeccable/live/resume.d.ts +5 -0
- package/dist/src/tools/impeccable/live/resume.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/resume.js +30 -0
- package/dist/src/tools/impeccable/live/resume.js.map +1 -0
- package/dist/src/tools/impeccable/live/server.d.ts +6 -0
- package/dist/src/tools/impeccable/live/server.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/server.js +867 -0
- package/dist/src/tools/impeccable/live/server.js.map +1 -0
- package/dist/src/tools/impeccable/live/session-store.d.ts +72 -0
- package/dist/src/tools/impeccable/live/session-store.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/session-store.js +281 -0
- package/dist/src/tools/impeccable/live/session-store.js.map +1 -0
- package/dist/src/tools/impeccable/live/static/live-browser-session.js +123 -0
- package/dist/src/tools/impeccable/live/static/live-browser.js +4860 -0
- package/dist/src/tools/impeccable/live/static/modern-screenshot.umd.js +14 -0
- package/dist/src/tools/impeccable/live/status.d.ts +2 -0
- package/dist/src/tools/impeccable/live/status.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/status.js +52 -0
- package/dist/src/tools/impeccable/live/status.js.map +1 -0
- package/dist/src/tools/impeccable/live/wrap.d.ts +33 -0
- package/dist/src/tools/impeccable/live/wrap.d.ts.map +1 -0
- package/dist/src/tools/impeccable/live/wrap.js +572 -0
- package/dist/src/tools/impeccable/live/wrap.js.map +1 -0
- package/dist/src/tools/impeccable/load-context.d.ts +13 -0
- package/dist/src/tools/impeccable/load-context.d.ts.map +1 -0
- package/dist/src/tools/impeccable/load-context.js +79 -0
- package/dist/src/tools/impeccable/load-context.js.map +1 -0
- package/dist/src/tools/impeccable/paths.d.ts +34 -0
- package/dist/src/tools/impeccable/paths.d.ts.map +1 -0
- package/dist/src/tools/impeccable/paths.js +102 -0
- package/dist/src/tools/impeccable/paths.js.map +1 -0
- package/dist/src/tools/spec-entry-parser.d.ts +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +1 -1
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +26 -1
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +1 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +2 -0
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/package.json +2 -2
- package/workflows/claude-instructions.md +17 -5
- package/workflows/cli-tools-usage.md +10 -3
- package/workflows/delegate-usage.md +3 -2
- package/workflows/impeccable/adapt.md +190 -0
- package/workflows/impeccable/animate.md +175 -0
- package/workflows/impeccable/audit.md +133 -0
- package/workflows/impeccable/bolder.md +113 -0
- package/workflows/impeccable/brand.md +118 -0
- package/workflows/impeccable/clarify.md +174 -0
- package/workflows/impeccable/codex.md +105 -0
- package/workflows/impeccable/cognitive-load.md +106 -0
- package/workflows/impeccable/color-and-contrast.md +105 -0
- package/workflows/impeccable/colorize.md +154 -0
- package/workflows/impeccable/craft.md +123 -0
- package/workflows/impeccable/critique.md +261 -0
- package/workflows/impeccable/delight.md +302 -0
- package/workflows/impeccable/distill.md +111 -0
- package/workflows/impeccable/document.md +439 -0
- package/workflows/impeccable/extract.md +69 -0
- package/workflows/impeccable/harden.md +347 -0
- package/workflows/impeccable/heuristics-scoring.md +234 -0
- package/workflows/impeccable/interaction-design.md +195 -0
- package/workflows/impeccable/layout.md +141 -0
- package/workflows/impeccable/live.md +622 -0
- package/workflows/impeccable/motion-design.md +109 -0
- package/workflows/impeccable/onboard.md +234 -0
- package/workflows/impeccable/optimize.md +258 -0
- package/workflows/impeccable/overdrive.md +130 -0
- package/workflows/impeccable/personas.md +179 -0
- package/workflows/impeccable/polish.md +242 -0
- package/workflows/impeccable/product.md +62 -0
- package/workflows/impeccable/quieter.md +99 -0
- package/workflows/impeccable/responsive-design.md +114 -0
- package/workflows/impeccable/shape.md +165 -0
- package/workflows/impeccable/spatial-design.md +100 -0
- package/workflows/impeccable/teach.md +168 -0
- package/workflows/impeccable/typeset.md +124 -0
- package/workflows/impeccable/typography.md +159 -0
- package/workflows/impeccable/ux-writing.md +107 -0
- package/workflows/impeccable.md +164 -0
- package/workflows/maestro.md +7 -3
- package/workflows/skill-authoring.md +265 -0
- package/workflows/specs-add.md +3 -2
- package/workflows/specs-load.md +2 -1
- package/workflows/specs-setup.md +21 -1
|
@@ -12,206 +12,141 @@ allowed-tools:
|
|
|
12
12
|
- AskUserQuestion
|
|
13
13
|
---
|
|
14
14
|
<purpose>
|
|
15
|
-
Systematic investigation
|
|
15
|
+
Systematic investigation for understanding questions (not bug-fixing). 4-phase scientific method with scope lock and 3-strike escalation. Produces evidence trails and understanding docs that persist to the learning system.
|
|
16
16
|
|
|
17
|
-
Unlike `quality-debug`
|
|
17
|
+
Unlike `quality-debug` (fix bugs during execution), this answers "how does X work?", "why does Y happen?", "what if Z?".
|
|
18
18
|
</purpose>
|
|
19
19
|
|
|
20
20
|
<context>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- `.workflow/knowhow/KNW-investigate-{slug}/
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
**Storage read:**
|
|
36
|
-
- Source files within scope
|
|
37
|
-
- `maestro wiki search "<question>"` — Prior knowledge about the topic
|
|
38
|
-
- `.workflow/knowhow/specs/learnings.md` — Prior related investigations
|
|
39
|
-
- `.workflow/specs/debug-notes.md` — Known gotchas and patterns
|
|
40
|
-
- `.workflow/codebase/architecture.md` — Structural context (if exists)
|
|
21
|
+
$ARGUMENTS — question text and optional flags.
|
|
22
|
+
|
|
23
|
+
**Flags**:
|
|
24
|
+
- `--scope <path>`: Restrict to files under this dir (default: entire project)
|
|
25
|
+
- `--max-hypotheses N`: Max hypotheses before escalation (default: 3)
|
|
26
|
+
|
|
27
|
+
**Storage write**:
|
|
28
|
+
- `.workflow/knowhow/KNW-investigate-{slug}/evidence.ndjson` — structured evidence (one JSON line per item)
|
|
29
|
+
- `.workflow/knowhow/KNW-investigate-{slug}/understanding.md` — evolving understanding
|
|
30
|
+
- `.workflow/knowhow/KNW-investigate-{slug}/report.md` — final report
|
|
31
|
+
- `specs/learnings.md` — appended `<spec-entry>` blocks
|
|
32
|
+
|
|
33
|
+
**Storage read**: source files in scope + `maestro wiki search` + `specs/learnings.md` + `debug-notes.md` + `codebase/architecture.md`
|
|
41
34
|
</context>
|
|
42
35
|
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
### Stage 1: Frame the Question
|
|
46
|
-
- Parse question from arguments
|
|
47
|
-
- Determine scope (--scope or full project)
|
|
48
|
-
- Generate investigation slug from question keywords
|
|
49
|
-
- Create `.workflow/knowhow/KNW-investigate-{slug}/` directory
|
|
50
|
-
- Search prior knowledge:
|
|
51
|
-
- `maestro wiki search "<question>"` for related entries
|
|
52
|
-
- Search `specs/learnings.md` for related insights
|
|
53
|
-
- Read `debug-notes.md` for known gotchas
|
|
54
|
-
|
|
55
|
-
Write initial `understanding.md`:
|
|
56
|
-
```markdown
|
|
57
|
-
# Investigation: {question}
|
|
58
|
-
## Initial Understanding
|
|
59
|
-
- Prior knowledge: {summary of wiki/knowhow findings}
|
|
60
|
-
- Scope: {path or "full project"}
|
|
61
|
-
- Started: {timestamp}
|
|
62
|
-
```
|
|
36
|
+
<state_machine>
|
|
63
37
|
|
|
64
|
-
|
|
65
|
-
|
|
38
|
+
<states>
|
|
39
|
+
S_FRAME — 解析问题、确定 scope、搜索先验知识 PERSIST: understanding.md (initial)
|
|
40
|
+
S_EVIDENCE — 系统收集证据 PERSIST: evidence.ndjson
|
|
41
|
+
S_PATTERN — 比对已知模式 PERSIST: understanding.md (patterns)
|
|
42
|
+
S_HYPOTHESIZE — 生成假设列表 PERSIST: understanding.md (hypotheses)
|
|
43
|
+
S_CLI_EXPLORE — CLI 辅助探索(可选) PERSIST: evidence.ndjson (append)
|
|
44
|
+
S_TEST — 逐假设测试 PERSIST: evidence.ndjson + understanding.md
|
|
45
|
+
S_ESCALATE — 3-strike 升级 PERSIST: —
|
|
46
|
+
S_REPORT — 综合报告 + persist PERSIST: report.md + specs/learnings.md
|
|
47
|
+
</states>
|
|
66
48
|
|
|
67
|
-
|
|
68
|
-
2. **File inspection**: Read the most relevant files identified by search
|
|
69
|
-
3. **Import/dependency tracing**: Follow imports to understand the dependency chain
|
|
70
|
-
4. **Git history**: `git log --oneline -10 -- <relevant-files>` for recent changes
|
|
49
|
+
<transitions>
|
|
71
50
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{"ts": "ISO", "type": "code|git|search|doc", "source": "file:line", "relevance": "high|medium|low", "content": "...", "note": "why this matters"}
|
|
75
|
-
```
|
|
51
|
+
S_FRAME:
|
|
52
|
+
→ S_EVIDENCE DO: A_FRAME_QUESTION
|
|
76
53
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
- Check `debug-notes.md` entries for matching situations
|
|
80
|
-
- Check `specs/learnings.md` for related technique/pattern/gotcha entries
|
|
81
|
-
- Identify: does this match a documented pattern, or is it novel?
|
|
82
|
-
|
|
83
|
-
Update `understanding.md` with pattern analysis section.
|
|
84
|
-
|
|
85
|
-
### Stage 4: Hypothesis Formation
|
|
86
|
-
From evidence and patterns, generate ranked hypotheses:
|
|
87
|
-
- Each hypothesis: a specific, testable claim about "how/why"
|
|
88
|
-
- Rank by plausibility (evidence strength)
|
|
89
|
-
- Write hypotheses to `understanding.md`
|
|
90
|
-
|
|
91
|
-
```markdown
|
|
92
|
-
## Hypotheses
|
|
93
|
-
1. **[HIGH]** {hypothesis 1} — Evidence: {refs}
|
|
94
|
-
2. **[MEDIUM]** {hypothesis 2} — Evidence: {refs}
|
|
95
|
-
3. **[LOW]** {hypothesis 3} — Evidence: {refs}
|
|
96
|
-
```
|
|
54
|
+
S_EVIDENCE:
|
|
55
|
+
→ S_PATTERN DO: A_COLLECT_EVIDENCE
|
|
97
56
|
|
|
98
|
-
|
|
57
|
+
S_PATTERN:
|
|
58
|
+
→ S_HYPOTHESIZE DO: match evidence against debug-notes.md + specs/learnings.md patterns
|
|
99
59
|
|
|
100
|
-
|
|
60
|
+
S_HYPOTHESIZE:
|
|
61
|
+
→ S_CLI_EXPLORE WHEN: CLI tools enabled AND hypotheses non-trivial DO: A_FORM_HYPOTHESES
|
|
62
|
+
→ S_TEST WHEN: no CLI tools OR trivial hypotheses DO: A_FORM_HYPOTHESES
|
|
101
63
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
hypothesis_summary = hypotheses.map(h => "${h.rank}: ${h.claim}").join("\n")
|
|
106
|
-
|
|
107
|
-
Bash({
|
|
108
|
-
command: 'maestro delegate "PURPOSE: Gather evidence for investigation hypotheses
|
|
109
|
-
TASK: For each hypothesis, trace relevant call chains and data flows | Find corroborating or contradicting code patterns
|
|
110
|
-
MODE: analysis
|
|
111
|
-
CONTEXT: @${scope_path}/**/*
|
|
112
|
-
EXPECTED: JSON array of { hypothesis_rank, evidence: [{ file, line, supports: bool, explanation }] }
|
|
113
|
-
CONSTRAINTS: Focus on code-level evidence only | Max 5 evidence items per hypothesis
|
|
114
|
-
|
|
115
|
-
Hypotheses:
|
|
116
|
-
${hypothesis_summary}
|
|
117
|
-
" --role explore --mode analysis',
|
|
118
|
-
run_in_background: true
|
|
119
|
-
})
|
|
120
|
-
```
|
|
64
|
+
S_CLI_EXPLORE:
|
|
65
|
+
→ S_TEST DO: A_CLI_SUPPLEMENT (maestro delegate --role explore --mode analysis, run_in_background, STOP)
|
|
121
66
|
|
|
122
|
-
|
|
67
|
+
S_TEST:
|
|
68
|
+
→ S_REPORT WHEN: hypothesis confirmed DO: A_TEST_HYPOTHESIS
|
|
69
|
+
→ S_REPORT WHEN: all hypotheses tested (some confirmed) DO: A_TEST_HYPOTHESIS
|
|
70
|
+
→ S_ESCALATE WHEN: max_hypotheses all failed DO: A_TEST_HYPOTHESIS
|
|
123
71
|
|
|
124
|
-
|
|
125
|
-
|
|
72
|
+
S_ESCALATE:
|
|
73
|
+
→ S_HYPOTHESIZE WHEN: user broadens scope or provides new hypothesis DO: AskUserQuestion
|
|
74
|
+
→ S_REPORT WHEN: user selects "Escalate" or still stuck DO: mark INCONCLUSIVE
|
|
126
75
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
3. **Record result**: Append to `evidence.ndjson` with `type: "test"`
|
|
130
|
-
4. **Update understanding**: Mark hypothesis as confirmed / disproved / inconclusive
|
|
76
|
+
S_REPORT:
|
|
77
|
+
→ END DO: A_SYNTHESIZE_REPORT
|
|
131
78
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
- Test: {what was done}
|
|
136
|
-
- Result: CONFIRMED / DISPROVED / INCONCLUSIVE
|
|
137
|
-
- Evidence: {file:line references}
|
|
138
|
-
```
|
|
79
|
+
</transitions>
|
|
80
|
+
|
|
81
|
+
<actions>
|
|
139
82
|
|
|
140
|
-
###
|
|
141
|
-
If `--max-hypotheses` hypotheses all fail:
|
|
83
|
+
### A_FRAME_QUESTION
|
|
142
84
|
|
|
143
|
-
1.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
A) Broaden scope to full project
|
|
147
|
-
B) I have a new hypothesis: [user provides]
|
|
148
|
-
C) Escalate — this needs deeper investigation
|
|
149
|
-
```
|
|
150
|
-
2. **Search wiki for clues**: `maestro wiki search` with alternative keywords
|
|
151
|
-
3. **If still stuck**: Mark as INCONCLUSIVE with what was learned and what remains unknown
|
|
85
|
+
1. Parse question, generate slug, create KNW-investigate-{slug}/
|
|
86
|
+
2. Search prior knowledge: `maestro wiki search "<question>"` + search specs/learnings.md + read debug-notes.md
|
|
87
|
+
3. Write initial understanding.md (question, prior knowledge summary, scope, timestamp)
|
|
152
88
|
|
|
153
|
-
###
|
|
154
|
-
Write final `report.md`:
|
|
89
|
+
### A_COLLECT_EVIDENCE
|
|
155
90
|
|
|
156
|
-
|
|
157
|
-
|
|
91
|
+
Parallel evidence gathering:
|
|
92
|
+
1. Code search: Grep keywords from question
|
|
93
|
+
2. File inspection: Read most relevant files
|
|
94
|
+
3. Import tracing: follow dependency chain
|
|
95
|
+
4. Git history: `git log --oneline -10 -- <relevant-files>`
|
|
158
96
|
|
|
159
|
-
|
|
160
|
-
{confirmed understanding or "INCONCLUSIVE: ..."}
|
|
97
|
+
Each item → append evidence.ndjson: `{ts, type (code|git|search|doc), source (file:line), relevance (high|medium|low), content, note}`
|
|
161
98
|
|
|
162
|
-
|
|
163
|
-
| # | Type | Source | Relevance | Finding |
|
|
164
|
-
|---|------|--------|-----------|---------|
|
|
165
|
-
| 1 | code | file:line | high | ... |
|
|
99
|
+
### A_FORM_HYPOTHESES
|
|
166
100
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
101
|
+
Generate ranked hypotheses: each is specific, testable claim about "how/why".
|
|
102
|
+
Rank by plausibility (evidence strength). Write to understanding.md:
|
|
103
|
+
- `[HIGH]` hypothesis — Evidence: {refs}
|
|
104
|
+
- `[MEDIUM]` hypothesis — Evidence: {refs}
|
|
171
105
|
|
|
172
|
-
|
|
173
|
-
- {learning 1}
|
|
174
|
-
- {learning 2}
|
|
106
|
+
### A_CLI_SUPPLEMENT
|
|
175
107
|
|
|
176
|
-
## Open Questions
|
|
177
|
-
- {what remains unknown}
|
|
178
108
|
```
|
|
109
|
+
maestro delegate "PURPOSE: Gather evidence for hypotheses
|
|
110
|
+
TASK: Trace call chains and data flows per hypothesis | Find corroborating/contradicting patterns
|
|
111
|
+
EXPECTED: JSON [{hypothesis_rank, evidence: [{file, line, supports: bool, explanation}]}]
|
|
112
|
+
" --role explore --mode analysis
|
|
113
|
+
```
|
|
114
|
+
Run_in_background, STOP, wait. On callback: append to evidence.ndjson.
|
|
115
|
+
|
|
116
|
+
### A_TEST_HYPOTHESIS
|
|
179
117
|
|
|
180
|
-
|
|
181
|
-
1.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
3. Display summary with answer and next steps
|
|
118
|
+
For each hypothesis (rank order):
|
|
119
|
+
1. Design test: what evidence would confirm/disprove?
|
|
120
|
+
2. Execute: code trace, targeted search, data inspection
|
|
121
|
+
3. Record: append evidence.ndjson with type: "test"
|
|
122
|
+
4. Update: mark hypothesis confirmed / disproved / inconclusive
|
|
186
123
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
</
|
|
124
|
+
### A_SYNTHESIZE_REPORT
|
|
125
|
+
|
|
126
|
+
Write report.md: Answer (or INCONCLUSIVE), Evidence Trail table, Hypotheses Tested table, Key Learnings, Open Questions.
|
|
127
|
+
Append to specs/learnings.md: confirmed → roles="implement", disproved → roles="analyze" (gotcha).
|
|
128
|
+
|
|
129
|
+
</actions>
|
|
130
|
+
|
|
131
|
+
</state_machine>
|
|
193
132
|
|
|
194
133
|
<error_codes>
|
|
195
|
-
| Code |
|
|
196
|
-
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
| W002 | warning | Evidence collection found very few matches (<3) | Broaden search terms or expand scope |
|
|
201
|
-
| W003 | warning | All hypotheses inconclusive — escalating | Investigation marked INCONCLUSIVE |
|
|
134
|
+
| Code | Condition | Recovery |
|
|
135
|
+
|------|-----------|----------|
|
|
136
|
+
| E002 | --scope path not found | Check path |
|
|
137
|
+
| W002 | Very few evidence matches (<3) | Broaden search terms or expand scope |
|
|
138
|
+
| W003 | All hypotheses inconclusive | Investigation marked INCONCLUSIVE |
|
|
202
139
|
</error_codes>
|
|
203
140
|
|
|
204
141
|
<success_criteria>
|
|
205
|
-
- [ ]
|
|
206
|
-
- [ ] Investigation directory created under `.workflow/knowhow/`
|
|
207
|
-
- [ ] Prior knowledge loaded from wiki and knowhow
|
|
208
|
-
- [ ] Evidence collected and logged to `evidence.ndjson` (structured NDJSON)
|
|
209
|
-
- [ ] Pattern matching performed against debug-notes and knowhow insights
|
|
142
|
+
- [ ] Evidence collected and logged to evidence.ndjson (structured NDJSON)
|
|
210
143
|
- [ ] At least 1 hypothesis formed and tested
|
|
211
|
-
- [ ]
|
|
212
|
-
- [ ]
|
|
213
|
-
- [ ] Findings appended to `specs/learnings.md` as `<spec-entry>` blocks with stable INS-ids
|
|
214
|
-
- [ ] 3-strike escalation triggered if all hypotheses fail
|
|
215
|
-
- [ ] No files modified outside `.workflow/knowhow/`
|
|
216
|
-
- [ ] Summary displayed with answer and next-step routing
|
|
144
|
+
- [ ] 3-strike escalation triggered if all fail
|
|
145
|
+
- [ ] Report + spec-entry blocks written
|
|
217
146
|
</success_criteria>
|
|
147
|
+
|
|
148
|
+
<next_step_routing>
|
|
149
|
+
- Save to specs → `/spec-add debug <finding>`
|
|
150
|
+
- Follow code → `/learn-follow <path>`
|
|
151
|
+
- Decompose patterns → `/learn-decompose <module>`
|
|
152
|
+
</next_step_routing>
|