maestro-flow 0.3.5 → 0.3.6

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.
Files changed (69) hide show
  1. package/.claude/commands/maestro-brainstorm.md +10 -1
  2. package/.claude/commands/maestro-milestone-audit.md +1 -1
  3. package/.claude/commands/maestro-milestone-complete.md +2 -1
  4. package/.claude/commands/maestro-milestone-release.md +96 -0
  5. package/.claude/commands/maestro-phase-add.md +9 -1
  6. package/.claude/commands/maestro-phase-transition.md +9 -1
  7. package/.claude/commands/maestro.md +6 -0
  8. package/.claude/commands/manage-codebase-rebuild.md +76 -50
  9. package/.claude/commands/manage-codebase-refresh.md +9 -1
  10. package/.claude/commands/quality-refactor.md +1 -1
  11. package/.claude/commands/quality-sync.md +9 -1
  12. package/.claude/commands/spec-setup.md +1 -1
  13. package/.codex/skills/maestro-coordinate/SKILL.md +20 -6
  14. package/.codex/skills/manage-issue-analyze/SKILL.md +1 -1
  15. package/.codex/skills/quality-retrospective/SKILL.md +3 -3
  16. package/.codex/skills/team-coordinate/SKILL.md +1 -1
  17. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +19 -10
  18. package/.codex/skills/team-coordinate/roles/coordinator/role.md +2 -2
  19. package/.codex/skills/team-executor/SKILL.md +1 -1
  20. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +20 -9
  21. package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -2
  22. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +31 -12
  23. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +1 -1
  24. package/.codex/skills/team-quality-assurance/SKILL.md +1 -1
  25. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +20 -9
  26. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +1 -1
  27. package/.codex/skills/team-review/SKILL.md +1 -1
  28. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +20 -9
  29. package/.codex/skills/team-review/roles/coordinator/role.md +1 -1
  30. package/.codex/skills/team-tech-debt/SKILL.md +1 -1
  31. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +20 -9
  32. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +1 -1
  33. package/.codex/skills/team-testing/SKILL.md +2 -2
  34. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +20 -9
  35. package/.codex/skills/team-testing/roles/coordinator/role.md +1 -1
  36. package/chains/singles/spec-map.json +2 -2
  37. package/dashboard/dist-server/src/commands/delegate.d.ts +23 -0
  38. package/dashboard/dist-server/src/commands/delegate.js +91 -55
  39. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  40. package/dist/src/brainstorm-visualize/frame.d.ts +8 -0
  41. package/dist/src/brainstorm-visualize/frame.d.ts.map +1 -0
  42. package/dist/src/brainstorm-visualize/frame.js +655 -0
  43. package/dist/src/brainstorm-visualize/frame.js.map +1 -0
  44. package/dist/src/brainstorm-visualize/server.d.ts +2 -0
  45. package/dist/src/brainstorm-visualize/server.d.ts.map +1 -0
  46. package/dist/src/brainstorm-visualize/server.js +180 -0
  47. package/dist/src/brainstorm-visualize/server.js.map +1 -0
  48. package/dist/src/cli.js +11 -1
  49. package/dist/src/cli.js.map +1 -1
  50. package/dist/src/commands/brainstorm-visualize.d.ts +3 -0
  51. package/dist/src/commands/brainstorm-visualize.d.ts.map +1 -0
  52. package/dist/src/commands/brainstorm-visualize.js +337 -0
  53. package/dist/src/commands/brainstorm-visualize.js.map +1 -0
  54. package/dist/src/commands/core-memory.d.ts +3 -0
  55. package/dist/src/commands/core-memory.d.ts.map +1 -0
  56. package/dist/src/commands/core-memory.js +101 -0
  57. package/dist/src/commands/core-memory.js.map +1 -0
  58. package/dist/src/commands/delegate.d.ts +23 -0
  59. package/dist/src/commands/delegate.d.ts.map +1 -1
  60. package/dist/src/commands/delegate.js +91 -55
  61. package/dist/src/commands/delegate.js.map +1 -1
  62. package/dist/src/mcp/delegate-channel-relay.d.ts.map +1 -1
  63. package/dist/src/mcp/delegate-channel-relay.js +6 -0
  64. package/dist/src/mcp/delegate-channel-relay.js.map +1 -1
  65. package/dist/src/mcp/server.d.ts.map +1 -1
  66. package/dist/src/mcp/server.js +27 -0
  67. package/dist/src/mcp/server.js.map +1 -1
  68. package/package.json +1 -1
  69. package/.claude/commands/spec-map.md +0 -82
@@ -22,6 +22,7 @@ Unified brainstorming combining interactive framework generation, multi-role par
22
22
  <deferred_reading>
23
23
  - [scratch-index.json](~/.maestro/templates/scratch-index.json) — read when operating in scratch mode
