Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(api): exercise landed flow replay in its catalog [A1,R2]

Corey Olson5075f2176369
diff --git a/docs/api.md b/docs/api.md
index fc57c6cc..24e010e0 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -102,6 +102,7 @@ For example: `flow: review wait average 61 min (1 measured; > 60 min); bottlenec
| `list` | `version:number`, `items:array` |
| `queue` | `version:number`, `releases:array`, `unreleased:array`, `first:object` |
| `map` | `version:number`, `main:string`, `map:string` |
+| `flow replay` | `version:number`, `history:object`, `replay:object` |
| `roadmap` | `version:number`, `milestones:array` |
| `milestone add` | `version:number`, `milestone:object` |
| `milestone items` | `version:number`, `milestone:object` |
diff --git a/src/json.js b/src/json.js
index ccae6894..53bea67c 100644
--- a/src/json.js
+++ b/src/json.js
@@ -34,6 +34,7 @@ export const JSON_SHAPES = {
list: shape({ items: 'array' }),
queue: shape({ releases: 'array', unreleased: 'array', first: 'object' }),
map: shape({ main: 'string', map: 'string' }),
+ 'flow replay': shape({ history: 'object', replay: 'object' }),
roadmap: shape({ milestones: 'array' }),
'milestone add': shape({ milestone: 'object' }),
'milestone items': shape({ milestone: 'object' }),
diff --git a/test/api-catalog.test.js b/test/api-catalog.test.js
index 393f6143..afaa959d 100644
--- a/test/api-catalog.test.js
+++ b/test/api-catalog.test.js
@@ -801,6 +801,17 @@ catalogCase('[A1] catalog commands keep their real repository exercises', async
assert.equal(handoff.resume.agent, joined.agent);
});
+catalogCase('[A1,R1,R2] flow replay exposes its recorded history and replay through real CLI JSON', async () => {
+ const box = await project();
+ const result = await json(box, box.repo, 'flow', ['replay'], 'replay');
+ assert.equal(result.history.version, 1);
+ assert.ok(Array.isArray(result.history.events));
+ assert.equal(result.replay.mode, 'recorded');
+ assert.ok(Array.isArray(result.replay.items));
+ assert.ok(Array.isArray(result.replay.landingOrder));
+ assert.equal(typeof result.replay.stages, 'object');
+});
+
catalogCase('[A1,C7] map exposes its main stamp and every rendered view through real CLI JSON', async () => {
const box = await project();
mkdirSync(join(box.repo, 'src'), { recursive: true });