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
|
+
---
|
|
2
|
+
name: quality-test
|
|
3
|
+
description: Use when implementation needs user acceptance testing with interactive verification and gap closure
|
|
4
|
+
argument-hint: [phase] [--smoke] [--auto-fix]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- ask_question
|
|
7
|
+
- define_subagent
|
|
8
|
+
- grep_search
|
|
9
|
+
- invoke_subagent
|
|
10
|
+
- manage_subagents
|
|
11
|
+
- replace_file_content
|
|
12
|
+
- run_command
|
|
13
|
+
- send_message
|
|
14
|
+
- view_file
|
|
15
|
+
- write_to_file
|
|
16
|
+
---
|
|
17
|
+
<purpose>
|
|
18
|
+
Run UAT-style conversational testing for a completed phase. Designs test scenarios from verification criteria, walks through each scenario interactively one at a time with plain text responses, and records pass/fail results with severity inference.
|
|
19
|
+
|
|
20
|
+
When issues are found, spawns parallel debug agents (one per gap cluster) to diagnose root causes, then optionally triggers the gap-fix loop (plan --gaps -> execute -> re-verify) to auto-close gaps.
|
|
21
|
+
|
|
22
|
+
Key mechanisms from GSD verify-work:
|
|
23
|
+
- **Session persistence**: uat.md survives context resets, resume from any point
|
|
24
|
+
- **Severity inference**: Natural language -> blocker/major/minor/cosmetic (never ask)
|
|
25
|
+
- **Cold-start smoke tests**: --smoke flag injects basic sanity tests before UAT
|
|
26
|
+
- **Parallel auto-diagnosis**: Spawn debug agents per gap cluster with pre-filled symptoms
|
|
27
|
+
- **Gap-plan closure loop**: --auto-fix triggers verify -> plan --gaps -> execute -> re-verify
|
|
28
|
+
</purpose>
|
|
29
|
+
|
|
30
|
+
<required_reading>
|
|
31
|
+
@~/.maestro/workflows/test.md
|
|
32
|
+
</required_reading>
|
|
33
|
+
|
|
34
|
+
<context>
|
|
35
|
+
Phase or task: $ARGUMENTS (optional)
|
|
36
|
+
|
|
37
|
+
Flags, artifact context resolution, and output directory format defined in workflow test.md.
|
|
38
|
+
</context>
|
|
39
|
+
|
|
40
|
+
<execution>
|
|
41
|
+
Follow '~/.maestro/workflows/test.md' completely.
|
|
42
|
+
|
|
43
|
+
**Command-specific extensions (not in workflow):**
|
|
44
|
+
|
|
45
|
+
**Knowledge context loading** (before test design):
|
|
46
|
+
- Wiki search: `maestro wiki search "<phase/feature keywords>" --json` → prior test strategies, recipes, decisions
|
|
47
|
+
- Role knowledge: `maestro wiki list --category test` → select relevant → `maestro wiki load <id>`
|
|
48
|
+
- Specs + tools: `maestro spec load --category test` → test conventions + discoverable knowhow tools
|
|
49
|
+
|
|
50
|
+
**Test tool discovery** (knowhow tools as scenario source):
|
|
51
|
+
- Load registered test tools: `maestro spec load --category test --keyword <feature>`
|
|
52
|
+
- If tools found, extract their steps as additional test scenarios marked `source: "tool"`
|
|
53
|
+
- Each numbered step in a tool becomes a UAT test with its assertion as `expected` behavior
|
|
54
|
+
|
|
55
|
+
**Review findings integration** (from related review artifacts):
|
|
56
|
+
- Extract critical/high findings as additional test scenarios, marked `source: "review_finding"`
|
|
57
|
+
- When review verdict is "BLOCK" and review-finding tests fail, auto-enter gap-fix loop
|
|
58
|
+
|
|
59
|
+
**Debug root cause integration** (from related debug artifacts):
|
|
60
|
+
- Generate regression test scenarios from confirmed root causes, marked `source: "debug_root_cause"`
|
|
61
|
+
|
|
62
|
+
**Register artifact on completion:**
|
|
63
|
+
```
|
|
64
|
+
Append to state.json.artifacts[]:
|
|
65
|
+
{
|
|
66
|
+
id: nextArtifactId(artifacts, "test"), // TST-001
|
|
67
|
+
type: "test",
|
|
68
|
+
milestone: current_milestone,
|
|
69
|
+
phase: target_phase,
|
|
70
|
+
scope: "phase",
|
|
71
|
+
path: "scratch/{YYYYMMDD}-test-P{N}-{slug}",
|
|
72
|
+
status: issues == 0 ? "completed" : "failed",
|
|
73
|
+
depends_on: exec_art.id,
|
|
74
|
+
harvested: false,
|
|
75
|
+
created_at: start_time,
|
|
76
|
+
completed_at: now()
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Next-step routing on completion:**
|
|
81
|
+
- All tests pass → `/maestro-milestone-audit`
|
|
82
|
+
- Issues found, --auto-fix ran and succeeded → `/maestro-verify {phase}`
|
|
83
|
+
- Issues found, --auto-fix ran but gaps remain → `/quality-debug --from-uat {phase}`
|
|
84
|
+
- Issues found, manual fix needed → `/quality-debug --from-uat {phase}`
|
|
85
|
+
- Coverage below threshold → `/quality-auto-test {phase}`
|
|
86
|
+
- Need integration tests → `/quality-auto-test {phase}`
|
|
87
|
+
</execution>
|
|
88
|
+
|
|
89
|
+
<error_codes>
|
|
90
|
+
| Code | Severity | Condition | Recovery |
|
|
91
|
+
|------|----------|-----------|----------|
|
|
92
|
+
| E001 | error | Phase or task target required (no active sessions) | Prompt user for phase number |
|
|
93
|
+
| E002 | error | Phase not verified yet (no verification.json) | Suggest `/maestro-verify` first |
|
|
94
|
+
| E003 | error | Smoke test failed (app won't start) | Suggest `/quality-debug` |
|
|
95
|
+
| W001 | warning | One or more test scenarios failed | Auto-diagnose, suggest fix options |
|
|
96
|
+
| W002 | warning | Coverage below threshold | Suggest `/quality-auto-test` |
|
|
97
|
+
</error_codes>
|
|
98
|
+
|
|
99
|
+
<success_criteria>
|
|
100
|
+
- [ ] Target resolved (phase or scratch task)
|
|
101
|
+
- [ ] Active sessions checked, resume offered if applicable
|
|
102
|
+
- [ ] Smoke tests run if --smoke flag set
|
|
103
|
+
- [ ] test-plan.json generated with categorized tests mapped to requirements
|
|
104
|
+
- [ ] uat.md created/resumed with all tests
|
|
105
|
+
- [ ] Tests presented one at a time with expected behavior
|
|
106
|
+
- [ ] User responses processed as pass/issue/skip
|
|
107
|
+
- [ ] Severity inferred from natural language (never asked)
|
|
108
|
+
- [ ] Batched writes: on issue, every 5 passes, or completion
|
|
109
|
+
- [ ] test-results.json and coverage-report.json written
|
|
110
|
+
- [ ] UAT confidence scored with 4-dimension factor model
|
|
111
|
+
- [ ] Readiness gate checked before final report
|
|
112
|
+
- [ ] Pressure pass completed if > 80% pass rate
|
|
113
|
+
- [ ] Confidence summary appended to uat.md
|
|
114
|
+
- [ ] index.json uat fields updated
|
|
115
|
+
- [ ] If issues: parallel debug agents spawned per gap cluster
|
|
116
|
+
- [ ] Gaps updated with root_cause, fix_direction, affected_files
|
|
117
|
+
- [ ] Gap-fix loop triggered if --auto-fix (max 2 iterations)
|
|
118
|
+
- [ ] Next step routed (phase-transition if pass, verify if auto-fix success, debug --from-uat if issues, test-gen if low coverage)
|
|
119
|
+
</success_criteria>
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-audit
|
|
3
|
+
description: OWASP Top 10 and STRIDE security auditing with supply chain analysis
|
|
4
|
+
argument-hint: [quick|standard|deep] [--scope <path>]
|
|
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 security audit covering OWASP Top 10, dependency supply chain, secrets detection,
|
|
18
|
+
CI/CD pipeline review, and optional STRIDE threat modeling. Three tiers control depth vs speed.
|
|
19
|
+
</purpose>
|
|
20
|
+
|
|
21
|
+
<context>
|
|
22
|
+
$ARGUMENTS — Parse tier and scope:
|
|
23
|
+
- Tier: `quick` (default) | `standard` | `deep`
|
|
24
|
+
- `--scope <path>`: Limit scan to directory (default: project root)
|
|
25
|
+
|
|
26
|
+
**Tier coverage:**
|
|
27
|
+
|
|
28
|
+
| Tier | OWASP | Dependencies | Secrets | CI/CD | STRIDE | Git History |
|
|
29
|
+
|------|-------|-------------|---------|-------|--------|-------------|
|
|
30
|
+
| quick | ✓ | ✓ | — | — | — | — |
|
|
31
|
+
| standard | ✓ | ✓ | ✓ | ✓ | — | — |
|
|
32
|
+
| deep | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
33
|
+
</context>
|
|
34
|
+
|
|
35
|
+
<execution>
|
|
36
|
+
|
|
37
|
+
**Phase 1: Reconnaissance**
|
|
38
|
+
|
|
39
|
+
1. Detect tech stack from package.json / go.mod / requirements.txt / Cargo.toml
|
|
40
|
+
2. Identify entry points: HTTP handlers, API routes, CLI parsers, WebSocket handlers
|
|
41
|
+
3. List authentication/authorization modules
|
|
42
|
+
4. Map data flow: user input → processing → storage → output
|
|
43
|
+
|
|
44
|
+
**Phase 2: OWASP Top 10 Scan** (all tiers)
|
|
45
|
+
|
|
46
|
+
For each category, scan relevant source files:
|
|
47
|
+
|
|
48
|
+
| # | Category | What to check |
|
|
49
|
+
|---|----------|--------------|
|
|
50
|
+
| A01 | Broken Access Control | Missing auth middleware, direct object references, path traversal |
|
|
51
|
+
| A02 | Cryptographic Failures | Weak algorithms, hardcoded keys, missing TLS, plaintext storage |
|
|
52
|
+
| A03 | Injection | SQL concatenation, shell exec with user input, template injection |
|
|
53
|
+
| A04 | Insecure Design | Missing rate limits, no CSRF tokens, predictable tokens |
|
|
54
|
+
| A05 | Security Misconfiguration | Debug mode, default credentials, verbose errors, open CORS |
|
|
55
|
+
| A06 | Vulnerable Components | Known CVEs in dependencies |
|
|
56
|
+
| A07 | Auth Failures | Weak password rules, missing brute-force protection, session fixation |
|
|
57
|
+
| A08 | Data Integrity | Deserialization of untrusted data, unsigned updates |
|
|
58
|
+
| A09 | Logging Failures | Missing audit logs, logging sensitive data |
|
|
59
|
+
| A10 | SSRF | Unvalidated URLs in server-side requests |
|
|
60
|
+
|
|
61
|
+
Use `Grep` for pattern matching (e.g., `eval(`, `exec(`, `innerHTML`, `dangerouslySetInnerHTML`,
|
|
62
|
+
`sql.*\+.*req\.`, `process\.env` without validation).
|
|
63
|
+
|
|
64
|
+
**Phase 3: Dependency Audit** (all tiers)
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Node.js
|
|
68
|
+
npm audit --json 2>/dev/null || true
|
|
69
|
+
# Check lockfile integrity
|
|
70
|
+
test -f package-lock.json && echo "lockfile present" || echo "WARNING: no lockfile"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Check for:
|
|
74
|
+
- Known vulnerabilities (CVE references)
|
|
75
|
+
- Lockfile presence and integrity
|
|
76
|
+
- Typosquatting risk on critical dependencies (manually check suspicious names)
|
|
77
|
+
|
|
78
|
+
**Phase 4: Secrets Detection** (standard + deep)
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Current codebase
|
|
82
|
+
grep -rn --include="*.ts" --include="*.js" --include="*.json" --include="*.env*" \
|
|
83
|
+
-E "(password|secret|api.?key|token|credential).*=.*['\"][^'\"]{8,}" . || true
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Check `.env.example` for leaked values. Check `.gitignore` for missing `.env` patterns.
|
|
87
|
+
|
|
88
|
+
**Phase 5: CI/CD Audit** (standard + deep)
|
|
89
|
+
|
|
90
|
+
Scan `.github/workflows/*.yml` for:
|
|
91
|
+
- Overly permissive `permissions:` (write-all, contents: write)
|
|
92
|
+
- Unpinned action versions (`uses: actions/checkout@main` vs `@v4.1.0`)
|
|
93
|
+
- Secrets in logs (missing `mask` or `add-mask`)
|
|
94
|
+
- Pull request trigger with `pull_request_target` (code injection risk)
|
|
95
|
+
|
|
96
|
+
**Phase 6: STRIDE Threat Modeling** (deep only)
|
|
97
|
+
|
|
98
|
+
For each critical module identified in Phase 1:
|
|
99
|
+
|
|
100
|
+
| Threat | Question |
|
|
101
|
+
|--------|----------|
|
|
102
|
+
| **S**poofing | Can identity be faked? Is auth per-request? |
|
|
103
|
+
| **T**ampering | Can data be modified in transit/storage? Integrity checks? |
|
|
104
|
+
| **R**epudiation | Are actions logged with user identity? |
|
|
105
|
+
| **I**nformation Disclosure | Can unauthorized data be accessed? |
|
|
106
|
+
| **D**enial of Service | Resource limits? Rate limiting? |
|
|
107
|
+
| **E**levation of Privilege | Can roles be escalated? Input validation on role fields? |
|
|
108
|
+
|
|
109
|
+
**Phase 7: Git History Archaeology** (deep only)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Search for previously committed secrets
|
|
113
|
+
git log --all --diff-filter=D --name-only --pretty=format: -- "*.env" "*.key" "*.pem" 2>/dev/null | head -20
|
|
114
|
+
git log -p --all -S "password" --since="1 year ago" -- "*.ts" "*.js" 2>/dev/null | head -50
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Phase 8: Report**
|
|
118
|
+
|
|
119
|
+
Output severity matrix:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
=== Security Audit ({tier}) ===
|
|
123
|
+
|
|
124
|
+
CRITICAL ({count}):
|
|
125
|
+
- [A03] SQL injection in {file}:{line} — {description}
|
|
126
|
+
Fix: {remediation}
|
|
127
|
+
|
|
128
|
+
HIGH ({count}):
|
|
129
|
+
...
|
|
130
|
+
|
|
131
|
+
MEDIUM ({count}):
|
|
132
|
+
...
|
|
133
|
+
|
|
134
|
+
LOW ({count}):
|
|
135
|
+
...
|
|
136
|
+
|
|
137
|
+
Summary: {total} findings ({critical} critical, {high} high, {medium} medium, {low} low)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Emit completion status:
|
|
141
|
+
```
|
|
142
|
+
--- COMPLETION STATUS ---
|
|
143
|
+
STATUS: DONE|DONE_WITH_CONCERNS
|
|
144
|
+
CONCERNS: {count} critical findings require immediate action
|
|
145
|
+
NEXT: /quality-review
|
|
146
|
+
--- END STATUS ---
|
|
147
|
+
```
|
|
148
|
+
</execution>
|
|
149
|
+
|
|
150
|
+
<success_criteria>
|
|
151
|
+
- [ ] Tech stack identified and entry points mapped
|
|
152
|
+
- [ ] OWASP Top 10 categories all checked (tier-appropriate)
|
|
153
|
+
- [ ] Dependency audit completed with CVE listing
|
|
154
|
+
- [ ] Severity matrix produced with file:line references
|
|
155
|
+
- [ ] Each finding includes remediation suggestion
|
|
156
|
+
- [ ] Completion status block emitted
|
|
157
|
+
</success_criteria>
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-iter-tune
|
|
3
|
+
description: Iterative skill tuning via execute-evaluate-improve feedback loop. Uses ccw cli Claude to execute skill, Gemini to evaluate quality, and Agent to apply improvements. Iterates until quality threshold or max iterations. Triggers on "skill iter tune", "iterative skill tuning", "tune skill".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Iter Tune
|
|
7
|
+
|
|
8
|
+
Iterative skill refinement through execute-evaluate-improve feedback loops. Each iteration runs the skill via Claude, evaluates output via Gemini, and applies improvements via Agent.
|
|
9
|
+
|
|
10
|
+
## Architecture Overview
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
┌──────────────────────────────────────────────────────────────────────────┐
|
|
14
|
+
│ Skill Iter Tune Orchestrator (SKILL.md) │
|
|
15
|
+
│ → Parse input → Setup workspace → Iteration Loop → Final Report │
|
|
16
|
+
└────────────────────────────┬─────────────────────────────────────────────┘
|
|
17
|
+
│
|
|
18
|
+
┌───────────────────┼───────────────────────────────────┐
|
|
19
|
+
↓ ↓ ↓
|
|
20
|
+
┌──────────┐ ┌─────────────────────────────┐ ┌──────────┐
|
|
21
|
+
│ Phase 1 │ │ Iteration Loop (2→3→4) │ │ Phase 5 │
|
|
22
|
+
│ Setup │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ │ Report │
|
|
23
|
+
│ │─────→│ │ P2 │→ │ P3 │→ │ P4 │ │────→│ │
|
|
24
|
+
│ Backup + │ │ │Exec │ │Eval │ │Impr │ │ │ History │
|
|
25
|
+
│ Init │ │ └─────┘ └─────┘ └─────┘ │ │ Summary │
|
|
26
|
+
└──────────┘ │ ↑ │ │ └──────────┘
|
|
27
|
+
│ └───────────────┘ │
|
|
28
|
+
│ (if score < threshold │
|
|
29
|
+
│ AND iter < max) │
|
|
30
|
+
└─────────────────────────────┘
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Chain Mode Extension
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Chain Mode (execution_mode === "chain"):
|
|
37
|
+
|
|
38
|
+
Phase 2 runs per-skill in chain_order:
|
|
39
|
+
Skill A → ccw cli → artifacts/skill-A/
|
|
40
|
+
↓ (artifacts as input)
|
|
41
|
+
Skill B → ccw cli → artifacts/skill-B/
|
|
42
|
+
↓ (artifacts as input)
|
|
43
|
+
Skill C → ccw cli → artifacts/skill-C/
|
|
44
|
+
|
|
45
|
+
Phase 3 evaluates entire chain output + per-skill scores
|
|
46
|
+
Phase 4 improves weakest skill(s) in chain
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Key Design Principles
|
|
50
|
+
|
|
51
|
+
1. **Iteration Loop**: Phases 2-3-4 repeat until quality threshold, max iterations, or convergence
|
|
52
|
+
2. **Two-Tool Pipeline**: Claude (write/execute) + Gemini (analyze/evaluate) = complementary perspectives
|
|
53
|
+
3. **Pure Orchestrator**: SKILL.md coordinates only — execution detail lives in phase files
|
|
54
|
+
4. **Progressive Phase Loading**: Phase docs read only when that phase executes
|
|
55
|
+
5. **Skill Versioning**: Each iteration snapshots skill state before execution
|
|
56
|
+
6. **Convergence Detection**: Stop early if score stalls (no improvement in 2 consecutive iterations)
|
|
57
|
+
|
|
58
|
+
## Interactive Preference Collection
|
|
59
|
+
|
|
60
|
+
```javascript
|
|
61
|
+
// ★ Auto mode detection
|
|
62
|
+
const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS)
|
|
63
|
+
|
|
64
|
+
if (autoYes) {
|
|
65
|
+
workflowPreferences = {
|
|
66
|
+
autoYes: true,
|
|
67
|
+
maxIterations: 5,
|
|
68
|
+
qualityThreshold: 80,
|
|
69
|
+
executionMode: 'single'
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
const prefResponse = ask_question({
|
|
73
|
+
questions: [
|
|
74
|
+
{
|
|
75
|
+
question: "选择迭代调优配置:",
|
|
76
|
+
header: "Tune Config",
|
|
77
|
+
multiSelect: false,
|
|
78
|
+
options: [
|
|
79
|
+
{ label: "Quick (3 iter, 70)", description: "快速迭代,适合小幅改进" },
|
|
80
|
+
{ label: "Standard (5 iter, 80) (Recommended)", description: "平衡方案,适合多数场景" },
|
|
81
|
+
{ label: "Thorough (8 iter, 90)", description: "深度优化,适合生产级 skill" }
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const configMap = {
|
|
88
|
+
"Quick": { maxIterations: 3, qualityThreshold: 70 },
|
|
89
|
+
"Standard": { maxIterations: 5, qualityThreshold: 80 },
|
|
90
|
+
"Thorough": { maxIterations: 8, qualityThreshold: 90 }
|
|
91
|
+
}
|
|
92
|
+
const selected = Object.keys(configMap).find(k =>
|
|
93
|
+
prefResponse["Tune Config"].startsWith(k)
|
|
94
|
+
) || "Standard"
|
|
95
|
+
workflowPreferences = { autoYes: false, ...configMap[selected] }
|
|
96
|
+
|
|
97
|
+
// ★ Mode selection: chain vs single
|
|
98
|
+
const modeResponse = ask_question({
|
|
99
|
+
questions: [{
|
|
100
|
+
question: "选择调优模式:",
|
|
101
|
+
header: "Tune Mode",
|
|
102
|
+
multiSelect: false,
|
|
103
|
+
options: [
|
|
104
|
+
{ label: "Single Skill (Recommended)", description: "独立调优每个 skill,适合单一 skill 优化" },
|
|
105
|
+
{ label: "Skill Chain", description: "按链序执行,前一个 skill 的产出作为后一个的输入" }
|
|
106
|
+
]
|
|
107
|
+
}]
|
|
108
|
+
});
|
|
109
|
+
workflowPreferences.executionMode = modeResponse["Tune Mode"].startsWith("Skill Chain")
|
|
110
|
+
? "chain" : "single";
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Input Processing
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
$ARGUMENTS → Parse:
|
|
118
|
+
├─ Skill path(s): first arg, comma-separated for multiple
|
|
119
|
+
│ e.g., ".claude/skills/my-skill" or "my-skill" (auto-prefixed)
|
|
120
|
+
│ Chain mode: order preserved as chain_order
|
|
121
|
+
├─ Test scenario: --scenario "description" or remaining text
|
|
122
|
+
└─ Flags: --max-iterations=N, --threshold=N, -y/--yes
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Execution Flow
|
|
126
|
+
|
|
127
|
+
> **⚠️ COMPACT DIRECTIVE**: Context compression MUST check TodoWrite phase status.
|
|
128
|
+
> The phase currently marked `in_progress` is the active execution phase — preserve its FULL content.
|
|
129
|
+
> Only compress phases marked `completed` or `pending`.
|
|
130
|
+
|
|
131
|
+
### Phase 1: Setup (one-time)
|
|
132
|
+
|
|
133
|
+
Read and execute: `Ref: phases/01-setup.md`
|
|
134
|
+
|
|
135
|
+
- Parse skill paths, validate existence
|
|
136
|
+
- Create workspace at `.workflow/.scratchpad/skill-iter-tune-{ts}/`
|
|
137
|
+
- Backup original skill files
|
|
138
|
+
- Initialize iteration-state.json
|
|
139
|
+
|
|
140
|
+
Output: `workDir`, `targetSkills[]`, `testScenario`, initialized state
|
|
141
|
+
|
|
142
|
+
### Iteration Loop
|
|
143
|
+
|
|
144
|
+
```javascript
|
|
145
|
+
// Orchestrator iteration loop
|
|
146
|
+
while (true) {
|
|
147
|
+
// Increment iteration
|
|
148
|
+
state.current_iteration++;
|
|
149
|
+
state.iterations.push({
|
|
150
|
+
round: state.current_iteration,
|
|
151
|
+
status: 'pending',
|
|
152
|
+
execution: null,
|
|
153
|
+
evaluation: null,
|
|
154
|
+
improvement: null
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// Update TodoWrite
|
|
158
|
+
TaskUpdate(iterationTask, {
|
|
159
|
+
subject: `Iteration ${state.current_iteration}/${state.max_iterations}`,
|
|
160
|
+
status: 'in_progress',
|
|
161
|
+
activeForm: `Running iteration ${state.current_iteration}`
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// === Phase 2: Execute ===
|
|
165
|
+
// Read: phases/02-execute.md
|
|
166
|
+
// Single mode: one ccw cli call for all skills
|
|
167
|
+
// Chain mode: sequential ccw cli per skill in chain_order, passing artifacts
|
|
168
|
+
// Snapshot skill → construct prompt → ccw cli --tool claude --mode write
|
|
169
|
+
// Collect artifacts
|
|
170
|
+
|
|
171
|
+
// === Phase 3: Evaluate ===
|
|
172
|
+
// Read: phases/03-evaluate.md
|
|
173
|
+
// Construct eval prompt → ccw cli --tool gemini --mode analysis
|
|
174
|
+
// Parse score → write iteration-N-eval.md → check termination
|
|
175
|
+
|
|
176
|
+
// Check termination
|
|
177
|
+
if (shouldTerminate(state)) {
|
|
178
|
+
break; // → Phase 5
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// === Phase 4: Improve ===
|
|
182
|
+
// Read: phases/04-improve.md
|
|
183
|
+
// Agent applies suggestions → write iteration-N-changes.md
|
|
184
|
+
|
|
185
|
+
// Update TodoWrite with score
|
|
186
|
+
// Continue loop
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Phase 2: Execute Skill (per iteration)
|
|
191
|
+
|
|
192
|
+
Read and execute: `Ref: phases/02-execute.md`
|
|
193
|
+
|
|
194
|
+
- Snapshot skill → `iteration-{N}/skill-snapshot/`
|
|
195
|
+
- Build execution prompt from skill content + test scenario
|
|
196
|
+
- Execute: `ccw cli -p "..." --tool claude --mode write --cd "${iterDir}/artifacts"`
|
|
197
|
+
- Collect artifacts
|
|
198
|
+
|
|
199
|
+
### Phase 3: Evaluate Quality (per iteration)
|
|
200
|
+
|
|
201
|
+
Read and execute: `Ref: phases/03-evaluate.md`
|
|
202
|
+
|
|
203
|
+
- Build evaluation prompt with skill + artifacts + criteria + history
|
|
204
|
+
- Execute: `ccw cli -p "..." --tool gemini --mode analysis`
|
|
205
|
+
- Parse 5-dimension score (Clarity, Completeness, Correctness, Effectiveness, Efficiency)
|
|
206
|
+
- Write `iteration-{N}-eval.md`
|
|
207
|
+
- Check termination: score >= threshold | iter >= max | convergence | error limit
|
|
208
|
+
|
|
209
|
+
### Phase 4: Apply Improvements (per iteration, skipped on termination)
|
|
210
|
+
|
|
211
|
+
Read and execute: `Ref: phases/04-improve.md`
|
|
212
|
+
|
|
213
|
+
- Read evaluation suggestions
|
|
214
|
+
- Launch general-purpose Agent to apply changes
|
|
215
|
+
- Write `iteration-{N}-changes.md`
|
|
216
|
+
- Update state
|
|
217
|
+
|
|
218
|
+
### Phase 5: Final Report (one-time)
|
|
219
|
+
|
|
220
|
+
Read and execute: `Ref: phases/05-report.md`
|
|
221
|
+
|
|
222
|
+
- Generate comprehensive report with score progression table
|
|
223
|
+
- Write `final-report.md`
|
|
224
|
+
- Display summary to user
|
|
225
|
+
|
|
226
|
+
**Phase Reference Documents** (read on-demand when phase executes):
|
|
227
|
+
|
|
228
|
+
| Phase | Document | Purpose | Compact |
|
|
229
|
+
|-------|----------|---------|---------|
|
|
230
|
+
| 1 | [phases/01-setup.md](phases/01-setup.md) | Initialize workspace and state | TodoWrite 驱动 |
|
|
231
|
+
| 2 | [phases/02-execute.md](phases/02-execute.md) | Execute skill via ccw cli Claude | TodoWrite 驱动 + 🔄 sentinel |
|
|
232
|
+
| 3 | [phases/03-evaluate.md](phases/03-evaluate.md) | Evaluate via ccw cli Gemini | TodoWrite 驱动 + 🔄 sentinel |
|
|
233
|
+
| 4 | [phases/04-improve.md](phases/04-improve.md) | Apply improvements via Agent | TodoWrite 驱动 + 🔄 sentinel |
|
|
234
|
+
| 5 | [phases/05-report.md](phases/05-report.md) | Generate final report | TodoWrite 驱动 |
|
|
235
|
+
|
|
236
|
+
**Compact Rules**:
|
|
237
|
+
1. **TodoWrite `in_progress`** → 保留完整内容,禁止压缩
|
|
238
|
+
2. **TodoWrite `completed`** → 可压缩为摘要
|
|
239
|
+
3. **🔄 sentinel fallback** → 若 compact 后仅存 sentinel 而无完整 Step 协议,立即 `view_file()` 恢复
|
|
240
|
+
|
|
241
|
+
## Core Rules
|
|
242
|
+
|
|
243
|
+
1. **Start Immediately**: First action is preference collection → Phase 1 setup
|
|
244
|
+
2. **Progressive Loading**: Read phase doc ONLY when that phase is about to execute
|
|
245
|
+
3. **Snapshot Before Execute**: Always snapshot skill state before each iteration
|
|
246
|
+
4. **Background CLI**: ccw cli runs in background, wait for hook callback before proceeding
|
|
247
|
+
5. **Parse Every Output**: Extract structured JSON from CLI outputs for state updates
|
|
248
|
+
6. **DO NOT STOP**: Continuous iteration until termination condition met
|
|
249
|
+
7. **Single State Source**: `iteration-state.json` is the only source of truth
|
|
250
|
+
|
|
251
|
+
## Data Flow
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
User Input (skill paths + test scenario)
|
|
255
|
+
↓ (+ execution_mode + chain_order if chain mode)
|
|
256
|
+
↓
|
|
257
|
+
Phase 1: Setup
|
|
258
|
+
↓ workDir, targetSkills[], testScenario, iteration-state.json
|
|
259
|
+
↓
|
|
260
|
+
┌─→ Phase 2: Execute (ccw cli claude)
|
|
261
|
+
│ ↓ artifacts/ (skill execution output)
|
|
262
|
+
│ ↓
|
|
263
|
+
│ Phase 3: Evaluate (ccw cli gemini)
|
|
264
|
+
│ ↓ score, dimensions[], suggestions[], iteration-N-eval.md
|
|
265
|
+
│ ↓
|
|
266
|
+
│ [Terminate?]─── YES ──→ Phase 5: Report → final-report.md
|
|
267
|
+
│ ↓ NO
|
|
268
|
+
│ ↓
|
|
269
|
+
│ Phase 4: Improve (Agent)
|
|
270
|
+
│ ↓ modified skill files, iteration-N-changes.md
|
|
271
|
+
│ ↓
|
|
272
|
+
└───┘ next iteration
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## TodoWrite Pattern
|
|
276
|
+
|
|
277
|
+
```javascript
|
|
278
|
+
// Initial state
|
|
279
|
+
TaskCreate({ subject: "Phase 1: Setup workspace", activeForm: "Setting up workspace" })
|
|
280
|
+
TaskCreate({ subject: "Iteration Loop", activeForm: "Running iterations" })
|
|
281
|
+
TaskCreate({ subject: "Phase 5: Final Report", activeForm: "Generating report" })
|
|
282
|
+
|
|
283
|
+
// Chain mode: create per-skill tracking tasks
|
|
284
|
+
if (state.execution_mode === 'chain') {
|
|
285
|
+
for (const skillName of state.chain_order) {
|
|
286
|
+
TaskCreate({
|
|
287
|
+
subject: `Chain: ${skillName}`,
|
|
288
|
+
activeForm: `Tracking ${skillName}`,
|
|
289
|
+
description: `Skill chain member position ${state.chain_order.indexOf(skillName) + 1}`
|
|
290
|
+
})
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// During iteration N
|
|
295
|
+
// Single mode: one score per iteration (existing behavior)
|
|
296
|
+
// Chain mode: per-skill status updates
|
|
297
|
+
if (state.execution_mode === 'chain') {
|
|
298
|
+
// After each skill executes in Phase 2:
|
|
299
|
+
TaskUpdate(chainSkillTask, {
|
|
300
|
+
subject: `Chain: ${skillName} — Iter ${N} executed`,
|
|
301
|
+
activeForm: `${skillName} iteration ${N}`
|
|
302
|
+
})
|
|
303
|
+
// After Phase 3 evaluates:
|
|
304
|
+
TaskUpdate(chainSkillTask, {
|
|
305
|
+
subject: `Chain: ${skillName} — Score ${chainScores[skillName]}/100`,
|
|
306
|
+
activeForm: `${skillName} scored`
|
|
307
|
+
})
|
|
308
|
+
} else {
|
|
309
|
+
// Single mode (existing)
|
|
310
|
+
TaskCreate({
|
|
311
|
+
subject: `Iteration ${N}: Score ${score}/100`,
|
|
312
|
+
activeForm: `Iteration ${N} complete`,
|
|
313
|
+
description: `Strengths: ... | Weaknesses: ... | Suggestions: ${count}`
|
|
314
|
+
})
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// Completed — collapse
|
|
318
|
+
TaskUpdate(iterLoop, {
|
|
319
|
+
subject: `Iteration Loop (${totalIters} iters, final: ${finalScore})`,
|
|
320
|
+
status: 'completed'
|
|
321
|
+
})
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## Termination Logic
|
|
325
|
+
|
|
326
|
+
```javascript
|
|
327
|
+
function shouldTerminate(state) {
|
|
328
|
+
// 1. Quality threshold met
|
|
329
|
+
if (state.latest_score >= state.quality_threshold) {
|
|
330
|
+
return { terminate: true, reason: 'quality_threshold_met' };
|
|
331
|
+
}
|
|
332
|
+
// 2. Max iterations reached
|
|
333
|
+
if (state.current_iteration >= state.max_iterations) {
|
|
334
|
+
return { terminate: true, reason: 'max_iterations_reached' };
|
|
335
|
+
}
|
|
336
|
+
// 3. Convergence: ≤2 points improvement over last 2 iterations
|
|
337
|
+
if (state.score_trend.length >= 3) {
|
|
338
|
+
const last3 = state.score_trend.slice(-3);
|
|
339
|
+
if (last3[2] - last3[0] <= 2) {
|
|
340
|
+
state.converged = true;
|
|
341
|
+
return { terminate: true, reason: 'convergence_detected' };
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
// 4. Error limit
|
|
345
|
+
if (state.error_count >= state.max_errors) {
|
|
346
|
+
return { terminate: true, reason: 'error_limit_reached' };
|
|
347
|
+
}
|
|
348
|
+
return { terminate: false };
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## Error Handling
|
|
353
|
+
|
|
354
|
+
| Phase | Error | Recovery |
|
|
355
|
+
|-------|-------|----------|
|
|
356
|
+
| 2: Execute | CLI timeout/crash | Retry once with simplified prompt, then skip |
|
|
357
|
+
| 3: Evaluate | CLI fails | Retry once, then use score 50 with warning |
|
|
358
|
+
| 3: Evaluate | JSON parse fails | Extract score heuristically, save raw output |
|
|
359
|
+
| 4: Improve | Agent fails | Rollback from `iteration-{N}/skill-snapshot/` |
|
|
360
|
+
| Any | 3+ consecutive errors | Terminate with error report |
|
|
361
|
+
|
|
362
|
+
**Error Budget**: Each phase gets 1 retry. 3 consecutive failed iterations triggers termination.
|
|
363
|
+
|
|
364
|
+
## Coordinator Checklist
|
|
365
|
+
|
|
366
|
+
### Pre-Phase Actions
|
|
367
|
+
- [ ] Read iteration-state.json for current state
|
|
368
|
+
- [ ] Verify workspace directory exists
|
|
369
|
+
- [ ] Check error count hasn't exceeded limit
|
|
370
|
+
|
|
371
|
+
### Per-Iteration Actions
|
|
372
|
+
- [ ] Increment current_iteration in state
|
|
373
|
+
- [ ] Create iteration-{N} subdirectory
|
|
374
|
+
- [ ] Update TodoWrite with iteration status
|
|
375
|
+
- [ ] After Phase 3: check termination before Phase 4
|
|
376
|
+
- [ ] After Phase 4: write state, proceed to next iteration
|
|
377
|
+
|
|
378
|
+
### Post-Workflow Actions
|
|
379
|
+
- [ ] Execute Phase 5 (Report)
|
|
380
|
+
- [ ] Display final summary to user
|
|
381
|
+
- [ ] Update all TodoWrite tasks to completed
|