Files
tireless/CLAUDE.md
rob thijssen 4e42f87576
Some checks failed
deploy / build (push) Has been cancelled
deploy / deploy (push) Has been cancelled
feat(tireless): scaffold workspace, dashboard and staged design plan
Autonomous issue-to-PR driver for Claude Code and OpenCode, structured per
lair/architecture generic.md.

Workspace: entities/core/data/agent library crates plus api, worker and cli
binaries. Two pieces of real logic land with tests — lane routing (cc for
judgement, oc for specification) and the limit governor.

Constraints encoded as code rather than comments:
- agents are spawned as vendor binaries; tireless never calls a provider API
- ANTHROPIC_API_KEY is never set by tireless, only passed through
- assert_not_anthropic refuses to start an OpenCode lane pointed at Anthropic
- every run passes the governor; provider rate-limit signals win over our own
  accounting

Deployment assets target bob.hanzalova.internal:23296 (registered in
port-allocations.md), fronted by hanzalova at tireless.internal.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DHhHtohxcdk1PL3tfnYJdH
2026-08-02 12:46:42 +03:00

2.3 KiB

tireless — agent instructions

Read doc/plan/design.md before making changes. It carries the constraints, the staged plan, and the reasoning behind decisions that look arbitrary in isolation.

House conventions live in ~/git/architecture (generic.md is the baseline). This project's deliberate deviations are listed at the bottom of readme.md.

Invariants — do not "clean these up"

These are terms-of-service and safety constraints expressed as code. Each has tests. If one seems redundant, read design.md §3 before touching it.

  1. Never construct a request to a model provider. Agents are spawned as the vendor's own binary and authenticate themselves. Adding an HTTP client that talks to api.anthropic.com would break the arrangement that lets a subscription back this app.

  2. Never read or forward agent credentials. has_credentials() stats ~/.claude.json and nothing more. Do not parse it, copy it, or pass its contents anywhere.

  3. Never set ANTHROPIC_API_KEY. It reaches Claude Code only if an operator put it in the unit environment. Its presence selects pay-as-you-go; its absence selects the subscription. That choice is the operator's.

  4. Never point the OpenCode lane at Anthropic. assert_not_anthropic is checked at startup against both provider id and base URL. Local gateways that merely serve an Anthropic-compatible surface (helexa cortex) are fine and are tested for.

  5. Never let a lane run unbounded. Every agent invocation passes through tireless_core::budget::Governor. Provider rate-limit signals are checked first and are authoritative.

  6. Postgres is the authority on claims, not forge labels. Labels are a best-effort mirror. Do not make a decision by reading a label that could be made by reading the database.

Quality gate

Before considering a change complete:

cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo test --workspace
cd dashboard && npm run build

Commits

Conventional Commits (type(scope): subject), imperative, under ~70 chars. Commit autonomously when the work is a coherent, complete unit; hold off when follow-ups on the same topic are likely. See generic.md §12.