24
24
  - [index.json](~/.maestro/templates/index.json) — read when operating in phase mode
25
+ - [brainstorm-visualize.md](~/.maestro/workflows/brainstorm-visualize.md) — read when html-prototypes/ produced and user wants to browse them
25
26
  </deferred_reading>
26
27
 
27
28
  <context>
@@ -54,6 +55,7 @@ Auto mode:
54
55
  - Project initialized, need spec package → Skill({ skill: "maestro-spec-generate", args: "--from-brainstorm {session_id}" })
55
56
  - Project initialized, quick roadmap → Skill({ skill: "maestro-roadmap", args: "--from-brainstorm {session_id}" })
56
57
  - Need deeper analysis first → Skill({ skill: "maestro-analyze", args: "{topic}" })
58
+ - `html-prototypes/` produced with 2+ files and user wants to browse → load `~/.maestro/workflows/brainstorm-visualize.md` and launch visualizer server (optional, user-triggered)
57
59
 
58
60
  Single role mode:
59
61
  - More roles needed → Skill({ skill: "maestro-brainstorm", args: "{next_role} --session {session_id}" })
@@ -76,9 +78,16 @@ Single role mode:
76
78
  <success_criteria>
77
79
  **Auto mode**:
78
80
  - [ ] guidance-specification.md with RFC 2119 keywords, terminology, non-goals, feature decomposition
79
- - [ ] Role analysis files for each selected role in `.brainstorming/{role}/`
81
+ - [ ] design-research.md persisted when Step 1.7 external research ran (fail-soft: absence not a failure)
82
+ - [ ] Spec Review Gate passed (Step 3.5) or `--yes` bypassed
83
+ - [ ] Role analysis files for each selected NON-UI role in `.brainstorming/{role}/`
84
+ - [ ] If `ui-designer` in selected_roles: `ui-designer/analysis.md` exists AND exactly one of `html-prototypes/` / `ascii-mockups/` / `api-sketches/` exists with `README.md` + ≥1 prototype file
85
+ - [ ] ui-designer/analysis.md references each prototype via `@-notation`
86
+ - [ ] HTML prototypes are self-contained (no external `<link>`/`<script src>` URLs — warn only)
80
87
  - [ ] Feature specs in `.brainstorming/feature-specs/` (or synthesis-specification.md)
88
+ - [ ] UI-bearing feature specs reference the corresponding prototype in Section 3 (Interface Contract)
81
89
  - [ ] feature-index.json and synthesis-changelog.md
90
+ - [ ] Final Output Gate passed (Step 5.5) or `--yes` bypassed
82
91
  - [ ] All user decisions captured with Decision Recording Protocol
83
92
  - [ ] Session metadata updated with completion status
84
93
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-milestone-audit
3
3
  description: Audit current milestone for cross-phase integration gaps
4
- argument-hint: "[milestone, e.g., 'v1.0']"
4
+ argument-hint: "[<milestone>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-milestone-complete
3
3
  description: Archive completed milestone and prepare for next
4
- argument-hint: "[milestone, e.g., 'v1.0']"
4
+ argument-hint: "[<milestone>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -35,6 +35,7 @@ Milestone: $ARGUMENTS (optional -- defaults to current_milestone from state.json
35
35
  Follow '~/.maestro/workflows/milestone-complete.md' completely.
36
36
 
37
37
  **Next-step routing on completion:**
38
+ - Cut a release for this milestone → Skill({ skill: "maestro-milestone-release" })
38
39
  - Next milestone has phases → Skill({ skill: "maestro-plan", args: "{next_milestone_first_phase}" })
39
40
  - Need to capture learnings → Skill({ skill: "manage-memory-capture", args: "compact" })
