ccgx-workflow 1.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 +22 -0
- package/README.md +469 -0
- package/README.zh-CN.md +466 -0
- package/bin/ccg.mjs +2 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.mjs +173 -0
- package/dist/index.d.mts +1774 -0
- package/dist/index.d.ts +1774 -0
- package/dist/index.mjs +2029 -0
- package/dist/shared/ccgx-workflow.WgUzkiC3.mjs +5248 -0
- package/package.json +129 -0
- package/templates/commands/agents/assumptions-analyzer.md +129 -0
- package/templates/commands/agents/code-fixer.md +292 -0
- package/templates/commands/agents/codebase-mapper.md +152 -0
- package/templates/commands/agents/debug-session-manager.md +247 -0
- package/templates/commands/agents/debugger.md +111 -0
- package/templates/commands/agents/eval-auditor.md +171 -0
- package/templates/commands/agents/framework-selector.md +152 -0
- package/templates/commands/agents/get-current-datetime.md +29 -0
- package/templates/commands/agents/init-architect.md +114 -0
- package/templates/commands/agents/integration-checker.md +163 -0
- package/templates/commands/agents/interface-auditor.md +170 -0
- package/templates/commands/agents/nyquist-auditor.md +131 -0
- package/templates/commands/agents/pattern-mapper.md +111 -0
- package/templates/commands/agents/phase-runner.md +321 -0
- package/templates/commands/agents/plan-checker.md +255 -0
- package/templates/commands/agents/planner.md +320 -0
- package/templates/commands/agents/team-architect.md +186 -0
- package/templates/commands/agents/team-qa.md +121 -0
- package/templates/commands/agents/team-reviewer.md +157 -0
- package/templates/commands/agents/ui-ux-designer.md +573 -0
- package/templates/commands/agents/verifier.md +274 -0
- package/templates/commands/analyze.md +210 -0
- package/templates/commands/autonomous.md +792 -0
- package/templates/commands/cancel.md +132 -0
- package/templates/commands/clean-branches.md +117 -0
- package/templates/commands/codex-exec.md +404 -0
- package/templates/commands/commit.md +151 -0
- package/templates/commands/context.md +332 -0
- package/templates/commands/debate.md +165 -0
- package/templates/commands/debug.md +226 -0
- package/templates/commands/enhance.md +64 -0
- package/templates/commands/execute.md +380 -0
- package/templates/commands/init.md +123 -0
- package/templates/commands/optimize.md +217 -0
- package/templates/commands/plan.md +373 -0
- package/templates/commands/result.md +106 -0
- package/templates/commands/review.md +338 -0
- package/templates/commands/rollback.md +116 -0
- package/templates/commands/spec-impl.md +139 -0
- package/templates/commands/spec-init.md +101 -0
- package/templates/commands/spec-plan.md +210 -0
- package/templates/commands/spec-research.md +152 -0
- package/templates/commands/spec-review.md +120 -0
- package/templates/commands/status.md +206 -0
- package/templates/commands/team-exec.md +265 -0
- package/templates/commands/test.md +236 -0
- package/templates/commands/verify-work.md +338 -0
- package/templates/commands/verify.md +66 -0
- package/templates/commands/workflow.md +190 -0
- package/templates/commands/worktree.md +128 -0
- package/templates/hooks/ccg-context-monitor.js +159 -0
- package/templates/hooks/ccg-session-state.cjs +510 -0
- package/templates/hooks/ccg-statusline.js +142 -0
- package/templates/output-styles/abyss-command.md +56 -0
- package/templates/output-styles/abyss-concise.md +89 -0
- package/templates/output-styles/abyss-cultivator.md +302 -0
- package/templates/output-styles/abyss-ritual.md +70 -0
- package/templates/output-styles/engineer-professional.md +89 -0
- package/templates/output-styles/laowang-engineer.md +127 -0
- package/templates/output-styles/nekomata-engineer.md +120 -0
- package/templates/output-styles/ojousama-engineer.md +121 -0
- package/templates/prompts/claude/analyzer.md +59 -0
- package/templates/prompts/claude/architect.md +54 -0
- package/templates/prompts/claude/debugger.md +71 -0
- package/templates/prompts/claude/optimizer.md +73 -0
- package/templates/prompts/claude/reviewer.md +63 -0
- package/templates/prompts/claude/tester.md +69 -0
- package/templates/prompts/codex/analyzer.md +58 -0
- package/templates/prompts/codex/architect.md +54 -0
- package/templates/prompts/codex/debugger.md +74 -0
- package/templates/prompts/codex/optimizer.md +81 -0
- package/templates/prompts/codex/reviewer.md +73 -0
- package/templates/prompts/codex/tester.md +62 -0
- package/templates/prompts/gemini/analyzer.md +61 -0
- package/templates/prompts/gemini/architect.md +55 -0
- package/templates/prompts/gemini/debugger.md +78 -0
- package/templates/prompts/gemini/frontend.md +64 -0
- package/templates/prompts/gemini/optimizer.md +84 -0
- package/templates/prompts/gemini/reviewer.md +80 -0
- package/templates/prompts/gemini/tester.md +68 -0
- package/templates/rules/ccg-skill-routing.md +83 -0
- package/templates/rules/ccg-skills.md +71 -0
- package/templates/scripts/ccg-phase-runner-launcher.mjs +467 -0
- package/templates/scripts/invoke-model.mjs +949 -0
- package/templates/scripts/repatch-gemini-plugin.mjs +194 -0
- package/templates/skills/SKILL.md +92 -0
- package/templates/skills/domains/ai/SKILL.md +35 -0
- package/templates/skills/domains/ai/agent-dev.md +242 -0
- package/templates/skills/domains/ai/llm-security.md +288 -0
- package/templates/skills/domains/ai/prompt-and-eval.md +279 -0
- package/templates/skills/domains/ai/rag-system.md +542 -0
- package/templates/skills/domains/architecture/SKILL.md +43 -0
- package/templates/skills/domains/architecture/api-design.md +225 -0
- package/templates/skills/domains/architecture/caching.md +299 -0
- package/templates/skills/domains/architecture/cloud-native.md +285 -0
- package/templates/skills/domains/architecture/message-queue.md +329 -0
- package/templates/skills/domains/architecture/security-arch.md +297 -0
- package/templates/skills/domains/data-engineering/SKILL.md +208 -0
- package/templates/skills/domains/development/SKILL.md +47 -0
- package/templates/skills/domains/development/cpp.md +246 -0
- package/templates/skills/domains/development/go.md +323 -0
- package/templates/skills/domains/development/java.md +277 -0
- package/templates/skills/domains/development/python.md +288 -0
- package/templates/skills/domains/development/rust.md +313 -0
- package/templates/skills/domains/development/shell.md +313 -0
- package/templates/skills/domains/development/typescript.md +277 -0
- package/templates/skills/domains/devops/SKILL.md +40 -0
- package/templates/skills/domains/devops/cost-optimization.md +272 -0
- package/templates/skills/domains/devops/database.md +217 -0
- package/templates/skills/domains/devops/devsecops.md +198 -0
- package/templates/skills/domains/devops/git-workflow.md +181 -0
- package/templates/skills/domains/devops/observability.md +280 -0
- package/templates/skills/domains/devops/performance.md +336 -0
- package/templates/skills/domains/devops/testing.md +283 -0
- package/templates/skills/domains/frontend-design/SKILL.md +244 -0
- package/templates/skills/domains/frontend-design/agents/openai.yaml +4 -0
- package/templates/skills/domains/frontend-design/claymorphism/SKILL.md +121 -0
- package/templates/skills/domains/frontend-design/claymorphism/references/tokens.css +52 -0
- package/templates/skills/domains/frontend-design/component-patterns.md +202 -0
- package/templates/skills/domains/frontend-design/engineering.md +287 -0
- package/templates/skills/domains/frontend-design/glassmorphism/SKILL.md +142 -0
- package/templates/skills/domains/frontend-design/glassmorphism/references/tokens.css +32 -0
- package/templates/skills/domains/frontend-design/liquid-glass/SKILL.md +139 -0
- package/templates/skills/domains/frontend-design/liquid-glass/references/tokens.css +81 -0
- package/templates/skills/domains/frontend-design/neubrutalism/SKILL.md +145 -0
- package/templates/skills/domains/frontend-design/neubrutalism/references/tokens.css +44 -0
- package/templates/skills/domains/frontend-design/reference/color-and-contrast.md +132 -0
- package/templates/skills/domains/frontend-design/reference/interaction-design.md +195 -0
- package/templates/skills/domains/frontend-design/reference/motion-design.md +99 -0
- package/templates/skills/domains/frontend-design/reference/responsive-design.md +114 -0
- package/templates/skills/domains/frontend-design/reference/spatial-design.md +100 -0
- package/templates/skills/domains/frontend-design/reference/typography.md +133 -0
- package/templates/skills/domains/frontend-design/reference/ux-writing.md +107 -0
- package/templates/skills/domains/frontend-design/state-management.md +680 -0
- package/templates/skills/domains/frontend-design/ui-aesthetics.md +110 -0
- package/templates/skills/domains/frontend-design/ux-principles.md +156 -0
- package/templates/skills/domains/infrastructure/SKILL.md +201 -0
- package/templates/skills/domains/mobile/SKILL.md +225 -0
- package/templates/skills/domains/orchestration/SKILL.md +30 -0
- package/templates/skills/domains/orchestration/multi-agent.md +263 -0
- package/templates/skills/domains/security/SKILL.md +73 -0
- package/templates/skills/domains/security/blue-team.md +436 -0
- package/templates/skills/domains/security/code-audit.md +265 -0
- package/templates/skills/domains/security/pentest.md +226 -0
- package/templates/skills/domains/security/red-team.md +374 -0
- package/templates/skills/domains/security/threat-intel.md +372 -0
- package/templates/skills/domains/security/vuln-research.md +369 -0
- package/templates/skills/impeccable/adapt/SKILL.md +201 -0
- package/templates/skills/impeccable/animate/SKILL.md +176 -0
- package/templates/skills/impeccable/arrange/SKILL.md +126 -0
- package/templates/skills/impeccable/audit/SKILL.md +149 -0
- package/templates/skills/impeccable/bolder/SKILL.md +118 -0
- package/templates/skills/impeccable/clarify/SKILL.md +185 -0
- package/templates/skills/impeccable/colorize/SKILL.md +144 -0
- package/templates/skills/impeccable/critique/SKILL.md +203 -0
- package/templates/skills/impeccable/critique/reference/cognitive-load.md +106 -0
- package/templates/skills/impeccable/critique/reference/heuristics-scoring.md +234 -0
- package/templates/skills/impeccable/critique/reference/personas.md +178 -0
- package/templates/skills/impeccable/delight/SKILL.md +305 -0
- package/templates/skills/impeccable/distill/SKILL.md +123 -0
- package/templates/skills/impeccable/extract/SKILL.md +94 -0
- package/templates/skills/impeccable/harden/SKILL.md +357 -0
- package/templates/skills/impeccable/normalize/SKILL.md +72 -0
- package/templates/skills/impeccable/onboard/SKILL.md +248 -0
- package/templates/skills/impeccable/optimize/SKILL.md +268 -0
- package/templates/skills/impeccable/overdrive/SKILL.md +143 -0
- package/templates/skills/impeccable/polish/SKILL.md +205 -0
- package/templates/skills/impeccable/quieter/SKILL.md +104 -0
- package/templates/skills/impeccable/teach-impeccable/SKILL.md +72 -0
- package/templates/skills/impeccable/typeset/SKILL.md +117 -0
- package/templates/skills/orchestration/multi-agent/SKILL.md +533 -0
- package/templates/skills/run_skill.js +129 -0
- package/templates/skills/scrapling/SKILL.md +98 -0
- package/templates/skills/scrapling/references/api-quick-ref.md +127 -0
- package/templates/skills/scrapling/references/cookie-vault.md +56 -0
- package/templates/skills/scrapling/references/maintenance.md +79 -0
- package/templates/skills/scrapling/references/site-patterns.md +86 -0
- package/templates/skills/scrapling/references/troubleshooting.md +95 -0
- package/templates/skills/scrapling/templates/basic_fetch.py +19 -0
- package/templates/skills/scrapling/templates/parse_only.py +15 -0
- package/templates/skills/scrapling/templates/session_login.py +19 -0
- package/templates/skills/scrapling/templates/stealth_cloudflare.py +28 -0
- package/templates/skills/tools/extract-learnings/SKILL.md +77 -0
- package/templates/skills/tools/forensics/SKILL.md +89 -0
- package/templates/skills/tools/gen-docs/SKILL.md +116 -0
- package/templates/skills/tools/gen-docs/scripts/doc_generator.js +435 -0
- package/templates/skills/tools/health/SKILL.md +121 -0
- package/templates/skills/tools/lib/shared.js +98 -0
- package/templates/skills/tools/map-codebase/SKILL.md +118 -0
- package/templates/skills/tools/override-refusal/SKILL.md +53 -0
- package/templates/skills/tools/override-refusal/agents/openai.yaml +4 -0
- package/templates/skills/tools/override-refusal/scripts/refusal_rewriter.js +226 -0
- package/templates/skills/tools/verify-change/SKILL.md +143 -0
- package/templates/skills/tools/verify-change/scripts/change_analyzer.js +289 -0
- package/templates/skills/tools/verify-module/SKILL.md +130 -0
- package/templates/skills/tools/verify-module/scripts/module_scanner.js +171 -0
- package/templates/skills/tools/verify-quality/SKILL.md +163 -0
- package/templates/skills/tools/verify-quality/scripts/quality_checker.js +337 -0
- package/templates/skills/tools/verify-security/SKILL.md +146 -0
- package/templates/skills/tools/verify-security/scripts/security_scanner.js +283 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quieter
|
|
3
|
+
description: "quieter 降噪:把过于 aggressive/overwhelming 的设计调柔,preserve 质感的同时更克制。"
|
|
4
|
+
argument-hint: "[target]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
context: fork
|
|
7
|
+
paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Reduce visual intensity in designs that are too bold, aggressive, or overstimulating, creating a more refined and approachable aesthetic without losing effectiveness.
|
|
11
|
+
|
|
12
|
+
## MANDATORY PREPARATION
|
|
13
|
+
|
|
14
|
+
Invoke /frontend-design — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /teach-impeccable first.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Assess Current State
|
|
19
|
+
|
|
20
|
+
Analyze what makes the design feel too intense:
|
|
21
|
+
|
|
22
|
+
1. **Identify intensity sources**:
|
|
23
|
+
- **Color saturation**: Overly bright or saturated colors
|
|
24
|
+
- **Contrast extremes**: Too much high-contrast juxtaposition
|
|
25
|
+
- **Visual weight**: Too many bold, heavy elements competing
|
|
26
|
+
- **Animation excess**: Too much motion or overly dramatic effects
|
|
27
|
+
- **Complexity**: Too many visual elements, patterns, or decorations
|
|
28
|
+
- **Scale**: Everything is large and loud with no hierarchy
|
|
29
|
+
|
|
30
|
+
2. **Understand the context**:
|
|
31
|
+
- What's the purpose? (Marketing vs tool vs reading experience)
|
|
32
|
+
- Who's the audience? (Some contexts need energy)
|
|
33
|
+
- What's working? (Don't throw away good ideas)
|
|
34
|
+
- What's the core message? (Preserve what matters)
|
|
35
|
+
|
|
36
|
+
If any of these are unclear from the codebase, Ask the user using AskUserQuestion.
|
|
37
|
+
|
|
38
|
+
**CRITICAL**: "Quieter" doesn't mean boring or generic. It means refined, sophisticated, and easier on the eyes. Think luxury, not laziness.
|
|
39
|
+
|
|
40
|
+
## Plan Refinement
|
|
41
|
+
|
|
42
|
+
Create a strategy to reduce intensity while maintaining impact:
|
|
43
|
+
|
|
44
|
+
- **Color approach**: Desaturate or shift to more sophisticated tones?
|
|
45
|
+
- **Hierarchy approach**: Which elements should stay bold (very few), which should recede?
|
|
46
|
+
- **Simplification approach**: What can be removed entirely?
|
|
47
|
+
- **Sophistication approach**: How can we signal quality through restraint?
|
|
48
|
+
|
|
49
|
+
**IMPORTANT**: Great quiet design is harder than great bold design. Subtlety requires precision.
|
|
50
|
+
|
|
51
|
+
## Refine the Design
|
|
52
|
+
|
|
53
|
+
Systematically reduce intensity across these dimensions:
|
|
54
|
+
|
|
55
|
+
### Color Refinement
|
|
56
|
+
- **Reduce saturation**: Shift from fully saturated to 70-85% saturation
|
|
57
|
+
- **Soften palette**: Replace bright colors with muted, sophisticated tones
|
|
58
|
+
- **Reduce color variety**: Use fewer colors more thoughtfully
|
|
59
|
+
- **Neutral dominance**: Let neutrals do more work, use color as accent (10% rule)
|
|
60
|
+
- **Gentler contrasts**: High contrast only where it matters most
|
|
61
|
+
- **Tinted grays**: Use warm or cool tinted grays instead of pure gray—adds sophistication without loudness
|
|
62
|
+
- **Never gray on color**: If you have gray text on a colored background, use a darker shade of that color or transparency instead
|
|
63
|
+
|
|
64
|
+
### Visual Weight Reduction
|
|
65
|
+
- **Typography**: Reduce font weights (900 → 600, 700 → 500), decrease sizes where appropriate
|
|
66
|
+
- **Hierarchy through subtlety**: Use weight, size, and space instead of color and boldness
|
|
67
|
+
- **White space**: Increase breathing room, reduce density
|
|
68
|
+
- **Borders & lines**: Reduce thickness, decrease opacity, or remove entirely
|
|
69
|
+
|
|
70
|
+
### Simplification
|
|
71
|
+
- **Remove decorative elements**: Gradients, shadows, patterns, textures that don't serve purpose
|
|
72
|
+
- **Simplify shapes**: Reduce border radius extremes, simplify custom shapes
|
|
73
|
+
- **Reduce layering**: Flatten visual hierarchy where possible
|
|
74
|
+
- **Clean up effects**: Reduce or remove blur effects, glows, multiple shadows
|
|
75
|
+
|
|
76
|
+
### Motion Reduction
|
|
77
|
+
- **Reduce animation intensity**: Shorter distances (10-20px instead of 40px), gentler easing
|
|
78
|
+
- **Remove decorative animations**: Keep functional motion, remove flourishes
|
|
79
|
+
- **Subtle micro-interactions**: Replace dramatic effects with gentle feedback
|
|
80
|
+
- **Refined easing**: Use ease-out-quart for smooth, understated motion—never bounce or elastic
|
|
81
|
+
- **Remove animations entirely** if they're not serving a clear purpose
|
|
82
|
+
|
|
83
|
+
### Composition Refinement
|
|
84
|
+
- **Reduce scale jumps**: Smaller contrast between sizes creates calmer feeling
|
|
85
|
+
- **Align to grid**: Bring rogue elements back into systematic alignment
|
|
86
|
+
- **Even out spacing**: Replace extreme spacing variations with consistent rhythm
|
|
87
|
+
|
|
88
|
+
**NEVER**:
|
|
89
|
+
- Make everything the same size/weight (hierarchy still matters)
|
|
90
|
+
- Remove all color (quiet ≠ grayscale)
|
|
91
|
+
- Eliminate all personality (maintain character through refinement)
|
|
92
|
+
- Sacrifice usability for aesthetics (functional elements still need clear affordances)
|
|
93
|
+
- Make everything small and light (some anchors needed)
|
|
94
|
+
|
|
95
|
+
## Verify Quality
|
|
96
|
+
|
|
97
|
+
Ensure refinement maintains quality:
|
|
98
|
+
|
|
99
|
+
- **Still functional**: Can users still accomplish tasks easily?
|
|
100
|
+
- **Still distinctive**: Does it have character, or is it generic now?
|
|
101
|
+
- **Better reading**: Is text easier to read for extended periods?
|
|
102
|
+
- **Sophistication**: Does it feel more refined and premium?
|
|
103
|
+
|
|
104
|
+
Remember: Quiet design is confident design. It doesn't need to shout. Less is more, but less is also harder. Refine with precision and maintain intentionality.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: teach-impeccable
|
|
3
|
+
description: "teach-impeccable 一次性设置:收集项目设计上下文,建立持久化设计指南。"
|
|
4
|
+
user-invocable: true
|
|
5
|
+
context: fork
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Gather design context for this project, then persist it for all future sessions.
|
|
9
|
+
|
|
10
|
+
## Step 1: Explore the Codebase
|
|
11
|
+
|
|
12
|
+
Before asking questions, thoroughly scan the project to discover what you can:
|
|
13
|
+
|
|
14
|
+
- **README and docs**: Project purpose, target audience, any stated goals
|
|
15
|
+
- **Package.json / config files**: Tech stack, dependencies, existing design libraries
|
|
16
|
+
- **Existing components**: Current design patterns, spacing, typography in use
|
|
17
|
+
- **Brand assets**: Logos, favicons, color values already defined
|
|
18
|
+
- **Design tokens / CSS variables**: Existing color palettes, font stacks, spacing scales
|
|
19
|
+
- **Any style guides or brand documentation**
|
|
20
|
+
|
|
21
|
+
Note what you've learned and what remains unclear.
|
|
22
|
+
|
|
23
|
+
## Step 2: Ask UX-Focused Questions
|
|
24
|
+
|
|
25
|
+
Ask the user using AskUserQuestion. Focus only on what you couldn't infer from the codebase:
|
|
26
|
+
|
|
27
|
+
### Users & Purpose
|
|
28
|
+
- Who uses this? What's their context when using it?
|
|
29
|
+
- What job are they trying to get done?
|
|
30
|
+
- What emotions should the interface evoke? (confidence, delight, calm, urgency, etc.)
|
|
31
|
+
|
|
32
|
+
### Brand & Personality
|
|
33
|
+
- How would you describe the brand personality in 3 words?
|
|
34
|
+
- Any reference sites or apps that capture the right feel? What specifically about them?
|
|
35
|
+
- What should this explicitly NOT look like? Any anti-references?
|
|
36
|
+
|
|
37
|
+
### Aesthetic Preferences
|
|
38
|
+
- Any strong preferences for visual direction? (minimal, bold, elegant, playful, technical, organic, etc.)
|
|
39
|
+
- Light mode, dark mode, or both?
|
|
40
|
+
- Any colors that must be used or avoided?
|
|
41
|
+
|
|
42
|
+
### Accessibility & Inclusion
|
|
43
|
+
- Specific accessibility requirements? (WCAG level, known user needs)
|
|
44
|
+
- Considerations for reduced motion, color blindness, or other accommodations?
|
|
45
|
+
|
|
46
|
+
Skip questions where the answer is already clear from the codebase exploration.
|
|
47
|
+
|
|
48
|
+
## Step 3: Write Design Context
|
|
49
|
+
|
|
50
|
+
Synthesize your findings and the user's answers into a `## Design Context` section:
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## Design Context
|
|
54
|
+
|
|
55
|
+
### Users
|
|
56
|
+
[Who they are, their context, the job to be done]
|
|
57
|
+
|
|
58
|
+
### Brand Personality
|
|
59
|
+
[Voice, tone, 3-word personality, emotional goals]
|
|
60
|
+
|
|
61
|
+
### Aesthetic Direction
|
|
62
|
+
[Visual tone, references, anti-references, theme]
|
|
63
|
+
|
|
64
|
+
### Design Principles
|
|
65
|
+
[3-5 principles derived from the conversation that should guide all design decisions]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Write this section to `.impeccable.md` in the project root. If the file already exists, update the Design Context section in place.
|
|
69
|
+
|
|
70
|
+
Then Ask the user using AskUserQuestion. whether they'd also like the Design Context appended to CLAUDE.md. If yes, append or update the section there as well.
|
|
71
|
+
|
|
72
|
+
Confirm completion and summarize the key design principles that will now guide all future work.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: typeset
|
|
3
|
+
description: "typeset 排版:修复 fonts/hierarchy/sizing/weight/readability,让文字看起来有意为之。"
|
|
4
|
+
argument-hint: "[target]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
context: fork
|
|
7
|
+
paths: "*.tsx,*.jsx,*.vue,*.svelte,*.css,*.scss"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Assess and improve typography that feels generic, inconsistent, or poorly structured — turning default-looking text into intentional, well-crafted type.
|
|
11
|
+
|
|
12
|
+
## MANDATORY PREPARATION
|
|
13
|
+
|
|
14
|
+
Invoke /frontend-design — it contains design principles, anti-patterns, and the **Context Gathering Protocol**. Follow the protocol before proceeding — if no design context exists yet, you MUST run /teach-impeccable first.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Assess Current Typography
|
|
19
|
+
|
|
20
|
+
Analyze what's weak or generic about the current type:
|
|
21
|
+
|
|
22
|
+
1. **Font choices**:
|
|
23
|
+
- Are we using invisible defaults? (Inter, Roboto, Arial, Open Sans, system defaults)
|
|
24
|
+
- Does the font match the brand personality? (A playful brand shouldn't use a corporate typeface)
|
|
25
|
+
- Are there too many font families? (More than 2-3 is almost always a mess)
|
|
26
|
+
|
|
27
|
+
2. **Hierarchy**:
|
|
28
|
+
- Can you tell headings from body from captions at a glance?
|
|
29
|
+
- Are font sizes too close together? (14px, 15px, 16px = muddy hierarchy)
|
|
30
|
+
- Are weight contrasts strong enough? (Medium vs Regular is barely visible)
|
|
31
|
+
|
|
32
|
+
3. **Sizing & scale**:
|
|
33
|
+
- Is there a consistent type scale, or are sizes arbitrary?
|
|
34
|
+
- Does body text meet minimum readability? (16px+)
|
|
35
|
+
- Is the sizing strategy appropriate for the context? (Fixed `rem` scales for app UIs; fluid `clamp()` for marketing/content page headings)
|
|
36
|
+
|
|
37
|
+
4. **Readability**:
|
|
38
|
+
- Are line lengths comfortable? (45-75 characters ideal)
|
|
39
|
+
- Is line-height appropriate for the font and context?
|
|
40
|
+
- Is there enough contrast between text and background?
|
|
41
|
+
|
|
42
|
+
5. **Consistency**:
|
|
43
|
+
- Are the same elements styled the same way throughout?
|
|
44
|
+
- Are font weights used consistently? (Not bold in one section, semibold in another for the same role)
|
|
45
|
+
- Is letter-spacing intentional or default everywhere?
|
|
46
|
+
|
|
47
|
+
**CRITICAL**: The goal isn't to make text "fancier" — it's to make it clearer, more readable, and more intentional. Good typography is invisible; bad typography is distracting.
|
|
48
|
+
|
|
49
|
+
## Plan Typography Improvements
|
|
50
|
+
|
|
51
|
+
Consult the [typography reference](reference/typography.md) from the frontend-design skill for detailed guidance on scales, pairing, and loading strategies.
|
|
52
|
+
|
|
53
|
+
Create a systematic plan:
|
|
54
|
+
|
|
55
|
+
- **Font selection**: Do fonts need replacing? What fits the brand/context?
|
|
56
|
+
- **Type scale**: Establish a modular scale (e.g., 1.25 ratio) with clear hierarchy
|
|
57
|
+
- **Weight strategy**: Which weights serve which roles? (Regular for body, Semibold for labels, Bold for headings — or whatever fits)
|
|
58
|
+
- **Spacing**: Line-heights, letter-spacing, and margins between typographic elements
|
|
59
|
+
|
|
60
|
+
## Improve Typography Systematically
|
|
61
|
+
|
|
62
|
+
### Font Selection
|
|
63
|
+
|
|
64
|
+
If fonts need replacing:
|
|
65
|
+
- Choose fonts that reflect the brand personality
|
|
66
|
+
- Pair with genuine contrast (serif + sans, geometric + humanist) — or use a single family in multiple weights
|
|
67
|
+
- Ensure web font loading doesn't cause layout shift (`font-display: swap`, metric-matched fallbacks)
|
|
68
|
+
|
|
69
|
+
### Establish Hierarchy
|
|
70
|
+
|
|
71
|
+
Build a clear type scale:
|
|
72
|
+
- **5 sizes cover most needs**: caption, secondary, body, subheading, heading
|
|
73
|
+
- **Use a consistent ratio** between levels (1.25, 1.333, or 1.5)
|
|
74
|
+
- **Combine dimensions**: Size + weight + color + space for strong hierarchy — don't rely on size alone
|
|
75
|
+
- **App UIs**: Use a fixed `rem`-based type scale, optionally adjusted at 1-2 breakpoints. Fluid sizing undermines the spatial predictability that dense, container-based layouts need
|
|
76
|
+
- **Marketing / content pages**: Use fluid sizing via `clamp(min, preferred, max)` for headings and display text. Keep body text fixed
|
|
77
|
+
|
|
78
|
+
### Fix Readability
|
|
79
|
+
|
|
80
|
+
- Set `max-width` on text containers using `ch` units (`max-width: 65ch`)
|
|
81
|
+
- Adjust line-height per context: tighter for headings (1.1-1.2), looser for body (1.5-1.7)
|
|
82
|
+
- Increase line-height slightly for light-on-dark text
|
|
83
|
+
- Ensure body text is at least 16px / 1rem
|
|
84
|
+
|
|
85
|
+
### Refine Details
|
|
86
|
+
|
|
87
|
+
- Use `tabular-nums` for data tables and numbers that should align
|
|
88
|
+
- Apply proper `letter-spacing`: slightly open for small caps and uppercase, default or tight for large display text
|
|
89
|
+
- Use semantic token names (`--text-body`, `--text-heading`), not value names (`--font-16`)
|
|
90
|
+
- Set `font-kerning: normal` and consider OpenType features where appropriate
|
|
91
|
+
|
|
92
|
+
### Weight Consistency
|
|
93
|
+
|
|
94
|
+
- Define clear roles for each weight and stick to them
|
|
95
|
+
- Don't use more than 3-4 weights (Regular, Medium, Semibold, Bold is plenty)
|
|
96
|
+
- Load only the weights you actually use (each weight adds to page load)
|
|
97
|
+
|
|
98
|
+
**NEVER**:
|
|
99
|
+
- Use more than 2-3 font families
|
|
100
|
+
- Pick sizes arbitrarily — commit to a scale
|
|
101
|
+
- Set body text below 16px
|
|
102
|
+
- Use decorative/display fonts for body text
|
|
103
|
+
- Disable browser zoom (`user-scalable=no`)
|
|
104
|
+
- Use `px` for font sizes — use `rem` to respect user settings
|
|
105
|
+
- Default to Inter/Roboto/Open Sans when personality matters
|
|
106
|
+
- Pair fonts that are similar but not identical (two geometric sans-serifs)
|
|
107
|
+
|
|
108
|
+
## Verify Typography Improvements
|
|
109
|
+
|
|
110
|
+
- **Hierarchy**: Can you identify heading vs body vs caption instantly?
|
|
111
|
+
- **Readability**: Is body text comfortable to read in long passages?
|
|
112
|
+
- **Consistency**: Are same-role elements styled identically throughout?
|
|
113
|
+
- **Personality**: Does the typography reflect the brand?
|
|
114
|
+
- **Performance**: Are web fonts loading efficiently without layout shift?
|
|
115
|
+
- **Accessibility**: Does text meet WCAG contrast ratios? Is it zoomable to 200%?
|
|
116
|
+
|
|
117
|
+
Remember: Typography is the foundation of interface design — it carries the majority of information. Getting it right is the highest-leverage improvement you can make.
|