Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,35 @@ jobs:
.
- name: cargo test
run: cargo test

docs:
name: Docs Guard
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Ensure execution plan and decision log were updated
run: |
set -euo pipefail
base_ref="${{ github.event.pull_request.base.ref }}"
git fetch origin "$base_ref" --depth=1
changed=$(git diff --name-only "origin/${base_ref}"..."${{ github.sha }}")
if [ -z "$changed" ]; then
exit 0
fi
non_doc=$(echo "$changed" | grep -vE '(^docs/)|(\.md$)' || true)
if [ -z "$non_doc" ]; then
exit 0
fi
echo "Non-doc files changed:"
echo "$non_doc"
echo "$changed" | grep -Fx 'docs/execution-plan.md' >/dev/null || {
echo 'docs/execution-plan.md must be updated when non-doc files change.';
exit 1;
}
echo "$changed" | grep -Fx 'docs/decision-log.md' >/dev/null || {
echo 'docs/decision-log.md must be updated when non-doc files change.';
exit 1;
}
48 changes: 7 additions & 41 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,15 @@ Welcome to the **Echo** project. This file captures expectations for any LLM age

## Core Principles
- **Honor the Vision**: Echo is a deterministic, multiverse-aware ECS. Consult `docs/architecture-outline.md` before touching runtime code.
- **Document Ruthlessly**: Every meaningful design choice should land in `docs/` (specs, diagrams, memorials) or a Neo4j journal entry tagged `Echo`.
- **Document Ruthlessly**: Every meaningful design choice should land in `docs/` (specs, diagrams, memorials) or other durable repo artifacts (e.g. `docs/decision-log.md`).
- **Docstrings Aren't Optional**: Public APIs across crates (`rmg-core`, `rmg-ffi`, `rmg-wasm`, etc.) must carry rustdoc comments that explain intent, invariants, and usage. Treat missing docs as a failing test.
- **Determinism First**: Avoid introducing sources of nondeterminism without a mitigation plan.
- **Temporal Mindset**: Think in timelines—branching, merging, entropy budgets. Feature work should map to Chronos/Kairos/Aion axes where appropriate.

## Shared Memory (Neo4j)
We use the agent-collab Neo4j instance as a temporal journal.

Scripts live in `<agent-collab checkout>/scripts/neo4j-msg.js`.

### Setup
```bash
# Register yourself once. Choose a display name that identifies the agent.
node path/to/agent-collab/scripts/neo4j-msg.js agent-init "Echo Codex"
```

### Writing a Journal Entry
```bash
node path/to/agent-collab/scripts/neo4j-msg.js msg-send \
--from "Echo Codex" \
--to "Echo Archive" \
--text "[Echo] short summary of what you changed or decided." \
--thread "echo-devlog" \
--topic "Echo" \
--project "Echo Engine" \
--kind note
```

Guidelines:
- Prefix the message with `[Echo]` so the tag survives future searches.
- Summarise intent, work done, and next steps for future agents.
- Use the thread `echo-devlog` unless a more specific thread already exists.
- **Cadence:** Log when you start work (intent), when you hit a major milestone or decision, when you reference external sources (paths, specs), and when you finish a session (outcome + next steps). Treat Neo4j as the authoritative timeline.

### Reading Past Entries
```bash
node path/to/agent-collab/scripts/neo4j-msg.js messages \
--thread "echo-devlog" \
--limit 20
```

Use `messages-search --text "Echo"` for ad-hoc queries.
## Timeline Logging
- Start each session by updating *Today’s Intent* in `docs/execution-plan.md`.
- Capture milestones, blockers, and decisions directly in this repo (e.g. `docs/decision-log.md`, relevant specs, or PR descriptions).
- When wrapping up, record outcomes and next steps in the Decision Log and ensure any impacted docs stay in sync.

## Repository Layout
- `packages/echo-core`: Runtime core (ECS, scheduler, Codex’s Baby, timelines).
Expand All @@ -56,7 +23,6 @@ Use `messages-search --text "Echo"` for ad-hoc queries.
## Working Agreement
- Keep `main` pristine. Feature work belongs on branches named `echo/<feature>` or `timeline/<experiment>`.
- Tests and benchmarks are mandatory for runtime changes once the harness exists.
- Update the Neo4j log before you down tools, even if the work is incomplete.
- Respect determinism: preferably no random seeds without going through the Echo PRNG.
- Run `cargo clippy --all-targets -- -D missing_docs` and `cargo test` before every PR; CI will expect a zero-warning, fully documented surface.

Expand All @@ -68,7 +34,7 @@ Use `messages-search --text "Echo"` for ad-hoc queries.
In short: no one cares about a tidy commit graph, but everyone cares if you rewrite commits on origin.

