chore: push all design docs, V2 plan specs, and current working state
Includes AirPlan design documents, AircOding-alpha1-plan, AirPlanV2, AirPlan-ParaV2, AirPlan-Para V1 reference docs, and all working code changes across packages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
48
CLAUDE.md
Executable file
48
CLAUDE.md
Executable file
@@ -0,0 +1,48 @@
|
||||
# AirCoding — 铁规则
|
||||
|
||||
## 1. 架构铁律
|
||||
|
||||
**除了调度层,全部用 OpenCode 已有实现。禁止自研替代。**
|
||||
|
||||
调度层保留:Scheduler / TaskGraph / WavePlanner / RetryPlanner / Worker IPC / ADR Cascade / ArchitectureDesigner
|
||||
|
||||
以下必须用 OpenCode 代码运行,不能自己写一个功能等价的替代:
|
||||
- Provider:`OpenAICompatible.configure({baseURL, apiKey}).model(id)` → `LLMClient.generate()`
|
||||
- Agent Loop:`tool-runtime.ts`
|
||||
- 工具系统:`Tool.make()` 注册的 19 个工具
|
||||
- TUI:OpenCode 132 文件
|
||||
- 权限:OpenCode `ctx.ask()` 路径
|
||||
|
||||
## 2. 完成标准
|
||||
|
||||
**任何时候说"完成",必须附上真实执行证据:**
|
||||
|
||||
- Provider 接通 = 贴出 `LLMClient.generate()` 返回的 HTTP 响应内容
|
||||
- 工具接通 = 贴出 Worker 通过 OpenCode tool 执行的结果
|
||||
- TUI 接通 = 贴出用户输入后在 TUI 上看到的实际输出
|
||||
|
||||
**禁止**:typecheck 通过、build 通过、测试通过、方法存在、import 成功 —— 这些不算完成。
|
||||
|
||||
## 3. 禁止
|
||||
|
||||
- 禁止跑 typecheck 或 build 来证明自己做了事
|
||||
- 禁止列表格宣称 Phase 完成
|
||||
- 禁止写新测试
|
||||
- 禁止修改调度层代码(packages/scheduler/)
|
||||
- 禁止在 run.ts 中用 `new OpenAICompatibleAdapter` 或任何自研 adapter
|
||||
- 禁止给"还没接通但我认为逻辑正确"的代码标记完成
|
||||
|
||||
## 4. 工作方式
|
||||
|
||||
1. 一次只改一条调用链
|
||||
2. 改完立即用真实 API key 跑,贴输出
|
||||
3. 输出不对就修,不跳下一步
|
||||
4. 调度层代码只读,不写
|
||||
|
||||
## 5. 验证脚本
|
||||
|
||||
Provider 接通验证:`packages/llm/test/opencode-provider-live.test.ts`
|
||||
```bash
|
||||
AIRCODING_API_KEY=<key> bun test packages/llm/test/opencode-provider-live.test.ts
|
||||
```
|
||||
看到 GLM 返回的中文内容 = Provider 接通。
|
||||
Reference in New Issue
Block a user