maestro-flow 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CLAUDE.md +2 -2
- package/.claude/agents/cli-explore-agent.md +1 -1
- package/.claude/agents/team-worker.md +237 -237
- package/.claude/commands/maestro-coordinate.md +65 -65
- package/.claude/commands/maestro-link-coordinate.md +71 -71
- package/.claude/commands/manage-issue-execute.md +73 -73
- package/.claude/commands/quality-business-test.md +110 -0
- package/.claude/skills/team-coordinate/SKILL.md +266 -266
- package/.claude/skills/team-lifecycle-v4/SKILL.md +209 -209
- package/.claude/skills/team-lifecycle-v4/roles/analyst/role.md +94 -94
- package/.claude/skills/team-lifecycle-v4/roles/executor/commands/implement.md +62 -62
- package/.claude/skills/team-lifecycle-v4/roles/planner/role.md +85 -85
- package/.claude/skills/team-lifecycle-v4/roles/writer/role.md +95 -95
- package/.claude/skills/team-quality-assurance/SKILL.md +147 -147
- package/.claude/skills/team-quality-assurance/roles/scout/role.md +75 -75
- package/.claude/skills/team-review/SKILL.md +147 -147
- package/.claude/skills/team-review/roles/reviewer/role.md +68 -68
- package/.claude/skills/team-review/roles/scanner/role.md +79 -79
- package/.claude/skills/team-tech-debt/SKILL.md +128 -128
- package/.claude/skills/team-tech-debt/roles/executor/role.md +76 -76
- package/.claude/skills/team-tech-debt/roles/scanner/role.md +90 -90
- package/.claude/skills/team-tech-debt/roles/validator/role.md +78 -78
- package/.claude/skills/team-testing/SKILL.md +143 -143
- package/.claude/skills/team-testing/roles/executor/role.md +99 -99
- package/.claude/skills/team-testing/roles/generator/role.md +98 -98
- package/.codex/skills/maestro-coordinate/SKILL.md +1 -1
- package/.codex/skills/manage-issue-analyze/SKILL.md +3 -3
- package/.codex/skills/manage-issue-execute/SKILL.md +4 -4
- package/.codex/skills/manage-issue-plan/SKILL.md +2 -2
- package/.codex/skills/quality-business-test/SKILL.md +223 -0
- package/.codex/skills/team-coordinate/SKILL.md +7 -7
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -2
- package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +2 -2
- package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
- package/.codex/skills/team-quality-assurance/SKILL.md +2 -2
- package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +2 -2
- package/.codex/skills/team-review/SKILL.md +2 -2
- package/.codex/skills/team-review/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
- package/.codex/skills/team-review/roles/scanner/role.md +1 -1
- package/.codex/skills/team-tech-debt/SKILL.md +2 -2
- package/.codex/skills/team-tech-debt/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/executor/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/validator/role.md +1 -1
- package/.codex/skills/team-testing/SKILL.md +2 -2
- package/.codex/skills/team-testing/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-testing/roles/executor/role.md +1 -1
- package/.codex/skills/team-testing/roles/generator/role.md +1 -1
- package/README.md +31 -2
- package/README.zh-CN.md +23 -1
- package/chains/_intent-map.json +6 -0
- package/chains/_router.json +14 -0
- package/chains/full-lifecycle.json +15 -0
- package/chains/quality-loop.json +16 -1
- package/chains/singles/business-test.json +26 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +16 -2
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +25 -9
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +3 -0
- package/dashboard/dist-server/src/agents/cli-agent-runner.js +78 -61
- package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-history-store.d.ts +14 -1
- package/dashboard/dist-server/src/agents/cli-history-store.js +24 -2
- package/dashboard/dist-server/src/agents/cli-history-store.js.map +1 -1
- package/dashboard/dist-server/src/commands/delegate.js +142 -6
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts +3 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +78 -61
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/agents/cli-history-store.d.ts +14 -1
- package/dist/src/agents/cli-history-store.d.ts.map +1 -1
- package/dist/src/agents/cli-history-store.js +24 -2
- package/dist/src/agents/cli-history-store.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +142 -6
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +15 -0
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +29 -2
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +15 -0
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +67 -0
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install-ui/BackupConfig.d.ts +6 -4
- package/dist/src/commands/install-ui/BackupConfig.d.ts.map +1 -1
- package/dist/src/commands/install-ui/BackupConfig.js +39 -12
- package/dist/src/commands/install-ui/BackupConfig.js.map +1 -1
- package/dist/src/commands/install-ui/ConfigPanel.d.ts.map +1 -1
- package/dist/src/commands/install-ui/ConfigPanel.js +1 -1
- package/dist/src/commands/install-ui/ConfigPanel.js.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.d.ts +3 -0
- package/dist/src/commands/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallConfirm.js +5 -1
- package/dist/src/commands/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts +2 -0
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +30 -5
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts +1 -1
- package/dist/src/commands/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallFlow.js +31 -6
- package/dist/src/commands/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/commands/install-ui/InstallHub.d.ts +5 -0
- package/dist/src/commands/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallHub.js +24 -0
- package/dist/src/commands/install-ui/InstallHub.js.map +1 -1
- package/dist/src/commands/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallResult.js +1 -1
- package/dist/src/commands/install-ui/InstallResult.js.map +1 -1
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts +9 -0
- package/dist/src/commands/install-ui/StatuslineConfig.d.ts.map +1 -0
- package/dist/src/commands/install-ui/StatuslineConfig.js +13 -0
- package/dist/src/commands/install-ui/StatuslineConfig.js.map +1 -0
- package/dist/src/commands/install-ui/index.d.ts +1 -1
- package/dist/src/commands/install-ui/index.d.ts.map +1 -1
- package/dist/src/commands/install-ui/types.d.ts +6 -0
- package/dist/src/commands/install-ui/types.d.ts.map +1 -1
- package/dist/src/commands/install-ui/types.js +3 -0
- package/dist/src/commands/install-ui/types.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +6 -1
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/overlay.d.ts.map +1 -1
- package/dist/src/commands/overlay.js +45 -1
- package/dist/src/commands/overlay.js.map +1 -1
- package/dist/src/commands/team.d.ts +10 -0
- package/dist/src/commands/team.d.ts.map +1 -1
- package/dist/src/commands/team.js +436 -42
- package/dist/src/commands/team.js.map +1 -1
- package/dist/src/core/manifest.d.ts.map +1 -1
- package/dist/src/core/manifest.js +58 -0
- package/dist/src/core/manifest.js.map +1 -1
- package/dist/src/core/overlay/applier.d.ts +4 -0
- package/dist/src/core/overlay/applier.d.ts.map +1 -1
- package/dist/src/core/overlay/applier.js.map +1 -1
- package/dist/src/hooks/delegate-monitor.js +1 -1
- package/dist/src/hooks/delegate-monitor.js.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +17 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.d.ts +2 -1
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +19 -2
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/team-monitor.d.ts.map +1 -1
- package/dist/src/hooks/team-monitor.js +17 -0
- package/dist/src/hooks/team-monitor.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +25 -1
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +25 -1
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +22 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/mcp/delegate-channel-relay.d.ts.map +1 -1
- package/dist/src/mcp/delegate-channel-relay.js +9 -9
- package/dist/src/mcp/delegate-channel-relay.js.map +1 -1
- package/dist/src/tools/index.d.ts.map +1 -1
- package/dist/src/tools/index.js +11 -2
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/namespace-guard.d.ts +37 -0
- package/dist/src/tools/namespace-guard.d.ts.map +1 -0
- package/dist/src/tools/namespace-guard.js +126 -0
- package/dist/src/tools/namespace-guard.js.map +1 -0
- package/dist/src/tools/spec-loader.d.ts +17 -1
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +71 -13
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/team-members.d.ts +16 -0
- package/dist/src/tools/team-members.d.ts.map +1 -1
- package/dist/src/tools/team-members.js +31 -0
- package/dist/src/tools/team-members.js.map +1 -1
- package/package.json +2 -2
- package/templates/business-test-report.json +68 -0
- package/workflows/delegate-usage.md +330 -0
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: team-review
|
|
3
|
-
description: "Unified team skill for code review. 3-role pipeline: scanner, reviewer, fixer. Triggers on team-review."
|
|
4
|
-
allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*), mcp__ccw-tools__team_msg(*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Team Review
|
|
8
|
-
|
|
9
|
-
Orchestrate multi-agent code review: scanner -> reviewer -> fixer. Toolchain + LLM scan, deep analysis with root cause enrichment, and automated fix with rollback-on-failure.
|
|
10
|
-
|
|
11
|
-
## Architecture
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
Skill(skill="team-review", args="task description")
|
|
15
|
-
|
|
|
16
|
-
SKILL.md (this file) = Router
|
|
17
|
-
|
|
|
18
|
-
+--------------+--------------+
|
|
19
|
-
| |
|
|
20
|
-
no --role flag --role <name>
|
|
21
|
-
| |
|
|
22
|
-
Coordinator Worker
|
|
23
|
-
roles/coordinator/role.md roles/<name>/role.md
|
|
24
|
-
|
|
|
25
|
-
+-- analyze -> dispatch -> spawn workers -> STOP
|
|
26
|
-
|
|
|
27
|
-
+-------+-------+-------+
|
|
28
|
-
v v v
|
|
29
|
-
[scan] [review] [fix]
|
|
30
|
-
team-worker agents, each loads roles/<role>/role.md
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Role Registry
|
|
34
|
-
|
|
35
|
-
| Role | Path | Prefix | Inner Loop |
|
|
36
|
-
|------|------|--------|------------|
|
|
37
|
-
| coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
|
|
38
|
-
| scanner | [roles/scanner/role.md](roles/scanner/role.md) | SCAN-* | false |
|
|
39
|
-
| reviewer | [roles/reviewer/role.md](roles/reviewer/role.md) | REV-* | false |
|
|
40
|
-
| fixer | [roles/fixer/role.md](roles/fixer/role.md) | FIX-* | true |
|
|
41
|
-
|
|
42
|
-
## Role Router
|
|
43
|
-
|
|
44
|
-
Parse `$ARGUMENTS`:
|
|
45
|
-
- Has `--role <name>` -> Read `roles/<name>/role.md`, execute Phase 2-4
|
|
46
|
-
- No `--role` -> `@roles/coordinator/role.md`, execute entry router
|
|
47
|
-
|
|
48
|
-
## Shared Constants
|
|
49
|
-
|
|
50
|
-
- **Session prefix**: `RV`
|
|
51
|
-
- **Session path**: `.workflow/.team/RV-<slug>-<date>/`
|
|
52
|
-
- **Team name**: `review`
|
|
53
|
-
- **CLI tools**: `maestro
|
|
54
|
-
- **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
|
|
55
|
-
|
|
56
|
-
## Worker Spawn Template
|
|
57
|
-
|
|
58
|
-
Coordinator spawns workers using this template:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
Agent({
|
|
62
|
-
subagent_type: "team-worker",
|
|
63
|
-
description: "Spawn <role> worker",
|
|
64
|
-
team_name: "review",
|
|
65
|
-
name: "<role>",
|
|
66
|
-
run_in_background: true,
|
|
67
|
-
prompt: `## Role Assignment
|
|
68
|
-
role: <role>
|
|
69
|
-
role_spec: <skill_root>/roles/<role>/role.md
|
|
70
|
-
session: <session-folder>
|
|
71
|
-
session_id: <session-id>
|
|
72
|
-
team_name: review
|
|
73
|
-
requirement: <task-description>
|
|
74
|
-
inner_loop: <true|false>
|
|
75
|
-
|
|
76
|
-
## Progress Milestones
|
|
77
|
-
session_id: <session-id>
|
|
78
|
-
Report progress via team_msg at natural phase boundaries (context loaded -> core work done -> verification).
|
|
79
|
-
Report blockers immediately via team_msg type="blocker".
|
|
80
|
-
Report completion via team_msg type="task_complete" after final SendMessage.
|
|
81
|
-
|
|
82
|
-
Read role_spec file (@<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
|
|
83
|
-
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
|
84
|
-
})
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## User Commands
|
|
88
|
-
|
|
89
|
-
| Command | Action |
|
|
90
|
-
|---------|--------|
|
|
91
|
-
| `check` / `status` | View pipeline status graph |
|
|
92
|
-
| `resume` / `continue` | Advance to next step |
|
|
93
|
-
| `--full` | Enable scan + review + fix pipeline |
|
|
94
|
-
| `--fix` | Fix-only mode (skip scan/review) |
|
|
95
|
-
| `-q` / `--quick` | Quick scan only |
|
|
96
|
-
| `--dimensions=sec,cor,prf,mnt` | Custom dimensions |
|
|
97
|
-
| `-y` / `--yes` | Skip confirmations |
|
|
98
|
-
|
|
99
|
-
## Completion Action
|
|
100
|
-
|
|
101
|
-
When pipeline completes, coordinator presents:
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
AskUserQuestion({
|
|
105
|
-
questions: [{
|
|
106
|
-
question: "Review pipeline complete. What would you like to do?",
|
|
107
|
-
header: "Completion",
|
|
108
|
-
multiSelect: false,
|
|
109
|
-
options: [
|
|
110
|
-
{ label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" },
|
|
111
|
-
{ label: "Keep Active", description: "Keep session for follow-up work" },
|
|
112
|
-
{ label: "Export Results", description: "Export deliverables to target directory" }
|
|
113
|
-
]
|
|
114
|
-
}]
|
|
115
|
-
})
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## Session Directory
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
.workflow/.team/RV-<slug>-<date>/
|
|
122
|
-
├── .msg/messages.jsonl # Team message bus
|
|
123
|
-
├── .msg/meta.json # Session state + cross-role state
|
|
124
|
-
├── wisdom/ # Cross-task knowledge
|
|
125
|
-
├── scan/ # Scanner output
|
|
126
|
-
├── review/ # Reviewer output
|
|
127
|
-
└── fix/ # Fixer output
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Specs Reference
|
|
131
|
-
|
|
132
|
-
- [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
|
|
133
|
-
- [specs/dimensions.md](specs/dimensions.md) — Review dimension definitions (SEC/COR/PRF/MNT)
|
|
134
|
-
- [specs/finding-schema.json](specs/finding-schema.json) — Finding data schema
|
|
135
|
-
- [specs/team-config.json](specs/team-config.json) — Team configuration
|
|
136
|
-
|
|
137
|
-
## Error Handling
|
|
138
|
-
|
|
139
|
-
| Scenario | Resolution |
|
|
140
|
-
|----------|------------|
|
|
141
|
-
| Unknown --role value | Error with available role list |
|
|
142
|
-
| Role not found | Error with expected path (roles/<name>/role.md) |
|
|
143
|
-
| CLI tool fails | Worker fallback to direct implementation |
|
|
144
|
-
| Scanner finds 0 findings | Report clean, skip review + fix |
|
|
145
|
-
| User declines fix | Delete FIX tasks, complete with review-only results |
|
|
146
|
-
| Fast-advance conflict | Coordinator reconciles on next callback |
|
|
147
|
-
| Completion action fails | Default to Keep Active |
|
|
1
|
+
---
|
|
2
|
+
name: team-review
|
|
3
|
+
description: "Unified team skill for code review. 3-role pipeline: scanner, reviewer, fixer. Triggers on team-review."
|
|
4
|
+
allowed-tools: TeamCreate(*), TeamDelete(*), SendMessage(*), TaskCreate(*), TaskUpdate(*), TaskList(*), TaskGet(*), Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*), mcp__ccw-tools__team_msg(*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Team Review
|
|
8
|
+
|
|
9
|
+
Orchestrate multi-agent code review: scanner -> reviewer -> fixer. Toolchain + LLM scan, deep analysis with root cause enrichment, and automated fix with rollback-on-failure.
|
|
10
|
+
|
|
11
|
+
## Architecture
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Skill(skill="team-review", args="task description")
|
|
15
|
+
|
|
|
16
|
+
SKILL.md (this file) = Router
|
|
17
|
+
|
|
|
18
|
+
+--------------+--------------+
|
|
19
|
+
| |
|
|
20
|
+
no --role flag --role <name>
|
|
21
|
+
| |
|
|
22
|
+
Coordinator Worker
|
|
23
|
+
roles/coordinator/role.md roles/<name>/role.md
|
|
24
|
+
|
|
|
25
|
+
+-- analyze -> dispatch -> spawn workers -> STOP
|
|
26
|
+
|
|
|
27
|
+
+-------+-------+-------+
|
|
28
|
+
v v v
|
|
29
|
+
[scan] [review] [fix]
|
|
30
|
+
team-worker agents, each loads roles/<role>/role.md
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Role Registry
|
|
34
|
+
|
|
35
|
+
| Role | Path | Prefix | Inner Loop |
|
|
36
|
+
|------|------|--------|------------|
|
|
37
|
+
| coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
|
|
38
|
+
| scanner | [roles/scanner/role.md](roles/scanner/role.md) | SCAN-* | false |
|
|
39
|
+
| reviewer | [roles/reviewer/role.md](roles/reviewer/role.md) | REV-* | false |
|
|
40
|
+
| fixer | [roles/fixer/role.md](roles/fixer/role.md) | FIX-* | true |
|
|
41
|
+
|
|
42
|
+
## Role Router
|
|
43
|
+
|
|
44
|
+
Parse `$ARGUMENTS`:
|
|
45
|
+
- Has `--role <name>` -> Read `roles/<name>/role.md`, execute Phase 2-4
|
|
46
|
+
- No `--role` -> `@roles/coordinator/role.md`, execute entry router
|
|
47
|
+
|
|
48
|
+
## Shared Constants
|
|
49
|
+
|
|
50
|
+
- **Session prefix**: `RV`
|
|
51
|
+
- **Session path**: `.workflow/.team/RV-<slug>-<date>/`
|
|
52
|
+
- **Team name**: `review`
|
|
53
|
+
- **CLI tools**: `maestro delegate --mode analysis` (read-only), `maestro delegate --mode write` (modifications)
|
|
54
|
+
- **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
|
|
55
|
+
|
|
56
|
+
## Worker Spawn Template
|
|
57
|
+
|
|
58
|
+
Coordinator spawns workers using this template:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Agent({
|
|
62
|
+
subagent_type: "team-worker",
|
|
63
|
+
description: "Spawn <role> worker",
|
|
64
|
+
team_name: "review",
|
|
65
|
+
name: "<role>",
|
|
66
|
+
run_in_background: true,
|
|
67
|
+
prompt: `## Role Assignment
|
|
68
|
+
role: <role>
|
|
69
|
+
role_spec: <skill_root>/roles/<role>/role.md
|
|
70
|
+
session: <session-folder>
|
|
71
|
+
session_id: <session-id>
|
|
72
|
+
team_name: review
|
|
73
|
+
requirement: <task-description>
|
|
74
|
+
inner_loop: <true|false>
|
|
75
|
+
|
|
76
|
+
## Progress Milestones
|
|
77
|
+
session_id: <session-id>
|
|
78
|
+
Report progress via team_msg at natural phase boundaries (context loaded -> core work done -> verification).
|
|
79
|
+
Report blockers immediately via team_msg type="blocker".
|
|
80
|
+
Report completion via team_msg type="task_complete" after final SendMessage.
|
|
81
|
+
|
|
82
|
+
Read role_spec file (@<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
|
|
83
|
+
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
|
84
|
+
})
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## User Commands
|
|
88
|
+
|
|
89
|
+
| Command | Action |
|
|
90
|
+
|---------|--------|
|
|
91
|
+
| `check` / `status` | View pipeline status graph |
|
|
92
|
+
| `resume` / `continue` | Advance to next step |
|
|
93
|
+
| `--full` | Enable scan + review + fix pipeline |
|
|
94
|
+
| `--fix` | Fix-only mode (skip scan/review) |
|
|
95
|
+
| `-q` / `--quick` | Quick scan only |
|
|
96
|
+
| `--dimensions=sec,cor,prf,mnt` | Custom dimensions |
|
|
97
|
+
| `-y` / `--yes` | Skip confirmations |
|
|
98
|
+
|
|
99
|
+
## Completion Action
|
|
100
|
+
|
|
101
|
+
When pipeline completes, coordinator presents:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
AskUserQuestion({
|
|
105
|
+
questions: [{
|
|
106
|
+
question: "Review pipeline complete. What would you like to do?",
|
|
107
|
+
header: "Completion",
|
|
108
|
+
multiSelect: false,
|
|
109
|
+
options: [
|
|
110
|
+
{ label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" },
|
|
111
|
+
{ label: "Keep Active", description: "Keep session for follow-up work" },
|
|
112
|
+
{ label: "Export Results", description: "Export deliverables to target directory" }
|
|
113
|
+
]
|
|
114
|
+
}]
|
|
115
|
+
})
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Session Directory
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
.workflow/.team/RV-<slug>-<date>/
|
|
122
|
+
├── .msg/messages.jsonl # Team message bus
|
|
123
|
+
├── .msg/meta.json # Session state + cross-role state
|
|
124
|
+
├── wisdom/ # Cross-task knowledge
|
|
125
|
+
├── scan/ # Scanner output
|
|
126
|
+
├── review/ # Reviewer output
|
|
127
|
+
└── fix/ # Fixer output
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Specs Reference
|
|
131
|
+
|
|
132
|
+
- [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
|
|
133
|
+
- [specs/dimensions.md](specs/dimensions.md) — Review dimension definitions (SEC/COR/PRF/MNT)
|
|
134
|
+
- [specs/finding-schema.json](specs/finding-schema.json) — Finding data schema
|
|
135
|
+
- [specs/team-config.json](specs/team-config.json) — Team configuration
|
|
136
|
+
|
|
137
|
+
## Error Handling
|
|
138
|
+
|
|
139
|
+
| Scenario | Resolution |
|
|
140
|
+
|----------|------------|
|
|
141
|
+
| Unknown --role value | Error with available role list |
|
|
142
|
+
| Role not found | Error with expected path (roles/<name>/role.md) |
|
|
143
|
+
| CLI tool fails | Worker fallback to direct implementation |
|
|
144
|
+
| Scanner finds 0 findings | Report clean, skip review + fix |
|
|
145
|
+
| User declines fix | Delete FIX tasks, complete with review-only results |
|
|
146
|
+
| Fast-advance conflict | Coordinator reconciles on next callback |
|
|
147
|
+
| Completion action fails | Default to Keep Active |
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: reviewer
|
|
3
|
-
prefix: REV
|
|
4
|
-
inner_loop: false
|
|
5
|
-
message_types:
|
|
6
|
-
success: review_complete
|
|
7
|
-
error: error
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Finding Reviewer
|
|
11
|
-
|
|
12
|
-
Deep analysis on scan findings: triage, root cause / impact / optimization enrichment via CLI fan-out, cross-correlation, and structured review report generation. Read-only -- never modifies source code.
|
|
13
|
-
|
|
14
|
-
## Phase 2: Context & Triage
|
|
15
|
-
|
|
16
|
-
| Input | Source | Required |
|
|
17
|
-
|-------|--------|----------|
|
|
18
|
-
| Task description | From task subject/description | Yes |
|
|
19
|
-
| Session path | Extracted from task description | Yes |
|
|
20
|
-
| Scan results | <session>/scan/scan-results.json | Yes |
|
|
21
|
-
| .msg/meta.json | <session>/.msg/meta.json | No |
|
|
22
|
-
|
|
23
|
-
1. Extract session path, input path, dimensions from task description
|
|
24
|
-
2. Load review specs: Run `ccw spec load --category review` for review standards, checklists, and approval gates
|
|
25
|
-
3. Load scan results. If missing or empty -> report clean, complete immediately
|
|
26
|
-
3. Load wisdom files from `<session>/wisdom/`
|
|
27
|
-
4. Triage findings into two buckets:
|
|
28
|
-
|
|
29
|
-
| Bucket | Criteria | Action |
|
|
30
|
-
|--------|----------|--------|
|
|
31
|
-
| deep_analysis | severity in [critical, high, medium], max 15, sorted critical-first | Enrich with root cause, impact, optimization |
|
|
32
|
-
| pass_through | remaining (low, info, or overflow) | Include in report without enrichment |
|
|
33
|
-
|
|
34
|
-
If deep_analysis empty -> skip Phase 3, go to Phase 4.
|
|
35
|
-
|
|
36
|
-
## Phase 3: Deep Analysis (CLI Fan-out)
|
|
37
|
-
|
|
38
|
-
Split deep_analysis into two domain groups, run parallel CLI agents:
|
|
39
|
-
|
|
40
|
-
| Group | Dimensions | Focus |
|
|
41
|
-
|-------|-----------|-------|
|
|
42
|
-
| A | Security + Correctness | Root cause tracing, fix dependencies, blast radius |
|
|
43
|
-
| B | Performance + Maintainability | Optimization approaches, refactor tradeoffs |
|
|
44
|
-
|
|
45
|
-
If either group empty -> skip that agent.
|
|
46
|
-
|
|
47
|
-
Build prompt per group requesting 6 enrichment fields per finding:
|
|
48
|
-
- `root_cause`: `{description, related_findings[], is_symptom}`
|
|
49
|
-
- `impact`: `{scope: low/medium/high, affected_files[], blast_radius}`
|
|
50
|
-
- `optimization`: `{approach, alternative, tradeoff}`
|
|
51
|
-
- `fix_strategy`: minimal / refactor / skip
|
|
52
|
-
- `fix_complexity`: low / medium / high
|
|
53
|
-
- `fix_dependencies`: finding IDs that must be fixed first
|
|
54
|
-
|
|
55
|
-
Execute via `maestro
|
|
56
|
-
|
|
57
|
-
## Phase 4: Report Generation
|
|
58
|
-
|
|
59
|
-
1. Combine enriched + pass_through findings
|
|
60
|
-
2. Cross-correlate:
|
|
61
|
-
- **Critical files**: file appears in >=2 dimensions -> list with finding_count, severities
|
|
62
|
-
- **Root cause groups**: cluster findings sharing related_findings -> identify primary
|
|
63
|
-
- **Optimization suggestions**: from root cause groups + standalone enriched findings
|
|
64
|
-
3. Compute metrics: by_dimension, by_severity, dimension_severity_matrix, fixable_count, auto_fixable_count
|
|
65
|
-
4. Write `<session>/review/review-report.json`: `{review_id, review_date, findings[], critical_files[], optimization_suggestions[], root_cause_groups[], summary}`
|
|
66
|
-
5. Write `<session>/review/review-report.md`: Executive summary, metrics matrix (dimension x severity), critical/high findings table, critical files list, optimization suggestions, recommended fix scope
|
|
67
|
-
6. Update `<session>/.msg/meta.json` with review summary
|
|
68
|
-
7. Contribute discoveries to `<session>/wisdom/` files
|
|
1
|
+
---
|
|
2
|
+
role: reviewer
|
|
3
|
+
prefix: REV
|
|
4
|
+
inner_loop: false
|
|
5
|
+
message_types:
|
|
6
|
+
success: review_complete
|
|
7
|
+
error: error
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Finding Reviewer
|
|
11
|
+
|
|
12
|
+
Deep analysis on scan findings: triage, root cause / impact / optimization enrichment via CLI fan-out, cross-correlation, and structured review report generation. Read-only -- never modifies source code.
|
|
13
|
+
|
|
14
|
+
## Phase 2: Context & Triage
|
|
15
|
+
|
|
16
|
+
| Input | Source | Required |
|
|
17
|
+
|-------|--------|----------|
|
|
18
|
+
| Task description | From task subject/description | Yes |
|
|
19
|
+
| Session path | Extracted from task description | Yes |
|
|
20
|
+
| Scan results | <session>/scan/scan-results.json | Yes |
|
|
21
|
+
| .msg/meta.json | <session>/.msg/meta.json | No |
|
|
22
|
+
|
|
23
|
+
1. Extract session path, input path, dimensions from task description
|
|
24
|
+
2. Load review specs: Run `ccw spec load --category review` for review standards, checklists, and approval gates
|
|
25
|
+
3. Load scan results. If missing or empty -> report clean, complete immediately
|
|
26
|
+
3. Load wisdom files from `<session>/wisdom/`
|
|
27
|
+
4. Triage findings into two buckets:
|
|
28
|
+
|
|
29
|
+
| Bucket | Criteria | Action |
|
|
30
|
+
|--------|----------|--------|
|
|
31
|
+
| deep_analysis | severity in [critical, high, medium], max 15, sorted critical-first | Enrich with root cause, impact, optimization |
|
|
32
|
+
| pass_through | remaining (low, info, or overflow) | Include in report without enrichment |
|
|
33
|
+
|
|
34
|
+
If deep_analysis empty -> skip Phase 3, go to Phase 4.
|
|
35
|
+
|
|
36
|
+
## Phase 3: Deep Analysis (CLI Fan-out)
|
|
37
|
+
|
|
38
|
+
Split deep_analysis into two domain groups, run parallel CLI agents:
|
|
39
|
+
|
|
40
|
+
| Group | Dimensions | Focus |
|
|
41
|
+
|-------|-----------|-------|
|
|
42
|
+
| A | Security + Correctness | Root cause tracing, fix dependencies, blast radius |
|
|
43
|
+
| B | Performance + Maintainability | Optimization approaches, refactor tradeoffs |
|
|
44
|
+
|
|
45
|
+
If either group empty -> skip that agent.
|
|
46
|
+
|
|
47
|
+
Build prompt per group requesting 6 enrichment fields per finding:
|
|
48
|
+
- `root_cause`: `{description, related_findings[], is_symptom}`
|
|
49
|
+
- `impact`: `{scope: low/medium/high, affected_files[], blast_radius}`
|
|
50
|
+
- `optimization`: `{approach, alternative, tradeoff}`
|
|
51
|
+
- `fix_strategy`: minimal / refactor / skip
|
|
52
|
+
- `fix_complexity`: low / medium / high
|
|
53
|
+
- `fix_dependencies`: finding IDs that must be fixed first
|
|
54
|
+
|
|
55
|
+
Execute via `maestro delegate --to gemini --mode analysis --rule analysis-diagnose-bug-root-cause` (fallback: qwen -> codex). Parse JSON array responses, merge with originals (CLI-enriched replace originals, unenriched get defaults). Write `<session>/review/enriched-findings.json`.
|
|
56
|
+
|
|
57
|
+
## Phase 4: Report Generation
|
|
58
|
+
|
|
59
|
+
1. Combine enriched + pass_through findings
|
|
60
|
+
2. Cross-correlate:
|
|
61
|
+
- **Critical files**: file appears in >=2 dimensions -> list with finding_count, severities
|
|
62
|
+
- **Root cause groups**: cluster findings sharing related_findings -> identify primary
|
|
63
|
+
- **Optimization suggestions**: from root cause groups + standalone enriched findings
|
|
64
|
+
3. Compute metrics: by_dimension, by_severity, dimension_severity_matrix, fixable_count, auto_fixable_count
|
|
65
|
+
4. Write `<session>/review/review-report.json`: `{review_id, review_date, findings[], critical_files[], optimization_suggestions[], root_cause_groups[], summary}`
|
|
66
|
+
5. Write `<session>/review/review-report.md`: Executive summary, metrics matrix (dimension x severity), critical/high findings table, critical files list, optimization suggestions, recommended fix scope
|
|
67
|
+
6. Update `<session>/.msg/meta.json` with review summary
|
|
68
|
+
7. Contribute discoveries to `<session>/wisdom/` files
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: scanner
|
|
3
|
-
prefix: SCAN
|
|
4
|
-
inner_loop: false
|
|
5
|
-
message_types:
|
|
6
|
-
success: scan_complete
|
|
7
|
-
error: error
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Code Scanner
|
|
11
|
-
|
|
12
|
-
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).
|
|
13
|
-
|
|
14
|
-
## Phase 2: Context & Toolchain Detection
|
|
15
|
-
|
|
16
|
-
| Input | Source | Required |
|
|
17
|
-
|-------|--------|----------|
|
|
18
|
-
| Task description | From task subject/description | Yes |
|
|
19
|
-
| Session path | Extracted from task description | Yes |
|
|
20
|
-
| .msg/meta.json | <session>/.msg/meta.json | No |
|
|
21
|
-
|
|
22
|
-
1. Extract session path, target, dimensions, quick flag from task description
|
|
23
|
-
2. Resolve target files (glob pattern or directory -> `**/*.{ts,tsx,js,jsx,py,go,java,rs}`)
|
|
24
|
-
3. If no source files found -> report empty, complete task cleanly
|
|
25
|
-
4. Detect toolchain availability:
|
|
26
|
-
|
|
27
|
-
| Tool | Detection | Dimension |
|
|
28
|
-
|------|-----------|-----------|
|
|
29
|
-
| tsc | `tsconfig.json` exists | COR |
|
|
30
|
-
| eslint | `.eslintrc*` or `eslint` in package.json | COR/MNT |
|
|
31
|
-
| semgrep | `.semgrep.yml` exists | SEC |
|
|
32
|
-
| ruff | `pyproject.toml` + ruff available | SEC/COR/MNT |
|
|
33
|
-
| mypy | mypy available + `pyproject.toml` | COR |
|
|
34
|
-
| npmAudit | `package-lock.json` exists | SEC |
|
|
35
|
-
|
|
36
|
-
5. Load wisdom files from `<session>/wisdom/` if they exist
|
|
37
|
-
|
|
38
|
-
## Phase 3: Scan Execution
|
|
39
|
-
|
|
40
|
-
**Quick mode**: Single CLI call with analysis mode, max 20 findings, skip toolchain.
|
|
41
|
-
|
|
42
|
-
**Standard mode** (sequential):
|
|
43
|
-
|
|
44
|
-
### 3A: Toolchain Scan
|
|
45
|
-
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:
|
|
46
|
-
- tsc: `file(line,col): error TSxxxx: msg` -> dimension=correctness, source=tool:tsc
|
|
47
|
-
- eslint: JSON array -> severity 2=correctness/high, else=maintainability/medium
|
|
48
|
-
- semgrep: `{results[]}` -> dimension=security, severity from extra.severity
|
|
49
|
-
- ruff: `[{code,message,filename}]` -> S*=security, F*/B*=correctness, else=maintainability
|
|
50
|
-
- mypy: `file:line: error: msg [code]` -> dimension=correctness
|
|
51
|
-
- npm audit: `{vulnerabilities:{}}` -> dimension=security, category=dependency
|
|
52
|
-
|
|
53
|
-
Write `<session>/scan/toolchain-findings.json`.
|
|
54
|
-
|
|
55
|
-
### 3B: Semantic Scan (LLM via CLI)
|
|
56
|
-
Build prompt with target file patterns, toolchain dedup summary, and per-dimension focus areas:
|
|
57
|
-
- SEC: Business logic vulnerabilities, privilege escalation, sensitive data flow, auth bypass
|
|
58
|
-
- COR: Logic errors, unhandled exception paths, state management bugs, race conditions
|
|
59
|
-
- PRF: Algorithm complexity, N+1 queries, unnecessary sync, memory leaks, missing caching
|
|
60
|
-
- MNT: Architectural coupling, abstraction leaks, convention violations, dead code
|
|
61
|
-
|
|
62
|
-
Execute via `maestro
|
|
63
|
-
|
|
64
|
-
### Tech Profile Scan
|
|
65
|
-
|
|
66
|
-
After scan execution, emit context-aware trigger signals (based on detected codebase characteristics):
|
|
67
|
-
|
|
68
|
-
1. Check security findings → signals (`injection_risk`, `eval_usage`, `sql_detected`, `auth_detected`)
|
|
69
|
-
2. Check quality findings → risk signals (`legacy_patterns`, `test_gap`, `perf_sensitive`)
|
|
70
|
-
3. Include `tech_profile` in Phase 5 state_update data
|
|
71
|
-
|
|
72
|
-
## Phase 4: Aggregate & Output
|
|
73
|
-
|
|
74
|
-
1. Merge toolchain + semantic findings, deduplicate (same file + line + dimension = duplicate)
|
|
75
|
-
2. Assign dimension-prefixed IDs: SEC-001, COR-001, PRF-001, MNT-001
|
|
76
|
-
3. Write `<session>/scan/scan-results.json` with schema: `{scan_date, target, dimensions, quick_mode, total_findings, by_severity, by_dimension, findings[]}`
|
|
77
|
-
4. Each finding: `{id, dimension, category, severity, title, description, location:{file,line}, source, suggested_fix, effort, confidence}`
|
|
78
|
-
5. Update `<session>/.msg/meta.json` with scan summary (findings_count, by_severity, by_dimension)
|
|
79
|
-
6. Contribute discoveries to `<session>/wisdom/` files
|
|
1
|
+
---
|
|
2
|
+
role: scanner
|
|
3
|
+
prefix: SCAN
|
|
4
|
+
inner_loop: false
|
|
5
|
+
message_types:
|
|
6
|
+
success: scan_complete
|
|
7
|
+
error: error
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Code Scanner
|
|
11
|
+
|
|
12
|
+
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).
|
|
13
|
+
|
|
14
|
+
## Phase 2: Context & Toolchain Detection
|
|
15
|
+
|
|
16
|
+
| Input | Source | Required |
|
|
17
|
+
|-------|--------|----------|
|
|
18
|
+
| Task description | From task subject/description | Yes |
|
|
19
|
+
| Session path | Extracted from task description | Yes |
|
|
20
|
+
| .msg/meta.json | <session>/.msg/meta.json | No |
|
|
21
|
+
|
|
22
|
+
1. Extract session path, target, dimensions, quick flag from task description
|
|
23
|
+
2. Resolve target files (glob pattern or directory -> `**/*.{ts,tsx,js,jsx,py,go,java,rs}`)
|
|
24
|
+
3. If no source files found -> report empty, complete task cleanly
|
|
25
|
+
4. Detect toolchain availability:
|
|
26
|
+
|
|
27
|
+
| Tool | Detection | Dimension |
|
|
28
|
+
|------|-----------|-----------|
|
|
29
|
+
| tsc | `tsconfig.json` exists | COR |
|
|
30
|
+
| eslint | `.eslintrc*` or `eslint` in package.json | COR/MNT |
|
|
31
|
+
| semgrep | `.semgrep.yml` exists | SEC |
|
|
32
|
+
| ruff | `pyproject.toml` + ruff available | SEC/COR/MNT |
|
|
33
|
+
| mypy | mypy available + `pyproject.toml` | COR |
|
|
34
|
+
| npmAudit | `package-lock.json` exists | SEC |
|
|
35
|
+
|
|
36
|
+
5. Load wisdom files from `<session>/wisdom/` if they exist
|
|
37
|
+
|
|
38
|
+
## Phase 3: Scan Execution
|
|
39
|
+
|
|
40
|
+
**Quick mode**: Single CLI call with analysis mode, max 20 findings, skip toolchain.
|
|
41
|
+
|
|
42
|
+
**Standard mode** (sequential):
|
|
43
|
+
|
|
44
|
+
### 3A: Toolchain Scan
|
|
45
|
+
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:
|
|
46
|
+
- tsc: `file(line,col): error TSxxxx: msg` -> dimension=correctness, source=tool:tsc
|
|
47
|
+
- eslint: JSON array -> severity 2=correctness/high, else=maintainability/medium
|
|
48
|
+
- semgrep: `{results[]}` -> dimension=security, severity from extra.severity
|
|
49
|
+
- ruff: `[{code,message,filename}]` -> S*=security, F*/B*=correctness, else=maintainability
|
|
50
|
+
- mypy: `file:line: error: msg [code]` -> dimension=correctness
|
|
51
|
+
- npm audit: `{vulnerabilities:{}}` -> dimension=security, category=dependency
|
|
52
|
+
|
|
53
|
+
Write `<session>/scan/toolchain-findings.json`.
|
|
54
|
+
|
|
55
|
+
### 3B: Semantic Scan (LLM via CLI)
|
|
56
|
+
Build prompt with target file patterns, toolchain dedup summary, and per-dimension focus areas:
|
|
57
|
+
- SEC: Business logic vulnerabilities, privilege escalation, sensitive data flow, auth bypass
|
|
58
|
+
- COR: Logic errors, unhandled exception paths, state management bugs, race conditions
|
|
59
|
+
- PRF: Algorithm complexity, N+1 queries, unnecessary sync, memory leaks, missing caching
|
|
60
|
+
- MNT: Architectural coupling, abstraction leaks, convention violations, dead code
|
|
61
|
+
|
|
62
|
+
Execute via `maestro delegate --to gemini --mode analysis --rule analysis-review-code-quality` (fallback: qwen -> codex). 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`.
|
|
63
|
+
|
|
64
|
+
### Tech Profile Scan
|
|
65
|
+
|
|
66
|
+
After scan execution, emit context-aware trigger signals (based on detected codebase characteristics):
|
|
67
|
+
|
|
68
|
+
1. Check security findings → signals (`injection_risk`, `eval_usage`, `sql_detected`, `auth_detected`)
|
|
69
|
+
2. Check quality findings → risk signals (`legacy_patterns`, `test_gap`, `perf_sensitive`)
|
|
70
|
+
3. Include `tech_profile` in Phase 5 state_update data
|
|
71
|
+
|
|
72
|
+
## Phase 4: Aggregate & Output
|
|
73
|
+
|
|
74
|
+
1. Merge toolchain + semantic findings, deduplicate (same file + line + dimension = duplicate)
|
|
75
|
+
2. Assign dimension-prefixed IDs: SEC-001, COR-001, PRF-001, MNT-001
|
|
76
|
+
3. Write `<session>/scan/scan-results.json` with schema: `{scan_date, target, dimensions, quick_mode, total_findings, by_severity, by_dimension, findings[]}`
|
|
77
|
+
4. Each finding: `{id, dimension, category, severity, title, description, location:{file,line}, source, suggested_fix, effort, confidence}`
|
|
78
|
+
5. Update `<session>/.msg/meta.json` with scan summary (findings_count, by_severity, by_dimension)
|
|
79
|
+
6. Contribute discoveries to `<session>/wisdom/` files
|