CopilotKit demo parity
Keeps the three (soon more) integration demos under examples/integrations/
aligned. langgraph-python is north-star; every other entry is an instance
that tracks it via examples/integrations/_parity/manifest.json.
When this skill fires
- User says "sync demos", "align integrations", "port to north-star",
"parity check", "run parity sync".
- User edits a file under
examples/integrations/langgraph-python/** that is
listed in manifest.json → tracked.verbatimFiles.
- User is about to add a new integration under
examples/integrations/.
pnpm parity:verify is failing locally or in CI.
Ground truth
Read these first before making any parity decision — they override
anything memorized:
examples/integrations/_parity/manifest.json — what is tracked, what is
allowed to diverge, per-instance overrides.
examples/integrations/_parity/canonical/PROMPT.md — the canonical
system prompt. Every agent inlines this as a string literal in source.
The verifier greps the canonical first line against each agent's source.
examples/integrations/_parity/README.md — human-facing how-to.
Procedure: sync from north-star to instance(s)
Use when north-star changed and instances need to catch up, OR when a new
instance is being bootstrapped.
- Confirm the north-star change is intentional. If the user changed
a file under
langgraph-python/, ask whether it should propagate.
Changes to agent/ are never auto-propagated.
- Dry-run first.
pnpm parity:sync --target=<instance> --dry-run
Read the report: file count, rewritten package.json keys, prompt update.
- Apply.
pnpm parity:sync --target=<instance>
# or --all to sync every instance
- Resolve manual-merge zones. Sync does NOT touch:
agent/** — port agent code by hand. See tracked.agentSurface.toolNames
and stateKeys in manifest.json for what must be present.
src/app/api/copilotkit/** — api route differs across instances
(north-star=LangGraphAgent, Docker instances=HttpAgent).
Dockerfile, docker/Dockerfile.agent, serve.py, scripts/** —
language-specific. Each instance keeps its own.
- Verify.
pnpm parity:verify --target=<instance>
Exit 0 = green. Exit 1 = unresolved drift; fix until green.
Procedure: verify (CI-equivalent)
pnpm parity:verify # all instances
pnpm parity:verify --target=<instance>
pnpm parity:verify --json # machine-readable
Output kinds:
verbatim-file — byte-compare against north-star.
package-json — tracked key mismatch vs expected value.
prompt — canonical prompt first line not found in instance agent
source. Instance agent needs the prompt inlined as a string literal.
agent-tool — tool name from manifest not found in instance agent
source. Usually means a tool was renamed or dropped; update manifest
OR port the tool.
agent-state — state key from manifest not found (warn only).
Procedure: add a new instance
- Create the demo dir under
examples/integrations/<name>/ with the
usual Next.js frontend root and an agent/ subdir.
- Add an entry to
manifest.json → instances:"<name>": {
"role": "instance",
"agent": { "language": "...", "runtime": "..." },
"allowedDivergence": [
"agent/**",
"src/app/api/copilotkit/**",
"Dockerfile",
"docker/Dockerfile.agent",
"serve.py",
"scripts/**"
],
"packageJsonOverrides": {
"scripts.dev:agent": "<invocation>",
"scripts.install:agent": "<install>"
}
}
pnpm parity:sync --target=<name>
- Port agent code (tool implementations, state schema, prompt loading).
Agent must read prompt from
agent/PROMPT.md at startup.
pnpm parity:verify --target=<name> until green.
Procedure: change the canonical prompt
- Edit
examples/integrations/_parity/canonical/PROMPT.md.
pnpm parity:sync --all — writes the new prompt to every instance's
agent/PROMPT.md.
- If the prompt change requires new tools or state keys, update
manifest.json → tracked.agentSurface to match, then port each
instance's agent.
Procedure: change the tracked surface
To track a new file or key:
- Edit
manifest.json → tracked.verbatimFiles or tracked.packageJsonPaths.
- Run
pnpm parity:verify — instances will flag as drifted until synced.
pnpm parity:sync --all to apply.
To stop tracking something, remove it from manifest.json. The verifier
and sync stop touching it. Any drift that already exists stays.
Red flags
| Signal |
What it means |
Do instead |
| "Just copy the file manually" |
Bypasses the manifest |
Add to tracked.verbatimFiles then sync |
| "Add a try/catch so verify doesn't fail" |
Silencing drift |
Resolve the drift or declare divergence |
"Move this into allowedDivergence to unblock" |
Scope creep |
Only add to divergence with explicit reason |
pnpm parity:sync on north-star directly |
Overwrites canonical |
Sync is instance-only; script refuses |
| Agent code copied between languages |
Doesn't work |
Port by hand; tracked.agentSurface names what |
Related skills
copilotkit-integrations — framework-specific wiring (LangGraph, CrewAI,
Mastra, etc.) when bootstrapping a new instance.
copilotkit-dev-workflow — monorepo conventions, Nx, commit format.
docker-ci-safety — Dockerfile safety when editing per-instance
container builds.
Source: KornaAI/CopilotKit — distributed by TomeVault.
1---2name: copilotkit-demo-parity3description: Keeps examples/integrations/* demos aligned to the north-star (langgraph-python). Use when the user says "sync demos", "sync integrations", "port to north-star", "align integration demos", "parity check", or when working inside examples/integrations/ and tracked files diverge. Drives the pnpm parity:sync / parity:verify commands and handles the manual-merge zones (agent code, api route, Dockerfile). Use when this capability is needed.4---56# CopilotKit demo parity78Keeps the three (soon more) integration demos under `examples/integrations/`9aligned. `langgraph-python` is north-star; every other entry is an instance10that tracks it via `examples/integrations/_parity/manifest.json`.1112## When this skill fires1314- User says "sync demos", "align integrations", "port to north-star",15 "parity check", "run parity sync".16- User edits a file under `examples/integrations/langgraph-python/**` that is17 listed in `manifest.json` → tracked.verbatimFiles.18- User is about to add a new integration under `examples/integrations/`.19- `pnpm parity:verify` is failing locally or in CI.2021## Ground truth2223Read these first before making any parity decision — they override24anything memorized:2526- `examples/integrations/_parity/manifest.json` — what is tracked, what is27 allowed to diverge, per-instance overrides.28- `examples/integrations/_parity/canonical/PROMPT.md` — the canonical29 system prompt. Every agent inlines this as a string literal in source.30 The verifier greps the canonical first line against each agent's source.31- `examples/integrations/_parity/README.md` — human-facing how-to.3233## Procedure: sync from north-star to instance(s)3435Use when north-star changed and instances need to catch up, OR when a new36instance is being bootstrapped.37381. **Confirm the north-star change is intentional.** If the user changed39 a file under `langgraph-python/`, ask whether it should propagate.40 Changes to `agent/` are never auto-propagated.412. **Dry-run first.**42 ```bash43 pnpm parity:sync --target=<instance> --dry-run44 ```45 Read the report: file count, rewritten package.json keys, prompt update.463. **Apply.**47 ```bash48 pnpm parity:sync --target=<instance>49 # or --all to sync every instance50 ```514. **Resolve manual-merge zones.** Sync does NOT touch:52 - `agent/**` — port agent code by hand. See `tracked.agentSurface.toolNames`53 and `stateKeys` in `manifest.json` for what must be present.54 - `src/app/api/copilotkit/**` — api route differs across instances55 (north-star=LangGraphAgent, Docker instances=HttpAgent).56 - `Dockerfile`, `docker/Dockerfile.agent`, `serve.py`, `scripts/**` —57 language-specific. Each instance keeps its own.585. **Verify.**59 ```bash60 pnpm parity:verify --target=<instance>61 ```62 Exit 0 = green. Exit 1 = unresolved drift; fix until green.6364## Procedure: verify (CI-equivalent)6566```bash67pnpm parity:verify # all instances68pnpm parity:verify --target=<instance>69pnpm parity:verify --json # machine-readable70```7172Output kinds:7374- `verbatim-file` — byte-compare against north-star.75- `package-json` — tracked key mismatch vs expected value.76- `prompt` — canonical prompt first line not found in instance agent77 source. Instance agent needs the prompt inlined as a string literal.78- `agent-tool` — tool name from manifest not found in instance agent79 source. Usually means a tool was renamed or dropped; update manifest80 OR port the tool.81- `agent-state` — state key from manifest not found (warn only).8283## Procedure: add a new instance84851. Create the demo dir under `examples/integrations/<name>/` with the86 usual Next.js frontend root and an `agent/` subdir.872. Add an entry to `manifest.json` → `instances`:88 ```json89 "<name>": {90 "role": "instance",91 "agent": { "language": "...", "runtime": "..." },92 "allowedDivergence": [93 "agent/**",94 "src/app/api/copilotkit/**",95 "Dockerfile",96 "docker/Dockerfile.agent",97 "serve.py",98 "scripts/**"99 ],100 "packageJsonOverrides": {101 "scripts.dev:agent": "<invocation>",102 "scripts.install:agent": "<install>"103 }104 }105 ```1063. `pnpm parity:sync --target=<name>`1074. Port agent code (tool implementations, state schema, prompt loading).108 Agent must read prompt from `agent/PROMPT.md` at startup.1095. `pnpm parity:verify --target=<name>` until green.110111## Procedure: change the canonical prompt1121131. Edit `examples/integrations/_parity/canonical/PROMPT.md`.1142. `pnpm parity:sync --all` — writes the new prompt to every instance's115 `agent/PROMPT.md`.1163. If the prompt change requires new tools or state keys, update117 `manifest.json` → `tracked.agentSurface` to match, then port each118 instance's agent.119120## Procedure: change the tracked surface121122To track a new file or key:1231241. Edit `manifest.json` → `tracked.verbatimFiles` or `tracked.packageJsonPaths`.1252. Run `pnpm parity:verify` — instances will flag as drifted until synced.1263. `pnpm parity:sync --all` to apply.127128To stop tracking something, remove it from `manifest.json`. The verifier129and sync stop touching it. Any drift that already exists stays.130131## Red flags132133| Signal | What it means | Do instead |134| ----------------------------------------------- | --------------------- | ----------------------------------------------- |135| "Just copy the file manually" | Bypasses the manifest | Add to `tracked.verbatimFiles` then sync |136| "Add a try/catch so verify doesn't fail" | Silencing drift | Resolve the drift or declare divergence |137| "Move this into `allowedDivergence` to unblock" | Scope creep | Only add to divergence with explicit reason |138| `pnpm parity:sync` on north-star directly | Overwrites canonical | Sync is instance-only; script refuses |139| Agent code copied between languages | Doesn't work | Port by hand; `tracked.agentSurface` names what |140141## Related skills142143- `copilotkit-integrations` — framework-specific wiring (LangGraph, CrewAI,144 Mastra, etc.) when bootstrapping a new instance.145- `copilotkit-dev-workflow` — monorepo conventions, Nx, commit format.146- `docker-ci-safety` — Dockerfile safety when editing per-instance147 container builds.148149---150> Source: [KornaAI/CopilotKit](https://github.com/KornaAI/CopilotKit) — distributed by [TomeVault](https://tomevault.io).151<!-- tomevault:4.0:skill_md:2026-06-15 -->