官方 Demo
仓库中自带了一个故意违反分层规则的示例工程,用来在几分钟内展示完整的 ArchSpine 治理链路。
场景
src/api/handler.ts 直接导入 src/infra/database.ts,这会违反 .spine/rules/arch.yml 中声明的分层约束。
治理修复演示
bash
npm run build
cd examples/demo-project
rm -rf .spine/index .spine/atlas
rm -f .spine/cache.db .spine/cache.db-shm .spine/cache.db-wal .spine/manifest.json .spine/languages.json .spine/.lock
node ../../dist/cli/index.js llm --project set provider mock
node ../../dist/cli/index.js sync
node ../../dist/cli/index.js check
node ../../dist/cli/index.js fix预期结果
sync从干净基线重建 demo 的.spine/状态check稳定报出src/api/handler.ts中的 API -> Infra 违规fix读取已记录的 active violation 并进入修复流程
项目能力演示
如果你只想展示索引与扫描能力,可以改用这条更短的路径:
bash
npm run build
node dist/cli/index.js sync --hook
node dist/cli/index.js info
node dist/cli/index.js scan --dry-run录制资产
- 治理演示脚本:
scripts/demo.tape - 治理 GIF:
examples/demo-project/demo.gif - 项目级演示脚本:
scripts/project-demo.tape - 项目级 GIF:
docs/public/archspine-project-demo.gif
如果需要切到真实模型,请先执行 spine llm setup,并准备好所需代理环境变量。