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
|
@@ -41,6 +41,7 @@ STEP 1: Identify Task Pattern
|
|
|
41
41
|
|
|
42
42
|
STEP 2: Load Context
|
|
43
43
|
→ Read input data specified in task prompt
|
|
44
|
+
→ Load existing UI conventions: `maestro spec load --category ui` (if available, respect established design tokens and component patterns)
|
|
44
45
|
→ Validate BASE_PATH and output directory structure
|
|
45
46
|
|
|
46
47
|
STEP 3: Execute Pattern-Specific Generation
|
|
@@ -58,6 +58,9 @@ You implement a single task from the execution plan. Each task is executed atomi
|
|
|
58
58
|
- Quality rules (enforcement criteria)
|
|
59
59
|
- All specs with `readMode: required` and `category: execution`
|
|
60
60
|
- **Must comply**: All generated code must follow loaded spec constraints
|
|
61
|
+
- **UI specs (conditional)** -- If task involves frontend/UI work (focus_paths in `src/components/`, `src/pages/`, `src/styles/`, `src/ui/`, or description contains UI keywords), also load via `maestro spec load --category ui`:
|
|
62
|
+
- Design tokens, component conventions, visual system constraints
|
|
63
|
+
- PRODUCT.md/DESIGN.md references
|
|
61
64
|
- Prior task summaries from `.summaries/` (for context on dependencies)
|
|
62
65
|
- `context.md` -- Phase context with Locked/Free/Deferred decisions (read to understand constraints before implementing)
|
|
63
66
|
- `analysis.md` -- Phase analysis with 6-dimension scores (reference for quality expectations)
|
|
@@ -12,160 +12,105 @@ allowed-tools:
|
|
|
12
12
|
- AskUserQuestion
|
|
13
13
|
---
|
|
14
14
|
<purpose>
|
|
15
|
-
Systematic pattern extraction
|
|
16
|
-
|
|
17
|
-
Unlike `learn-follow` which reads code with forcing questions, this command is purpose-built for pattern identification and cataloging. It produces a reusable pattern catalog that feeds into the spec system.
|
|
15
|
+
Systematic pattern extraction: analyze module across 4 dimensions using parallel agents, catalog findings with code anchors, persist to specs/wiki. Produces reusable pattern catalog.
|
|
18
16
|
</purpose>
|
|
19
17
|
|
|
20
18
|
<context>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**Target resolution
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
**Storage written:**
|
|
34
|
-
- `.workflow/knowhow/KNW-decompose-{slug}-{YYYY-MM-DD}.md` — Pattern decomposition report
|
|
35
|
-
- `.workflow/specs/learnings.md` — One `<spec-entry>` per discovered pattern (source: "decompose")
|
|
36
|
-
- If `--save-spec`: entries appended to `.workflow/specs/coding-conventions.md`
|
|
37
|
-
- If `--save-wiki`: new wiki note entries
|
|
38
|
-
|
|
39
|
-
**Storage read:**
|
|
40
|
-
- Source files at target path
|
|
41
|
-
- `.workflow/specs/coding-conventions.md` — Existing documented patterns (for dedup)
|
|
42
|
-
- `.workflow/specs/learnings.md` — Previously identified patterns (for dedup)
|
|
19
|
+
$ARGUMENTS — target path/module and optional flags.
|
|
20
|
+
|
|
21
|
+
**Target resolution**: file path → that file; directory → all source files; module name → Glob `src/**/{module}*`.
|
|
22
|
+
|
|
23
|
+
**Flags**:
|
|
24
|
+
- `--patterns <list>`: Comma-separated pattern names to look for (default: detect all)
|
|
25
|
+
- `--save-spec`: `Skill("spec-add")` for each new pattern
|
|
26
|
+
- `--save-wiki`: create wiki note per dimension group
|
|
27
|
+
|
|
28
|
+
**Storage read**: target files + `coding-conventions.md` + `specs/learnings.md` (dedup)
|
|
29
|
+
**Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append `specs/learnings.md`
|
|
43
30
|
</context>
|
|
44
31
|
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
### Stage 5: Produce Pattern Catalog
|
|
111
|
-
Build the decomposition report grouped by dimension:
|
|
112
|
-
|
|
113
|
-
```markdown
|
|
114
|
-
# Pattern Decomposition: {target}
|
|
115
|
-
|
|
116
|
-
## Summary
|
|
117
|
-
- Patterns found: N (M new, K documented, J known)
|
|
118
|
-
- Dimensions analyzed: structural, behavioral, data, error
|
|
119
|
-
- Contradictions: N
|
|
120
|
-
|
|
121
|
-
## Structural Patterns
|
|
122
|
-
| Pattern | Confidence | Location | Status |
|
|
123
|
-
|---------|-----------|----------|--------|
|
|
124
|
-
| {name} | high | {file:line} | new / documented / known |
|
|
125
|
-
|
|
126
|
-
### {Pattern Name}
|
|
127
|
-
**Description:** ...
|
|
128
|
-
**Code example:** (inline snippet from anchor)
|
|
129
|
-
**Trade-offs:** ...
|
|
130
|
-
|
|
131
|
-
## Behavioral Patterns
|
|
132
|
-
...
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Stage 6: Persist
|
|
136
|
-
1. Write `.workflow/knowhow/KNW-decompose-{slug}-{date}.md`
|
|
137
|
-
2. Append each **new** pattern as a `<spec-entry>` block to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "decompose,pattern,{dimension},{target-slug}"`:
|
|
138
|
-
- Stable INS-id from `hash("decompose" + target + pattern_name)`
|
|
139
|
-
4. If `--save-spec`: for each new pattern, invoke `Skill({ skill: "spec-add", args: "pattern {description}" })`
|
|
140
|
-
5. If `--save-wiki`: create wiki note per dimension group via `maestro wiki create --type note --slug decompose-{dimension}-{slug}`
|
|
141
|
-
6. Display summary with counts and next steps
|
|
142
|
-
|
|
143
|
-
**Next-step routing:**
|
|
144
|
-
- Follow-along on a specific pattern → `/learn-follow <anchor-file>`
|
|
145
|
-
- Get second opinion on findings → `/learn-second-opinion <target>`
|
|
146
|
-
- Add all new patterns to specs → `/spec-add coding ...` per pattern
|
|
147
|
-
</execution>
|
|
32
|
+
<state_machine>
|
|
33
|
+
|
|
34
|
+
<states>
|
|
35
|
+
S_RESOLVE — 解析 target 为具体文件列表 PERSIST: —
|
|
36
|
+
S_DEDUP — 加载已有 patterns 用于去重 PERSIST: —
|
|
37
|
+
S_ANALYZE — 4 维度并行 Agent 分析 PERSIST: —
|
|
38
|
+
S_CROSSREF — 交叉引用、去重、标记状态 PERSIST: —
|
|
39
|
+
S_CATALOG — 生成 pattern catalog 报告 PERSIST: outputs
|
|
40
|
+
S_PERSIST — 写文件 + 可选 spec-add/wiki create PERSIST: knowhow files
|
|
41
|
+
</states>
|
|
42
|
+
|
|
43
|
+
<transitions>
|
|
44
|
+
|
|
45
|
+
S_RESOLVE:
|
|
46
|
+
→ S_DEDUP WHEN: file list resolved
|
|
47
|
+
→ S_RESOLVE WHEN: unresolvable DO: AskUserQuestion
|
|
48
|
+
|
|
49
|
+
S_DEDUP:
|
|
50
|
+
→ S_ANALYZE DO: read coding-conventions.md + specs/learnings.md → build known pattern set
|
|
51
|
+
|
|
52
|
+
S_ANALYZE:
|
|
53
|
+
→ S_CROSSREF DO: A_PARALLEL_DIMENSION_ANALYSIS
|
|
54
|
+
|
|
55
|
+
S_CROSSREF:
|
|
56
|
+
→ S_CATALOG DO: A_CROSSREF_DEDUP
|
|
57
|
+
|
|
58
|
+
S_CATALOG:
|
|
59
|
+
→ S_PERSIST DO: write KNW-decompose report (grouped by dimension: pattern table + details)
|
|
60
|
+
|
|
61
|
+
S_PERSIST:
|
|
62
|
+
→ END DO: append specs/learnings.md [+ spec-add if --save-spec] [+ wiki note if --save-wiki]
|
|
63
|
+
|
|
64
|
+
</transitions>
|
|
65
|
+
|
|
66
|
+
<actions>
|
|
67
|
+
|
|
68
|
+
### A_PARALLEL_DIMENSION_ANALYSIS
|
|
69
|
+
|
|
70
|
+
Spawn 4 Agents in single message:
|
|
71
|
+
|
|
72
|
+
| Agent | Dimension | Looks for |
|
|
73
|
+
|-------|-----------|-----------|
|
|
74
|
+
| 1 | Structural | Class hierarchy, composition, DI/IoC, Factory/Builder/Singleton, barrel exports |
|
|
75
|
+
| 2 | Behavioral | Event flow, middleware chains, observer/pub-sub, command/strategy, state machines |
|
|
76
|
+
| 3 | Data | Repository/DAO, DTO pipelines, caching (memo/LRU/TTL), serialization, schema validation |
|
|
77
|
+
| 4 | Error | Error boundaries, retry/backoff/circuit-breaker, fallback chains, guard clauses, logging |
|
|
78
|
+
|
|
79
|
+
If `--patterns` specified: agents focus only on named patterns.
|
|
80
|
+
|
|
81
|
+
Each agent returns: `[{ name, dimension, confidence (high/medium/low), anchors [file:line], description, rationale, tradeoffs }]`
|
|
82
|
+
|
|
83
|
+
### A_CROSSREF_DEDUP
|
|
84
|
+
|
|
85
|
+
For each finding, match against known pattern set:
|
|
86
|
+
| Status | Condition |
|
|
87
|
+
|--------|-----------|
|
|
88
|
+
| documented | Already in coding-conventions.md |
|
|
89
|
+
| known | In specs/learnings.md |
|
|
90
|
+
| new | Not seen before |
|
|
91
|
+
|
|
92
|
+
Flag contradictions (finding conflicts with documented convention). Merge duplicates across agents (same pattern found by multiple dimensions).
|
|
93
|
+
|
|
94
|
+
</actions>
|
|
95
|
+
|
|
96
|
+
</state_machine>
|
|
148
97
|
|
|
149
98
|
<error_codes>
|
|
150
|
-
| Code |
|
|
151
|
-
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
| W002 | warning | coding-conventions.md not found — skipping dedup against specs | All patterns marked as "new" |
|
|
156
|
-
| W003 | warning | Large target (>50 files) — analysis may be slow | Consider narrowing scope with --patterns filter |
|
|
99
|
+
| Code | Condition | Recovery |
|
|
100
|
+
|------|-----------|----------|
|
|
101
|
+
| E002 | No source files in target | Check target has .ts/.js files |
|
|
102
|
+
| W001 | One+ dimension agent failed | Proceed with available dimensions |
|
|
103
|
+
| W003 | Large target (>50 files) | Consider --patterns filter |
|
|
157
104
|
</error_codes>
|
|
158
105
|
|
|
159
106
|
<success_criteria>
|
|
160
|
-
- [ ]
|
|
161
|
-
- [ ]
|
|
162
|
-
- [ ]
|
|
163
|
-
- [ ] Each finding has: name, dimension, confidence, anchors, description, tradeoffs
|
|
164
|
-
- [ ] Cross-reference performed (documented / known / new status assigned)
|
|
165
|
-
- [ ] Pattern catalog written to `KNW-decompose-{slug}-{date}.md`
|
|
166
|
-
- [ ] New patterns appended to `specs/learnings.md` as `<spec-entry>` blocks with stable INS-ids
|
|
167
|
-
- [ ] If --save-spec: spec entries created for new patterns
|
|
168
|
-
- [ ] If --save-wiki: wiki notes created per dimension group
|
|
169
|
-
- [ ] No files modified outside `.workflow/knowhow/` (and optionally specs/wiki)
|
|
170
|
-
- [ ] Summary displayed with pattern counts and next-step routing
|
|
107
|
+
- [ ] 4 dimension agents spawned in parallel, findings with anchors
|
|
108
|
+
- [ ] Cross-reference: documented/known/new status assigned
|
|
109
|
+
- [ ] Pattern catalog written + specs/learnings.md appended
|
|
171
110
|
</success_criteria>
|
|
111
|
+
|
|
112
|
+
<next_step_routing>
|
|
113
|
+
- Follow-along → `/learn-follow <anchor-file>`
|
|
114
|
+
- Second opinion → `/learn-second-opinion <target>`
|
|
115
|
+
- Add to specs → `/spec-add coding ...`
|
|
116
|
+
</next_step_routing>
|
|
@@ -12,151 +12,116 @@ allowed-tools:
|
|
|
12
12
|
- AskUserQuestion
|
|
13
13
|
---
|
|
14
14
|
<purpose>
|
|
15
|
-
Guided reading
|
|
16
|
-
|
|
17
|
-
Outputs reading notes with extracted patterns, open questions, and connection points. Insights persist to `specs/learnings.md` as `<spec-entry>` blocks and optionally become wiki note entries for the knowledge graph.
|
|
15
|
+
Guided reading: walk through content section-by-section using forcing questions to extract patterns, identify assumptions, and build an understanding map. Findings persist to `specs/learnings.md` as `<spec-entry>` blocks.
|
|
18
16
|
</purpose>
|
|
19
17
|
|
|
20
18
|
<context>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**Target resolution (auto-detected
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- `--
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
**Storage read:**
|
|
39
|
-
- Target source file or wiki entry
|
|
40
|
-
- `maestro wiki backlinks <id>` / `maestro wiki forward <id>` — Relationship context
|
|
41
|
-
- `.workflow/specs/coding-conventions.md` — Convention reference for pattern matching
|
|
42
|
-
- `.workflow/knowhow/specs/learnings.md` — Prior insights for dedup and cross-reference
|
|
19
|
+
$ARGUMENTS — target and optional flags.
|
|
20
|
+
|
|
21
|
+
**Target resolution** (auto-detected):
|
|
22
|
+
| Input | Resolution |
|
|
23
|
+
|-------|-----------|
|
|
24
|
+
| File path (contains `/` or `\`) | Read source file |
|
|
25
|
+
| Wiki ID (`<type>-<slug>`) | `maestro wiki get <id>` |
|
|
26
|
+
| Topic string | `maestro wiki search "<topic>"` → top result; fallback: Grep src/ |
|
|
27
|
+
|
|
28
|
+
**Flags**:
|
|
29
|
+
- `--depth shallow` (default): key patterns and structure only
|
|
30
|
+
- `--depth deep`: every function, every branch, every assumption
|
|
31
|
+
- `--save-wiki`: create wiki note entry with reading notes
|
|
32
|
+
|
|
33
|
+
**Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` + `specs/learnings.md` (dedup)
|
|
34
|
+
**Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append `specs/learnings.md`
|
|
43
35
|
</context>
|
|
44
36
|
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- {question}: {why it matters}
|
|
118
|
-
|
|
119
|
-
## Connections
|
|
120
|
-
- Links to: {forward link entries}
|
|
121
|
-
- Referenced by: {backlink entries}
|
|
122
|
-
- Related insights: {matching specs/learnings.md entries}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Stage 7: Persist
|
|
126
|
-
1. Write `.workflow/knowhow/KNW-follow-{slug}-{date}.md` with the understanding map
|
|
127
|
-
2. Append each new pattern/technique as a `<spec-entry>` block to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "follow,{target-slug}"`:
|
|
128
|
-
- Stable INS-id from `hash("follow" + target + pattern_name)`
|
|
129
|
-
3. If `--save-wiki`: run `maestro wiki create --type note --slug follow-{slug} --title "Follow-Along: {target}" --body-file .workflow/knowhow/KNW-follow-{slug}-{date}.md`
|
|
130
|
-
5. Display summary with key findings and next steps
|
|
131
|
-
|
|
132
|
-
**Next-step routing:**
|
|
133
|
-
- Deep dive into a discovered pattern → `/learn-decompose <path>`
|
|
134
|
-
- Add undocumented pattern to specs → `/spec-add coding <description>`
|
|
135
|
-
- Get second opinion on a finding → `/learn-second-opinion <file>`
|
|
136
|
-
- Browse related wiki entries → `/wiki-digest <topic>`
|
|
137
|
-
</execution>
|
|
37
|
+
<state_machine>
|
|
38
|
+
|
|
39
|
+
<states>
|
|
40
|
+
S_RESOLVE — 解析 target (file/wiki/topic) PERSIST: —
|
|
41
|
+
S_CONTEXT — 构建 1-hop 上下文邻域 PERSIST: —
|
|
42
|
+
S_ORDER — 确定阅读顺序 PERSIST: —
|
|
43
|
+
S_READ — 逐节应用 forcing questions PERSIST: —
|
|
44
|
+
S_EXTRACT — 提取 patterns、cross-ref conventions PERSIST: —
|
|
45
|
+
S_PERSIST — 写 understanding map + spec-entry 块 PERSIST: knowhow files
|
|
46
|
+
</states>
|
|
47
|
+
|
|
48
|
+
<transitions>
|
|
49
|
+
|
|
50
|
+
S_RESOLVE:
|
|
51
|
+
→ S_CONTEXT WHEN: target resolved
|
|
52
|
+
→ S_RESOLVE WHEN: unresolvable DO: AskUserQuestion with suggestions
|
|
53
|
+
|
|
54
|
+
S_CONTEXT:
|
|
55
|
+
→ S_ORDER DO: A_BUILD_CONTEXT_WEB
|
|
56
|
+
|
|
57
|
+
S_ORDER:
|
|
58
|
+
→ S_READ DO: A_BUILD_READING_ORDER
|
|
59
|
+
|
|
60
|
+
S_READ:
|
|
61
|
+
→ S_EXTRACT DO: A_GUIDED_READ (apply 4 forcing questions per section)
|
|
62
|
+
|
|
63
|
+
S_EXTRACT:
|
|
64
|
+
→ S_PERSIST DO: A_EXTRACT_PATTERNS
|
|
65
|
+
|
|
66
|
+
S_PERSIST:
|
|
67
|
+
→ END DO: write KNW-follow + append specs/learnings.md [+ wiki note if --save-wiki]
|
|
68
|
+
|
|
69
|
+
</transitions>
|
|
70
|
+
|
|
71
|
+
<actions>
|
|
72
|
+
|
|
73
|
+
### A_BUILD_CONTEXT_WEB
|
|
74
|
+
|
|
75
|
+
| Target type | Context |
|
|
76
|
+
|-------------|---------|
|
|
77
|
+
| Wiki entry | `maestro wiki forward <id>` + `maestro wiki backlinks <id>` → read top 3 related |
|
|
78
|
+
| Code file | Parse imports → dependency files; grep exports → reverse deps; read top 3 dependents (50 lines) |
|
|
79
|
+
| Directory | List files, identify entry points → build reading order: entry → core → utils → tests |
|
|
80
|
+
|
|
81
|
+
### A_BUILD_READING_ORDER
|
|
82
|
+
|
|
83
|
+
- Single file: split by function/class/export boundaries
|
|
84
|
+
- Wiki entry: split by markdown headings
|
|
85
|
+
- Directory: order by dependency (entry points first, leaf last)
|
|
86
|
+
- `--depth shallow`: top-level structure only; `--depth deep`: every body and branch
|
|
87
|
+
|
|
88
|
+
### A_GUIDED_READ
|
|
89
|
+
|
|
90
|
+
For each section, apply 4 forcing questions:
|
|
91
|
+
|
|
92
|
+
| # | Question | Extracts |
|
|
93
|
+
|---|----------|----------|
|
|
94
|
+
| 1 | "What pattern is being used here?" | Design patterns, idioms, conventions |
|
|
95
|
+
| 2 | "Why this approach instead of alternatives?" | Trade-offs, rejected options |
|
|
96
|
+
| 3 | "What assumption does this depend on?" | Implicit contracts, input shape, ordering |
|
|
97
|
+
| 4 | "What would break if this changed?" | Fragility, downstream effects |
|
|
98
|
+
|
|
99
|
+
### A_EXTRACT_PATTERNS
|
|
100
|
+
|
|
101
|
+
Extract: design patterns (with file:line anchors), naming conventions, error handling approach, data flow, assumptions.
|
|
102
|
+
Cross-ref against `coding-conventions.md`: documented → "confirmed convention", undocumented → "candidate for spec-add".
|
|
103
|
+
|
|
104
|
+
Write understanding map: Key Concepts, Patterns (table: name/location/convention status), Assumptions, Open Questions, Connections.
|
|
105
|
+
|
|
106
|
+
</actions>
|
|
107
|
+
|
|
108
|
+
</state_machine>
|
|
138
109
|
|
|
139
110
|
<error_codes>
|
|
140
|
-
| Code |
|
|
141
|
-
|
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
-
| W001 | warning | Wiki graph unavailable (no .workflow/ wiki entries) — skipping context web | Proceed with code-only context (imports/exports) |
|
|
145
|
-
| W002 | warning | coding-conventions.md not found — skipping convention comparison | Patterns flagged as "unknown convention status" |
|
|
146
|
-
| W003 | warning | Target is very large (>1000 lines) — auto-switching to shallow depth | Use --depth deep to override |
|
|
111
|
+
| Code | Condition | Recovery |
|
|
112
|
+
|------|-----------|----------|
|
|
113
|
+
| W002 | coding-conventions.md not found | All patterns marked "unknown status" |
|
|
114
|
+
| W003 | Target > 1000 lines | Auto-switch to shallow; use --depth deep to override |
|
|
147
115
|
</error_codes>
|
|
148
116
|
|
|
149
117
|
<success_criteria>
|
|
150
|
-
- [ ]
|
|
151
|
-
- [ ]
|
|
152
|
-
- [ ]
|
|
153
|
-
- [ ] All 4 forcing questions applied per section
|
|
154
|
-
- [ ] Patterns extracted with file:line anchors
|
|
155
|
-
- [ ] Convention comparison performed against coding-conventions.md
|
|
156
|
-
- [ ] Understanding map produced with: concepts, patterns, assumptions, questions, connections
|
|
157
|
-
- [ ] `KNW-follow-{slug}-{date}.md` written
|
|
158
|
-
- [ ] `specs/learnings.md` appended with discovered patterns as `<spec-entry>` blocks (stable INS-ids)
|
|
159
|
-
- [ ] If --save-wiki: wiki note entry created
|
|
160
|
-
- [ ] No files modified outside `.workflow/knowhow/` (and optionally wiki)
|
|
161
|
-
- [ ] Summary displayed with next-step routing
|
|
118
|
+
- [ ] 4 forcing questions applied per section
|
|
119
|
+
- [ ] Patterns extracted with file:line anchors and convention cross-ref
|
|
120
|
+
- [ ] Understanding map + spec-entry blocks written
|
|
162
121
|
</success_criteria>
|
|
122
|
+
|
|
123
|
+
<next_step_routing>
|
|
124
|
+
- Deep pattern dive → `/learn-decompose <path>`
|
|
125
|
+
- Add to specs → `/spec-add coding <description>`
|
|
126
|
+
- Second opinion → `/learn-second-opinion <file>`
|
|
127
|
+
</next_step_routing>
|