agentleFS
wikiedenwikieden/viden/crates/AGENTS.md

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.

  • In this repository2 other files it gives its agents.

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
  1. Very specific:

    Use branch codex/v3-core-runtime in .worktrees/v3-core-runtime.

    line 11
  2. Very specific:

    Create it from synchronized origin/main.

    line 12
  3. Very specific:

    Before production TUI or GUI implementation starts, deliver an immutable frontend-contract-v1 checkpoint for core-v0.3.0 containing:

    line 19
  4. Very specific:

    Keep Core independent of apps/tui and apps/gui.

    line 46
  5. Distinctive:

    Do not implement frontend layout or frontend-local interaction state here.

    line 47
  6. Distinctive:

    After contract freeze, make backward-compatible extensions whenever possible.

    line 48
  7. Distinctive:

    All mutation still passes through permission checks before effects occur.

    line 51
  8. Distinctive:

    Use TDD for behavior changes.

    line 61
  9. Distinctive:

    Add concise comments for protocol boundaries and non-obvious invariants.

    line 62
  10. Distinctive:

    Update English and Chinese user-facing documentation together.

    line 63
  11. Distinctive:

    Run focused crate tests while developing, then run:

    line 64

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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-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.

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 -> RuntimeViewState protocol;
  • 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/lanes and crates/agents are 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, and scripts/check-dependency-boundaries.sh enforces both the allow-list and the absence of the modules they took with them. Adding a viden-* dependency to either is an architecture decision, not a convenience.
  • Keep Core independent of apps/tui and apps/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 --quiet

The 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.