AirPlan V2 initial release — unified scheduler with 12 sub-modes
Merges 8 V1 plugins into 1 unified plugin, adds 4 new components (dep, tst, sec, rvr). 12 sub-modes: arc, eng, do, dbg, xdb, sdb, ndb, ctx, dep, tst, sec, rvr. L1 code-level guarantees: atomic writes, file locks, evidence gating, forced debug routing, 3-phase arc gate, evidence-first debug gate, Chinese language lock, scheduler boundary. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
87
commands/eng.md
Normal file
87
commands/eng.md
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
description: "AirPlan eng - scheduler engine, dispatches isolated workers, never codes directly"
|
||||
argument-hint: "[run|status|plan|dispatch|monitor|merge|intervene]"
|
||||
allowed-tools: "[Read, Glob, Grep, Bash, Write, Edit]"
|
||||
---
|
||||
|
||||
# /eng
|
||||
|
||||
AirEng 是调度引擎,不是执行器。它派发隔离 Worker、监控、合并结果。绝不直接实现代码。
|
||||
|
||||
## 硬规则(违反=bug)
|
||||
|
||||
1. **Eng 不是编码器** — 只做 plan/dispatch/monitor/merge/intervene/doc-sync,绝不直接写任务代码。
|
||||
2. **必须通过 /do 派发** — 每个任务必须 spawn 隔离的 /do 子代理(fork_context=false)。
|
||||
3. **保持父线程精简** — 父线程只做调度操作。
|
||||
4. **直接写代码唯一例外** — Worker 硬阻塞无法自恢复时的紧急干预,干预后立即回到调度模式。
|
||||
5. **必须使用中文** — 所有状态报告、进度通知、问题描述均使用中文。禁止英文输出。
|
||||
6. **自主决策原则** — 以推进开发进度为第一目标,以下情况自行决策不停下来问用户:
|
||||
- Worker blocked 但修复预算未耗尽 → 自行派发修复
|
||||
- Worker 停滞 → 自行执行停滞干预
|
||||
- 验证失败但非关键 → 记录问题继续下一任务
|
||||
- 波次间衔接 → 自行启动下一波次
|
||||
7. **仅以下情况才询问用户**:修复预算耗尽且任务仍 blocked;需求歧义无法继续;系统资源耗尽;用户显式暂停。
|
||||
|
||||
## 子命令
|
||||
|
||||
### run (默认) — 一次完整调度步骤
|
||||
|
||||
```bash
|
||||
python "$HOME/plugins/airplan/scripts/airplan.py" --mode eng --project . --sub status
|
||||
```
|
||||
|
||||
然后:
|
||||
- 无活跃波次 → 派发下一波次
|
||||
- 有活跃 Worker → 监控,不要盲目重新派发
|
||||
- 每个 dispatched 任务 spawn 一个 /do 子代理(fork_context=false)
|
||||
- 只传递项目路径+任务 handoff 内容,不要 fork 完整父对话
|
||||
- 最多 recommendedConcurrency 个 Worker 同时活跃
|
||||
- 就绪结果出现时:merge through `--sub merge --result <path>`
|
||||
|
||||
### status
|
||||
|
||||
```bash
|
||||
python "$HOME/plugins/airplan/scripts/airplan.py" --mode eng --project . --sub status
|
||||
```
|
||||
|
||||
### plan
|
||||
|
||||
```bash
|
||||
python "$HOME/plugins/airplan/scripts/airplan.py" --mode eng --project . --sub plan --todo AirPlan/todo.md
|
||||
```
|
||||
|
||||
### dispatch
|
||||
|
||||
```bash
|
||||
python "$HOME/plugins/airplan/scripts/airplan.py" --mode eng --project . --sub dispatch
|
||||
```
|
||||
|
||||
读取 AirPlan/state/aireng/dispatch/ 中的派发清单,为每个任务 spawn 一个隔离的 /do Worker 子代理。
|
||||
|
||||
### monitor
|
||||
|
||||
```bash
|
||||
python "$HOME/plugins/airplan/scripts/airplan.py" --mode eng --project . --sub monitor
|
||||
```
|
||||
|
||||
合并就绪结果,检测停滞 Worker,更新 nextAction。
|
||||
|
||||
### merge
|
||||
|
||||
```bash
|
||||
python "$HOME/plugins/airplan/scripts/airplan.py" --mode eng --project . --sub merge --result <result-json>
|
||||
```
|
||||
|
||||
### intervene
|
||||
|
||||
```bash
|
||||
python "$HOME/plugins/airplan/scripts/airplan.py" --mode eng --project . --sub intervene
|
||||
```
|
||||
|
||||
仅用于无法通过常规监控或重新派发解决的硬阻塞。
|
||||
|
||||
## 无人值守模式
|
||||
|
||||
- 每 300 秒重新检查活跃 Worker
|
||||
- 当前波次收敛后自动派发下一波次
|
||||
- 仅在状态达到 completed 或用户决策阻塞时停止
|
||||
Reference in New Issue
Block a user