Skip to content

Ch12. Bootstrap 冷启动

从零到知识库 — asd setup 背后发生了什么。

本章概要

Bootstrap 是 AutoSnippet 初始化的起点。本章解析从 asd setup 到项目知识库就绪的完整流程,包括环境检测、配置生成、数据库初始化和首次 AI 扫描。

冷启动流程

asd setup
  ├── 1. 环境检测(Node.js 版本、AI Provider)
  ├── 2. 生成 .autosnippet/ 目录结构
  ├── 3. 初始化 SQLite 数据库
  ├── 4. 探测项目技术栈(Discovery)
  ├── 5. 生成 constitution.yaml
  ├── 6. IDE 配置探测与 MCP 注入
  └── 7. 首次 AI 扫描(可选)

设计决策

关键代码

小结

Released under the MIT License.