Guidance for AI coding agents working in this repository. Humans: see CONTRIBUTING.md — everything there applies to agents too. Follows the ecosystem AGENTS.md standard (Gatehouse pattern): repo layout, branch & merge discipline, pre-commit checks, tooling, cross-session continuity, infra facts.
crates/tole-core— platform-agnostic library (state machine, JSONL storage,Tool/Approver/Storage/Providertraits, tools, provider). Published to crates.io; embedders build--no-default-features.crates/tole-cli— headless CLI host (thetolebinary). Published to crates.io; during work always run the freshly built./target/release/tole, never a PATH-resolved one.docs/— architecture, PRD, epics (roadmap + tracking issues), threat model, E8 retro.evals/— agentic regression harness (Tier 1 CI contracts, Tier 2 live missions, Tier 3 baselines)..cora.yaml— cora review configuration; known false-positive categories are encoded there as rules — extend the rule instead of sprinkling inline ignores.
develop= integration,main= release (tags only). Work happens as branch → PR → squash-merge intodevelop. No direct pushes, no force pushes. Branch names (CI-enforced):feat/*,fix/*,docs/*,chore/*,perf/*,security/*,refactor/*,test/*,build/*,ci/— notefeat/, notfeature/.- Language: every repository artifact (commits, PRs, issues, code comments, docs) is written in English.
- Commits: Conventional Commits; the PR title becomes the squash message.
- PR body: sections in order — What / Why / Changes / Testing (enforced by the PR Description check).
- Issues: larger changes are issue-first; use the issue templates; epics
live in
docs/epics.mdwith tracking issues. - Merge gate — never merge on assumption: CI green AND a real Cora verdict in the PR comments ("✅ No issues found" or concrete findings — "Review could not complete" is a blocker), code-scanning alerts investigated (real → fix with regression test; FP → dismiss with evidence), CI auto-fix max 3 attempts then escalate. Large change-sets (~40+ files) time out Cora Review (10-min limit) — split into ~15–20-file PRs.
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cora review --staged # exit 0 clean · exit 2 blocking → fix · exit 1 cora error (non-blocking)CI enforces the same set. There is no pre-commit hook installed by default — run these yourself.
These sibling tools are the ecosystem's force multipliers. Use them instead of reinventing or brute-forcing:
cora (code intelligence) — recall before edit, verify after:
cora index --stats— confirm the repo is indexed before relying on search (0 symbols → runcora index).cora brain "<topic>" --json— semantic recall of existing patterns before writing code; prefer this over blind grep.cora callers <sym>/cora impact <sym>/cora affected <files>— mandatory before any refactor: who breaks, and which tests to rerun.cora query "main -> *"/cora trace <sym>/cora arch— structure and path questions without reading whole files.cora dead-code— after removals;cora debt— trend checks.cora review --stagedbefore every commit (mandatory, see §3);cora scanafter significant or security-adjacent changes.
uteke (semantic memory) — continuity across sessions:
recallbefore starting unfamiliar work — the decision may already be recorded;rememberdurable outcomes and decisions of real work sessions (namespacerepo-tole, the ecosystem-widerepo-<name>convention).- Rooms
codecoradev-conventionsandcodecora-workflow-standardhold the ecosystem standards (branch strategy, PR/issue rules, merge gate, governance) — they are the source of truth when this file and reality disagree. - Long-form knowledge (runbooks, retros) goes through
uteke_document(markdown → durable, chunked, searchable).
Repo files are canonical over mirrors. Durable outcomes and decisions of
real work sessions belong in uteke (repo-tole); the ecosystem standards
records live in uteke rooms (above). Start a session on an unfamiliar area
with a recall; end a session that made decisions with a remember.
tole-corestays platform-agnostic: no stdin/stdout, no CLI assumptions. Host interaction goes through traits (Storage,Provider,Tool,Approver).- Session storage is append-only JSONL. Never mutate or delete entries; corrections are new entries.
- Every non-ReadOnly tool goes through an
Approver. No bypass path.Destructiveis structurally unregistrable without an interactive approver and never allowlistable — do not weaken the three enforcement layers (registry /AllowlistApprover/ host prompt). - MCP tools are always
Risk::Write. Server-supplied metadata is never trusted for risk classification. - Adding code is a last resort — first check whether configuration or an existing mechanism solves the problem.
The README status line and docs/epics.md must be updated in the same PR
that makes them stale. This regression has happened twice (#33 and again
2026-09) — do not ship a third one.
- 2026-09-18: cora 0.13.0 no longer reads the legacy
~/.cora/auth.toml/~/.cora/config.yaml. Until re-provisioned withcora auth login, exports are required:CORA_API_KEY,CORA_BASE_URL,CORA_MODEL(verified working — review returns a real verdict with these three set). - 2026-09-12: only
tole-corewas on crates.io; as of the 0.3.0 releases bothtole-coreandtole-cli(0.3.0) are published. The registry copy still lags the checkout — live missions run the freshly built./target/release/tole(see CONTRIBUTING → Live-mission binary hygiene).