40
41
  - View updated project state → Skill({ skill: "manage-status" })
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: maestro-milestone-release
3
+ description: Version bump, changelog generation, and git tag for a completed milestone
4
+ argument-hint: "[<version>] [--bump patch|minor|major] [--dry-run] [--no-tag] [--no-push]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
14
+ ---
15
+
16
+ <purpose>
17
+ Package a completed milestone into a releasable version. Bumps the project version (e.g. `package.json`, `pyproject.toml`, or language-specific manifest), generates or appends a changelog entry from phase/milestone summaries and git log, creates an annotated git tag, and optionally pushes to the remote. Runs after Skill({ skill: "maestro-milestone-complete" }) has archived the milestone; serves as the final delivery step in the SDLC loop.
18
+ </purpose>
19
+
20
+ <required_reading>
21
+ @~/.maestro/workflows/milestone-release.md
22
+ </required_reading>
23
+
24
+ <context>
25
+ $ARGUMENTS -- optional explicit version string and flags.
26
+
27
+ **Flags:**
28
+ - `<version>` -- explicit version (e.g. `1.2.0`). If omitted, version is derived from `--bump` or prompted.
29
+ - `--bump patch|minor|major` -- semver bump relative to the current version (default: `minor`)
30
+ - `--dry-run` -- compute the next version, changelog diff, and tag name without writing files or creating tags
31
+ - `--no-tag` -- skip git tag creation (version bump + changelog only)
32
+ - `--no-push` -- skip `git push --follow-tags` after tagging
33
+
34
+ **State files:**
35
+ - `.workflow/state.json` -- current_milestone, previous release version
36
+ - `.workflow/milestones/{milestone}/summary.md` -- milestone summary (from `maestro-milestone-complete`)
37
+ - `.workflow/milestones/{milestone}/audit-report.md` -- audit verdict (must be PASS)
38
+ - `CHANGELOG.md` -- release notes file (created if missing)
39
+ - Version manifest -- `package.json` / `pyproject.toml` / `Cargo.toml` / etc. (auto-detected)
40
+
41
+ **Preconditions:**
42
+ - Current milestone must be completed (audit PASS + Skill({ skill: "maestro-milestone-complete" }) run)
43
+ - Working tree must be clean (no uncommitted changes) unless `--dry-run`
44
+ </context>
45
+
46
+ <execution>
47
+ Follow '~/.maestro/workflows/release.md' completely.
48
+
49
+ **High-level flow:**
50
+ 1. Validate preconditions (milestone completed, clean tree, audit PASS)
51
+ 2. Resolve target version from `<version>` or `--bump` against current manifest
52
+ 3. Collect changes since last release tag: milestone summary + phase summaries + git log between tags
53
+ 4. Generate `CHANGELOG.md` entry (grouped by phase / change type)
54
+ 5. Write version to manifest file(s) + commit with message `chore(release): v{version}`
55
+ 6. Create annotated git tag `v{version}` with release notes body (unless `--no-tag`)
56
+ 7. Push commit + tag to remote (unless `--no-push`)
57
+
58
+ **Report format on completion:**
59
+ ```
60
+ === RELEASE COMPLETE ===
61
+ Version: v{previous} → v{new}
62
+ Milestone: {milestone_name}
63
+ Tag: v{new} {pushed|local-only}
64
+ Changelog: {N} entries written to CHANGELOG.md
65
+ Manifest: {file_path} updated
66
+
67
+ Next steps:
68
+ Skill({ skill: "maestro-plan", args: "{next_phase}" }) -- Start next milestone's first phase
69
+ Skill({ skill: "manage-status" }) -- View project dashboard
70
+ ```
71
+
72
+ For `--dry-run`, print the computed version, changelog diff, and tag name without side effects.
73
+ </execution>
74
+
75
+ <error_codes>
76
+ | Code | Severity | Condition | Recovery |
77
+ |------|----------|-----------|----------|
78
+ | E001 | error | Current milestone not completed (no milestone-complete run) | Run Skill({ skill: "maestro-milestone-complete" }) first |
79
+ | E002 | error | Audit verdict not PASS | Re-run Skill({ skill: "maestro-milestone-audit" }) and resolve findings |
80
+ | E003 | error | Working tree not clean (uncommitted changes) | Commit or stash changes, then retry |
81
+ | E004 | error | Version manifest not found / unsupported | Add supported manifest or pass `<version>` explicitly with `--no-tag` |
82
+ | E005 | error | Target version not greater than current (would break semver monotonicity) | Choose a higher version or run with explicit `<version>` |
83
+ | W001 | warning | No changes detected since last release tag | Confirm whether release is still desired |
84
+ | W002 | warning | Remote push failed (network / auth) | Retry manually with `git push --follow-tags` |
85
+ </error_codes>
86
+
87
+ <success_criteria>
88
+ - [ ] Preconditions validated (milestone complete, audit PASS, clean tree)
89
+ - [ ] Target version computed and greater than previous
90
+ - [ ] Version manifest(s) updated with new version
91
+ - [ ] CHANGELOG.md contains new entry with milestone summary + grouped changes
92
+ - [ ] Release commit created with conventional message
93
+ - [ ] Annotated git tag created (unless `--no-tag`)
94
+ - [ ] Commit + tag pushed to remote (unless `--no-push` or push failed → W002)
95
+ - [ ] state.json updated with last_release_version + last_release_at timestamp
96
+ </success_criteria>
@@ -2,7 +2,15 @@
2
2
  name: maestro-phase-add
3
3
  description: Add or insert a new phase into the project roadmap with automatic renumbering
4
4
  argument-hint: "<slug> <title> [--after N]"
5
- allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion]
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
6
14
  ---
7
15
 
8
16
  <purpose>
@@ -2,7 +2,15 @@
2
2
  name: maestro-phase-transition
