演示奇偶校验
- 作者仓库星标 0
- 作者仓库 skills-registry
- 领域
- 运维部署
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tomevault-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- Docker
- 运行环境要求
- Python · Docker
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# 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.
1. **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.
2. **Dry-run first.**
```bash
pnpm parity:sync --target=<instance> --dry-run
```
Read the report: file count, rewritten package.json keys, prompt update.
3. **Apply.**
```bash
pnpm parity:sync --target=<instance>
# or --all to sync every instance
```
4. **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.
5. **Verify.**
```bash
pnpm parity:verify --target=<instance>
```
Exit 0 = green. Exit 1 = unresolved drift; fix until green.
## Procedure: verify (CI-equivalent)
```bash
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
1. Create the demo dir under `examples/integrations/<name>/` with the
usual Next.js frontend root and an `agent/` subdir.
2. Add an entry to `manifest.json` → `instances`:
```json
"<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>"
}
}
```
3. `pnpm parity:sync --target=<name>`
4. Port agent code (tool implementations, state schema, prompt loading).
Agent must read prompt from `agent/PROMPT.md` at startup.
5. `pnpm parity:verify --target=<name>` until green.
## Procedure: change the canonical prompt
1. Edit `examples/integrations/_parity/canonical/PROMPT.md`.
2. `pnpm parity:sync --all` — writes the new prompt to every instance's
`agent/PROMPT.md`.
3. 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:
1. Edit `manifest.json` → `tracked.verbatimFiles` or `tracked.packageJsonPaths`.
2. Run `pnpm parity:verify` — instances will flag as drifted until synced.
3. `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: [CopilotKit/CopilotKit](https://github.com/CopilotKit/CopilotKit) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->
章节与文件索引
按说明文件中的顺序排列。
当这个技能发动时
地面真相
过程:从北极星同步到实例
程序:验证(相当于 CI)
过程:添加一个新实例
文件/命令 -> examples/integrations/ · langgraph-python · examples/integrations/_parity/manifest.json · examples/integrations/langgraph-python/** · manifest.json · pnpm parity:verify · examples/integrations/_parity/canonical/PROMPT.md · examples/integrations/_parity/README.md
内容校验值 -> 9c97c80e7d34
当前原文的自动摘译,尚未人工审校。
当这个技能发动时
用户说“同步演示”、“对齐集成”、“端口到北极星”、“奇偶校验”、“运行奇偶校验同步”。用户编辑
examples/integrations/langgraph-python/下的文件,该文件列在manifest.json→ tracked.verbatimFiles 中。用户即将在examples/integrations/下添加新的集成。地面真相
在做出任何奇偶校验决定之前,请先阅读这些内容 - 它们会覆盖任何记忆的内容:
examples/integrations/_parity/manifest.json- 跟踪什么,允许发散什么,每个实例覆盖。examples/integrations/_parity/canonical/PROMPT.md— 规范过程:从北极星同步到实例
当北极星发生变化且实例需要跟上时,或者在引导新实例时使用。确认北极星的变化是有意的。如果用户更改了
langgraph-python/下的文件,询问是否应该传播它。对agent/的更改永远不会自动传播。程序:验证(相当于 CI)
输出类型:
verbatim-file— 与北极星进行字节比较。package-json— 跟踪的键不匹配与预期值。prompt— 在实例代理源中找不到规范提示第一行。实例代理需要将提示作为字符串文字内联。过程:添加一个新实例
使用通常的 Next.js 前端根目录和
agent/子目录在examples/integrations/<name>/下创建演示目录。向manifest.json→instances添加条目:pnpm parity:sync --target=<name>端口代理代码(工具实现、状态模式、提示加载)。