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,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
role: scanner
|
|
3
|
+
prefix: SCAN
|
|
4
|
+
inner_loop: false
|
|
5
|
+
message_types:
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Code Scanner
|
|
9
|
+
|
|
10
|
+
Toolchain + LLM semantic scan producing structured findings. Static analysis tools in parallel, then LLM for issues tools miss. Read-only -- never modifies source code. 4-dimension system: security (SEC), correctness (COR), performance (PRF), maintainability (MNT).
|
|
11
|
+
|
|
12
|
+
## Phase 2: Context & Toolchain Detection
|
|
13
|
+
|
|
14
|
+
| Input | Source | Required |
|
|
15
|
+
|-------|--------|----------|
|
|
16
|
+
| Task description | From task subject/description | Yes |
|
|
17
|
+
| Session path | Extracted from task description | Yes |
|
|
18
|
+
| .msg/meta.json | <session>/.msg/meta.json | No |
|
|
19
|
+
|
|
20
|
+
1. Extract session path, target, dimensions, quick flag from task description
|
|
21
|
+
2. Resolve target files (glob pattern or directory -> `**/*.{ts,tsx,js,jsx,py,go,java,rs}`)
|
|
22
|
+
3. If no source files found -> report empty, complete task cleanly
|
|
23
|
+
4. Detect toolchain availability:
|
|
24
|
+
|
|
25
|
+
| Tool | Detection | Dimension |
|
|
26
|
+
|------|-----------|-----------|
|
|
27
|
+
| tsc | `tsconfig.json` exists | COR |
|
|
28
|
+
| eslint | `.eslintrc*` or `eslint` in package.json | COR/MNT |
|
|
29
|
+
| semgrep | `.semgrep.yml` exists | SEC |
|
|
30
|
+
| ruff | `pyproject.toml` + ruff available | SEC/COR/MNT |
|
|
31
|
+
| mypy | mypy available + `pyproject.toml` | COR |
|
|
32
|
+
| npmAudit | `package-lock.json` exists | SEC |
|
|
33
|
+
|
|
34
|
+
5. Load wisdom files from `<session>/wisdom/` if they exist
|
|
35
|
+
|
|
36
|
+
## Phase 3: Scan Execution
|
|
37
|
+
|
|
38
|
+
**Quick mode**: Single CLI call with analysis mode, max 20 findings, skip toolchain.
|
|
39
|
+
|
|
40
|
+
**Standard mode** (sequential):
|
|
41
|
+
|
|
42
|
+
### 3A: Toolchain Scan
|
|
43
|
+
Run detected tools in parallel via Bash backgrounding. Each tool writes to `<session>/scan/tmp/<tool>.{json|txt}`. After `wait`, parse each output into normalized findings:
|
|
44
|
+
- tsc: `file(line,col): error TSxxxx: msg` -> dimension=correctness, source=tool:tsc
|
|
45
|
+
- eslint: JSON array -> severity 2=correctness/high, else=maintainability/medium
|
|
46
|
+
- semgrep: `{results[]}` -> dimension=security, severity from extra.severity
|
|
47
|
+
- ruff: `[{code,message,filename}]` -> S*=security, F*/B*=correctness, else=maintainability
|
|
48
|
+
- mypy: `file:line: error: msg [code]` -> dimension=correctness
|
|
49
|
+
- npm audit: `{vulnerabilities:{}}` -> dimension=security, category=dependency
|
|
50
|
+
|
|
51
|
+
Write `<session>/scan/toolchain-findings.json`.
|
|
52
|
+
|
|
53
|
+
### 3B: Semantic Scan (LLM via CLI)
|
|
54
|
+
Build prompt with target file patterns, toolchain dedup summary, and per-dimension focus areas:
|
|
55
|
+
- SEC: Business logic vulnerabilities, privilege escalation, sensitive data flow, auth bypass
|
|
56
|
+
- COR: Logic errors, unhandled exception paths, state management bugs, race conditions
|
|
57
|
+
- PRF: Algorithm complexity, N+1 queries, unnecessary sync, memory leaks, missing caching
|
|
58
|
+
- MNT: Architectural coupling, abstraction leaks, convention violations, dead code
|
|
59
|
+
|
|
60
|
+
Execute via `maestro delegate --role review --mode analysis --rule analysis-review-code-quality`. Parse JSON array response, validate required fields (dimension, title, location.file), enforce per-dimension limit (max 5 each), filter minimum severity (medium+). Write `<session>/scan/semantic-findings.json`.
|
|
61
|
+
|
|
62
|
+
### Tech Profile Scan
|
|
63
|
+
|
|
64
|
+
After scan execution, emit context-aware trigger signals (based on detected codebase characteristics):
|
|
65
|
+
|
|
66
|
+
1. Check security findings → signals (`injection_risk`, `eval_usage`, `sql_detected`, `auth_detected`)
|
|
67
|
+
2. Check quality findings → risk signals (`legacy_patterns`, `test_gap`, `perf_sensitive`)
|
|
68
|
+
3. Include `tech_profile` in Phase 5 state_update data
|
|
69
|
+
|
|
70
|
+
## Phase 4: Aggregate & Output
|
|
71
|
+
|
|
72
|
+
1. Merge toolchain + semantic findings, deduplicate (same file + line + dimension = duplicate)
|
|
73
|
+
2. Assign dimension-prefixed IDs: SEC-001, COR-001, PRF-001, MNT-001
|
|
74
|
+
3. Write `<session>/scan/scan-results.json` with schema: `{scan_date, target, dimensions, quick_mode, total_findings, by_severity, by_dimension, findings[]}`
|
|
75
|
+
4. Each finding: `{id, dimension, category, severity, title, description, location:{file,line}, source, suggested_fix, effort, confidence}`
|
|
76
|
+
5. Update `<session>/.msg/meta.json` with scan summary (findings_count, by_severity, by_dimension)
|
|
77
|
+
6. Contribute discoveries to `<session>/wisdom/` files
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Review Dimensions (4-Dimension System)
|
|
2
|
+
|
|
3
|
+
## Security (SEC)
|
|
4
|
+
|
|
5
|
+
Vulnerabilities, attack surfaces, and data protection issues.
|
|
6
|
+
|
|
7
|
+
**Categories**: injection, authentication, authorization, data-exposure, encryption, input-validation, access-control
|
|
8
|
+
|
|
9
|
+
**Tool Support**: Semgrep (`--config auto`), npm audit, tsc strict mode
|
|
10
|
+
**LLM Focus**: Business logic vulnerabilities, privilege escalation paths, sensitive data flows
|
|
11
|
+
|
|
12
|
+
**Severity Mapping**:
|
|
13
|
+
- Critical: RCE, SQL injection, auth bypass, data breach
|
|
14
|
+
- High: XSS, CSRF, insecure deserialization, weak crypto
|
|
15
|
+
- Medium: Missing input validation, overly permissive CORS
|
|
16
|
+
- Low: Informational headers, minor config issues
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Correctness (COR)
|
|
21
|
+
|
|
22
|
+
Bugs, logic errors, and type safety issues.
|
|
23
|
+
|
|
24
|
+
**Categories**: bug, error-handling, edge-case, type-safety, race-condition, null-reference
|
|
25
|
+
|
|
26
|
+
**Tool Support**: tsc `--noEmit`, ESLint error-level rules
|
|
27
|
+
**LLM Focus**: Logic errors, unhandled exception paths, state management bugs, race conditions
|
|
28
|
+
|
|
29
|
+
**Severity Mapping**:
|
|
30
|
+
- Critical: Data corruption, crash in production path
|
|
31
|
+
- High: Incorrect business logic, unhandled error in common path
|
|
32
|
+
- Medium: Edge case not handled, missing null check
|
|
33
|
+
- Low: Minor type inconsistency, unused variable
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Performance (PRF)
|
|
38
|
+
|
|
39
|
+
Inefficiencies, resource waste, and scalability issues.
|
|
40
|
+
|
|
41
|
+
**Categories**: n-plus-one, memory-leak, blocking-operation, complexity, resource-usage, caching
|
|
42
|
+
|
|
43
|
+
**Tool Support**: None (LLM-only dimension)
|
|
44
|
+
**LLM Focus**: Algorithm complexity, N+1 queries, unnecessary sync operations, memory leaks, missing caching
|
|
45
|
+
|
|
46
|
+
**Severity Mapping**:
|
|
47
|
+
- Critical: Memory leak in long-running process, O(n³) on user data
|
|
48
|
+
- High: N+1 query in hot path, blocking I/O in async context
|
|
49
|
+
- Medium: Suboptimal algorithm, missing obvious cache
|
|
50
|
+
- Low: Minor inefficiency, premature optimization opportunity
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Maintainability (MNT)
|
|
55
|
+
|
|
56
|
+
Code quality, readability, and structural health.
|
|
57
|
+
|
|
58
|
+
**Categories**: code-smell, naming, complexity, duplication, dead-code, pattern-violation, coupling
|
|
59
|
+
|
|
60
|
+
**Tool Support**: ESLint warning-level rules, complexity metrics
|
|
61
|
+
**LLM Focus**: Architectural coupling, abstraction leaks, project convention violations
|
|
62
|
+
|
|
63
|
+
**Severity Mapping**:
|
|
64
|
+
- High: God class, circular dependency, copy-paste across modules
|
|
65
|
+
- Medium: Long method, magic numbers, unclear naming
|
|
66
|
+
- Low: Minor style inconsistency, commented-out code
|
|
67
|
+
- Info: Pattern observation, refactoring suggestion
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Why 4 Dimensions (Not 7)
|
|
72
|
+
|
|
73
|
+
The original review-cycle used 7 dimensions with significant overlap:
|
|
74
|
+
|
|
75
|
+
| Original | Problem | Merged Into |
|
|
76
|
+
|----------|---------|-------------|
|
|
77
|
+
| Quality | Overlaps Maintainability + Best-Practices | **Maintainability** |
|
|
78
|
+
| Best-Practices | Overlaps Quality + Maintainability | **Maintainability** |
|
|
79
|
+
| Architecture | Overlaps Maintainability (coupling/layering) | **Maintainability** (structure) + **Security** (security architecture) |
|
|
80
|
+
| Action-Items | Not a dimension — it's a report format | Standard field on every finding |
|
|
81
|
+
|
|
82
|
+
4 dimensions = clear ownership, no overlap, each maps to distinct tooling.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Finding",
|
|
4
|
+
"description": "Standardized finding format for team-review pipeline",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "dimension", "category", "severity", "title", "description", "location", "source", "effort", "confidence"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^(SEC|COR|PRF|MNT)-\\d{3}$",
|
|
11
|
+
"description": "{DIM_PREFIX}-{SEQ}"
|
|
12
|
+
},
|
|
13
|
+
"dimension": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": ["security", "correctness", "performance", "maintainability"]
|
|
16
|
+
},
|
|
17
|
+
"category": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Sub-category within the dimension"
|
|
20
|
+
},
|
|
21
|
+
"severity": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": ["critical", "high", "medium", "low", "info"]
|
|
24
|
+
},
|
|
25
|
+
"title": { "type": "string" },
|
|
26
|
+
"description": { "type": "string" },
|
|
27
|
+
"location": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["file", "line"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"file": { "type": "string" },
|
|
32
|
+
"line": { "type": "integer" },
|
|
33
|
+
"end_line": { "type": "integer" },
|
|
34
|
+
"code_snippet": { "type": "string" }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"source": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "tool:eslint | tool:tsc | tool:semgrep | llm | tool+llm"
|
|
40
|
+
},
|
|
41
|
+
"tool_rule": { "type": ["string", "null"] },
|
|
42
|
+
"suggested_fix": { "type": "string" },
|
|
43
|
+
"references": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "type": "string" }
|
|
46
|
+
},
|
|
47
|
+
"effort": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
48
|
+
"confidence": { "type": "string", "enum": ["high", "medium", "low"] },
|
|
49
|
+
"root_cause": {
|
|
50
|
+
"type": ["object", "null"],
|
|
51
|
+
"description": "Populated by reviewer role",
|
|
52
|
+
"properties": {
|
|
53
|
+
"description": { "type": "string" },
|
|
54
|
+
"related_findings": { "type": "array", "items": { "type": "string" } },
|
|
55
|
+
"is_symptom": { "type": "boolean" }
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"impact": {
|
|
59
|
+
"type": ["object", "null"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"scope": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
62
|
+
"affected_files": { "type": "array", "items": { "type": "string" } },
|
|
63
|
+
"blast_radius": { "type": "string" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"optimization": {
|
|
67
|
+
"type": ["object", "null"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"approach": { "type": "string" },
|
|
70
|
+
"alternative": { "type": "string" },
|
|
71
|
+
"tradeoff": { "type": "string" }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"fix_strategy": { "type": ["string", "null"], "enum": ["minimal", "refactor", "skip", null] },
|
|
75
|
+
"fix_complexity": { "type": ["string", "null"], "enum": ["low", "medium", "high", null] },
|
|
76
|
+
"fix_dependencies": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": { "type": "string" },
|
|
79
|
+
"default": []
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Review Pipelines
|
|
2
|
+
|
|
3
|
+
Pipeline definitions and task registry for team-review.
|
|
4
|
+
|
|
5
|
+
## Pipeline Modes
|
|
6
|
+
|
|
7
|
+
| Mode | Description | Tasks |
|
|
8
|
+
|------|-------------|-------|
|
|
9
|
+
| default | Scan + review | SCAN -> REV |
|
|
10
|
+
| full | Scan + review + fix | SCAN -> REV -> [confirm] -> FIX |
|
|
11
|
+
| fix-only | Fix from existing manifest | FIX |
|
|
12
|
+
| quick | Quick scan only | SCAN (quick=true) |
|
|
13
|
+
|
|
14
|
+
## Pipeline Definitions
|
|
15
|
+
|
|
16
|
+
### default Mode (2 tasks, linear)
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
SCAN-001 -> REV-001
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
| Task ID | Role | Dependencies | Description |
|
|
23
|
+
|---------|------|-------------|-------------|
|
|
24
|
+
| SCAN-001 | scanner | (none) | Multi-dimension code scan (toolchain + LLM) |
|
|
25
|
+
| REV-001 | reviewer | SCAN-001 | Deep finding analysis and review report |
|
|
26
|
+
|
|
27
|
+
### full Mode (3 tasks, linear with user checkpoint)
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
SCAN-001 -> REV-001 -> [user confirm] -> FIX-001
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
| Task ID | Role | Dependencies | Description |
|
|
34
|
+
|---------|------|-------------|-------------|
|
|
35
|
+
| SCAN-001 | scanner | (none) | Multi-dimension code scan (toolchain + LLM) |
|
|
36
|
+
| REV-001 | reviewer | SCAN-001 | Deep finding analysis and review report |
|
|
37
|
+
| FIX-001 | fixer | REV-001 + user confirm | Plan + execute + verify fixes |
|
|
38
|
+
|
|
39
|
+
### fix-only Mode (1 task)
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
FIX-001
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
| Task ID | Role | Dependencies | Description |
|
|
46
|
+
|---------|------|-------------|-------------|
|
|
47
|
+
| FIX-001 | fixer | (none) | Execute fixes from existing manifest |
|
|
48
|
+
|
|
49
|
+
### quick Mode (1 task)
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
SCAN-001 (quick=true)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
| Task ID | Role | Dependencies | Description |
|
|
56
|
+
|---------|------|-------------|-------------|
|
|
57
|
+
| SCAN-001 | scanner | (none) | Quick scan, max 20 findings, skip toolchain |
|
|
58
|
+
|
|
59
|
+
## Review Dimensions (4-Dimension System)
|
|
60
|
+
|
|
61
|
+
| Dimension | Code | Focus |
|
|
62
|
+
|-----------|------|-------|
|
|
63
|
+
| Security | SEC | Vulnerabilities, auth, data exposure |
|
|
64
|
+
| Correctness | COR | Bugs, logic errors, type safety |
|
|
65
|
+
| Performance | PRF | N+1, memory leaks, blocking ops |
|
|
66
|
+
| Maintainability | MNT | Coupling, complexity, dead code |
|
|
67
|
+
|
|
68
|
+
## Fix Scope Options
|
|
69
|
+
|
|
70
|
+
| Scope | Description |
|
|
71
|
+
|-------|-------------|
|
|
72
|
+
| all | Fix all findings |
|
|
73
|
+
| critical,high | Fix critical and high severity only |
|
|
74
|
+
| skip | Skip fix phase |
|
|
75
|
+
|
|
76
|
+
## Session Directory
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
.workflow/.team/RV-<slug>-<YYYY-MM-DD>/
|
|
80
|
+
├── .msg/messages.jsonl # Message bus log
|
|
81
|
+
├── .msg/meta.json # Session state + cross-role state
|
|
82
|
+
├── wisdom/ # Cross-task knowledge
|
|
83
|
+
│ ├── learnings.md
|
|
84
|
+
│ ├── decisions.md
|
|
85
|
+
│ ├── conventions.md
|
|
86
|
+
│ └── issues.md
|
|
87
|
+
├── scan/ # Scanner output
|
|
88
|
+
│ ├── toolchain-findings.json
|
|
89
|
+
│ ├── semantic-findings.json
|
|
90
|
+
│ └── scan-results.json
|
|
91
|
+
├── review/ # Reviewer output
|
|
92
|
+
│ ├── enriched-findings.json
|
|
93
|
+
│ ├── review-report.json
|
|
94
|
+
│ └── review-report.md
|
|
95
|
+
└── fix/ # Fixer output
|
|
96
|
+
├── fix-manifest.json
|
|
97
|
+
├── fix-plan.json
|
|
98
|
+
├── execution-results.json
|
|
99
|
+
├── verify-results.json
|
|
100
|
+
├── fix-summary.json
|
|
101
|
+
└── fix-summary.md
|
|
102
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-review",
|
|
3
|
+
"description": "Code scanning, vulnerability review, optimization suggestions, and automated fix",
|
|
4
|
+
"sessionDir": ".workflow/.team-review/",
|
|
5
|
+
"msgDir": ".workflow/.team-msg/team-review/",
|
|
6
|
+
"roles": {
|
|
7
|
+
"coordinator": { "prefix": "RC", "type": "orchestration", "file": "roles/coordinator/role.md" },
|
|
8
|
+
"scanner": { "prefix": "SCAN", "type": "read-only-analysis", "file": "roles/scanner/role.md" },
|
|
9
|
+
"reviewer": { "prefix": "REV", "type": "read-only-analysis", "file": "roles/reviewer/role.md" },
|
|
10
|
+
"fixer": { "prefix": "FIX", "type": "code-generation", "file": "roles/fixer/role.md" }
|
|
11
|
+
},
|
|
12
|
+
"collaboration_pattern": "CP-1",
|
|
13
|
+
"pipeline": ["scanner", "reviewer", "fixer"],
|
|
14
|
+
"dimensions": {
|
|
15
|
+
"security": { "prefix": "SEC", "tools": ["semgrep", "npm-audit"] },
|
|
16
|
+
"correctness": { "prefix": "COR", "tools": ["tsc", "eslint-error"] },
|
|
17
|
+
"performance": { "prefix": "PRF", "tools": [] },
|
|
18
|
+
"maintainability": { "prefix": "MNT", "tools": ["eslint-warning"] }
|
|
19
|
+
},
|
|
20
|
+
"severity_levels": ["critical", "high", "medium", "low", "info"],
|
|
21
|
+
"defaults": {
|
|
22
|
+
"max_deep_analysis": 15,
|
|
23
|
+
"max_quick_findings": 20,
|
|
24
|
+
"max_parallel_fixers": 3,
|
|
25
|
+
"quick_fix_threshold": 5
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: team-tech-debt
|
|
3
|
+
description: Unified team skill for tech debt identification and remediation. Scans codebase for tech debt, assesses severity, plans and executes fixes with validation. Uses team-worker agent architecture with roles/ for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team tech debt".
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- ask_question
|
|
6
|
+
- define_subagent
|
|
7
|
+
- grep_search
|
|
8
|
+
- invoke_subagent
|
|
9
|
+
- manage_subagents
|
|
10
|
+
- mcp__ace-tool__search_context
|
|
11
|
+
- mcp__ccw-tools__edit_file
|
|
12
|
+
- mcp__ccw-tools__read_file
|
|
13
|
+
- mcp__ccw-tools__write_file
|
|
14
|
+
- replace_file_content
|
|
15
|
+
- run_command
|
|
16
|
+
- send_message
|
|
17
|
+
- view_file
|
|
18
|
+
- write_to_file
|
|
19
|
+
agy-subagents:
|
|
20
|
+
- team-worker
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Sub-Agent Registration (Antigravity)
|
|
24
|
+
|
|
25
|
+
Before any `invoke_subagent` call below, register each sub-agent type once per session by reading the system_prompt from `<agy-agents-dir>/<name>.md` and passing it to `define_subagent`. The `<agy-agents-dir>` is:
|
|
26
|
+
- global install: `~/.gemini/antigravity-cli/agents/`
|
|
27
|
+
- workspace install: `<project>/.agents/agents/`
|
|
28
|
+
|
|
29
|
+
- `define_subagent(name="team-worker", description="<from agents/team-worker.md frontmatter>", system_prompt=<contents of agents/team-worker.md body>, enable_write_tools=true, enable_mcp_tools=true, enable_subagent_tools=false)`
|
|
30
|
+
|
|
31
|
+
**ConversationId tracking**: `invoke_subagent` returns a ConversationId per spawned instance. Subsequent `send_message(Recipient=<ConversationId>, Message=...)` calls require that ConversationId — never use the role name as the recipient.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Team Tech Debt
|
|
36
|
+
|
|
37
|
+
Systematic tech debt governance: scan -> assess -> plan -> fix -> validate. Built on **team-worker agent architecture** — all worker roles share a single agent definition with role-specific Phase 2-4 loaded from `roles/<role>/role.md`.
|
|
38
|
+
|
|
39
|
+
## Architecture
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
view_file(AbsolutePath="<agy-skills-dir>/team-tech-debt/SKILL.md") + execute inline (args: "task description")
|
|
43
|
+
|
|
|
44
|
+
SKILL.md (this file) = Router
|
|
45
|
+
|
|
|
46
|
+
+--------------+--------------+
|
|
47
|
+
| |
|
|
48
|
+
no --role flag --role <name>
|
|
49
|
+
| |
|
|
50
|
+
Coordinator Worker
|
|
51
|
+
roles/coordinator/role.md roles/<name>/role.md
|
|
52
|
+
|
|
|
53
|
+
+-- analyze → dispatch → spawn workers → STOP
|
|
54
|
+
|
|
|
55
|
+
+-------+-------+-------+-------+
|
|
56
|
+
v v v v v
|
|
57
|
+
[team-worker agents, each loads roles/<role>/role.md]
|
|
58
|
+
scanner assessor planner executor validator
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Role Registry
|
|
62
|
+
|
|
63
|
+
| Role | Path | Prefix | Inner Loop |
|
|
64
|
+
|------|------|--------|------------|
|
|
65
|
+
| coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
|
|
66
|
+
| scanner | [roles/scanner/role.md](roles/scanner/role.md) | TDSCAN-* | false |
|
|
67
|
+
| assessor | [roles/assessor/role.md](roles/assessor/role.md) | TDEVAL-* | false |
|
|
68
|
+
| planner | [roles/planner/role.md](roles/planner/role.md) | TDPLAN-* | false |
|
|
69
|
+
| executor | [roles/executor/role.md](roles/executor/role.md) | TDFIX-* | true |
|
|
70
|
+
| validator | [roles/validator/role.md](roles/validator/role.md) | TDVAL-* | false |
|
|
71
|
+
|
|
72
|
+
## Role Router
|
|
73
|
+
|
|
74
|
+
Parse `$ARGUMENTS`:
|
|
75
|
+
- Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
|
|
76
|
+
- No `--role` → `@roles/coordinator/role.md`, execute entry router
|
|
77
|
+
|
|
78
|
+
## Shared Constants
|
|
79
|
+
|
|
80
|
+
- **Session prefix**: `TD`
|
|
81
|
+
- **Session path**: `.workflow/.team/TD-<slug>-<date>/`
|
|
82
|
+
- **CLI tools**: `maestro delegate --mode analysis` (read-only), `maestro delegate --mode write` (modifications)
|
|
83
|
+
- **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
|
|
84
|
+
- **Max GC rounds**: 3
|
|
85
|
+
|
|
86
|
+
## Worker Spawn Template
|
|
87
|
+
|
|
88
|
+
Coordinator spawns workers using this template:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
invoke_subagent([{ TypeName: "team-worker", Role: "<role>", Prompt: "<Prompt>", Workspace: "inherit" }])
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## User Commands
|
|
95
|
+
|
|
96
|
+
| Command | Action |
|
|
97
|
+
|---------|--------|
|
|
98
|
+
| `check` / `status` | View execution status graph |
|
|
99
|
+
| `resume` / `continue` | Advance to next step |
|
|
100
|
+
| `--mode=scan` | Run scan-only pipeline (TDSCAN + TDEVAL) |
|
|
101
|
+
| `--mode=targeted` | Run targeted pipeline (TDPLAN + TDFIX + TDVAL) |
|
|
102
|
+
| `--mode=remediate` | Run full pipeline (default) |
|
|
103
|
+
| `-y` / `--yes` | Skip confirmations |
|
|
104
|
+
|
|
105
|
+
## Specs Reference
|
|
106
|
+
|
|
107
|
+
- [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
|
|
108
|
+
|
|
109
|
+
## Session Directory
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
.workflow/.team/TD-<slug>-<date>/
|
|
113
|
+
├── .msg/
|
|
114
|
+
│ ├── messages.jsonl # Team message bus
|
|
115
|
+
│ └── meta.json # Pipeline config + role state snapshot
|
|
116
|
+
├── scan/ # Scanner output
|
|
117
|
+
├── assessment/ # Assessor output
|
|
118
|
+
├── plan/ # Planner output
|
|
119
|
+
├── fixes/ # Executor output
|
|
120
|
+
├── validation/ # Validator output
|
|
121
|
+
└── wisdom/ # Cross-task knowledge
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Error Handling
|
|
125
|
+
|
|
126
|
+
| Scenario | Resolution |
|
|
127
|
+
|----------|------------|
|
|
128
|
+
| Unknown command | Error with available command list |
|
|
129
|
+
| Role not found | Error with role registry |
|
|
130
|
+
| Session corruption | Attempt recovery, fallback to manual |
|
|
131
|
+
| Fast-advance conflict | Coordinator reconciles on next callback |
|
|
132
|
+
| Completion action fails | Default to Keep Active |
|
|
133
|
+
| Scanner finds no debt | Report clean codebase, skip to summary |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
role: assessor
|
|
3
|
+
prefix: TDEVAL
|
|
4
|
+
inner_loop: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Tech Debt Assessor
|
|
8
|
+
|
|
9
|
+
Quantitative evaluator for tech debt items. Score each debt item on business impact (1-5) and fix cost (1-5), classify into priority quadrants, produce priority-matrix.json.
|
|
10
|
+
|
|
11
|
+
## Phase 2: Load Debt Inventory
|
|
12
|
+
|
|
13
|
+
| Input | Source | Required |
|
|
14
|
+
|-------|--------|----------|
|
|
15
|
+
| Session path | task description (regex: `session:\s*(.+)`) | Yes |
|
|
16
|
+
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
|
17
|
+
| Debt inventory | meta.json:debt_inventory OR <session>/scan/debt-inventory.json | Yes |
|
|
18
|
+
|
|
19
|
+
1. Extract session path from task description
|
|
20
|
+
2. Read .msg/meta.json for team context
|
|
21
|
+
3. Load debt_inventory from shared memory or fallback to debt-inventory.json file
|
|
22
|
+
4. If debt_inventory is empty -> report empty assessment and exit
|
|
23
|
+
|
|
24
|
+
## Phase 3: Evaluate Each Item
|
|
25
|
+
|
|
26
|
+
**Strategy selection**:
|
|
27
|
+
|
|
28
|
+
| Item Count | Strategy |
|
|
29
|
+
|------------|----------|
|
|
30
|
+
| <= 10 | Heuristic: severity-based impact + effort-based cost |
|
|
31
|
+
| 11-50 | CLI batch: single gemini analysis call |
|
|
32
|
+
| > 50 | CLI chunked: batches of 25 items |
|
|
33
|
+
|
|
34
|
+
**Impact Score Mapping** (heuristic):
|
|
35
|
+
|
|
36
|
+
| Severity | Impact Score |
|
|
37
|
+
|----------|-------------|
|
|
38
|
+
| critical | 5 |
|
|
39
|
+
| high | 4 |
|
|
40
|
+
| medium | 3 |
|
|
41
|
+
| low | 1 |
|
|
42
|
+
|
|
43
|
+
**Cost Score Mapping** (heuristic):
|
|
44
|
+
|
|
45
|
+
| Estimated Effort | Cost Score |
|
|
46
|
+
|------------------|------------|
|
|
47
|
+
| small | 1 |
|
|
48
|
+
| medium | 3 |
|
|
49
|
+
| large | 5 |
|
|
50
|
+
| unknown | 3 |
|
|
51
|
+
|
|
52
|
+
**Priority Quadrant Classification**:
|
|
53
|
+
|
|
54
|
+
| Impact | Cost | Quadrant |
|
|
55
|
+
|--------|------|----------|
|
|
56
|
+
| >= 4 | <= 2 | quick-win |
|
|
57
|
+
| >= 4 | >= 3 | strategic |
|
|
58
|
+
| <= 3 | <= 2 | backlog |
|
|
59
|
+
| <= 3 | >= 3 | defer |
|
|
60
|
+
|
|
61
|
+
For CLI mode, prompt gemini with full debt summary requesting JSON array of `{id, impact_score, cost_score, risk_if_unfixed, priority_quadrant}`. Unevaluated items fall back to heuristic scoring.
|
|
62
|
+
|
|
63
|
+
### Tech Profile Scan
|
|
64
|
+
|
|
65
|
+
After assessment, emit context-aware trigger signals (based on detected codebase characteristics):
|
|
66
|
+
|
|
67
|
+
1. Check debt items → signals (`legacy_patterns`, `perf_sensitive`, `test_gap`)
|
|
68
|
+
2. Check code patterns → risk signals (`sql_detected`, `auth_detected`, `scaling_concern`)
|
|
69
|
+
3. Include `tech_profile` in Phase 5 state_update data
|
|
70
|
+
|
|
71
|
+
## Phase 4: Generate Priority Matrix
|
|
72
|
+
|
|
73
|
+
1. Build matrix structure: evaluation_date, total_items, by_quadrant (grouped), summary (counts per quadrant)
|
|
74
|
+
2. Sort within each quadrant by impact_score descending
|
|
75
|
+
3. Write `<session>/assessment/priority-matrix.json`
|
|
76
|
+
4. Update .msg/meta.json with `priority_matrix` summary and evaluated `debt_inventory`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Analyze Task
|
|
2
|
+
|
|
3
|
+
Parse user task -> detect tech debt signals -> assess complexity -> determine pipeline mode and roles.
|
|
4
|
+
|
|
5
|
+
**CONSTRAINT**: Text-level analysis only. NO source code reading, NO codebase exploration.
|
|
6
|
+
|
|
7
|
+
## Signal Detection
|
|
8
|
+
|
|
9
|
+
| Keywords | Signal | Mode Hint |
|
|
10
|
+
|----------|--------|-----------|
|
|
11
|
+
| 扫描, scan, 审计, audit | debt-scan | scan |
|
|
12
|
+
| 评估, assess, quantify | debt-assess | scan |
|
|
13
|
+
| 规划, plan, roadmap | debt-plan | targeted |
|
|
14
|
+
| 修复, fix, remediate, clean | debt-fix | remediate |
|
|
15
|
+
| 验证, validate, verify | debt-validate | remediate |
|
|
16
|
+
| 定向, targeted, specific | debt-targeted | targeted |
|
|
17
|
+
|
|
18
|
+
## Complexity Scoring
|
|
19
|
+
|
|
20
|
+
| Factor | Points |
|
|
21
|
+
|--------|--------|
|
|
22
|
+
| Full codebase scope | +2 |
|
|
23
|
+
| Multiple debt dimensions | +1 per dimension (max 3) |
|
|
24
|
+
| Large codebase (implied) | +1 |
|
|
25
|
+
| Targeted specific items | -1 |
|
|
26
|
+
|
|
27
|
+
Results: 1-3 Low (scan mode), 4-6 Medium (remediate), 7+ High (remediate + full pipeline)
|
|
28
|
+
|
|
29
|
+
## Pipeline Mode Determination
|
|
30
|
+
|
|
31
|
+
| Score + Signals | Mode |
|
|
32
|
+
|----------------|------|
|
|
33
|
+
| scan/audit keywords | scan |
|
|
34
|
+
| targeted/specific keywords | targeted |
|
|
35
|
+
| Default | remediate |
|
|
36
|
+
|
|
37
|
+
## Output
|
|
38
|
+
|
|
39
|
+
Write scope context to coordinator memory:
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"pipeline_mode": "<scan|remediate|targeted>",
|
|
43
|
+
"scope": "<detected-scope>",
|
|
44
|
+
"focus_dimensions": ["code", "architecture", "testing", "dependency", "documentation"],
|
|
45
|
+
"complexity": { "score": 0, "level": "Low|Medium|High" }
|
|
46
|
+
}
|
|
47
|
+
```
|