AGENTS.md
Guidance for coding agents working on Thinklogi Harness Orchestrator in the thinklogi project.
Project overview
This guide covers harness/orchestrator.mjs. The orchestrator creates the first autonomous product state, proposes tasks from missing evidence, updates task statuses when evidence appears, and increments cycle metadata for the Codex-operated product harness.
Primary source files
- harness/orchestrator.mjs owns createInitialState, runHarnessCycle, proposeTasks, updateTaskFromEvidence, and completionEvidence.
- harness/goals.mjs defines the first measurable MVP goal.
- harness/agents.mjs defines role owners used by proposed tasks.
- tests/harness.test.mjs covers state creation, task proposal, and task completion from evidence.
Setup commands
npm run harness:init npm run harness:tick npm run harness:run npm test npm run build npm run dev
Change rules
- Keep task ids stable so existing state can be updated across cycles.
- Add new evidence flags before adding new completion mappings.
- Avoid creating duplicate tasks when runHarnessCycle is called repeatedly.
- Keep proposed tasks attached to the active goal id.
- Keep status transitions deterministic: proposed to accepted, then completed when evidence exists.
Testing
Cover empty evidence, complete evidence, repeated cycles, active goal missing from state, duplicate task prevention, and owner names that match the agent roster.
PR checklist
- npm test passes.
- Snapshot output remains readable by the app Agent screen.
- Harness cycle increments exactly once per runHarnessCycle call.