## Contact Threads
- Neo4j Thread `echo-devlog`: Daily journal, decisions, blockers.
- Neo4j Thread `echo-spec`: High-level architectural proposals.
- Docs `decision-log.md`: Chronological design decisions.
- Docs `execution-plan.md`: Working map of tasks, intent, and progress.

Safe travels in the multiverse. Logged timelines are happy timelines. 🌀
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ Echo is a deterministic, renderer-agnostic engine. We prioritize:
## Getting Started
1. Clone the repo and run `cargo check` to ensure the Rust workspace builds.
2. Read `docs/architecture-outline.md` and `docs/execution-plan.md`.
3. Register yourself in Neo4j via `AGENTS.md` instructions and note your display handle.
3. Review `AGENTS.md` for collaboration norms before touching runtime code.

## Branching & Workflow
- Keep `main` pristine. Create feature branches like `echo/<feature>` or `timeline/<experiment>`.
- Before starting work, ensure `git status` is clean. If not, resolve or coordinate with the human operator.
- Log intent in Neo4j (`[Echo]` tag) at the start of each session.
- Before each session, update the “Today’s Intent” section in `docs/execution-plan.md` so future collaborators can follow the timeline.

## Testing Expectations
- Write tests before or alongside code changes.
Expand All @@ -36,7 +36,7 @@ Echo is a deterministic, renderer-agnostic engine. We prioritize:
## Documentation & Telemetry
- Update relevant docs in `docs/` whenever behavior or architecture changes.
- Record major decisions or deviations in the execution plan or decision log tables.
- Use Neo4j to leave breadcrumbs for future Codex agents.
- Capture breadcrumbs for future Codex agents in `docs/decision-log.md` or related specs.

## Submitting Changes
1. Run `cargo fmt`, `cargo clippy`, and `cargo test`.
Expand All @@ -54,8 +54,7 @@ Echo is a deterministic, renderer-agnostic engine. We prioritize:
- Avoid non-deterministic APIs (no wall-clock, no uncontrolled randomness). Use Echo’s deterministic services.

## Communication
- Major updates logged in Neo4j threads (`echo-devlog`, `echo-spec`).
- Use GitHub discussions or issues for larger design proposals.
- Major updates should land in `docs/execution-plan.md` and `docs/decision-log.md`; rely on GitHub discussions or issues for longer-form proposals.
- Respect the temporal theme—leave the codebase cleaner for the next timeline traveler.

Thanks for helping forge Echo’s spine. 🌀
2 changes: 1 addition & 1 deletion docs/codex-implementation-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ A step-by-step guide for turning the event bus spec into working code.

## 10. Follow-up
- [ ] Add inspector panel to display metrics.
- [ ] Extend Neo4j devlog to capture major bus events (optional).
- [ ] Extend `docs/decision-log.md` with a bus-event template (optional).
- [ ] Profile throughput with scheduler benchmarks.
2 changes: 2 additions & 0 deletions docs/decision-log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Decision Log

*Demo outcomes should prefix the Decision column with `Demo <number> — …` to keep entries searchable.*

| Date | Context | Decision | Rationale | Consequence |
| ---- | ------- | -------- | --------- | ----------- |
| 2025-10-23 | Repo reset | Adopt pnpm + TS skeleton | Monorepo scaffolding for Echo | Phase 0 tasks established |
Expand Down
14 changes: 7 additions & 7 deletions docs/execution-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ This is Codex’s working map for building Echo. Update it relentlessly—each s

## Operating Rhythm
- **Before Starting**
1. Ensure `git status` is clean. If not, document in Neo4j and wait for human guidance.
2. Read the latest entries tagged `[Echo]` in Neo4j (`scripts/neo4j-msg.js messages --thread "echo-devlog"`).
1. Ensure `git status` is clean. If not, capture the state in `docs/decision-log.md` and wait for human guidance.
2. Skim the latest updates in this document and `docs/decision-log.md` to synchronize with the active timeline.
3. Update the *Today’s Intent* section below.
- **During Work**
- Log major decisions, blockers, or epiphanies via Neo4j (`msg-send` with `[Echo]` prefix).
- Record major decisions, blockers, or epiphanies in `docs/decision-log.md` (canonical log) and copy a concise summary into the Decision Log table below for quick reference.
- Keep this document current: mark completed tasks, add new sub-items, refine specs.
- **After Work**
1. Summarize outcomes, next steps, and open questions in Neo4j.
1. Summarize outcomes, next steps, and open questions in the Decision Log section below and ensure the full entry is captured in `docs/decision-log.md`.
2. Update the “Next Up” queue.
3. Push branches / PRs or leave explicit instructions for future Codex.

