Imported from willhama/md-file-study (
corpus/code-yeongyu__oh-my-openagent/files/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md). Install upstream withnpx skills add willhama/md-file-study --skill start-work-continuation. Copyright stays with the author.
Repository Conventions
Conventions for human contributors and AI agents working on this repository.
Stack
- Node >=20 runtime.
- npm package manager.
- TypeScript 6 strict mode.
- Biome 2 linting and formatting.
- Vitest 4 test runner.
Forbidden
- No
as anyoras unknown. - No
@ts-ignoreor@ts-expect-error. - No enums.
- No non-null assertions.
- No default exports.
vitest.config.tsis exempt because the framework requires that shape.
File Ceiling
- Keep each
src/TypeScript file under 250 pure LOC. - Split by responsibility before a file reaches the ceiling.
Test Discipline
- Use Vitest with nested
describenames in#given,#when, and#thenform, or inline// given,// when, and// thencomments. - Never use Arrange-Act-Assert comments.
- Keep fixtures in
test/fixtures/.
Layout
src/boulder-reader.ts: reads.omo/boulder.json, resolves the active work for the session, re-exportsgetPlanChecklist/PlanChecklistfromplan-checklist.ts.readContinuationStatereturns null only when the plan has no readable top-level checklist (total === 0).src/plan-checklist.ts:PlanChecklist(completed/remaining/total/nextTaskLabel) andgetPlanChecklist/parsePlanChecklist. Counts structured## TODOsrows (N. <title>) and## Final Verification Waverows (F<number>. <title>); falls back to simple top-level- [ ]/- [x]checkboxes. Skips fenced blocks and respects#/##section boundaries.src/codex-hook.ts: Stop/SubagentStop hook; fillsREMAINING_COUNT/TOTAL_COUNT/NEXT_TASK_LABELfrom the checklist intodirective.md.directive.md: directive template with placeholders, applied per invocation.
Build and Hooks
- Build output goes to
dist/. hooks/hooks.jsonregisters CodexStopandSubagentStophooks.- Hook commands run
node ${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js hook stopandnode ${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js hook subagent-stop.
Constraints
- Never let the hook block a Codex turn because of malformed input.
- Never make a network call from the hook.
- Keep the directive in
directive.md. Do not inline it into TypeScript files. - The hook only continues sessions listed in
.omo/boulder.jsonascodex:<session_id>. - The hook continues while the plan has a readable top-level checklist (
total > 0). A fully-checked plan still blocks Stop until the final gate runs and the Boulder work is marked completed; an unreadable or empty checklist yields no output.