Align brainstorm workflow with Codex input schema

This commit is contained in:
wxm
2026-05-18 19:42:51 -07:00
parent 0c4227cba6
commit 445d86c300
11 changed files with 1192 additions and 349 deletions

View File

@@ -4,9 +4,8 @@ This document defines the standard gate prompts for all director and lead review
across every workflow stage. Skills reference gate IDs from this document instead
of embedding full prompts inline — eliminating drift when prompts need updating.
**Scope**: All 7 production stages (Concept → Release), all shared director
custom agents, and all key Tier 2 leads. Any skill, team orchestrator, or
workflow may invoke these gates.
**Scope**: All 7 production stages (Concept → Release), all 3 Tier 1 directors,
all key Tier 2 leads. Any skill, team orchestrator, or workflow may invoke these gates.
---
@@ -19,31 +18,15 @@ Spawn `creative-director` via Codex custom-agent delegation using gate
**CD-PILLARS** from `references/studio-docs/director-gates.md`.
```
The matching custom agent must already be installed in the target project at
`.codex/agents/<agent-name>.toml`. The target project should also have a root
`AGENTS.md` installed from `project-template/AGENTS.md`; this is the shared
project guide used by Codex and bundled custom agents. The plugin source copies
for agents live in `runtime/agents/`; run
`python3 scripts/install_codex_runtime.py <target-project>` from the plugin root
if the target project is missing the agents or root guide. Pass the context
listed under that gate's **Context to pass** field, then handle the verdict
using the **Verdict handling** rules below.
Director names are Codex custom agent names. Do not recreate them by pasting
profile text into a generic default agent.
Pass the context listed under that gate's **Context to pass** field, then handle
the verdict using the **Verdict handling** rules below.
---
## Review Modes
Review intensity controls whether director and lead **review gates** run. It is
not a global switch for all custom-agent or subagent usage: a future team
workflow may still call specialist agents as part of its core work. Apply
review mode only to gate invocations such as `CD-PILLARS`, `TD-FEASIBILITY`,
`PR-SCOPE`, and the `*-PHASE-GATE` checks.
Review intensity can be set globally (persists across sessions) or overridden
per skill run.
Review intensity controls whether director gates run. It can be set globally
(persists across sessions) or overridden per skill run.
**Global config**: `production/review-mode.txt` — one word: `full`, `lean`, or `solo`.
Set once during `/start`. Edit the file directly to change it at any time.
@@ -55,14 +38,14 @@ Examples:
```
/brainstorm space horror → uses global mode
/brainstorm space horror --review full → forces full mode this run
/architecture-decision --review solo → skips review gates this run
/architecture-decision --review solo → skips all gates this run
```
| Mode | What runs | Best for |
|------|-----------|----------|
| `full` | All key director / lead review gates call their custom agents | Teams, learning users, or when you want thorough director feedback at every step |
| `lean` | Only PHASE-GATE review gates such as `/gate-check` call directors; ordinary per-skill review gates are skipped | **Default** — solo devs and small teams; directors review at milestones only |
| `solo` | All director review gates are skipped | Game jams, prototypes, maximum speed |
| `full` | All gates active — every workflow step reviewed | Teams, learning users, or when you want thorough director feedback at every step |
| `lean` | PHASE-GATEs only (`/gate-check`) — per-skill gates skipped | **Default** — solo devs and small teams; directors review at milestones only |
| `solo` | No director gates anywhere | Game jams, prototypes, maximum speed |
**Check pattern — apply before every gate spawn:**
@@ -73,9 +56,8 @@ Before spawning gate [GATE-ID]:
3. Else default to lean
Apply the resolved mode:
- solo → skip all director / lead review gates. Note: "[GATE-ID] skipped — Solo mode"
- lean → skip ordinary per-skill review gates; only run PHASE-GATE checks
(CD-PHASE-GATE, TD-PHASE-GATE, PR-PHASE-GATE, AD-PHASE-GATE)
- solo → skip all gates. Note: "[GATE-ID] skipped — Solo mode"
- lean → skip unless this is a PHASE-GATE (CD-PHASE-GATE, TD-PHASE-GATE, PR-PHASE-GATE, AD-PHASE-GATE)
Note: "[GATE-ID] skipped — Lean mode"
- full → spawn as normal
```
@@ -90,20 +72,15 @@ Apply the resolved mode:
3. Else default to `lean`
Apply the resolved mode:
- `full`**spawn all key director / lead review gates** as described by the skill.
- `lean`**spawn only PHASE-GATE review gates** such as `/gate-check`
(CD-PHASE-GATE, TD-PHASE-GATE, PR-PHASE-GATE, AD-PHASE-GATE). Skip ordinary
per-skill review gates and note: `[GATE-ID] skipped — Lean mode`
- `solo`**skip all director review gates**. Note in output:
`[GATE-ID] skipped — Solo mode`
- `solo`**skip all gates**. Note in output: `[GATE-ID] skipped — Solo mode`
- `lean`**skip unless this is a PHASE-GATE** (CD-PHASE-GATE, TD-PHASE-GATE, PR-PHASE-GATE, AD-PHASE-GATE). Note: `[GATE-ID] skipped — Lean mode`
- `full` → spawn as normal
```
# Apply mode check, then:
Spawn `[agent-name]` via Codex custom-agent delegation:
- Gate: [GATE-ID] (see references/studio-docs/director-gates.md)
- Custom agent file: .codex/agents/[agent-name].toml in the target project
- Context: [fields listed under that gate]
- Codex fork_context: false unless full thread context is required
- Await the verdict before proceeding.
```
@@ -111,9 +88,8 @@ For parallel spawning (multiple directors at the same gate point):
```
# Apply mode check for each gate first, then spawn all that survive:
Spawn all [N] custom agents simultaneously via Codex subagent delegation. Issue
all subagent requests before waiting for any result. Collect all verdicts before
proceeding.
Spawn all [N] agents simultaneously via Codex custom-agent delegation — issue all custom-agent requests before
waiting for any result. Collect all verdicts before proceeding.
```
---
@@ -125,7 +101,7 @@ All gates return one of three verdicts. Skills must handle all three:
| Verdict | Meaning | Default action |
|---------|---------|----------------|
| **APPROVE / READY** | No issues. Proceed. | Continue the workflow |
| **CONCERNS [list]** | Issues present but not blocking. | Surface to user via a structured prompt when available, or ask directly in chat: `Revise flagged items` / `Accept and proceed` / `Discuss further` |
| **CONCERNS [list]** | Issues present but not blocking. | Surface to user via Codex `request_user_input` — options: `Revise flagged` / `Accept` / `Discuss` |
| **REJECT / NOT READY [blockers]** | Blocking issues. Do not proceed. | Surface blockers to user. Do not write files or advance stage until resolved. |
**Escalation rule**: When multiple directors are spawned in parallel, apply the
@@ -160,15 +136,8 @@ or any time pillars are revised)
**Context to pass**:
- Full pillar set with names, definitions, and design tests
- Anti-pillars list
- Pillar conflict priority
- Core fantasy statement
- Unique hook ("Like X, AND ALSO Y")
- Required output document path for `/brainstorm`: `design/gdd/game-pillars.md`
- Template to use when the document is created or updated:
`references/studio-docs/templates/game-pillars.md`
- Existing `design/gdd/game-pillars.md` contents, if the file already exists
- Orchestrator assessment: missing / present and current / present but stale /
present but incomplete
**Prompt**:
> "Review these game pillars. Are they falsifiable — could a real design decision
@@ -176,18 +145,7 @@ or any time pillars are revised)
> they differentiate this game from its closest comparables? Would they help resolve
> a design disagreement in practice, or are they too vague to be useful? Return
> specific feedback for each pillar and an overall verdict: APPROVE (strong), CONCERNS
> [list] (needs sharpening), or REJECT (weak — pillars do not carry weight).
> When this gate is invoked from `/brainstorm` after the user has locked pillars,
> ensure `design/gdd/game-pillars.md` exists as the brainstorm-stage pillar
> source of truth. If it already exists and matches the locked pillars, review it
> in place and avoid rewriting for churn. If it is missing, stale, or incomplete,
> create or update it with `references/studio-docs/templates/game-pillars.md` as
> the structure. The initial brainstorm version must capture core fantasy, unique
> hook, target MDA aesthetics, 3-5 pillars, design tests, anti-pillars, conflict
> priority, and validation status; deeper cross-department implications can be
> marked TBD for later refinement. Begin the response with the required verdict
> token, then state whether the pillar document is current, created, updated, or
> blocked."
> [list] (needs sharpening), or REJECT (weak — pillars do not carry weight)."
**Verdicts**: APPROVE / CONCERNS / REJECT
@@ -661,9 +619,7 @@ Agent: `art-director` | Target custom agent file: `.codex/agents/art-director.to
## Tier 2 — Lead Gates
These gates are invoked by orchestration skills and senior skills when a domain
specialist's feasibility sign-off is needed. If a Tier 2 lead custom agent is
added later, invoke it with the same Codex custom-agent delegation pattern used
for Tier 1 agents.
specialist's feasibility sign-off is needed. Tier 2 leads use Sonnet (default).
---
@@ -810,7 +766,7 @@ When a workflow requires multiple directors at the same checkpoint (most common
at `/gate-check`), spawn all agents simultaneously:
```
Spawn in parallel (issue all subagent requests before waiting for any result):
Spawn in parallel (issue all custom-agent requests before waiting for any result):
1. creative-director → gate CD-PHASE-GATE
2. technical-director → gate TD-PHASE-GATE
3. producer → gate PR-PHASE-GATE