Expand Down Expand Up @@ -77,7 +77,7 @@ This is Codex’s working map for building Echo. Update it relentlessly—each s
### Tooling & Docs
- [ ] Build `docs/data-structures.md` with Mermaid diagrams (storage, branch tree with roaring bitmaps).
- [ ] Extend `docs/diagrams.md` with scheduler flow & command queue animations.
- [ ] Prepare Neo4j query cheatsheet for faster journaling.
- [ ] Document lightweight journaling workflow in `docs/decision-log.md` (include entry template + daily/weekly cadence guidance; owner: Documentation squad before Phase 1 kickoff).
- [ ] Design test fixture layout (`test/fixtures/…`) with sample component schemas.
- [ ] Document roaring bitmap integration and merge strategies.
- [ ] Update future inspector roadmap with conflict heatmaps and causality lens.
Expand All @@ -93,7 +93,7 @@ This is Codex’s working map for building Echo. Update it relentlessly—each s
| 2025-10-25 | Language direction pivot: Echo core to Rust | TypeScript validated specs; long-term determinism enforced via Rust + C ABI + Lua scripting | Update Phase 1 backlog: scaffold Rust workspace, port ECS/diff engine, FFI bindings |
| 2025-10-26 | Adopt RMG + Confluence as core architecture | RMG v2 (typed DPOi engine) + Confluence replication baseline | Scaffold rmg-core/ffi/wasm/cli crates; implement rewrite executor spike; integrate Rust CI; migrate TS prototype to `/reference` |

(Keep this table updated; link to Neo4j message IDs when useful.)
(Keep this table updated; include file references or commit hashes when useful.)

---

Expand All @@ -109,7 +109,7 @@ Populate with concrete tasks in priority order. When you start one, move it to
---

## Notes to Future Codex
- Use `Neo4j thread: echo-devlog` for daily runtime updates.
- Update this document (and `docs/decision-log.md`) for daily runtime updates.
- Record test coverage gaps as they appear; they inform future backlog items.
- Ensure roaring bitmap and hashing dependencies are deterministic across environments.
- Inspector pins must be recorded to keep GC deterministic.
Expand Down
2 changes: 1 addition & 1 deletion docs/phase1-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ Optimization roadmap once baseline is working:
## Documentation Checklist
- Update `docs/rmg-runtime-architecture.md` as rules/loop evolve.
- Append decision log entries per phase.
- Record demo outcomes in Neo4j (`echo-devlog`).
- Record demo outcomes in `docs/decision-log.md`, prefixing the Decision column with `Demo <number> —` (e.g., `Demo 2 — Timeline hash verified`).

Phase 1 completes when Demo 6 (Live Coding) runs atop the Rust RMG runtime with inspector tooling in place.
2 changes: 1 addition & 1 deletion docs/rmg-demo-roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ This document captures the interactive demos and performance milestones we want
| 1F | Demo dashboards | Inspector frame overlays, JSON ingestion |


**Prerequisites:** BLAKE3 hashing utilities, deterministic PRNG module, snapshot serialiser, inspector graph viewer, Neo4j logging for demo outcomes, CI runners with wasm/criterion toolchains.
**Prerequisites:** BLAKE3 hashing utilities, deterministic PRNG module, snapshot serialiser, inspector graph viewer, documentation workflow (`docs/decision-log.md`) for logging demo outcomes, CI runners with wasm/criterion toolchains.


**Timeline:**
Expand Down
6 changes: 3 additions & 3 deletions scripts/scaffold-community.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ PACKAGE_MANAGER=$(gum input --prompt "Package manager command" --value "$DEFAULT
ARCHITECTURE_DOC=$(gum input --prompt "Architecture doc path" --value "$DEFAULT_ARCH_DOC")
EXECUTION_PLAN_DOC=$(gum input --prompt "Execution plan doc" --value "$DEFAULT_EXEC_PLAN")
AGENT_GUIDE=$(gum input --prompt "Agent onboarding doc" --value "$DEFAULT_AGENT_GUIDE")
PROJECT_TAG=$(gum input --prompt "Project tag for Neo4j logs" --value "$DEFAULT_TAG")
DEVLOG_THREAD=$(gum input --prompt "Devlog thread name" --value "$DEFAULT_DEVLOG")
SPEC_THREAD=$(gum input --prompt "Spec thread name" --value "$DEFAULT_SPEC_THREAD")
PROJECT_TAG=$(gum input --prompt "Project tag for timeline notes" --value "$DEFAULT_TAG")
DEVLOG_THREAD=$(gum input --prompt "Devlog document or label" --value "$DEFAULT_DEVLOG")
SPEC_THREAD=$(gum input --prompt "Spec document or label" --value "$DEFAULT_SPEC_THREAD")
YEAR=$(gum input --prompt "Copyright year" --value "$DEFAULT_YEAR")
COPYRIGHT_HOLDER=$(gum input --prompt "Copyright holder" --value "$DEFAULT_COPYRIGHT")
LEGACY_DIR=$(gum input --prompt "Legacy directory reference" --value "$DEFAULT_LEGACY_DIR")
Expand Down