Audits Stack-and-Flow as a full design-system package, not individual components. Covers: token architecture, theme structure, folder organization, package.json configuration, build output, peer dependencies, and design system best practices. Proposes concrete improvements — not just flags issues. Trigger: system-level audit, design-system audit, token architecture review, folder structure review, npm distributable standards, release readiness. Also delegable from sdd-verify or sdd-explore for system-level validation.
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Audits Stack-and-Flow as a full design-system package, not individual components. Covers: token architecture, theme structure, folder organization, package.json configuration, build output, peer dependencies, and design system best practices. Proposes concrete improvements — not just flags issues. Trigger: system-level audit, design-system audit, token architecture review, folder structure review, npm distributable standards, release readiness. Also delegable from sdd-verify or sdd-explore for system-level validation.
license
Apache-2.0
metadata
{"author":"stack-and-flow","version":"1.0"}
When to Use
Someone asks to "audit the system", "check token architecture", "review our npm setup", or similar
Before a major release to verify distributable quality
When evaluating whether to add a new category of tokens or components
Delegated from sdd-verify or sdd-explore as part of a system-level SDD change
When Delegated by SDD Orchestrator
You may receive this delegation from sdd-verify or sdd-explore:
Change name: the SDD change being audited
Scope: which aspect of the system to audit (tokens / structure / npm / all)
Artifact store mode: engram | openspec | hybrid | none
When delegated: run the requested scope phases and return in the SDD return envelope format:
"files" field lists ONLY what should be in the npm package: ["dist", "README.md"]
"sideEffects" set correctly: ["**/*.css"] if the CSS file has side effects, false if the JS is pure
3.2 — Peer dependencies
react and react-dom are in peerDependencies — NOT dependencies
tailwindcss is in peerDependencies if components depend on Tailwind utilities at runtime
Version ranges in peerDependencies are permissive: "react": ">=18.0.0" not "react": "19.0.0"
devDependencies contains only build/test tools — nothing a consumer needs at runtime
dependencies contains ONLY runtime dependencies the consumer doesn't need to install separately (e.g. class-variance-authority, clsx)
3.3 — Build output
Build produces both ESM (.mjs) and CJS (.cjs) formats
TypeScript declarations (.d.ts) are generated and included in the output
CSS custom properties file (theme.css) is in the build output
Source maps included for debugging — .js.map files
Build output does NOT include: test files, stories, source .ts/.tsx files, node_modules
Tree-shaking works — each component can be imported individually without pulling in the full library
3.4 — README and documentation
README.md exists with: installation, basic usage, peer dependency list
CSS import instruction is explicit: import '@stack-and-flow/design-system/styles'
Storybook URL referenced for component documentation
CHANGELOG or release notes present
Phase 4 — Propose Improvements
For EVERY issue found, propose a concrete improvement. Do not just flag — show the solution.
Format each proposal as:
## Proposal {N}: {Short title}
**Problem**: {What is wrong and why it matters for consumers}
**Impact**: {What breaks or degrades if this is not fixed}
**Proposed solution**:
{Concrete example — show the before/after}
**Effort**: Low / Medium / High
**Priority**: CRITICAL / MAJOR / MINOR
Examples of good proposals:
## Proposal 1: Add primitive token layer
Problem: Components reference semantic tokens that have no primitive backing.
This means changing the brand color requires editing every semantic token manually.
Impact: Theming is O(n) — proportional to the number of tokens. Adding a dark theme
requires duplicating the entire token set.
Proposed solution:
// Before — semantic token with hardcoded value
--color-brand-primary: #ff0036;
// After — primitive layer + semantic reference
--primitive-brand-500: #ff0036;
--color-brand-primary: var(--primitive-brand-500);
Effort: Medium
Priority: MAJOR
Phase 5 — Summary Report
## Design System Audit — Stack-and-Flow**Audited on**: {date}
**Scope**: {tokens | structure | npm | all}
### Overall Health
| Area | Score | Critical | Major | Minor |
|------|-------|----------|-------|-------|
| Token architecture | {score}/10 | {N} | {N} | {N} |
| Folder structure | {score}/10 | {N} | {N} | {N} |
| npm config | {score}/10 | {N} | {N} | {N} |
| Build output | {score}/10 | {N} | {N} | {N} |
### Top Priorities1. {Most critical issue + proposal reference}
2. {Second most critical}
3. {Third}
### Verdict**DISTRIBUTABLE** — ready for npm publish with no blockers
**DISTRIBUTABLE WITH WARNINGS** — publishable but improvements recommended
**NOT DISTRIBUTABLE** — critical issues must be resolved before publishing
Rules
NEVER suggest changes that would break the public API without flagging the breaking change explicitly
NEVER propose a different design aesthetic — this skill audits standards compliance, not visual preferences
ALWAYS provide a concrete before/after example for every proposal
ALWAYS check the actual theme.css values before flagging a token as wrong
When delegated from SDD, use the SDD return envelope — do not return a free-form report