Team Design — Where Are We Going?
Run the DESIGN phase. The design-author decides the approach — recording
every self-resolved choice as an auditable assumption — and the
adversarial design review gates advancement. No mid-run prompt fires.
Input
$ARGUMENTS is the artifact directory: docs/plans/<id>/. If empty, the
discovery command below resolves it.
The design-author reads:
$ARGUMENTS/1-task.md — what we are building (intent)
$ARGUMENTS/2-questions.md — the questions that drove research
$ARGUMENTS/5-research.md — what exists (facts)
Resolve <team-skill-dir> to the absolute directory containing
skills/team/SKILL.md. From the repository root, run:
"<team-skill-dir>/discover-topic.sh" "${ARGUMENTS:-}" "5-research.md"
- If the command printed a path, use it as
$ARGUMENTS for the rest of this
skill (tier 1 explicit arg, or tier 2 discovery). When the path came from
tier 2 (no explicit arg), announce the resolved directory to the user before
proceeding, so an auto-picked topic is never silent.
- If the command printed nothing (tier 3 — no directory holds
5-research.md),
do not hard-error. Fire AskUserQuestion with a Setup header and labeled
options:
- Run the producer — run
/team-research docs/plans/<id>/ to produce the
missing 5-research.md.
- Give a path — the user supplies the
docs/plans/<id>/ directory
directly (run ls docs/plans/ to find your topic directory).
Execution
Use the directory resolved in ## Input.
Dispatch design-author, which:
a. Resolves its own open questions autonomously, recording each in
## Decisions made marked as an assumption (see the agent file)
b. Writes $ARGUMENTS/6-design.md with frontmatter revision: 0
If $ARGUMENTS/6-design.md already exists, skip this dispatch and
resume at step 3 — never re-draft an existing design.
Both this skip and step 3's never-re-review skip are idempotent re-runs: converge on the same end state, never duplicate work (principle-idempotent-reruns).
Design review gate. If the latest
$ARGUMENTS/design-review-<n>.md already carries a passing verdict
(APPROVE or COMMENT), skip straight to step 4 — never re-review a
passed design. Otherwise, before each review dispatch, run the
external cross-model pass: call the Skill tool with
cross-model-review and follow
its ## Design-review pass — reference that procedure,
never duplicate it here. Its one gate: the
TEAM_DISABLE_CROSS_MODEL kill-switch. Run the runner's detect
verb, then run per ready CLI — each through its own named courier
sub-agent per that skill's vendor-courier block, with its inline
fallback — naming any unavailable CLI to the
user per that skill's ## When a vendor CLI is unavailable; a
missing runner is
skip: cross-model runner not found per CLI. Fence each CLI's raw
output as a DATA block at capture time (fence longer than any
backtick run in the output, per that section), append one
## External review input section — opening with the
untrusted-content line that section specifies — holding the fenced
blocks to the review brief, and append the round's transcript to
$ARGUMENTS/cross-model-raw.md in the result-line format that
section pins (created on first use; a zero-call round appends
nothing). Any skip continues with the
reviewer alone — the pass never blocks the gate. Then dispatch the
adversarial design review (the
## Review brief — call the Skill tool with reviewing-designs to
read it, with the artifact directory substituted — run by a
fresh-context read-only Explore subagent each round) and write
the findings + verdict to $ARGUMENTS/design-review-<n>.md, where
<n> is the highest existing <n> + 1 (1 when none exists) — never
overwrite an earlier verdict record. Derive the verdict:
frontmatter from the last verdict token in the report body — the
reviewer's verdict is the terminal line of its report. When the
report contains a ### Cross-model disposition section, append that
section as one block to $ARGUMENTS/cross-model-notes.md,
blockquote-wrapped — prefix every line with > at append time, per
the design-review gate in skills/team/SKILL.md — opening with the
orchestrator-authored label
line — the literal > **Design round <n>** — prepended inside the
wrap; same frontmatter-on-first-append rules as the other gates
(schema in skills/artifact-frontmatter/SKILL.md). Then act on the
verdict:
- APPROVE or COMMENT — the review passes. Advance.
- REQUEST CHANGES — re-dispatch
design-author with the
reviewer's findings verbatim. The agent re-drafts and increments
revision: <n+1>, then a fresh review round runs. The loop ends
on the verdict, so REQUEST CHANGES keeps re-drafting for as many
rounds as it takes. Recovery runs after an operator stop, a
context-exhausted session, or the fail-closed halt below. A person
revises $ARGUMENTS/6-design.md by hand and re-invokes
/team-design bare. The run then resumes at this gate, per the
resume branch at step 2. The revision counter persists in
6-design.md frontmatter.
- Unparseable verdict or reviewer crash — retry the review once
with the error; on second failure, halt loudly. Fail closed —
never advance on a missing verdict.
A missing verdict counts as not passed (
principle-fail-closed).
Stop once $ARGUMENTS/6-design.md exists and the latest
$ARGUMENTS/design-review-<n>.md verdict is APPROVE or COMMENT.
Report design path and tell the user:
"Next: run /team-structure docs/plans/<id>/"
1---2name: team-design3description: Drafts and adversarially reviews a design. Trigger on "design this", "let's align on the approach", or "/team-design".4---56# Team Design — Where Are We Going?78Run the DESIGN phase. The design-author decides the approach — recording9every self-resolved choice as an auditable assumption — and the10adversarial design review gates advancement. No mid-run prompt fires.1112## Input1314`$ARGUMENTS` is the artifact directory: `docs/plans/<id>/`. If empty, the15discovery command below resolves it.1617The `design-author` reads:1819- `$ARGUMENTS/1-task.md` — what we are building (intent)20- `$ARGUMENTS/2-questions.md` — the questions that drove research21- `$ARGUMENTS/5-research.md` — what exists (facts)2223Resolve `<team-skill-dir>` to the absolute directory containing24`skills/team/SKILL.md`. From the repository root, run:2526```sh27"<team-skill-dir>/discover-topic.sh" "${ARGUMENTS:-}" "5-research.md"28```2930- **If the command printed a path**, use it as `$ARGUMENTS` for the rest of this31 skill (tier 1 explicit arg, or tier 2 discovery). When the path came from32 tier 2 (no explicit arg), announce the resolved directory to the user before33 proceeding, so an auto-picked topic is never silent.34- **If the command printed nothing** (tier 3 — no directory holds `5-research.md`),35 do not hard-error. Fire `AskUserQuestion` with a `Setup` header and labeled36 options:37 - **Run the producer** — run `/team-research docs/plans/<id>/` to produce the38 missing `5-research.md`.39 - **Give a path** — the user supplies the `docs/plans/<id>/` directory40 directly (run `ls docs/plans/` to find your topic directory).4142## Execution43441. Use the directory resolved in `## Input`.452. Dispatch `design-author`, which:46 a. Resolves its own open questions autonomously, recording each in47 `## Decisions made` marked as an assumption (see the agent file)48 b. Writes `$ARGUMENTS/6-design.md` with frontmatter `revision: 0`4950 If `$ARGUMENTS/6-design.md` already exists, skip this dispatch and51 resume at step 3 — never re-draft an existing design.52 Both this skip and step 3's never-re-review skip are idempotent re-runs: converge on the same end state, never duplicate work (`principle-idempotent-reruns`).533. **Design review gate.** If the latest54 `$ARGUMENTS/design-review-<n>.md` already carries a passing verdict55 (APPROVE or COMMENT), skip straight to step 4 — never re-review a56 passed design. Otherwise, before each review dispatch, run the57 external cross-model pass: call the Skill tool with58 `cross-model-review` and follow59 its `## Design-review pass` — reference that procedure,60 never duplicate it here. Its one gate: the61 `TEAM_DISABLE_CROSS_MODEL` kill-switch. Run the runner's `detect`62 verb, then `run` per ready CLI — each through its own named courier63 sub-agent per that skill's vendor-courier block, with its inline64 fallback — naming any unavailable CLI to the65 user per that skill's `## When a vendor CLI is unavailable`; a66 missing runner is67 `skip: cross-model runner not found` per CLI. Fence each CLI's raw68 output as a `DATA` block at capture time (fence longer than any69 backtick run in the output, per that section), append one70 `## External review input` section — opening with the71 untrusted-content line that section specifies — holding the fenced72 blocks to the review brief, and append the round's transcript to73 `$ARGUMENTS/cross-model-raw.md` in the result-line format that74 section pins (created on first use; a zero-call round appends75 nothing). Any skip continues with the76 reviewer alone — the pass never blocks the gate. Then dispatch the77 adversarial design review (the78 `## Review brief` — call the Skill tool with `reviewing-designs` to79 read it, with the artifact directory substituted — run by a80 fresh-context read-only `Explore` subagent each round) and write81 the findings + verdict to `$ARGUMENTS/design-review-<n>.md`, where82 `<n>` is the highest existing `<n>` + 1 (1 when none exists) — never83 overwrite an earlier verdict record. Derive the `verdict:`84 frontmatter from the **last verdict token** in the report body — the85 reviewer's verdict is the terminal line of its report. When the86 report contains a `### Cross-model disposition` section, append that87 section as one block to `$ARGUMENTS/cross-model-notes.md`,88 blockquote-wrapped — prefix every line with `>` at append time, per89 the design-review gate in `skills/team/SKILL.md` — opening with the90 orchestrator-authored label91 line — the literal `> **Design round <n>**` — prepended inside the92 wrap; same frontmatter-on-first-append rules as the other gates93 (schema in `skills/artifact-frontmatter/SKILL.md`). Then act on the94 verdict:95 - **APPROVE or COMMENT** — the review passes. Advance.96 - **REQUEST CHANGES** — re-dispatch `design-author` with the97 reviewer's findings verbatim. The agent re-drafts and increments98 `revision: <n+1>`, then a fresh review round runs. The loop ends99 on the verdict, so REQUEST CHANGES keeps re-drafting for as many100 rounds as it takes. Recovery runs after an operator stop, a101 context-exhausted session, or the fail-closed halt below. A person102 revises `$ARGUMENTS/6-design.md` by hand and re-invokes103 `/team-design` bare. The run then resumes at this gate, per the104 resume branch at step 2. The `revision` counter persists in105 `6-design.md` frontmatter.106 - **Unparseable verdict or reviewer crash** — retry the review once107 with the error; on second failure, halt loudly. Fail closed —108 never advance on a missing verdict.109 A missing verdict counts as not passed (`principle-fail-closed`).1104. **Stop once `$ARGUMENTS/6-design.md` exists and the latest111 `$ARGUMENTS/design-review-<n>.md` verdict is APPROVE or COMMENT.**112113Report design path and tell the user:114**"Next: run `/team-structure docs/plans/<id>/`"**