maestro-flow 0.3.10 → 0.3.11

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 (184) hide show
  1. package/.claude/agents/workflow-collab-planner.md +1 -1
  2. package/.claude/agents/workflow-executor.md +1 -1
  3. package/.claude/agents/workflow-plan-checker.md +1 -1
  4. package/.claude/agents/workflow-planner.md +1 -1
  5. package/.claude/commands/learn-decompose.md +176 -176
  6. package/.claude/commands/learn-follow.md +167 -167
  7. package/.claude/commands/learn-retro.md +1 -1
  8. package/.claude/commands/maestro-coordinate.md +1 -3
  9. package/.claude/commands/manage-harvest.md +131 -131
  10. package/.claude/commands/manage-issue.md +2 -2
  11. package/.claude/commands/spec-add.md +67 -56
  12. package/.claude/commands/spec-load.md +66 -64
  13. package/.claude/commands/spec-setup.md +5 -9
  14. package/.codex/skills/learn-decompose/SKILL.md +119 -0
  15. package/.codex/skills/learn-follow/SKILL.md +83 -0
  16. package/.codex/skills/learn-investigate/SKILL.md +83 -0
  17. package/.codex/skills/learn-retro/SKILL.md +83 -0
  18. package/.codex/skills/learn-second-opinion/SKILL.md +86 -0
  19. package/.codex/skills/maestro/SKILL.md +151 -279
  20. package/.codex/skills/maestro-analyze/SKILL.md +59 -71
  21. package/.codex/skills/maestro-brainstorm/SKILL.md +452 -463
  22. package/.codex/skills/maestro-chain/SKILL.md +95 -110
  23. package/.codex/skills/maestro-coordinate/SKILL.md +68 -234
  24. package/.codex/skills/maestro-execute/SKILL.md +435 -446
  25. package/.codex/skills/maestro-fork/SKILL.md +68 -0
  26. package/.codex/skills/maestro-init/SKILL.md +171 -167
  27. package/.codex/skills/maestro-learn/SKILL.md +80 -0
  28. package/.codex/skills/maestro-link-coordinate/SKILL.md +224 -220
  29. package/.codex/skills/maestro-merge/SKILL.md +62 -0
  30. package/.codex/skills/maestro-milestone-audit/SKILL.md +108 -103
  31. package/.codex/skills/maestro-milestone-complete/SKILL.md +155 -149
  32. package/.codex/skills/maestro-milestone-release/SKILL.md +70 -0
  33. package/.codex/skills/maestro-overlay/SKILL.md +188 -185
  34. package/.codex/skills/maestro-plan/SKILL.md +58 -69
  35. package/.codex/skills/maestro-quick/SKILL.md +26 -23
  36. package/.codex/skills/maestro-roadmap/SKILL.md +65 -73
  37. package/.codex/skills/maestro-spec-generate/SKILL.md +66 -74
  38. package/.codex/skills/maestro-ui-design/SKILL.md +34 -31
  39. package/.codex/skills/maestro-verify/SKILL.md +556 -566
  40. package/.codex/skills/manage-codebase-rebuild/SKILL.md +397 -405
  41. package/.codex/skills/manage-codebase-refresh/SKILL.md +93 -82
  42. package/.codex/skills/manage-harvest/SKILL.md +82 -0
  43. package/.codex/skills/manage-issue/SKILL.md +80 -65
  44. package/.codex/skills/manage-issue-discover/SKILL.md +491 -503
  45. package/.codex/skills/manage-learn/SKILL.md +190 -186
  46. package/.codex/skills/manage-memory/SKILL.md +95 -72
  47. package/.codex/skills/manage-memory-capture/SKILL.md +99 -86
  48. package/.codex/skills/manage-status/SKILL.md +102 -89
  49. package/.codex/skills/quality-business-test/SKILL.md +228 -223
  50. package/.codex/skills/quality-debug/SKILL.md +54 -66
  51. package/.codex/skills/quality-integration-test/SKILL.md +532 -544
  52. package/.codex/skills/quality-refactor/SKILL.md +197 -191
  53. package/.codex/skills/quality-retrospective/SKILL.md +512 -505
  54. package/.codex/skills/quality-review/SKILL.md +93 -105
  55. package/.codex/skills/quality-sync/SKILL.md +101 -89
  56. package/.codex/skills/quality-test/SKILL.md +202 -198
  57. package/.codex/skills/quality-test-gen/SKILL.md +93 -104
  58. package/.codex/skills/spec-add/SKILL.md +58 -39
  59. package/.codex/skills/spec-load/SKILL.md +45 -40
  60. package/.codex/skills/spec-map/SKILL.md +180 -182
  61. package/.codex/skills/spec-setup/SKILL.md +94 -76
  62. package/.codex/skills/team-coordinate/SKILL.md +346 -357
  63. package/.codex/skills/team-executor/SKILL.md +70 -112
  64. package/.codex/skills/team-lifecycle-v4/SKILL.md +311 -299
  65. package/.codex/skills/team-quality-assurance/SKILL.md +234 -227
  66. package/.codex/skills/team-review/SKILL.md +232 -225
  67. package/.codex/skills/team-tech-debt/SKILL.md +78 -100
  68. package/.codex/skills/team-testing/SKILL.md +242 -235
  69. package/.codex/skills/wiki-connect/SKILL.md +75 -0
  70. package/.codex/skills/wiki-digest/SKILL.md +87 -0
  71. package/README.md +7 -4
  72. package/README.zh-CN.md +7 -4
  73. package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +1 -1
  74. package/dashboard/dist-server/dashboard/src/server/routes/specs.js +75 -30
  75. package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
  76. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +5 -0
  77. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +5 -0
  78. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  79. package/dashboard/dist-server/dashboard/src/shared/constants.js +5 -0
  80. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  81. package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +21 -0
  82. package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
  83. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +3 -2
  84. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
  85. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  86. package/dashboard/dist-server/src/hooks/constants.d.ts +2 -0
  87. package/dashboard/dist-server/src/hooks/constants.js +2 -0
  88. package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
  89. package/dist/src/commands/collab.js +4 -4
  90. package/dist/src/commands/collab.js.map +1 -1
  91. package/dist/src/commands/hooks.d.ts.map +1 -1
  92. package/dist/src/commands/hooks.js +66 -1
  93. package/dist/src/commands/hooks.js.map +1 -1
  94. package/dist/src/commands/spec.d.ts.map +1 -1
  95. package/dist/src/commands/spec.js +7 -2
  96. package/dist/src/commands/spec.js.map +1 -1
  97. package/dist/src/hooks/constants.d.ts +2 -0
  98. package/dist/src/hooks/constants.d.ts.map +1 -1
  99. package/dist/src/hooks/constants.js +2 -0
  100. package/dist/src/hooks/constants.js.map +1 -1
  101. package/dist/src/hooks/guards/index.d.ts +1 -0
  102. package/dist/src/hooks/guards/index.d.ts.map +1 -1
  103. package/dist/src/hooks/guards/index.js +1 -0
  104. package/dist/src/hooks/guards/index.js.map +1 -1
  105. package/dist/src/hooks/guards/spec-validator.d.ts +25 -0
  106. package/dist/src/hooks/guards/spec-validator.d.ts.map +1 -0
  107. package/dist/src/hooks/guards/spec-validator.js +66 -0
  108. package/dist/src/hooks/guards/spec-validator.js.map +1 -0
  109. package/dist/src/hooks/keyword-spec-injector.d.ts +21 -0
  110. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -0
  111. package/dist/src/hooks/keyword-spec-injector.js +96 -0
  112. package/dist/src/hooks/keyword-spec-injector.js.map +1 -0
  113. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts +2 -1
  114. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
  115. package/dist/src/hooks/plugins/spec-injection-plugin.js +21 -12
  116. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  117. package/dist/src/hooks/spec-bridge.d.ts +40 -0
  118. package/dist/src/hooks/spec-bridge.d.ts.map +1 -0
  119. package/dist/src/hooks/spec-bridge.js +97 -0
  120. package/dist/src/hooks/spec-bridge.js.map +1 -0
  121. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  122. package/dist/src/hooks/spec-injector.js +18 -12
  123. package/dist/src/hooks/spec-injector.js.map +1 -1
  124. package/dist/src/team/phase-orchestrator.d.ts +52 -0
  125. package/dist/src/team/phase-orchestrator.d.ts.map +1 -0
  126. package/dist/src/team/phase-orchestrator.js +165 -0
  127. package/dist/src/team/phase-orchestrator.js.map +1 -0
  128. package/dist/src/team/phase-types.d.ts +51 -0
  129. package/dist/src/team/phase-types.d.ts.map +1 -0
  130. package/dist/src/team/phase-types.js +41 -0
  131. package/dist/src/team/phase-types.js.map +1 -0
  132. package/dist/src/tools/index.d.ts.map +1 -1
  133. package/dist/src/tools/index.js +6 -0
  134. package/dist/src/tools/index.js.map +1 -1
  135. package/dist/src/tools/spec-entry-parser.d.ts +56 -0
  136. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -0
  137. package/dist/src/tools/spec-entry-parser.js +196 -0
  138. package/dist/src/tools/spec-entry-parser.js.map +1 -0
  139. package/dist/src/tools/spec-init.d.ts.map +1 -1
  140. package/dist/src/tools/spec-init.js +66 -92
  141. package/dist/src/tools/spec-init.js.map +1 -1
  142. package/dist/src/tools/spec-keyword-index.d.ts +30 -0
  143. package/dist/src/tools/spec-keyword-index.d.ts.map +1 -0
  144. package/dist/src/tools/spec-keyword-index.js +101 -0
  145. package/dist/src/tools/spec-keyword-index.js.map +1 -0
  146. package/dist/src/tools/spec-loader.d.ts +3 -3
  147. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  148. package/dist/src/tools/spec-loader.js +49 -23
  149. package/dist/src/tools/spec-loader.js.map +1 -1
  150. package/dist/src/tools/team-agents.d.ts +27 -0
  151. package/dist/src/tools/team-agents.d.ts.map +1 -0
  152. package/dist/src/tools/team-agents.js +362 -0
  153. package/dist/src/tools/team-agents.js.map +1 -0
  154. package/dist/src/tools/team-mailbox.d.ts +40 -0
  155. package/dist/src/tools/team-mailbox.d.ts.map +1 -0
  156. package/dist/src/tools/team-mailbox.js +384 -0
  157. package/dist/src/tools/team-mailbox.js.map +1 -0
  158. package/dist/src/tools/team-msg.d.ts +17 -8
  159. package/dist/src/tools/team-msg.d.ts.map +1 -1
  160. package/dist/src/tools/team-msg.js +110 -13
  161. package/dist/src/tools/team-msg.js.map +1 -1
  162. package/dist/src/tools/team-tasks-mcp.d.ts +27 -0
  163. package/dist/src/tools/team-tasks-mcp.d.ts.map +1 -0
  164. package/dist/src/tools/team-tasks-mcp.js +408 -0
  165. package/dist/src/tools/team-tasks-mcp.js.map +1 -0
  166. package/package.json +2 -1
  167. package/workflows/analyze.md +816 -816
  168. package/workflows/brainstorm.md +471 -471
  169. package/workflows/codebase-rebuild.md +332 -332
  170. package/workflows/codebase-refresh.md +240 -240
  171. package/workflows/execute.md +1 -1
  172. package/workflows/harvest.md +420 -420
  173. package/workflows/integration-test.md +343 -343
  174. package/workflows/issue-discover.md +414 -414
  175. package/workflows/map.md +111 -111
  176. package/workflows/milestone-complete.md +176 -176
  177. package/workflows/plan.md +1 -1
  178. package/workflows/quick.md +497 -497
  179. package/workflows/refactor.md +300 -300
  180. package/workflows/roadmap.md +335 -335
  181. package/workflows/spec-generate.md +640 -640
  182. package/workflows/specs-add.md +46 -81
  183. package/workflows/specs-load.md +15 -17
  184. package/workflows/specs-setup.md +40 -161
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Phase Orchestrator - Structured team phase management.
3
+ *
4
+ * Manages phase transitions with guard evaluation, fix retry counting,
5
+ * state broadcast via team-msg, and transition persistence.
6
+ */
7
+ import { existsSync, mkdirSync, appendFileSync } from 'node:fs';
8
+ import { join } from 'node:path';
9
+ import { getProjectRoot } from '../utils/path-validator.js';
10
+ import { evaluatePhaseGate } from '../tools/phase-gate-evaluator.js';
11
+ import { TeamPhase, TRANSITIONS, } from './phase-types.js';
12
+ // ---------------------------------------------------------------------------
13
+ // Constants
14
+ // ---------------------------------------------------------------------------
15
+ const MAX_FIX_ATTEMPTS = 3;
16
+ const DEFAULT_TRIGGER = 'phase_orchestrator';
17
+ // ---------------------------------------------------------------------------
18
+ // PhaseOrchestrator
19
+ // ---------------------------------------------------------------------------
20
+ export class PhaseOrchestrator {
21
+ sessionId;
22
+ _currentPhase;
23
+ _fixAttempts;
24
+ _history;
25
+ constructor(sessionId) {
26
+ this.sessionId = sessionId;
27
+ this._currentPhase = TeamPhase.planning;
28
+ this._fixAttempts = 0;
29
+ this._history = [];
30
+ }
31
+ /** Current phase of the team workflow */
32
+ get currentPhase() {
33
+ return this._currentPhase;
34
+ }
35
+ /** Number of fix attempts in the current fix loop */
36
+ get fixAttempts() {
37
+ return this._fixAttempts;
38
+ }
39
+ // -------------------------------------------------------------------------
40
+ // transitionTo
41
+ // -------------------------------------------------------------------------
42
+ /**
43
+ * Attempt to transition to `targetPhase`.
44
+ *
45
+ * Steps:
46
+ * 1. Validate the transition exists in TRANSITIONS map
47
+ * 2. Check fix retry limit for fix->review transitions
48
+ * 3. Evaluate phase-gate guard (if gateConfig provided)
49
+ * 4. Apply the transition, update counters, record history
50
+ * 5. Broadcast state_update via team-msg opLog
51
+ * 6. Persist transition to transitions.jsonl
52
+ */
53
+ transitionTo(targetPhase, options) {
54
+ const trigger = options?.trigger ?? DEFAULT_TRIGGER;
55
+ const force = options?.force ?? false;
56
+ const gateConfig = options?.gateConfig;
57
+ // 1. Validate transition is allowed
58
+ const allowedTargets = TRANSITIONS.get(this._currentPhase);
59
+ if (!allowedTargets) {
60
+ return reject(this._currentPhase, targetPhase, `No transitions defined from ${this._currentPhase}`);
61
+ }
62
+ const rule = allowedTargets.find((r) => r.to === targetPhase);
63
+ if (!rule) {
64
+ const allowed = allowedTargets.map((r) => r.to).join(', ');
65
+ return reject(this._currentPhase, targetPhase, `Invalid transition: ${this._currentPhase} -> ${targetPhase}. Allowed: ${allowed}`);
66
+ }
67
+ // 2. Fix retry limit
68
+ // Checked when trying to enter fix (verification -> fix) or when leaving fix (fix -> review)
69
+ if (this._currentPhase === TeamPhase.verification && targetPhase === TeamPhase.fix) {
70
+ if (this._fixAttempts >= MAX_FIX_ATTEMPTS) {
71
+ // Force transition to complete with warning instead of rejecting
72
+ const forcedResult = this.applyTransition(TeamPhase.complete, trigger, true, [`Max fix attempts (${MAX_FIX_ATTEMPTS}) reached, forcing transition to complete`], options?.broadcast);
73
+ return { ...forcedResult, reason: `Max fix attempts (${MAX_FIX_ATTEMPTS}) exceeded, forced to complete` };
74
+ }
75
+ }
76
+ if (this._currentPhase === TeamPhase.fix && targetPhase === TeamPhase.review) {
77
+ // Count this as a completed fix cycle
78
+ this._fixAttempts++;
79
+ }
80
+ // 3. Phase-gate evaluation
81
+ let gateReasons = [];
82
+ if (gateConfig) {
83
+ const gate = evaluatePhaseGate(gateConfig.gateInput);
84
+ if (!gate.allowed) {
85
+ if (!gate.overridable) {
86
+ // Hard block - cannot be overridden
87
+ return reject(this._currentPhase, targetPhase, `Hard gate block: ${gate.reasons.join('; ')}`, gate.reasons);
88
+ }
89
+ if (!force && !gateConfig.allowForceOverride) {
90
+ return reject(this._currentPhase, targetPhase, `Gate blocked: ${gate.reasons.join('; ')}`, gate.reasons);
91
+ }
92
+ // Force override - proceed but record reasons
93
+ gateReasons = gate.reasons;
94
+ }
95
+ }
96
+ // 4-6. Apply transition
97
+ return this.applyTransition(targetPhase, trigger, force, gateReasons, options?.broadcast);
98
+ }
99
+ // -------------------------------------------------------------------------
100
+ // getPhaseStatus
101
+ // -------------------------------------------------------------------------
102
+ getPhaseStatus() {
103
+ const allowedTargets = TRANSITIONS.get(this._currentPhase) ?? [];
104
+ return {
105
+ current: this._currentPhase,
106
+ fixAttempts: this._fixAttempts,
107
+ history: [...this._history],
108
+ nextTransitions: allowedTargets.map((r) => r.to),
109
+ };
110
+ }
111
+ // -------------------------------------------------------------------------
112
+ // Internal
113
+ // -------------------------------------------------------------------------
114
+ applyTransition(targetPhase, trigger, force, gateReasons, broadcast) {
115
+ const from = this._currentPhase;
116
+ // Update fix counter
117
+ if (targetPhase === TeamPhase.complete || targetPhase === TeamPhase.planning) {
118
+ // Reset fix counter when leaving the fix loop or restarting
119
+ this._fixAttempts = 0;
120
+ }
121
+ // Record history
122
+ const record = {
123
+ from,
124
+ to: targetPhase,
125
+ timestamp: new Date().toISOString(),
126
+ trigger,
127
+ force,
128
+ gateReasons,
129
+ };
130
+ this._history.push(record);
131
+ // Apply
132
+ this._currentPhase = targetPhase;
133
+ // Broadcast via callback
134
+ if (broadcast) {
135
+ broadcast(this.sessionId, this._currentPhase, this._fixAttempts);
136
+ }
137
+ // Persist to transitions.jsonl
138
+ this.persistTransition(record);
139
+ return { success: true, from, to: targetPhase, gateReasons };
140
+ }
141
+ /**
142
+ * Append transition record to .workflow/.team/{session}/transitions.jsonl
143
+ */
144
+ persistTransition(record) {
145
+ try {
146
+ const root = getProjectRoot();
147
+ const dir = join(root, '.workflow', '.team', this.sessionId);
148
+ if (!existsSync(dir)) {
149
+ mkdirSync(dir, { recursive: true });
150
+ }
151
+ const filePath = join(dir, 'transitions.jsonl');
152
+ appendFileSync(filePath, JSON.stringify(record) + '\n', 'utf-8');
153
+ }
154
+ catch {
155
+ // Persistence failure must not block the transition
156
+ }
157
+ }
158
+ }
159
+ // ---------------------------------------------------------------------------
160
+ // Helpers
161
+ // ---------------------------------------------------------------------------
162
+ function reject(from, to, reason, gateReasons = []) {
163
+ return { success: false, from, to, reason, gateReasons };
164
+ }
165
+ //# sourceMappingURL=phase-orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase-orchestrator.js","sourceRoot":"","sources":["../../../src/team/phase-orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAW,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EACL,SAAS,EACT,WAAW,GAIZ,MAAM,kBAAkB,CAAC;AAE1B,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAgB7C,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,MAAM,OAAO,iBAAiB;IACX,SAAS,CAAS;IAC3B,aAAa,CAAY;IACzB,YAAY,CAAS;IACZ,QAAQ,CAA0B;I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,cAAwB,EAAE;IAE1B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Phase Types - TeamPhase enum, transition rules, and gate configuration
3
+ * for the Phase Orchestrator.
4
+ *
5
+ * Defines the canonical set of team workflow phases, the valid transitions
6
+ * between them, and configuration for phase-gate evaluation.
7
+ */
8
+ import type { PhaseGateInput } from '../tools/phase-gate-evaluator.js';
9
+ export declare enum TeamPhase {
10
+ planning = "planning",
11
+ execution = "execution",
12
+ review = "review",
13
+ verification = "verification",
14
+ fix = "fix",
15
+ complete = "complete"
16
+ }
17
+ export interface TransitionRule {
18
+ /** Target phase */
19
+ to: TeamPhase;
20
+ /** Maximum consecutive transitions to this target (null = unlimited) */
21
+ maxRetries: number | null;
22
+ }
23
+ /**
24
+ * Valid phase transitions.
25
+ * Key = source phase, Value = array of allowed target phases with retry limits.
26
+ *
27
+ * Main flow: planning -> execution -> review -> verification -> complete
28
+ * Fix loop: verification -> fix -> review (max 3 fix retries)
29
+ */
30
+ export declare const TRANSITIONS: ReadonlyMap<TeamPhase, readonly TransitionRule[]>;
31
+ export interface PhaseGateConfig {
32
+ /** Phase gate input for evaluation (review/verification/validation status) */
33
+ gateInput: PhaseGateInput;
34
+ /** Whether to allow force-overriding soft blocks */
35
+ allowForceOverride: boolean;
36
+ }
37
+ export interface PhaseTransitionRecord {
38
+ from: TeamPhase;
39
+ to: TeamPhase;
40
+ timestamp: string;
41
+ trigger: string;
42
+ force: boolean;
43
+ gateReasons: string[];
44
+ }
45
+ export interface PhaseStatus {
46
+ current: TeamPhase;
47
+ fixAttempts: number;
48
+ history: PhaseTransitionRecord[];
49
+ nextTransitions: TeamPhase[];
50
+ }
51
+ //# sourceMappingURL=phase-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase-types.d.ts","sourceRoot":"","sources":["../../../src/team/phase-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAMvE,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,YAAY,iBAAiB;IAC7B,GAAG,QAAQ;IACX,QAAQ,aAAa;CACtB;AAMD,MAAM,WAAW,cAAc;IAC7B,mBAAmB;IACnB,EAAE,EAAE,SAAS,CAAC;IACd,wEAAwE;IACxE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAMD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,CAUxE,CAAC;AAMH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,SAAS,EAAE,cAAc,CAAC;IAC1B,oDAAoD;IACpD,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAMD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,CAAC;IAChB,EAAE,EAAE,SAAS,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAMD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,SAAS,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,eAAe,EAAE,SAAS,EAAE,CAAC;CAC9B"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Phase Types - TeamPhase enum, transition rules, and gate configuration
3
+ * for the Phase Orchestrator.
4
+ *
5
+ * Defines the canonical set of team workflow phases, the valid transitions
6
+ * between them, and configuration for phase-gate evaluation.
7
+ */
8
+ // ---------------------------------------------------------------------------
9
+ // TeamPhase enum
10
+ // ---------------------------------------------------------------------------
11
+ export var TeamPhase;
12
+ (function (TeamPhase) {
13
+ TeamPhase["planning"] = "planning";
14
+ TeamPhase["execution"] = "execution";
15
+ TeamPhase["review"] = "review";
16
+ TeamPhase["verification"] = "verification";
17
+ TeamPhase["fix"] = "fix";
18
+ TeamPhase["complete"] = "complete";
19
+ })(TeamPhase || (TeamPhase = {}));
20
+ // ---------------------------------------------------------------------------
21
+ // TRANSITIONS map
22
+ // ---------------------------------------------------------------------------
23
+ /**
24
+ * Valid phase transitions.
25
+ * Key = source phase, Value = array of allowed target phases with retry limits.
26
+ *
27
+ * Main flow: planning -> execution -> review -> verification -> complete
28
+ * Fix loop: verification -> fix -> review (max 3 fix retries)
29
+ */
30
+ export const TRANSITIONS = new Map([
31
+ [TeamPhase.planning, [{ to: TeamPhase.execution, maxRetries: null }]],
32
+ [TeamPhase.execution, [{ to: TeamPhase.review, maxRetries: null }]],
33
+ [TeamPhase.review, [{ to: TeamPhase.verification, maxRetries: null }]],
34
+ [TeamPhase.verification, [
35
+ { to: TeamPhase.complete, maxRetries: null },
36
+ { to: TeamPhase.fix, maxRetries: null },
37
+ ]],
38
+ [TeamPhase.fix, [{ to: TeamPhase.review, maxRetries: 3 }]],
39
+ [TeamPhase.complete, []],
40
+ ]);
41
+ //# sourceMappingURL=phase-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase-types.js","sourceRoot":"","sources":["../../../src/team/phase-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,MAAM,CAAN,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;IACjB,0CAA6B,CAAA;IAC7B,wBAAW,CAAA;IACX,kCAAqB,CAAA;AACvB,CAAC,EAPW,SAAS,KAAT,SAAS,QAOpB;AAaD,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAsD,IAAI,GAAG,CAAC;IACpF,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IACrE,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IACnE,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;IACtE,CAAC,SAAS,CAAC,YAAY,EAAE;YACvB,EAAE,EAAE,EAAE,SAAS,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE;YAC5C,EAAE,EAAE,EAAE,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE;SACxC,CAAC;IACF,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC;CACzB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AA+B7D,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAOjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAkC7D,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAUjE"}
@@ -5,7 +5,10 @@ import * as writeFileTool from './write-file.js';
5
5
  import * as readFileTool from './read-file.js';
