@jamie-tam/forge 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +389 -0
- package/agents/architect.md +92 -0
- package/agents/builder.md +122 -0
- package/agents/code-reviewer.md +107 -0
- package/agents/concept-designer.md +207 -0
- package/agents/craft-reviewer.md +132 -0
- package/agents/critic.md +130 -0
- package/agents/doc-writer.md +85 -0
- package/agents/dreamer.md +129 -0
- package/agents/e2e-runner.md +89 -0
- package/agents/gotcha-hunter.md +127 -0
- package/agents/prototype-builder.md +193 -0
- package/agents/prototype-codifier.md +204 -0
- package/agents/prototype-reviewer.md +163 -0
- package/agents/security-reviewer.md +108 -0
- package/agents/spec-reviewer.md +94 -0
- package/agents/tracer.md +98 -0
- package/agents/wireframer.md +109 -0
- package/commands/abort.md +25 -0
- package/commands/bugfix.md +151 -0
- package/commands/evolve.md +118 -0
- package/commands/feature.md +236 -0
- package/commands/forge.md +100 -0
- package/commands/greenfield.md +185 -0
- package/commands/hotfix.md +98 -0
- package/commands/refactor.md +147 -0
- package/commands/resume.md +25 -0
- package/commands/setup.md +201 -0
- package/commands/status.md +27 -0
- package/commands/task-force.md +110 -0
- package/commands/validate.md +12 -0
- package/dist/__tests__/active-manifest.test.js +272 -0
- package/dist/__tests__/copy.test.js +96 -0
- package/dist/__tests__/gate-check.test.js +384 -0
- package/dist/__tests__/wiki.test.js +472 -0
- package/dist/__tests__/work-manifest.test.js +304 -0
- package/dist/active-manifest.js +229 -0
- package/dist/cli.js +158 -0
- package/dist/copy.js +124 -0
- package/dist/gate-check.js +326 -0
- package/dist/hooks.js +60 -0
- package/dist/init.js +140 -0
- package/dist/manifest.js +90 -0
- package/dist/merge.js +77 -0
- package/dist/paths.js +36 -0
- package/dist/uninstall.js +216 -0
- package/dist/update.js +158 -0
- package/dist/verify-manifest.js +65 -0
- package/dist/verify.js +98 -0
- package/dist/wiki-ui.js +310 -0
- package/dist/wiki.js +364 -0
- package/dist/work-manifest.js +798 -0
- package/hooks/config/gate-requirements.json +79 -0
- package/hooks/hooks.json +143 -0
- package/hooks/scripts/analyze-telemetry.sh +114 -0
- package/hooks/scripts/gate-enforcer.sh +164 -0
- package/hooks/scripts/pre-compact.sh +90 -0
- package/hooks/scripts/session-start.sh +81 -0
- package/hooks/scripts/telemetry.sh +41 -0
- package/hooks/scripts/wiki-lint.sh +87 -0
- package/hooks/templates/AGENTS.md.template +48 -0
- package/hooks/templates/CLAUDE.md.template +45 -0
- package/package.json +55 -0
- package/protocols/README.md +40 -0
- package/protocols/codex.md +151 -0
- package/protocols/graphify.md +156 -0
- package/references/common/agent-coordination.md +65 -0
- package/references/common/coding-standards.md +54 -0
- package/references/common/feature-tracking.md +21 -0
- package/references/common/io-protocol.md +36 -0
- package/references/common/phases.md +57 -0
- package/references/common/quality-gates.md +130 -0
- package/references/common/skill-authoring.md +154 -0
- package/references/common/skill-compliance.md +30 -0
- package/references/python/standards.md +44 -0
- package/references/react/standards.md +61 -0
- package/references/typescript/standards.md +42 -0
- package/rules/common/forge-system.md +59 -0
- package/rules/common/git-workflow.md +40 -0
- package/rules/common/guardrails.md +37 -0
- package/rules/common/quality-gates.md +18 -0
- package/rules/common/security.md +50 -0
- package/rules/common/skill-selection.md +78 -0
- package/rules/common/testing.md +58 -0
- package/rules/common/verification.md +39 -0
- package/skills/build-pr-workflow/SKILL.md +301 -0
- package/skills/build-pr-workflow/references/pr-template.md +62 -0
- package/skills/build-pr-workflow/references/subagent-merge.md +47 -0
- package/skills/build-pr-workflow/references/worktree-setup.md +125 -0
- package/skills/build-prototype/SKILL.md +264 -0
- package/skills/build-scaffold/SKILL.md +340 -0
- package/skills/build-tdd/SKILL.md +89 -0
- package/skills/build-wireframe/SKILL.md +110 -0
- package/skills/build-wireframe/assets/baseline-template.html +486 -0
- package/skills/build-wireframe/references/demo-walkthroughs.md +170 -0
- package/skills/build-wireframe/references/gotchas.md +188 -0
- package/skills/build-wireframe/references/legend-lines.md +141 -0
- package/skills/concept-slides/SKILL.md +192 -0
- package/skills/deliver-db-migration/SKILL.md +466 -0
- package/skills/deliver-deploy/SKILL.md +407 -0
- package/skills/deliver-onboarding/SKILL.md +198 -0
- package/skills/deliver-onboarding/references/document-templates.md +393 -0
- package/skills/deliver-onboarding/templates/getting-started.md +122 -0
- package/skills/discover-codebase-analysis/SKILL.md +448 -0
- package/skills/discover-requirements/SKILL.md +418 -0
- package/skills/discover-requirements/templates/prd.md +99 -0
- package/skills/discover-requirements/templates/technical-spec.md +123 -0
- package/skills/discover-requirements/templates/user-stories.md +76 -0
- package/skills/harden/SKILL.md +214 -0
- package/skills/iterate-prototype/SKILL.md +241 -0
- package/skills/plan-architecture/SKILL.md +457 -0
- package/skills/plan-architecture/templates/adr-template.md +52 -0
- package/skills/plan-architecture/templates/api-contract.md +99 -0
- package/skills/plan-architecture/templates/db-schema.md +81 -0
- package/skills/plan-architecture/templates/system-design.md +111 -0
- package/skills/plan-brainstorm/SKILL.md +433 -0
- package/skills/plan-design-system/SKILL.md +279 -0
- package/skills/plan-task-decompose/SKILL.md +454 -0
- package/skills/quality-code-review/SKILL.md +286 -0
- package/skills/quality-security-audit/SKILL.md +292 -0
- package/skills/quality-security-audit/references/audit-report-template.md +89 -0
- package/skills/quality-security-audit/references/owasp-checks.md +178 -0
- package/skills/quality-test-execution/SKILL.md +435 -0
- package/skills/quality-test-plan/SKILL.md +297 -0
- package/skills/quality-test-plan/references/test-type-guide.md +263 -0
- package/skills/quality-test-plan/templates/e2e-test-plan.md +72 -0
- package/skills/quality-test-plan/templates/integration-test-plan.md +74 -0
- package/skills/quality-test-plan/templates/load-test-plan.md +111 -0
- package/skills/quality-test-plan/templates/smoke-test-plan.md +68 -0
- package/skills/quality-test-plan/templates/unit-test-plan.md +56 -0
- package/skills/quality-uiux/SKILL.md +481 -0
- package/skills/support-debug/SKILL.md +464 -0
- package/skills/support-dream/SKILL.md +213 -0
- package/skills/support-gotcha/SKILL.md +249 -0
- package/skills/support-runtime-reachability/SKILL.md +190 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/app.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/handlers/cases.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/app.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/handlers/cases.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/App.tsx +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/components/RingingBanner.tsx +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/hooks/useTwilio.ts +6 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/App.tsx +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/components/MyComp.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/App.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/components/Orphan.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/lib/Service.ts +6 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/main.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/lib/Lonely.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/main.ts +2 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/handler.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/handler.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/main.ts +2 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/lib.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/index.ts +1 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/internal.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.test.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-13-gated-pending-annotation/src/future.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-14-untraceable-annotation/src/decorated.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-15-untraceable-empty/src/lazy.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/lib.py +15 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/main.py +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/parent.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/routes/cases.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/lib/foo.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/other.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/cases.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/users.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/main.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/handlers/cases.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/main.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/lib.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/main.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/lib.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/main.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/lib.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/main.ts +7 -0
- package/skills/support-runtime-reachability/scripts/check.mjs +638 -0
- package/skills/support-runtime-reachability/scripts/check.test.mjs +244 -0
- package/skills/support-skill-validator/SKILL.md +194 -0
- package/skills/support-skill-validator/references/false-positives.md +59 -0
- package/skills/support-skill-validator/references/validation-checks.md +280 -0
- package/skills/support-system-guide/SKILL.md +311 -0
- package/skills/support-task-force/SKILL.md +265 -0
- package/skills/support-task-force/references/dispatch-pattern.md +178 -0
- package/skills/support-task-force/references/synthesis-template.md +126 -0
- package/skills/support-wiki-bootstrap/SKILL.md +37 -0
- package/skills/support-wiki-lint/SKILL.md +196 -0
- package/skills/support-wiki-lint/scripts/lint.mjs +488 -0
- package/skills/support-wiki-lint/scripts/lint.test.mjs +196 -0
- package/templates/README.md +23 -0
- package/templates/aiwiki/CLAUDE.md.template +78 -0
- package/templates/aiwiki/schemas/architecture.md +118 -0
- package/templates/aiwiki/schemas/convention.md +112 -0
- package/templates/aiwiki/schemas/decision.md +144 -0
- package/templates/aiwiki/schemas/gotcha.md +118 -0
- package/templates/aiwiki/schemas/oracle.md +105 -0
- package/templates/aiwiki/schemas/session.md +125 -0
- package/templates/manifests/bugfix.yaml +41 -0
- package/templates/manifests/feature.yaml +69 -0
- package/templates/manifests/greenfield.yaml +61 -0
- package/templates/manifests/hotfix.yaml +45 -0
- package/templates/manifests/refactor.yaml +44 -0
- package/templates/manifests/v5/SCHEMA.md +327 -0
- package/templates/manifests/v5/feature.yaml +77 -0
- package/templates/manifests/v6/SCHEMA.md +199 -0
- package/templates/wiki-html/dream-detail.html +378 -0
- package/templates/wiki-html/dreams-list.html +155 -0
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-design-system
|
|
3
|
+
description: "Use when a frontend project needs visual direction (theme, colors, typography, component specs) and DESIGN.md is missing or stale."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan Design System
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Establish the visual direction for a project's frontend before any implementation begins. This skill produces a `DESIGN.md` file — a plain-markdown design system manifest at project root.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Establish visual direction before frontend implementation.
|
|
13
|
+
|
|
14
|
+
**Announce at start:** "I'm using the plan-design-system skill to establish the design system for the frontend."
|
|
15
|
+
|
|
16
|
+
<HARD-GATE>
|
|
17
|
+
Do NOT proceed to architecture or implementation until the user has approved the design tokens. Visual direction feeds into scaffold, task decomposition, and every frontend task. Without approval, agents will produce unstyled interfaces.
|
|
18
|
+
</HARD-GATE>
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- In the v6 prototype-driven flow: **after wireframe lock, before prototype scaffold** (`/greenfield` Step 4.5, `/feature` Step 4.5) — design tokens feed scaffold, every frontend task spec, and the UI/UX review
|
|
23
|
+
- When adding a frontend to an existing backend-only project
|
|
24
|
+
- When the existing `DESIGN.md` is missing or stale
|
|
25
|
+
|
|
26
|
+
**Not for:**
|
|
27
|
+
- Backend-only projects, CLIs, APIs without a UI
|
|
28
|
+
- Projects where the user provides a complete design system or Figma files (use those directly)
|
|
29
|
+
|
|
30
|
+
## Prerequisites
|
|
31
|
+
|
|
32
|
+
1. **Locked concept** — `decks/{name}/slides.md` (concept deck) with approved direction
|
|
33
|
+
2. **Locked wireframe** — `pocs/{name}-wireframe/index.html` (annotated wireframe with the screens this design system must support)
|
|
34
|
+
3. **Knowledge of the target users** — from requirements, the concept deck, or user input
|
|
35
|
+
4. **Check project CLAUDE.md** — if the project declares a CSS framework preference (e.g., `css_framework: "Tailwind + shadcn/ui"`), use that as the starting point instead of asking
|
|
36
|
+
5. **Check for existing `DESIGN.md`** at project root — if one exists, read it first and extend rather than overwrite
|
|
37
|
+
|
|
38
|
+
If the project has no user-facing UI (backend-only / CLI / library with no frontend surface), skip this skill entirely.
|
|
39
|
+
|
|
40
|
+
**Backward-compat note:** If invoked in the non-prototype fallback flow (where `plan-brainstorm` ran instead of concept-slides + build-wireframe) and `brainstorm-approved.md` is present, that artifact may also inform token decisions (tech-stack and frontend choices). The prototype-driven inputs above remain the primary source when both are available.
|
|
41
|
+
|
|
42
|
+
## Skip Check
|
|
43
|
+
|
|
44
|
+
Before running the procedure, check whether work is actually needed:
|
|
45
|
+
|
|
46
|
+
- If `DESIGN.md` exists at the project root AND was updated within the current work item (newer than the work item's `created` timestamp in `.forge/work/{type}/{name}/manifest.yaml`), no-op: report "DESIGN.md exists and is current for this work item, no changes needed" and exit. The skill is idempotent.
|
|
47
|
+
- If `DESIGN.md` exists but predates this work item, proceed — Step 1 will treat it as the baseline and extend rather than overwrite.
|
|
48
|
+
- If `DESIGN.md` does not exist, proceed from Step 1.
|
|
49
|
+
|
|
50
|
+
## The Process
|
|
51
|
+
|
|
52
|
+
### Step 1: Gather Visual Context
|
|
53
|
+
|
|
54
|
+
**First, check for an existing `DESIGN.md` at the project root.** If one exists:
|
|
55
|
+
- Read it in full. Treat its tokens as the current baseline.
|
|
56
|
+
- Report to the user: "Found existing DESIGN.md with {theme}, {N} colors, {font-family}. I'll extend it for this feature rather than starting from scratch."
|
|
57
|
+
- Skip to Step 2 with the existing tokens pre-loaded. Only ask the user about tokens not yet defined or tokens that need to change for this feature.
|
|
58
|
+
|
|
59
|
+
If no `DESIGN.md` exists, ask the user:
|
|
60
|
+
|
|
61
|
+
1. **Existing design assets?** — Figma files, mockups, screenshots, brand guidelines, design system
|
|
62
|
+
2. **Visual references?** — "Similar to [app/site]", "dark theme like VS Code", "minimal like Linear"
|
|
63
|
+
3. **Framework preference?** — Tailwind, CSS Modules, styled-components, or existing choice from brainstorm
|
|
64
|
+
4. **Theme direction?** — Light, dark, system-adaptive
|
|
65
|
+
5. **Branding constraints?** — Colors, fonts, logos that must be used
|
|
66
|
+
|
|
67
|
+
If the user provides complete design assets (Figma, detailed mockups), extract the design tokens from them and skip to Step 4.
|
|
68
|
+
|
|
69
|
+
If the user has no preference, propose a sensible default based on the project type and target users. Offer these aesthetic modes as a starting point:
|
|
70
|
+
|
|
71
|
+
- **Minimal** — clean, lots of whitespace, restrained color, elegant simplicity
|
|
72
|
+
- **Editorial** — magazine-inspired, strong typography hierarchy, serif accents
|
|
73
|
+
- **Playful** — rounded shapes, vibrant palette, friendly micro-interactions
|
|
74
|
+
- **Corporate** — professional, structured grid, neutral tones, trust-building
|
|
75
|
+
- **Brutalist** — raw, high contrast, monospace, unconventional layout
|
|
76
|
+
- **Dark technical** — IDE-inspired, dark backgrounds, monospace accents, precise
|
|
77
|
+
|
|
78
|
+
Avoid generic AI-default patterns: Inter/Roboto as body font, safe blue/purple palettes, rounded-everything with no personality. Choose distinctive fonts and committed color palettes that give the project identity.
|
|
79
|
+
|
|
80
|
+
### Step 2: Define Design Tokens
|
|
81
|
+
|
|
82
|
+
Produce a design tokens document covering:
|
|
83
|
+
|
|
84
|
+
#### Color Palette
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
colors:
|
|
88
|
+
# Backgrounds (3-level depth scale)
|
|
89
|
+
bg-primary: "{main background — set the mood}"
|
|
90
|
+
bg-secondary: "{sidebar, cards — slightly elevated}"
|
|
91
|
+
bg-tertiary: "{hover states, elevated surfaces}"
|
|
92
|
+
|
|
93
|
+
# Text (readable against backgrounds)
|
|
94
|
+
text-primary: "{high contrast body text}"
|
|
95
|
+
text-secondary: "{muted text, labels, timestamps}"
|
|
96
|
+
text-accent: "{links, interactive elements — matches primary}"
|
|
97
|
+
|
|
98
|
+
# Semantic (universally understood)
|
|
99
|
+
success: "{green family}"
|
|
100
|
+
warning: "{amber family}"
|
|
101
|
+
error: "{red family}"
|
|
102
|
+
info: "{blue family}"
|
|
103
|
+
|
|
104
|
+
# Interactive (the project's signature color)
|
|
105
|
+
primary: "{buttons, active states — the brand color}"
|
|
106
|
+
primary-hover: "{darker/lighter variant for hover}"
|
|
107
|
+
primary-muted: "{low-opacity variant for tinted backgrounds}"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### Typography
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
typography:
|
|
114
|
+
font-family: "{chosen body font, system-ui fallback}"
|
|
115
|
+
font-mono: "{chosen monospace font, monospace fallback}"
|
|
116
|
+
scale:
|
|
117
|
+
xs: "{~12px — captions, fine print}"
|
|
118
|
+
sm: "{~14px — secondary text, labels}"
|
|
119
|
+
base: "{~16px — body text}"
|
|
120
|
+
lg: "{~18px — subheadings}"
|
|
121
|
+
xl: "{~20px — headings}"
|
|
122
|
+
2xl: "{~24px — page titles}"
|
|
123
|
+
weight:
|
|
124
|
+
normal: 400
|
|
125
|
+
medium: 500
|
|
126
|
+
semibold: 600
|
|
127
|
+
bold: 700
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Recommended alternatives to overused defaults (Inter, Roboto, Arial, Helvetica):
|
|
131
|
+
- **Display/Hero:** Satoshi, Clash Grotesk, Fraunces, Cabinet Grotesk
|
|
132
|
+
- **Body:** Instrument Sans, DM Sans, Geist, Plus Jakarta Sans
|
|
133
|
+
- **Monospace:** JetBrains Mono, Geist Mono, IBM Plex Mono
|
|
134
|
+
|
|
135
|
+
#### Spacing and Layout
|
|
136
|
+
|
|
137
|
+
```yaml
|
|
138
|
+
spacing:
|
|
139
|
+
unit: "4px" # Base unit (all spacing is multiples)
|
|
140
|
+
page-padding: "24px" # Page-level horizontal padding
|
|
141
|
+
card-padding: "16px" # Card/panel internal padding
|
|
142
|
+
gap: "12px" # Default gap between elements
|
|
143
|
+
section-gap: "32px" # Gap between major sections
|
|
144
|
+
|
|
145
|
+
layout:
|
|
146
|
+
max-width: "1280px" # Content max width
|
|
147
|
+
sidebar-width: "240px" # Sidebar width (if applicable)
|
|
148
|
+
border-radius: "8px" # Default border radius
|
|
149
|
+
border-radius-sm: "4px"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
#### Component Conventions
|
|
153
|
+
|
|
154
|
+
```yaml
|
|
155
|
+
components:
|
|
156
|
+
buttons:
|
|
157
|
+
height: "36px"
|
|
158
|
+
padding: "8px 16px"
|
|
159
|
+
border-radius: "{from layout tokens}"
|
|
160
|
+
primary: "solid background in primary color, white text"
|
|
161
|
+
secondary: "transparent background, border in primary color, primary text"
|
|
162
|
+
ghost: "transparent background, muted text, subtle hover background"
|
|
163
|
+
|
|
164
|
+
inputs:
|
|
165
|
+
height: "36px"
|
|
166
|
+
padding: "8px 12px"
|
|
167
|
+
border: "1px solid subtle border color"
|
|
168
|
+
focus: "visible ring in primary color"
|
|
169
|
+
|
|
170
|
+
cards:
|
|
171
|
+
background: "secondary background"
|
|
172
|
+
border: "subtle border (1px, low opacity)"
|
|
173
|
+
border-radius: "{from layout tokens}"
|
|
174
|
+
padding: "16px"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### Motion
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
motion:
|
|
181
|
+
approach: "{minimal-functional | intentional | expressive}"
|
|
182
|
+
duration-fast: "{100-150ms — hover, focus}"
|
|
183
|
+
duration-normal: "{200-300ms — transitions, reveals}"
|
|
184
|
+
easing: "{ease-out for entrances, ease-in for exits}"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Step 3: Define Page Layouts
|
|
188
|
+
|
|
189
|
+
For each major page/view in the application, sketch the layout structure:
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
### Home / Dashboard
|
|
193
|
+
- Full-width header with logo + nav
|
|
194
|
+
- Main content area with max-width constraint
|
|
195
|
+
- Card grid for primary content (2-3 columns, responsive)
|
|
196
|
+
|
|
197
|
+
### Detail View
|
|
198
|
+
- Sidebar (fixed, 240px) with navigation
|
|
199
|
+
- Main content (fluid, scrollable)
|
|
200
|
+
- Optional right panel for metadata
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Include responsive breakpoints:
|
|
204
|
+
```yaml
|
|
205
|
+
breakpoints:
|
|
206
|
+
sm: "640px" # Mobile landscape
|
|
207
|
+
md: "768px" # Tablet
|
|
208
|
+
lg: "1024px" # Desktop
|
|
209
|
+
xl: "1280px" # Wide desktop
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Step 4: User Review
|
|
213
|
+
|
|
214
|
+
Present the design tokens document:
|
|
215
|
+
|
|
216
|
+
> "Visual direction established:
|
|
217
|
+
>
|
|
218
|
+
> 1. **Theme:** {dark/light/adaptive}
|
|
219
|
+
> 2. **Color palette:** {N} colors defined (primary: {color})
|
|
220
|
+
> 3. **Typography:** {font-family}, {N}-step scale
|
|
221
|
+
> 4. **Layout:** {sidebar + main / full-width / etc.}
|
|
222
|
+
> 5. **CSS framework:** {Tailwind / CSS Modules / etc.}
|
|
223
|
+
>
|
|
224
|
+
> This will be installed during scaffold and referenced in every frontend task spec.
|
|
225
|
+
> Please review — changes after implementation are expensive."
|
|
226
|
+
|
|
227
|
+
Wait for user approval. Adjust if needed.
|
|
228
|
+
|
|
229
|
+
### Step 5: Write Design Tokens Document
|
|
230
|
+
|
|
231
|
+
**Output to `DESIGN.md` at the project root.**
|
|
232
|
+
|
|
233
|
+
- If no `DESIGN.md` exists: create it with the full design tokens document.
|
|
234
|
+
- If an existing `DESIGN.md` was found in Step 1: merge the new/updated tokens into the existing file. Preserve sections that are unchanged. Add new sections for tokens introduced by this feature.
|
|
235
|
+
- **Feature-level overrides:** If this feature introduces tokens that are scoped to this feature only (not project-wide), write those overrides to `.forge/work/{type}/{name}/design-overrides.md`.
|
|
236
|
+
|
|
237
|
+
### Step 6: Update Feature Manifest
|
|
238
|
+
|
|
239
|
+
```yaml
|
|
240
|
+
artifacts:
|
|
241
|
+
design-system:
|
|
242
|
+
path: DESIGN.md # project root
|
|
243
|
+
feature-overrides: design-overrides.md # only if feature-scoped tokens exist
|
|
244
|
+
status: approved
|
|
245
|
+
approved_at: YYYY-MM-DD
|
|
246
|
+
theme: dark
|
|
247
|
+
css_framework: tailwind
|
|
248
|
+
extended_existing: true # false if created from scratch
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Key Rules
|
|
252
|
+
|
|
253
|
+
1. **No frontend implementation without visual direction.** If this skill was skipped, agents will produce unstyled UI.
|
|
254
|
+
2. **Design tokens are the source of truth.** Implementation must reference the tokens, not invent colors or spacing.
|
|
255
|
+
3. **User approval is required.** Visual direction is subjective — the user decides, not the agent.
|
|
256
|
+
4. **Keep it practical.** This is not a full design system — it is enough direction for an agent to produce a styled, consistent UI.
|
|
257
|
+
|
|
258
|
+
## I/O Contract
|
|
259
|
+
|
|
260
|
+
| Field | Value |
|
|
261
|
+
|---|---|
|
|
262
|
+
| **Requires** | Locked concept deck (`decks/{name}/slides.md`) and locked wireframe (`pocs/{name}-wireframe/index.html`) in the prototype-driven flow; or `brainstorm-approved.md` (with confirmed frontend tech stack) in the fallback flow. Plus: requirements (target users), existing `DESIGN.md` (if present — read and extend). |
|
|
263
|
+
| **Produces** | `DESIGN.md` (project root — design tokens, layout specs, component conventions). Optionally `.forge/work/{type}/{name}/design-overrides.md` for feature-scoped tokens. |
|
|
264
|
+
| **Feeds into** | `build-scaffold` (CSS framework install), `plan-task-decompose` (visual specs in tasks), `plan-architecture` (component layout contracts), `quality-uiux` (review against direction) |
|
|
265
|
+
| **Updates manifest** | `artifacts.design-system` |
|
|
266
|
+
|
|
267
|
+
## Integration
|
|
268
|
+
|
|
269
|
+
**Called by:**
|
|
270
|
+
- `/greenfield` command at Step 4.5 (after wireframe lock, before prototype scaffold) — skill self-skips when `DESIGN.md` exists and is current for the work item; backend-only / CLI projects without a frontend skip the step entirely via `phase_plan`
|
|
271
|
+
- `/feature` command at Step 4.5 (after wireframe lock, before prototype scaffold) — skill self-skips when `DESIGN.md` is current; backend-only features (API endpoints, schema changes, internal refactors) skip via `phase_plan`
|
|
272
|
+
|
|
273
|
+
**Pairs with:**
|
|
274
|
+
- `concept-slides` + `build-wireframe` (provide locked concept and wireframe inputs in the prototype-driven flow)
|
|
275
|
+
- `plan-brainstorm` (fallback flow only — provides `brainstorm-approved.md` with confirmed tech stack)
|
|
276
|
+
- `build-scaffold` (reads `DESIGN.md` for CSS framework install and token configuration)
|
|
277
|
+
- `plan-task-decompose` (frontend tasks reference visual specs from `DESIGN.md`)
|
|
278
|
+
- `plan-architecture` (reads `DESIGN.md` for frontend-architecture.md generation)
|
|
279
|
+
- `quality-uiux` (validates implementation against `DESIGN.md` tokens)
|