| name | team-structure |
| description | Break the approved design into vertical slices with verification checkpoints. Runs autonomously and advances to PLAN — no human gate (design is the pipeline's only human gate). Trigger on "slice this up", "break the design into steps", or "/team-structure". |
| effort | medium |
| argument-hint | [docs/plans/<id>/] |
Team Structure — How Do We Get There?
Run the STRUCTURE phase. It runs autonomously and advances to PLAN — there
is no human gate here. Design is the pipeline's only human gate.
Input
$ARGUMENTS is the artifact directory: docs/plans/<id>/. If empty, the
discovery block below resolves it.
The structure-planner reads:
$ARGUMENTS/design.md (must carry approved: true in its frontmatter)
$ARGUMENTS/research.md
$ARGUMENTS/task.md (for cross-reference; not for re-litigating intent)
Resolve the artifact directory by running this self-contained block (one bash
call — agent threads reset cwd between calls). The predecessor filter requires
an approved design.md, so unapproved candidates are skipped:
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="design.md"
if [ -n "$ARGUMENTS" ] && [ -d "$ARGUMENTS" ]; then
echo "$ARGUMENTS"; exit 0
fi
best=""; best_mtime=-1
for dir in docs/plans/*/; do
name="$(basename "$dir")"
printf '%s' "$name" | grep -qE "$ID_RE" || continue
[ -f "$dir$PRED" ] || continue
grep -qE '^approved:[[:space:]]*true[[:space:]]*$' "$dir$PRED" || continue
m=-1
for p in $PHASE_FILES; do
f="$dir$p.md"
[ -f "$f" ] || continue
s="$(stat -f %m "$f" 2>/dev/null || stat -c %Y "$f" 2>/dev/null)" || continue
[ "${s:-0}" -gt "$m" ] && m="$s"
done
[ "$m" -gt "$best_mtime" ] && { best_mtime="$m"; best="$dir"; }
done
[ -n "$best" ] && { echo "$best"; exit 0; }
- If the block printed a path, use it as
$ARGUMENTS for the rest of this
skill (tier 1 explicit arg, or tier 2 discovery of an approved predecessor).
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 an approved
design.md), do not hard-error. Fire AskUserQuestion with a Setup header
and labeled options:
- Run the producer — run
/team-design docs/plans/<id>/ to produce or
approve design.md.
- Provide a path — the user supplies the
docs/plans/<id>/ directory
directly (run ls docs/plans/ to find your topic directory).
Execution
Follow skills/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.
- Use the directory resolved in
## Input (the approval grep there already
confirmed design.md carries approved: true).
- Dispatch
structure-planner, which writes $ARGUMENTS/structure.md
with vertical slices. The artifact carries plain frontmatter
(topic, date, phase: structure) — no approval fields, because
structure is not human-gated.
- No human gate. Do not present the structure for approval — design is
the only human gate. Within a full
/team run the orchestrator advances
to PLAN automatically; run standalone, this skill stops after writing the
structure and reports the next command.
- Stop once
$ARGUMENTS/structure.md exists.
Completion
Report the structure path. When run standalone, tell the user:
"Next: run /team-plan docs/plans/<id>/"
(Within a full /team run the orchestrator advances to PLAN automatically.)