Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ content/

The skills implement a multi-phase agentic development pipeline. Entry points:

- **`/orchestrate-dev`** — full workflow: architecture (optional) -> planning (optional) -> implementation -> review cycle
- **`/orchestrate-dev`** — full workflow (default), lightweight (`--mode=vibe`), or thorough (`--mode=strict`)
- **`/orchestrate-review`** — review-only workflow for manually written code

The `orchestrate` skill is the internal pipeline engine. It:
Expand Down
65 changes: 61 additions & 4 deletions packages/agents/content/skills/orchestrate-dev/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,44 @@ Run a full development workflow by invoking the `orchestrate` engine with the co
## Arguments

- Task description (required): what to implement
- `--mode=<vibe|strict>`: select a mode preset (default: no mode, preserving current behavior)
- `--max-review-rounds=N`: maximum iterative review rounds (default: 3)
- `--diff-base=<ref>`: reference to diff against for reviews (default: project's default branch)
- `--fix-low` / `--no-fix-low`: whether to fix `low`-criticality findings (default: true)
- `--approval-threshold=<low|medium|high>`: findings at this level or above must be fixed for code approval (default: `low`)
- `--budget-threshold=<low|medium|high>`: remaining review-round budget is spent only on findings at this level or above (default: `low`)
- `--fix-low` / `--no-fix-low`: backward-compatible aliases. `--fix-low` is equivalent to `--approval-threshold=low --budget-threshold=low`. `--no-fix-low` is equivalent to `--approval-threshold=medium --budget-threshold=medium`.

## Pipeline
## Mode presets

Each mode is a preset bundle of settings. When `--mode` is specified, its preset values apply as defaults. Any setting can be individually overridden via explicit CLI arguments (e.g., `--mode=vibe --approval-threshold=medium`).

| Setting | `vibe` | (default) | `strict` |
| ------------------- | ------ | --------- | -------- |
| architecture | absent | optional | required |
| planning | absent | optional | required |
| approval-threshold | high | low | low |
| budget-threshold | high | low | low |
| holistic_reviewer\* | sonnet | opus | opus |
| max-review-rounds | 1 | 3 | 4 |

\* `holistic_reviewer` uses snake_case because it is a `--models` key (passed as `--models=holistic_reviewer:sonnet`), not a standalone argument. See the engine's [model resolution](../orchestrate/SKILL.md#resolving-models) for details.

### Resolution cascade

For all mode-affected settings, values are resolved in this order (highest priority first):

1. Explicit CLI argument
2. Mode preset (if `--mode` specified)
3. `orchestration.<key>` in preferences.yaml
4. Legacy alias (`fix_low_findings` mapped to thresholds)
5. Engine default

### Pipeline per mode

**Default** (no `--mode`):

```
architecture (optional) planning (optional) implementation (required) review-cycle (required)
architecture (optional) -> planning (optional) -> implementation (required) -> review-cycle (required)
```

| Phase | Requirement | Description |
Expand All @@ -32,9 +62,36 @@ architecture (optional) → planning (optional) → implementation (required)
| `implementation` | `required` | Write code |
| `review-cycle` | `required` | Parallel review, code-simplifier, holistic review |

**`--mode=vibe`**:

```
implementation (required) -> review-cycle (required)
```

| Phase | Requirement | Description |
| ---------------- | ----------- | ------------------------------------------------- |
| `implementation` | `required` | Write code |
| `review-cycle` | `required` | Parallel review, code-simplifier, holistic review |

**`--mode=strict`**:

```
architecture (required) -> planning (required) -> implementation (required) -> review-cycle (required)
```

| Phase | Requirement | Description |
| ---------------- | ----------- | ------------------------------------------------- |
| `architecture` | `required` | Assess impact; always runs |
| `planning` | `required` | Create implementation plan; always runs |
| `implementation` | `required` | Write code |
| `review-cycle` | `required` | Parallel review, code-simplifier, holistic review |

## Process

Invoke the `orchestrate` skill with the pipeline specification above and pass through all arguments unchanged. The agent reads both this wrapper and the orchestrate engine instructions in the same conversation context. The pipeline table above **is** the pipeline specification — the engine reads the table entries (phase name + requirement level) and uses them directly to determine which phases to execute and in what order. No additional structured format is needed beyond this table.
1. **Resolve mode**: if `--mode` is provided, look up the mode preset from the table above.
2. **Apply overrides**: for each setting, apply the resolution cascade — explicit CLI arguments override mode presets, which override preferences, which override engine defaults. For model-related settings (like `holistic_reviewer`), pass the resolved value to the engine via `--models` (e.g., `--models=holistic_reviewer:sonnet`).
3. **Select pipeline**: use the pipeline table corresponding to the resolved mode.
4. **Invoke the engine**: invoke the `orchestrate` skill with the selected pipeline specification and all resolved arguments. The agent reads both this wrapper and the orchestrate engine instructions in the same conversation context. The pipeline table for the resolved mode **is** the pipeline specification — the engine reads the table entries (phase name + requirement level) and uses them directly to determine which phases to execute and in what order. No additional structured format is needed beyond this table.

## After the run

Expand Down
4 changes: 3 additions & 1 deletion packages/agents/content/skills/orchestrate-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Use `orchestrate-dev` instead when you need the full development workflow (archi
- Task description (required): what the branch changes accomplish
- `--max-review-rounds=N`: maximum iterative review rounds (default: 3)
- `--diff-base=<ref>`: reference to diff against for reviews (default: project's default branch)
- `--fix-low` / `--no-fix-low`: whether to fix `low`-criticality findings (default: true)
- `--approval-threshold=<low|medium|high>`: findings at this level or above must be fixed for code approval (default: `low`)
- `--budget-threshold=<low|medium|high>`: remaining review-round budget is spent only on findings at this level or above (default: `low`)
- `--fix-low` / `--no-fix-low`: backward-compatible aliases. `--fix-low` is equivalent to `--approval-threshold=low --budget-threshold=low`. `--no-fix-low` is equivalent to `--approval-threshold=medium --budget-threshold=medium`.

## Pipeline

Expand Down
26 changes: 18 additions & 8 deletions packages/agents/content/skills/orchestrate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ user-invocable: false

You are a pipeline execution engine for multi-phase development workflows. You delegate ALL work to specialized subagents via the **Task tool** and use their structured output for flow control. You never write project code directly — only orchestration artifacts (run-manifest, run-index.json, run-summary).

Wrapper skills (`orchestrate-dev`, `orchestrate-review`) configure which phases to run and invoke this engine with a pipeline specification.
Wrapper skills (`orchestrate-dev` with optional `--mode=vibe|strict`, `orchestrate-review`) configure which phases to run and invoke this engine with a pipeline specification.

## Arguments

Expand All @@ -28,20 +28,26 @@ Wrapper skills (`orchestrate-dev`, `orchestrate-review`) configure which phases
2. **Task description** (required): what to implement
3. `--max-review-rounds=N`: maximum iterative review rounds before marking needs_manual_review (default: 3)
4. `--diff-base=<ref>`: reference to diff against for reviews (default: project's default branch via `get-default-branch`)
5. `--fix-low` / `--no-fix-low`: whether to fix `low`-criticality findings when review budget remains (default: true)
6. `--models=<key:model,...>`: model assignment overrides, comma-separated (e.g., `--models=coder:opus,default:sonnet`)
5. `--approval-threshold=<low|medium|high>`: findings at this level or above must be fixed for code approval (default: `low`)
6. `--budget-threshold=<low|medium|high>`: remaining review-round budget is spent only on findings at this level or above (default: `low`)
7. `--fix-low` / `--no-fix-low`: backward-compatible aliases. `--fix-low` is equivalent to `--approval-threshold=low --budget-threshold=low`. `--no-fix-low` is equivalent to `--approval-threshold=medium --budget-threshold=medium`.
8. `--models=<key:model,...>`: model assignment overrides, comma-separated (e.g., `--models=coder:opus,default:sonnet`)

### Resolving max-review-rounds

1. Check for skill argument: `--max-review-rounds=N`
2. Fall back to `orchestration.max_review_rounds` in `.agents/preferences.yaml` then `~/.agents/preferences.yaml`
3. Default: `3`

### Resolving fix-low
### Resolving thresholds

1. Skill argument: `--fix-low` or `--no-fix-low`
2. Preference: `orchestration.fix_low_findings` in `.agents/preferences.yaml` then `~/.agents/preferences.yaml`
3. Default: `true`
The wrapper skill (e.g., `orchestrate-dev`) resolves modes and applies the resolution cascade before invoking this engine. The engine receives already-resolved threshold values as explicit arguments. Within the engine, threshold resolution is:

1. Explicit CLI argument: `--approval-threshold=<level>` or `--budget-threshold=<level>`
2. Legacy alias: `--fix-low` (sets both to `low`) or `--no-fix-low` (sets both to `medium`)
3. Preference: `orchestration.approval_threshold` / `orchestration.budget_threshold` in `.agents/preferences.yaml` then `~/.agents/preferences.yaml`
4. Legacy preference: `orchestration.fix_low_findings` in `.agents/preferences.yaml` then `~/.agents/preferences.yaml` (`true` maps to both thresholds `low`; `false` maps to both thresholds `medium`)
5. Default: both `low`

### Resolving models

Expand Down Expand Up @@ -88,6 +94,9 @@ Invalid model names (e.g., `gpt4`) are rejected by the Task tool at dispatch tim

```yaml
orchestration:
approval_threshold: low # or medium, high
budget_threshold: low # or medium, high
# fix_low_findings: true # legacy alias — mapped to both thresholds (true -> low, false -> medium)
models:
default: sonnet
coder: opus
Expand Down Expand Up @@ -177,7 +186,8 @@ Prefix the status line with a colored emoji for visual distinction:
"mergeBaseSha": "{merge-base-sha}",
"diffBase": "{diff-base}",
"maxReviewRounds": {N},
"fixLowFindings": {true|false},
"approvalThreshold": "{low|medium|high}",
"budgetThreshold": "{low|medium|high}",
"mode": "orchestrated",
"model": "{model identifier}",
"models": {
Expand Down
Loading