Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
432f0dc
feat(unity-react-core): escape key listener to close modals
spaceperson Jun 16, 2026
a08b69e
feat(unity-react-core): modal role aria-modal and aria-labeledby updates
spaceperson Jun 16, 2026
924092e
feat(unity-react-core): modal input focus on open
spaceperson Jun 19, 2026
f562fe9
build(deps-dev): bump @vitest/browser from 4.1.6 to 4.1.8
dependabot[bot] Jun 15, 2026
dd71014
build(deps-dev): bump dompurify from 3.4.5 to 3.4.9
dependabot[bot] Jun 15, 2026
cce6995
fix(app-rfi): bumps dompurify from 3.4.5 to 3.4.10
scott-williams-az Jun 18, 2026
4abb9ad
fix(app-degree-pages): bumps @vitest/browser from 4.1.6 to 4.1.9
scott-williams-az Jun 18, 2026
6690e24
fix(unity-react-core): bumps @vitest/browser from 4.1.6 to 4.1.9
scott-williams-az Jun 18, 2026
e864c91
chore(release): 1.11.3 [skip ci]
semantic-release-bot Jun 18, 2026
ae74bcd
chore(release): 3.2.1 [skip ci]
semantic-release-bot Jun 18, 2026
76f2210
chore(release): 3.10.1 [skip ci]
semantic-release-bot Jun 18, 2026
45dddc7
chore(unity-react-core): keep react-dom/server out of SB manager
davidornelas11 Jun 18, 2026
034ecfb
feat(unity-bootstrap-theme): modal escape key and focus element updates
spaceperson Jun 19, 2026
6eed3a9
chore(deps): force pipeline rebuild
Copilot Jun 22, 2026
5ff4373
merge dev into uds-2211 and resolve conflicts
Copilot Jul 6, 2026
13b29f8
fix(unity-bootstrap-theme): linter format fix
spaceperson Jul 21, 2026
aa710a2
fix(static-site): @asu/unity-react-core version update fix
spaceperson Jul 21, 2026
08346b8
chore: force rebuild
Copilot Jul 21, 2026
c939eaa
fix(component-header-footer): fix arbitrary timeout in header submit …
davidornelas11 Jun 4, 2026
2b7a889
Update comment for fallback submission in Search component
davidornelas11 Jun 26, 2026
37bfc0e
chore: fix merge conflict
scott-williams-az Jul 6, 2026
40b6d36
chore(release): 1.4.5 [skip ci]
semantic-release-bot Jul 6, 2026
fe89215
build(deps-dev): bump vite from 6.4.2 to 6.4.3
dependabot[bot] Jun 25, 2026
be04abc
fix(app-degree-pages): degree links point to degree search degree pages
oatkar Jul 1, 2026
43ae555
fix(app-degree-pages): use DOMAIN_URL constant here
oatkar Jul 2, 2026
0a4033a
fix(app-degree-pages): render plain text instead of empty link for ed…
oatkar Jul 2, 2026
e213abe
chore(release): 3.2.2 [skip ci]
semantic-release-bot Jul 7, 2026
cc4a6e8
fix(anchor-menu): keep sticky menu keyboard-reachable at 200% zoom
juanmitriatti Jun 9, 2026
2d67b09
chore(release): 1.39.5 [skip ci]
semantic-release-bot Jul 7, 2026
8b452e4
chore(pipeline): add project-local adversarial coding pipeline (Stage…
mlsamuelson Jun 26, 2026
a30ba68
fix(pipeline): make steering resource path agent-dir-relative
mlsamuelson Jun 29, 2026
07c711b
docs(pipeline): note JSDoc catharsis type syntax in unity-components …
mlsamuelson Jun 29, 2026
bc135ee
chore(pipeline): use env-var references for Atlassian usernames
mlsamuelson Jun 29, 2026
506167c
feat(pipeline): retain .pipeline reports (archive + Jira) and add han…
mlsamuelson Jul 1, 2026
b56c97e
chore: update ACP kiro docs
davidornelas11 Jul 8, 2026
edde15a
feat(component-events): expose configurable noFeedText prop
juanmitriatti Jun 16, 2026
c9f2ded
chore(component-events): drop manual version bump and changelog entry
juanmitriatti Jul 8, 2026
9b166de
fix(component-events): fall back to default noFeedText when blank
juanmitriatti Jul 8, 2026
e4f6da2
chore(release): 3.2.0 [skip ci]
semantic-release-bot Jul 14, 2026
eb893ea
fix(unity-bootstrap-theme): keep hero CTA inside the hero box below m…
juanmitriatti Jul 10, 2026
c5223cd
chore(release): 1.39.6 [skip ci]
semantic-release-bot Jul 14, 2026
1578a0c
fix(unity-bootstrap-theme): add bottom spacing to hero-sm title when …
juanmitriatti Jul 12, 2026
db7dd46
chore(release): 1.39.7 [skip ci]
semantic-release-bot Jul 14, 2026
78b181d
docs(unity-react-core): add todos for tabbed panels
davidornelas11 Dec 19, 2025
deee483
fix(unity-react-core): toDo 1.1
oatkar Dec 22, 2025
b0405aa
fix(unity-react-core): to do 1.2
oatkar Jan 2, 2026
05bf02e
docs: add review notes
davidornelas11 Jan 6, 2026
48bc94d
fix(unity-react-core): changes
oatkar Jan 22, 2026
ad48160
feat(unity-react-core): toDo 1.3
oatkar Jan 29, 2026
616abfe
fix(unity-react-core): 2.1
oatkar Mar 17, 2026
f263d26
fix(unity-react-core): 2.1 changes
oatkar Mar 17, 2026
1c8af21
fix(unity-react-core): 2.2 with changes in tabheader.jsx file
oatkar Mar 18, 2026
83301e0
fix(unity-react-core): fix two issues in pr
oatkar Mar 24, 2026
67299bb
feat(unity-react-core): tODO 2.3
oatkar Apr 1, 2026
6c49e76
feat(unity-bootstrap-theme): tODO 3.1
oatkar Apr 1, 2026
66f7d15
fix(unity-bootstrap-theme): todo 3.2
oatkar Apr 1, 2026
8ad4bb3
fix(unity-bootstrap-theme): todo 3.3, changed MoreDropdown.js to fit …
oatkar Apr 1, 2026
0f3f01f
feat(unity-bootstrap-theme): todo 3.2
oatkar Apr 3, 2026
f716cd7
feat(unity-react-core): phase 4
oatkar Apr 7, 2026
d82150f
fix(unity-react-core): toDo 5.1
oatkar Apr 10, 2026
cb341c3
fix(unity-react-core): toDo 5.2
oatkar Apr 10, 2026
19964dd
fix(unity-react-core): final design before completing all tests
oatkar Apr 13, 2026
dd1f9d8
fix(unity-react-core): final design before completeing tests
oatkar Apr 13, 2026
029b028
fix(unity-react-core): added scrolling feature
oatkar Apr 13, 2026
42eaa75
fix(unity-react-core): scrolling feature final
oatkar Apr 13, 2026
001be6a
fix(unity-react-core): changes made after review
oatkar Apr 23, 2026
3ee6cfb
feat(unity-react-core): tabbed Panel Rewrite
davidornelas11 May 13, 2026
8bd6101
feat(unity-react-core): rewrite tabbed panels
davidornelas11 May 13, 2026
985ebbc
feat(unity-bootstrap-theme): tabbed panel rewrite
davidornelas11 May 13, 2026
df18991
chore(unity-react-core): add ts ignore for story file
davidornelas11 May 14, 2026
5f97b35
fix(unity-react-core): add NavControls for app-webdir-ui use
davidornelas11 May 14, 2026
9ddc200
chore(unity-react-core): add stories to tsconfig ignore since dev only
davidornelas11 May 14, 2026
2911cfd
fix(unity-react-core): readd stories to Typescript config
davidornelas11 May 14, 2026
6057b7c
chore(unity-react-core): update imported packages
davidornelas11 May 14, 2026
11d5a40
chore(unity-react-core): update yarn lock
davidornelas11 May 14, 2026
650f1d8
docs(unity-react-core): add story controls to tabbed panel story
davidornelas11 May 14, 2026
ae58d28
fix(unity-bootstrap-theme): update tabbed panel JS
davidornelas11 May 14, 2026
7ced387
fix(unity-bootstrap-theme): update tabbed panel JS and styles
davidornelas11 May 14, 2026
bfe6d34
fix(unity-react-core): remove focus on more tabbed panel click
davidornelas11 May 14, 2026
49697eb
style(unity-bootstrap-theme): linting
davidornelas11 May 14, 2026
e825ded
fix(unity-bootstrap-theme): fix safari dropdown issue in tab panels
davidornelas11 May 15, 2026
135edbc
fix(unity-bootstrap-theme): update tabbed panel JS
davidornelas11 May 15, 2026
db498c2
fix(unity-react-core): update tabbed panels markup
davidornelas11 May 15, 2026
52beb5a
chore(unity-react-core): linting
davidornelas11 May 15, 2026
d7d3e69
fix(unity-react-core): update dropdown for tabbed panel placement
davidornelas11 Jun 4, 2026
7fa19ed
fix(unity-bootstrap-theme): update tabbed panel JS to mimic react ver…
davidornelas11 Jun 4, 2026
6ac7a8f
fix(unity-bootstrap-theme): update tabbed panel JS
davidornelas11 Jun 4, 2026
509759c
fix(unity-react-core): update tabbed panel logic
davidornelas11 Jun 4, 2026
944dff2
fix(app-degree-pages): degree links point to degree search degree pages
oatkar Jun 30, 2026
759db72
Revert "fix(app-degree-pages): degree links point to degree search de…
davidornelas11 Jun 30, 2026
83c2ca9
fix(unity-react-core): address tabbed panel pr comments
davidornelas11 Jul 1, 2026
016ab11
fix(unity-react-core): fix resize issue with react tabbed panel
davidornelas11 Jul 8, 2026
0f75832
fix(unity-react-core): fix react more dropdown disappearing
davidornelas11 Jul 17, 2026
df68055
fix(unity-bootstrap-theme): update bootstrap tabbed panels JS and styles
davidornelas11 Jul 17, 2026
fe4ceac
chore(release): 2.0.0 [skip ci]
semantic-release-bot Jul 17, 2026
d2c8788
chore(release): 2.0.0 [skip ci]
semantic-release-bot Jul 17, 2026
e049b16
fix(unity-bootstrap-theme): gold maroon gray and dark hover button br…
spaceperson Jul 3, 2026
f45baef
feat(unity-react-core): replaced fa-exlamation-triangle with fa-check…
spaceperson Jul 21, 2026
c8be34d
fix(unity-bootstrap-theme): fix for linting error
spaceperson Jul 21, 2026
018ccba
fix(unity-bootstrap-theme): linter error fix
spaceperson Jul 21, 2026
45a35c3
revert(shared): revert yarn.lock changes
spaceperson Jul 21, 2026
2e0f272
revert(shared): revert the revert of the yarn.lock file
spaceperson Jul 21, 2026
2eb7b56
fix(static-site): @asu/unity-react-core dependency version update
spaceperson Jul 21, 2026
8c243a8
chore(release): 2.1.0 [skip ci]
semantic-release-bot Jul 22, 2026
521e3fe
chore(release): 2.1.0 [skip ci]
semantic-release-bot Jul 22, 2026
60dcba1
fix(unity-bootstrap-theme): fix a11y issue min btn area if container …
scott-williams-az Jul 17, 2026
1a94a4c
chore(release): 2.1.1 [skip ci]
semantic-release-bot Jul 22, 2026
6a729e1
build(deps-dev): bump @vitest/browser from 4.1.6 to 4.1.8
dependabot[bot] Jun 15, 2026
b858c03
build(deps-dev): bump dompurify from 3.4.5 to 3.4.9
dependabot[bot] Jun 15, 2026
6b6cd14
fix(unity-react-core): bumps @vitest/browser from 4.1.6 to 4.1.9
scott-williams-az Jun 18, 2026
62f5e76
chore(release): 1.11.3 [skip ci]
semantic-release-bot Jun 18, 2026
125740a
chore(release): 3.2.1 [skip ci]
semantic-release-bot Jun 18, 2026
820e237
chore(release): 3.10.1 [skip ci]
semantic-release-bot Jun 18, 2026
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,11 @@ tests/__image_snapshots__/__diff_output__
!.yarn/versions
*.env.*
!.env.yarn.example

# --- Adversarial coding pipeline (project-local .kiro) ---
# Committed: .kiro/agents, .kiro/skills, .kiro/hooks, .kiro/scripts,
# .kiro/steering, .kiro/settings/mcp.json
# Ignored (ephemeral run state + user-supplied intake assets):
.pipeline/
.intake/*
!.intake/.gitkeep
Empty file added .intake/.gitkeep
Empty file.
85 changes: 85 additions & 0 deletions .kiro/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Unity Adversarial Coding Pipeline (Stage A)

Self-contained, project-local agent pipeline that takes a component request and
produces a **PR-ready** Unity component, then writes a handoff for the Webspark
stage. Seeded once from `ddt-agent-skills-library-foundry` and owned here.

**Agents stop at a branch + commits. You open the PR.**

## What's in here (`.kiro/`)

| Path | Purpose |
|---|---|
| `agents/acp-*.json` | orchestrator, architect, coder, reviewer, visual (model-diverse) |
| `agents/prompts/*.md` | role prompts |
| `skills/` | foundry skills + ASU skills (`jira-figma-intake`, `unity-components`, `asu-design-a11y`, `asu-brand`, `unity-handoff-out`, `visual-diff`) |
| `settings/mcp.json` | project-local MCP: Atlassian (RO), Figma, 8 Storybook servers |
| `steering/unity-pipeline.md` | how the agents run this stage |
| `hooks/` | reviewer write-block, phase log |
| `scripts/preflight.sh` | readiness probe |
| `scripts/validate-handoff.sh` | handoff schema validator |

## One-time setup (per developer)

1. **Tools**: Node + Yarn (Volta ok), `jq`, `gh`. Optional but recommended:
`agent-browser` (`npm i -g agent-browser && agent-browser install`) for the
visual-diff step — falls back to `npx agent-browser`.
- **Volta caveat**: installing `agent-browser` globally under Volta can leave a
broken shim ("No such file or directory"), because Volta renames its staging
dir after postinstall and the absolute symlink breaks
(vercel-labs/agent-browser#324). Fix by relinking the platform binary:
```bash
cd "$VOLTA_HOME/tools/image/packages/agent-browser/bin"
rm agent-browser && ln -s agent-browser-darwin-arm64 agent-browser # match your platform binary
```
or install with plain `npm` outside Volta, or just rely on `npx agent-browser`.
2. **Env vars** (never commit secrets):
```bash
export JIRA_API_TOKEN=... # Jira/Confluence API token
export CONFLUENCE_API_TOKEN=... # (same token is fine)
export JIRA_USERNAME="you@asu.edu" # Atlassian account; also used by the Jira v3 REST fallback
export CONFLUENCE_USERNAME="you@asu.edu" # usually the same as JIRA_USERNAME
# Unity package install auth (one of):
export GITHUB_AUTH_TOKEN=... # GitHub Package Registry token for @asu packages
# …or create .env.yarn with GITHUB_AUTH_TOKEN=... (see .env.yarn.example)
```
3. **Figma** (only if using Figma intake): open the Figma desktop app and enable
the Dev Mode MCP server (listens on `127.0.0.1:3845`).
4. **Probe**: `bash .kiro/scripts/preflight.sh` — resolve any FAIL before running.

## Run a job

1. (Optional) drop reference screenshots into `.intake/` (multiple allowed:
states, breakpoints, variants).
2. Start the orchestrator:
```bash
kiro-cli --agent acp-orchestrator
```
3. Give it a **component name** (required) plus any of: a Jira key, a Figma URL,
"see .intake/", or a description. It will ask clarifying questions.
4. **Approve the design doc** when prompted (the one human gate). Then it runs
implement → review → visual-diff autonomously (≤3 review cycles).
5. On success it writes the handoff to `../handoff/<anchor>/` (peer to this repo)
and leaves a `pipeline-trial` branch + conventional commits. Open the PR
yourself.

Tip: `/context show` in the session lists the loaded steering + skills.

## PR-ready gate

`yarn build` clean · ESLint + Stylelint clean · `run-story-tests`
(interaction + a11y) pass · HTML-parity verified · `VISUAL_PASS`.

## Handoff

`../handoff/<anchor>/handoff.json` (+ `markup.html`). `<anchor>` is the Jira key
if present, else the component slug. The Webspark repo's Stage B consumes it.
Validate manually with `.kiro/scripts/validate-handoff.sh <path>`.

## Notes

- Models are foundry defaults (Opus architect/orchestrator, Sonnet coder, GLM
reviewer, Sonnet vision). If a model id isn't available in your Kiro, it falls
back to the default — adjust `model` in `agents/acp-*.json` as needed.
- `asu-brand` / `asu-design-a11y` are shared with Webspark (this copy is
canonical). `asu-brand` is a candidate to upstream to the foundry later.
25 changes: 25 additions & 0 deletions .kiro/agents/acp-architect.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "acp-architect",
"model": "claude-opus-4.7",
"description": "Problem framing, scope review, architecture lock, and design document production.",
"prompt": "file://prompts/architect.md",
"tools": ["fs_read", "fs_write", "execute_bash", "grep", "glob", "code"],
"allowedTools": ["fs_read", "grep", "glob", "code"],
"resources": [
"file://../steering/**/*.md",
"skill://.kiro/skills/office-hours/SKILL.md",
"skill://.kiro/skills/architecture-lock/SKILL.md",
"skill://.kiro/skills/jira-figma-intake/SKILL.md",
"skill://.kiro/skills/unity-components/SKILL.md",
"skill://.kiro/skills/asu-design-a11y/SKILL.md",
"skill://.kiro/skills/asu-brand/SKILL.md",
"skill://.kiro/skills/unity-handoff-out/SKILL.md"
],
"hooks": {
"agentSpawn": [
{ "command": "mkdir -p .pipeline", "description": "Ensure pipeline artifact directory exists" }
]
},
"keyboardShortcut": "ctrl+shift+a",
"welcomeMessage": "Architect agent ready. I frame problems and produce locked design documents."
}
24 changes: 24 additions & 0 deletions .kiro/agents/acp-coder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "acp-coder",
"model": "claude-sonnet-4.6",
"description": "Test-driven implementation specialist. Writes failing tests first, implements to pass, refactors.",
"prompt": "file://prompts/coder.md",
"tools": ["fs_read", "fs_write", "execute_bash", "grep", "glob", "code"],
"allowedTools": ["fs_read", "grep", "glob", "code", "execute_bash"],
"resources": [
"file://../steering/**/*.md",
"skill://.kiro/skills/tdd-red-green/SKILL.md",
"skill://.kiro/skills/review-fix-loop/SKILL.md",
"skill://.kiro/skills/unity-components/SKILL.md",
"skill://.kiro/skills/asu-design-a11y/SKILL.md",
"skill://.kiro/skills/asu-brand/SKILL.md",
"skill://.kiro/skills/unity-handoff-out/SKILL.md"
],
"hooks": {
"agentSpawn": [
{ "command": "mkdir -p .pipeline", "description": "Ensure pipeline artifact directory exists" }
]
},
"keyboardShortcut": "ctrl+shift+c",
"welcomeMessage": "Coder agent ready. I implement against locked design documents using strict TDD."
}
30 changes: 30 additions & 0 deletions .kiro/agents/acp-orchestrator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "acp-orchestrator",
"model": "claude-opus-4.7",
"description": "Adversarial coding pipeline orchestrator. Delegates to architect, coder, and reviewer subagents sequentially.",
"prompt": "file://prompts/orchestrator.md",
"tools": ["fs_read", "fs_write", "execute_bash", "grep", "glob", "use_subagent"],
"allowedTools": ["fs_read", "grep", "glob", "use_subagent"],
"toolsSettings": {
"subagent": {
"availableAgents": ["acp-architect", "acp-coder", "acp-reviewer", "acp-visual"],
"trustedAgents": ["acp-architect", "acp-coder", "acp-reviewer", "acp-visual"]
}
},
"resources": [
"file://../steering/**/*.md",
"skill://.kiro/skills/adversarial-coding-pipeline/SKILL.md",
"skill://.kiro/skills/jira-figma-intake/SKILL.md",
"skill://.kiro/skills/unity-handoff-out/SKILL.md"
],
"hooks": {
"agentSpawn": [
{ "command": "mkdir -p .pipeline", "description": "Ensure pipeline artifact directory exists" }
],
"stop": [
{ "command": ".kiro/hooks/log-phase.sh", "description": "Log phase transition to .pipeline/phase-log.jsonl" }
]
},
"keyboardShortcut": "ctrl+shift+o",
"welcomeMessage": "Adversarial coding pipeline ready (Unity stage). Give me a component name plus any Jira key, Figma URL, or screenshots in .intake/ and I'll orchestrate architect → coder → reviewer → visual-diff."
}
29 changes: 29 additions & 0 deletions .kiro/agents/acp-reviewer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "acp-reviewer",
"model": "glm-5",
"description": "Three-phase adversarial code reviewer: spec compliance, attack surface analysis, and QA verification.",
"prompt": "file://prompts/reviewer.md",
"tools": ["fs_read", "execute_bash", "grep", "glob", "code"],
"allowedTools": ["fs_read", "grep", "glob", "code", "execute_bash"],
"resources": [
"file://../steering/**/*.md",
"skill://.kiro/skills/spec-compliance/SKILL.md",
"skill://.kiro/skills/adversarial-review/SKILL.md",
"skill://.kiro/skills/code-quality/SKILL.md",
"skill://.kiro/skills/qa-verification/SKILL.md",
"skill://.kiro/skills/unity-components/SKILL.md",
"skill://.kiro/skills/asu-design-a11y/SKILL.md",
"skill://.kiro/skills/asu-brand/SKILL.md",
"skill://.kiro/skills/unity-handoff-out/SKILL.md"
],
"hooks": {
"agentSpawn": [
{ "command": "mkdir -p .pipeline", "description": "Ensure pipeline artifact directory exists" }
],
"preToolUse": [
{ "matcher": "fs_write", "command": ".kiro/hooks/block-reviewer-writes.sh", "description": "Reviewers do not modify code" }
]
},
"keyboardShortcut": "ctrl+shift+r",
"welcomeMessage": "Reviewer agent ready. I perform 3-phase adversarial code review."
}
28 changes: 28 additions & 0 deletions .kiro/agents/acp-visual.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "acp-visual",
"model": "claude-sonnet-4.6",
"description": "Vision-based visual-fidelity reviewer. Compares the rendered component against .intake/ screenshots and the Figma frame; reports P1/P2/P3 visual findings. Does not modify code.",
"prompt": "file://prompts/visual.md",
"tools": ["fs_read", "fs_write", "execute_bash", "grep", "glob"],
"allowedTools": ["fs_read", "grep", "glob", "execute_bash"],
"toolsSettings": {
"write": {
"allowedPaths": [".pipeline/**"],
"deniedPaths": ["packages/**", "docroot/**", "src/**"]
}
},
"resources": [
"file://../steering/**/*.md",
"skill://.kiro/skills/visual-diff/SKILL.md",
"skill://.kiro/skills/asu-brand/SKILL.md",
"skill://.kiro/skills/unity-components/SKILL.md",
"skill://.kiro/skills/asu-design-a11y/SKILL.md"
],
"hooks": {
"agentSpawn": [
{ "command": "mkdir -p .pipeline", "description": "Ensure pipeline artifact directory exists" }
]
},
"keyboardShortcut": "ctrl+shift+v",
"welcomeMessage": "Visual-diff agent ready. I compare the rendered component against the design references."
}
70 changes: 70 additions & 0 deletions .kiro/agents/prompts/architect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
You are an architect agent in a multi-agent adversarial coding pipeline. You operate before any code is written. Your output — the design document — is the contract that constrains the coder and reviewer agents downstream.

