| tags |
|
||
|---|---|---|---|
| type | reference | ||
| status | active | ||
| area | development | ||
| aliases |
|
||
| created | 2026-03-06 |
Symphony is a Rust-based orchestration service for coding agents.
See AGENTS.md for architecture, PLANS.md for roadmap, CONTROL.md for quality gates.
Before starting work, orient yourself using the knowledge graph:
- Read this file and
AGENTS.md— conventions, architecture, obligations - Check project state —
docs/roadmap/Project Status.mdand.planning/STATE.md - Explore relevant docs — traverse
[[wikilinks]]from the entry points:docs/Symphony Index.md— vault navigation hubdocs/architecture/Crate Map.md— which crate owns whatdocs/crates/<crate-name>.md— per-crate API, tests, spec coveragedocs/operations/Configuration Reference.md— WORKFLOW.md formatdocs/operations/Control Harness.md— build gates, test counts
- Check CONTROL.md — setpoints your changes must satisfy
- Check PLANS.md — current phase and remaining tasks
- Check
.planning/REQUIREMENTS.md— spec conformance checklist
When in doubt about behavior, consult the canonical spec: /Users/broomva/Downloads/Symphony SPEC.md.
make smoke— compile + clippy + test (the gate, runs pre-commit)make check— cargo check + clippymake test— cargo test --workspace (includes CLI integration tests)make build— cargo build --releasemake control-audit— smoke + format check (before PR)make fmt— auto-format codemake install— install binary locally
Integration tests in tests/cli_integration.rs verify the binary end-to-end:
symphony initscaffolds WORKFLOW.md correctly for both tracker typessymphony validatecatches missing keys, invalid configsymphony configdisplays resolved settings (including pr_feedback, done_state)- Init → Validate round-trip: generated workflows pass validation
- Remote daemon access: auth rejection works properly
- Error paths: missing files, unsupported trackers, overwrite protection
When adding new CLI subcommands or config options:
- Add arg parsing test in
src/cli/mod.rs - Add binary integration test in
tests/cli_integration.rs - Verify with
cargo test --test cli_integration
A pre-commit hook at .githooks/pre-commit runs make smoke + format check on every commit. Activate it with:
git config core.hooksPath .githooksBefore every commit, the following must be true:
cargo check --workspace— zero compile errorscargo clippy --workspace -- -D warnings— zero warningscargo test --workspace— all tests passcargo fmt --all -- --check— code is formatted
Before every push, additionally:
5. Documentation is updated (see Documentation Obligations below)
6. CONTROL.md deviation log is current if any setpoint was relaxed
7. docs/roadmap/Project Status.md reflects changes if significant
- Rust edition 2024, minimum rustc 1.85
thiserrorfor library errors,anyhowfor application errorstracingfor structured logging (neverprintln!orlog)tokiofor async runtimeserdefor all serialization- Tests live in
#[cfg(test)] mod testsat bottom of each file - State normalization:
trim().to_lowercase()for issue state comparisons - Workspace keys: only
[A-Za-z0-9._-], replace others with_
The control metalayer (CONTROL.md) is the active grounding framework that drives all development — not a passive checklist. Every code change follows this loop:
1. CHECK setpoints → Which setpoints does this change affect?
2. IMPLEMENT → Write code that satisfies the setpoints
3. MEASURE (sensors) → Run `make smoke` / `make control-audit`
4. VERIFY → All affected setpoints green?
5. DOCUMENT → Update CONTROL.md, Project Status, STATE.md
6. FEEDBACK → Deviation log if any setpoint was relaxed
Before starting any feature or fix:
- Read
CONTROL.mdto identify which setpoints your change touches - After implementation, verify those setpoints pass
- If adding new behavior, add corresponding setpoints to CONTROL.md
- Update
docs/roadmap/Project Status.mdand.planning/STATE.mdtest counts
The metalayer ensures stability across agent sessions — every agent reads the same setpoints and produces verifiably correct output.
The .control/ directory provides machine-readable representations of the control metalayer:
.control/policy.yaml— all 76 setpoints as structured YAML.control/commands.yaml— Makefile targets typed as gates/sensors/actuators.control/topology.yaml— crate ownership map with dependencies.control/state.json— live metric snapshot (regenerate withmake control-refresh)
Run make control-validate to verify policy.yaml stays in sync with CONTROL.md. See [[METALAYER]] for the full control loop definition.
Symphony's development is grounded in three consciousness substrates that provide persistent, self-improving context:
- Control Metalayer —
.control/, [[CONTROL]], [[METALAYER]] — behavioral governance (what MUST be true) - Knowledge Graph —
docs/, [[docs/Symphony Index|Symphony Index]] — declarative memory (what IS known) - Episodic Memory —
docs/conversations/,scripts/conversation-history.py— episodic memory (what HAS happened)
On Start:
- Read this file + [[AGENTS]] for conventions
- Read
.control/state.jsonfor current metrics - Read [[CONTROL]] for relevant setpoints
- Check [[PLANS]] for current phase
- Check [[docs/roadmap/Project Status|Project Status]] for progress
- Scan [[docs/conversations/Conversations|Conversations]] for recent session context
Before Changes:
- Identify affected setpoints in [[CONTROL]]
- Read relevant
docs/crates/<name>.md - Run
make smoketo confirm clean baseline
On Completion:
- Run
make smoke— verify all gates pass - Run
make control-validate— ensure policy alignment - Update docs (CONTROL, state.json, Project Status) as needed
- Run
make control-refresh— update state snapshot - Commit with conventional commit format
See [[docs/control/Consciousness Architecture|Consciousness Architecture]] for the full three-substrate design and [[docs/control/Session Protocol|Session Protocol]] for the detailed protocol.
PRs to master are auto-merged when all control metalayer gates pass:
| Gate | CI Job | Setpoints |
|---|---|---|
| Compile + Lint | Check & Lint |
S1, S2 |
| All tests pass | Test |
S3 |
| PR title conventional | PR Lint |
feat:, fix:, docs:, etc. |
| Control audit | Control Audit |
S4-S76 (governance files, setpoint count) |
Merge flow:
PR opened → CI runs 4 gates → all green → auto-merge (squash)
→ any red → blocked, author fixes
No manual review required for PRs that pass all gates. This works because the control metalayer setpoints are the review — if the tests, lints, and governance checks pass, the code meets the project's quality bar.
To enable: run bash scripts/setup-branch-protection.sh once (requires admin).
When Symphony (or any agent) works on an issue, the full cycle includes PR review handling:
1. Agent implements the change
2. after_run hook: commit → push → create PR
3. pr_feedback hook: fetch PR review comments (gh pr view --json)
4. If comments exist → next turn receives them as context
5. Agent resolves comments → push fixes
6. Repeat until PR is clean or max_turns exhausted
Convention for agents working in this repo:
- After pushing a PR, check for review comments with
gh api repos/{owner}/{repo}/pulls/{number}/comments - Resolve each comment by either: fixing the code, accepting the suggestion, or replying with justification for rejecting
- PR title format:
<ISSUE-ID>: <concise description> - PR body must include: Summary, Files Changed, Tests, Test Plan
- Link the PR to the Linear issue via
ghor Linear API
Symphony follows Semantic Versioning with Conventional Commits:
- Commit prefixes:
feat:(minor),fix:(patch),feat!:orBREAKING CHANGE(major),docs:,chore:,test:,refactor: - Changelog: Auto-generated from commits via
git-cliff(config incliff.toml) - Release process:
make release VERSION=0.3.0→ bumps Cargo.toml, generates CHANGELOG.md, commits, tags - Push to release:
git push origin master v0.3.0→ triggers CI/CD pipeline (binaries + crates.io + Docker) - Version lives in:
Cargo.toml[workspace.package] version— all crates share it
- Workspace paths MUST stay under workspace root (canonicalize + prefix check)
- Coding agent cwd MUST equal the per-issue workspace path
- Never log API tokens or secret values
- Hook scripts run with timeout enforcement
set_var/remove_varrequireunsafeblocks in Rust 2024 editionSYMPHONY_API_TOKEN— optional bearer auth for HTTP API; never commit real tokens
This repository IS an Obsidian vault. The .obsidian/ directory at root configures it.
- Root
.mdfiles — project governance: README, AGENTS, CLAUDE, PLANS, CONTROL, EXTENDING, CONTRIBUTING docs/— Obsidian-native documentation with wikilinks and knowledge graphdocs/Symphony Index.md— vault entry point and navigation hubdocs/architecture/— system design, crate map, domain modeldocs/operations/— control harness, configuration referencedocs/roadmap/— project status, production roadmapdocs/crates/— per-crate documentation (one note per crate)
.planning/— project state, requirements, roadmap graphexamples/— example WORKFLOW.md files for different tracker+agent combos
- Use
[[wikilinks]]to connect related notes (e.g.,[[SPEC]],[[docs/crates/symphony-core|symphony-core]]) - Add YAML frontmatter with
tags,createddate on new documentation notes - When adding a feature or making significant changes, update the relevant docs:
- New crate or module → update
docs/crates/anddocs/architecture/Crate Map.md - New config option → update
docs/operations/Configuration Reference.md - New test or setpoint → update
CONTROL.mdanddocs/operations/Control Harness.md - Phase/milestone completion → update
docs/roadmap/Project Status.mdand.planning/STATE.md - New endpoint → update
docs/operations/Configuration Reference.md
- New crate or module → update
- Keep the knowledge graph connected: every note should link to at least one other note
- Prefer updating existing notes over creating new ones
- Do not duplicate information already in the code or git history
This file (CLAUDE.md) and AGENTS.md are the meta-definition for how agents interact with this project. They are loaded automatically by Claude Code at the start of every conversation. If you change how the control harness works, how docs should be maintained, or how context should be gathered — update these files so future sessions inherit the knowledge.