Skip to content

官方 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

录制资产

如果需要切到真实模型,请先执行 spine llm setup,并准备好所需代理环境变量。

English is the primary docs tree; zh-CN mirrors shipped behavior.