Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-architecture-mv/blob/main/docs/crumbs/AGENT_WORKFLOW.md # aien-architecture-mv Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-architecture-mv / docs / crumbs / AGENT_WORKFLOW.md` 55 lines ยท 5533 bytes Raw Blame History Source # How an agent works with Crumbs (RFC-0001 + RFC-0002) One rule, always: before modifying an unfamiliar repository path, inspect the applicable Crumb. Respect its invariants and shared locks. Follow related Crumbs, Git history, evidence and active continuation state until the purpose of the code is understood. Do not rely on undocumented assumptions from previous sessions. Context is loaded on demand; nobody hands you the whole architecture up front. ## Meeting an unfamiliar file ``` crumb explain native/kernel/core/infer.c ``` You get, in bounded sections: what the directory is for and its layer; the invariants it inherits from parent crumbs; who holds locks or scents there right now; the last commits that touched the path and any commit the crumb calls significant; evidence references; and the newest Continuation Crumb whose scope includes it, with its PROVEN / PARTIAL / BLOCKED lines. Follow the references that matter (`git show `, the receipt file, the related `.crumb`) instead of reading everything. ## Doing a cut (RFC-0001 lifecycle, now repository-wide) ``` crumb sniff # read before touching; shows agents, locks, whispers from EVERY worktree crumb claim "" # exit 2 = someone else holds it: stop, read their scent, do not take it crumb update "" # heartbeat while you work crumb whisper - "" # what the next agent must know crumb close modify "" # after pushing ``` `` is a stable session id you choose once (e.g. `claude-l6b-7f32`), never a process id. Targets are repository-relative; it does not matter which worktree you run the command in. ## Enforced repositories: one identity per session, check before every write (RFC-0002 sections 2.7, 2.8) In a repository with `git config crumb.enforce true` (or `CRUMB_ENFORCE=1`) the write gate of your runtime runs `crumb check ` before each write and blocks on anything but exit 0. So: - Your `` is `.` (matches `^[A-Za-z0-9][A-Za-z0-9_.@-]{0,159}$`, used verbatim). Never share it with another session: a second live session presenting it is refused. - Claim before you write: `crumb claim . "" `. A directory lease covers everything below it; a claim that overlaps another agent's lease (same path, an ancestor or a descendant) exits 2. Note the `generation ` it prints. - `crumb check . [--generation N] [--key K]` answers `HELD ... generation expires