AGENTS.md
EzAgent contributor guide
EzAgent is a modular LLM harness. Its CLI and TUI use a persistent daemon and external capability processes.
Where to look
Load the guide for the task at hand:
- Find code and owning documentation:
docs/index.md. - Change shipped tools, plugins, macros, or skills:
docs/cmd/ez-agent-builtin.md. - Choose an addon contract:
docs/agent-api/index.html. - Inspect JSONL frames and lifecycle:
docs/agent-api/jsonl-api.html. - Choose test commands or fixtures:
docs/tests.md.
ref/ is an untracked working area, not an authority. Use it only when the user points to it.
Commit attribution
- Preserve contributor authorship when applying submitted patches; do not replace it with a local default identity. For new work on Terry's behalf, use the human Git identity supplied by user-global instructions or the existing Git configuration.
- End commits containing AI-written code, tests or scripts with a
Coded by AI --line naming the actual provider/model IDs used for that commit. - Name only models actually used, and distinguish coding and review roles when known. Use available runtime metadata to identify the current model; ask when identity is unknown. Do not infer authorship from earlier commits or from the provider/model that the code supports.
- For AI-assisted commits without AI-written code, describe the contribution accurately in the final line, such as
Documentation by AI --orReviewed by AI --, followed by the models used. Do not claim AI coded a documentation-only or review-only change. - Historical AI attribution notes record uncertain provenance. Their lists of possible models are not verified model authorship and must not be reused as attribution for new commits.
Issue and PR comment attribution
- Every agent-authored comment on git.cafe issues and pull requests, including replies and review comments, must end with an agent signoff line:
Agent signoff -- <provider>/<model ID>. - Use the actual provider/model identity of the agent writing the comment. Follow the identity-verification rules under Commit attribution; do not post with a guessed identity or omit the signoff.
Approval boundaries
The approved SQLite baseline is schema v2: v1 plus the sparse proprietary_thinking_data table for provider-native thinking attached to assistant turns, with PRAGMA user_version = 2. Existing v1 databases migrate to v2 on open; new databases run both migrations. This approval covers the native-thinking persistence change, not future schema changes.
Ask before these changes unless the user has already explicitly approved them:
- Adding a new third-party project dependency. Standard libraries and existing dependencies need no approval.
- Changing SQLite tables, columns, indexes, triggers, or constraints. Ask whether existing databases need an upgrade path; do not assume one is required. Changing metadata in existing columns is not a schema change. Incrementing
PRAGMA user_versionalso requires approval. - Changing the JSONL wire contract, including frames, fields, or lifecycle semantics. Internal refactoring that preserves the contract needs no approval.
Runtime safety
- Use the standard isolated daemon test fixtures. For manual client/service launches, isolate all three XDG directories from live user state. Compilation alone needs no isolation.
- Stop only the exact test daemon under its isolated environment. Never use broad
pkill/killallcommands. - Never inspect auth files.
config.yamlconfigures the service;auth.yamlcontains secrets.
Working defaults
Follow explicit task instructions over these defaults. Ordinary implementation choices within the approval and safety boundaries need no permission pause.
- Keep the daemon focused on orchestration and capability providers in external JSONL socket or stdio processes. Tool calls are sequential unless the tool opts into parallelism.
- Preserve per-leaf isolation so blocked work on one leaf cannot block another.
- Share common AgentHub connection machinery across agent-to-Hub and Hub-to-Hub flows; keep role-specific identity, authorization and protocol policies explicit.
- Socket and stdio share one JSONL API and dispatch. Extra startup data for preconfigured services is initialization, not a separate transport API.
- Update owning documentation when behavior, contracts, or package boundaries change. Document approved JSONL contract changes in
docs/agent-api/jsonl-api.html. - Documentation describes current behavior and package boundaries. Keep executable tests and their data with the code, not under
docs/. Remove implemented plans, correction logs and acceptance ledgers rather than archiving them in the repository; Git holds the history. - Keep durable regression tests for supported behavior. Remove temporary investigation scripts and one-off tests after use. For skill infrastructure changes, cover parsing, discovery, delivery, and activation as affected. Review skill prose as documentation rather than locking its wording into tests.
- Before completion, check new repository-root files and remove unintended artifacts. Use
just clean-orphanedfor known stray command binaries. Add root-level files only when the task requires them; keep accidental outputs out rather than adding ignore rules.
Test ownership and repetition
- Test our wrapper and API contracts rather than re-testing third-party libraries. Controlled fakes are appropriate for dependencies, timing and failure injection; preserve the behavior under assertion and retain focused real-TLS integration coverage for security-sensitive wiring.
- Default Go validation is
just test-go, excluding AgentHub-owned packages;just test-quickuses that same Go scope. Runjust test-go-agenthubfor Hub changes or affected shared dependencies. Shared CLI/frontend/TUI regressions remain in the default scope.just test-go-all,just test-full-offlineandjust testexplicitly include AgentHub; do not choose them for unrelated work unless full-repository coverage is requested. - While editing, run spot tests for the changed behavior and relevant callers. Use focused race tests for changes to concurrent ownership, cancellation or shutdown. Do not self-assign full-offline, broad race, maximum-capacity or complete computer-use runs.
- In multi-agent work, the orchestrator assigns one owner for each validation scope. Implementation agents report their focused commands, results and untested scope. Reviewers reuse those results and check missing coverage rather than repeating the same tests.
- At merge review, the integration owner runs the authoritative
just buildand one selected offline aggregate after assembling and reviewing the changes. Standalone contributors own that integration step themselves; finishing an editing task does not require a separate aggregate. Implementation agents may use targeted builds, writing outputs to./build/, without repeating the shared full build. - Choose coverage before running it.
just test-full-offlinealready includes the Go, Ruby and offline Python stages; do not precede it with quick/full Go or follow it with an E2E suite it already contains. Assign additional race or capacity checks only for a specific uncovered risk. - If integration finds a regression, reproduce and correct it with spot tests first. The integration owner then reruns the necessary validation. Other agents must not launch their own aggregates or queue duplicate gates behind a shell lock.
- Keep recurring commands and their flags consistent so Go can reuse successful results. Do not add
-count=1or repetition counts by default; use fresh execution deliberately for reproduction, timing or flake investigation. Reuse results only when tested source, helpers and relevant environment are unchanged. Failed packages, changed test binaries and different selections need new results. - Routine repeat validation should fit within ten minutes, including necessary build and focused race work. Reduce duplicate setup and obsolete coverage to meet that budget; an all-cached pass or renaming a slow run does not demonstrate it. Preserve distinct TLS/security, persistence and lifecycle assertions.
- Computer-use checks are selected as needed for the affected interaction, not a mandatory full journey. Requested manual/tmux checks are documented in
docs/computer-use-tests.md. Run online/LLM-dependent tests only when explicitly requested by the user. - Use the commands and isolated fixtures in
docs/tests.md. Documentation-only changes need relevant checks, and a rebuild when validating embedded resources. Test commands belong in thejustfile, not historical per-feature completion checklists.