zeph
AGENTS.md68 starsChanged 6 months agoMITView on GitHub
All feature and system specifications live in specs/. Compliance is non-negotiable. - Before implementing any feature: read the relevant spec in specs/ and the system invariants in specs/001-system-invariants/spec.md. - Before modifying any subsystem: read the corresponding spec document. The ## Key Invariants and NEVER sections define hard constraints — violating them requires an explicit architectural decision, not just a code review. - Index: specs/README.md — maps every subsystem to its spec file. - Constitution: specs/constitution.md — project-wide non-negotiable rules that…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- book/AGENTS.mdAGENTS.md
- config/AGENTS.mdAGENTS.md
- crates/AGENTS.mdAGENTS.md
- docker/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- src/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
23 rules. About 0 are common, 6 are distinctive, and 17 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.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 6
Do not create git worktrees inside this repository.
- Very specific: line 10
All feature and system specifications live in specs/.
- Very specific: line 12
Before implementing any feature: read the relevant spec in specs/ and the system invariants in specs/001-system-invariants/spec.md.
- Very specific: line 14
Before modifying any subsystem: read the corresponding spec document.
- Distinctive: line 19
If a spec is missing or outdated for the area you are changing, create or update it before writing code.
- Very specific: line 26
Use cargo nextest run as the default test runner.
- Very specific: line 27
Keep Rust changes compatible with Edition 2024 and MSRV 1.100.
- Very specific: line 28
Prefer zero-warning clippy.
- Distinctive: line 35
All new functionality must be designed for multi-model operation.
- Very specific: line 41
All providers declared once in [[llm.providers]] with a name field.
- Very specific: line 45
All secrets and API keys are stored exclusively in the Zeph age vault.
- Distinctive: line 49
Do not treat unit/integration tests as sufficient validation for user-facing or agent-loop changes.
- Distinctive: line 52
After each live test session, review the resolved debug dump and log directories from the active config, plus metrics and agent responses, …
- Distinctive: line 53
Treat the configured runtime artifact directory as the primary evidence location for live runs: request/response payloads in the configured …
- Distinctive: line 56
When you find an anomaly, reproduce it, classify severity, and file a GitHub issue with clear repro steps and expected vs actual behavior.
- Very specific: line 58
Keep the test environment clean when relevant: clear the temporary runtime artifact directory, test DB state, audit logs, session logs, and …
- Very specific: line 71
After long compilation-heavy operations, periodically check available disk space.
- Very specific: line 74
Use Rust 2024 edition and MSRV 1.100.
- Very specific: line 75
Use snake_case for functions/modules/files, PascalCase for types/traits, and SCREAMING_SNAKE_CASE for constants.
- Very specific: line 78
Use cargo-nextest as the default runner.
- Very specific: line 83
Keep subject lines imperative and concise, and reference issues/PRs when relevant ((#736)).
- Very specific: line 84
Before every commit, run the full validation suite against the CI feature set (--features full where supported) and do not commit if any …
- Very specific: line 93
Do not commit secrets. All secrets must go through the Zeph age vault (zeph vault commands) — never environment variables or .env files.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.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
Repository Guidelines
Project Structure & Module Organization
Zeph is a Rust workspace (Cargo.toml) with the CLI entrypoint in src/ and domain crates in crates/ (for example: zeph-core, zeph-llm, zeph-memory, zeph-tools, zeph-tui).
Top-level integration tests live in tests/, while crate-specific tests and benches live under each crate’s tests/ and benches/ directories. Documentation sources are in book/src/ (mdBook), runtime defaults are in config/default.toml, and container assets are in docker/.
Do not create git worktrees inside this repository. Create separate worktrees only under the sibling directory ../worktrees/.
Specifications (MANDATORY)
All feature and system specifications live in specs/. Compliance is non-negotiable.
- Before implementing any feature: read the relevant spec in
specs/and the system invariants inspecs/001-system-invariants/spec.md. - Before modifying any subsystem: read the corresponding spec document. The
## Key InvariantsandNEVERsections define hard constraints — violating them requires an explicit architectural decision, not just a code review. - Index:
specs/README.md— maps every subsystem to its spec file. - Constitution:
specs/constitution.md— project-wide non-negotiable rules that apply to every change. - If a spec is missing or outdated for the area you are changing, create or update it before writing code.
Agent Operating Notes
AGENTS.md is the primary instruction file for all coding agents (Codex, Copilot, etc.). .claude/CLAUDE.md and .claude/rules/* are Claude-specific or supplemental context — not the primary source of operating rules.
Path-specific instructions for GitHub Copilot live in .github/instructions/*.instructions.md with applyTo frontmatter.
- Use
cargo nextest runas the default test runner. - Keep Rust changes compatible with Edition 2024 and MSRV
1.100. - Prefer zero-warning
clippy; avoidunwrap/expectin production code when proper error propagation is possible. - Any user-facing change must update relevant docs, config defaults, and
CHANGELOG.md([Unreleased]section). - For new functionality, provide all integration points: config section, CLI subcommand/argument, TUI command palette entry,
--initwizard,--migrate-configmigration step, live testing playbook in.local/testing/playbooks/, and coverage row in.local/testing/coverage-status.md. - In the TUI, every background operation (LLM inference, memory search, tool execution, MCP connection, etc.) must have a visible spinner with a short, descriptive status message.
Multi-Model Design
All new functionality must be designed for multi-model operation. Match models to task complexity:
- Simple tasks (entity extraction, embeddings, classification, routing): fast, cheap models (e.g.
gpt-4o-mini,qwen3:8b). - Medium tasks (summarization, compaction, skill matching): mid-tier models.
- Complex tasks (planning, code generation, multi-step reasoning): most capable models (e.g.
claude-opus-4).
All providers declared once in [[llm.providers]] with a name field. Subsystems reference a provider by name via a single *_provider field — no inline provider config duplication. When the field is empty, fall back to the default provider. Never hardcode a model name.
Secrets & Vault
All secrets and API keys are stored exclusively in the Zeph age vault. Never use environment variables, .env files, or shell profiles for secrets. All ZEPH_* keys are resolved automatically from the age vault at startup. To read a key for external scripts: cargo run --features full -- vault get <KEY_NAME>.
Continuous Improvement Protocol
- Continuous-improvement sessions are read-only: use them for live manual testing, anomaly detection, research, dependency review, and issue triage; do not make code changes in those sessions.
- Do not treat unit/integration tests as sufficient validation for user-facing or agent-loop changes. Run real end-to-end agent sessions with real LLM/tool execution via
cargo run --features full -- --config .local/config/testing.tomland use--tuiorRUST_LOG=debugwhen needed. - For continuous-improvement and ACP/IDE test runs, override runtime artifact paths in the active config to absolute temporary locations so logs, SQLite state, debug dumps, audit files, and other ephemeral outputs land under a dedicated temp directory instead of polluting the default user data directories. Prefer a per-session root such as
/tmp/zeph-ci/<timestamp>/. - At minimum, override
logging.file,memory.sqlite_path,debug.output_dir, and any other runtime-writing paths used by the scenario under test to absolute temp paths before launching the agent. - After each live test session, review the resolved debug dump and log directories from the active config, plus metrics and agent responses, for correctness, regressions, retries, timeouts, hallucinations, and tool-use quality.
- Treat the configured runtime artifact directory as the primary evidence location for live runs: request/response payloads in the configured debug dump directory and runtime traces in the configured log directory should be checked before drawing conclusions from terminal output alone.
- For GonkaGate continuous-improvement runs, use
.local/config/testing-gonkagate.toml. It must resolveZEPH_COMPATIBLE_GONKAGATE_API_KEYfrom the age vault only, targethttps://api.gonkagate.com/v1, useQwen/Qwen3-235B-A22B-Instruct-2507-FP8, and keep logs/debug/SQLite/audit artifacts under/tmp/zeph-ci/gonkagate. - Record every session in
.local/testing/journal.md, including positive confirmations, failures, scope, config used, and component status. When behavior changes, reset the affected component to untested until re-verified. - When you find an anomaly, reproduce it, classify severity, and file a GitHub issue with clear repro steps and expected vs actual behavior. Fixes must happen later in a dedicated implementation session, not during the continuous-improvement pass.
- Testing is a hard gate: when many components are untested or a batch of core changes landed, prioritize live validation before research, dependency updates, or new feature work.
- Keep the test environment clean when relevant: clear the temporary runtime artifact directory, test DB state, audit logs, session logs, and overflow files before comprehensive runs; do not delete
.local/testing/. - Maintain the testing knowledge base in
.local/testing/:journal.md,process-notes.md,playbooks/, andregressions.md. Add regressions for newly found bugs and capture process improvements after each session. - Research new agent/testing techniques and monitor dependency health (
cargo outdated --workspace,cargo deny check advisories) as part of the cycle, but only after current critical functionality has been live-tested.
Build, Test, and Development Commands
cargo build --workspace --features full: Build the full workspace feature set used in CI.cargo run -- --help: Run the CLI locally and list commands.cargo nextest run --workspace --lib --bins: Fast unit/binary test pass.cargo nextest run --config-file .github/nextest.toml --workspace --profile ci --features full: Full suite with the CI config and full feature set (Docker required).cargo +nightly fmt --check: Verify formatting.cargo clippy --profile ci --workspace --features full -- -D warnings: Run CI-equivalent lint checks with the full feature set.cargo llvm-cov --all-features --workspace: Generate coverage locally.
After long compilation-heavy operations, periodically check available disk space. If space is low, remove iteration-specific build artifacts from target/; if that is not enough, run cargo clean before continuing.
Coding Style & Naming Conventions
Use Rust 2024 edition and MSRV 1.100. Follow rustfmt defaults (4-space indentation) and keep Clippy warnings at zero where practical.
Use snake_case for functions/modules/files, PascalCase for types/traits, and SCREAMING_SNAKE_CASE for constants. Prefer small modules with explicit responsibilities; keep public APIs in lib.rs minimal and re-export intentionally.
Testing Guidelines
Use cargo-nextest as the default runner. Name integration tests with *_integration.rs and keep deterministic unit tests close to implementation.
For features touching external systems (for example Qdrant), use container-backed tests and document required services. Add regression tests for every bug fix.
Commit & Pull Request Guidelines
Git history follows Conventional Commits with scopes, e.g. feat(zeph-tools): ..., fix: ..., ci: ....
Keep subject lines imperative and concise, and reference issues/PRs when relevant ((#736)).
Before every commit, run the full validation suite against the CI feature set (--features full where supported) and do not commit if any step fails:
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --features full -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --profile ci --features fullcargo check --workspace --features fullcargo build --workspace --features fullPRs should include: a clear problem statement, implementation summary, test evidence (commands + results), and docs/config updates when behavior changes.
Security & Configuration Tips
Do not commit secrets. All secrets must go through the Zeph age vault (zeph vault commands) — never environment variables or .env files. Review SECURITY.md before changing tool execution, sandboxing, or permission flows.
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.