## Personality

Strategic and methodical. You challenge assumptions with forcing questions that expose hidden complexity. You don't accept vague requirements — you push until the problem is precisely defined. When scope is unclear, you ask "what would make this a 10-star solution?" and then ruthlessly cut to what's achievable.

You think about systems holistically. Every design decision has downstream consequences — you map those out before committing. You prefer simple solutions that handle edge cases over clever solutions that don't.

## Clarification Is Mandatory

You MUST ask at least 3 clarifying questions before producing a design document, regardless of how clear the request seems. Simple-seeming requests are where unexamined assumptions cause the most wasted work.

- Ask one question at a time. Wait for the answer before asking the next.
- Prefer multiple choice when possible (easier to answer, faster to converge).
- Focus on: purpose, constraints, success criteria, edge cases, what is explicitly out of scope.
- If the request describes multiple independent subsystems, flag this immediately and propose decomposition before designing.

## What You Do

- Frame the problem using forcing questions before proposing solutions
- Review scope: decide between expansion, selective expansion, hold scope, or reduction
- Produce architecture documents with ASCII data flow diagrams, state machines, and error paths
- Create test matrices that define what must be tested and how
- Break implementation into bite-sized subtasks (2-5 minutes each) with exact code, exact file paths, and exact commands
- Lock the architecture so implementation doesn't pivot mid-sprint

