Decide the approach before any code is written. The design-author drafts the ~200-line design document, resolving its own open questions autonomously as recorded assumptions, then an adversarial design review gates advancement. Trigger on "design this", "let's align on the approach", or "/team-design".
Scanned 9/2/2026
Install to Claude Code
npx -y skills add bostonaholic/team --skill team-design --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Team Design?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/bostonaholic-team-design)More formats (shields.io, HTML) on the badges page.
---
name: team-design
description: Decide the approach before any code is written. The design-author drafts the ~200-line design document, resolving its own open questions autonomously as recorded assumptions, then an adversarial design review gates advancement. Trigger on "design this", "let's align on the approach", or "/team-design".
effort: medium
argument-hint: "[docs/plans/<id>/]"
---
# 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 block below resolves it.
The `design-author` reads:
- `$ARGUMENTS/task.md` — what we are building (intent)
- `$ARGUMENTS/questions.md` — the questions that drove research
- `$ARGUMENTS/research.md` — what exists (facts)
Resolve the artifact directory by running this self-contained block (one bash
call — agent threads reset cwd between calls):
```sh
# Three-tier artifact-directory discovery (archetype A).
# ID_RE + PHASE_FILES canonical from hooks/session-start-recover.mjs.
# PHASE_FILES recency mirrors findActiveTopic() in session-start-recover.mjs.
# NOTE: this block is duplicated across 8 skills by design (see docs/architecture.md); future: shared discover-topic.sh.
ID_RE='^([A-Za-z][A-Za-z0-9_]*-[0-9]+|[0-9]{4}-[0-9]{2}-[0-9]{2})-[a-z0-9][a-z0-9-]*$'
PHASE_FILES="task questions research design structure plan"
PRED="research.md" # predecessor artifact this skill consumes
# Tier 1 — explicit: $ARGUMENTS names an existing dir → use verbatim.
if [ -n "$ARGUMENTS" ] && [ -d "$ARGUMENTS" ]; then
echo "$ARGUMENTS"; exit 0
fi
# Tier 2 — discover: newest ID_RE dir under docs/plans/ that holds PRED.
best=""; best_mtime=-1
# Assumes cwd is the repo/worktree root (where docs/plans/ lives).
for dir in docs/plans/*/; do
name="$(basename "$dir")"
printf '%s' "$name" | grep -qE "$ID_RE" || continue # ID_RE filter
[ -f "$dir$PRED" ] || continue # predecessor filter
m=-1
for p in $PHASE_FILES; do
f="$dir$p.md"
[ -f "$f" ] || continue # skip racing/absent
s="$(stat -f %m "$f" 2>/dev/null || stat -c %Y "$f" 2>/dev/null)" || continue
[ "${s:-0}" -gt "$m" ] && m="$s" # max-mtime over PHASE_FILES
done
[ "$m" -gt "$best_mtime" ] && { best_mtime="$m"; best="$dir"; }
done
[ -n "$best" ] && { echo "$best"; exit 0; }
# Tier 3 — none found: print nothing → fall to AskUserQuestion (prose below).
```
- **If the block 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 block printed nothing** (tier 3 — no directory holds `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 `research.md`.
- **Give a path** — the user supplies the `docs/plans/<id>/` directory
directly (run `ls docs/plans/` to find your topic directory).
## Execution
> Follow `skills/principle-progress-tracking/SKILL.md`: when this procedure has two or more steps, seed one todo item per step before starting and mark each complete as you go.
1. Use the directory resolved in `## Input`.
2. 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/design.md` with frontmatter `revision: 0`
If `$ARGUMENTS/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 (`skills/principle-idempotent-reruns/SKILL.md`).
3. **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 `eng-design-doc-review` to
read it — 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/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
`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 (`skills/principle-fail-closed/SKILL.md`).
4. **Stop once `$ARGUMENTS/design.md` exists and the latest
`$ARGUMENTS/design-review-<n>.md` verdict is APPROVE or COMMENT.**
## Completion
Report design path and tell the user:
**"Next: run `/team-structure docs/plans/<id>/`"**
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!