maestro-flow-one 0.1.0
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/LICENSE +21 -0
- package/README.md +173 -0
- package/bin/maestro-flow.js +730 -0
- package/claude/maestro-flow/SKILL.md +239 -0
- package/claude/maestro-flow/chains/templates.json +256 -0
- package/claude/maestro-flow/commands/learn/decompose.md +176 -0
- package/claude/maestro-flow/commands/learn/follow.md +167 -0
- package/claude/maestro-flow/commands/learn/investigate.md +221 -0
- package/claude/maestro-flow/commands/learn/retro.md +303 -0
- package/claude/maestro-flow/commands/learn/second-opinion.md +167 -0
- package/claude/maestro-flow/commands/lifecycle/amend.md +300 -0
- package/claude/maestro-flow/commands/lifecycle/analyze.md +126 -0
- package/claude/maestro-flow/commands/lifecycle/brainstorm.md +100 -0
- package/claude/maestro-flow/commands/lifecycle/composer.md +354 -0
- package/claude/maestro-flow/commands/lifecycle/execute.md +114 -0
- package/claude/maestro-flow/commands/lifecycle/fork.md +86 -0
- package/claude/maestro-flow/commands/lifecycle/init.md +78 -0
- package/claude/maestro-flow/commands/lifecycle/learn.md +140 -0
- package/claude/maestro-flow/commands/lifecycle/link-coordinate.md +71 -0
- package/claude/maestro-flow/commands/lifecycle/merge.md +61 -0
- package/claude/maestro-flow/commands/lifecycle/overlay.md +178 -0
- package/claude/maestro-flow/commands/lifecycle/plan.md +138 -0
- package/claude/maestro-flow/commands/lifecycle/player.md +404 -0
- package/claude/maestro-flow/commands/lifecycle/quick.md +56 -0
- package/claude/maestro-flow/commands/lifecycle/roadmap.md +164 -0
- package/claude/maestro-flow/commands/lifecycle/ui-design.md +93 -0
- package/claude/maestro-flow/commands/lifecycle/update.md +176 -0
- package/claude/maestro-flow/commands/lifecycle/verify.md +90 -0
- package/claude/maestro-flow/commands/manage/codebase-rebuild.md +75 -0
- package/claude/maestro-flow/commands/manage/codebase-refresh.md +57 -0
- package/claude/maestro-flow/commands/manage/harvest.md +94 -0
- package/claude/maestro-flow/commands/manage/issue-discover.md +77 -0
- package/claude/maestro-flow/commands/manage/issue.md +73 -0
- package/claude/maestro-flow/commands/manage/knowhow-capture.md +193 -0
- package/claude/maestro-flow/commands/manage/knowhow.md +77 -0
- package/claude/maestro-flow/commands/manage/learn.md +67 -0
- package/claude/maestro-flow/commands/manage/status.md +51 -0
- package/claude/maestro-flow/commands/manage/wiki.md +62 -0
- package/claude/maestro-flow/commands/milestone/audit.md +68 -0
- package/claude/maestro-flow/commands/milestone/complete.md +75 -0
- package/claude/maestro-flow/commands/milestone/release.md +96 -0
- package/claude/maestro-flow/commands/quality/auto-test.md +124 -0
- package/claude/maestro-flow/commands/quality/debug.md +115 -0
- package/claude/maestro-flow/commands/quality/refactor.md +55 -0
- package/claude/maestro-flow/commands/quality/retrospective.md +78 -0
- package/claude/maestro-flow/commands/quality/review.md +108 -0
- package/claude/maestro-flow/commands/quality/sync.md +51 -0
- package/claude/maestro-flow/commands/quality/test.md +103 -0
- package/claude/maestro-flow/commands/spec/add.md +49 -0
- package/claude/maestro-flow/commands/spec/load.md +51 -0
- package/claude/maestro-flow/commands/spec/remove.md +51 -0
- package/claude/maestro-flow/commands/spec/setup.md +51 -0
- package/claude/maestro-flow/commands/wiki/connect.md +62 -0
- package/claude/maestro-flow/commands/wiki/digest.md +69 -0
- package/codex/maestro-flow/SKILL.md +505 -0
- package/codex/maestro-flow/chains/templates.json +256 -0
- package/codex/maestro-flow/commands/learn/decompose.md +113 -0
- package/codex/maestro-flow/commands/learn/follow.md +83 -0
- package/codex/maestro-flow/commands/learn/investigate.md +83 -0
- package/codex/maestro-flow/commands/learn/retro.md +83 -0
- package/codex/maestro-flow/commands/learn/second-opinion.md +86 -0
- package/codex/maestro-flow/commands/lifecycle/amend.md +300 -0
- package/codex/maestro-flow/commands/lifecycle/analyze.md +483 -0
- package/codex/maestro-flow/commands/lifecycle/brainstorm.md +397 -0
- package/codex/maestro-flow/commands/lifecycle/composer.md +213 -0
- package/codex/maestro-flow/commands/lifecycle/execute.md +318 -0
- package/codex/maestro-flow/commands/lifecycle/fork.md +98 -0
- package/codex/maestro-flow/commands/lifecycle/init.md +134 -0
- package/codex/maestro-flow/commands/lifecycle/learn.md +80 -0
- package/codex/maestro-flow/commands/lifecycle/link-coordinate.md +257 -0
- package/codex/maestro-flow/commands/lifecycle/merge.md +69 -0
- package/codex/maestro-flow/commands/lifecycle/overlay.md +119 -0
- package/codex/maestro-flow/commands/lifecycle/plan.md +460 -0
- package/codex/maestro-flow/commands/lifecycle/player.md +323 -0
- package/codex/maestro-flow/commands/lifecycle/quick.md +124 -0
- package/codex/maestro-flow/commands/lifecycle/roadmap.md +468 -0
- package/codex/maestro-flow/commands/lifecycle/ui-design.md +135 -0
- package/codex/maestro-flow/commands/lifecycle/update.md +176 -0
- package/codex/maestro-flow/commands/lifecycle/verify.md +468 -0
- package/codex/maestro-flow/commands/manage/codebase-rebuild.md +347 -0
- package/codex/maestro-flow/commands/manage/codebase-refresh.md +66 -0
- package/codex/maestro-flow/commands/manage/harvest.md +91 -0
- package/codex/maestro-flow/commands/manage/issue-discover.md +431 -0
- package/codex/maestro-flow/commands/manage/issue.md +75 -0
- package/codex/maestro-flow/commands/manage/knowhow-capture.md +110 -0
- package/codex/maestro-flow/commands/manage/knowhow.md +95 -0
- package/codex/maestro-flow/commands/manage/learn.md +137 -0
- package/codex/maestro-flow/commands/manage/status.md +76 -0
- package/codex/maestro-flow/commands/manage/wiki.md +55 -0
- package/codex/maestro-flow/commands/milestone/audit.md +87 -0
- package/codex/maestro-flow/commands/milestone/complete.md +91 -0
- package/codex/maestro-flow/commands/milestone/release.md +70 -0
- package/codex/maestro-flow/commands/quality/auto-test.md +547 -0
- package/codex/maestro-flow/commands/quality/debug.md +334 -0
- package/codex/maestro-flow/commands/quality/refactor.md +151 -0
- package/codex/maestro-flow/commands/quality/retrospective.md +292 -0
- package/codex/maestro-flow/commands/quality/review.md +364 -0
- package/codex/maestro-flow/commands/quality/sync.md +111 -0
- package/codex/maestro-flow/commands/quality/test.md +498 -0
- package/codex/maestro-flow/commands/spec/add.md +101 -0
- package/codex/maestro-flow/commands/spec/load.md +77 -0
- package/codex/maestro-flow/commands/spec/remove.md +69 -0
- package/codex/maestro-flow/commands/spec/setup.md +75 -0
- package/codex/maestro-flow/commands/wiki/connect.md +73 -0
- package/codex/maestro-flow/commands/wiki/digest.md +87 -0
- package/package.json +24 -0
|
@@ -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 `/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 + `/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
|
+
/maestro-plan {next_phase} -- Start next milestone's first phase
|
|
69
|
+
/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 `/maestro-milestone-complete` first |
|
|
79
|
+
| E002 | error | Audit verdict not PASS | Re-run `/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>
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-auto-test
|
|
3
|
+
description: Unified automated testing via CSV layer pipeline — generates, executes, and iterates tests from PRD specs, coverage gaps, or code exploration
|
|
4
|
+
argument-hint: "<phase> [-y] [-c N] [--max-iter <N>] [--layer <L0-L3>] [--strategy <name>] [--dry-run] [--re-run]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- spawn_agents_on_csv
|
|
7
|
+
- Read
|
|
8
|
+
- Write
|
|
9
|
+
- Edit
|
|
10
|
+
- Bash
|
|
11
|
+
- Glob
|
|
12
|
+
- Grep
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Run unified automated testing via CSV layer pipeline. Reads project state to auto-select the optimal scenario source — PRD specs (when spec package exists), coverage gaps (when Nyquist audit found gaps), or code exploration (default). All sources converge into a CSV pipeline: discover infrastructure → plan → build scenarios.csv → write tests per layer (spawn_agents_on_csv parallel) → execute → diagnose failures (spawn_agents_on_csv parallel) → iterate → report.
|
|
17
|
+
|
|
18
|
+
Key mechanisms:
|
|
19
|
+
- **Intelligent routing**: Reads `.tests/`, `.workflow/.spec/`, `verification.json` to auto-select source — no mode flag needed
|
|
20
|
+
- **CSV parallel test writing**: Per-layer `spawn_agents_on_csv` — each agent writes one test file independently
|
|
21
|
+
- **CSV parallel failure diagnosis**: Failed scenarios dispatched via `spawn_agents_on_csv` for classification + fix
|
|
22
|
+
- **Unified iteration engine**: Nested inner loop (fix test_defects via diagnosis CSV, max 3/layer) + outer loop (adaptive strategy, max N iterations)
|
|
23
|
+
- **Layers as waves**: L0→L1→L2→L3 sequential (fail-fast on critical), scenarios within layer parallel
|
|
24
|
+
- **Discovery board**: `discoveries.ndjson` shared across all agents/iterations (append-only)
|
|
25
|
+
- **Degenerate modes**: `--max-iter 1` = single-pass generation; default = full iterative cycle
|
|
26
|
+
- **Session persistence**: CSV state + state.json survive context resets, resume from any point
|
|
27
|
+
</purpose>
|
|
28
|
+
|
|
29
|
+
<required_reading>
|
|
30
|
+
@~/.maestro/workflows/auto-test.md
|
|
31
|
+
</required_reading>
|
|
32
|
+
|
|
33
|
+
<context>
|
|
34
|
+
Phase or task: $ARGUMENTS (required — phase number)
|
|
35
|
+
|
|
36
|
+
**Flags:**
|
|
37
|
+
- `--max-iter N` — Maximum outer iterations (default: 5). Set to 1 for single-pass generation only.
|
|
38
|
+
- `--layer L` — Start from or restrict to specific layer (L0|L1|L2|L3)
|
|
39
|
+
- `--dry-run` — Generate test plan only, do not execute
|
|
40
|
+
- `--re-run` — Re-run only previously failed/blocked scenarios
|
|
41
|
+
|
|
42
|
+
**Intelligent routing** (auto-detected from project state):
|
|
43
|
+
|
|
44
|
+
| Priority | Condition | Route | Equivalent to |
|
|
45
|
+
|----------|-----------|-------|---------------|
|
|
46
|
+
| 1 | Active session exists (state.json status=running) | Resume | — |
|
|
47
|
+
| 2 | --re-run flag + previous failures | Re-run | — |
|
|
48
|
+
| 3 | Spec package exists (REQ-*.md) | spec | quality-business-test |
|
|
49
|
+
| 4 | Nyquist gaps exist (verification.json) | gap | quality-test-gen |
|
|
50
|
+
| 5 | Default | code | quality-integration-test |
|
|
51
|
+
|
|
52
|
+
Flags, artifact context resolution, and output formats defined in workflow auto-test.md.
|
|
53
|
+
</context>
|
|
54
|
+
|
|
55
|
+
<execution>
|
|
56
|
+
Follow '~/.maestro/workflows/auto-test.md' completely.
|
|
57
|
+
|
|
58
|
+
**Command-specific extensions (not in workflow):**
|
|
59
|
+
|
|
60
|
+
**Review findings integration** (from related review artifacts):
|
|
61
|
+
- Extract critical/high findings as additional test scenarios, marked `source: "review_finding"`
|
|
62
|
+
- When review verdict is "BLOCK" and review-finding tests fail, suggest quality-debug
|
|
63
|
+
|
|
64
|
+
**Debug root cause integration** (from related debug artifacts):
|
|
65
|
+
- Generate regression test scenarios from confirmed root causes, marked `source: "debug_root_cause"`
|
|
66
|
+
|
|
67
|
+
**Register artifact on completion:**
|
|
68
|
+
```
|
|
69
|
+
Append to state.json.artifacts[]:
|
|
70
|
+
{
|
|
71
|
+
id: nextArtifactId(artifacts, "test"), // TST-001
|
|
72
|
+
type: "test",
|
|
73
|
+
milestone: current_milestone,
|
|
74
|
+
phase: target_phase,
|
|
75
|
+
scope: "phase",
|
|
76
|
+
path: "scratch/{YYYYMMDD}-auto-test-P{N}-{slug}",
|
|
77
|
+
status: issues == 0 ? "completed" : "failed",
|
|
78
|
+
depends_on: exec_art.id,
|
|
79
|
+
harvested: false,
|
|
80
|
+
created_at: start_time,
|
|
81
|
+
completed_at: now()
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Next-step routing on completion:**
|
|
86
|
+
- Converged (>=95%) → `/maestro-verify {phase}`
|
|
87
|
+
- All requirements verified (spec source) → `/maestro-milestone-audit`
|
|
88
|
+
- Bugs discovered → `/quality-debug --from-auto-test {phase}`
|
|
89
|
+
- Max iter, >80% → `/quality-test {phase}` for manual UAT
|
|
90
|
+
- Max iter, <80% → `/quality-debug {phase}`
|
|
91
|
+
- Coverage still low → `/quality-auto-test {phase} --layer {missing}`
|
|
92
|
+
- Re-run all pass → `/maestro-verify {phase}`
|
|
93
|
+
- Single pass, all pass → `/quality-test {phase}`
|
|
94
|
+
</execution>
|
|
95
|
+
|
|
96
|
+
<error_codes>
|
|
97
|
+
| Code | Severity | Condition | Recovery |
|
|
98
|
+
|------|----------|-----------|----------|
|
|
99
|
+
| E001 | error | Phase argument required (no active sessions) | Prompt user for phase number |
|
|
100
|
+
| E002 | error | Phase not found in artifact registry | Check state.json artifacts |
|
|
101
|
+
| E003 | error | No test framework detected | Install test framework or configure test runner |
|
|
102
|
+
| W001 | warning | One or more test scenarios failed | Auto-iterate or suggest fix options |
|
|
103
|
+
| W002 | warning | Max iterations reached without convergence | Review reflection-log.md, suggest debug |
|
|
104
|
+
| W003 | warning | Degraded spec mode (no full spec package) | Consider running maestro-roadmap --mode full |
|
|
105
|
+
</error_codes>
|
|
106
|
+
|
|
107
|
+
<success_criteria>
|
|
108
|
+
- [ ] Phase resolved from artifact registry
|
|
109
|
+
- [ ] Route auto-selected from project state (spec/gap/code)
|
|
110
|
+
- [ ] Active sessions checked, resume offered if applicable
|
|
111
|
+
- [ ] Scenarios extracted and normalized to unified format
|
|
112
|
+
- [ ] Test infrastructure discovered (framework, patterns, conventions)
|
|
113
|
+
- [ ] test-plan.json generated with layer distribution
|
|
114
|
+
- [ ] User confirmed plan (or --dry-run stopped here)
|
|
115
|
+
- [ ] Tests written following RED-GREEN methodology and existing patterns
|
|
116
|
+
- [ ] Tests executed progressively (L0→L3) with fail-fast on critical
|
|
117
|
+
- [ ] Iteration engine ran (inner: test_defect fix, outer: strategy adjust)
|
|
118
|
+
- [ ] state.json, report.json, reflection-log.md written
|
|
119
|
+
- [ ] index.json updated with auto_test section
|
|
120
|
+
- [ ] If spec source: traceability matrix built, traceability.md written
|
|
121
|
+
- [ ] If failures: issues auto-created in issues.jsonl
|
|
122
|
+
- [ ] If gap source: validation.json gaps updated (MISSING→COVERED)
|
|
123
|
+
- [ ] Next step routed based on convergence status
|
|
124
|
+
</success_criteria>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-debug
|
|
3
|
+
description: Parallel hypothesis-driven debugging with UAT integration and structured root cause collection
|
|
4
|
+
argument-hint: "[issue description] [--from-uat <phase>] [--parallel]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Debug issues using scientific method with subagent isolation and persistent debug state. Three entry modes (standalone, from-UAT, parallel) and structured root cause collection with UAT feedback loop. Full algorithm defined in workflow debug.md.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
@~/.maestro/workflows/debug.md
|
|
21
|
+
</required_reading>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
User's issue: $ARGUMENTS
|
|
25
|
+
|
|
26
|
+
**Flags:**
|
|
27
|
+
- `--from-uat <phase>` -- Read gaps from phase's uat.md as pre-filled symptoms
|
|
28
|
+
- `--parallel` -- Spawn parallel debug agents (one per gap cluster)
|
|
29
|
+
|
|
30
|
+
**All context via state.json.artifacts[]:**
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
related = artifacts.filter(a =>
|
|
34
|
+
a.phase === target_phase && a.milestone === current_milestone
|
|
35
|
+
).sort_by(completed_at asc)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Each artifact's type determines its outputs at `.workflow/{a.path}/`:
|
|
39
|
+
- **execute** → .summaries/, .task/ (source of code changes)
|
|
40
|
+
- **review** → review.json (findings guide hypothesis formation)
|
|
41
|
+
- **debug** → understanding.md, evidence.ndjson (prior investigations, avoid re-investigation)
|
|
42
|
+
- **test** → uat.md (--from-uat gap source), .tests/
|
|
43
|
+
|
|
44
|
+
Extract conclusions from related artifacts that may affect this debug session — review findings guide investigation direction, prior debug avoids redundant work.
|
|
45
|
+
|
|
46
|
+
**Output**: `DEBUG_DIR = .workflow/scratch/{YYYYMMDD}-debug-P{N}-{slug}/` (P{N} = phase number when phase-scoped; omit for standalone). Output directory rules defined in workflow debug.md Step 4.
|
|
47
|
+
</context>
|
|
48
|
+
|
|
49
|
+
<execution>
|
|
50
|
+
Follow '~/.maestro/workflows/debug.md' completely.
|
|
51
|
+
|
|
52
|
+
**Register artifact on completion (phase-scoped only):**
|
|
53
|
+
```
|
|
54
|
+
Append to state.json.artifacts[]:
|
|
55
|
+
{
|
|
56
|
+
id: nextArtifactId(artifacts, "debug"), // DBG-001
|
|
57
|
+
type: "debug",
|
|
58
|
+
milestone: current_milestone,
|
|
59
|
+
phase: target_phase,
|
|
60
|
+
scope: "phase",
|
|
61
|
+
path: "scratch/{YYYYMMDD}-debug-P{N}-{slug}",
|
|
62
|
+
status: all_diagnosed ? "completed" : "failed",
|
|
63
|
+
depends_on: triggering_review_id || exec_art.id,
|
|
64
|
+
harvested: false,
|
|
65
|
+
created_at: start_time,
|
|
66
|
+
completed_at: now()
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Post-debug Knowledge Inquiry
|
|
71
|
+
|
|
72
|
+
After root cause is confirmed, evaluate inquiry triggers:
|
|
73
|
+
|
|
74
|
+
1. **Recurring pattern**: If root cause matches a recurring pattern (similar to prior debug sessions):
|
|
75
|
+
→ Ask: "This root cause pattern has appeared before. Should it be documented in `debug-notes.md` to prevent recurrence? (`/spec-add debug`)"
|
|
76
|
+
|
|
77
|
+
2. **Non-obvious fix**: If fix involved a non-obvious approach or workaround:
|
|
78
|
+
→ Ask: "This fix used a non-obvious strategy. Should it be recorded as a learning? (`/spec-add learning`)"
|
|
79
|
+
|
|
80
|
+
3. **Architectural gap**: If root cause traces to architectural boundary violation or missing constraint:
|
|
81
|
+
→ Ask: "Root cause points to an architectural gap. Should `architecture-constraints.md` be updated? (`/spec-add arch`)"
|
|
82
|
+
|
|
83
|
+
If user confirms, invoke `Skill({ skill: "maestro-flow", args: "--cmd spec-add <category> <content>" })`.
|
|
84
|
+
|
|
85
|
+
**Next-step routing on completion:**
|
|
86
|
+
- Root cause found, fix needed → `/maestro-plan {phase} --gaps`
|
|
87
|
+
- Root cause found (from UAT), auto-fix → `/quality-test {phase} --auto-fix`
|
|
88
|
+
- Inconclusive, need more info → `/quality-debug {issue} -c` (resume session)
|
|
89
|
+
- Standalone fix already applied → `/maestro-verify {phase}`
|
|
90
|
+
</execution>
|
|
91
|
+
|
|
92
|
+
<error_codes>
|
|
93
|
+
| Code | Severity | Condition | Recovery |
|
|
94
|
+
|------|----------|-----------|----------|
|
|
95
|
+
| E001 | error | Issue description required (no arguments, no active sessions) | Check arguments format, re-run with correct input |
|
|
96
|
+
| E002 | error | UAT file not found for --from-uat phase | Verify UAT file exists for specified phase |
|
|
97
|
+
| W001 | warning | Existing debug session found, offer resume | Review existing sessions, choose resume or new |
|
|
98
|
+
| W002 | warning | Checkpoint reached, user input needed | Provide requested input to continue |
|
|
99
|
+
| W003 | warning | Some gaps inconclusive, partial diagnosis | Review partial results, retry inconclusive gaps |
|
|
100
|
+
</error_codes>
|
|
101
|
+
|
|
102
|
+
<success_criteria>
|
|
103
|
+
- [ ] Input parsed: standalone, --from-uat, or --parallel mode determined
|
|
104
|
+
- [ ] Active sessions checked and resume offered if applicable
|
|
105
|
+
- [ ] Symptoms gathered (interactive) or loaded from UAT (pre-filled)
|
|
106
|
+
- [ ] Debug output directory created (phase .debug/ or scratch/)
|
|
107
|
+
- [ ] Debug agent(s) spawned with full symptom context
|
|
108
|
+
- [ ] If --parallel: one agent per gap cluster, all concurrent
|
|
109
|
+
- [ ] evidence.ndjson written with structured NDJSON entries
|
|
110
|
+
- [ ] understanding.md tracks evolving understanding per cluster
|
|
111
|
+
- [ ] Root causes collected with fix_direction and affected_files
|
|
112
|
+
- [ ] If --from-uat: uat.md gaps updated with diagnosis artifacts
|
|
113
|
+
- [ ] Results unified into diagnosis summary
|
|
114
|
+
- [ ] Next step routed (plan --gaps + execute if fix needed, verify if fix applied, resume if inconclusive)
|
|
115
|
+
</success_criteria>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-refactor
|
|
3
|
+
description: Tech debt reduction with reflection-driven iteration
|
|
4
|
+
argument-hint: "[<scope>]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Task
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Plan and execute targeted refactoring with safety guarantees through analysis, planning, and reflection-driven iteration. Identifies affected files and dependencies, creates a refactoring plan, confirms with the user before execution, then applies changes with test verification after every modification to ensure zero regressions. Each refactoring round records strategy, outcome, and adjustments in reflection-log.md.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
@~/.maestro/workflows/refactor.md
|
|
21
|
+
</required_reading>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
Scope: $ARGUMENTS (required)
|
|
25
|
+
- Module path: "src/auth" - specific directory
|
|
26
|
+
- Feature area: "authentication" - conceptual scope
|
|
27
|
+
- "all" - full codebase scan
|
|
28
|
+
|
|
29
|
+
If not provided, prompt user for scope.
|
|
30
|
+
</context>
|
|
31
|
+
|
|
32
|
+
<execution>
|
|
33
|
+
Follow '~/.maestro/workflows/refactor.md' completely.
|
|
34
|
+
|
|
35
|
+
**Next-step routing on completion:**
|
|
36
|
+
- All tests pass → `/quality-sync` (update codebase docs)
|
|
37
|
+
- Test failures after refactor → `/quality-debug {scope}`
|
|
38
|
+
- No test suite available → `/quality-auto-test {phase}`
|
|
39
|
+
</execution>
|
|
40
|
+
|
|
41
|
+
<error_codes>
|
|
42
|
+
| Code | Severity | Condition | Recovery |
|
|
43
|
+
|------|----------|-----------|----------|
|
|
44
|
+
| E001 | error | Refactoring scope/description required | Prompt user for module path, feature area, or "all" |
|
|
45
|
+
| E002 | error | Test suite not available for affected area | Suggest creating tests first, or proceed with manual verification |
|
|
46
|
+
| W001 | warning | Partial test coverage for affected area | Note uncovered areas, proceed with extra caution |
|
|
47
|
+
</error_codes>
|
|
48
|
+
|
|
49
|
+
<success_criteria>
|
|
50
|
+
- [ ] Refactoring plan created and confirmed by user
|
|
51
|
+
- [ ] Changes implemented according to plan
|
|
52
|
+
- [ ] All tests pass after refactoring
|
|
53
|
+
- [ ] No regressions introduced
|
|
54
|
+
- [ ] reflection-log.md written with strategy and outcomes
|
|
55
|
+
</success_criteria>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-retrospective
|
|
3
|
+
description: Multi-lens 复盘 of completed phase(s); routes insights to spec/note/issue stores and the lessons library
|
|
4
|
+
argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [-y]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Post-execution multi-perspective retrospective (复盘) for completed phases. Consumes existing execution artifacts (verification.json, review.json, issues.jsonl, plan.json, .summaries/, uat.md, state.json) and runs four parallel lenses — technical, process, quality, decision — to distill reusable insights. Routes each insight into the appropriate store: spec stub for reusable patterns, memory tip for process notes, issue for recurring gaps. Auto-scans for unreviewed completed phases and reports the backlog. Every insight is also persisted to `.workflow/learning/lessons.jsonl` for cross-phase queryability.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
@~/.maestro/workflows/retrospective.md
|
|
21
|
+
</required_reading>
|
|
22
|
+
|
|
23
|
+
<deferred_reading>
|
|
24
|
+
- @~/.maestro/workflows/issue.md (issues.jsonl schema for auto-creation)
|
|
25
|
+
- @~/.maestro/workflows/learn.md (tip routing via manage-learn tip)
|
|
26
|
+
- @~/.maestro/workflows/verify.md (verification.json schema for quality lens parsing)
|
|
27
|
+
- @~/.maestro/workflows/review.md (review.json schema for quality lens parsing)
|
|
28
|
+
</deferred_reading>
|
|
29
|
+
|
|
30
|
+
<context>
|
|
31
|
+
Arguments: $ARGUMENTS
|
|
32
|
+
|
|
33
|
+
Modes (scan/single/range/all), flags (--lens, --no-route, --compare, -y), and storage paths defined in workflow retrospective.md Argument Shape and Stages 1-7.
|
|
34
|
+
</context>
|
|
35
|
+
|
|
36
|
+
<execution>
|
|
37
|
+
Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order. Key invariants:
|
|
38
|
+
|
|
39
|
+
1. **Read-only until Stage 6** — Stages 1–5 must not write anything except the in-memory retrospective record.
|
|
40
|
+
2. **Parallel lens dispatch** — Stage 4 spawns one Agent per active lens in a single message (multiple Agent tool calls). All agents use `subagent_type: "general-purpose"` and `run_in_background: false`.
|
|
41
|
+
3. **Match canonical issues schema** — Stage 6 issue routing must produce rows that pass `jq` parsing and match the schema in `workflows/issue.md` Step 4 exactly (status `"open"`, full `issue_history` entry, all required fields).
|
|
42
|
+
4. **Reuse `manage-learn tip` for note routing** — do not duplicate the learning pipeline; invoke via `Skill({ skill: "maestro-flow", args: "--cmd manage-learn tip ..." })`.
|
|
43
|
+
5. **Backward-compat with phase-transition** — append a one-line summary per insight to `.workflow/specs/learnings.md` if and only if that file already exists. Never create it.
|
|
44
|
+
6. **Stable insight IDs** — `INS-{8 hex}` from `hash(phase_num + lens + title)` so re-runs do not duplicate.
|
|
45
|
+
7. **Archive before overwrite** — if existing `retrospective.{md,json}` are being replaced, move them to `{artifact_dir}/.history/` with a timestamp suffix first.
|
|
46
|
+
</execution>
|
|
47
|
+
|
|
48
|
+
<error_codes>
|
|
49
|
+
| Code | Severity | Description | Stage |
|
|
50
|
+
|------|----------|-------------|-------|
|
|
51
|
+
| E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
|
|
52
|
+
| E002 | error | Unknown `--lens` name (allowed: technical, process, quality, decision) | parse_input |
|
|
53
|
+
| E003 | error | `--compare` requires a single phase argument | parse_input |
|
|
54
|
+
| E004 | error | Phase has not executed yet — no `.task/` or `.summaries/` artifacts | load_artifacts |
|
|
55
|
+
| E005 | error | Phase argument out of range / phase directory not found | scan_unreviewed |
|
|
56
|
+
| W001 | warning | One or more lens agents failed — proceeding with partial coverage | multi_lens_analysis |
|
|
57
|
+
| W002 | warning | Existing retrospective.json found and not `--all` — prompted user to overwrite | scan_unreviewed |
|
|
58
|
+
| W003 | warning | `manage-learn tip` did not return parseable INS id; fell back to direct write | route_outputs |
|
|
59
|
+
| W004 | warning | `--compare` target phase has no retrospective.json; delta omitted | load_artifacts |
|
|
60
|
+
</error_codes>
|
|
61
|
+
|
|
62
|
+
<success_criteria>
|
|
63
|
+
- [ ] Mode correctly resolved (scan / single / range / all)
|
|
64
|
+
- [ ] At least one phase selected and validated (status == "completed", artifacts exist)
|
|
65
|
+
- [ ] All requested lens agents returned valid JSON, or W001 logged for partial coverage
|
|
66
|
+
- [ ] `retrospective.json` written with metrics, findings_by_lens, distilled_insights, routing_recommendations
|
|
67
|
+
- [ ] `retrospective.md` written and human-readable (tweetable, metrics table, per-lens findings, insights, routing table)
|
|
68
|
+
- [ ] Each insight has a stable `INS-{8hex}` id
|
|
69
|
+
- [ ] If routing enabled (default): every recommendation either created an artifact or was explicitly skipped by user
|
|
70
|
+
- [ ] Spec entries (if any) appended as `<spec-entry>` to matching `.workflow/specs/{category-file}.md`
|
|
71
|
+
- [ ] Issue rows (if any) match canonical issues.jsonl schema (status "open", full issue_history, all required fields)
|
|
72
|
+
- [ ] Note tips (if any) created via `Skill({ skill: "maestro-flow", args: "--cmd manage-learn tip ..." })`
|
|
73
|
+
- [ ] `lessons.jsonl` appended with one row per insight regardless of routing target
|
|
74
|
+
- [ ] `learning-index.json` updated and parseable
|
|
75
|
+
- [ ] No existing phase artifacts modified (verification.json, review.json, plan.json untouched)
|
|
76
|
+
- [ ] Confirmation banner displays routing counts and next-step suggestions
|
|
77
|
+
- [ ] Next step: `/manage-status` to review state, or `/manage-issue list --source retrospective` to triage created issues, or `/manage-learn list` to browse the lessons library
|
|
78
|
+
</success_criteria>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-review
|
|
3
|
+
description: Tiered code review (quick/standard/deep) with parallel agents, severity classification, and auto-issue creation
|
|
4
|
+
argument-hint: "<phase> [--level quick|standard|deep] [--dimensions security,architecture,...] [--skip-specs]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
16
|
+
Run multi-dimensional code review on a completed phase's changed files. Answers the question "is this code good?" -- complementing maestro-verify ("is the goal met?") and quality-test ("does it work for users?"). Three review levels (quick/standard/deep) scale with task depth, auto-detected from file count. Level definitions, dimension lists, deep-dive rules, and issue creation thresholds defined in workflow review.md.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
@~/.maestro/workflows/review.md
|
|
21
|
+
</required_reading>
|
|
22
|
+
|
|
23
|
+
<deferred_reading>
|
|
24
|
+
- [index.json](~/.maestro/templates/index.json) — read when updating phase index after review
|
|
25
|
+
</deferred_reading>
|
|
26
|
+
|
|
27
|
+
<context>
|
|
28
|
+
Phase: $ARGUMENTS (required — phase number or slug)
|
|
29
|
+
|
|
30
|
+
**Flags:**
|
|
31
|
+
- `--level quick|standard|deep` — Explicit review level (default: auto-detect from file count)
|
|
32
|
+
- `--dimensions <list>` — Comma-separated subset of dimensions to review (overrides level defaults)
|
|
33
|
+
- `--skip-specs` — Skip loading project specs as review context
|
|
34
|
+
|
|
35
|
+
**All context via state.json.artifacts[]:**
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
related = artifacts.filter(a =>
|
|
39
|
+
a.phase === target_phase && a.milestone === current_milestone
|
|
40
|
+
).sort_by(completed_at asc)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Each artifact's type determines its outputs at `.workflow/{a.path}/`:
|
|
44
|
+
- **execute** → .summaries/, .task/, verification.json, plan.json (source of files to review)
|
|
45
|
+
- **review** → review.json (prior verdict, findings — for delta comparison)
|
|
46
|
+
- **debug** → understanding.md, evidence.ndjson (confirmed root causes)
|
|
47
|
+
- **test** → uat.md, .tests/ (user-observable gaps)
|
|
48
|
+
|
|
49
|
+
Extract conclusions from related artifacts that may affect this review. Pass as prior quality context to reviewer agents — avoid redundant work, focus on gaps and regressions.
|
|
50
|
+
|
|
51
|
+
**Output**: `REVIEW_DIR = .workflow/scratch/{YYYYMMDD}-review-P{N}-{slug}/` (P{N} = phase number, enables directory-level identification as state.json fallback)
|
|
52
|
+
</context>
|
|
53
|
+
|
|
54
|
+
<execution>
|
|
55
|
+
Follow '~/.maestro/workflows/review.md' completely.
|
|
56
|
+
|
|
57
|
+
**Output writes to REVIEW_DIR** (not EXEC_DIR):
|
|
58
|
+
- `REVIEW_DIR/review.json` — findings, severity distribution, verdict
|
|
59
|
+
|
|
60
|
+
**Register artifact on completion:**
|
|
61
|
+
```
|
|
62
|
+
Append to state.json.artifacts[]:
|
|
63
|
+
{
|
|
64
|
+
id: nextArtifactId(artifacts, "review"), // REV-001
|
|
65
|
+
type: "review",
|
|
66
|
+
milestone: current_milestone,
|
|
67
|
+
phase: target_phase,
|
|
68
|
+
scope: "phase",
|
|
69
|
+
path: "scratch/{YYYYMMDD}-review-P{N}-{slug}", // relative to .workflow/
|
|
70
|
+
status: "completed",
|
|
71
|
+
depends_on: exec_art.id, // or prior debug/review if re-review
|
|
72
|
+
harvested: false,
|
|
73
|
+
created_at: start_time,
|
|
74
|
+
completed_at: now()
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Report format and next-step routing by verdict defined in workflow review.md Report Format and Next Step Routing sections.
|
|
79
|
+
|
|
80
|
+
**Next-step routing summary:**
|
|
81
|
+
- PASS → `/quality-test {phase}`
|
|
82
|
+
- WARN → `/quality-test {phase}` (proceed with caveats)
|
|
83
|
+
- BLOCK → `/maestro-plan {phase} --gaps` (fix critical findings first)
|
|
84
|
+
</execution>
|
|
85
|
+
|
|
86
|
+
<error_codes>
|
|
87
|
+
| Code | Severity | Condition | Recovery |
|
|
88
|
+
|------|----------|-----------|----------|
|
|
89
|
+
| E001 | error | Phase argument required | Check arguments format, re-run with correct input |
|
|
90
|
+
| E002 | error | Phase directory not found | Check arguments format, re-run with correct input |
|
|
91
|
+
| E003 | error | No execution results found (no task summaries) | Verify execution completed with task summaries |
|
|
92
|
+
| E004 | error | No changed files detected in phase | Verify execution completed with task summaries |
|
|
93
|
+
| W001 | warning | Some dimension agents failed, partial results | Retry failed dimensions or accept partial results |
|
|
94
|
+
| W002 | warning | Deep-dive iteration limit reached with unresolved criticals | Accept current findings or escalate manually |
|
|
95
|
+
</error_codes>
|
|
96
|
+
|
|
97
|
+
<success_criteria>
|
|
98
|
+
- [ ] Phase resolved and changed files collected from task summaries
|
|
99
|
+
- [ ] Review level determined (explicit flag or auto-detected)
|
|
100
|
+
- [ ] Project specs loaded as review context (unless --skip-specs)
|
|
101
|
+
- [ ] Dimension reviews executed (inline for quick, parallel agents for standard/deep)
|
|
102
|
+
- [ ] All dimension results aggregated with severity classification
|
|
103
|
+
- [ ] Deep-dive completed if triggered (standard: auto, deep: forced)
|
|
104
|
+
- [ ] review.json written with complete findings, severity distribution, verdict
|
|
105
|
+
- [ ] Issues auto-created based on level thresholds
|
|
106
|
+
- [ ] index.json updated with review status
|
|
107
|
+
- [ ] Next step routed by verdict (PASS→test, WARN→test with caveats, BLOCK→plan --gaps)
|
|
108
|
+
</success_criteria>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-sync
|
|
3
|
+
description: Sync codebase docs after code changes - traces git diff through component/feature/requirement impact chain
|
|
4
|
+
argument-hint: "[--full] [--since <commit|HEAD~N>] [--dry-run]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Glob
|
|
11
|
+
- Grep
|
|
12
|
+
- Agent
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<purpose>
|
|
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.
|
|
17
|
+
</purpose>
|
|
18
|
+
|
|
19
|
+
<required_reading>
|
|
20
|
+
@~/.maestro/workflows/sync.md
|
|
21
|
+
</required_reading>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
$ARGUMENTS -- optional flags:
|
|
25
|
+
- `--full` -- Complete resync of all tracked files (ignores git diff, rebuilds all docs)
|
|
26
|
+
- `--since <commit|HEAD~N>` -- Diff since specific commit (default: last sync timestamp)
|
|
27
|
+
- `--dry-run` -- Show what would be updated without writing changes
|
|
28
|
+
</context>
|
|
29
|
+
|
|
30
|
+
<execution>
|
|
31
|
+
Follow '~/.maestro/workflows/sync.md' completely.
|
|
32
|
+
|
|
33
|
+
**Next-step routing on completion:**
|
|
34
|
+
- Docs refreshed → `/manage-status`
|
|
35
|
+
- Major structural changes detected → `/manage-codebase-rebuild` (full rebuild recommended)
|
|
36
|
+
</execution>
|
|
37
|
+
|
|
38
|
+
<error_codes>
|
|
39
|
+
| Code | Severity | Condition | Recovery |
|
|
40
|
+
|------|----------|-----------|----------|
|
|
41
|
+
| E001 | error | .workflow/ not initialized | Suggest running `/maestro-init` first|
|
|
42
|
+
| W001 | warning | No changes detected since last sync | Report clean state, skip updates |
|
|
43
|
+
</error_codes>
|
|
44
|
+
|
|
45
|
+
<success_criteria>
|
|
46
|
+
- [ ] state.json updated with current sync timestamp
|
|
47
|
+
- [ ] Codebase docs refreshed for all affected components
|
|
48
|
+
- [ ] doc-index.json reflects current file state
|
|
49
|
+
- [ ] Changes tracked and logged
|
|
50
|
+
- [ ] project.md Tech Stack section refreshed if dependency manifests changed
|
|
51
|
+
</success_criteria>
|