From 1b9eb2e35bb72c974036dc1b77c45f4d96b2306d Mon Sep 17 00:00:00 2001 From: Justin Parker Date: Tue, 3 Nov 2026 04:08:09 -0800 Subject: [PATCH] Post one phase-file doc in a build instead of a duplicate task list AI Assisted --- scripts/capture-screenshots.mjs | 2 +- scripts/screenshots/build.json | 12 ------------ scripts/screenshots/signoff.json | 8 ++++---- scripts/screenshots/stop.json | 8 ++++---- scripts/test-web-console-subagents.mjs | 16 +++++----------- src/web-console/notes/implement.md | 6 +++--- 6 files changed, 17 insertions(+), 35 deletions(-) diff --git a/scripts/capture-screenshots.mjs b/scripts/capture-screenshots.mjs index 624201d..0a04903 100644 --- a/scripts/capture-screenshots.mjs +++ b/scripts/capture-screenshots.mjs @@ -74,7 +74,7 @@ const SHOTS = { }, question: { workflow: "plan", posts: ["question"] }, doc: { workflow: "plan", posts: ["doc"], tab: "What we've agreed" }, - build: { workflow: "implement", posts: ["build"], tab: "Phase 3 tasks" }, + build: { workflow: "implement", posts: ["build"], tab: "phase-3.md" }, signoff: { workflow: "implement", posts: ["signoff"] }, finish: { workflow: "implement", posts: ["signoff", "finish"] }, ask: { workflow: "plan", posts: ["question"], ask: "Where are tasks paged?" }, diff --git a/scripts/screenshots/build.json b/scripts/screenshots/build.json index 4b6a98d..9d44b88 100644 --- a/scripts/screenshots/build.json +++ b/scripts/screenshots/build.json @@ -7,18 +7,6 @@ "total": 11 }, "docs": [ - { - "id": "phase", - "title": "Phase 3 tasks", - "version": 6, - "blocks": [ - { - "id": "tasks", - "state": "settled", - "md": "- [x] **Task 3.1:** Register the /tasks routes plugin\n- [x] **Task 3.2:** Add GET /tasks with cursor paging\n- [x] **Task 3.3:** Add GET /tasks/:id\n- [x] **Task 3.4:** Add POST /tasks with a Zod schema\n- [x] **Task 3.5:** Add PATCH /tasks/:id for status and fields\n- [ ] **Task 3.6:** Add DELETE /tasks/:id as a soft delete\n- [ ] **Task 3.7:** Filter GET /tasks by status and assignee\n- [ ] **Task 3.8:** Return one error shape for 400, 404 and 409\n- [ ] **Task 3.9:** Document the endpoints in openapi.yaml\n- [ ] **Task 3.10:** Write tests for paging, filters and validation\n- [ ] **Task 3.11:** Run the test suite and record the results" - } - ] - }, { "id": "phasefile", "title": "phase-3.md", diff --git a/scripts/screenshots/signoff.json b/scripts/screenshots/signoff.json index 3593486..74b7429 100644 --- a/scripts/screenshots/signoff.json +++ b/scripts/screenshots/signoff.json @@ -8,14 +8,14 @@ }, "docs": [ { - "id": "phase", - "title": "Phase 3 tasks", + "id": "phasefile", + "title": "phase-3.md", "version": 12, "blocks": [ { - "id": "tasks", + "id": "body", "state": "settled", - "md": "- [x] **Task 3.1:** Register the /tasks routes plugin\n- [x] **Task 3.2:** Add GET /tasks with cursor paging\n- [x] **Task 3.3:** Add GET /tasks/:id\n- [x] **Task 3.4:** Add POST /tasks with a Zod schema\n- [x] **Task 3.5:** Add PATCH /tasks/:id for status and fields\n- [x] **Task 3.6:** Add DELETE /tasks/:id as a soft delete\n- [x] **Task 3.7:** Filter GET /tasks by status and assignee\n- [x] **Task 3.8:** Return one error shape for 400, 404 and 409\n- [x] **Task 3.9:** Document the endpoints in openapi.yaml\n- [x] **Task 3.10:** Write tests for paging, filters and validation\n- [x] **Task 3.11:** Run the test suite and record the results" + "md": "# Phase 3: API endpoints\n\n**Status:** Complete\n**Estimated Tasks:** 11\n\n## Tasks\n\n- [x] **Task 3.1:** Register the /tasks routes plugin\n- [x] **Task 3.2:** Add GET /tasks with cursor paging\n- [x] **Task 3.3:** Add GET /tasks/:id\n- [x] **Task 3.4:** Add POST /tasks with a Zod schema\n- [x] **Task 3.5:** Add PATCH /tasks/:id for status and fields\n- [x] **Task 3.6:** Add DELETE /tasks/:id as a soft delete\n- [x] **Task 3.7:** Filter GET /tasks by status and assignee\n- [x] **Task 3.8:** Return one error shape for 400, 404 and 409\n- [x] **Task 3.9:** Document the endpoints in openapi.yaml\n- [x] **Task 3.10:** Write tests for paging, filters and validation\n- [x] **Task 3.11:** Run the test suite and record the results" } ] }, diff --git a/scripts/screenshots/stop.json b/scripts/screenshots/stop.json index 81049ba..d2fa9cd 100644 --- a/scripts/screenshots/stop.json +++ b/scripts/screenshots/stop.json @@ -9,13 +9,13 @@ }, "docs": [ { - "id": "phase", - "title": "Phase 3 tasks", + "id": "phasefile", + "title": "phase-3.md", "blocks": [ { - "id": "tasks", + "id": "body", "state": "settled", - "md": "- [x] **Task 3.1:** Add GET /tasks with cursor paging\n- [x] **Task 3.2:** Add POST /tasks\n- [ ] **Task 3.3:** Add PATCH /tasks/:id\n- [ ] **Task 3.4:** Add DELETE /tasks/:id" + "md": "# Phase 3: API endpoints\n\n**Status:** In Progress\n\n## Tasks\n\n- [x] **Task 3.1:** Add GET /tasks with cursor paging\n- [x] **Task 3.2:** Add POST /tasks\n- [ ] **Task 3.3:** Add PATCH /tasks/:id\n- [ ] **Task 3.4:** Add DELETE /tasks/:id" } ] } diff --git a/scripts/test-web-console-subagents.mjs b/scripts/test-web-console-subagents.mjs index a051ecf..462028e 100644 --- a/scripts/test-web-console-subagents.mjs +++ b/scripts/test-web-console-subagents.mjs @@ -452,24 +452,21 @@ test("docs: a doc's version never goes back; the same version again is fine, and test("docs: a second phase in one build session goes through as notes/implement.md teaches it", () => { const md = fs.readFileSync(path.join(ROOT, "src", "web-console", "notes", "implement.md"), "utf8"); - assert.match(md, /A later phase posts the same two docs/); + assert.match(md, /A later phase posts the same doc with the new title and file/); assert.match(fs.readFileSync(path.join(ROOT, "src", "web-console", "console-docs.md"), "utf8"), /`version`: moves by itself when content changes and never goes back; leave it out/); const taught = consoleSession(["--workflow", "implement"]); try { // As taught: no version anywhere, and the second phase simply goes through. const phase = (n, md) => ({ headline: { stage: `Phase ${n}`, cleared: 0 }, - docs: [ - { id: "phase", title: `Phase ${n} tasks`, blocks: [{ id: "tasks", state: "settled", md }] }, - { id: "phasefile", title: `phase-${n}.md`, blocks: [{ id: "body", state: "settled", md }] }, - ], + docs: [{ id: "phasefile", title: `phase-${n}.md`, blocks: [{ id: "body", state: "settled", md }] }], }); assert.equal(postPatch(taught, phase(1, "- [ ] Task 1.1")).status, 0); assert.equal(postPatch(taught, phase(1, "- [x] Task 1.1")).status, 0); assert.equal(postPatch(taught, phase(2, "- [ ] Task 2.1")).status, 0); assert.deepEqual( readState(taught.session).docs.map((d) => [d.id, d.title, d.version]), - [["phase", "Phase 2 tasks", 3], ["phasefile", "phase-2.md", 3]] + [["phasefile", "phase-2.md", 3]] ); } finally { cli(["stop", "--session", taught.sid, "--force"]); @@ -479,10 +476,7 @@ test("docs: a second phase in one build session goes through as notes/implement. try { const phase = (n, version, md) => ({ headline: { stage: `Phase ${n}`, cleared: 0 }, - docs: [ - { id: "phase", title: `Phase ${n} tasks`, version, blocks: [{ id: "tasks", state: "settled", md }] }, - { id: "phasefile", title: `phase-${n}.md`, version, blocks: [{ id: "body", state: "settled", md }] }, - ], + docs: [{ id: "phasefile", title: `phase-${n}.md`, version, blocks: [{ id: "body", state: "settled", md }] }], }); assert.equal(postPatch(s, phase(1, 1, "- [ ] Task 1.1")).status, 0); assert.equal(postPatch(s, phase(1, 2, "- [x] Task 1.1")).status, 0); @@ -492,7 +486,7 @@ test("docs: a second phase in one build session goes through as notes/implement. const docs = readState(s.session).docs; assert.deepEqual( docs.map((d) => [d.id, d.title, d.version]), - [["phase", "Phase 2 tasks", 3], ["phasefile", "phase-2.md", 3]] + [["phasefile", "phase-2.md", 3]] ); } finally { cli(["stop", "--session", s.sid, "--force"]); diff --git a/src/web-console/notes/implement.md b/src/web-console/notes/implement.md index 76c7f73..076c8bc 100644 --- a/src/web-console/notes/implement.md +++ b/src/web-console/notes/implement.md @@ -5,17 +5,17 @@ ## First post of a phase ```jsonc -{"headline":{"stage":"Phase 3: API layer","cleared":0,"total":9},"docs":[{"id":"phase","title":"Phase 3 tasks","blocks":[{"id":"tasks","file":"specs//phase-3.md","select":"tasks"}]},{"id":"phasefile","title":"phase-3.md","blocks":[{"id":"body","file":"specs//phase-3.md"}]}],"agent":{"status":"working","activity":"Checking the prerequisites","quietMinutes":15}} +{"headline":{"stage":"Phase 3: API layer","cleared":0,"total":9},"docs":[{"id":"phasefile","title":"phase-3.md","blocks":[{"id":"body","file":"specs//phase-3.md"}]}],"agent":{"status":"working","activity":"Checking the prerequisites","quietMinutes":15}} ``` -`phase` is the task list, `phasefile` the whole file. A later phase posts the same two docs with the new title and file. +`phasefile` is the whole file, so its task list is already on the page; no separate tasks doc is posted. A later phase posts the same doc with the new title and file. ## After every task With the checkbox write: ```jsonc -{"headline":{"cleared":4},"docs":[{"id":"phase","refresh":true},{"id":"phasefile","refresh":true}],"agent":{"activity":"Task 5 of 9: the rate limiter"}} +{"headline":{"cleared":4},"docs":[{"id":"phasefile","refresh":true}],"agent":{"activity":"Task 5 of 9: the rate limiter"}} ``` The Phase Completion Summary lands in `phasefile` the same way. Then the `chat` check.