## What You Produce

Your primary output is a **design document** that MUST be written to `.pipeline/design-doc.md` (and nowhere else) containing:
1. Problem statement (reframed after forcing questions)
2. Scope decision (with rationale)
3. Data flow diagram (ASCII)
4. State machine (if applicable)
5. Error paths and failure modes
6. Test matrix (behavior, test level, seam, test double strategy, verification command, failure mode)
7. Implementation plan (ordered subtasks, each with exact code and commands)
8. Security considerations
9. Performance considerations

## Skill-aware design

If the task involves building a web UI, search your available skills for three categories:

1. **Brand skill** — institutional identity rules: approved colors, fonts, tone, logo usage, and brand validators
2. **Design skill** — UI/UX quality: layout, accessibility, motion, responsive design, and pre-delivery checklists
3. **Component / framework skill** — a specific UI component library: theme tokens, component catalog, setup instructions, and theme validators

For each category where a matching skill is found:
- Name it in the design doc so the coder and reviewer know to load it
- List which reference files the coder must read (e.g., theme CSS, component catalog, setup guide)
- Add the skill's validation scripts to the design doc's verification section

If no matching skills are found for a category, note that in the design doc so the coder knows to use defaults.

## Voice

- Precise and structured. Use diagrams (ASCII), tables, and numbered lists.
- Ask hard questions early. "What happens when X fails?" "Who is the user of this API?"
- Present alternatives with tradeoffs, not just one recommendation.
- Be direct about risks. Don't bury concerns in hedging language.

## Scope

You design. You do not code, review code, or deploy. Your design document is handed to the coder-agent for implementation and the reviewer-agent uses it as the spec for compliance checking.

When you don't have enough information to make a design decision, say so explicitly. You never guess at requirements.

## Output Convention

**MANDATORY:** Write your design document to `.pipeline/design-doc.md` — no other location. Run `mkdir -p .pipeline` first if needed. Do NOT write to `ARCHITECTURE.md`, `DESIGN.md`, or any other file. The orchestrator, coder, and reviewer all read from `.pipeline/design-doc.md`. If you write elsewhere, the pipeline breaks.
Loading