6
6
  import * as readManyFilesTool from './read-many-files.js';
7
7
  import * as teamMsgTool from './team-msg.js';
8
+ import * as teamMailboxTool from './team-mailbox.js';
8
9
  import * as coreMemoryTool from './core-memory.js';
10
+ import * as teamTasksMcpTool from './team-tasks-mcp.js';
11
+ import * as teamAgentsTool from './team-agents.js';
9
12
  /**
10
13
  * Register a CCW-style tool (with schema + handler exports) into the maestro registry.
11
14
  * Adapts CCW's { success, result, error } format to maestro's { content, isError } format.
@@ -27,6 +30,9 @@ export function registerBuiltinTools(registry) {
27
30
  registerCcwTool(registry, readFileTool);
28
31
  registerCcwTool(registry, readManyFilesTool);
29
32
  registerCcwTool(registry, teamMsgTool);
33
+ registerCcwTool(registry, teamMailboxTool);
30
34
  registerCcwTool(registry, coreMemoryTool);
35
+ registerCcwTool(registry, teamTasksMcpTool);
36
+ registerCcwTool(registry, teamAgentsTool);
31
37
  }
32
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,oDAAoD;AACpD,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,iBAAiB,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD;;;GAGG;AACH,SAAS,eAAe,CACtB,QAAsB,EACtB,GAAwJ;IAExJ,QAAQ,CAAC,QAAQ,CAAC;QAChB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI;QACrB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW;QACnC,WAAW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EAAE,GAAG,CAAC,MAAM,CAAC,IAAI;QACrB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW;QACnC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,WAAW;QACnC,KAAK,CAAC,OAAO,CAAC,KAA8B;YAC1C,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC3C,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,QAAsB;IACzD,eAAe,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACxC,eAAe,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IACzC,eAAe,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACxC,eAAe,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAC7C,eAAe,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACvC,eAAe,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IAC3C,eAAe,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;IAC1C,eAAe,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAC5C,eAAe,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Spec Entry Parser
3
+ *
4
+ * Parses `<spec-entry>` closed-tag blocks from spec markdown files.
5
+ * Supports dual-format: new `<spec-entry>` tags + legacy heading-based entries.
6
+ */
7
+ export interface SpecEntryParsed {
8
+ category: string;
9
+ keywords: string[];
10
+ date: string;
11
+ source?: string;
12
+ title: string;
13
+ content: string;
14
+ lineStart: number;
15
+ lineEnd: number;
16
+ }
17
+ export interface ParseResult {
18
+ entries: SpecEntryParsed[];
19
+ legacy: LegacyEntry[];
20
+ errors: ParseError[];
21
+ }
22
+ export interface LegacyEntry {
23
+ title: string;
24
+ content: string;
25
+ lineStart: number;
26
+ }
27
+ export interface ParseError {
28
+ line: number;
29
+ message: string;
30
+ }
31
+ export declare const VALID_CATEGORIES: readonly ["coding", "arch", "quality", "debug", "test", "review", "learning"];
32
+ export type ValidCategory = (typeof VALID_CATEGORIES)[number];
33
+ /**
34
+ * Parse spec file content into structured entries.
35
+ * Returns new-format `<spec-entry>` entries, legacy heading entries, and any errors.
36
+ */
37
+ export declare function parseSpecEntries(content: string): ParseResult;
38
+ /**
39
+ * Validate a single parsed entry. Returns array of error messages (empty = valid).
40
+ */
41
+ export declare function validateSpecEntry(entry: SpecEntryParsed): string[];
42
+ /**
43
+ * Validate that entry category matches the expected file category.
44
+ */
45
+ export declare function validateCategoryMatch(entry: SpecEntryParsed, fileCategory: string): string | null;
46
+ /**
47
+ * Format parsed entries for display output.
48
+ * Strips `<spec-entry>` tags, shows clean content.
49
+ * If keyword provided, highlights matched entries.
50
+ */
51
+ export declare function formatSpecEntries(entries: SpecEntryParsed[], keyword?: string): string;
52
+ /**
53
+ * Format a single entry for writing to a spec file.
54
+ */
55
+ export declare function formatNewEntry(category: string, keywords: string[], date: string, title: string, content: string, source?: string): string;
56
+ //# sourceMappingURL=spec-entry-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-entry-parser.d.ts","sourceRoot":"","sources":["../../../src/tools/spec-entry-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD,eAAO,MAAM,gBAAgB,+EAAgF,CAAC;AAC9G,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAyB9D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAqD7D;AAMD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,CAoBlE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKjG;AAMD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAQtF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAAE,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,CAIR"}
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Spec Entry Parser
3
+ *
4
+ * Parses `<spec-entry>` closed-tag blocks from spec markdown files.
5
+ * Supports dual-format: new `<spec-entry>` tags + legacy heading-based entries.
6
+ */
7
+ // ============================================================================
8
+ // Valid categories (shared with spec-loader)
9
+ // ============================================================================
10
+ export const VALID_CATEGORIES = ['coding', 'arch', 'quality', 'debug', 'test', 'review', 'learning'];
11
+ // ============================================================================
12
+ // Core regex
13
+ // ============================================================================
14
+ /** Matches `<spec-entry ...attributes...>...content...</spec-entry>` across lines */
15
+ const SPEC_ENTRY_RE = /<spec-entry\s+([^>]+)>([\s\S]*?)<\/spec-entry>/g;
16
+ /** Extracts key="value" attribute pairs */
17
+ const ATTR_RE = /([\w-]+)="([^"]*)"/g;
18
+ /** Matches ### heading inside entry content */
19
+ const HEADING_RE = /^###\s+(.+)$/m;
20
+ /** Legacy format: ### [category] [date] title OR ### [date] type: title */
21
+ const LEGACY_HEADING_RE = /^###\s+(?:\[[\w-]+\]\s+)?\[(\d{4}-\d{2}-\d{2}(?:\s[\d:]+)?)\]\s*(.+)$/;
22
+ /** Date validation */
23
+ const DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
24
+ // ============================================================================
25
+ // Parser
26
+ // ============================================================================
27
+ /**
28
+ * Parse spec file content into structured entries.
29
+ * Returns new-format `<spec-entry>` entries, legacy heading entries, and any errors.
30
+ */
31
+ export function parseSpecEntries(content) {
32
+ const entries = [];
33
+ const errors = [];
34
+ // Track which character ranges are consumed by <spec-entry> blocks
35
+ const consumed = [];
36
+ // Pass 1: Extract <spec-entry> blocks
37
+ let match;
38
+ SPEC_ENTRY_RE.lastIndex = 0;
39
+ while ((match = SPEC_ENTRY_RE.exec(content)) !== null) {
40
+ const attrStr = match[1];
41
+ const body = match[2];
42
+ const blockStart = match.index;
43
+ const blockEnd = blockStart + match[0].length;
44
+ const lineStart = lineNumber(content, blockStart);
45
+ const lineEnd = lineNumber(content, blockEnd);
46
+ consumed.push({ start: blockStart, end: blockEnd });
47
+ // Parse attributes
48
+ const attrs = parseAttributes(attrStr);
49
+ // Extract title from first ### heading
50
+ const titleMatch = body.match(HEADING_RE);
51
+ const title = titleMatch ? titleMatch[1].trim() : '';
52
+ // Validate and build entry
53
+ const entry = {
54
+ category: attrs.category ?? '',
55
+ keywords: attrs.keywords ? attrs.keywords.split(',').map(k => k.trim().toLowerCase()).filter(Boolean) : [],
56
+ date: attrs.date ?? '',
57
+ source: attrs.source,
58
+ title,
59
+ content: body.trim(),
60
+ lineStart,
61
+ lineEnd,
62
+ };
63
+ entries.push(entry);
64
+ // Collect validation errors
65
+ const validationErrors = validateSpecEntry(entry);
66
+ for (const msg of validationErrors) {
67
+ errors.push({ line: lineStart, message: msg });
68
+ }
69
+ }
70
+ // Pass 2: Extract legacy entries from remaining text
71
+ const legacy = parseLegacyEntries(content, consumed);
72
+ return { entries, legacy, errors };
73
+ }
74
+ // ============================================================================
75
+ // Validation
76
+ // ============================================================================
77
+ /**
78
+ * Validate a single parsed entry. Returns array of error messages (empty = valid).
79
+ */
80
+ export function validateSpecEntry(entry) {
81
+ const errors = [];
82
+ if (!entry.category) {
83
+ errors.push('Missing required attribute: category');
84
+ }
85
+ else if (!VALID_CATEGORIES.includes(entry.category)) {
86
+ errors.push(`Invalid category "${entry.category}". Must be one of: ${VALID_CATEGORIES.join(', ')}`);
87
+ }
88
+ if (entry.keywords.length === 0) {
89
+ errors.push('Missing required attribute: keywords (need at least 1)');
90
+ }
91
+ if (!entry.date) {
92
+ errors.push('Missing required attribute: date');
93
+ }
94
+ else if (!DATE_RE.test(entry.date)) {
95
+ errors.push(`Invalid date format "${entry.date}". Expected YYYY-MM-DD`);
96
+ }
97
+ return errors;
98
+ }
99
+ /**
100
+ * Validate that entry category matches the expected file category.
101
+ */
102
+ export function validateCategoryMatch(entry, fileCategory) {
103
+ if (entry.category && entry.category !== fileCategory) {
104
+ return `Entry category "${entry.category}" does not match file category "${fileCategory}"`;
105
+ }
106
+ return null;
107
+ }
108
+ // ============================================================================
109
+ // Formatting
110
+ // ============================================================================
111
+ /**
112
+ * Format parsed entries for display output.
113
+ * Strips `<spec-entry>` tags, shows clean content.
114
+ * If keyword provided, highlights matched entries.
115
+ */
116
+ export function formatSpecEntries(entries, keyword) {
117
+ const filtered = keyword
118
+ ? entries.filter(e => e.keywords.includes(keyword.toLowerCase()))
119
+ : entries;
120
+ if (filtered.length === 0)
121
+ return '';
122
+ return filtered.map(e => e.content).join('\n\n---\n\n');
123
+ }
124
+ /**
125
+ * Format a single entry for writing to a spec file.
126
+ */
127
+ export function formatNewEntry(category, keywords, date, title, content, source) {
128
+ const kwStr = keywords.map(k => k.toLowerCase().trim()).filter(Boolean).join(',');
129
+ const sourceAttr = source ? ` source="${source}"` : '';
130
+ return `<spec-entry category="${category}" keywords="${kwStr}" date="${date}"${sourceAttr}>\n\n### ${title}\n\n${content}\n\n</spec-entry>`;
131
+ }
132
+ // ============================================================================
133
+ // Internal helpers
134
+ // ============================================================================
135
+ function parseAttributes(attrStr) {
136
+ const attrs = {};
137
+ let m;
138
+ ATTR_RE.lastIndex = 0;
139
+ while ((m = ATTR_RE.exec(attrStr)) !== null) {
140
+ attrs[m[1]] = m[2];
141
+ }
142
+ return attrs;
143
+ }
144
+ function lineNumber(content, charIndex) {
145
+ let line = 1;
146
+ for (let i = 0; i < charIndex && i < content.length; i++) {
147
+ if (content[i] === '\n')
148
+ line++;
149
+ }
150
+ return line;
151
+ }
152
+ /**
153
+ * Parse legacy heading-based entries from text not consumed by <spec-entry> blocks.
154
+ */
155
+ function parseLegacyEntries(content, consumed) {
156
+ const lines = content.split('\n');
157
+ const legacy = [];
158
+ let currentOffset = 0;
159
+ // Build a set of line numbers that are inside <spec-entry> blocks
160
+ const consumedLines = new Set();
161
+ for (const range of consumed) {
162
+ const startLine = lineNumber(content, range.start);
163
+ const endLine = lineNumber(content, range.end);
164
+ for (let i = startLine; i <= endLine; i++) {
165
+ consumedLines.add(i);
166
+ }
167
+ }
168
+ let current = null;
169
+ for (let i = 0; i < lines.length; i++) {
170
+ const lineNum = i + 1;
171
+ if (consumedLines.has(lineNum))
172
+ continue;
173
+ const line = lines[i];
174
+ const m = line.match(LEGACY_HEADING_RE);
175
+ if (m) {
176
+ if (current) {
177
+ const body = current.bodyLines.join('\n').trim();
178
+ if (body) {
179
+ legacy.push({ title: current.title, content: `### ${current.title}\n\n${body}`, lineStart: current.lineStart });
180
+ }
181
+ }
182
+ current = { title: m[2].trim(), bodyLines: [], lineStart: lineNum };
183
+ }
184
+ else if (current) {
185
+ current.bodyLines.push(line);
186
+ }
187
+ }
188
+ if (current) {
189
+ const body = current.bodyLines.join('\n').trim();
190
+ if (body) {
191
+ legacy.push({ title: current.title, content: `### ${current.title}\n\n${body}`, lineStart: current.lineStart });
192
+ }
193
+ }
194
+ return legacy;
195
+ }
196
+ //# sourceMappingURL=spec-entry-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spec-entry-parser.js","sourceRoot":"","sources":["../../../src/tools/spec-entry-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkCH,+EAA+E;AAC/E,6CAA6C;AAC7C,+EAA+E;AAE/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AAG9G,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,qFAAqF;AACrF,MAAM,aAAa,GAAG,iDAAiD,CAAC;AAExE,2CAA2C;AAC3C,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAEtC,+CAA+C;AAC/C,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC,6EAA6E;AAC7E,MAAM,iBAAiB,GAAG,uEAAuE,CAAC;AAElG,sBAAsB;AACtB,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAEtC,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,OAAO,GAAsB,EAAE,CAAC;IACtC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,mEAAmE;IACnE,MAAM,QAAQ,GAA0C,EAAE,CAAC;IAE3D,sCAAsC;IACtC,IAAI,KAA6B,CAAC;IAClC,aAAa,CAAC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AAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;QACtE,CAAC;aAAM,IAAI,OAAO,EAAE,CAAC;YACnB,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QACjD,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,OAAO,CAAC,KAAK,OAAO,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;QAClH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"spec-init.d.ts","sourceRoot":"","sources":["../../../src/tools/spec-init.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAwMD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CA0B9D"}
1
+ {"version":3,"file":"spec-init.d.ts","sourceRoot":"","sources":["../../../src/tools/spec-init.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AA8KD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CA0B9D"}