maestro-flow 0.3.2 → 0.3.3
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/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/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/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +6 -15
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +77 -1
- 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 +2 -7
- package/dist/src/mcp/delegate-channel-relay.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 +1 -1
- package/workflows/delegate-usage.md +330 -0
|
@@ -1,128 +1,128 @@
|
|
|
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: Agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, TaskList, TaskGet, TaskUpdate, TaskCreate, TeamCreate, TeamDelete, SendMessage, mcp__ace-tool__search_context, mcp__ccw-tools__read_file, mcp__ccw-tools__write_file, mcp__ccw-tools__edit_file, mcp__ccw-tools__team_msg
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Team Tech Debt
|
|
8
|
-
|
|
9
|
-
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`.
|
|
10
|
-
|
|
11
|
-
## Architecture
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
Skill(skill="team-tech-debt", 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 v v
|
|
29
|
-
[team-worker agents, each loads roles/<role>/role.md]
|
|
30
|
-
scanner assessor planner executor validator
|
|
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) | TDSCAN-* | false |
|
|
39
|
-
| assessor | [roles/assessor/role.md](roles/assessor/role.md) | TDEVAL-* | false |
|
|
40
|
-
| planner | [roles/planner/role.md](roles/planner/role.md) | TDPLAN-* | false |
|
|
41
|
-
| executor | [roles/executor/role.md](roles/executor/role.md) | TDFIX-* | true |
|
|
42
|
-
| validator | [roles/validator/role.md](roles/validator/role.md) | TDVAL-* | false |
|
|
43
|
-
|
|
44
|
-
## Role Router
|
|
45
|
-
|
|
46
|
-
Parse `$ARGUMENTS`:
|
|
47
|
-
- Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
|
|
48
|
-
- No `--role` → `@roles/coordinator/role.md`, execute entry router
|
|
49
|
-
|
|
50
|
-
## Shared Constants
|
|
51
|
-
|
|
52
|
-
- **Session prefix**: `TD`
|
|
53
|
-
- **Session path**: `.workflow/.team/TD-<slug>-<date>/`
|
|
54
|
-
- **CLI tools**: `maestro
|
|
55
|
-
- **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
|
|
56
|
-
- **Max GC rounds**: 3
|
|
57
|
-
|
|
58
|
-
## Worker Spawn Template
|
|
59
|
-
|
|
60
|
-
Coordinator spawns workers using this template:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
Agent({
|
|
64
|
-
subagent_type: "team-worker",
|
|
65
|
-
description: "Spawn <role> worker for <task-id>",
|
|
66
|
-
team_name: "tech-debt",
|
|
67
|
-
name: "<role>",
|
|
68
|
-
run_in_background: true,
|
|
69
|
-
prompt: `## Role Assignment
|
|
70
|
-
role: <role>
|
|
71
|
-
role_spec: <skill_root>/roles/<role>/role.md
|
|
72
|
-
session: <session-folder>
|
|
73
|
-
session_id: <session-id>
|
|
74
|
-
team_name: tech-debt
|
|
75
|
-
requirement: <task-description>
|
|
76
|
-
inner_loop: <true|false>
|
|
77
|
-
|
|
78
|
-
## Progress Milestones
|
|
79
|
-
session_id: <session-id>
|
|
80
|
-
Report progress via team_msg at natural phase boundaries (context loaded -> core work done -> verification).
|
|
81
|
-
Report blockers immediately via team_msg type="blocker".
|
|
82
|
-
Report completion via team_msg type="task_complete" after final SendMessage.
|
|
83
|
-
|
|
84
|
-
Read role_spec file (@<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
|
|
85
|
-
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
|
86
|
-
})
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## User Commands
|
|
90
|
-
|
|
91
|
-
| Command | Action |
|
|
92
|
-
|---------|--------|
|
|
93
|
-
| `check` / `status` | View execution status graph |
|
|
94
|
-
| `resume` / `continue` | Advance to next step |
|
|
95
|
-
| `--mode=scan` | Run scan-only pipeline (TDSCAN + TDEVAL) |
|
|
96
|
-
| `--mode=targeted` | Run targeted pipeline (TDPLAN + TDFIX + TDVAL) |
|
|
97
|
-
| `--mode=remediate` | Run full pipeline (default) |
|
|
98
|
-
| `-y` / `--yes` | Skip confirmations |
|
|
99
|
-
|
|
100
|
-
## Specs Reference
|
|
101
|
-
|
|
102
|
-
- [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
|
|
103
|
-
|
|
104
|
-
## Session Directory
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
.workflow/.team/TD-<slug>-<date>/
|
|
108
|
-
├── .msg/
|
|
109
|
-
│ ├── messages.jsonl # Team message bus
|
|
110
|
-
│ └── meta.json # Pipeline config + role state snapshot
|
|
111
|
-
├── scan/ # Scanner output
|
|
112
|
-
├── assessment/ # Assessor output
|
|
113
|
-
├── plan/ # Planner output
|
|
114
|
-
├── fixes/ # Executor output
|
|
115
|
-
├── validation/ # Validator output
|
|
116
|
-
└── wisdom/ # Cross-task knowledge
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Error Handling
|
|
120
|
-
|
|
121
|
-
| Scenario | Resolution |
|
|
122
|
-
|----------|------------|
|
|
123
|
-
| Unknown command | Error with available command list |
|
|
124
|
-
| Role not found | Error with role registry |
|
|
125
|
-
| Session corruption | Attempt recovery, fallback to manual |
|
|
126
|
-
| Fast-advance conflict | Coordinator reconciles on next callback |
|
|
127
|
-
| Completion action fails | Default to Keep Active |
|
|
128
|
-
| Scanner finds no debt | Report clean codebase, skip to summary |
|
|
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: Agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, TaskList, TaskGet, TaskUpdate, TaskCreate, TeamCreate, TeamDelete, SendMessage, mcp__ace-tool__search_context, mcp__ccw-tools__read_file, mcp__ccw-tools__write_file, mcp__ccw-tools__edit_file, mcp__ccw-tools__team_msg
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Team Tech Debt
|
|
8
|
+
|
|
9
|
+
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`.
|
|
10
|
+
|
|
11
|
+
## Architecture
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Skill(skill="team-tech-debt", 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 v v
|
|
29
|
+
[team-worker agents, each loads roles/<role>/role.md]
|
|
30
|
+
scanner assessor planner executor validator
|
|
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) | TDSCAN-* | false |
|
|
39
|
+
| assessor | [roles/assessor/role.md](roles/assessor/role.md) | TDEVAL-* | false |
|
|
40
|
+
| planner | [roles/planner/role.md](roles/planner/role.md) | TDPLAN-* | false |
|
|
41
|
+
| executor | [roles/executor/role.md](roles/executor/role.md) | TDFIX-* | true |
|
|
42
|
+
| validator | [roles/validator/role.md](roles/validator/role.md) | TDVAL-* | false |
|
|
43
|
+
|
|
44
|
+
## Role Router
|
|
45
|
+
|
|
46
|
+
Parse `$ARGUMENTS`:
|
|
47
|
+
- Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
|
|
48
|
+
- No `--role` → `@roles/coordinator/role.md`, execute entry router
|
|
49
|
+
|
|
50
|
+
## Shared Constants
|
|
51
|
+
|
|
52
|
+
- **Session prefix**: `TD`
|
|
53
|
+
- **Session path**: `.workflow/.team/TD-<slug>-<date>/`
|
|
54
|
+
- **CLI tools**: `maestro delegate --mode analysis` (read-only), `maestro delegate --mode write` (modifications)
|
|
55
|
+
- **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
|
|
56
|
+
- **Max GC rounds**: 3
|
|
57
|
+
|
|
58
|
+
## Worker Spawn Template
|
|
59
|
+
|
|
60
|
+
Coordinator spawns workers using this template:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Agent({
|
|
64
|
+
subagent_type: "team-worker",
|
|
65
|
+
description: "Spawn <role> worker for <task-id>",
|
|
66
|
+
team_name: "tech-debt",
|
|
67
|
+
name: "<role>",
|
|
68
|
+
run_in_background: true,
|
|
69
|
+
prompt: `## Role Assignment
|
|
70
|
+
role: <role>
|
|
71
|
+
role_spec: <skill_root>/roles/<role>/role.md
|
|
72
|
+
session: <session-folder>
|
|
73
|
+
session_id: <session-id>
|
|
74
|
+
team_name: tech-debt
|
|
75
|
+
requirement: <task-description>
|
|
76
|
+
inner_loop: <true|false>
|
|
77
|
+
|
|
78
|
+
## Progress Milestones
|
|
79
|
+
session_id: <session-id>
|
|
80
|
+
Report progress via team_msg at natural phase boundaries (context loaded -> core work done -> verification).
|
|
81
|
+
Report blockers immediately via team_msg type="blocker".
|
|
82
|
+
Report completion via team_msg type="task_complete" after final SendMessage.
|
|
83
|
+
|
|
84
|
+
Read role_spec file (@<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
|
|
85
|
+
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
|
86
|
+
})
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## User Commands
|
|
90
|
+
|
|
91
|
+
| Command | Action |
|
|
92
|
+
|---------|--------|
|
|
93
|
+
| `check` / `status` | View execution status graph |
|
|
94
|
+
| `resume` / `continue` | Advance to next step |
|
|
95
|
+
| `--mode=scan` | Run scan-only pipeline (TDSCAN + TDEVAL) |
|
|
96
|
+
| `--mode=targeted` | Run targeted pipeline (TDPLAN + TDFIX + TDVAL) |
|
|
97
|
+
| `--mode=remediate` | Run full pipeline (default) |
|
|
98
|
+
| `-y` / `--yes` | Skip confirmations |
|
|
99
|
+
|
|
100
|
+
## Specs Reference
|
|
101
|
+
|
|
102
|
+
- [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
|
|
103
|
+
|
|
104
|
+
## Session Directory
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
.workflow/.team/TD-<slug>-<date>/
|
|
108
|
+
├── .msg/
|
|
109
|
+
│ ├── messages.jsonl # Team message bus
|
|
110
|
+
│ └── meta.json # Pipeline config + role state snapshot
|
|
111
|
+
├── scan/ # Scanner output
|
|
112
|
+
├── assessment/ # Assessor output
|
|
113
|
+
├── plan/ # Planner output
|
|
114
|
+
├── fixes/ # Executor output
|
|
115
|
+
├── validation/ # Validator output
|
|
116
|
+
└── wisdom/ # Cross-task knowledge
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Error Handling
|
|
120
|
+
|
|
121
|
+
| Scenario | Resolution |
|
|
122
|
+
|----------|------------|
|
|
123
|
+
| Unknown command | Error with available command list |
|
|
124
|
+
| Role not found | Error with role registry |
|
|
125
|
+
| Session corruption | Attempt recovery, fallback to manual |
|
|
126
|
+
| Fast-advance conflict | Coordinator reconciles on next callback |
|
|
127
|
+
| Completion action fails | Default to Keep Active |
|
|
128
|
+
| Scanner finds no debt | Report clean codebase, skip to summary |
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: executor
|
|
3
|
-
prefix: TDFIX
|
|
4
|
-
inner_loop: true
|
|
5
|
-
message_types: [state_update]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Tech Debt Executor
|
|
9
|
-
|
|
10
|
-
Debt cleanup executor. Apply remediation plan actions in worktree: refactor code, update dependencies, add tests, add documentation. Batch-delegate to CLI tools, self-validate after each batch.
|
|
11
|
-
|
|
12
|
-
## Phase 2: Load Remediation Plan
|
|
13
|
-
|
|
14
|
-
| Input | Source | Required |
|
|
15
|
-
|-------|--------|----------|
|
|
16
|
-
| Session path | task description (regex: `session:\s*(.+)`) | Yes |
|
|
17
|
-
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
|
18
|
-
| Remediation plan | <session>/plan/remediation-plan.json | Yes |
|
|
19
|
-
| Worktree info | meta.json:worktree.path, worktree.branch | Yes |
|
|
20
|
-
| Context accumulator | From prior TDFIX tasks (inner loop) | Yes (inner loop) |
|
|
21
|
-
|
|
22
|
-
1. Extract session path from task description
|
|
23
|
-
2. Read .msg/meta.json for worktree path and branch
|
|
24
|
-
3. Read remediation-plan.json, extract all actions from plan phases
|
|
25
|
-
4. Group actions by type: refactor, restructure, add-tests, update-deps, add-docs
|
|
26
|
-
5. Split large groups (> 10 items) into sub-batches of 10
|
|
27
|
-
6. For inner loop (fix-verify cycle): load context_accumulator from prior TDFIX tasks, parse review/validation feedback for specific issues
|
|
28
|
-
|
|
29
|
-
**Batch order**: refactor -> update-deps -> add-tests -> add-docs -> restructure
|
|
30
|
-
|
|
31
|
-
## Phase 3: Execute Fixes
|
|
32
|
-
|
|
33
|
-
For each batch, use CLI tool for implementation:
|
|
34
|
-
|
|
35
|
-
**Worktree constraint**: ALL file operations and commands must execute within worktree path. Use `cd "<worktree-path>" && ...` prefix for all Bash commands.
|
|
36
|
-
|
|
37
|
-
**Per-batch delegation**:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
maestro
|
|
41
|
-
TASK: <batch-type-specific-tasks>
|
|
42
|
-
MODE: write
|
|
43
|
-
CONTEXT: @<worktree-path>/**/* | Memory: Remediation plan context
|
|
44
|
-
EXPECTED: Code changes that fix debt items, maintain backward compatibility, pass existing tests
|
|
45
|
-
CONSTRAINTS: Minimal changes only | No new features | No suppressions | Read files before modifying
|
|
46
|
-
Batch type: <refactor|update-deps|add-tests|add-docs|restructure>
|
|
47
|
-
Items: <list-of-items-with-file-paths-and-descriptions>" --tool gemini --mode write --cd "<worktree-path>"
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Wait for CLI completion before proceeding to next batch.
|
|
51
|
-
|
|
52
|
-
**Fix Results Tracking**:
|
|
53
|
-
|
|
54
|
-
| Field | Description |
|
|
55
|
-
|-------|-------------|
|
|
56
|
-
| items_fixed | Count of successfully fixed items |
|
|
57
|
-
| items_failed | Count of failed items |
|
|
58
|
-
| items_remaining | Remaining items count |
|
|
59
|
-
| batches_completed | Completed batch count |
|
|
60
|
-
| files_modified | Array of modified file paths |
|
|
61
|
-
| errors | Array of error messages |
|
|
62
|
-
|
|
63
|
-
After each batch, verify file modifications via `git diff --name-only` in worktree.
|
|
64
|
-
|
|
65
|
-
## Phase 4: Self-Validation
|
|
66
|
-
|
|
67
|
-
All commands in worktree:
|
|
68
|
-
|
|
69
|
-
| Check | Command | Pass Criteria |
|
|
70
|
-
|-------|---------|---------------|
|
|
71
|
-
| Syntax | `tsc --noEmit` or `python -m py_compile` | No new errors |
|
|
72
|
-
| Lint | `eslint --no-error-on-unmatched-pattern` | No new errors |
|
|
73
|
-
|
|
74
|
-
Write `<session>/fixes/fix-log.json` with fix results. Update .msg/meta.json with `fix_results`.
|
|
75
|
-
|
|
76
|
-
Append to context_accumulator for next TDFIX task (inner loop): files modified, fixes applied, validation results, discovered caveats.
|
|
1
|
+
---
|
|
2
|
+
role: executor
|
|
3
|
+
prefix: TDFIX
|
|
4
|
+
inner_loop: true
|
|
5
|
+
message_types: [state_update]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Tech Debt Executor
|
|
9
|
+
|
|
10
|
+
Debt cleanup executor. Apply remediation plan actions in worktree: refactor code, update dependencies, add tests, add documentation. Batch-delegate to CLI tools, self-validate after each batch.
|
|
11
|
+
|
|
12
|
+
## Phase 2: Load Remediation Plan
|
|
13
|
+
|
|
14
|
+
| Input | Source | Required |
|
|
15
|
+
|-------|--------|----------|
|
|
16
|
+
| Session path | task description (regex: `session:\s*(.+)`) | Yes |
|
|
17
|
+
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
|
18
|
+
| Remediation plan | <session>/plan/remediation-plan.json | Yes |
|
|
19
|
+
| Worktree info | meta.json:worktree.path, worktree.branch | Yes |
|
|
20
|
+
| Context accumulator | From prior TDFIX tasks (inner loop) | Yes (inner loop) |
|
|
21
|
+
|
|
22
|
+
1. Extract session path from task description
|
|
23
|
+
2. Read .msg/meta.json for worktree path and branch
|
|
24
|
+
3. Read remediation-plan.json, extract all actions from plan phases
|
|
25
|
+
4. Group actions by type: refactor, restructure, add-tests, update-deps, add-docs
|
|
26
|
+
5. Split large groups (> 10 items) into sub-batches of 10
|
|
27
|
+
6. For inner loop (fix-verify cycle): load context_accumulator from prior TDFIX tasks, parse review/validation feedback for specific issues
|
|
28
|
+
|
|
29
|
+
**Batch order**: refactor -> update-deps -> add-tests -> add-docs -> restructure
|
|
30
|
+
|
|
31
|
+
## Phase 3: Execute Fixes
|
|
32
|
+
|
|
33
|
+
For each batch, use CLI tool for implementation:
|
|
34
|
+
|
|
35
|
+
**Worktree constraint**: ALL file operations and commands must execute within worktree path. Use `cd "<worktree-path>" && ...` prefix for all Bash commands.
|
|
36
|
+
|
|
37
|
+
**Per-batch delegation**:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
maestro delegate "PURPOSE: Apply tech debt fixes in batch; success = all items fixed without breaking changes
|
|
41
|
+
TASK: <batch-type-specific-tasks>
|
|
42
|
+
MODE: write
|
|
43
|
+
CONTEXT: @<worktree-path>/**/* | Memory: Remediation plan context
|
|
44
|
+
EXPECTED: Code changes that fix debt items, maintain backward compatibility, pass existing tests
|
|
45
|
+
CONSTRAINTS: Minimal changes only | No new features | No suppressions | Read files before modifying
|
|
46
|
+
Batch type: <refactor|update-deps|add-tests|add-docs|restructure>
|
|
47
|
+
Items: <list-of-items-with-file-paths-and-descriptions>" --tool gemini --mode write --cd "<worktree-path>"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Wait for CLI completion before proceeding to next batch.
|
|
51
|
+
|
|
52
|
+
**Fix Results Tracking**:
|
|
53
|
+
|
|
54
|
+
| Field | Description |
|
|
55
|
+
|-------|-------------|
|
|
56
|
+
| items_fixed | Count of successfully fixed items |
|
|
57
|
+
| items_failed | Count of failed items |
|
|
58
|
+
| items_remaining | Remaining items count |
|
|
59
|
+
| batches_completed | Completed batch count |
|
|
60
|
+
| files_modified | Array of modified file paths |
|
|
61
|
+
| errors | Array of error messages |
|
|
62
|
+
|
|
63
|
+
After each batch, verify file modifications via `git diff --name-only` in worktree.
|
|
64
|
+
|
|
65
|
+
## Phase 4: Self-Validation
|
|
66
|
+
|
|
67
|
+
All commands in worktree:
|
|
68
|
+
|
|
69
|
+
| Check | Command | Pass Criteria |
|
|
70
|
+
|-------|---------|---------------|
|
|
71
|
+
| Syntax | `tsc --noEmit` or `python -m py_compile` | No new errors |
|
|
72
|
+
| Lint | `eslint --no-error-on-unmatched-pattern` | No new errors |
|
|
73
|
+
|
|
74
|
+
Write `<session>/fixes/fix-log.json` with fix results. Update .msg/meta.json with `fix_results`.
|
|
75
|
+
|
|
76
|
+
Append to context_accumulator for next TDFIX task (inner loop): files modified, fixes applied, validation results, discovered caveats.
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
---
|
|
2
|
-
role: scanner
|
|
3
|
-
prefix: TDSCAN
|
|
4
|
-
inner_loop: false
|
|
5
|
-
message_types: [state_update]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Tech Debt Scanner
|
|
9
|
-
|
|
10
|
-
Multi-dimension tech debt scanner. Scan codebase across 5 dimensions (code, architecture, testing, dependency, documentation), produce structured debt inventory with severity rankings.
|
|
11
|
-
|
|
12
|
-
## Phase 2: Context & Environment Detection
|
|
13
|
-
|
|
14
|
-
| Input | Source | Required |
|
|
15
|
-
|-------|--------|----------|
|
|
16
|
-
| Scan scope | task description (regex: `scope:\s*(.+)`) | No (default: `**/*`) |
|
|
17
|
-
| Session path | task description (regex: `session:\s*(.+)`) | Yes |
|
|
18
|
-
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
|
19
|
-
|
|
20
|
-
1. Extract session path and scan scope from task description
|
|
21
|
-
2. Load debug specs: Run `ccw spec load --category debug` for known issues, workarounds, and root-cause notes
|
|
22
|
-
3. Read .msg/meta.json for team context
|
|
23
|
-
3. Detect project type and framework:
|
|
24
|
-
|
|
25
|
-
| Signal File | Project Type |
|
|
26
|
-
|-------------|-------------|
|
|
27
|
-
| package.json + React/Vue/Angular | Frontend Node |
|
|
28
|
-
| package.json + Express/Fastify/NestJS | Backend Node |
|
|
29
|
-
| pyproject.toml / requirements.txt | Python |
|
|
30
|
-
| go.mod | Go |
|
|
31
|
-
| No detection | Generic |
|
|
32
|
-
|
|
33
|
-
4. Determine scan dimensions (default: code, architecture, testing, dependency, documentation)
|
|
34
|
-
5. Detect perspectives from task description:
|
|
35
|
-
|
|
36
|
-
| Condition | Perspective |
|
|
37
|
-
|-----------|-------------|
|
|
38
|
-
| `security\|auth\|inject\|xss` | security |
|
|
39
|
-
| `performance\|speed\|optimize` | performance |
|
|
40
|
-
| `quality\|clean\|maintain\|debt` | code-quality |
|
|
41
|
-
| `architect\|pattern\|structure` | architecture |
|
|
42
|
-
| Default | code-quality + architecture |
|
|
43
|
-
|
|
44
|
-
6. Assess complexity:
|
|
45
|
-
|
|
46
|
-
| Score | Complexity | Strategy |
|
|
47
|
-
|-------|------------|----------|
|
|
48
|
-
| >= 4 | High | Triple Fan-out: CLI explore + CLI 5 dimensions + multi-perspective Gemini |
|
|
49
|
-
| 2-3 | Medium | Dual Fan-out: CLI explore + CLI 3 dimensions |
|
|
50
|
-
| 0-1 | Low | Inline: ACE search + Grep |
|
|
51
|
-
|
|
52
|
-
## Phase 3: Multi-Dimension Scan
|
|
53
|
-
|
|
54
|
-
**Low Complexity** (inline):
|
|
55
|
-
- Use `mcp__ace-tool__search_context` for code smells, TODO/FIXME, deprecated APIs, complex functions, dead code, missing tests
|
|
56
|
-
- Classify findings into dimensions
|
|
57
|
-
|
|
58
|
-
**Medium/High Complexity** (Fan-out):
|
|
59
|
-
- Fan-out A: CLI exploration (structure, patterns, dependencies angles) via `maestro
|
|
60
|
-
- Fan-out B: CLI dimension analysis (parallel gemini per dimension -- code, architecture, testing, dependency, documentation)
|
|
61
|
-
- Fan-out C (High only): Multi-perspective Gemini analysis (security, performance, code-quality, architecture)
|
|
62
|
-
- Fan-in: Merge results, cross-deduplicate by file:line, boost severity for multi-source findings
|
|
63
|
-
|
|
64
|
-
**Standardize each finding**:
|
|
65
|
-
|
|
66
|
-
| Field | Description |
|
|
67
|
-
|-------|-------------|
|
|
68
|
-
| `id` | `TD-NNN` (sequential) |
|
|
69
|
-
| `dimension` | code, architecture, testing, dependency, documentation |
|
|
70
|
-
| `severity` | critical, high, medium, low |
|
|
71
|
-
| `file` | File path |
|
|
72
|
-
| `line` | Line number |
|
|
73
|
-
| `description` | Issue description |
|
|
74
|
-
| `suggestion` | Fix suggestion |
|
|
75
|
-
| `estimated_effort` | small, medium, large, unknown |
|
|
76
|
-
|
|
77
|
-
### Tech Profile Scan
|
|
78
|
-
|
|
79
|
-
After multi-dimension scan, emit context-aware trigger signals (based on detected codebase characteristics):
|
|
80
|
-
|
|
81
|
-
1. Check debt dimensions → signals (`legacy_patterns`, `test_gap`, `perf_sensitive`)
|
|
82
|
-
2. Check detected patterns → risk signals (`sql_detected`, `auth_detected`, `scaling_concern`, `injection_risk`)
|
|
83
|
-
3. Include `tech_profile` in Phase 5 state_update data
|
|
84
|
-
|
|
85
|
-
## Phase 4: Aggregate & Save
|
|
86
|
-
|
|
87
|
-
1. Deduplicate findings across Fan-out layers (file:line key), merge cross-references
|
|
88
|
-
2. Sort by severity (cross-referenced items boosted)
|
|
89
|
-
3. Write `<session>/scan/debt-inventory.json` with scan_date, dimensions, total_items, by_dimension, by_severity, items
|
|
90
|
-
4. Update .msg/meta.json with `debt_inventory` array and `debt_score_before` count
|
|
1
|
+
---
|
|
2
|
+
role: scanner
|
|
3
|
+
prefix: TDSCAN
|
|
4
|
+
inner_loop: false
|
|
5
|
+
message_types: [state_update]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Tech Debt Scanner
|
|
9
|
+
|
|
10
|
+
Multi-dimension tech debt scanner. Scan codebase across 5 dimensions (code, architecture, testing, dependency, documentation), produce structured debt inventory with severity rankings.
|
|
11
|
+
|
|
12
|
+
## Phase 2: Context & Environment Detection
|
|
13
|
+
|
|
14
|
+
| Input | Source | Required |
|
|
15
|
+
|-------|--------|----------|
|
|
16
|
+
| Scan scope | task description (regex: `scope:\s*(.+)`) | No (default: `**/*`) |
|
|
17
|
+
| Session path | task description (regex: `session:\s*(.+)`) | Yes |
|
|
18
|
+
| .msg/meta.json | <session>/.msg/meta.json | Yes |
|
|
19
|
+
|
|
20
|
+
1. Extract session path and scan scope from task description
|
|
21
|
+
2. Load debug specs: Run `ccw spec load --category debug` for known issues, workarounds, and root-cause notes
|
|
22
|
+
3. Read .msg/meta.json for team context
|
|
23
|
+
3. Detect project type and framework:
|
|
24
|
+
|
|
25
|
+
| Signal File | Project Type |
|
|
26
|
+
|-------------|-------------|
|
|
27
|
+
| package.json + React/Vue/Angular | Frontend Node |
|
|
28
|
+
| package.json + Express/Fastify/NestJS | Backend Node |
|
|
29
|
+
| pyproject.toml / requirements.txt | Python |
|
|
30
|
+
| go.mod | Go |
|
|
31
|
+
| No detection | Generic |
|
|
32
|
+
|
|
33
|
+
4. Determine scan dimensions (default: code, architecture, testing, dependency, documentation)
|
|
34
|
+
5. Detect perspectives from task description:
|
|
35
|
+
|
|
36
|
+
| Condition | Perspective |
|
|
37
|
+
|-----------|-------------|
|
|
38
|
+
| `security\|auth\|inject\|xss` | security |
|
|
39
|
+
| `performance\|speed\|optimize` | performance |
|
|
40
|
+
| `quality\|clean\|maintain\|debt` | code-quality |
|
|
41
|
+
| `architect\|pattern\|structure` | architecture |
|
|
42
|
+
| Default | code-quality + architecture |
|
|
43
|
+
|
|
44
|
+
6. Assess complexity:
|
|
45
|
+
|
|
46
|
+
| Score | Complexity | Strategy |
|
|
47
|
+
|-------|------------|----------|
|
|
48
|
+
| >= 4 | High | Triple Fan-out: CLI explore + CLI 5 dimensions + multi-perspective Gemini |
|
|
49
|
+
| 2-3 | Medium | Dual Fan-out: CLI explore + CLI 3 dimensions |
|
|
50
|
+
| 0-1 | Low | Inline: ACE search + Grep |
|
|
51
|
+
|
|
52
|
+
## Phase 3: Multi-Dimension Scan
|
|
53
|
+
|
|
54
|
+
**Low Complexity** (inline):
|
|
55
|
+
- Use `mcp__ace-tool__search_context` for code smells, TODO/FIXME, deprecated APIs, complex functions, dead code, missing tests
|
|
56
|
+
- Classify findings into dimensions
|
|
57
|
+
|
|
58
|
+
**Medium/High Complexity** (Fan-out):
|
|
59
|
+
- Fan-out A: CLI exploration (structure, patterns, dependencies angles) via `maestro delegate --to gemini --mode analysis`
|
|
60
|
+
- Fan-out B: CLI dimension analysis (parallel gemini per dimension -- code, architecture, testing, dependency, documentation)
|
|
61
|
+
- Fan-out C (High only): Multi-perspective Gemini analysis (security, performance, code-quality, architecture)
|
|
62
|
+
- Fan-in: Merge results, cross-deduplicate by file:line, boost severity for multi-source findings
|
|
63
|
+
|
|
64
|
+
**Standardize each finding**:
|
|
65
|
+
|
|
66
|
+
| Field | Description |
|
|
67
|
+
|-------|-------------|
|
|
68
|
+
| `id` | `TD-NNN` (sequential) |
|
|
69
|
+
| `dimension` | code, architecture, testing, dependency, documentation |
|
|
70
|
+
| `severity` | critical, high, medium, low |
|
|
71
|
+
| `file` | File path |
|
|
72
|
+
| `line` | Line number |
|
|
73
|
+
| `description` | Issue description |
|
|
74
|
+
| `suggestion` | Fix suggestion |
|
|
75
|
+
| `estimated_effort` | small, medium, large, unknown |
|
|
76
|
+
|
|
77
|
+
### Tech Profile Scan
|
|
78
|
+
|
|
79
|
+
After multi-dimension scan, emit context-aware trigger signals (based on detected codebase characteristics):
|
|
80
|
+
|
|
81
|
+
1. Check debt dimensions → signals (`legacy_patterns`, `test_gap`, `perf_sensitive`)
|
|
82
|
+
2. Check detected patterns → risk signals (`sql_detected`, `auth_detected`, `scaling_concern`, `injection_risk`)
|
|
83
|
+
3. Include `tech_profile` in Phase 5 state_update data
|
|
84
|
+
|
|
85
|
+
## Phase 4: Aggregate & Save
|
|
86
|
+
|
|
87
|
+
1. Deduplicate findings across Fan-out layers (file:line key), merge cross-references
|
|
88
|
+
2. Sort by severity (cross-referenced items boosted)
|
|
89
|
+
3. Write `<session>/scan/debt-inventory.json` with scan_date, dimensions, total_items, by_dimension, by_severity, items
|
|
90
|
+
4. Update .msg/meta.json with `debt_inventory` array and `debt_score_before` count
|