From sdlc
Design system orchestration — bootstraps design-context.md from project scan, enforces design constraints during builds, runs unified design review. Trigger: 'design init', 'design review', 'set up design system', 'check design quality', 'sdlc:design'.
npx claudepluginhub jerrod/agent-plugins --plugin sdlcThis skill is limited to using the following tools:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Provides process, architecture, review, hiring, and testing guidelines for engineering teams relying on AI code generation.
Log skill invocation:
AUDIT_SCRIPT=$(find . -name "audit-trail.sh" -path "*/sdlc/*" 2>/dev/null | head -1)
[ -z "$AUDIT_SCRIPT" ] && AUDIT_SCRIPT=$(find "$HOME/.claude" -name "audit-trail.sh" -path "*/sdlc/*" 2>/dev/null | sort -V | tail -1)
[[ "$AUDIT_SCRIPT" != "$HOME/.claude/"* && "$AUDIT_SCRIPT" != "./"* ]] && AUDIT_SCRIPT=""
SAFE_ARGS="${ARGUMENTS//\"/\\\"}"
bash "$AUDIT_SCRIPT" log design sdlc:design started --context="$SAFE_ARGS"bash "$AUDIT_SCRIPT" log design sdlc:design completed --context="<summary>"sdlc:design is the design orchestration layer for the sdlc workflow. It routes to the right phase based on project state and explicit arguments.
Determine which phase to run:
| Argument | Phase | What happens |
|---|---|---|
init | Bootstrap | Scan project, create or update .claude/design-context.md |
review | Review | Run design-reviewer agent for full design verification |
| (none) | Auto-detect | Check state and route (see below) |
Use sdlc:design init explicitly to re-bootstrap when the design system changes (e.g., switching component libraries, rebrand, adding Tailwind).
When invoked without arguments:
.claude/design-context.md existsinit phasereview phaseCreate or update the project's design context file.
Verify you are on a feature branch before committing:
DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
CURRENT=$(git branch --show-current)
if [ "$CURRENT" = "$DEFAULT_BRANCH" ]; then
echo "On default branch — create a feature branch first"
# Create: git checkout -b chore/design-context-init
fi
if [ -f ".claude/design-context.md" ]; then
echo "design-context.md already exists"
fi
If it exists, ask the user: "A design-context.md already exists. Update it from current project state, or start fresh?"
Follow the detection guide in skills/design/design-bootstrap.md. Scan for:
Report what was detected:
## Scan Results
- Component library: shadcn/ui (components.json found)
- Framework: React (package.json)
- Tailwind: yes (tailwind.config.ts)
- Fonts detected: "Inter" (body), "Cal Sans" (display)
- Colors: 7 unique values found in CSS variables
- Spacing: 8px base scale detected
- Motion: framer-motion detected
If design tokens were detected: Generate .claude/design-context.md from scan results. Present to the user for review before writing.
If no design system found: Guide the user through aesthetic selection:
skills/design/design-bootstrap.md)Write .claude/design-context.md and commit:
mkdir -p .claude
# Write the file
git add .claude/design-context.md
git commit -m "$(cat <<'EOF'
feat: add design context for consistent frontend development
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Run a comprehensive design review combining design-audit, accessibility, and responsive checks.
.claude/design-context.md must exist (if not, redirect to init phase)DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
git diff "origin/$DEFAULT_BRANCH"...HEAD --name-only | grep -E '\.(tsx|jsx|css|scss|html)$'
If no frontend files changed, report: "No frontend files in diff. Design review not needed."
Launch the design-reviewer agent for the full audit:
Agent(
subagent_type="sdlc:design-reviewer",
description="Design review: audit + a11y + responsive",
prompt="Run a full design review on the changed frontend files.
Design context: .claude/design-context.md
Changed files: <list>
Produce proof at .quality/proof/design-review.json"
)
After the agent completes, read the proof file and present results:
## Design Review Results
### Grades
| Category | Grade | Score |
|---|---|---|
| Typography | A | 92% |
| Spacing | B+ | 85% |
| ... | ... | ... |
### Findings
- [file:line] CONTRAST: text color #999 on white bg fails 4.5:1 minimum
- [file:line] TOKEN: hardcoded color #ff6b6b not in design palette
### Overall: B+
If any category grades below B:
Default threshold: all categories must reach B. When load-config.sh gains a design section, this will be configurable via sdlc.config.json.
During pair-build, the critic reads .claude/design-context.md (if present) and checks design constraints from skills/design/design-constraints.md. This catches token consistency, a11y baseline, and performance patterns before code is committed.
During sdlc:review, if the diff contains frontend files, the review skill auto-triggers the design review phase (Step 2 above) as an additional review dimension alongside architecture, security, correctness, and style.
During sdlc:brainstorm, if the project lacks a .claude/design-context.md, the brainstorm skill recommends running sdlc:design init before or after the boardroom phase to establish design tokens.
When collect-proof.sh gains a design-review.json handler, the ship skill will include design review grades in the PR description. Until then, run sdlc:design review standalone and reference the proof file manually.
| Document | Purpose |
|---|---|
skills/design/design-bootstrap.md | Detection guide for scanning project tokens |
skills/design/design-constraints.md | Proactive rules the critic checks during builds |
skills/design/a11y-rules.md | WCAG 2.1 AA checklist for accessibility verification |
skills/brainstorm/frontend-design-principles.md | Aesthetic direction and creative guidance |
agents/design-reviewer.md | Autonomous agent for unified design review |
agents/design-auditor.md | 80-item browser-based CSS inspection agent (separate from design-reviewer; requires Preview MCP tools) |