3
3
  description: Mark current or specified phase as complete, extract learnings, advance to next phase
4
4
  argument-hint: "[phase-number] [--force]"
5
- allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion]
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
6
14
  ---
7
15
 
8
16
  <purpose>
@@ -75,6 +75,12 @@ In auto mode, maestro also:
75
75
  - Skips chain confirmation (Step 5d)
76
76
  - Auto-skips on step errors (retry once, then skip and continue)
77
77
 
78
+ **Context window reminder:**
79
+
80
+ Before each Step 7 Skill() call, if context usage is near the window limit:
81
+ - `-y` active → print one-line warning and continue.
82
+ - Otherwise → stop before the next step and ask the user (Continue / Pause to resume with `-c` / Abort). Wait for explicit choice.
83
+
78
84
  **Report format on completion:**
79
85
 
80
86
  ```
@@ -1,50 +1,76 @@
1
- ---
2
- name: manage-codebase-rebuild
3
- description: Full rebuild of codebase documentation - scans project, builds doc-index.json, generates all tech-registry and feature-maps
4
- argument-hint: "[--force] [--skip-commit]"
5
- allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion]
6
- ---
7
-
8
- <purpose>
9
- Perform a full rebuild of the .workflow/codebase/ documentation system from scratch. Scans the entire project source to identify components, features, requirements, and ADRs, then spawns parallel workflow-codebase-mapper agents to generate all documentation artifacts. This is a destructive operation that overwrites existing codebase docs.
10
- </purpose>
11
-
12
- <required_reading>
13
- @~/.maestro/workflows/codebase-rebuild.md
14
- </required_reading>
15
-
16
- <context>
17
- $ARGUMENTS -- optional flags.
18
-
19
- **Flags:**
20
- - `--force` -- Skip confirmation prompt and proceed directly
21
- - `--skip-commit` -- Do not auto-commit after rebuild
22
-
23
- **State files:**
24
- - `.workflow/` -- must be initialized (project.md, state.json exist)
25
- - `.workflow/codebase/` -- target directory (will be cleared and rebuilt)
26
- - `.workflow/codebase/doc-index.json` -- generated documentation index
27
- </context>
28
-
29
- <execution>
30
- Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
31
- </execution>
32
-
33
- <error_codes>
34
- | Code | Severity | Condition | Recovery |
35
- |------|----------|-----------|----------|
36
- | E001 | error | .workflow/ not initialized | Run maestro-init first to create .workflow/ |
37
- | W001 | warning | A mapper agent failed (partial results) | Retry failed mapper or accept partial results |
38
- </error_codes>
39
-
40
- <success_criteria>
41
- - [ ] User confirmed rebuild (or --force used)
42
- - [ ] .workflow/codebase/ cleared and rebuilt from scratch
43
- - [ ] All 4 mapper agents spawned (failures logged as W001)
44
- - [ ] doc-index.json generated and valid
45
- - [ ] All documentation files regenerated
46
- - [ ] state.json updated with rebuild timestamp
47
- - [ ] project-tech.json refreshed with detected tech stack
48
- - [ ] project.md Tech Stack section updated if changes detected
49
- - [ ] Next step routing: Skill({ skill: "manage-status" }) or Skill({ skill: "manage-codebase-refresh" }) for incremental updates later
50
- </success_criteria>
1
+ ---
2
+ name: manage-codebase-rebuild
3
+ description: Full rebuild of codebase documentation - scans project, builds doc-index.json, generates all tech-registry and feature-maps
4
+ argument-hint: "[--focus <area>] [--force] [--skip-commit]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
14
+ ---
15
+
16
+ <purpose>
17
+ Perform a full rebuild of the .workflow/codebase/ documentation system from scratch. Scans the entire project source to identify components, features, requirements, and ADRs, then spawns parallel workflow-codebase-mapper agents to generate all documentation artifacts. This is a destructive operation that overwrites existing codebase docs.
18
+
19
+ Can run before or after Skill({ skill: "maestro-init" }) -- works on any codebase with source files. Also serves the previous `spec-map` use case via `--focus <area>` for scoped dimension analysis.
20
+ </purpose>
21
+
22
+ <required_reading>
23
+ @~/.maestro/workflows/codebase-rebuild.md
24
+ </required_reading>
25
+
26
+ <context>
27
+ $ARGUMENTS -- optional flags.
28
+
29
+ **Flags:**
30
+ - `--focus <area>` -- Scope mapper agents to a single domain (e.g., `auth`, `api`, `database`). When omitted, all 4 mappers run on the full codebase.
31
+ - `--force` -- Skip confirmation prompt and proceed directly
32
+ - `--skip-commit` -- Do not auto-commit after rebuild
33
+
34
+ **Mapper agent assignments (when `--focus` omitted):**
35
+ | Agent | Focus | Output file |
36
+ |-------|-------|-------------|
37
+ | Mapper 1 | **Tech stack** -- languages, frameworks, dependencies, build system | `tech-stack.md` |
38
+ | Mapper 2 | **Architecture** -- layers, module boundaries, data flow, entry points | `architecture.md` |
39
+ | Mapper 3 | **Features** -- capabilities, API surface, user-facing functionality | `features.md` |
40
+ | Mapper 4 | **Cross-cutting concerns** -- error handling, logging, auth, config, testing | `concerns.md` |
41
+
42
+ **State files:**
43
+ - `.workflow/` -- must be initialized (project.md, state.json exist)
44
+ - `.workflow/codebase/` -- target directory (will be cleared and rebuilt)
45
+ - `.workflow/codebase/doc-index.json` -- generated documentation index
46
+ </context>
47
+
48
+ <execution>
49
+ Follow '~/.maestro/workflows/codebase-rebuild.md' completely.
50
+
51
+ **When `--focus <area>` is set:** pass the area string to each mapper agent as scoping context; only regenerate the docs relevant to that scope (leave others untouched unless missing).
52
+
53
+ **Next-step routing on completion:**
54
+ - View updated project state → Skill({ skill: "manage-status" })
55
+ - Incremental updates later → Skill({ skill: "manage-codebase-refresh" })
56
+ </execution>
57
+
58
+ <error_codes>
59
+ | Code | Severity | Condition | Recovery |
60
+ |------|----------|-----------|----------|
61
+ | E001 | error | .workflow/ not initialized | Run maestro-init first to create .workflow/ |
62
+ | W001 | warning | A mapper agent failed (partial results) | Retry failed mapper or accept partial results |
63
+ | W002 | warning | `.workflow/codebase/` already exists -- user prompted for rebuild/skip | check_existing |
64
+ </error_codes>
65
+
66
+ <success_criteria>
67
+ - [ ] User confirmed rebuild (or --force used)
68
+ - [ ] .workflow/codebase/ cleared and rebuilt from scratch (or scoped subset when --focus set)
69
+ - [ ] All 4 mapper agents spawned (failures logged as W001)
70
+ - [ ] doc-index.json generated and valid
71
+ - [ ] All documentation files regenerated
72
+ - [ ] state.json updated with rebuild timestamp
73
+ - [ ] project-tech.json refreshed with detected tech stack
74
+ - [ ] project.md Tech Stack section updated if changes detected
75
+ - [ ] Next step routing: Skill({ skill: "manage-status" }) or Skill({ skill: "manage-codebase-refresh" }) for incremental updates later
76
+ </success_criteria>
@@ -2,7 +2,15 @@
2
2
  name: manage-codebase-refresh
3
3
  description: Incremental refresh of codebase docs based on recent changes
4
4
  argument-hint: "[--since <date>] [--deep]"
5
- allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion]
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
6
14
  ---
7
15
 
8
16
  <purpose>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: quality-refactor
3
3
  description: Tech debt reduction with reflection-driven iteration
4
- argument-hint: "[scope: module path, feature area, or 'all']"
4
+ argument-hint: "[<scope>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -2,7 +2,15 @@
2
2
  name: quality-sync
3
3
  description: Sync codebase docs after code changes - traces git diff through component/feature/requirement impact chain
4
4
  argument-hint: "[--full] [--since <commit|HEAD~N>] [--dry-run]"
5
- allowed-tools: [Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion]
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - AskUserQuestion
6
14
  ---
7
15
  <purpose>
8
16
  Synchronize project state after manual code changes or to refresh codebase documentation. Detects changes via git diff, traces impact through doc-index.json (file -> component -> feature -> requirement), updates state.json and index.json, and refreshes affected `.workflow/codebase/` documentation. Use --full flag for a complete resync of all tracked files regardless of git diff.
@@ -51,7 +51,7 @@ Follow '~/.maestro/workflows/specs-setup.md' completely.
51
51
  - [ ] `learnings.md` initialized with format instructions
52
52
  - [ ] `project-tech.json` written with detected tech stack
53
53
  - [ ] Report displayed with summary and next steps:
54
- - Build codebase docs → Skill({ skill: "spec-map" })
54
+ - Build codebase docs → Skill({ skill: "manage-codebase-rebuild" })
55
55
  - Load specs for task → Skill({ skill: "spec-load" })
56
56
  - Add new knowledge → Skill({ skill: "spec-add", args: "<type> <content>" })
57
57
  </success_criteria>
@@ -164,11 +164,25 @@ for (const step of state.steps.filter(s => s.status === 'pending')) {
164
164
  // Spawn step agent
165
165
  const agent = spawn_agent({ message: stepPrompt })
166
166
 
167
- // Wait — with timeout urge
168
- let result = wait_agent({ timeout_ms: 600000 })
167
+ // Wait — initial spawn: 30 min
168
+ let result = wait_agent({ timeout_ms: 1800000 })
169
169
  if (result.timed_out) {
170
- send_message({ target: agent, message: "Please wrap up and output your findings JSON now." })
171
- result = wait_agent({ timeout_ms: 600000 })
170
+ // Step 1: Status probe (non-interrupting, 3 min)
171
+ followup_task({ target: agent, message: "STATUS_CHECK: Report current progress, findings so far, and estimated remaining work." })
172
+ const status = wait_agent({ timeout_ms: 180000 })
173
+ if (status.timed_out) {
174
+ // Step 2: Force finalize (interrupt, 3 min)
175
+ followup_task({ target: agent, message: "FINALIZE: Output all current findings immediately. Time limit reached.", interrupt: true })
176
+ const forced = wait_agent({ timeout_ms: 180000 })
177
+ if (forced.timed_out) {
178
+ // Step 3: Abort
179
+ close_agent({ target: agent })
180
+ } else {
181
+ result = forced
182
+ }
183
+ } else {
184
+ result = status
185
+ }
172
186
  }
173
187
 
174
188
  // Parse structured output from agent
@@ -290,7 +304,7 @@ Resume: $maestro-coordinate --continue
290
304
  |------|----------|-----------|----------|
291
305
  | E001 | error | Intent unclassifiable after clarification | Default to `feature` chain; note in state.json |
292
306
  | E002 | error | `--chain` value not in chain map | List valid chains, abort |
293
- | E003 | error | Step agent timeout (both waits) | Mark step `failed`; skip remaining steps; suggest `--continue` |
307
+ | E003 | error | Step agent timeout (4-step cascade exhausted) | Mark step `failed`; skip remaining steps; suggest `--continue` |
294
308
  | E004 | error | Step agent failed (non-JSON output) | Mark step `failed`; preserve raw output in `findings`; skip remaining |
295
309
  | E005 | error | `--continue`: no session found | Glob `.workflow/.maestro-coordinate/MCC-*/`, list sessions, prompt |
296
310
  | W001 | warning | Step output JSON missing `hints_for_next` | Continue with empty hints; next step still gets `findings` |
@@ -306,5 +320,5 @@ Resume: $maestro-coordinate --continue
306
320
  5. **Skip on Failure**: Step failure immediately marks all remaining steps `skipped` and aborts the loop
307
321
  6. **Close before spawn**: Always `close_agent` the current step agent before spawning the next
308
322
  7. **Dry-run is read-only**: Stop after displaying the chain plan — never spawn agents
309
- 8. **Timeout handling**: One urge via `send_message`; if still timed out → mark `failed`
323
+ 8. **Timeout handling**: 4-step cascade status probe → force finalize → abort; if all timed out → mark `failed`
310
324
  9. **No CLI fallback**: All execution is agent-native — no `exec_command("maestro delegate ...")`
@@ -87,7 +87,7 @@ Identify: affected locations (file:line), caller/callee chains, data flow, exist
87
87
  EXPECTED: JSON with: affected_files [{file, line, snippet, relevance}], related_modules, error_handling_gaps, test_coverage_gaps.
88
88
  `
