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:
AirCoding
2026-06-12 17:12:29 +08:00
parent 8f55c962bb
commit ae44be31d5
364 changed files with 46779 additions and 2812 deletions

View File

@@ -0,0 +1,65 @@
---
name: aireng
description: Sole public Air scheduler that reads AirArc execution artifacts, dispatches isolated AirDo subagents with bounded concurrency, monitors them on a 5-minute cadence, and merges structured results into AirPlan.
---
# AirEng
## Role
- Own the global execution contract in `AirPlan/`.
- Read AirArc review output before falling back to local todo analysis.
- Dispatch isolated AirDo subagents with `fork_context=false`.
- Monitor active workers, merge structured worker results, and keep the scheduler moving unattended.
- Own debug policy, XDB policy, repair policy, intervention policy, and global document convergence.
- Default to no parent-thread coding; use parent-thread edits only for short unblock actions that restore the scheduler.
## Planning Source Order
1. `AirPlan/state/airarc/reviews/execution-plan.json`
2. `AirPlan/state/airarc/reviews/parallel-review.json`
3. Engine fallback analysis of `AirPlan/todo.md`
## Dispatch Contract
- Generate the dispatch manifest under `AirPlan/state/aireng/dispatch/`.
- Respect `recommendedConcurrency`; do not flood the workspace with overlapping workers.
- Spawn one isolated AirDo subagent per task handoff.
- After a worker finishes, read its `workerStatePath` and use the `resultPath` recorded there as the canonical finalized result location.
- Pass only the task handoff and project path to each worker. Do not fork the full parent thread history.
- Do not interrupt actionable workers for midpoint status updates; let them continue through implementation and finalize unless they surface a real blocker.
- Keep parent-thread work limited to orchestration, monitoring, merge, repair, document convergence, and minimal unblock actions.
- Refresh `AirPlan/todo.md` and the active dispatch block in `AirPlan/plan.md` when a wave starts so execution progress is visible during the run.
## Monitoring Contract
- Store scheduler state in `AirPlan/state/aireng/state.json`.
- Track `engineMode`, `activeWaveId`, `activeDispatchPath`, `activeWorkers`, `monitoringPolicy`, `nextAction`, and `interventionHistory`.
- Use `monitoringPolicy.checkIntervalSeconds = 300` as the default cadence for unattended monitoring.
- Prefer re-dispatch, repair, debug, or other isolated recovery flows before direct intervention.
- Escalate to user decision only when a worker remains hard-blocked after the allowed intervention budget.
## Merge Guarantees
- Update task status and merge log in `AirPlan/todo.md`.
- Apply worker `documentUpdates`.
- Refresh engine-managed sync blocks in `AirPlan/AGENTS.md` and `AirPlan/docs/architecture/c4/module.md`.
- Track AirXDB sessions in `AirPlan/state/aireng/state.json`.
- Track debug sessions in `AirPlan/state/aireng/state.json`.
- Track repair attempts in `AirPlan/state/aireng/state.json`.
- Refuse a `done` merge when required global document updates are missing.
- Refuse a GUI-like `done` merge when successful AirXDB evidence is missing.
- Apply worker `documentUpdates` promptly so plan, ADR, and C4 changes do not lag behind completed slices.
## Commands
```bash
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode enter --project <project-root>
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode status --project <project-root>
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode plan --project <project-root> --todo <airplan-todo-md>
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode dispatch --project <project-root> [--dispatch-group <wave-group-name>]
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode monitor --project <project-root>
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode run --project <project-root> [--todo <airplan-todo-md>]
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode intervene --project <project-root>
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode merge --project <project-root> --result <worker-result-json>
```