synergy
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
Rules and conventions for any agent (Claude Code, Codex, or otherwise) that authors or edits Synergy artifacts. Cross-host file — kept in sync with CLAUDE.md. A planning and guided-review system. Agents generate cross-referenced MDX documents in .synergy/sessions/<session-name>/ or prepare immutable code-review artifacts in .synergy/reviews/<workspace>/, rendered by the same Vite + React preview at the verified origin returned by synergy preview status --json. Specification sessions keep a separate orchestrator.md that tells the implementing agent how to execute the work. Minimal session:…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 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 repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- address-feedbackSkill
- continueSkill
- create-specSkill
- executeSkill
- handoffSkill
- preview-controlSkill
- reviewSkill
- spec-authoringSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
21 rules. About 0 are common, 8 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Session location: All spec content lives in .synergy/sessions/<YYYY-MM-DD-<slug>>/.
- Very specific: line 12
Components over markdown: Prefer spec-kit components (<Status>, <Phase>, <Timeline>, <SubSpec>, <CrossRef>, <AgentAllocation>, …
- Very specific: line 13
Build, don't degrade: When the structure you need doesn't exist in spec-kit, create a session-local component in _components/ rather than …
- Very specific: line 14
CrossRefs are mandatory: Every spec-to-spec link uses <CrossRef to="<slug>" /> or <CrossRef to="<slug>#<anchor>" />.
- Very specific: line 15
Phases are folders: Every phase lives in phases/<NN>-<slug>/ with a required spec.mdx and an optional orchestrator.md.
- Very specific: line 16
Orchestrator file is required: Every session has a root orchestrator.md (plain markdown, not MDX) describing dependency graph, parallel …
- Very specific: line 18
Charts: Default to <Chart> (Mermaid).
- Very specific: line 63
Every orchestrator.md has these sections:
- Very specific: line 139
Pull-based handoff: When the human runs /synergy-feedback, the synergy:address-feedback skill reads .synergy/active-session, loads all …
- Very specific: line 183
Don't co-locate session content in the consumer's source tree.
- Distinctive: line 184
Don't write raw markdown links between specs.
- Distinctive: line 185
Don't bypass validation by silencing errors.
- Distinctive: line 186
Don't bundle implementation code in the spec — it describes work, agents do work.
- Very specific: line 187
Don't edit orchestrator.md to be MDX-flavored — it must stay plain markdown for CLI legibility.
- Very specific: line 188
Don't treat the preferred port 4321 as the runtime authority.
- Distinctive: line 189
Don't reference phases by numeric prefix in CrossRefs.
- Very specific: line 190
Don't try to add a synergy spec CLI command.
- Distinctive: line 194
Keep this file for knowledge useful to almost every future agent session in this project.
- Distinctive: line 195
Do not repeat what the codebase already shows.
- Distinctive: line 196
Prefer rewriting or pruning existing entries over appending new ones.
- Distinctive: line 197
When updating this file, preserve this bar for all agents and keep entries concise.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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.
Files
AGENTS.md — Synergy planning and review
Rules and conventions for any agent (Claude Code, Codex, or otherwise) that authors or edits Synergy artifacts. Cross-host file — kept in sync with CLAUDE.md.
What Synergy is
A planning and guided-review system. Agents generate cross-referenced MDX documents in .synergy/sessions/<session-name>/ or prepare immutable code-review artifacts in .synergy/reviews/<workspace>/, rendered by the same Vite + React preview at the verified origin returned by synergy preview status --json. Specification sessions keep a separate orchestrator.md that tells the implementing agent how to execute the work.
Hard rules
- Session location. All spec content lives in
.synergy/sessions/<YYYY-MM-DD-<slug>>/. Never write spec files anywhere else in the consumer project. - Components over markdown. Prefer spec-kit components (
<Status>,<Phase>,<Timeline>,<SubSpec>,<CrossRef>,<AgentAllocation>,<OpenQuestion>,<Risk>,<Mockup>,<Chart>,<Team>,<Reviewer>) over ad-hoc markdown for structured content. - Build, don't degrade. When the structure you need doesn't exist in spec-kit, create a session-local component in
_components/rather than falling back to raw markdown. - CrossRefs are mandatory. Every spec-to-spec link uses
<CrossRef to="<slug>" />or<CrossRef to="<slug>#<anchor>" />. Phase refs use<CrossRef to="phases/<slug>" />— the slug, never the numeric prefix. Do not write[link](other.mdx)style markdown links — the validator can't enforce those. - Phases are folders. Every phase lives in
phases/<NN>-<slug>/with a requiredspec.mdxand an optionalorchestrator.md. Inline<Phase>blocks are summary cards in02-implementation.mdx, not the phase itself. - Orchestrator file is required. Every session has a root
orchestrator.md(plain markdown, not MDX) describing dependency graph, parallel chunks, agent strategy, verification gates. Per-phase orchestrators are optional but recommended for multi-task phases. - Validator is the gate. A session is not "ready" until
synergy validate <session>returns zero errors. Warnings are acceptable but must be reviewed. - Charts. Default to
<Chart>(Mermaid). When Mermaid can't express what you need, write a session-local chart component in_components/using any library (recharts, visx, react-flow, …). - Preview lifecycle. The preview server prefers port
4321and may select an alternate. Never bypass the CLI or infer its origin — usesynergy preview start|stop|statusand consume the verified runtime status. - Required overview headings.
00-overview.mdxmust contain## Summaryand## Goals. The validator errors out otherwise. Other sections are optional.
Session structure
.synergy/sessions/<YYYY-MM-DD-slug>/
├── 00-overview.mdx required: ## Summary + ## Goals at minimum
├── 01-architecture.mdx optional: system shape, diagrams
├── 02-implementation.mdx optional: timeline, agent allocation, phase index
├── NN-<custom>.mdx optional: extra sub-specs, keep NN ordered
├── orchestrator.md required: root-level implementation playbook
├── _components/ optional: session-local React/MDX components
├── assets/ optional: images, mockups
└── phases/ optional: omit for non-phased specs
├── 01-<slug>/
│ ├── spec.mdx required if folder exists
│ └── orchestrator.md optional; warned-on-miss for multi-task phases
├── 02-<slug>/
└── ...Minimal session: just orchestrator.md + 00-overview.mdx. Everything else is optional.
Generating a session
Spec authoring is a skill, not a CLI command. To create a new session, invoke the synergy:create-spec skill (or run /synergy-spec "<title>" in Claude Code, which dispatches to the skill).
The skill:
- Reasons about scope (tiny note, single-phase, or multi-phase).
- Picks a name (
YYYY-MM-DD-<slug>) with a 6-char hash suffix on collision. - Scaffolds the session from templates that ship inside the skill (
skills/synergy/create-spec/templates/). - Creates
phases/<NN>-<slug>/folders for each phase it decided on. - Starts the preview server via
synergy preview start(idempotent). - Prints the session URL using the origin returned by the preview runtime.
Editing or extending an existing session uses the synergy:spec-authoring skill, which covers adding/inserting/renaming/removing phase folders without breaking cross-refs.
Editing iterations
The preview hot-reloads on every save. Edit the MDX, watch the browser refresh, take user feedback, repeat. Add or remove .mdx files in the session and the virtual session index rebuilds — the page does a full reload automatically.
Orchestrator template
Every orchestrator.md has these sections:
# Orchestrator — <title>
> Session: <name>. Type: <feature|refactor|project>.
## Overview
One paragraph. What, why, success criteria.
## Dependency graph
ASCII or Mermaid representation of phase ordering. Same-line items can run in parallel.
## Parallel chunks
Explicit list of which phases can be sub-agent-parallel vs sequential.
## Agent strategy
- Sub-agents for: <bounded, well-specified tasks>
- Agent team for: <cross-cutting, exploratory work>
- Human in the loop at: <phase boundaries>
## Verification gates
- After Phase N: <command to run, criteria to meet>
## How to invoke
"Implement the plan in @.synergy/sessions/<name>/ — start with orchestrator.md."Cross-reference syntax
| Form | Meaning |
<CrossRef to="01-architecture" /> | Link to sibling spec file |
<CrossRef to="01-architecture#auth-flow" /> | Link to a heading inside a sibling |
<CrossRef to="01-architecture">the architecture spec</CrossRef> | Custom link text |
<CrossRef to="phases/core" /> | Link to phase folder by slug (preferred phase form) |
<CrossRef to="phases/core#verification" /> | Link to a heading inside a phase spec.mdx |
Phase refs use the slug only — never the numeric prefix. phases/01-core is invalid. The numeric prefix orders folders on disk; the slug is the stable identifier. Renumbering phases (e.g. inserting 02-warmup between 01-foundation and what becomes 03-core) does not break refs that use the slug form.
Legacy phase refs of the form 02-implementation#phase-2 still resolve but the validator warns and asks you to migrate to phases/<slug>.
Anchors are GitHub-style: lowercase, spaces → -, special chars stripped, deduped per file.
Component cheat sheet
| Component | Required props | Notes |
<Status> | value (StatusValue) | Lifecycle badge |
<Phase> | number, title | Optional status, estimate, summary |
<Timeline> | milestones[] | Ordered list with label, optional when, status |
<SubSpec> | slug, title | Use in 00-overview to list session contents |
<CrossRef> | to | Validator-enforced |
<AgentAllocation> | entries[] | Each entry: name, type (sub-agent|agent-team|human), responsibility |
<Team> | name, members[] | Each member: name, role |
<Reviewer> | name, role, scope | Sign-off declarations |
<OpenQuestion> | question | Optional id, owner, resolveBy |
<Risk> | title, severity | Optional id, category, mitigation |
<Mockup> | src, alt | src is relative to session dir (use ./assets/...) |
<Chart> | source (children or source prop) | Mermaid by default; kind informational |
Inline editing and feedback (v2)
The preview runtime adds an edit and feedback layer on top of the read-only v1 preview.
Discover its current origin with synergy preview status --json; agents interact with it
via the feedback skill, while the browser UI is for human reviewers.
- Apply / Discard buffer. Prose blocks are contentEditable in the browser. Every edit is held in memory until the human clicks Apply (flushes to the MDX file on disk) or Discard (reverts). No auto-save. Phase status dropdowns use the same buffer.
- Selection comments. A human selects text in the preview, clicks "+", leaves a note.
Each comment is a markdown file at
.synergy/feedback/<session>/<id>.mdwith YAML frontmatter carrying both line/col coordinates and abefore+selected+aftercontext string for drift-tolerant re-anchoring. - Diff view. Top-toolbar toggle. Highlights committed and uncommitted changes since the
human's last "Mark as reviewed". Review state persists to
.synergy/review-state.json. - Pull-based handoff. When the human runs
/synergy-feedback, thesynergy:address-feedbackskill reads.synergy/active-session, loads allstatus: opencomment files, edits the spec at each anchor, and PATCHes each comment toresolvedorrejected. Runsynergy validate <session>before declaring done. With--wait, the skill's Live wait mode blocks onsynergy feedback wait <session>and loops until the human clicks Done reviewing (see CLAUDE.md "Live feedback loop"). - Gitignored files.
active-sessionandreview-state.jsonare per-machine state — do not commit them.sessions/andfeedback/remain tracked (they are spec content).
CLI surface
The CLI handles deterministic process, execution-state, and review-artifact operations — see
CLAUDE.md "Commands" for the authoritative subcommands. Spec authoring and repository-aware
review analysis live in shared skills; there is no synergy spec command.
Guided code reviews
Review is independent from MDX specification sessions. Invoke the cross-host synergy:review
skill (or Claude Code's thin /synergy-review command) for a GitHub PR, staged changes,
unstaged changes, or a bounded current-code scope. The skill delegates capture, validation,
reconciliation, persistence, freshness, and readiness to synergy review ...; agents own only
repository-aware grouping, scoped section selection, concise descriptions, and answers.
Review artifacts live in gitignored .synergy/reviews/<workspace>/revisions/<revision>/ and
render at /r/<workspace>/<revision>. .synergy/active-review.json is the per-machine browser
pointer. Never hand-edit those JSON artifacts. An exact workspace@revision never advances;
refreshing a workspace creates or resumes its current immutable revision and carries coverage
forward only through deterministic reconciliation.
For browser questions, run synergy review wait <workspace@revision> --for 15m in the
foreground, answer through synergy review answer, and wait again. Never detach the wait,
invent context across revisions, analyze ignored untracked files, or mutate application code
unless the user separately asks for implementation.
Preview design system
The preview app's visual language ("Ember & Graphite" - warm copper accent on warm
graphite/paper neutrals, Space Grotesk + Inter + JetBrains Mono) is token-driven.
packages/preview/src/theme.css is the single token source; docs/design-system.md
documents it. When touching preview or spec-kit CSS, consume --syn-* tokens (or the
--sk-* aliases) - never hardcode palette hex values in component rules.
Don'ts
- Don't co-locate session content in the consumer's source tree. Always
.synergy/sessions/. - Don't write raw markdown links between specs.
- Don't bypass validation by silencing errors.
- Don't bundle implementation code in the spec — it describes work, agents do work.
- Don't edit
orchestrator.mdto be MDX-flavored — it must stay plain markdown for CLI legibility. - Don't treat the preferred port
4321as the runtime authority; consume the verified origin. - Don't reference phases by numeric prefix in CrossRefs. The slug is the identifier; the prefix is just sort order.
- Don't try to add a
synergy specCLI command. Authoring is a skill.
Maintaining this file
Keep this file for knowledge useful to almost every future agent session in this project. Do not repeat what the codebase already shows; point to the authoritative file or command instead. Prefer rewriting or pruning existing entries over appending new ones. When updating this file, preserve this bar for all agents and keep entries concise.
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
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.

