maestro-flow 0.3.4 → 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 (105) 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/maestro-init/SKILL.md +167 -167
  15. package/.codex/skills/maestro-phase-add/SKILL.md +154 -154
  16. package/.codex/skills/maestro-phase-transition/SKILL.md +173 -173
  17. package/.codex/skills/maestro-verify/SKILL.md +566 -566
  18. package/.codex/skills/manage-codebase-rebuild/SKILL.md +5 -5
  19. package/.codex/skills/manage-codebase-refresh/SKILL.md +5 -5
  20. package/.codex/skills/manage-issue/SKILL.md +7 -7
  21. package/.codex/skills/manage-issue-analyze/SKILL.md +8 -8
  22. package/.codex/skills/manage-issue-discover/SKILL.md +503 -503
  23. package/.codex/skills/manage-issue-execute/SKILL.md +9 -9
  24. package/.codex/skills/manage-issue-plan/SKILL.md +8 -8
  25. package/.codex/skills/manage-learn/SKILL.md +7 -7
  26. package/.codex/skills/manage-memory/SKILL.md +72 -72
  27. package/.codex/skills/manage-memory-capture/SKILL.md +86 -86
  28. package/.codex/skills/manage-status/SKILL.md +2 -2
  29. package/.codex/skills/quality-business-test/SKILL.md +8 -8
  30. package/.codex/skills/quality-debug/SKILL.md +5 -5
  31. package/.codex/skills/quality-integration-test/SKILL.md +544 -544
  32. package/.codex/skills/quality-refactor/SKILL.md +6 -6
  33. package/.codex/skills/quality-retrospective/SKILL.md +13 -13
  34. package/.codex/skills/quality-review/SKILL.md +408 -408
  35. package/.codex/skills/quality-sync/SKILL.md +6 -6
  36. package/.codex/skills/quality-test/SKILL.md +5 -5
  37. package/.codex/skills/quality-test-gen/SKILL.md +447 -447
  38. package/.codex/skills/spec-add/SKILL.md +5 -5
  39. package/.codex/skills/spec-load/SKILL.md +5 -5
  40. package/.codex/skills/spec-map/SKILL.md +5 -5
  41. package/.codex/skills/spec-setup/SKILL.md +2 -2
  42. package/.codex/skills/team-coordinate/SKILL.md +1 -1
  43. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +19 -10
  44. package/.codex/skills/team-coordinate/roles/coordinator/role.md +2 -2
  45. package/.codex/skills/team-executor/SKILL.md +1 -1
  46. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +20 -9
  47. package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -2
  48. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +31 -12
  49. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +1 -1
  50. package/.codex/skills/team-quality-assurance/SKILL.md +1 -1
  51. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +20 -9
  52. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +1 -1
  53. package/.codex/skills/team-review/SKILL.md +1 -1
  54. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +20 -9
  55. package/.codex/skills/team-review/roles/coordinator/role.md +1 -1
  56. package/.codex/skills/team-tech-debt/SKILL.md +1 -1
  57. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +20 -9
  58. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +1 -1
  59. package/.codex/skills/team-testing/SKILL.md +2 -2
  60. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +20 -9
  61. package/.codex/skills/team-testing/roles/coordinator/role.md +1 -1
  62. package/chains/singles/spec-map.json +2 -2
  63. package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.d.ts +4 -0
  64. package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.js +47 -1
  65. package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.js.map +1 -1
  66. package/dashboard/dist-server/src/commands/delegate.d.ts +23 -0
  67. package/dashboard/dist-server/src/commands/delegate.js +91 -55
  68. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  69. package/dist/src/brainstorm-visualize/frame.d.ts +8 -0
  70. package/dist/src/brainstorm-visualize/frame.d.ts.map +1 -0
  71. package/dist/src/brainstorm-visualize/frame.js +655 -0
  72. package/dist/src/brainstorm-visualize/frame.js.map +1 -0
  73. package/dist/src/brainstorm-visualize/server.d.ts +2 -0
  74. package/dist/src/brainstorm-visualize/server.d.ts.map +1 -0
  75. package/dist/src/brainstorm-visualize/server.js +180 -0
  76. package/dist/src/brainstorm-visualize/server.js.map +1 -0
  77. package/dist/src/cli.js +11 -1
  78. package/dist/src/cli.js.map +1 -1
  79. package/dist/src/commands/brainstorm-visualize.d.ts +3 -0
  80. package/dist/src/commands/brainstorm-visualize.d.ts.map +1 -0
  81. package/dist/src/commands/brainstorm-visualize.js +337 -0
  82. package/dist/src/commands/brainstorm-visualize.js.map +1 -0
  83. package/dist/src/commands/core-memory.d.ts +3 -0
  84. package/dist/src/commands/core-memory.d.ts.map +1 -0
  85. package/dist/src/commands/core-memory.js +101 -0
  86. package/dist/src/commands/core-memory.js.map +1 -0
  87. package/dist/src/commands/delegate.d.ts +23 -0
  88. package/dist/src/commands/delegate.d.ts.map +1 -1
  89. package/dist/src/commands/delegate.js +91 -55
  90. package/dist/src/commands/delegate.js.map +1 -1
  91. package/dist/src/commands/install-backend.d.ts.map +1 -1
  92. package/dist/src/commands/install-backend.js +5 -2
  93. package/dist/src/commands/install-backend.js.map +1 -1
  94. package/dist/src/mcp/delegate-channel-relay.d.ts.map +1 -1
  95. package/dist/src/mcp/delegate-channel-relay.js +6 -0
  96. package/dist/src/mcp/delegate-channel-relay.js.map +1 -1
  97. package/dist/src/mcp/server.d.ts.map +1 -1
  98. package/dist/src/mcp/server.js +28 -1
  99. package/dist/src/mcp/server.js.map +1 -1
  100. package/dist/src/tools/index.d.ts +1 -6
  101. package/dist/src/tools/index.d.ts.map +1 -1
  102. package/dist/src/tools/index.js +1 -460
  103. package/dist/src/tools/index.js.map +1 -1
  104. package/package.json +2 -1
  105. 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 ...")`