maestro-flow 0.4.17 → 0.4.19
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/.agents/skills/maestro/SKILL.md +1 -1
- package/.agents/skills/maestro-analyze/SKILL.md +5 -0
- package/.agents/skills/maestro-blueprint/SKILL.md +5 -0
- package/.agents/skills/maestro-brainstorm/SKILL.md +5 -0
- package/.agents/skills/maestro-next/SKILL.md +254 -0
- package/.agents/skills/team-swarm/SKILL.md +180 -0
- package/.agents/skills/team-swarm/roles/analyst/role.md +187 -0
- package/.agents/skills/team-swarm/roles/ant/role.md +169 -0
- package/.agents/skills/team-swarm/roles/coordinator/commands/converge.md +146 -0
- package/.agents/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
- package/.agents/skills/team-swarm/roles/coordinator/commands/iterate.md +232 -0
- package/.agents/skills/team-swarm/roles/coordinator/role.md +211 -0
- package/.agents/skills/team-swarm/roles/scorer/role.md +157 -0
- package/.agents/skills/team-swarm/scripts/aco.py +473 -0
- package/.agents/skills/team-swarm/scripts/pheromone.py +144 -0
- package/.agents/skills/team-swarm/scripts/scoring.py +92 -0
- package/.agents/skills/team-swarm/scripts/test_aco.py +475 -0
- package/.agents/skills/team-swarm/specs/ant-output-schema.md +119 -0
- package/.agents/skills/team-swarm/specs/convergence-criteria.md +106 -0
- package/.agents/skills/team-swarm/specs/pheromone-schema.md +123 -0
- package/.agents/skills/team-swarm/specs/swarm-config-template.json +71 -0
- package/.agents/skills/team-swarm/specs/swarm-protocol.md +117 -0
- package/.agy/skills/maestro/SKILL.md +1 -1
- package/.agy/skills/maestro-analyze/SKILL.md +5 -0
- package/.agy/skills/maestro-blueprint/SKILL.md +5 -0
- package/.agy/skills/maestro-brainstorm/SKILL.md +5 -0
- package/.agy/skills/maestro-next/SKILL.md +250 -0
- package/.agy/skills/team-swarm/SKILL.md +176 -0
- package/.agy/skills/team-swarm/roles/analyst/role.md +183 -0
- package/.agy/skills/team-swarm/roles/ant/role.md +165 -0
- package/.agy/skills/team-swarm/roles/coordinator/commands/converge.md +134 -0
- package/.agy/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
- package/.agy/skills/team-swarm/roles/coordinator/commands/iterate.md +202 -0
- package/.agy/skills/team-swarm/roles/coordinator/role.md +209 -0
- package/.agy/skills/team-swarm/roles/scorer/role.md +153 -0
- package/.agy/skills/team-swarm/scripts/aco.py +473 -0
- package/.agy/skills/team-swarm/scripts/pheromone.py +144 -0
- package/.agy/skills/team-swarm/scripts/scoring.py +92 -0
- package/.agy/skills/team-swarm/scripts/test_aco.py +475 -0
- package/.agy/skills/team-swarm/specs/ant-output-schema.md +119 -0
- package/.agy/skills/team-swarm/specs/convergence-criteria.md +106 -0
- package/.agy/skills/team-swarm/specs/pheromone-schema.md +123 -0
- package/.agy/skills/team-swarm/specs/swarm-config-template.json +71 -0
- package/.agy/skills/team-swarm/specs/swarm-protocol.md +117 -0
- package/.claude/commands/maestro-analyze.md +5 -0
- package/.claude/commands/maestro-blueprint.md +5 -0
- package/.claude/commands/maestro-brainstorm.md +5 -0
- package/.claude/commands/maestro-next.md +252 -0
- package/.claude/commands/maestro.md +1 -1
- package/.claude/skills/team-swarm/SKILL.md +178 -0
- package/.claude/skills/team-swarm/roles/analyst/role.md +185 -0
- package/.claude/skills/team-swarm/roles/ant/role.md +167 -0
- package/.claude/skills/team-swarm/roles/coordinator/commands/converge.md +146 -0
- package/.claude/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
- package/.claude/skills/team-swarm/roles/coordinator/commands/iterate.md +232 -0
- package/.claude/skills/team-swarm/roles/coordinator/role.md +209 -0
- package/.claude/skills/team-swarm/roles/scorer/role.md +155 -0
- package/.claude/skills/team-swarm/scripts/aco.py +473 -0
- package/.claude/skills/team-swarm/scripts/pheromone.py +144 -0
- package/.claude/skills/team-swarm/scripts/scoring.py +92 -0
- package/.claude/skills/team-swarm/scripts/test_aco.py +475 -0
- package/.claude/skills/team-swarm/specs/ant-output-schema.md +119 -0
- package/.claude/skills/team-swarm/specs/convergence-criteria.md +106 -0
- package/.claude/skills/team-swarm/specs/pheromone-schema.md +123 -0
- package/.claude/skills/team-swarm/specs/swarm-config-template.json +71 -0
- package/.claude/skills/team-swarm/specs/swarm-protocol.md +117 -0
- package/.codex/skills/learn-decompose/SKILL.md +34 -3
- package/.codex/skills/learn-retro/SKILL.md +31 -1
- package/.codex/skills/learn-second-opinion/SKILL.md +34 -4
- package/.codex/skills/maestro-analyze/SKILL.md +44 -5
- package/.codex/skills/maestro-blueprint/SKILL.md +5 -0
- package/.codex/skills/maestro-brainstorm/SKILL.md +46 -0
- package/.codex/skills/maestro-execute/SKILL.md +61 -5
- package/.codex/skills/maestro-milestone-audit/SKILL.md +64 -13
- package/.codex/skills/maestro-milestone-complete/SKILL.md +12 -0
- package/.codex/skills/maestro-next/SKILL.md +297 -0
- package/.codex/skills/maestro-plan/SKILL.md +36 -1
- package/.codex/skills/maestro-player/SKILL.md +25 -6
- package/.codex/skills/maestro-ralph/SKILL.md +17 -10
- package/.codex/skills/maestro-ralph-execute/SKILL.md +2 -1
- package/.codex/skills/maestro-roadmap/SKILL.md +35 -4
- package/.codex/skills/maestro-ui-codify/SKILL.md +38 -10
- package/.codex/skills/maestro-verify/SKILL.md +40 -5
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +52 -5
- package/.codex/skills/manage-issue-discover/SKILL.md +106 -15
- package/.codex/skills/quality-auto-test/SKILL.md +70 -16
- package/.codex/skills/quality-debug/SKILL.md +139 -28
- package/.codex/skills/quality-refactor/SKILL.md +61 -11
- package/.codex/skills/quality-review/SKILL.md +45 -9
- package/.codex/skills/quality-test/SKILL.md +58 -3
- package/.codex/skills/security-audit/SKILL.md +38 -0
- package/.codex/skills/spec-map/SKILL.md +65 -8
- package/.codex/skills/team-coordinate/SKILL.md +28 -11
- package/.codex/skills/team-coordinate/specs/role-catalog.md +20 -0
- package/.codex/skills/team-lifecycle-v4/SKILL.md +23 -7
- package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +20 -0
- package/.codex/skills/team-quality-assurance/SKILL.md +40 -2
- package/.codex/skills/team-review/SKILL.md +42 -2
- package/.codex/skills/team-tech-debt/SKILL.md +45 -2
- package/.codex/skills/team-testing/SKILL.md +42 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/search.d.ts +6 -4
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js +50 -8
- package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.d.ts +32 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +294 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +35 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +235 -0
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
- package/dist/src/commands/install.js +5 -1
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/i18n/locales/en.d.ts.map +1 -1
- package/dist/src/i18n/locales/en.js +9 -0
- package/dist/src/i18n/locales/en.js.map +1 -1
- package/dist/src/i18n/locales/zh.d.ts.map +1 -1
- package/dist/src/i18n/locales/zh.js +9 -0
- package/dist/src/i18n/locales/zh.js.map +1 -1
- package/dist/src/i18n/types.d.ts +3 -0
- package/dist/src/i18n/types.d.ts.map +1 -1
- package/dist/src/ralph/cmd-check.js +1 -1
- package/dist/src/ralph/cmd-check.js.map +1 -1
- package/dist/src/ralph/cmd-complete.js +1 -1
- package/dist/src/ralph/cmd-complete.js.map +1 -1
- package/dist/src/ralph/cmd-next.d.ts.map +1 -1
- package/dist/src/ralph/cmd-next.js +12 -4
- package/dist/src/ralph/cmd-next.js.map +1 -1
- package/dist/src/ralph/cmd-session.js +2 -2
- package/dist/src/ralph/cmd-session.js.map +1 -1
- package/dist/src/ralph/status-store.d.ts +8 -1
- package/dist/src/ralph/status-store.d.ts.map +1 -1
- package/dist/src/ralph/status-store.js +12 -2
- package/dist/src/ralph/status-store.js.map +1 -1
- package/dist/src/tools/store-knowhow.d.ts.map +1 -1
- package/dist/src/tools/store-knowhow.js +51 -64
- package/dist/src/tools/store-knowhow.js.map +1 -1
- package/dist/src/tui/install-ui/HooksConfig.d.ts +5 -1
- package/dist/src/tui/install-ui/HooksConfig.d.ts.map +1 -1
- package/dist/src/tui/install-ui/HooksConfig.js +5 -3
- package/dist/src/tui/install-ui/HooksConfig.js.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts +1 -0
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +26 -3
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +76 -16
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.d.ts +2 -0
- package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.js +8 -0
- package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.js +1 -1
- package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
- package/dist/src/utils/update-notices.js +23 -0
- package/dist/src/utils/update-notices.js.map +1 -1
- package/package.json +1 -1
- package/workflows/finish-work.md +119 -0
- package/workflows/milestone-complete.md +23 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Workflow: finish-work
|
|
2
|
+
|
|
3
|
+
Last step of session commands. Inline-extracts spec/knowhow from this single session, then writes `archive.json` so the session enters `wiki search` (strategy 2: only sealed/archived sessions are indexed).
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
Caller passes: `SESSION_DIR`, `SESSION_TYPE` (brainstorm | analyze | blueprint | plan | execute | verify), `SESSION_ID`, `LINKED_MILESTONE` (optional).
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
### 1. Detect outputs
|
|
12
|
+
|
|
13
|
+
Scan `SESSION_DIR` for any of these files (any absent → skip silently):
|
|
14
|
+
|
|
15
|
+
| File | Source | Used for |
|
|
16
|
+
|------|--------|----------|
|
|
17
|
+
| `context-package.json` | brainstorm/analyze/blueprint | constraints + insights |
|
|
18
|
+
| `conclusions.json` | analyze | decisions |
|
|
19
|
+
| `reflection-log.md` | execute | lessons + pitfalls |
|
|
20
|
+
| `{role}/analysis.md` | brainstorm | role decisions |
|
|
21
|
+
|
|
22
|
+
If none present → skip Steps 2-3, continue with empty `content_refs` and `extraction.harvested = false`.
|
|
23
|
+
|
|
24
|
+
### 2. Extract fragments (inline)
|
|
25
|
+
|
|
26
|
+
Iterate detected files; build a `fragments[]` array. Each fragment: `{ kind, category, title, content, keywords[], confidence, ref }`.
|
|
27
|
+
|
|
28
|
+
| Source field | kind | Target store | Default category |
|
|
29
|
+
|--------------|------|--------------|------------------|
|
|
30
|
+
| `context-package.json#constraints[status=locked]` | rule | spec | `arch` if area matches arch keywords (module/layer/boundary), else `coding` |
|
|
31
|
+
| `context-package.json#insights[]` | knowhow | knowhow (type: `DCS` for decisions, `RCP` for patterns) | `arch` for decisions, `coding` for patterns |
|
|
32
|
+
| `conclusions.json#decisions[status=locked]` | rule | spec | `arch` |
|
|
33
|
+
| `conclusions.json#recommendations[]` (priority ≥ medium) | knowhow | knowhow (`REF`) | derived from area |
|
|
34
|
+
| `reflection-log.md` "## Lessons" / "## Pitfalls" sections | learning | spec (category `learning`) or knowhow (`KNW`) by length: < 200 chars → spec, else knowhow | `learning` |
|
|
35
|
+
| `{role}/analysis.md` §2 Decisions[status=locked] | rule | spec | role-derived (`arch` for system-architect, `coding` for code-quality, etc.) |
|
|
36
|
+
|
|
37
|
+
**Confidence scoring** (drop if < 0.5):
|
|
38
|
+
- +0.3 if `status == "locked"` or section is explicit "## Decisions"
|
|
39
|
+
- +0.2 if has ≥ 3 keywords (extracted from content)
|
|
40
|
+
- +0.2 if has explicit `rationale` field
|
|
41
|
+
- +0.2 if content length 50-2000 chars (not too thin, not too verbose)
|
|
42
|
+
- +0.1 if explicit `ref` to source file
|
|
43
|
+
|
|
44
|
+
**Keyword extraction**: take 3-5 lowercased domain terms (filter stop words, take frequency-ranked nouns/identifiers from content).
|
|
45
|
+
|
|
46
|
+
**Deduplication**: hash `(kind, content[:100])` — skip if any existing spec/knowhow entry has matching hash (check via `maestro spec list --json` + `maestro knowhow list --json`).
|
|
47
|
+
|
|
48
|
+
### 3. Route fragments
|
|
49
|
+
|
|
50
|
+
Auto mode (`-y`): apply all. Otherwise prompt once with batch summary:
|
|
51
|
+
```
|
|
52
|
+
Found {N} fragments — {S_spec} spec / {S_knowhow} knowhow.
|
|
53
|
+
Apply? (auto | spec-only | knowhow-only | skip)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Then for each fragment in approved buckets:
|
|
57
|
+
|
|
58
|
+
- **spec**: `maestro spec add <category> "<title>" "<content>" --keywords {csv} --source finish-work` (capture returned id into `extracted_spec_ids[]`)
|
|
59
|
+
- **knowhow**: `maestro knowhow add --type {DCS|RCP|REF|KNW} --title "{title}" --body "{content}" --keywords {csv}` (capture id into `extracted_knowhow_ids[]`)
|
|
60
|
+
- Below confidence threshold: increment `skipped_count`, do nothing
|
|
61
|
+
- CLI failure: log W002, continue with remaining fragments
|
|
62
|
+
|
|
63
|
+
### 4. Write `archive.json`
|
|
64
|
+
|
|
65
|
+
Overwrites; idempotent. Schema `session-archive/1.0`:
|
|
66
|
+
|
|
67
|
+
```jsonc
|
|
68
|
+
{
|
|
69
|
+
"$schema": "session-archive/1.0",
|
|
70
|
+
"session_id": "{SESSION_ID}",
|
|
71
|
+
"session_type": "{SESSION_TYPE}",
|
|
72
|
+
"session_path": "{SESSION_DIR relative to .workflow/}",
|
|
73
|
+
"lifecycle": { "status": "sealed", "sealed_at": "{ISO now}", "archived_at": null, "linked_milestone": "{LINKED_MILESTONE or null}" },
|
|
74
|
+
"content_refs": [ /* one entry per file detected in Step 1, schema { type, path } */ ],
|
|
75
|
+
"extraction": {
|
|
76
|
+
"harvested": true,
|
|
77
|
+
"harvested_at": "{ISO now}",
|
|
78
|
+
"spec_ids": [/* from Step 3 */],
|
|
79
|
+
"knowhow_ids": [/* from Step 3 */],
|
|
80
|
+
"skipped_count": 0
|
|
81
|
+
},
|
|
82
|
+
"pruned": null
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
If Step 2 produced zero fragments or user chose skip:
|
|
87
|
+
```jsonc
|
|
88
|
+
"extraction": { "harvested": false, "reason": "no-signal | user-skip | harvest-failed" }
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 5. Report
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
=== SESSION SEALED ===
|
|
95
|
+
Session: {SESSION_ID} ({SESSION_TYPE})
|
|
96
|
+
Wiki: searchable via `maestro wiki search` (category {arch|coding|review})
|
|
97
|
+
Knowledge: {len(spec_ids)} spec / {len(knowhow_ids)} knowhow extracted, {skipped_count} skipped
|
|
98
|
+
Next: /maestro-milestone-complete will flip lifecycle.status → archived and prune context-package.json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Idempotency
|
|
102
|
+
|
|
103
|
+
Re-running on same session: archive.json overwritten with fresh timestamps. Steps 2-3 skipped when existing `archive.json.extraction.harvested == true` (avoids duplicate spec/knowhow). Force re-extract: delete `archive.json` first.
|
|
104
|
+
|
|
105
|
+
## Boundary
|
|
106
|
+
|
|
107
|
+
- Does NOT flip `archived_at` or move files — that is milestone-complete Step 2.3.
|
|
108
|
+
- Does NOT prune `context-package.json` — pruning is milestone-complete only.
|
|
109
|
+
- Does NOT touch `state.json` — caller handles artifact registration.
|
|
110
|
+
- Does NOT create issues — issue creation is out of single-session sealing scope (use `/manage-harvest` or `/manage-issue-discover` for that).
|
|
111
|
+
|
|
112
|
+
## Errors
|
|
113
|
+
|
|
114
|
+
| Code | Condition |
|
|
115
|
+
|------|-----------|
|
|
116
|
+
| E001 | SESSION_DIR missing |
|
|
117
|
+
| E002 | SESSION_TYPE unknown |
|
|
118
|
+
| W001 | No substantive outputs (still seals with empty content_refs) |
|
|
119
|
+
| W002 | A `spec add` / `knowhow add` CLI invocation failed (continue with remaining fragments) |
|
|
@@ -35,7 +35,29 @@ Archive completed milestone, move artifacts to history, and prepare for next.
|
|
|
35
35
|
- **Standard milestone**: `cp .workflow/roadmap.md .workflow/milestones/{milestone}/roadmap-snapshot.md`
|
|
36
36
|
- **Adhoc milestone**: Skip roadmap snapshot (roadmap may not exist)
|
|
37
37
|
|
|
38
|
-
3. Archive scratch directories: copy each milestone artifact's `.workflow/{artifact.path}` to `.workflow/milestones/{milestone}/artifacts/{basename}
|
|
38
|
+
3. Archive scratch directories: copy each milestone artifact's `.workflow/{artifact.path}` to `.workflow/milestones/{milestone}/artifacts/{basename}/`. After each copy:
|
|
39
|
+
|
|
40
|
+
a. If the destination contains `archive.json` with `lifecycle.status == "sealed"`:
|
|
41
|
+
- Set `lifecycle.status = "archived"`
|
|
42
|
+
- Set `lifecycle.archived_at = now`
|
|
43
|
+
- Set `lifecycle.linked_milestone = {milestone}` if currently null
|
|
44
|
+
|
|
45
|
+
b. If the destination contains `context-package.json`, prune it (scheme C — non-destructive):
|
|
46
|
+
- Read full content as `orig`
|
|
47
|
+
- Compute `pruned` = {
|
|
48
|
+
`open_questions`: items without `answer` and without `resolved_in`,
|
|
49
|
+
`constraints`: items where `status == "open"`,
|
|
50
|
+
`insights`: items beyond index 20 (keep top 20 by source order),
|
|
51
|
+
`references`: items whose `path` does not exist on disk (relative to session dir)
|
|
52
|
+
}
|
|
53
|
+
- If any `pruned.*` is non-empty:
|
|
54
|
+
- Write `{session_dir}/context-package.pruned.json` containing the dropped items
|
|
55
|
+
- Rewrite `context-package.json` keeping only:
|
|
56
|
+
`open_questions` answered/resolved, `constraints` status=locked, `insights[0..20]`, `references` whose paths exist; all other top-level fields unchanged
|
|
57
|
+
- Update `archive.json.pruned = { "at": now, "counts": { open_questions, constraints, insights, references }, "ref": "context-package.pruned.json" }`
|
|
58
|
+
- Otherwise leave both files untouched and set `archive.json.pruned = { "at": now, "counts": {...zeros}, "ref": null }`
|
|
59
|
+
|
|
60
|
+
c. If the session dir lacks `archive.json` (legacy session prior to lifecycle convention), skip (a) and (b) silently — legacy sessions are not indexed.
|
|
39
61
|
|
|
40
62
|
---
|
|
41
63
|
|