viden / crates
AGENTS.md87 starsChanged 5 months agoMITView on GitHub
This file applies to crates/**. For V3 parallel development, this is the Core ownership area. Read the repository-root AGENTS.md, PLAN.md, and docs/parallel-development-plan.md before changing code here. - Use branch codex/v3-core-runtime in .worktrees/v3-core-runtime. - Create it from synchronized origin/main. - Preserve unrelated work and do not edit another owner's worktree. - Root workspace manifests, frontend contracts, and shared fixtures are shared surfaces; call out their impact in the handoff. Before production TUI or GUI implementation starts, deliver an immutable frontend-contract-v1 checkpoint…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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.
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use branch codex/v3-core-runtime in .worktrees/v3-core-runtime.
- Very specific: line 12
Create it from synchronized origin/main.
- Very specific: line 19
Before production TUI or GUI implementation starts, deliver an immutable frontend-contract-v1 checkpoint for core-v0.3.0 containing:
- Very specific: line 46
Keep Core independent of apps/tui and apps/gui.
- Distinctive: line 47
Do not implement frontend layout or frontend-local interaction state here.
- Distinctive: line 48
After contract freeze, make backward-compatible extensions whenever possible.
- Distinctive: line 51
All mutation still passes through permission checks before effects occur.
- Distinctive: line 61
Use TDD for behavior changes.
- Distinctive: line 62
Add concise comments for protocol boundaries and non-obvious invariants.
- Distinctive: line 63
Update English and Chinese user-facing documentation together.
- Distinctive: line 64
Run focused crate tests while developing, then run:
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Viden Core Track Agent Guide
Scope
This file applies to crates/**. For V3 parallel development, this is the Core
ownership area. Read the repository-root AGENTS.md, PLAN.md, and
docs/parallel-development-plan.md before changing code here.
Branch And Worktree
- Use branch
codex/v3-core-runtimein.worktrees/v3-core-runtime. - Create it from synchronized
origin/main. - Preserve unrelated work and do not edit another owner's worktree.
- Root workspace manifests, frontend contracts, and shared fixtures are shared surfaces; call out their impact in the handoff.
C0 Contract Freeze
Before production TUI or GUI implementation starts, deliver an immutable
frontend-contract-v1 checkpoint for core-v0.3.0 containing:
- the versioned
RuntimeCommand -> RuntimeEvent -> RuntimeViewStateprotocol; schema_version, capability discovery, event cursors, snapshot/replay, and sequence-gap recovery;- typed lane, task, gate, route, gate-strength, and mutation-policy records;
- a transport-neutral Core client contract;
- a shared presentation preference contract for language, locale, skin, mode, density, font scale, terminal color capability, and accessibility flags;
- migration coverage for legacy persisted records and fixtures;
- parity fixtures shared by Core, TUI, and GUI.
Report the exact checkpoint SHA and do not rewrite that checkpoint after TUI or GUI branches have started from it.
Ownership And Boundaries
- Core exclusively owns authoritative runtime facts, persistence, permissions, provider/tool execution, lane side effects, and workflow reduction.
crates/lanesandcrates/agentsare leaves below the runtime with enumerated dependency allow-lists. Runtime-owned policy — permission contexts, approvers, event sinks, persistence — is injected into them as parameters, never imported by them, andscripts/check-dependency-boundaries.shenforces both the allow-list and the absence of the modules they took with them. Adding aviden-*dependency to either is an architecture decision, not a convenience.- Keep Core independent of
apps/tuiandapps/gui. - Do not implement frontend layout or frontend-local interaction state here.
- After contract freeze, make backward-compatible extensions whenever possible. Breaking changes require a schema version, migration, fixtures, and an explicit cross-track notice.
- All mutation still passes through permission checks before effects occur.
- Preserve append-only JSONL facts and rebuildable SQLite indexes.
- Plan mode must reject mutation before file, shell, Git, workflow, memory, or task state changes.
- Core owns persistence and eventing for user presentation preferences. TUI and GUI may render those preferences differently, but Core defines the accepted values and emits effective preference state through the frontend contract.
Development And Verification
- Use TDD for behavior changes.
- Add concise comments for protocol boundaries and non-obvious invariants.
- Update English and Chinese user-facing documentation together.
- Run focused crate tests while developing, then run:
cargo test -p viden-types
cargo test -p viden-session
cargo test -p viden-workflows
cargo test -p viden-lanes
cargo test -p viden-agents
cargo test -p viden-runtime
cargo test -p viden-core
scripts/check-dependency-boundaries.sh
cargo test --workspace --quietThe handoff must include the branch, worktree, HEAD, contract/schema changes,
migrations, fixture coverage, test evidence, frontend-consumable interfaces,
open contract requests, and blockers. Do not merge or push main without
explicit user direction.
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.

