81 lines
4.3 KiB
Markdown
81 lines
4.3 KiB
Markdown
---
|
|
description: Run AirEng as the sole public Air scheduler that reads AirArc artifacts, dispatches isolated AirDo subagents, monitors them every 5 minutes, and merges structured results into AirPlan without defaulting to parent-thread coding
|
|
argument-hint: [run|status|plan|dispatch|monitor|merge|intervene]
|
|
allowed-tools: [Read, Glob, Grep, Bash, Write, Edit]
|
|
---
|
|
|
|
# /aireng
|
|
|
|
Use AirEng as the only public execution scheduler when the workflow should stay thin in the parent thread and execute real work through isolated subagents.
|
|
|
|
## Steps
|
|
|
|
1. Parse `$ARGUMENTS`; default to `run` when empty.
|
|
2. Always operate from the current project root and store workflow artifacts under `AirPlan/`.
|
|
3. The runtime auto-bootstraps missing `AirPlan/` files on first startup and does not overwrite existing project artifacts.
|
|
4. AirEng is a scheduler and convergence engine, not a default coding worker:
|
|
- Prefer isolated `/airdo` execution for normal task implementation.
|
|
- Keep parent-thread work focused on planning-source selection, dispatch, monitoring, merge, repair, and document convergence.
|
|
- Treat direct parent-thread editing as a temporary unblock action only when a worker is hard-blocked and cannot self-recover.
|
|
- After any temporary intervention, return immediately to scheduler mode.
|
|
5. AirEng is authorized to autonomously decide commands and file edits when needed to keep development moving unattended, but that autonomy serves orchestration, repair, doc sync, and unblock actions first rather than long-running parent-thread implementation.
|
|
6. For `status`, run:
|
|
|
|
```bash
|
|
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode status --project .
|
|
```
|
|
|
|
7. For `plan`, run:
|
|
|
|
```bash
|
|
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode plan --project .
|
|
```
|
|
|
|
8. For `dispatch`, run:
|
|
|
|
```bash
|
|
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode dispatch --project .
|
|
```
|
|
|
|
Then read the generated dispatch manifest under `AirPlan/state/aireng/dispatch/`, open each `handoffPath`, and prepare one isolated AirDo worker subagent per task. After a worker finishes, treat its `workerStatePath` `resultPath` as canonical instead of re-reading the task-local template `result.json`.
|
|
|
|
9. For `monitor`, run:
|
|
|
|
```bash
|
|
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode monitor --project .
|
|
```
|
|
|
|
Use this to perform one non-blocking scheduler inspection pass: merge ready results, detect stalled workers, prepare repair continuation, and update `nextAction` in `AirPlan/state/aireng/state.json`.
|
|
|
|
10. For `intervene`, run:
|
|
|
|
```bash
|
|
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode intervene --project .
|
|
```
|
|
|
|
Use this only for hard blockers that AirEng cannot clear through ordinary monitoring, repair, or re-dispatch decisions.
|
|
|
|
11. For `run`, do one full scheduler step:
|
|
- Ensure AirEng state exists with `enter` if needed.
|
|
- Prefer `AirPlan/state/airarc/reviews/execution-plan.json`; if stale or missing, refresh via `plan`.
|
|
- If no active wave exists, dispatch the next available parallel-safe wave.
|
|
- If active workers already exist, monitor them instead of re-dispatching blindly.
|
|
- Spawn one `worker` subagent per dispatched task with `fork_context=false` so contexts stay isolated.
|
|
- Pass only the project path plus the task handoff file content; do not fork the full parent conversation.
|
|
- Keep at most `recommendedConcurrency` workers active at once.
|
|
- Do not execute ordinary child-task implementation in the parent thread.
|
|
- Do not interrupt actionable workers for midpoint status checks.
|
|
- Refresh `AirPlan/todo.md` and the active dispatch block in `AirPlan/plan.md` when a wave starts so progress is visible during execution.
|
|
- When ready results appear, merge them through:
|
|
|
|
```bash
|
|
python "$HOME/plugins/aireng/scripts/aireng_mode.py" --mode merge --project . --result <result-json>
|
|
```
|
|
|
|
12. In unattended runs, keep the scheduler on a 5-minute monitoring cadence:
|
|
- Re-check active workers every 300 seconds.
|
|
- Continue dispatching later waves automatically when the current wave converges.
|
|
- Stop only when state reaches `completed` or a true user-decision blocker remains.
|
|
|
|
13. Throughout execution, keep `AirPlan/todo.md`, `AirPlan/plan.md`, and any required ADR/C4 updates synchronized. AirDo proposes `documentUpdates`; AirEng owns applying them.
|