89
89
  })
90
- const ctxResult = wait_agent({ timeout_ms: 600000 })
90
+ const ctxResult = wait_agent({ timeout_ms: 1800000 }) // initial spawn: 30 min
91
91
  close_agent({ target: "ctx-explore" })
92
92
  ```
93
93
 
@@ -199,7 +199,7 @@ EXPECTED: Comprehensive artifact summary covering:
199
199
  - Key metrics: lines changed, test coverage, time taken
200
200
  `
201
201
  })
202
- wait_agent({ timeout_ms: 600000 })
202
+ wait_agent({ timeout_ms: 1800000 }) // initial spawn: 30 min
203
203
  ```
204
204
 
205
205
  **Step 4b: Fork 4 lens agents** (only active lenses based on `--lens` flag; default: all 4)
@@ -285,7 +285,7 @@ EXPECTED: Same JSON array schema as technical lens.
285
285
  })
286
286
 
287
287
  const lensResults = wait_agent({
288
- timeout_ms: 600000
288
+ timeout_ms: 1800000 // initial spawn: 30 min
289
289
  })
290
290
 
291
291
  // Close lenses first
@@ -323,7 +323,7 @@ EXPECTED: JSON with:
323
323
  `
324
324
  })
325
325
 
326
- const synthResult = wait_agent({ timeout_ms: 600000 })
326
+ const synthResult = wait_agent({ timeout_ms: 1800000 }) // initial spawn: 30 min
327
327
  close_agent({ target: "synthesizer" })
