maestro-flow 0.4.8 → 0.4.10
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/.agy/agents/cli-explore-agent.md +186 -0
- package/.agy/agents/conceptual-planning-agent.md +244 -0
- package/.agy/agents/impeccable-agent.md +97 -0
- package/.agy/agents/team-supervisor.md +142 -0
- package/.agy/agents/team-worker.md +236 -0
- package/.agy/agents/ui-design-agent.md +286 -0
- package/.agy/agents/workflow-analyzer.md +114 -0
- package/.agy/agents/workflow-codebase-mapper.md +76 -0
- package/.agy/agents/workflow-collab-planner.md +142 -0
- package/.agy/agents/workflow-debugger.md +102 -0
- package/.agy/agents/workflow-executor.md +131 -0
- package/.agy/agents/workflow-external-researcher.md +86 -0
- package/.agy/agents/workflow-integration-checker.md +82 -0
- package/.agy/agents/workflow-nyquist-auditor.md +84 -0
- package/.agy/agents/workflow-phase-researcher.md +84 -0
- package/.agy/agents/workflow-plan-checker.md +89 -0
- package/.agy/agents/workflow-planner.md +194 -0
- package/.agy/agents/workflow-project-researcher.md +73 -0
- package/.agy/agents/workflow-research-synthesizer.md +70 -0
- package/.agy/agents/workflow-reviewer.md +81 -0
- package/.agy/agents/workflow-roadmapper.md +81 -0
- package/.agy/agents/workflow-verifier.md +119 -0
- package/.agy/skills/codify-to-knowhow/SKILL.md +172 -0
- package/.agy/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
- package/.agy/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
- package/.agy/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
- package/.agy/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
- package/.agy/skills/learn-decompose/SKILL.md +118 -0
- package/.agy/skills/learn-follow/SKILL.md +129 -0
- package/.agy/skills/learn-investigate/SKILL.md +154 -0
- package/.agy/skills/learn-retro/SKILL.md +159 -0
- package/.agy/skills/learn-second-opinion/SKILL.md +124 -0
- package/.agy/skills/maestro/SKILL.md +221 -0
- package/.agy/skills/maestro-amend/SKILL.md +162 -0
- package/.agy/skills/maestro-analyze/SKILL.md +135 -0
- package/.agy/skills/maestro-brainstorm/SKILL.md +118 -0
- package/.agy/skills/maestro-collab/SKILL.md +174 -0
- package/.agy/skills/maestro-composer/SKILL.md +180 -0
- package/.agy/skills/maestro-execute/SKILL.md +133 -0
- package/.agy/skills/maestro-fork/SKILL.md +88 -0
- package/.agy/skills/maestro-guard/SKILL.md +101 -0
- package/.agy/skills/maestro-help/SKILL.md +267 -0
- package/.agy/skills/maestro-help/index/catalog.json +184 -0
- package/.agy/skills/maestro-help/phases/01-parse-intent.md +122 -0
- package/.agy/skills/maestro-help/phases/02-search-present.md +181 -0
- package/.agy/skills/maestro-help/phases/03-workflow-guide.md +186 -0
- package/.agy/skills/maestro-impeccable/SKILL.md +250 -0
- package/.agy/skills/maestro-init/SKILL.md +80 -0
- package/.agy/skills/maestro-learn/SKILL.md +142 -0
- package/.agy/skills/maestro-merge/SKILL.md +66 -0
- package/.agy/skills/maestro-milestone-audit/SKILL.md +70 -0
- package/.agy/skills/maestro-milestone-complete/SKILL.md +77 -0
- package/.agy/skills/maestro-milestone-release/SKILL.md +98 -0
- package/.agy/skills/maestro-overlay/SKILL.md +177 -0
- package/.agy/skills/maestro-plan/SKILL.md +172 -0
- package/.agy/skills/maestro-player/SKILL.md +176 -0
- package/.agy/skills/maestro-quick/SKILL.md +67 -0
- package/.agy/skills/maestro-ralph/SKILL.md +546 -0
- package/.agy/skills/maestro-ralph-execute/SKILL.md +255 -0
- package/.agy/skills/maestro-roadmap/SKILL.md +170 -0
- package/.agy/skills/maestro-tools-execute/SKILL.md +119 -0
- package/.agy/skills/maestro-tools-register/SKILL.md +159 -0
- package/.agy/skills/maestro-ui-codify/SKILL.md +81 -0
- package/.agy/skills/maestro-update/SKILL.md +175 -0
- package/.agy/skills/maestro-verify/SKILL.md +111 -0
- package/.agy/skills/manage-codebase-rebuild/SKILL.md +77 -0
- package/.agy/skills/manage-codebase-refresh/SKILL.md +59 -0
- package/.agy/skills/manage-harvest/SKILL.md +96 -0
- package/.agy/skills/manage-issue/SKILL.md +72 -0
- package/.agy/skills/manage-issue-discover/SKILL.md +83 -0
- package/.agy/skills/manage-knowhow/SKILL.md +76 -0
- package/.agy/skills/manage-knowhow-capture/SKILL.md +78 -0
- package/.agy/skills/manage-learn/SKILL.md +64 -0
- package/.agy/skills/manage-status/SKILL.md +51 -0
- package/.agy/skills/manage-wiki/SKILL.md +61 -0
- package/.agy/skills/quality-auto-test/SKILL.md +135 -0
- package/.agy/skills/quality-debug/SKILL.md +122 -0
- package/.agy/skills/quality-refactor/SKILL.md +69 -0
- package/.agy/skills/quality-retrospective/SKILL.md +79 -0
- package/.agy/skills/quality-review/SKILL.md +130 -0
- package/.agy/skills/quality-sync/SKILL.md +53 -0
- package/.agy/skills/quality-test/SKILL.md +119 -0
- package/.agy/skills/security-audit/SKILL.md +157 -0
- package/.agy/skills/skill-iter-tune/SKILL.md +381 -0
- package/.agy/skills/skill-iter-tune/phases/01-setup.md +144 -0
- package/.agy/skills/skill-iter-tune/phases/02-execute.md +292 -0
- package/.agy/skills/skill-iter-tune/phases/03-evaluate.md +312 -0
- package/.agy/skills/skill-iter-tune/phases/04-improve.md +198 -0
- package/.agy/skills/skill-iter-tune/phases/05-report.md +166 -0
- package/.agy/skills/skill-iter-tune/specs/evaluation-criteria.md +63 -0
- package/.agy/skills/skill-iter-tune/templates/eval-prompt.md +134 -0
- package/.agy/skills/skill-iter-tune/templates/execute-prompt.md +97 -0
- package/.agy/skills/spec-add/SKILL.md +67 -0
- package/.agy/skills/spec-load/SKILL.md +70 -0
- package/.agy/skills/spec-remove/SKILL.md +50 -0
- package/.agy/skills/spec-setup/SKILL.md +47 -0
- package/.agy/skills/team-coordinate/SKILL.md +267 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +247 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/dispatch.md +131 -0
- package/.agy/skills/team-coordinate/roles/coordinator/commands/monitor.md +348 -0
- package/.agy/skills/team-coordinate/roles/coordinator/role.md +362 -0
- package/.agy/skills/team-coordinate/specs/knowledge-transfer.md +111 -0
- package/.agy/skills/team-coordinate/specs/pipelines.md +97 -0
- package/.agy/skills/team-coordinate/specs/quality-gates.md +112 -0
- package/.agy/skills/team-coordinate/specs/role-spec-template.md +198 -0
- package/.agy/skills/team-executor/SKILL.md +180 -0
- package/.agy/skills/team-executor/roles/executor/commands/monitor.md +235 -0
- package/.agy/skills/team-executor/roles/executor/role.md +171 -0
- package/.agy/skills/team-executor/specs/session-schema.md +264 -0
- package/.agy/skills/team-lifecycle-v4/SKILL.md +189 -0
- package/.agy/skills/team-lifecycle-v4/roles/analyst/role.md +92 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/analyze.md +56 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +56 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +206 -0
- package/.agy/skills/team-lifecycle-v4/roles/coordinator/role.md +130 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/commands/fix.md +35 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -0
- package/.agy/skills/team-lifecycle-v4/roles/executor/role.md +64 -0
- package/.agy/skills/team-lifecycle-v4/roles/planner/role.md +82 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-code.md +34 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/commands/review-spec.md +44 -0
- package/.agy/skills/team-lifecycle-v4/roles/reviewer/role.md +65 -0
- package/.agy/skills/team-lifecycle-v4/roles/supervisor/role.md +188 -0
- package/.agy/skills/team-lifecycle-v4/roles/tester/role.md +84 -0
- package/.agy/skills/team-lifecycle-v4/roles/writer/role.md +92 -0
- package/.agy/skills/team-lifecycle-v4/specs/knowledge-transfer.md +114 -0
- package/.agy/skills/team-lifecycle-v4/specs/pipelines.md +140 -0
- package/.agy/skills/team-lifecycle-v4/specs/quality-gates.md +130 -0
- package/.agy/skills/team-lifecycle-v4/templates/architecture.md +254 -0
- package/.agy/skills/team-lifecycle-v4/templates/epics.md +196 -0
- package/.agy/skills/team-lifecycle-v4/templates/product-brief.md +133 -0
- package/.agy/skills/team-lifecycle-v4/templates/requirements.md +224 -0
- package/.agy/skills/team-quality-assurance/SKILL.md +148 -0
- package/.agy/skills/team-quality-assurance/roles/analyst/role.md +85 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +111 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +235 -0
- package/.agy/skills/team-quality-assurance/roles/coordinator/role.md +143 -0
- package/.agy/skills/team-quality-assurance/roles/executor/role.md +62 -0
- package/.agy/skills/team-quality-assurance/roles/generator/role.md +65 -0
- package/.agy/skills/team-quality-assurance/roles/scout/role.md +72 -0
- package/.agy/skills/team-quality-assurance/roles/strategist/role.md +69 -0
- package/.agy/skills/team-quality-assurance/specs/pipelines.md +115 -0
- package/.agy/skills/team-quality-assurance/specs/team-config.json +131 -0
- package/.agy/skills/team-review/SKILL.md +149 -0
- package/.agy/skills/team-review/roles/coordinator/commands/analyze.md +71 -0
- package/.agy/skills/team-review/roles/coordinator/commands/dispatch.md +91 -0
- package/.agy/skills/team-review/roles/coordinator/commands/monitor.md +209 -0
- package/.agy/skills/team-review/roles/coordinator/role.md +132 -0
- package/.agy/skills/team-review/roles/fixer/role.md +74 -0
- package/.agy/skills/team-review/roles/reviewer/role.md +66 -0
- package/.agy/skills/team-review/roles/scanner/role.md +77 -0
- package/.agy/skills/team-review/specs/dimensions.md +82 -0
- package/.agy/skills/team-review/specs/finding-schema.json +82 -0
- package/.agy/skills/team-review/specs/pipelines.md +102 -0
- package/.agy/skills/team-review/specs/team-config.json +27 -0
- package/.agy/skills/team-tech-debt/SKILL.md +133 -0
- package/.agy/skills/team-tech-debt/roles/assessor/role.md +76 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/dispatch.md +156 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/commands/monitor.md +198 -0
- package/.agy/skills/team-tech-debt/roles/coordinator/role.md +123 -0
- package/.agy/skills/team-tech-debt/roles/executor/role.md +76 -0
- package/.agy/skills/team-tech-debt/roles/planner/role.md +68 -0
- package/.agy/skills/team-tech-debt/roles/scanner/role.md +90 -0
- package/.agy/skills/team-tech-debt/roles/validator/role.md +78 -0
- package/.agy/skills/team-tech-debt/specs/pipelines.md +47 -0
- package/.agy/skills/team-tech-debt/specs/team-config.json +129 -0
- package/.agy/skills/team-testing/SKILL.md +144 -0
- package/.agy/skills/team-testing/roles/analyst/role.md +101 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/analyze.md +70 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/dispatch.md +108 -0
- package/.agy/skills/team-testing/roles/coordinator/commands/monitor.md +242 -0
- package/.agy/skills/team-testing/roles/coordinator/role.md +134 -0
- package/.agy/skills/team-testing/roles/executor/role.md +95 -0
- package/.agy/skills/team-testing/roles/generator/role.md +95 -0
- package/.agy/skills/team-testing/roles/strategist/role.md +81 -0
- package/.agy/skills/team-testing/specs/pipelines.md +101 -0
- package/.agy/skills/team-testing/specs/team-config.json +93 -0
- package/.agy/skills/wiki-connect/SKILL.md +64 -0
- package/.agy/skills/wiki-digest/SKILL.md +70 -0
- package/.agy/skills/workflow-skill-designer/SKILL.md +506 -0
- package/.agy/skills/workflow-skill-designer/phases/01-requirements-analysis.md +356 -0
- package/.agy/skills/workflow-skill-designer/phases/02-orchestrator-design.md +444 -0
- package/.agy/skills/workflow-skill-designer/phases/03-phase-design.md +458 -0
- package/.agy/skills/workflow-skill-designer/phases/04-validation.md +471 -0
- package/dashboard/dist/assets/{ArtifactsPage-CVh0Z2I2.js → ArtifactsPage-BLvAqQlQ.js} +1 -1
- package/dashboard/dist/assets/{ChatInput-CBI3qHQQ.js → ChatInput-DU9YGZKX.js} +1 -1
- package/dashboard/dist/assets/{ChatPage-BjJ9CYox.js → ChatPage-DYHfheXC.js} +1 -1
- package/dashboard/dist/assets/{CollabPage-CprGGO9y.js → CollabPage-CSlmvEa-.js} +1 -1
- package/dashboard/dist/assets/{ExecutionPanel-CClxD7cH.js → ExecutionPanel-RYWf0dYC.js} +1 -1
- package/dashboard/dist/assets/{KanbanPage-copqjdPg.js → KanbanPage-N55Iv0-X.js} +1 -1
- package/dashboard/dist/assets/{MaestroCoordinatePage-CioZjQ9N.js → MaestroCoordinatePage-BxwZ6yy5.js} +1 -1
- package/dashboard/dist/assets/{MarkdownRenderer-CtUhoxCT.js → MarkdownRenderer-ZGtOY7Ti.js} +1 -1
- package/dashboard/dist/assets/{McpPage-BcPPcJpr.js → McpPage-Im6s4pGR.js} +1 -1
- package/dashboard/dist/assets/{MeetingRoomPage-BgmAKxU-.js → MeetingRoomPage-CxHRn1xx.js} +1 -1
- package/dashboard/dist/assets/{OutputPanel-DgT3gMyp.js → OutputPanel-DaL8c1i5.js} +1 -1
- package/dashboard/dist/assets/{ProblemsPanel-BmG7rxoG.js → ProblemsPanel-BQTd5812.js} +1 -1
- package/dashboard/dist/assets/{RequirementBoardPage-k8YoeQ0r.js → RequirementBoardPage-22y9u1qh.js} +1 -1
- package/dashboard/dist/assets/{RequirementPage-Da2354px.js → RequirementPage-_mO743Xm.js} +1 -1
- package/dashboard/dist/assets/{RoomsPage-BtqDiYaU.js → RoomsPage-CExTbOGr.js} +1 -1
- package/dashboard/dist/assets/{SpecsPage-ByPVH_M3.js → SpecsPage-gr4KX51-.js} +1 -1
- package/dashboard/dist/assets/{TeamsPage-sFDLN30L.js → TeamsPage-BxEXLb5g.js} +1 -1
- package/dashboard/dist/assets/{TreeBrowser-oEx8YJXV.js → TreeBrowser-CVtPF5C9.js} +1 -1
- package/dashboard/dist/assets/{WorkflowPage-JrX7CVHh.js → WorkflowPage-BoN18Lhs.js} +1 -1
- package/dashboard/dist/assets/{arrow-left-DYvgSdIH.js → arrow-left-C5ROg97G.js} +1 -1
- package/dashboard/dist/assets/{check-jcgYBWVR.js → check-Bs8PM0tQ.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-DvZ5sMOg.js → chevron-right-SmErd_1F.js} +1 -1
- package/dashboard/dist/assets/{circle-DYT-zoRZ.js → circle-CjpslL_D.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-Bfbv3gt4.js → circle-alert-CuzAg2fd.js} +1 -1
- package/dashboard/dist/assets/{circle-check-D82WnpbI.js → circle-check-BIkDU5D5.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-CPVD1GKF.js → circle-check-big-CYctV8bK.js} +1 -1
- package/dashboard/dist/assets/{code-B3bKFGI4.js → code-DoB7rfxt.js} +1 -1
- package/dashboard/dist/assets/{columns-3-BeMAQCix.js → columns-3-Ch5KIyRa.js} +1 -1
- package/dashboard/dist/assets/{download-BCtpoWYB.js → download-DadtG2Nr.js} +1 -1
- package/dashboard/dist/assets/{folder-CTj6SNNu.js → folder-B8ODoZfb.js} +1 -1
- package/dashboard/dist/assets/{index-BxR_3IbJ.js → index-BL4h1OKY.js} +1 -1
- package/dashboard/dist/assets/{index-DpcPd-UG.js → index-DQIlX2w_.js} +4 -4
- package/dashboard/dist/assets/{index-CWBJLu42.js → index-DaFwSmVJ.js} +10 -10
- package/dashboard/dist/assets/{list-BMv8pIQn.js → list-CI-XIPZh.js} +1 -1
- package/dashboard/dist/assets/{loader-DdM4VOgF.js → loader-DpdMoQvh.js} +1 -1
- package/dashboard/dist/assets/{minus-D15s2E__.js → minus-BVbfXGrC.js} +1 -1
- package/dashboard/dist/assets/{pen-line-DO6o4xWz.js → pen-line-CR8GaHt-.js} +1 -1
- package/dashboard/dist/assets/{pencil-qGxg9jOe.js → pencil-I7GE0y29.js} +1 -1
- package/dashboard/dist/assets/{proxy-DOffTzwA.js → proxy-CcYyZZWI.js} +1 -1
- package/dashboard/dist/assets/{refresh-cw-C9UNdLCy.js → refresh-cw-BG9V_T4R.js} +1 -1
- package/dashboard/dist/assets/{rows-2-CifAA5SL.js → rows-2-DP6NjQFk.js} +1 -1
- package/dashboard/dist/assets/{search-pe7pU1YN.js → search-b78eLlw2.js} +1 -1
- package/dashboard/dist/assets/{shallow-r7YynQYA.js → shallow-CJEesgtu.js} +1 -1
- package/dashboard/dist/assets/{table-Bh772iIw.js → table-B_lk-a1d.js} +1 -1
- package/dashboard/dist/assets/{team-types-C_HqX2p2.js → team-types-Se7f9LfJ.js} +1 -1
- package/dashboard/dist/assets/{terminal-EpmtGBlw.js → terminal-DXx4tvzq.js} +1 -1
- package/dashboard/dist/assets/{trash-2-Xen46iNQ.js → trash-2-CVh9mnRj.js} +1 -1
- package/dashboard/dist/assets/{users-BLueDPxF.js → users-Da9zGME5.js} +1 -1
- package/dashboard/dist/assets/{zap-DsQCPF61.js → zap-C0zaC7gJ.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js +4 -0
- package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.d.ts +39 -0
- package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.js +423 -0
- package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.d.ts +6 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +109 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/shared/agent-types.d.ts +1 -1
- package/dist/shared/agent-types.d.ts +1 -1
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +3 -0
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +64 -0
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +107 -0
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +17 -3
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +53 -0
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts +19 -5
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +77 -32
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/config/cli-tools-defaults.json +2 -1
- package/dist/src/core/component-defs.d.ts.map +1 -1
- package/dist/src/core/component-defs.js +53 -0
- package/dist/src/core/component-defs.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +5 -3
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/utils/update-notices.d.ts +62 -0
- package/dist/src/utils/update-notices.d.ts.map +1 -0
- package/dist/src/utils/update-notices.js +178 -0
- package/dist/src/utils/update-notices.js.map +1 -0
- package/package.json +84 -82
- package/shared/agent-types.ts +1 -1
- package/workflows/agy-instructions.md +124 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Phase 4: Index and Verify
|
|
2
|
+
|
|
3
|
+
刷新 wiki 索引,验证所有创建的资产已正确索引和链接。
|
|
4
|
+
|
|
5
|
+
## Objective
|
|
6
|
+
|
|
7
|
+
- 刷新 wiki-index.json 以包含新创建的资产
|
|
8
|
+
- 验证 knowhow 文件存在并已索引
|
|
9
|
+
- 验证 spec 条目已写入
|
|
10
|
+
- 验证 ref 链接从 spec 指向 knowhow
|
|
11
|
+
- 输出完成报告
|
|
12
|
+
|
|
13
|
+
## Execution
|
|
14
|
+
|
|
15
|
+
### Step 4.1: Refresh Wiki Index
|
|
16
|
+
|
|
17
|
+
触发 wiki 索引刷新以识别新增的 knowhow 文件:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# 刷新 wiki 索引
|
|
21
|
+
maestro wiki health 2>/dev/null || echo "Wiki index refresh skipped (command not available)"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
索引刷新确保 `wiki-index.json` 包含新创建的 AST-/DCS- 文件的 WikiEntry。
|
|
25
|
+
|
|
26
|
+
### Step 4.2: Verify Knowhow Files
|
|
27
|
+
|
|
28
|
+
检查所有预期的 knowhow 文件是否存在:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
echo "=== Knowhow 资产验证 ==="
|
|
32
|
+
|
|
33
|
+
# 必需文件
|
|
34
|
+
for file in ${knowhowPaths}; do
|
|
35
|
+
if test -f "$file"; then
|
|
36
|
+
echo " OK: $file"
|
|
37
|
+
else
|
|
38
|
+
echo " MISSING: $file"
|
|
39
|
+
fi
|
|
40
|
+
done
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Step 4.3: Verify Spec Entries
|
|
44
|
+
|
|
45
|
+
检查 spec 文件中是否包含新增的条目:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
echo "=== Spec 条目验证 ==="
|
|
49
|
+
|
|
50
|
+
# 检查 coding-conventions.md 中是否含 slug 相关条目
|
|
51
|
+
grep -c "${slug}" .workflow/specs/coding-conventions.md 2>/dev/null && \
|
|
52
|
+
echo " OK: coding-conventions.md (${slug} entries found)" || \
|
|
53
|
+
echo " MISSING: No ${slug} entries in coding-conventions.md"
|
|
54
|
+
|
|
55
|
+
# 检查 architecture-constraints.md 中是否含 slug 相关条目
|
|
56
|
+
grep -c "${slug}" .workflow/specs/architecture-constraints.md 2>/dev/null && \
|
|
57
|
+
echo " OK: architecture-constraints.md (${slug} entries found)" || \
|
|
58
|
+
echo " MISSING: No ${slug} entries in architecture-constraints.md"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Step 4.4: Verify Ref Links
|
|
62
|
+
|
|
63
|
+
检查 spec 条目中的 ref 属性指向的 knowhow 文件是否存在:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
echo "=== Ref 链接验证 ==="
|
|
67
|
+
|
|
68
|
+
# 从 spec 文件中提取 ref 属性值
|
|
69
|
+
refs=$(grep -oP 'ref="knowhow/[^"]*"' .workflow/specs/coding-conventions.md .workflow/specs/architecture-constraints.md 2>/dev/null | grep "${slug}" || true)
|
|
70
|
+
|
|
71
|
+
if [ -n "$refs" ]; then
|
|
72
|
+
echo "$refs" | while IFS= read -r ref; do
|
|
73
|
+
# 提取文件路径
|
|
74
|
+
filepath=$(echo "$ref" | grep -oP 'knowhow/[^"]*')
|
|
75
|
+
if test -f ".workflow/$filepath"; then
|
|
76
|
+
echo " OK: $filepath"
|
|
77
|
+
else
|
|
78
|
+
echo " BROKEN: $filepath (file not found)"
|
|
79
|
+
fi
|
|
80
|
+
done
|
|
81
|
+
else
|
|
82
|
+
echo " WARNING: No ref links found for ${slug}"
|
|
83
|
+
fi
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Step 4.5: Generate Completion Report
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
=== Codify to Knowhow 完成 ===
|
|
90
|
+
|
|
91
|
+
包: {slug}
|
|
92
|
+
来源: {packagePath}
|
|
93
|
+
|
|
94
|
+
Knowhow 资产:
|
|
95
|
+
AST-{slug}-tokens.md — 设计 token 资产
|
|
96
|
+
AST-{slug}-components.md — 组件模式资产
|
|
97
|
+
DCS-{slug}-decisions.md — 设计决策 {仅当有冲突}
|
|
98
|
+
|
|
99
|
+
Spec 条目 ({specEntryCount} 条):
|
|
100
|
+
coding: 颜色约定, 排版约定, 间距约定
|
|
101
|
+
arch: 组件分类约束{, 设计决策约束 — 仅当有冲突}
|
|
102
|
+
|
|
103
|
+
Ref 链接: spec → knowhow 桥梁已建立
|
|
104
|
+
Wiki 索引: 已刷新
|
|
105
|
+
|
|
106
|
+
后续操作:
|
|
107
|
+
maestro wiki list --category coding # 按角色浏览
|
|
108
|
+
maestro spec load --keyword {slug} # 加载相关 spec
|
|
109
|
+
maestro wiki load <id> # 加载详文
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Output
|
|
113
|
+
|
|
114
|
+
- **Report**: 验证结果(所有资产/条目/链接状态)
|
|
115
|
+
- **TodoWrite**: Mark Phase 4 completed (all tasks done)
|
|
116
|
+
|
|
117
|
+
## Completion
|
|
118
|
+
|
|
119
|
+
Codify to Knowhow 已完成。设计包已固化为知识资产。
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn-decompose
|
|
3
|
+
description: Extract design patterns from code into specs and wiki
|
|
4
|
+
argument-hint: <path|module> [--patterns <list>] [--save-spec] [--save-wiki]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- run_command
|
|
12
|
+
- send_message
|
|
13
|
+
- view_file
|
|
14
|
+
- write_to_file
|
|
15
|
+
---
|
|
16
|
+
<purpose>
|
|
17
|
+
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
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
$ARGUMENTS — target path/module and optional flags.
|
|
22
|
+
|
|
23
|
+
**Target resolution**: file path → that file; directory → all source files; module name → Glob `src/**/{module}*`.
|
|
24
|
+
|
|
25
|
+
**Flags**:
|
|
26
|
+
- `--patterns <list>`: Comma-separated pattern names to look for (default: detect all)
|
|
27
|
+
- `--save-spec`: `Skill("spec-add")` for each new pattern
|
|
28
|
+
- `--save-wiki`: create wiki note per dimension group
|
|
29
|
+
|
|
30
|
+
**Storage read**: target files + `coding-conventions.md` + `specs/learnings.md` (dedup)
|
|
31
|
+
**Storage write**: `.workflow/knowhow/KNW-decompose-{slug}-{date}.md` + append `specs/learnings.md`
|
|
32
|
+
</context>
|
|
33
|
+
|
|
34
|
+
<state_machine>
|
|
35
|
+
|
|
36
|
+
<states>
|
|
37
|
+
S_RESOLVE — 解析 target 为具体文件列表 PERSIST: —
|
|
38
|
+
S_DEDUP — 加载已有 patterns 用于去重 PERSIST: —
|
|
39
|
+
S_ANALYZE — 4 维度并行 Agent 分析 PERSIST: —
|
|
40
|
+
S_CROSSREF — 交叉引用、去重、标记状态 PERSIST: —
|
|
41
|
+
S_CATALOG — 生成 pattern catalog 报告 PERSIST: outputs
|
|
42
|
+
S_PERSIST — 写文件 + 可选 spec-add/wiki create PERSIST: knowhow files
|
|
43
|
+
</states>
|
|
44
|
+
|
|
45
|
+
<transitions>
|
|
46
|
+
|
|
47
|
+
S_RESOLVE:
|
|
48
|
+
→ S_DEDUP WHEN: file list resolved
|
|
49
|
+
→ S_RESOLVE WHEN: unresolvable DO: ask_question
|
|
50
|
+
|
|
51
|
+
S_DEDUP:
|
|
52
|
+
→ S_ANALYZE DO: read coding-conventions.md + specs/learnings.md → build known pattern set
|
|
53
|
+
|
|
54
|
+
S_ANALYZE:
|
|
55
|
+
→ S_CROSSREF DO: A_PARALLEL_DIMENSION_ANALYSIS
|
|
56
|
+
|
|
57
|
+
S_CROSSREF:
|
|
58
|
+
→ S_CATALOG DO: A_CROSSREF_DEDUP
|
|
59
|
+
|
|
60
|
+
S_CATALOG:
|
|
61
|
+
→ S_PERSIST DO: write KNW-decompose report (grouped by dimension: pattern table + details)
|
|
62
|
+
|
|
63
|
+
S_PERSIST:
|
|
64
|
+
→ END DO: append specs/learnings.md [+ spec-add if --save-spec] [+ wiki note if --save-wiki]
|
|
65
|
+
|
|
66
|
+
</transitions>
|
|
67
|
+
|
|
68
|
+
<actions>
|
|
69
|
+
|
|
70
|
+
### A_PARALLEL_DIMENSION_ANALYSIS
|
|
71
|
+
|
|
72
|
+
Spawn 4 Agents in single message:
|
|
73
|
+
|
|
74
|
+
| Agent | Dimension | Looks for |
|
|
75
|
+
|-------|-----------|-----------|
|
|
76
|
+
| 1 | Structural | Class hierarchy, composition, DI/IoC, Factory/Builder/Singleton, barrel exports |
|
|
77
|
+
| 2 | Behavioral | Event flow, middleware chains, observer/pub-sub, command/strategy, state machines |
|
|
78
|
+
| 3 | Data | Repository/DAO, DTO pipelines, caching (memo/LRU/TTL), serialization, schema validation |
|
|
79
|
+
| 4 | Error | Error boundaries, retry/backoff/circuit-breaker, fallback chains, guard clauses, logging |
|
|
80
|
+
|
|
81
|
+
If `--patterns` specified: agents focus only on named patterns.
|
|
82
|
+
|
|
83
|
+
Each agent returns: `[{ name, dimension, confidence (high/medium/low), anchors [file:line], description, rationale, tradeoffs }]`
|
|
84
|
+
|
|
85
|
+
### A_CROSSREF_DEDUP
|
|
86
|
+
|
|
87
|
+
For each finding, match against known pattern set:
|
|
88
|
+
| Status | Condition |
|
|
89
|
+
|--------|-----------|
|
|
90
|
+
| documented | Already in coding-conventions.md |
|
|
91
|
+
| known | In specs/learnings.md |
|
|
92
|
+
| new | Not seen before |
|
|
93
|
+
|
|
94
|
+
Flag contradictions (finding conflicts with documented convention). Merge duplicates across agents (same pattern found by multiple dimensions).
|
|
95
|
+
|
|
96
|
+
</actions>
|
|
97
|
+
|
|
98
|
+
</state_machine>
|
|
99
|
+
|
|
100
|
+
<error_codes>
|
|
101
|
+
| Code | Condition | Recovery |
|
|
102
|
+
|------|-----------|----------|
|
|
103
|
+
| E002 | No source files in target | Check target has .ts/.js files |
|
|
104
|
+
| W001 | One+ dimension agent failed | Proceed with available dimensions |
|
|
105
|
+
| W003 | Large target (>50 files) | Consider --patterns filter |
|
|
106
|
+
</error_codes>
|
|
107
|
+
|
|
108
|
+
<success_criteria>
|
|
109
|
+
- [ ] 4 dimension agents spawned in parallel, findings with anchors
|
|
110
|
+
- [ ] Cross-reference: documented/known/new status assigned
|
|
111
|
+
- [ ] Pattern catalog written + specs/learnings.md appended
|
|
112
|
+
</success_criteria>
|
|
113
|
+
|
|
114
|
+
<next_step_routing>
|
|
115
|
+
- Follow-along → `/learn-follow <anchor-file>`
|
|
116
|
+
- Second opinion → `/learn-second-opinion <target>`
|
|
117
|
+
- Add to specs → `/spec-add coding ...`
|
|
118
|
+
</next_step_routing>
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn-follow
|
|
3
|
+
description: Guided reading of code or wiki to extract patterns
|
|
4
|
+
argument-hint: <path|wiki-id|topic> [--depth shallow|deep] [--save-wiki]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- run_command
|
|
12
|
+
- send_message
|
|
13
|
+
- view_file
|
|
14
|
+
- write_to_file
|
|
15
|
+
---
|
|
16
|
+
<purpose>
|
|
17
|
+
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
|
+
</purpose>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
$ARGUMENTS — target and optional flags.
|
|
22
|
+
|
|
23
|
+
**Target resolution** (auto-detected):
|
|
24
|
+
| Input | Resolution |
|
|
25
|
+
|-------|-----------|
|
|
26
|
+
| File path (contains `/` or `\`) | Read source file |
|
|
27
|
+
| Wiki ID (`<type>-<slug>`) | `maestro wiki get <id>` |
|
|
28
|
+
| Topic string | `maestro wiki search "<topic>"` → top result; fallback: Grep src/ |
|
|
29
|
+
|
|
30
|
+
**Flags**:
|
|
31
|
+
- `--depth shallow` (default): key patterns and structure only
|
|
32
|
+
- `--depth deep`: every function, every branch, every assumption
|
|
33
|
+
- `--save-wiki`: create wiki note entry with reading notes
|
|
34
|
+
|
|
35
|
+
**Storage read**: target file + wiki forward/backlinks + `coding-conventions.md` + `specs/learnings.md` (dedup)
|
|
36
|
+
**Storage write**: `.workflow/knowhow/KNW-follow-{slug}-{date}.md` + append `specs/learnings.md`
|
|
37
|
+
</context>
|
|
38
|
+
|
|
39
|
+
<state_machine>
|
|
40
|
+
|
|
41
|
+
<states>
|
|
42
|
+
S_RESOLVE — 解析 target (file/wiki/topic) PERSIST: —
|
|
43
|
+
S_CONTEXT — 构建 1-hop 上下文邻域 PERSIST: —
|
|
44
|
+
S_ORDER — 确定阅读顺序 PERSIST: —
|
|
45
|
+
S_READ — 逐节应用 forcing questions PERSIST: —
|
|
46
|
+
S_EXTRACT — 提取 patterns、cross-ref conventions PERSIST: —
|
|
47
|
+
S_PERSIST — 写 understanding map + spec-entry 块 PERSIST: knowhow files
|
|
48
|
+
</states>
|
|
49
|
+
|
|
50
|
+
<transitions>
|
|
51
|
+
|
|
52
|
+
S_RESOLVE:
|
|
53
|
+
→ S_CONTEXT WHEN: target resolved
|
|
54
|
+
→ S_RESOLVE WHEN: unresolvable DO: ask_question with suggestions
|
|
55
|
+
|
|
56
|
+
S_CONTEXT:
|
|
57
|
+
→ S_ORDER DO: A_BUILD_CONTEXT_WEB
|
|
58
|
+
|
|
59
|
+
S_ORDER:
|
|
60
|
+
→ S_READ DO: A_BUILD_READING_ORDER
|
|
61
|
+
|
|
62
|
+
S_READ:
|
|
63
|
+
→ S_EXTRACT DO: A_GUIDED_READ (apply 4 forcing questions per section)
|
|
64
|
+
|
|
65
|
+
S_EXTRACT:
|
|
66
|
+
→ S_PERSIST DO: A_EXTRACT_PATTERNS
|
|
67
|
+
|
|
68
|
+
S_PERSIST:
|
|
69
|
+
→ END DO: write KNW-follow + append specs/learnings.md [+ wiki note if --save-wiki]
|
|
70
|
+
|
|
71
|
+
</transitions>
|
|
72
|
+
|
|
73
|
+
<actions>
|
|
74
|
+
|
|
75
|
+
### A_BUILD_CONTEXT_WEB
|
|
76
|
+
|
|
77
|
+
| Target type | Context |
|
|
78
|
+
|-------------|---------|
|
|
79
|
+
| Wiki entry | `maestro wiki forward <id>` + `maestro wiki backlinks <id>` → read top 3 related |
|
|
80
|
+
| Code file | Parse imports → dependency files; grep exports → reverse deps; read top 3 dependents (50 lines) |
|
|
81
|
+
| Directory | List files, identify entry points → build reading order: entry → core → utils → tests |
|
|
82
|
+
|
|
83
|
+
### A_BUILD_READING_ORDER
|
|
84
|
+
|
|
85
|
+
- Single file: split by function/class/export boundaries
|
|
86
|
+
- Wiki entry: split by markdown headings
|
|
87
|
+
- Directory: order by dependency (entry points first, leaf last)
|
|
88
|
+
- `--depth shallow`: top-level structure only; `--depth deep`: every body and branch
|
|
89
|
+
|
|
90
|
+
### A_GUIDED_READ
|
|
91
|
+
|
|
92
|
+
For each section, apply 4 forcing questions:
|
|
93
|
+
|
|
94
|
+
| # | Question | Extracts |
|
|
95
|
+
|---|----------|----------|
|
|
96
|
+
| 1 | "What pattern is being used here?" | Design patterns, idioms, conventions |
|
|
97
|
+
| 2 | "Why this approach instead of alternatives?" | Trade-offs, rejected options |
|
|
98
|
+
| 3 | "What assumption does this depend on?" | Implicit contracts, input shape, ordering |
|
|
99
|
+
| 4 | "What would break if this changed?" | Fragility, downstream effects |
|
|
100
|
+
|
|
101
|
+
### A_EXTRACT_PATTERNS
|
|
102
|
+
|
|
103
|
+
Extract: design patterns (with file:line anchors), naming conventions, error handling approach, data flow, assumptions.
|
|
104
|
+
Cross-ref against `coding-conventions.md`: documented → "confirmed convention", undocumented → "candidate for spec-add".
|
|
105
|
+
|
|
106
|
+
Write understanding map: Key Concepts, Patterns (table: name/location/convention status), Assumptions, Open Questions, Connections.
|
|
107
|
+
|
|
108
|
+
</actions>
|
|
109
|
+
|
|
110
|
+
</state_machine>
|
|
111
|
+
|
|
112
|
+
<error_codes>
|
|
113
|
+
| Code | Condition | Recovery |
|
|
114
|
+
|------|-----------|----------|
|
|
115
|
+
| W002 | coding-conventions.md not found | All patterns marked "unknown status" |
|
|
116
|
+
| W003 | Target > 1000 lines | Auto-switch to shallow; use --depth deep to override |
|
|
117
|
+
</error_codes>
|
|
118
|
+
|
|
119
|
+
<success_criteria>
|
|
120
|
+
- [ ] 4 forcing questions applied per section
|
|
121
|
+
- [ ] Patterns extracted with file:line anchors and convention cross-ref
|
|
122
|
+
- [ ] Understanding map + spec-entry blocks written
|
|
123
|
+
</success_criteria>
|
|
124
|
+
|
|
125
|
+
<next_step_routing>
|
|
126
|
+
- Deep pattern dive → `/learn-decompose <path>`
|
|
127
|
+
- Add to specs → `/spec-add coding <description>`
|
|
128
|
+
- Second opinion → `/learn-second-opinion <file>`
|
|
129
|
+
</next_step_routing>
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn-investigate
|
|
3
|
+
description: Investigate questions with hypothesis testing and evidence logging
|
|
4
|
+
argument-hint: <question> [--scope <path>] [--max-hypotheses N]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- run_command
|
|
12
|
+
- send_message
|
|
13
|
+
- view_file
|
|
14
|
+
- write_to_file
|
|
15
|
+
---
|
|
16
|
+
<purpose>
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
Unlike `quality-debug` (fix bugs during execution), this answers "how does X work?", "why does Y happen?", "what if Z?".
|
|
20
|
+
</purpose>
|
|
21
|
+
|
|
22
|
+
<context>
|
|
23
|
+
$ARGUMENTS — question text and optional flags.
|
|
24
|
+
|
|
25
|
+
**Flags**:
|
|
26
|
+
- `--scope <path>`: Restrict to files under this dir (default: entire project)
|
|
27
|
+
- `--max-hypotheses N`: Max hypotheses before escalation (default: 3)
|
|
28
|
+
|
|
29
|
+
**Storage write**:
|
|
30
|
+
- `.workflow/knowhow/KNW-investigate-{slug}/evidence.ndjson` — structured evidence (one JSON line per item)
|
|
31
|
+
- `.workflow/knowhow/KNW-investigate-{slug}/understanding.md` — evolving understanding
|
|
32
|
+
- `.workflow/knowhow/KNW-investigate-{slug}/report.md` — final report
|
|
33
|
+
- `specs/learnings.md` — appended `<spec-entry>` blocks
|
|
34
|
+
|
|
35
|
+
**Storage read**: source files in scope + `maestro wiki search` + `specs/learnings.md` + `debug-notes.md` + `codebase/architecture.md`
|
|
36
|
+
</context>
|
|
37
|
+
|
|
38
|
+
<state_machine>
|
|
39
|
+
|
|
40
|
+
<states>
|
|
41
|
+
S_FRAME — 解析问题、确定 scope、搜索先验知识 PERSIST: understanding.md (initial)
|
|
42
|
+
S_EVIDENCE — 系统收集证据 PERSIST: evidence.ndjson
|
|
43
|
+
S_PATTERN — 比对已知模式 PERSIST: understanding.md (patterns)
|
|
44
|
+
S_HYPOTHESIZE — 生成假设列表 PERSIST: understanding.md (hypotheses)
|
|
45
|
+
S_CLI_EXPLORE — CLI 辅助探索(可选) PERSIST: evidence.ndjson (append)
|
|
46
|
+
S_TEST — 逐假设测试 PERSIST: evidence.ndjson + understanding.md
|
|
47
|
+
S_ESCALATE — 3-strike 升级 PERSIST: —
|
|
48
|
+
S_REPORT — 综合报告 + persist PERSIST: report.md + specs/learnings.md
|
|
49
|
+
</states>
|
|
50
|
+
|
|
51
|
+
<transitions>
|
|
52
|
+
|
|
53
|
+
S_FRAME:
|
|
54
|
+
→ S_EVIDENCE DO: A_FRAME_QUESTION
|
|
55
|
+
|
|
56
|
+
S_EVIDENCE:
|
|
57
|
+
→ S_PATTERN DO: A_COLLECT_EVIDENCE
|
|
58
|
+
|
|
59
|
+
S_PATTERN:
|
|
60
|
+
→ S_HYPOTHESIZE DO: match evidence against debug-notes.md + specs/learnings.md patterns
|
|
61
|
+
|
|
62
|
+
S_HYPOTHESIZE:
|
|
63
|
+
→ S_CLI_EXPLORE WHEN: CLI tools enabled AND hypotheses non-trivial DO: A_FORM_HYPOTHESES
|
|
64
|
+
→ S_TEST WHEN: no CLI tools OR trivial hypotheses DO: A_FORM_HYPOTHESES
|
|
65
|
+
|
|
66
|
+
S_CLI_EXPLORE:
|
|
67
|
+
→ S_TEST DO: A_CLI_SUPPLEMENT (maestro delegate --role explore --mode analysis, run_in_background, STOP)
|
|
68
|
+
|
|
69
|
+
S_TEST:
|
|
70
|
+
→ S_REPORT WHEN: hypothesis confirmed DO: A_TEST_HYPOTHESIS
|
|
71
|
+
→ S_REPORT WHEN: all hypotheses tested (some confirmed) DO: A_TEST_HYPOTHESIS
|
|
72
|
+
→ S_ESCALATE WHEN: max_hypotheses all failed DO: A_TEST_HYPOTHESIS
|
|
73
|
+
|
|
74
|
+
S_ESCALATE:
|
|
75
|
+
→ S_HYPOTHESIZE WHEN: user broadens scope or provides new hypothesis DO: ask_question
|
|
76
|
+
→ S_REPORT WHEN: user selects "Escalate" or still stuck DO: mark INCONCLUSIVE
|
|
77
|
+
|
|
78
|
+
S_REPORT:
|
|
79
|
+
→ END DO: A_SYNTHESIZE_REPORT
|
|
80
|
+
|
|
81
|
+
</transitions>
|
|
82
|
+
|
|
83
|
+
<actions>
|
|
84
|
+
|
|
85
|
+
### A_FRAME_QUESTION
|
|
86
|
+
|
|
87
|
+
1. Parse question, generate slug, create KNW-investigate-{slug}/
|
|
88
|
+
2. Search prior knowledge: `maestro wiki search "<question>"` + search specs/learnings.md + read debug-notes.md
|
|
89
|
+
3. Write initial understanding.md (question, prior knowledge summary, scope, timestamp)
|
|
90
|
+
|
|
91
|
+
### A_COLLECT_EVIDENCE
|
|
92
|
+
|
|
93
|
+
Parallel evidence gathering:
|
|
94
|
+
1. Code search: Grep keywords from question
|
|
95
|
+
2. File inspection: Read most relevant files
|
|
96
|
+
3. Import tracing: follow dependency chain
|
|
97
|
+
4. Git history: `git log --oneline -10 -- <relevant-files>`
|
|
98
|
+
|
|
99
|
+
Each item → append evidence.ndjson: `{ts, type (code|git|search|doc), source (file:line), relevance (high|medium|low), content, note}`
|
|
100
|
+
|
|
101
|
+
### A_FORM_HYPOTHESES
|
|
102
|
+
|
|
103
|
+
Generate ranked hypotheses: each is specific, testable claim about "how/why".
|
|
104
|
+
Rank by plausibility (evidence strength). Write to understanding.md:
|
|
105
|
+
- `[HIGH]` hypothesis — Evidence: {refs}
|
|
106
|
+
- `[MEDIUM]` hypothesis — Evidence: {refs}
|
|
107
|
+
|
|
108
|
+
### A_CLI_SUPPLEMENT
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
maestro delegate "PURPOSE: Gather evidence for hypotheses
|
|
112
|
+
TASK: Trace call chains and data flows per hypothesis | Find corroborating/contradicting patterns
|
|
113
|
+
EXPECTED: JSON [{hypothesis_rank, evidence: [{file, line, supports: bool, explanation}]}]
|
|
114
|
+
" --role explore --mode analysis
|
|
115
|
+
```
|
|
116
|
+
Run_in_background, STOP, wait. On callback: append to evidence.ndjson.
|
|
117
|
+
|
|
118
|
+
### A_TEST_HYPOTHESIS
|
|
119
|
+
|
|
120
|
+
For each hypothesis (rank order):
|
|
121
|
+
1. Design test: what evidence would confirm/disprove?
|
|
122
|
+
2. Execute: code trace, targeted search, data inspection
|
|
123
|
+
3. Record: append evidence.ndjson with type: "test"
|
|
124
|
+
4. Update: mark hypothesis confirmed / disproved / inconclusive
|
|
125
|
+
|
|
126
|
+
### A_SYNTHESIZE_REPORT
|
|
127
|
+
|
|
128
|
+
Write report.md: Answer (or INCONCLUSIVE), Evidence Trail table, Hypotheses Tested table, Key Learnings, Open Questions.
|
|
129
|
+
Append to specs/learnings.md: confirmed → roles="implement", disproved → roles="analyze" (gotcha).
|
|
130
|
+
|
|
131
|
+
</actions>
|
|
132
|
+
|
|
133
|
+
</state_machine>
|
|
134
|
+
|
|
135
|
+
<error_codes>
|
|
136
|
+
| Code | Condition | Recovery |
|
|
137
|
+
|------|-----------|----------|
|
|
138
|
+
| E002 | --scope path not found | Check path |
|
|
139
|
+
| W002 | Very few evidence matches (<3) | Broaden search terms or expand scope |
|
|
140
|
+
| W003 | All hypotheses inconclusive | Investigation marked INCONCLUSIVE |
|
|
141
|
+
</error_codes>
|
|
142
|
+
|
|
143
|
+
<success_criteria>
|
|
144
|
+
- [ ] Evidence collected and logged to evidence.ndjson (structured NDJSON)
|
|
145
|
+
- [ ] At least 1 hypothesis formed and tested
|
|
146
|
+
- [ ] 3-strike escalation triggered if all fail
|
|
147
|
+
- [ ] Report + spec-entry blocks written
|
|
148
|
+
</success_criteria>
|
|
149
|
+
|
|
150
|
+
<next_step_routing>
|
|
151
|
+
- Save to specs → `/spec-add debug <finding>`
|
|
152
|
+
- Follow code → `/learn-follow <path>`
|
|
153
|
+
- Decompose patterns → `/learn-decompose <module>`
|
|
154
|
+
</next_step_routing>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: learn-retro
|
|
3
|
+
description: Retrospective of git activity and decision quality
|
|
4
|
+
argument-hint: [--lens git|decision|all] [--days N] [--author <name>] [--area <path>] [--phase N] [--tag <tag>] [--id <id>] [--compare]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- run_command
|
|
12
|
+
- send_message
|
|
13
|
+
- view_file
|
|
14
|
+
- write_to_file
|
|
15
|
+
---
|
|
16
|
+
<purpose>
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
All insights persist to `specs/learnings.md` as `<spec-entry>` blocks.
|
|
20
|
+
</purpose>
|
|
21
|
+
|
|
22
|
+
<context>
|
|
23
|
+
$ARGUMENTS — lens selection and scope flags.
|
|
24
|
+
|
|
25
|
+
**Lens**: `--lens git` | `--lens decision` | `--lens all` (default: all)
|
|
26
|
+
|
|
27
|
+
**Git lens flags**: `--days N` (default: 7), `--author <name>`, `--area <path>`, `--compare` (vs prior retro)
|
|
28
|
+
**Decision lens flags**: `--phase N`, `--tag <tag>`, `--id <id>` (single decision by wiki/INS id)
|
|
29
|
+
|
|
30
|
+
**Storage write**:
|
|
31
|
+
- `.workflow/knowhow/KNW-retro-{date}.md` — unified report
|
|
32
|
+
- `.workflow/knowhow/KNW-retro-{date}.json` — structured metrics
|
|
33
|
+
- `specs/learnings.md` — appended `<spec-entry>` blocks (source: retro-git / retro-decision)
|
|
34
|
+
|
|
35
|
+
**Storage read**: git history, `.workflow/state.json`, prior `KNW-retro-*.json`, `specs/learnings.md`, wiki specs, `architecture-constraints.md`, phase context files
|
|
36
|
+
</context>
|
|
37
|
+
|
|
38
|
+
<state_machine>
|
|
39
|
+
|
|
40
|
+
<states>
|
|
41
|
+
S_PARSE — 解析 lens + flags PERSIST: —
|
|
42
|
+
S_GIT — git 活动分析(lens=git/all 时) PERSIST: metrics
|
|
43
|
+
S_DECISION — 决策质量评估(lens=decision/all 时) PERSIST: evaluations
|
|
44
|
+
S_REPORT — 生成统一报告 PERSIST: .md + .json
|
|
45
|
+
S_PERSIST — 写 spec-entry 块 PERSIST: specs/learnings.md
|
|
46
|
+
</states>
|
|
47
|
+
|
|
48
|
+
<transitions>
|
|
49
|
+
|
|
50
|
+
S_PARSE:
|
|
51
|
+
→ S_GIT WHEN: lens == git OR all DO: ensure .workflow/knowhow/ exists (mkdir -p)
|
|
52
|
+
→ S_DECISION WHEN: lens == decision DO: ensure .workflow/knowhow/ exists (mkdir -p)
|
|
53
|
+
|
|
54
|
+
S_GIT:
|
|
55
|
+
→ S_DECISION WHEN: lens == all DO: A_GIT_ANALYSIS
|
|
56
|
+
→ S_REPORT WHEN: lens == git DO: A_GIT_ANALYSIS
|
|
57
|
+
|
|
58
|
+
S_DECISION:
|
|
59
|
+
→ S_REPORT DO: A_DECISION_ANALYSIS
|
|
60
|
+
|
|
61
|
+
S_REPORT:
|
|
62
|
+
→ S_PERSIST DO: write KNW-retro-{date}.md + .json
|
|
63
|
+
|
|
64
|
+
S_PERSIST:
|
|
65
|
+
→ END DO: append insights to specs/learnings.md via `maestro spec add learning`
|
|
66
|
+
RULE: INS-id = hash(lens + metric_or_decision_id + date) for cross-session stability
|
|
67
|
+
|
|
68
|
+
</transitions>
|
|
69
|
+
|
|
70
|
+
<actions>
|
|
71
|
+
|
|
72
|
+
### A_GIT_ANALYSIS
|
|
73
|
+
|
|
74
|
+
**Parallel git commands**:
|
|
75
|
+
```bash
|
|
76
|
+
git log --since="{start}" --format="%H|%aN|%ae|%ai|%s" --shortstat
|
|
77
|
+
git log --since="{start}" --format="COMMIT:%H|%aN" --numstat
|
|
78
|
+
git log --since="{start}" --format="%at|%aN|%ai|%s" | sort -n
|
|
79
|
+
git log --since="{start}" --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn | head -20
|
|
80
|
+
git shortlog --since="{start}" -sn --no-merges
|
|
81
|
+
```
|
|
82
|
+
Apply --author and --area filters.
|
|
83
|
+
|
|
84
|
+
**Compute metrics**:
|
|
85
|
+
|
|
86
|
+
| Metric | Formula |
|
|
87
|
+
|--------|---------|
|
|
88
|
+
| Test ratio | test_insertions / total_insertions * 100% |
|
|
89
|
+
| Churn rate | files changed >2x / total unique files |
|
|
90
|
+
| Sessions | Cluster commits by >2hr gaps in timestamps |
|
|
91
|
+
| LOC/session-hour | net_loc / total_session_hours |
|
|
92
|
+
|
|
93
|
+
**Per-author breakdown**: commits, LOC, top 3 areas, test ratio, session count.
|
|
94
|
+
|
|
95
|
+
**Trend** (if --compare or prior KNW-retro-*.json exists): compute deltas, flag >20% changes.
|
|
96
|
+
|
|
97
|
+
**Distill insights**: high churn files (instability), low test ratio areas (<20%), session patterns, area drift vs roadmap.
|
|
98
|
+
|
|
99
|
+
### A_DECISION_ANALYSIS
|
|
100
|
+
|
|
101
|
+
**Collect** (parallel):
|
|
102
|
+
```bash
|
|
103
|
+
maestro wiki search "decision" --json
|
|
104
|
+
maestro wiki list --type spec --json
|
|
105
|
+
git log --oneline --all --grep="decision\|chose\|decided" -20
|
|
106
|
+
```
|
|
107
|
+
Plus: architecture-constraints.md, phase context Locked/Deferred sections, specs/learnings.md.
|
|
108
|
+
Apply --phase/--tag/--id filters.
|
|
109
|
+
|
|
110
|
+
**Build registry** per decision: id, title, source, date, rationale, alternatives, phase, implementation_evidence [file paths].
|
|
111
|
+
|
|
112
|
+
**Evaluate** — spawn 3 Agents in single message:
|
|
113
|
+
|
|
114
|
+
| Agent | Dimension | Grades |
|
|
115
|
+
|-------|-----------|--------|
|
|
116
|
+
| Technical Soundness | Implementation matches intent? Context changed? | sound / degraded / violated |
|
|
117
|
+
| Cost Assessment | Complexity added? Coupling/debt? | low-cost / acceptable / expensive / debt-creating |
|
|
118
|
+
| Alternative Hindsight | Right call with current knowledge? Reversible? | confirmed / questionable / should-revisit |
|
|
119
|
+
|
|
120
|
+
**Classify lifecycle**:
|
|
121
|
+
|
|
122
|
+
| Status | Criteria |
|
|
123
|
+
|--------|---------|
|
|
124
|
+
| Validated | sound + low/acceptable + confirmed |
|
|
125
|
+
| Aging | sound + expensive + confirmed |
|
|
126
|
+
| Questionable | degraded/violated + questionable |
|
|
127
|
+
| Stale | any + should-revisit |
|
|
128
|
+
| Reversed | code contradicts decision |
|
|
129
|
+
|
|
130
|
+
**Recommend**: Aging → tech debt review, Questionable → create issue, Stale → refresh, Reversed → document reversal.
|
|
131
|
+
|
|
132
|
+
</actions>
|
|
133
|
+
|
|
134
|
+
</state_machine>
|
|
135
|
+
|
|
136
|
+
<error_codes>
|
|
137
|
+
| Code | Condition | Recovery |
|
|
138
|
+
|------|-----------|----------|
|
|
139
|
+
| E001 | Not in git repo (git lens) | Navigate to git repo |
|
|
140
|
+
| E002 | No commits in window (git lens) | Increase --days |
|
|
141
|
+
| E003 | No decisions found (decision lens) | Check wiki/specs or provide --id |
|
|
142
|
+
| E004 | --id not found in wiki or knowhow | Verify the decision ID exists |
|
|
143
|
+
| W002 | No prior retro for comparison | Skip trend; first retro = baseline |
|
|
144
|
+
| W003 | One perspective agent failed | Proceed with available perspectives |
|
|
145
|
+
</error_codes>
|
|
146
|
+
|
|
147
|
+
<success_criteria>
|
|
148
|
+
- [ ] Git lens: metrics computed (commits, LOC, test ratio, churn, sessions), insights distilled
|
|
149
|
+
- [ ] Decision lens: decisions collected, 3 agents evaluated in parallel, lifecycle classified
|
|
150
|
+
- [ ] Unified report + structured JSON written
|
|
151
|
+
- [ ] specs/learnings.md appended with stable INS-ids
|
|
152
|
+
</success_criteria>
|
|
153
|
+
|
|
154
|
+
<next_step_routing>
|
|
155
|
+
- Browse insights → `/manage-learn list --tag retro`
|
|
156
|
+
- Deep dive churn → `/learn-follow <path>`
|
|
157
|
+
- Fix test gaps → `/quality-auto-test <area>`
|
|
158
|
+
- Investigate stale decision → `/learn-investigate <question>`
|
|
159
|
+
</next_step_routing>
|