maestro-flow 0.3.45 → 0.3.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/.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 +11 -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-tools-register.md +28 -7
- 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 -161
- package/.claude/commands/quality-auto-test.md +9 -0
- package/.claude/commands/quality-debug.md +11 -24
- package/.claude/commands/quality-refactor.md +9 -0
- package/.claude/commands/quality-review.md +5 -13
- package/.claude/commands/quality-test.md +5 -0
- package/.claude/commands/spec-add.md +1 -1
- package/.claude/commands/spec-load.md +3 -2
- package/.claude/skills/maestro-help/SKILL.md +264 -0
- package/.claude/skills/maestro-help/index/catalog.json +182 -0
- package/.claude/skills/maestro-help/phases/01-parse-intent.md +122 -0
- package/.claude/skills/maestro-help/phases/02-search-present.md +181 -0
- package/.claude/skills/maestro-help/phases/03-workflow-guide.md +186 -0
- package/.claude/skills/maestro-impeccable/SKILL.md +169 -0
- package/.codex/agents/team-supervisor.toml +40 -0
- package/.codex/agents/team-worker.toml +63 -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 +278 -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 +4 -2
- package/.codex/skills/maestro-help/SKILL.md +213 -0
- package/.codex/skills/maestro-help/catalog.json +182 -0
- 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 +307 -710
- package/.codex/skills/maestro-roadmap/SKILL.md +201 -518
- package/.codex/skills/maestro-tools-register/SKILL.md +29 -7
- 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/manage-knowhow-capture/SKILL.md +18 -3
- package/.codex/skills/quality-auto-test/SKILL.md +145 -443
- package/.codex/skills/quality-debug/SKILL.md +2 -1
- package/.codex/skills/quality-refactor/SKILL.md +1 -1
- package/.codex/skills/quality-review/SKILL.md +1 -1
- package/.codex/skills/quality-test/SKILL.md +229 -507
- 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/index.js +5 -3
- package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js +3 -3
- package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/index.js +14 -5
- package/dashboard/dist-server/dashboard/src/server/routes/index.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/maestro-coordinate.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js +181 -0
- package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js.map +1 -0
- 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/state/event-bus.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +2 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +58 -0
- package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.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/server/ws/handlers/agent-handler.d.ts +7 -2
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js +7 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js +9 -9
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.d.ts +113 -0
- package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js +6 -0
- package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/types.d.ts +4 -3
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.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/knowhow.d.ts.map +1 -1
- package/dist/src/commands/knowhow.js +7 -4
- package/dist/src/commands/knowhow.js.map +1 -1
- 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 +9 -4
- 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/dist/src/tools/store-knowhow.d.ts.map +1 -1
- package/dist/src/tools/store-knowhow.js +15 -6
- package/dist/src/tools/store-knowhow.js.map +1 -1
- package/package.json +5 -3
- 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
- package/workflows/tools-spec.md +20 -13
- package/.claude/commands/maestro-link-coordinate.md +0 -71
- package/.codex/skills/maestro-link-coordinate/SKILL.md +0 -257
|
@@ -12,289 +12,146 @@ allowed-tools:
|
|
|
12
12
|
- AskUserQuestion
|
|
13
13
|
---
|
|
14
14
|
<purpose>
|
|
15
|
-
Unified retrospective
|
|
15
|
+
Unified retrospective combining git activity analysis and decision quality evaluation. Works on raw git history and wiki/spec data. Two lenses (git, decision), usable independently or together.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
- **git**: Commit metrics, session detection, per-author breakdown, file hotspots, trend tracking
|
|
19
|
-
- **decision**: Decision tracing across wiki/specs/git, multi-perspective evaluation, lifecycle classification
|
|
20
|
-
|
|
21
|
-
All insights persist to `.workflow/knowhow/specs/learnings.md` as `<spec-entry>` blocks for cross-session queryability via `manage-learn`.
|
|
17
|
+
All insights persist to `specs/learnings.md` as `<spec-entry>` blocks.
|
|
22
18
|
</purpose>
|
|
23
19
|
|
|
24
20
|
<context>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
**Lens selection:**
|
|
28
|
-
- `--lens git` — Git activity retrospective only
|
|
29
|
-
- `--lens decision` — Decision evaluation only
|
|
30
|
-
- `--lens all` — Both lenses (default)
|
|
31
|
-
|
|
32
|
-
**Git lens flags:**
|
|
33
|
-
- `--days N` — Time window in days (default: 7)
|
|
34
|
-
- `--author <name>` — Filter commits by author name (substring match)
|
|
35
|
-
- `--area <path>` — Scope to files under a specific directory
|
|
36
|
-
- `--compare` — Compare against the previous retro report if one exists
|
|
37
|
-
|
|
38
|
-
**Decision lens flags:**
|
|
39
|
-
- `--phase N` — Decisions from phase N's context and related specs
|
|
40
|
-
- `--tag <tag>` — Decisions tagged with specific tag in wiki/specs
|
|
41
|
-
- `--id <id>` — Single decision by wiki ID or specs/learnings.md INS-id
|
|
42
|
-
|
|
43
|
-
**Storage written:**
|
|
44
|
-
- `.workflow/knowhow/KNW-retro-{YYYY-MM-DD}.md` — Unified human-readable report
|
|
45
|
-
- `.workflow/knowhow/KNW-retro-{YYYY-MM-DD}.json` — Structured metrics (machine-readable)
|
|
46
|
-
- `.workflow/knowhow/specs/learnings.md` — Appended `<spec-entry>` blocks (source: "retro-git" or "retro-decision")
|
|
47
|
-
|
|
48
|
-
**Storage read:**
|
|
49
|
-
- `.workflow/state.json` — Current phase context (optional)
|
|
50
|
-
- `.workflow/knowhow/KNW-retro-*.json` — Prior retro for trend comparison
|
|
51
|
-
- `.workflow/knowhow/specs/learnings.md` — Existing insights for dedup
|
|
52
|
-
- `maestro wiki list --type spec --json` — Spec entries (decision lens)
|
|
53
|
-
- `.workflow/specs/architecture-constraints.md` — Documented architectural decisions (decision lens)
|
|
54
|
-
- Phase context with Locked/Free/Deferred decisions (decision lens) — resolve via `state.json.artifacts[]` scratch paths
|
|
55
|
-
</context>
|
|
21
|
+
$ARGUMENTS — lens selection and scope flags.
|
|
56
22
|
|
|
57
|
-
|
|
23
|
+
**Lens**: `--lens git` | `--lens decision` | `--lens all` (default: all)
|
|
58
24
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- Extract lens-specific flags
|
|
62
|
-
- Check `.workflow/knowhow/` exists; bootstrap if missing
|
|
25
|
+
**Git lens flags**: `--days N` (default: 7), `--author <name>`, `--area <path>`, `--compare` (vs prior retro)
|
|
26
|
+
**Decision lens flags**: `--phase N`, `--tag <tag>`, `--id <id>` (single decision by wiki/INS id)
|
|
63
27
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
============================================================
|
|
69
|
-
Lens: {git | decision | all}
|
|
70
|
-
Scope: {days/author/area for git} {phase/tag/id for decision}
|
|
71
|
-
```
|
|
28
|
+
**Storage write**:
|
|
29
|
+
- `.workflow/knowhow/KNW-retro-{date}.md` — unified report
|
|
30
|
+
- `.workflow/knowhow/KNW-retro-{date}.json` — structured metrics
|
|
31
|
+
- `specs/learnings.md` — appended `<spec-entry>` blocks (source: retro-git / retro-decision)
|
|
72
32
|
|
|
73
|
-
|
|
33
|
+
**Storage read**: git history, `.workflow/state.json`, prior `KNW-retro-*.json`, `specs/learnings.md`, wiki specs, `architecture-constraints.md`, phase context files
|
|
34
|
+
</context>
|
|
74
35
|
|
|
75
|
-
|
|
36
|
+
<state_machine>
|
|
76
37
|
|
|
77
|
-
|
|
78
|
-
|
|
38
|
+
<states>
|
|
39
|
+
S_PARSE — 解析 lens + flags PERSIST: —
|
|
40
|
+
S_GIT — git 活动分析(lens=git/all 时) PERSIST: metrics
|
|
41
|
+
S_DECISION — 决策质量评估(lens=decision/all 时) PERSIST: evaluations
|
|
42
|
+
S_REPORT — 生成统一报告 PERSIST: .md + .json
|
|
43
|
+
S_PERSIST — 写 spec-entry 块 PERSIST: specs/learnings.md
|
|
44
|
+
</states>
|
|
79
45
|
|
|
80
|
-
|
|
81
|
-
# Commit stats with author, timestamp, subject, files changed
|
|
82
|
-
git log --since="<start-date>T00:00:00" --format="%H|%aN|%ae|%ai|%s" --shortstat
|
|
46
|
+
<transitions>
|
|
83
47
|
|
|
84
|
-
|
|
85
|
-
git
|
|
48
|
+
S_PARSE:
|
|
49
|
+
→ S_GIT WHEN: lens == git OR all DO: ensure .workflow/knowhow/ exists (mkdir -p)
|
|
50
|
+
→ S_DECISION WHEN: lens == decision DO: ensure .workflow/knowhow/ exists (mkdir -p)
|
|
86
51
|
|
|
87
|
-
|
|
88
|
-
|
|
52
|
+
S_GIT:
|
|
53
|
+
→ S_DECISION WHEN: lens == all DO: A_GIT_ANALYSIS
|
|
54
|
+
→ S_REPORT WHEN: lens == git DO: A_GIT_ANALYSIS
|
|
89
55
|
|
|
90
|
-
|
|
91
|
-
|
|
56
|
+
S_DECISION:
|
|
57
|
+
→ S_REPORT DO: A_DECISION_ANALYSIS
|
|
92
58
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
```
|
|
59
|
+
S_REPORT:
|
|
60
|
+
→ S_PERSIST DO: write KNW-retro-{date}.md + .json
|
|
96
61
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| Metric | Computation |
|
|
101
|
-
|--------|-------------|
|
|
102
|
-
| Commits | Count of non-merge commits |
|
|
103
|
-
| Contributors | Unique author count |
|
|
104
|
-
| Total insertions / deletions | Sum from shortstat |
|
|
105
|
-
| Net LOC | insertions - deletions |
|
|
106
|
-
| Test LOC (insertions) | Sum insertions for test files from numstat |
|
|
107
|
-
| Test ratio | test_insertions / total_insertions x 100% |
|
|
108
|
-
| Churn rate | Files changed >2 times / total unique files |
|
|
109
|
-
| Active days | Distinct dates with commits |
|
|
110
|
-
|
|
111
|
-
#### 2c: Detect Work Sessions
|
|
112
|
-
Cluster commits by >2hr gaps in timestamps:
|
|
113
|
-
- Per session: start time, end time, duration, commit count, primary focus area
|
|
114
|
-
- Compute: total sessions, avg session duration, avg LOC/session-hour
|
|
115
|
-
|
|
116
|
-
#### 2d: Per-Author Breakdown
|
|
117
|
-
For each author:
|
|
118
|
-
- Commit count, LOC added/removed, top 3 file areas
|
|
119
|
-
- Test ratio (their test LOC / their total LOC)
|
|
120
|
-
- Session count and patterns
|
|
121
|
-
|
|
122
|
-
#### 2e: Trend Comparison (if --compare or prior report exists)
|
|
123
|
-
- Find most recent `.workflow/knowhow/KNW-retro-*.json`
|
|
124
|
-
- Compute deltas: commits, LOC, test ratio, churn rate, session count
|
|
125
|
-
- Flag significant changes (>20% delta) as trend highlights
|
|
126
|
-
|
|
127
|
-
#### 2f: Distill Git Insights
|
|
128
|
-
- **High churn files** (changed >3 times): instability signal
|
|
129
|
-
- **Low test ratio areas** (<20%): testing gap
|
|
130
|
-
- **Session patterns**: scattered vs deep sessions
|
|
131
|
-
- **Area drift**: commits not aligned with current roadmap phase
|
|
132
|
-
|
|
133
|
-
Each insight: title, description, category (pattern/antipattern/technique), tags, confidence.
|
|
62
|
+
S_PERSIST:
|
|
63
|
+
→ END DO: append insights to specs/learnings.md via `maestro spec add learning`
|
|
64
|
+
RULE: INS-id = hash(lens + metric_or_decision_id + date) for cross-session stability
|
|
134
65
|
|
|
135
|
-
|
|
66
|
+
</transitions>
|
|
136
67
|
|
|
137
|
-
|
|
68
|
+
<actions>
|
|
138
69
|
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
maestro wiki search "decision" --json
|
|
142
|
-
maestro wiki list --type spec --json
|
|
143
|
-
git log --oneline --all --grep="decision\|chose\|decided\|architecture" -20
|
|
144
|
-
```
|
|
70
|
+
### A_GIT_ANALYSIS
|
|
145
71
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
#### 3b: Build Decision Registry
|
|
154
|
-
Per decision:
|
|
155
|
-
```json
|
|
156
|
-
{
|
|
157
|
-
"id": "source id",
|
|
158
|
-
"title": "what was decided",
|
|
159
|
-
"source": "wiki|spec|phase-context|knowhow|git",
|
|
160
|
-
"date": "when decided",
|
|
161
|
-
"rationale": "why",
|
|
162
|
-
"alternatives": "what was considered",
|
|
163
|
-
"phase": "which phase",
|
|
164
|
-
"implementation_evidence": ["file paths from git"]
|
|
165
|
-
}
|
|
72
|
+
**Parallel git commands**:
|
|
73
|
+
```bash
|
|
74
|
+
git log --since="{start}" --format="%H|%aN|%ae|%ai|%s" --shortstat
|
|
75
|
+
git log --since="{start}" --format="COMMIT:%H|%aN" --numstat
|
|
76
|
+
git log --since="{start}" --format="%at|%aN|%ai|%s" | sort -n
|
|
77
|
+
git log --since="{start}" --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -20
|
|
78
|
+
git shortlog --since="{start}" -sn --no-merges
|
|
166
79
|
```
|
|
80
|
+
Apply --author and --area filters.
|
|
167
81
|
|
|
168
|
-
|
|
169
|
-
Spawn 3 Agents in a single message:
|
|
170
|
-
|
|
171
|
-
**Agent 1 — Technical Soundness:**
|
|
172
|
-
- Does implementation match stated intent?
|
|
173
|
-
- Has technical context changed since decision was made?
|
|
174
|
-
- Grade: sound / degraded / violated
|
|
82
|
+
**Compute metrics**:
|
|
175
83
|
|
|
176
|
-
|
|
177
|
-
- What complexity did this decision add?
|
|
178
|
-
- Is it creating coupling or tech debt?
|
|
179
|
-
- Grade: low-cost / acceptable / expensive / debt-creating
|
|
180
|
-
|
|
181
|
-
**Agent 3 — Alternative Hindsight:**
|
|
182
|
-
- With what we know now, was this the right call?
|
|
183
|
-
- Would reversing be feasible?
|
|
184
|
-
- Grade: confirmed / questionable / should-revisit
|
|
185
|
-
|
|
186
|
-
#### 3d: Classify Decision Lifecycle
|
|
187
|
-
| Status | Criteria |
|
|
84
|
+
| Metric | Formula |
|
|
188
85
|
|--------|---------|
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
192
|
-
|
|
|
193
|
-
| **Reversed** | Code contradicts the decision |
|
|
194
|
-
|
|
195
|
-
#### 3e: Generate Recommendations
|
|
196
|
-
- **Aging**: flag for tech debt review
|
|
197
|
-
- **Questionable**: create issue for investigation
|
|
198
|
-
- **Stale**: suggest decision refresh
|
|
199
|
-
- **Reversed**: suggest documenting the reversal
|
|
86
|
+
| Test ratio | test_insertions / total_insertions * 100% |
|
|
87
|
+
| Churn rate | files changed >2x / total unique files |
|
|
88
|
+
| Sessions | Cluster commits by >2hr gaps in timestamps |
|
|
89
|
+
| LOC/session-hour | net_loc / total_session_hours |
|
|
200
90
|
|
|
201
|
-
|
|
91
|
+
**Per-author breakdown**: commits, LOC, top 3 areas, test ratio, session count.
|
|
202
92
|
|
|
203
|
-
|
|
93
|
+
**Trend** (if --compare or prior KNW-retro-*.json exists): compute deltas, flag >20% changes.
|
|
204
94
|
|
|
205
|
-
|
|
95
|
+
**Distill insights**: high churn files (instability), low test ratio areas (<20%), session patterns, area drift vs roadmap.
|
|
206
96
|
|
|
207
|
-
|
|
208
|
-
# Retrospective: {date}
|
|
209
|
-
**Lenses:** {active lenses} | **Period:** {days}d
|
|
97
|
+
### A_DECISION_ANALYSIS
|
|
210
98
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
{session timeline}
|
|
220
|
-
|
|
221
|
-
### File Hotspots
|
|
222
|
-
{top 10 most-changed files}
|
|
223
|
-
|
|
224
|
-
### Per-Author
|
|
225
|
-
{author breakdown table}
|
|
99
|
+
**Collect** (parallel):
|
|
100
|
+
```bash
|
|
101
|
+
maestro wiki search "decision" --json
|
|
102
|
+
maestro wiki list --type spec --json
|
|
103
|
+
git log --oneline --all --grep="decision\|chose\|decided" -20
|
|
104
|
+
```
|
|
105
|
+
Plus: architecture-constraints.md, phase context Locked/Deferred sections, specs/learnings.md.
|
|
106
|
+
Apply --phase/--tag/--id filters.
|
|
226
107
|
|
|
227
|
-
|
|
228
|
-
### Dashboard
|
|
229
|
-
| Status | Count | Decisions |
|
|
230
|
-
|--------|-------|-----------|
|
|
231
|
-
| Validated | N | {list} |
|
|
232
|
-
| Aging | N | {list} |
|
|
233
|
-
| ...
|
|
108
|
+
**Build registry** per decision: id, title, source, date, rationale, alternatives, phase, implementation_evidence [file paths].
|
|
234
109
|
|
|
235
|
-
|
|
236
|
-
{detailed evaluations}
|
|
110
|
+
**Evaluate** — spawn 3 Agents in single message:
|
|
237
111
|
|
|
238
|
-
|
|
239
|
-
|
|
112
|
+
| Agent | Dimension | Grades |
|
|
113
|
+
|-------|-----------|--------|
|
|
114
|
+
| Technical Soundness | Implementation matches intent? Context changed? | sound / degraded / violated |
|
|
115
|
+
| Cost Assessment | Complexity added? Coupling/debt? | low-cost / acceptable / expensive / debt-creating |
|
|
116
|
+
| Alternative Hindsight | Right call with current knowledge? Reversible? | confirmed / questionable / should-revisit |
|
|
240
117
|
|
|
241
|
-
|
|
242
|
-
1. {action}: {reason}
|
|
243
|
-
```
|
|
118
|
+
**Classify lifecycle**:
|
|
244
119
|
|
|
245
|
-
|
|
120
|
+
| Status | Criteria |
|
|
121
|
+
|--------|---------|
|
|
122
|
+
| Validated | sound + low/acceptable + confirmed |
|
|
123
|
+
| Aging | sound + expensive + confirmed |
|
|
124
|
+
| Questionable | degraded/violated + questionable |
|
|
125
|
+
| Stale | any + should-revisit |
|
|
126
|
+
| Reversed | code contradicts decision |
|
|
246
127
|
|
|
247
|
-
|
|
128
|
+
**Recommend**: Aging → tech debt review, Questionable → create issue, Stale → refresh, Reversed → document reversal.
|
|
248
129
|
|
|
249
|
-
|
|
250
|
-
1. Write report files
|
|
251
|
-
2. Append insights as `<spec-entry>` blocks to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "<kw>"`:
|
|
252
|
-
- Git insights: source="retro-git", roles per insight type
|
|
253
|
-
- Decision insights: source="retro-decision", roles="plan" (merge "decision" into keywords)
|
|
254
|
-
- Stable INS-id from `hash(lens + metric_or_decision + date)`
|
|
255
|
-
4. Display summary
|
|
130
|
+
</actions>
|
|
256
131
|
|
|
257
|
-
|
|
258
|
-
- Browse insights → `/manage-learn list --tag retro`
|
|
259
|
-
- Deep dive on high-churn file → `/learn-follow <path>`
|
|
260
|
-
- Fix test gaps → `/quality-auto-test <area>`
|
|
261
|
-
- Create issue for questionable decision → `/manage-issue create ...`
|
|
262
|
-
- Investigate stale decision → `/learn-investigate <question>`
|
|
263
|
-
- Full phase retrospective → `/quality-retrospective`
|
|
264
|
-
</execution>
|
|
132
|
+
</state_machine>
|
|
265
133
|
|
|
266
134
|
<error_codes>
|
|
267
|
-
| Code |
|
|
268
|
-
|
|
269
|
-
| E001 |
|
|
270
|
-
| E002 |
|
|
271
|
-
| E003 |
|
|
272
|
-
| E004 |
|
|
273
|
-
|
|
|
274
|
-
|
|
|
275
|
-
| W003 | warning | One perspective agent failed — partial evaluation (decision lens) | Proceed with available perspectives |
|
|
276
|
-
| W004 | warning | No git implementation evidence for a decision | Evaluation is theoretical only |
|
|
277
|
-
| W005 | warning | Phase context files not found (decision lens) | Skip phase-context decisions |
|
|
135
|
+
| Code | Condition | Recovery |
|
|
136
|
+
|------|-----------|----------|
|
|
137
|
+
| E001 | Not in git repo (git lens) | Navigate to git repo |
|
|
138
|
+
| E002 | No commits in window (git lens) | Increase --days |
|
|
139
|
+
| E003 | No decisions found (decision lens) | Check wiki/specs or provide --id |
|
|
140
|
+
| E004 | --id not found in wiki or knowhow | Verify the decision ID exists |
|
|
141
|
+
| W002 | No prior retro for comparison | Skip trend; first retro = baseline |
|
|
142
|
+
| W003 | One perspective agent failed | Proceed with available perspectives |
|
|
278
143
|
</error_codes>
|
|
279
144
|
|
|
280
145
|
<success_criteria>
|
|
281
|
-
- [ ]
|
|
282
|
-
- [ ]
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
- [ ] Sessions detected with >2hr gap clustering
|
|
286
|
-
- [ ] Per-author breakdown generated
|
|
287
|
-
- [ ] Trend comparison computed if prior report exists
|
|
288
|
-
- [ ] At least 1 actionable insight distilled
|
|
289
|
-
- [ ] Decision lens (if active):
|
|
290
|
-
- [ ] Decisions collected from available sources
|
|
291
|
-
- [ ] Scope filter applied correctly
|
|
292
|
-
- [ ] 3 perspective agents spawned in parallel
|
|
293
|
-
- [ ] Each decision classified by lifecycle status
|
|
294
|
-
- [ ] Recommendations generated for non-Validated decisions
|
|
295
|
-
- [ ] Unified report written to `KNW-retro-{date}.md`
|
|
296
|
-
- [ ] Structured data written to `KNW-retro-{date}.json`
|
|
297
|
-
- [ ] `specs/learnings.md` appended with `<spec-entry>` blocks (stable INS-ids)
|
|
298
|
-
- [ ] No files modified outside `.workflow/knowhow/`
|
|
299
|
-
- [ ] Summary displayed with next-step routing
|
|
146
|
+
- [ ] Git lens: metrics computed (commits, LOC, test ratio, churn, sessions), insights distilled
|
|
147
|
+
- [ ] Decision lens: decisions collected, 3 agents evaluated in parallel, lifecycle classified
|
|
148
|
+
- [ ] Unified report + structured JSON written
|
|
149
|
+
- [ ] specs/learnings.md appended with stable INS-ids
|
|
300
150
|
</success_criteria>
|
|
151
|
+
|
|
152
|
+
<next_step_routing>
|
|
153
|
+
- Browse insights → `/manage-learn list --tag retro`
|
|
154
|
+
- Deep dive churn → `/learn-follow <path>`
|
|
155
|
+
- Fix test gaps → `/quality-auto-test <area>`
|
|
156
|
+
- Investigate stale decision → `/learn-investigate <question>`
|
|
157
|
+
</next_step_routing>
|
|
@@ -12,151 +12,111 @@ allowed-tools:
|
|
|
12
12
|
- AskUserQuestion
|
|
13
13
|
---
|
|
14
14
|
<purpose>
|
|
15
|
-
Structured second-opinion
|
|
15
|
+
Structured second-opinion on code, decisions, or plans. Three modes:
|
|
16
|
+
- **review** (default): 3 parallel agents (pragmatist, purist, strategist)
|
|
17
|
+
- **challenge**: single adversarial agent — break assumptions, propose alternatives
|
|
18
|
+
- **consult**: interactive Q&A — agent studies target, answers your questions
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
- **challenge**: single adversarial agent that tries to break the approach, find hidden assumptions, and propose alternatives
|
|
19
|
-
- **consult**: interactive Q&A mode where the agent studies the target and answers your questions
|
|
20
|
-
|
|
21
|
-
Decoupled from the phase/execution lifecycle — can be invoked on any piece of code or knowledge at any time. Findings persist to `specs/learnings.md` as `<spec-entry>` blocks.
|
|
20
|
+
Findings persist to `specs/learnings.md` as `<spec-entry>` blocks.
|
|
22
21
|
</purpose>
|
|
23
22
|
|
|
24
23
|
<context>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
**Target resolution (auto-detected)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- `.workflow/knowhow/specs/learnings.md` — New `<spec-entry>` blocks from analysis (source: "second-opinion")
|
|
41
|
-
|
|
42
|
-
**Storage read:**
|
|
43
|
-
- Target content (file, wiki entry, diff, or plan)
|
|
44
|
-
- `.workflow/specs/` — Project conventions for context
|
|
45
|
-
- `maestro wiki search` — Related knowledge entries
|
|
46
|
-
- `.workflow/knowhow/specs/learnings.md` — Prior insights about the topic
|
|
24
|
+
$ARGUMENTS — target and optional mode flag.
|
|
25
|
+
|
|
26
|
+
**Target resolution** (auto-detected):
|
|
27
|
+
| Input | Resolution |
|
|
28
|
+
|-------|-----------|
|
|
29
|
+
| File path | Read file content |
|
|
30
|
+
| Wiki ID (`<type>-<slug>`) | `maestro wiki get <id>` |
|
|
31
|
+
| `HEAD` / `staged` | `git diff HEAD` / `git diff --staged` |
|
|
32
|
+
| Phase number | Resolve via state.json.artifacts[] → plan.json |
|
|
33
|
+
|
|
34
|
+
**Flags**: `--mode review|challenge|consult` (default: review)
|
|
35
|
+
|
|
36
|
+
**Pre-load** (optional): `Skill("spec-load")` for conventions + `maestro wiki search "<target topic>"` for related entries.
|
|
37
|
+
|
|
38
|
+
**Output**: `.workflow/knowhow/KNW-opinion-{slug}-{YYYY-MM-DD}.md`
|
|
47
39
|
</context>
|
|
48
40
|
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- Apply forcing questions:
|
|
104
|
-
- "What assumption would invalidate this entire approach?"
|
|
105
|
-
- "What's the simplest thing that breaks this?"
|
|
106
|
-
- "If you had to rewrite this in 6 months, what would you regret?"
|
|
107
|
-
- "What's the implicit contract that isn't enforced?"
|
|
108
|
-
|
|
109
|
-
#### Mode: consult
|
|
41
|
+
<state_machine>
|
|
42
|
+
|
|
43
|
+
<states>
|
|
44
|
+
S_RESOLVE — 解析 target PERSIST: —
|
|
45
|
+
S_CONTEXT — 加载 specs/wiki 上下文 PERSIST: —
|
|
46
|
+
S_EXECUTE — 按 mode 执行分析 PERSIST: —
|
|
47
|
+
S_SYNTHESIZE — 综合观点、生成报告 PERSIST: outputs
|
|
48
|
+
S_PERSIST — 写文件、append specs/learnings.md PERSIST: knowhow files
|
|
49
|
+
</states>
|
|
50
|
+
|
|
51
|
+
<transitions>
|
|
52
|
+
|
|
53
|
+
S_RESOLVE:
|
|
54
|
+
→ S_CONTEXT WHEN: target resolved DO: read target content
|
|
55
|
+
→ S_RESOLVE WHEN: unresolvable DO: AskUserQuestion for clarification
|
|
56
|
+
|
|
57
|
+
S_CONTEXT:
|
|
58
|
+
→ S_EXECUTE DO: load specs + wiki search (optional, proceed without)
|
|
59
|
+
|
|
60
|
+
S_EXECUTE:
|
|
61
|
+
→ S_SYNTHESIZE WHEN: mode == review DO: A_REVIEW
|
|
62
|
+
→ S_SYNTHESIZE WHEN: mode == challenge DO: A_CHALLENGE
|
|
63
|
+
→ S_SYNTHESIZE WHEN: mode == consult DO: A_CONSULT
|
|
64
|
+
|
|
65
|
+
S_SYNTHESIZE:
|
|
66
|
+
→ S_PERSIST DO: merge perspectives → agreements, disagreements, verdict, top 3 recommendations
|
|
67
|
+
|
|
68
|
+
S_PERSIST:
|
|
69
|
+
→ END DO: write KNW-opinion + append <spec-entry> blocks to specs/learnings.md
|
|
70
|
+
|
|
71
|
+
</transitions>
|
|
72
|
+
|
|
73
|
+
<actions>
|
|
74
|
+
|
|
75
|
+
### A_REVIEW
|
|
76
|
+
Spawn 3 Agents in single message:
|
|
77
|
+
|
|
78
|
+
| Agent | Focus | Question |
|
|
79
|
+
|-------|-------|----------|
|
|
80
|
+
| Pragmatist | simplicity, YAGNI, maintenance | "Simplest thing that works? Maintenance burden?" |
|
|
81
|
+
| Purist | correctness, edge cases, type safety | "What assumptions can be violated?" |
|
|
82
|
+
| Strategist | scalability, architecture alignment | "Supports future growth? Fits architecture?" |
|
|
83
|
+
|
|
84
|
+
Each returns: persona, verdict (approve/concern/reject), confidence, findings[{severity, description, location, suggestion}], summary.
|
|
85
|
+
|
|
86
|
+
### A_CHALLENGE
|
|
87
|
+
Spawn 1 adversarial Agent:
|
|
88
|
+
- Find weakest assumption
|
|
89
|
+
- Propose concrete breaking scenario
|
|
90
|
+
- Identify single biggest risk
|
|
91
|
+
- Suggest alternative approach
|
|
92
|
+
- Apply forcing questions: "What invalidates this?", "Simplest thing that breaks this?", "What would you regret in 6 months?", "What implicit contract isn't enforced?"
|
|
93
|
+
|
|
94
|
+
### A_CONSULT
|
|
110
95
|
Interactive loop:
|
|
111
|
-
1. Agent studies
|
|
112
|
-
2. Display
|
|
113
|
-
3. AskUserQuestion
|
|
114
|
-
4.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
Across all perspectives (or from single agent in challenge/consult):
|
|
120
|
-
- **Points of agreement**: findings all personas share
|
|
121
|
-
- **Points of disagreement**: where personas diverge (with reasoning)
|
|
122
|
-
- **Verdict**: combined assessment with confidence level
|
|
123
|
-
- **Top 3 recommendations**: prioritized by impact
|
|
124
|
-
|
|
125
|
-
### Stage 5: Persist & Report
|
|
126
|
-
1. Write `.workflow/knowhow/KNW-opinion-{slug}-{date}.md`:
|
|
127
|
-
- Target summary
|
|
128
|
-
- Per-persona findings (review) / adversarial analysis (challenge) / Q&A transcript (consult)
|
|
129
|
-
- Synthesis: agreements, disagreements, verdict
|
|
130
|
-
- Recommendations
|
|
131
|
-
2. Append non-trivial findings as `<spec-entry>` blocks to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "second-opinion,{mode},{target-slug}"`
|
|
132
|
-
4. Display summary with verdict and recommendations
|
|
133
|
-
|
|
134
|
-
**Next-step routing:**
|
|
135
|
-
- Create issue for a finding → `/manage-issue create <description>`
|
|
136
|
-
- Decompose patterns found → `/learn-decompose <path>`
|
|
137
|
-
- Follow-along on the code → `/learn-follow <path>`
|
|
138
|
-
</execution>
|
|
96
|
+
1. Agent studies target
|
|
97
|
+
2. Display "Target loaded. What would you like to know?"
|
|
98
|
+
3. AskUserQuestion → Agent answers with code refs → repeat until "done"
|
|
99
|
+
4. Compile Q&A into report
|
|
100
|
+
|
|
101
|
+
</actions>
|
|
102
|
+
|
|
103
|
+
</state_machine>
|
|
139
104
|
|
|
140
105
|
<error_codes>
|
|
141
|
-
| Code |
|
|
142
|
-
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
| W001 | warning | One review agent failed — partial perspectives | Proceed with available agents, note incomplete coverage |
|
|
146
|
-
| W002 | warning | No related wiki entries found for context | Proceed without wiki context |
|
|
147
|
-
| W003 | warning | Git diff empty (no changes) for HEAD/staged target | Nothing to review; suggest using a file path instead |
|
|
106
|
+
| Code | Condition | Recovery |
|
|
107
|
+
|------|-----------|----------|
|
|
108
|
+
| E002 | Unknown --mode value | Use: review, challenge, or consult |
|
|
109
|
+
| W001 | One review agent failed | Proceed with available perspectives |
|
|
148
110
|
</error_codes>
|
|
149
111
|
|
|
150
112
|
<success_criteria>
|
|
151
|
-
- [ ]
|
|
152
|
-
- [ ]
|
|
153
|
-
- [ ]
|
|
154
|
-
- review: 3 agents spawned in parallel, all returned findings
|
|
155
|
-
- challenge: adversarial analysis completed with forcing questions
|
|
156
|
-
- consult: interactive Q&A loop completed
|
|
157
|
-
- [ ] Synthesis produced with agreements, disagreements, verdict
|
|
158
|
-
- [ ] Report written to `KNW-opinion-{slug}-{date}.md`
|
|
159
|
-
- [ ] Non-trivial findings appended to `specs/learnings.md` as `<spec-entry>` blocks
|
|
160
|
-
- [ ] No files modified outside `.workflow/knowhow/`
|
|
161
|
-
- [ ] Summary displayed with verdict and next-step routing
|
|
113
|
+
- [ ] Mode executed: review (3 parallel agents) / challenge (adversarial) / consult (interactive Q&A)
|
|
114
|
+
- [ ] Synthesis with agreements, disagreements, verdict
|
|
115
|
+
- [ ] Report written + findings appended to specs/learnings.md
|
|
162
116
|
</success_criteria>
|
|
117
|
+
|
|
118
|
+
<next_step_routing>
|
|
119
|
+
- Create issue → `/manage-issue create <description>`
|
|
120
|
+
- Decompose patterns → `/learn-decompose <path>`
|
|
121
|
+
- Follow code → `/learn-follow <path>`
|
|
122
|
+
</next_step_routing>
|