demoverse
AGENTS.md6 starsChanged 4 months agoMITView on GitHub
Demoverse is operated by a coding agent. The deterministic TypeScript engine does the mechanical work; the agent does the judgment and the prose. This file is the contract for that handoff, for any agent tool (Claude Code, Codex, Cursor, Copilot, …): Part 1 is the engine contract and the core loop, Part 2 takes a new user from a fresh clone to a living world, Part 3 has per-tool notes. The engine owns everything structural: ledger I/O, ids and referential…
- Reads credentials
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 35,040 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 repository4 other files it gives its agents.
- backfill-oppsSkill
- import-hubspotSkill
- pipeline-updateSkill
- setupSkill
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 2 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Plan: Run npm run pipeline for one living increment on demand (it equals npm run apply -- --weeks=1).
- Very specific: line 53
Ingest: Run npm run apply -- --ingest --reconcile.
- Very specific: line 58
Verify: Run npm run lint. Fix any error findings by editing the result and re-ingesting.
- Distinctive: line 66
Use only the given facts: Never invent competitors, contacts, or companies.
- Very specific: line 75
#competitivequestions: write only the human question, never an answer. - Distinctive: line 87
All output is clearly-fabricated demo data.
- Very specific: line 128
Every command is idempotent and supports --dry-run.
- Very specific: line 153
Step 0 · Preflight: Verify node -v ≥ 20 and npm ci has run.
- Very specific: line 185
Step 3 · Validate: Run npm run init. Zod validation errors name the file and the key.
- Very specific: line 188
Step 4 · First light: Run npm run apply -- --weeks=1 --dry-run and show the user the plan ("would create N opps, plan K artifacts").
- Very specific: line 214
If the user declines, print the manual routine instead: npm run pipeline → fill → npm run apply -- --ingest --reconcile → npm run lint → …
- Very specific: line 231
Never write result prose in the main context.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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: how a coding agent drives Demoverse
Demoverse is operated by a coding agent. The deterministic TypeScript engine does the mechanical work; the agent does the judgment and the prose. This file is the contract for that handoff, for any agent tool (Claude Code, Codex, Cursor, Copilot, …): Part 1 is the engine contract and the core loop, Part 2 takes a new user from a fresh clone to a living world, Part 3 has per-tool notes.
Part 1: The engine contract
The split (don't cross it)
The engine owns everything structural: ledger I/O, ids and referential
integrity, the simulation clock and trends, sampling accounts, contacts, deals
and competitors, schema validation, the coherence lint, reports, and reconcile
into CRM, Drive and Slack. You own two things: writing the prose for each
emitted request, and, when the operator sets new direction, updating
state/directives.md + state/trends.json. You never hand-edit
state/world.json.
The generation-request protocol (the core loop)
By default this loop runs unattended: .github/workflows/pipeline-update.yml
runs steps 1-4 weekly through Claude Code, then reconciles and commits itself
(see docs/automation.md). Run it by hand for an extra week, a nudge, or a
repo without Actions.
- Plan. Run
npm run pipelinefor one living increment on demand (it equalsnpm run apply -- --weeks=1). Plainnpm run applygenerates only the periods the real calendar has produced, and-- --backfillcovers the first big run. The engine advances the world: a couple of new deals, each open deal moved along its own cycle (usually one stage, more for a short deal, none at all for one that has gone quiet), closes for the deals whose cycle is up. Then it writes a request bundle holding only the touch points those events earned, 1–3 per deal. Never a deal's whole history; that is what--backfill-touchpointsis for.state/requests/<periodIndex>/manifest.json # index of all requests state/requests/<periodIndex>/<artifactId>.prompt.md state/requests/<periodIndex>/results/ # ← you write here - Fill. Each
.prompt.mdis fully grounded in the exact ledger facts. For every request inmanifest.json, read the prompt and write the result:output: markdown→ writeresults/<artifactId>.md(the artifact body).output: slack_messages→ writeresults/<artifactId>.jsonas{"messages":[{"personaHandle":"…","text":"…"}, …]}.output: email_thread→ writeresults/<artifactId>.jsonas{"emails":[{"from":"…","to":["…"],"subject":"…","body":"…","date":"YYYY-MM-DD","contactRef":"…"}, …]}(one object per message, in send order).
- Ingest. Run
npm run apply -- --ingest --reconcile. The engine validates each result, files markdown intostate/content/, attaches Slack messages and email threads onto their artifacts, and reconciles into every connector that is enabled and has credentials. Anything that fails validation staysplannedand reappears in the next bundle. Refill it and re-ingest. - Verify. Run
npm run lint. Fix anyerrorfindings by editing the result and re-ingesting. The cause is usually a missing competitor name or win/loss reason in the prose.
Rules for filling requests (non-negotiable)
The prompt carries GROUNDING RULES. Honor them exactly. In short:
- Use only the given facts. Never invent competitors, contacts, or companies.
- Cross-system consistency. A deal's transcript, win-loss artifact, and Slack thread must name the same competitor(s) and the same win/loss reason recorded on the deal. The linter checks this.
- The primary use case is the dominant theme. It is what the buyer came for, what discovery digs into, what gets demoed, what the objections are about. Other capabilities stay secondary.
none-mode deals: the#win-losspost is the sole win/loss signal. Make it carry the whole story (outcome + reason + competitors).#competitivequestions: write only the human question, never an answer. Answering is the job of whatever product consumes this data.- Detail levels come from the prompt (
low/medium/high): interviews are long and conversational, surveys are terse, transcripts are medium. - The VARIETY block is part of the grounding contract. Deal prompts carry a
seeded per-deal texture (backstory, buyer tone, objections, timeline), a
per-artifact shape, and a banned-phrase list. Write from them; they are what
keeps hundreds of deals from telling the same story. (Story banks live in
config/prose.yaml; Slack persona voice cards inconfig/slack-personas.yaml.) - No em dashes in the artifact body. Rewrite the sentence instead. They are
the loudest tell that a corpus was machine-written, and
npm run lintwarns on every one it finds. Fix with--refill=<artifactId>and a rewritten line. - All output is clearly-fabricated demo data. Never reference real people.
Detail-layer backfill contract (bulk filling of existing deals)
The living increment adds 1–3 touch points per deal per week (0 for a stalled deal that period, and a fast-track deal may end its whole life with 2). The one-time historical seed instead fills a deal's whole sales cycle. Per opportunity:
npm run apply -- --next=Nlists the next opps needing work:untouched, orplanned:Kfor planted-but-unfilled, which is resumable.- Per opp:
npm run apply -- --backfill-touchpoints --opp=<id>(idempotent). Capture the manifest immediately; the next plant overwrites it. - Fill via ONE dedicated agent context per opportunity, never batched
(Claude Code: the
opp-fillersubagent, Part 3). npm run apply -- --ingest --opp=<id>→ fix invalid →npm run lint -- --opp=<id>→ fix errors via--refill=<artifactId>+ a scoped re-fill →npm run apply -- --ingest --reconcile --opp=<id>→ commit"detail layer: <id> (<Account>)".
--refill is the sanctioned way to regenerate a bad result, since you never
hand-edit world.json. It refuses once the artifact has external records,
because regenerating would duplicate them.
Setting direction (Tier 2 / Tier 3)
- Tier 3 nudge (one period, not remembered): pass it at trigger time, as in
npm run apply -- --nudge="2× losses to Pricing this week". The engine echoes how it resolved it. - Tier 2 directive (durable): append an entry under
## Activeinstate/directives.md, and materialize it instate/trends.json. Examples:- "ramp velocity" → raise
volume.newOppsPerWeek; note it indirectiveEffects. - "Competitor A is getting tougher" → set
competitors.<name>.driftPerQuarterpositive; drop thewinRatetrend. - "buyers are starting to talk about X" → add a
voice.arcsentry (label,categorypain|job|buying_trigger|gain,says, dated[date, weight]points);voice.gainSharesteers gains vs pains. Amending = move the entry to## Supersededand adjust from that date forward.
- "ramp velocity" → raise
Ergonomics you can rely on
- Every command is idempotent and supports
--dry-run. Output is machine-readable enough to branch on (counts,filled/pending/invalid). npm run lintexits non-zero on coherence errors, so it is safe to gate a commit on. Scope it withlint -- --opp=<id>.lint -- --repetitionis a warn-only repeated-phrase detector; promote persistent offenders intobanned_phrasesinconfig/prose.yaml.- Nothing external is touched unless a connector is enabled in
config/connectors.yamland its credentials are present. Otherwise you get a clean, labeled skip. - Only cohort members reach external systems (
state/cohort.json, ~50 curated deals). Never widen the cohort to "push everything". apply -- --next=Nprints a read-only queue of opps still needing a detail layer.- Fills parallelize freely, since they write distinct result files.
apply/lintruns must stay serial, becausestate/world.jsonis written whole (last-writer-wins).
Part 2: The onboarding playbook (fresh clone → living world)
Claude Code users: run /setup, which executes exactly this. Any other
agent: when the user asks to get started, follow these steps in order,
checking off what already exists (every step is resumable).
Step 0 · Preflight. Verify node -v ≥ 20 and npm ci has run. If
config/world.yaml already exists, ask whether to amend or start over. Never
silently overwrite a configured world.
Step 1 · Interview the user. Demoverse ships templates, not a canned company, so the user's fictional company is invented here. Ask one topic at a time, and offer to invent plausible details from a one-line seed idea ("a devtools SaaS selling error monitoring") whenever the user shrugs:
- The company: name, colloquial short name, a
.exampledomain (or one they own), a one-line product description, category. - Product surface: 2–4 product domains/modules, each with named capabilities ("agents"/features) and the pain each solves.
- Market: 3–5 competitors, invented by default. Real vendor names are
allowed if the user explicitly wants them (point them at
DISCLAIMER.md: fabricated outcomes about real companies stay in their private systems). Industries served, company sizes, regions. - Sales motion: typical deal size band (derive pricing tiers), team size (generate a fictional manager/AE roster), rough win rate, dominant loss reasons.
- Buying group: propose the template personas (Champion, Economic Buyer, Technical Buyer, User, Influencer); ask which roles matter and typical titles in their market.
- Prose texture: the shipped
prose.yamlworks as-is. Offer to tailor the narrative angles and objection themes to the invented product (recommended).
Step 2 · Write the config. Copy each file from config/templates/ to
config/ and fill it from the interview. Keep every schema key; replace
placeholders. Then show the user a one-screen summary (company, modules,
competitors, segments, team, pricing) and get an explicit confirm before
proceeding.
Step 3 · Validate. Run npm run init. Zod validation errors name the file
and the key. Fix the config (or re-ask the user) and re-run until clean.
Step 4 · First light. Run npm run apply -- --weeks=1 --dry-run and show
the user the plan ("would create N opps, plan K artifacts"). Then run
npm run pipeline for real, open one generated
state/requests/<n>/<artifactId>.prompt.md, and fill it as the hello-world.
Ingest with npm run apply -- --ingest, run npm run lint, and show the
result. The world now exists, entirely locally, with zero credentials.
Step 5 · Connectors (optional, one at a time). For each system the user
wants (Salesforce / Google Drive / Slack / HubSpot): follow the matching guide
in docs/connectors/, write the credentials into .env, flip
enabled: true in config/connectors.yaml, and verify with the cheapest
real call before declaring success (Salesforce: a scoped
apply -- --ingest --reconcile --opp=<one-cohort-id> --dry-run then real;
Drive/Slack: reconcile and confirm the file/post appears). Remind the user:
isolated, dedicated orgs and workspaces only.
Step 6 · Commit.
git add -A && git commit -m "demoverse: initial world for <Company>".
Step 7 · Automate (recommended). Offer to make the weekly run hands-off
per docs/automation.md: push to a private GitHub repo, create the
automation environment restricted to main, and set a Claude credential plus
each enabled connector's values as environment secrets. The user enters secret
values themselves (gh secret set <NAME> --env automation prompts for them);
never echo or store them. Verify with one manual run
(gh workflow run pipeline-update.yml, then gh run watch) and git pull.
If the user declines, print the manual routine instead: npm run pipeline →
fill → npm run apply -- --ingest --reconcile → npm run lint → commit.
Part 3: Per-tool notes
Claude Code (v2.1.277 or later reads this file directly). Skills in
.claude/skills/:
| Skill | What it runs |
/setup | Part 2, end to end |
/pipeline-update [weeks] | The weekly increment: advance → fill → ingest → lint → fix → reconcile → commit. Also runs unattended every Sunday from .github/workflows/pipeline-update.yml (steps 1-4; the workflow reconciles and commits; docs/automation.md) |
/backfill-opps [N] | The detail-layer loop for N opportunities, one commit per opp. For a bulk backfill run /loop /backfill-opps 5 until npm run apply -- --next=1 prints (no opportunities need a detail layer) |
/import-hubspot | Provision the HubSpot schema, import the CRM structure into the dedicated test account, verify record by record |
Never write result prose in the main context. Every fill goes through the
opp-filler subagent (.claude/agents/opp-filler.md, Read/Write/Glob only),
one per opportunity; the main context runs only apply, lint and git,
serially. If a subagent hits a session limit, relaunch it for the remaining
artifacts of that same deal.
Codex / Cursor / other AGENTS.md-aware tools: this file is the whole
contract. Mirror the subagent rule by hand: fill one opportunity per
session/task, keep apply/lint serial, and commit per opportunity during
backfills.
No agent at all: the engine runs, but nothing writes the prose, so
artifacts stay empty until a model does. The prompts in state/requests/ are
self-contained briefs a human can fill for a handful of artifacts, not a
world. The realistic path is your own filler script:
docs/request-protocol.md specifies the result formats for any generator you
point at a model API.
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.

