11<!-- SPDX-License-Identifier: Apache-2.0 OR MIND-UCAL-1.0 -->
22<!-- © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> -->
3+
34# Echo Agent Briefing
45
56Welcome to the ** Echo** project. This file captures expectations for any LLM agent (and future-human collaborator) who touches the repo.
@@ -17,6 +18,106 @@ Welcome to the **Echo** project. This file captures expectations for any LLM age
1718- Capture milestones, blockers, and decisions in relevant specs, ADRs, or PR descriptions.
1819- AGENTS.md and ` TASKS-DAG.md ` are append-only; see ` docs/append-only-invariants.md ` plus ` scripts/check-append-only.js ` for the enforcement plan that CI will run before merges.
1920
21+ ## Agent Context System (2-Tier)
22+
23+ Agents use a ** 2-tier context system** to maintain continuity across sessions:
24+
25+ | Tier | Store | Purpose | Update Frequency |
26+ | ------------- | --------------- | ------------------------------------------ | -------------------------------- |
27+ | ** Immediate** | Redis stream | Current task state, branch, blockers | Every significant action |
28+ | ** Deep** | Knowledge graph | Architecture decisions, patterns, entities | When learning something reusable |
29+
30+ ### Session Start (Bootstrap)
31+
32+ 1 . ** Read this file** (` AGENTS.md ` ) for project conventions
33+
34+ 2 . ** Check Redis handoff stream** : ` echo:agent:handoff ` (most recent entry)
35+
36+ ``` text
37+ XRANGE echo:agent:handoff - + COUNT 5
38+ ```
39+
40+ 3. **Query knowledge graph** for relevant entities:
41+
42+ ```python
43+ search_nodes("<feature_name>") # e.g., "BOAW", "MaterializationBus"
44+ search_nodes("Echo") # General project context
45+ ```
46+
47+ ### During Work (Continuous Updates)
48+
49+ **Redis stream** — Update after every significant action:
50+
51+ - Completing a task or subtask
52+ - Encountering a blocker
53+ - Making a key decision
54+ - Changing branches or PRs
55+
56+ ```bash
57+ XADD echo:agent:handoff * \
58+ branch "graph-boaw" \
59+ status "IN_PROGRESS" \
60+ summary "Fixing determinism bug in view op emission" \
61+ current_task "Updating emit_view_op_delta_scoped()" \
62+ blockers "none" \
63+ timestamp "<ISO-8601 timestamp>"
64+ ```
65+
66+ ** Knowledge graph** — Create/update entities when you:
67+
68+ - Discover an architectural pattern worth preserving
69+ - Complete a milestone (create ` <Feature>_Phase<N> ` entity)
70+ - Fix a non-obvious bug (create ` <Feature>_BugFix ` entity)
71+ - Make a decision that future agents should know about
72+
73+ ``` json
74+ {
75+ "name" : " BOAW_Determinism_Fix" ,
76+ "entityType" : " BugFix" ,
77+ "observations" : [
78+ " Root cause: emit_view_op_delta() used delta.len() for view op IDs" ,
79+ " delta.len() is worker-local and varies by shard claim order" ,
80+ " Fix: derive op ID from intent scope (NodeId) which is content-addressed"
81+ ]
82+ }
83+ ```
84+
85+ ### Session End (Handoff)
86+
87+ Before ending a session, ** always** write a handoff entry:
88+
89+ ``` bash
90+ XADD echo:agent:handoff * \
91+ branch " <current-branch>" \
92+ status " <COMPLETE|IN_PROGRESS|BLOCKED>" \
93+ summary " <1-2 sentence summary of what was done>" \
94+ commits " <recent commit hashes and messages>" \
95+ next_steps " <what the next agent should do>" \
96+ blockers " <any blockers, or 'none'>" \
97+ tech_debt " <any shortcuts taken that need cleanup>" \
98+ test_commands " <commands to verify the work>" \
99+ timestamp " <ISO-8601 timestamp>"
100+ ```
101+
102+ ### Key Entities to Know
103+
104+ The knowledge graph contains ~ 300+ entities built by prior agents. Key patterns:
105+
106+ - ` Echo Project ` — Core project info and current focus
107+ - ` <Feature>_Architecture ` — Design decisions for major features
108+ - ` <Feature>_Phase<N> ` — Milestone completion records
109+ - ` <Feature>_BugFix ` — Non-obvious bug fixes worth remembering
110+ - ` <Feature>_Tech_Debt_P<N> ` — Tracked technical debt by priority
111+
112+ ### Why This Matters
113+
114+ - ** Quick tasks** : Redis handoff alone may suffice
115+ - ** Complex tasks** : Query knowledge graph for architectural context
116+ - ** Debugging** : Search for prior bug fixes in similar areas
117+ - ** Decisions** : Check if prior agents already explored an approach
118+
119+ The 2-tier system means handoffs are seamless—no context is lost between agents, and institutional knowledge accumulates over time.
120+
20121## Workflows & Automation
21122
22123- The contributor playbook lives in ` docs/workflows.md ` (policy + blessed commands + automation).
@@ -42,9 +143,9 @@ Welcome to the **Echo** project. This file captures expectations for any LLM age
42143### PRs & Issues (Linkage Policy)
43144
44145- Every PR must be tied to a GitHub Issue.
45- - If no suitable issue exists, open one before you open the PR.
46- - Use explicit closing keywords in the PR body: include a line like ` Closes #<issue-number> ` so the issue auto‑closes on merge.
47- - Keep PRs single‑purpose: 1 PR = 1 thing. Avoid bundling unrelated changes.
146+ - If no suitable issue exists, open one before you open the PR.
147+ - Use explicit closing keywords in the PR body: include a line like ` Closes #<issue-number> ` so the issue auto‑closes on merge.
148+ - Keep PRs single‑purpose: 1 PR = 1 thing. Avoid bundling unrelated changes.
48149- Branch naming: prefer ` echo/<short-feature-name> ` or ` timeline/<experiment> ` and include the issue number in the PR title.
49150- Project hygiene: assign the PR's linked issue to the correct Milestone and Board column (Blocked/Ready/Done) as part of the PR.
50151
@@ -54,9 +155,9 @@ Welcome to the **Echo** project. This file captures expectations for any LLM age
54155- Formatting: pre-commit auto-fixes with ` cargo fmt ` by default. Set ` ECHO_AUTO_FMT=0 ` to run check-only instead.
55156- Toolchain: pre-commit verifies your active toolchain matches ` rust-toolchain.toml ` .
56157- SPDX header policy (source): every source file must start with exactly:
57- - ` // SPDX-License-Identifier: Apache-2.0 `
58- - ` // © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> `
59- Use the repository scripts/hooks; do not add dual-license headers to code.
158+ - ` // SPDX-License-Identifier: Apache-2.0 `
159+ - ` // © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> `
160+ Use the repository scripts/hooks; do not add dual-license headers to code.
60161
61162## Git Real
62163
0 commit comments