Skip to content

Implement the work orchestrator commands - #5

Merged
tylerhogarth merged 1 commit into
feat/instruction-blockfrom
feat/orchestrator
Sep 1, 2026
Merged

Implement the work orchestrator commands#5
tylerhogarth merged 1 commit into
feat/instruction-blockfrom
feat/orchestrator

Conversation

@tylerhogarth

Copy link
Copy Markdown
Owner

Milestone 4 of the v0.1 plan: the deterministic commands agents use to track the operator's work, completing the v0.1 command surface.

Changes

  • Work state (src/work.ts): zod-validated ~/.tod/work.json holding projects, features, bugs, and tasks with ids and parent links. Pure state-transition functions (addItem, setStatus) keep mutations testable; saves go through the atomic boundary-checked write layer. Malformed state stops every command with a what/why/fix error and no changes.
  • tod work (src/commands/work.ts): add (with --project, --kind, --parent), done (multiple ids, idempotent with explicit "unchanged" reporting), status, and list. Projects come into existence the first time work is recorded against them; there is no registration step.
  • tod log (src/commands/log.ts): append-only timestamped JSON lines, the one write that intentionally skips temp-file-plus-rename because a rename would rewrite history.
  • tod config (src/commands/config.ts): get/set over the communication dimensions with values validated against the schema; set reminds the agent to run tod sync so blocks pick up the change.
  • tod status (src/commands/status.ts): operator-facing in-flight report across projects, hiding done items unless --all.
  • Tests (tests/orchestrator.test.ts): end-to-end runs against fake homes covering the add/list/done/status flow, idempotence, unknown-id and malformed-state failures, log append behaviour, and the config-set-then-sync render pipeline.

Why

This is the deterministic half of the harness contract: the instruction block tells agents to record work through these commands instead of interpreting file formats, so the commands carry the validation, atomicity, and guidance that make that rule safe to follow.

🤖 Generated with Claude Code

Work state is zod-validated JSON mutated only through the CLI; the log
is append-only JSON lines; config changes flow into instruction blocks
via tod sync. All mutations are atomic and idempotence is reported.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tylerhogarth
tylerhogarth merged commit dabc31a into main Sep 1, 2026
1 check passed
@tylerhogarth
tylerhogarth deleted the feat/orchestrator branch September 1, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant