harness-kit / odin
CLAUDE.md100 starsChanged 9 months agoMITView on GitHub
This file provides project-specific guidance for coding agents working in odin/. Odin is a task-board orchestration CLI for human + AI collaboration. Treat it as a flexible board system where planning, execution, review, and assembly are all represented as tasks, not hardcoded pipeline stages. Only Claude Code supports --mcp-config — all other CLIs rely on project-local config auto-discovery. Auth tokens are extracted from the backend's TaskItAuth handler.
- Reads credentials
- Installs packages
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- harness_usage_status/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- harness_usage_status/CLAUDE.mdCLAUDE.md
- taskit/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- fable-auditSkill
- hk-arch-auditSkill
- hk-autonomy-auditSkill
- hk-breadcrumb-creatorSkill
- hk-changelogSkill
- hk-compoundSkill
- hk-follow-breadcrumbSkill
- hk-local-diagnoseSkill
- hk-local-logsSkill
- hk-local-run-specSkill
- hk-merge-resolveSkill
- hk-mock-firstSkill
- hk-rcaSkill
- hk-refineSkill
- hk-scout-wikiSkill
- hk-shift-changelogSkill
- hk-skill-creatorSkill
- hk-slop-auditSkill
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Keep staged flow healthy: plan -> review (specs / status / show / assign) -> exec.
- Distinctive: line 19
Do not introduce rigid behavior that forces one fixed sequence.
- Very specific: line 29
Keep graceful degradation when optional integrations are unavailable (for example quota data from harness_usage_status).
- Very specific: line 41
Only Claude Code supports --mcp-config — all other CLIs rely on project-local config auto-discovery.
- Distinctive: line 54
Keep defaults safe and usable when no config file exists.
- Distinctive: line 55
Prefer additive config changes over breaking schema churn.
- Very specific: line 68
When behavior changes, update odin/docs/ and odin/README.md to stay aligned on the task-board model, suggestive assignment, and staged …
- Distinctive: line 86
When adding features or fixing bugs:
- Very specific: line 87
Check tests/TEST_PLAN.md for related unchecked items
- Very specific: line 88
After writing tests, mark items as [x] in the plan and update testcase_readme.md
- Distinctive: line 89
If new testable behavior is introduced, add it to both docs
- Distinctive: line 90
Place new tests in the appropriate subdirectory based on their dependency profile
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides project-specific guidance for coding agents working in odin/.
Mission
Odin is a task-board orchestration CLI for human + AI collaboration. Treat it as a flexible board system where planning, execution, review, and assembly are all represented as tasks, not hardcoded pipeline stages.
Core Product Rules
- Default first:
odin runand staged commands should work out of the box with sensible defaults. - Suggestive, not prescriptive: planner assignments are recommendations; users can reassign before execution.
- Everything is a task: implementation, review, validation, and assembly can all be created as normal tasks.
- Human in the loop: preserve user control and easy override paths in CLI and task state.
Workflow Expectations
- Keep staged flow healthy:
plan-> review (specs/status/show/assign) ->exec. - Do not introduce rigid behavior that forces one fixed sequence.
- Preserve prefix-based task ID UX (
odin show a1b2,odin assign d4e5 gemini).
Architectural Guardrails
src/odin/orchestrator.pycoordinates planning and single-task execution. Creates spec archives and tags tasks withspec_id.src/odin/specs.pymanages spec archives (.odin/specs/) and derives spec status from tasks (pure function, no stored status).src/odin/taskit/is the task backend (JSON files + index) with task lifecycle, prefix resolution, andspec_idfiltering.src/odin/backends/contains pluggable task backends (local disk, TaskIt REST). Registry/decorator pattern.src/odin/harnesses/contains agent integrations using the registry/decorator pattern.- Keep graceful degradation when optional integrations are unavailable (for example quota data from
harness_usage_status). - No
run.json— all state lives in spec archives + tasks. Spec status is always derived. - Single-task executor — odin executes one task at a time via
exec_task(). Dependency resolution and scheduling belong to TaskIt + Celery. No bulkexec_all(). - Mock mode —
exec_task(mock=True)skips all backend writes (status, comments, cost tracking). The harness still runs and returns results. src/odin/tools/core.pyisTaskItToolClient— shared HTTP client for task comments, questions, and proof-of-work. Used by both the CLI tool and the MCP server.src/odin/mcps/taskit_mcp/is the TaskIt MCP server. Thin wrapper overTaskItToolClientexposed as MCP tools via FastMCP. Blocking question/reply is the key feature —timeout=0polls indefinitely.MCP harness integration —
_generate_mcp_config()in orchestrator writes per-CLI MCP config files. Each CLI has its own config location and format:- Claude Code:
.mcp.json(also supports--mcp-configflag — orchestrator writes to.odin/logs/mcp_<task_id>.jsonand passes the path) - Gemini:
.gemini/settings.jsonin working dir (auto-discovered, no CLI flag) - Codex:
.codex/config.tomlin working dir (TOML format, auto-discovered) - Kilo Code / OpenCode:
opencode.jsonin working dir (bothkiloandopencodeCLIs read this; different JSON structure:"mcp"key,"type": "local",commandas array)
Only Claude Code supports
--mcp-config— all other CLIs rely on project-local config auto-discovery. Auth tokens are extracted from the backend'sTaskItAuthhandler.- Claude Code:
Agent Harness Conventions
- CLI harnesses are non-interactive subprocess wrappers with clear timeout/error handling.
- API harnesses should follow the same
BaseHarnesscontract and consistentTaskResultbehavior. - New harnesses must use
@register_harness("<name>")and be imported by registry bootstrap. - Respect
cli_commandoverrides from config instead of hardcoding binaries. - Streaming vs non-streaming parity: CLI harnesses have two code paths —
execute()(non-streaming) andexecute_streaming()(streaming). Both must produce equivalent filtered output. Raw stream-json from subprocess stdout contains protocol framing (system events, hooks, init messages) that must be stripped viaextract_text_from_stream()/extract_text_from_line()before the output is used. When modifying either path, verify the other stays consistent.
Config and Defaults
- Honor config precedence: explicit
--config->.odin/config.yaml->~/.odin/config.yaml-> built-in defaults. - Keep defaults safe and usable when no config file exists.
- Prefer additive config changes over breaking schema churn.
TaskIt Authentication
Set env vars in .env in the directory where Odin runs. Tokens are cached (1-hour lifetime, auto-refresh at 55 min). Without env vars, Odin connects without auth (for local dev).
ODIN_ADMIN_USER=admin@example.com # must exist in TaskIt with is_admin=True
ODIN_ADMIN_PASSWORD=your_passwordDocumentation Consistency
When behavior changes, update odin/docs/ and odin/README.md to stay aligned on the task-board model, suggestive assignment, and staged workflows.
Tests
Two reference docs in tests/:
testcase_readme.md— Complete test case index. One-liner per test, organized by file. Consult this to understand what's covered and where tests live.TEST_PLAN.md— Living checklist tracking coverage gaps and priorities. Check/update when adding features.
Tests are organized into subdirectories by dependency profile:
unit/— Pure logic, no I/O, no mocks. Fastest tests.disk/— Disk I/O but no network, no subprocesses.mock/— Mocked subprocesses/HTTP. No real services.integration/— Real CLI agents required. Excluded by default.
Shared fixtures live in conftest.py at the tests root.
When adding features or fixing bugs:
- Check
tests/TEST_PLAN.mdfor related unchecked items - After writing tests, mark items as
[x]in the plan and updatetestcase_readme.md - If new testable behavior is introduced, add it to both docs
- Place new tests in the appropriate subdirectory based on their dependency profile
Plan Modes
odin plan defaults to interactive mode (opens a tmux session where the user chats with the planning agent). For non-interactive use:
--auto— one-shot decomposition, streams output to stdout. Use for manual testing.--quiet— implies--auto, shows a spinner instead of streaming. Use for CI.
Important: odin plan (all modes) invokes claude -p as a subprocess. It cannot run from inside another Claude Code session (nested calls fail). Always test from a regular terminal.
Debugging Techniques
Run diagnostic scripts first. See root CLAUDE.md → "Data Inspection & Debugging" for the full script reference and decision table.
# Odin-specific log viewing (from working dir)
odin logs # Last 50 lines of latest run log
odin logs debug # odin_detail.log (tracebacks)
odin logs -f # Follow all running tasks
odin logs debug -f # Tail odin_detail.log
odin logs -b <board_id> # Access logs from any directory
tail -f ../taskit/taskit-backend/logs/taskit.log # TaskIt app logQuick Commands
Run from odin/:
pip install -e ".[dev]"
python -m pytest tests/ -v # static tests (integration/ excluded by default)
python -m pytest tests/unit/ -v # pure logic tests only
python -m pytest tests/disk/ -v # disk I/O tests only
python -m pytest tests/mock/ -v # mocked subprocess/HTTP tests only
python -m pytest tests/integration/ -v # integration tests (requires agent CLIs)
python -m pytest -m "not llm and not tmux_real" tests/ -v # skip markers
odin plan sample_specs/poem_spec.md # interactive (default, opens tmux)
odin plan sample_specs/poem_spec.md --auto # non-interactive, streams output
odin plan sample_specs/poem_spec.md --quiet # non-interactive, spinner only
odin specs
odin status
odin exec <task_id> # single-task execution (foreground)
odin exec <task_id> --mock # mock mode (no backend writes)
odin reflect <task_id> # trigger reflection audit on completed task
odin reflect <task_id> --model claude-opus-4-6 --agent claude # with explicit model/agentWorking directory: odin/temp_test_dir/ is the standard directory for running Odin + TaskIt together. It contains a .env with ODIN_ADMIN_USER, ODIN_ADMIN_PASSWORD, and ODIN_FIREBASE_API_KEY for authenticating against the live TaskIt backend. Odin's load_config() calls load_dotenv(cwd/.env) automatically. Integration tests also load from this .env via dotenv.
Manual integration test: From odin/temp_test_dir/, run odin init, then odin plan ../sample_specs/mini_spec.md --auto and odin exec <task_id>. This directory is not committed — create it as needed. Must run from a regular terminal (not inside Claude Code).
MCP server test: pip install -e ".[mcp]" then TASKIT_URL=http://localhost:8000 taskit-mcp (stdio). Use MCP Inspector: npx @modelcontextprotocol/inspector taskit-mcp.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

