feat(omo-codex): add start-work continuation component

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-28 16:14:42 +09:00
parent 38265c5993
commit ced472dedf
30 changed files with 1125 additions and 0 deletions
@@ -0,0 +1,63 @@
import { describe, expect, it } from "vitest";
import { parsePlanChecklist } from "../src/boulder-reader.js";
describe("start-work plan checklist parser", () => {
it("#given top-level completed and incomplete checkboxes #when parsed #then counts remaining and total", () => {
// given
const markdown = ["# Plan", "", "## TODOs", "- [ ] First", "- [x] Done", "- [X] Also done", "- [ ] Second"].join(
"\n",
);
// when
const checklist = parsePlanChecklist(markdown);
// then
expect(checklist).toEqual({ remaining: 2, total: 4, nextTaskLabel: "First" });
});
it("#given nested checkboxes #when parsed #then ignores non-column-zero items", () => {
// given
const markdown = ["## TODOs", "- [ ] Top-level", " - [ ] Nested", "\t- [ ] Tab nested", "- [x] Complete"].join(
"\n",
);
// when
const checklist = parsePlanChecklist(markdown);
// then
expect(checklist).toEqual({ remaining: 1, total: 2, nextTaskLabel: "Top-level" });
});
it("#given checkboxes outside counted sections #when parsed #then ignores unrelated top-level tasks", () => {
// given
const markdown = [
"# Plan",
"- [ ] Preamble task",
"## TODOs",
"- [ ] Build hook",
"## Acceptance Criteria",
"- [ ] Acceptance item",
"## Final Verification Wave",
"- [x] Run tests",
"- [ ] Run smoke",
].join("\n");
// when
const checklist = parsePlanChecklist(markdown);
// then
expect(checklist).toEqual({ remaining: 2, total: 3, nextTaskLabel: "Build hook" });
});
it("#given all top-level tasks complete #when parsed #then next task is null", () => {
// given
const markdown = ["## TODOs", "- [x] First", "- [X] Second"].join("\n");
// when
const checklist = parsePlanChecklist(markdown);
// then
expect(checklist).toEqual({ remaining: 0, total: 2, nextTaskLabel: null });
});
});