328
328
  ```
329
329
 
@@ -160,7 +160,7 @@ pipeline_phase: <pipeline-phase>
160
160
  })
161
161
  ```
162
162
 
163
- After spawning, use `wait_agent({ timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
163
+ After spawning, use `wait_agent({ timeout_ms: 1800000 })` to collect results (30 min). If `result.timed_out`, send STATUS_CHECK via followup_task (wait 3 min), then FINALIZE with interrupt (wait 3 min), then mark timed_out and close agents. Use `close_agent({ target: <name> })` each worker.
164
164
 
165
165
  **Inner Loop roles** (role has 2+ serial same-prefix tasks): Set `inner_loop: true`. The team-worker agent handles the loop internally.
166
166
 
@@ -226,7 +226,7 @@ Report blockers immediately via team_msg type="blocker".
226
226
  Report completion via team_msg type="task_complete" after report_agent_job_result.`
227
227
  })
228
228
  // Collect results — use task_name for stable targeting (v4):
229
- const result = wait_agent({ timeout_ms: 900000 })
229
+ const result = wait_agent({ timeout_ms: 1800000 }) // 30 min
230
230
 
231
231
  // Drain progress from message bus (before processing results)
232
232
  const progressMsgs = mcp__maestro-tools__team_msg({
@@ -237,15 +237,24 @@ for (const msg of (progressMsgs.result?.messages || [])) {
237
237
  }
238
238
 
239
239
  if (result.timed_out) {
240
- // Use progress trace for timeout forensics
241
- const lastProgress = (progressMsgs.result?.messages || [])
242
- .filter(m => m.data?.task_id === taskId).pop()
243
- state.tasks[taskId].status = 'timed_out'
244
- state.tasks[taskId].error = lastProgress
245
- ? `Timed out at ${lastProgress.data.phase} (${lastProgress.data.progress_pct}%)`
246
- : 'Timed out with no progress reported'
247
- close_agent({ target: taskId })
248
- // Report timeout, STOP — let user decide retry
240
+ // Status probe before closing
241
+ followup_task({ target: taskId, message: "STATUS_CHECK: Report current progress, findings so far, and estimated remaining work." })
242
+ const status = wait_agent({ timeout_ms: 180000 }) // 3 min
243
+ if (status.timed_out) {
244
+ followup_task({ target: taskId, message: "FINALIZE: Output all current findings immediately. Time limit reached.", interrupt: true })
245
+ const forced = wait_agent({ timeout_ms: 180000 }) // 3 min
246
+ if (forced.timed_out) {
247
+ const lastProgress = (progressMsgs.result?.messages || [])
248
+ .filter(m => m.data?.task_id === taskId).pop()
249
+ state.tasks[taskId].status = 'timed_out'
250
+ state.tasks[taskId].error = lastProgress
251
+ ? `Timed out at ${lastProgress.data.phase} (${lastProgress.data.progress_pct}%)`
252
+ : 'Timed out with no progress reported'
253
+ close_agent({ target: taskId })
254
+ }
255
+ // else: forced output received, process result
256
+ }
257
+ // else: status received, continue processing
249
258
  } else {
250
259
  // Process result, update tasks.json
251
260
  close_agent({ target: taskId }) // Use task_name, not agentId
@@ -31,7 +31,7 @@ OK: Write(".workflow/.team/TC-xxx/tasks.json", ...) — task management
31
31
  OK: Read("roles/coordinator/commands/analyze-task.md") — own instructions
32
32
  OK: Read("specs/role-spec-template.md") — generating role-specs
33
33
  OK: spawn_agent({ agent_type: "team_worker", ... }) — delegation
34
- OK: wait_agent({ timeout_ms: 900000 }) — monitoring
34
+ OK: wait_agent({ timeout_ms: 1800000 }) — monitoring (30 min)
35
35
  ```
36
36
 
37
37
  **Self-check gate**: After Phase 1 analysis, before ANY other action, ask yourself:
@@ -380,7 +380,7 @@ Delegate to `@commands/dispatch.md` which creates the full task chain:
380
380
 
381
381
  ### Message Semantics
382
382
  - **send_message**: Queue supplementary info to a running agent. Does NOT interrupt current processing. Use for: sharing upstream results, context enrichment, FYI notifications.
383
- - **followup_task**: Assign new work and trigger processing. Use for: waking idle agents, redirecting work, requesting new output.
383
+ - **followup_task**: Assign new work and trigger processing. Use for: waking idle agents, redirecting work, requesting new output, and status probing on timeout (STATUS_CHECK / FINALIZE cascade before closing timed-out agents).
384
384
 
385
385
  ### Agent Lifecycle Management
386
386
  - **list_agents({})**: Returns all running agents. Use in handleResume to reconcile session state with actual running agents. Use in handleComplete to verify clean shutdown.
@@ -132,7 +132,7 @@ pipeline_phase: <pipeline-phase>
132
132
  })
133
133
  ```
134
134
 
135
- After spawning, use `wait_agent({ timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
135
+ After spawning, use `wait_agent({ timeout_ms: 1800000 })` to collect results (30 min). If `result.timed_out`, send STATUS_CHECK via followup_task (wait 3 min), then FINALIZE with interrupt (wait 3 min), then mark timed_out and close agents. Use `close_agent({ target: <name> })` each worker.
136
136
 
137
137
  ---
138
138
 
@@ -189,7 +189,7 @@ After spawning all ready tasks:
189
189
  const agentIds = Object.values(state.active_agents)
190
190
  .filter(a => !a.resident)
191
191
  .map(a => a.agentId)
192
- const waitResult = wait_agent({ timeout_ms: 900000 })
192
+ const waitResult = wait_agent({ timeout_ms: 1800000 }) // 30 min
193
193
 
194
194
  // Drain progress from message bus
195
195
  const progressMsgs = mcp__maestro-tools__team_msg({
@@ -202,14 +202,25 @@ for (const msg of (progressMsgs.result?.messages || [])) {
202
202
  if (waitResult.timed_out) {
203
203
  for (const [taskId, agent] of Object.entries(state.active_agents)) {
204
204
  if (agent.resident) continue
205
- const lastProgress = (progressMsgs.result?.messages || [])
206
- .filter(m => m.data?.task_id === taskId).pop()
207
- state.tasks[taskId].status = 'timed_out'
208
- state.tasks[taskId].error = lastProgress
209
- ? `Timed out at ${lastProgress.data.phase} (${lastProgress.data.progress_pct}%)`
210
- : 'Timed out with no progress reported'
211
- close_agent({ target: agent.agentId })
212
- delete state.active_agents[taskId]
205
+ // Status probe before closing
206
+ followup_task({ target: taskId, message: "STATUS_CHECK: Report current progress, findings so far, and estimated remaining work." })
207
+ const status = wait_agent({ timeout_ms: 180000 }) // 3 min
208
+ if (status.timed_out) {
209
+ followup_task({ target: taskId, message: "FINALIZE: Output all current findings immediately. Time limit reached.", interrupt: true })
210
+ const forced = wait_agent({ timeout_ms: 180000 }) // 3 min
211
+ if (forced.timed_out) {
212
+ const lastProgress = (progressMsgs.result?.messages || [])
213
+ .filter(m => m.data?.task_id === taskId).pop()
214
+ state.tasks[taskId].status = 'timed_out'
215
+ state.tasks[taskId].error = lastProgress
216
+ ? `Timed out at ${lastProgress.data.phase} (${lastProgress.data.progress_pct}%)`
217
+ : 'Timed out with no progress reported'
218
+ close_agent({ target: agent.agentId })
219
+ delete state.active_agents[taskId]
220
+ }
221
+ // else: forced output received, process result
222
+ }
223
+ // else: status received, continue processing
213
224
  }
214
225
  } else {
215
226
  // Collect results from discoveries/{task_id}.json
@@ -153,7 +153,7 @@ task_id: <CHECKPOINT-NNN>
153
153
  scope: [<upstream-task-ids>]
154
154
  pipeline_progress: <done>/<total> tasks completed`
155
155
  })
156
- wait_agent({ timeout_ms: 600000 })
156
+ wait_agent({ timeout_ms: 1800000 }) // 30 min
157
157
  ```
158
158
 
159
159
  ### Shutdown (pipeline complete)
@@ -196,7 +196,7 @@ For each wave in the pipeline:
196
196
  3. **Build upstream context** -- For each task, gather findings from `context_from` tasks via tasks.json and `discoveries/{id}.json`
197
197
  4. **Separate task types** -- Split into regular tasks and CHECKPOINT tasks
198
198
  5. **Spawn regular tasks** -- For each regular task, call `spawn_agent({ agent_type: "team_worker", message: "..." })`, collect agent IDs
199
- 6. **Wait** -- `wait_agent({ timeout_ms: 900000 })`
199
+ 6. **Wait** -- `wait_agent({ timeout_ms: 1800000 })` (30 min). If `result.timed_out`, send STATUS_CHECK via followup_task (wait 3 min), then FINALIZE with interrupt (wait 3 min), then mark timed_out and close agents.
200
200
  7. **Collect results** -- Read `discoveries/{task_id}.json` for each agent, update tasks.json status/findings/error, then `close_agent({ target })` each worker
201
201
  8. **Execute checkpoints** -- For each CHECKPOINT task, `followup_task` to supervisor, `wait_agent`, read checkpoint report from `artifacts/`, parse verdict
202
202
  9. **Handle block** -- If verdict is `block`, prompt user via `request_user_input` with options: Override / Revise upstream / Abort