@softspark/ai-toolkit 4.30.2 → 4.31.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +27 -28
  3. package/app/.claude-plugin/plugin.json +1 -1
  4. package/app/agents/code-reviewer.md +14 -0
  5. package/app/agents/frontend-specialist.md +27 -24
  6. package/app/agents/infrastructure-validator.md +2 -2
  7. package/app/claude-app/skills/ai-toolkit-rules/SKILL.md +44 -1
  8. package/app/personas/frontend-lead.md +20 -12
  9. package/app/rules/claude-toolkit-rules.md +4 -1
  10. package/app/rules/edit-discipline.md +37 -0
  11. package/app/skills/app-builder/SKILL.md +37 -6
  12. package/app/skills/claude-toolkit-rules/SKILL.md +37 -0
  13. package/app/skills/design-engineering/SKILL.md +87 -102
  14. package/app/skills/design-engineering/reference/animation-recipes.md +67 -0
  15. package/app/skills/design-engineering/reference/component-craft.md +28 -0
  16. package/app/skills/documentation-standards/SKILL.md +1 -1
  17. package/app/skills/edit-discipline/SKILL.md +50 -0
  18. package/app/skills/git-conventions/SKILL.md +18 -0
  19. package/app/skills/output-mode/SKILL.md +41 -0
  20. package/app/skills/quality-gates/SKILL.md +23 -0
  21. package/app/skills/review/SKILL.md +10 -0
  22. package/kb/procedures/{ecosystem-sync-sop.md → sop-ecosystem-sync.md} +2 -2
  23. package/kb/procedures/{post-release-testing-sop.md → sop-post-release-testing.md} +3 -3
  24. package/kb/procedures/sop-pre-commit.md +96 -0
  25. package/kb/procedures/{release-preparation-sop.md → sop-release.md} +87 -26
  26. package/kb/reference/architecture-overview.md +1 -1
  27. package/kb/reference/copilot-compatibility.md +1 -1
  28. package/kb/reference/licensing.md +2 -2
  29. package/kb/reference/quick-wins-implementation-summary.md +1 -1
  30. package/kb/reference/supported-tools-registry.md +2 -2
  31. package/kb/troubleshooting/plugin-double-load.md +1 -1
  32. package/llms-full.txt +974 -806
  33. package/llms.txt +6 -5
  34. package/manifest.json +1 -1
  35. package/package.json +2 -1
  36. package/scripts/doctor.py +1 -1
  37. package/scripts/generate_toolkit_rules_skills.py +189 -0
  38. package/scripts/validate.py +1 -1
  39. /package/kb/procedures/{maintenance-sop.md → sop-maintenance.md} +0 -0
  40. /package/kb/procedures/{release-verification-sop.md → sop-release-verification.md} +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,63 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v4.31.0 - Toolkit rules reach every editor (2026-09-03)
11
+
12
+ ### Added
13
+
14
+ - The five top-level rule files in `app/rules/` ship as knowledge skills,
15
+ generated by `scripts/generate_toolkit_rules_skills.py` and wired as
16
+ `npm run generate:toolkit-rules`. Ten bats tests cover generation,
17
+ idempotence, and the content of the new rule.
18
+ - `app/rules/edit-discipline.md`: change files with the `edit` and `write`
19
+ tools rather than rewriting them through `bash`, and show `git diff` before
20
+ reporting a file-changing task as done.
21
+
22
+ ### Fixed
23
+
24
+ - **Every toolkit rule was inert outside Claude Code.** They existed only as
25
+ Claude Code user-level files under `~/.claude/rules/`, and the global
26
+ `CLAUDE.md` carried a pointer to them rather than their content — a Claude
27
+ Code idiom that assumes `/memory`. DeepSeek Harness reads `AGENTS.md`,
28
+ `AGENTS.local.md`, `CLAUDE.md` and `CLAUDE.local.md` and has no
29
+ rules-directory support at all, so under DSH the rules were named in an
30
+ injected file and never loaded. That is why an agent there kept rewriting
31
+ tracked files with `sed` while a rule forbidding exactly that sat unread.
32
+
33
+ Skills are discovered by every editor that reads the shared catalogue, and
34
+ the catalogue injects each skill's *description* into the session. The
35
+ descriptions are therefore written as the rule itself in one imperative
36
+ line: in context whether or not the body is loaded.
37
+
38
+ Verified against a live DSH session — the agent loaded `edit-discipline`
39
+ unprompted, used `write` and `edit` instead of `bash`, and rendered the
40
+ change as a diff.
41
+
42
+ ---
43
+
44
+ ## v4.30.3 - Copilot health-check compatibility (2026-09-02)
45
+
46
+ ### Fixed
47
+
48
+ - **`doctor` accepts sentence punctuation after runtime SemVer.** The official
49
+ Copilot CLI output `GitHub Copilot CLI 1.0.80.` now reports version `1.0.80`
50
+ instead of an invalid-SemVer warning.
51
+ - **Complete-token validation remains strict.** Extra version segments, invalid
52
+ prerelease identifiers, and leading-zero numeric fields are still rejected.
53
+ - **DSH cold-add timing gate is runner-safe.** The regression still proves a
54
+ cold package add can outlive the legacy scaled timeout while leaving enough
55
+ headroom for macOS CI process startup.
56
+
57
+ ### Changed
58
+
59
+ - **Test count.** Increased from 1920 to 1921 with the exact Copilot output
60
+ regression.
61
+ - **Release tags require green cross-platform branch CI.** The preparation SOP
62
+ now binds the gate to the exact release commit and requires both Ubuntu and
63
+ macOS Bats matrix jobs before creating or pushing a tag.
64
+
65
+ ---
66
+
10
67
  ## v4.30.2 - Portable Linux release gates (2026-09-02)
11
68
 
12
69
  ### Fixed
package/README.md CHANGED
@@ -1,33 +1,32 @@
1
1
  # ai-toolkit
2
2
 
3
- > AI coding toolkit with machine-enforced safety, 109 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling. DSH is available as a separate explicit developer-preview target.
3
+ > AI coding toolkit with machine-enforced safety, 114 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling. DSH is available as a separate explicit developer-preview target.
4
4
 
5
5
  [![CI](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml)
6
6
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
7
- [![Skills](https://img.shields.io/badge/skills-109-brightgreen)](app/skills/)
7
+ [![Skills](https://img.shields.io/badge/skills-114-brightgreen)](app/skills/)
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
- [![Tests](https://img.shields.io/badge/tests-1920%20passing-success)](tests/)
10
-
11
- ## What's New in v4.30.2
12
-
13
- **v4.30.2** publishes the managed DSH and plugin-owned MCP release with Linux-portable recovery gates:
14
-
15
- - `install --local --editors dsh` emits the managed `.agents/skills` surface,
16
- while `ai-toolkit dsh install|update|doctor|uninstall --profile web` owns the
17
- exact DSH `0.1.1-rc.2`, dsh-codex `1.0.0`, dsh-orchestrator `1.0.1`, and preset
18
- lifecycle. DSH remains explicit-only and never handles vendor credentials.
19
- - Plugin packs can ship MCP templates and native rules for Claude, Codex, Cursor,
20
- and Gemini. Two localhost RAG templates are included, bringing the built-in MCP
21
- catalogue to 28.
22
- - Cross-file plugin operations and DSH package mutations now use ownership CAS,
23
- pinned paths, process-tree teardown, durable recovery gates, and conservative
24
- rollback that preserves concurrent or user-authored data.
25
- - Recovery verification and interrupted preset relocation now emit deterministic,
26
- non-empty diagnostics on both macOS and Linux. File-mode assertions and malformed
27
- ownership diagnostics also use the same portable contract. The public `v4.30.0`
28
- and `v4.30.1` workflows stopped before npm publication; neither registry artifact
29
- was created.
30
- - Test count: 1675 -> 1920.
9
+ [![Tests](https://img.shields.io/badge/tests-1931%20passing-success)](tests/)
10
+
11
+ ## What's New in v4.31.0
12
+
13
+ **v4.31.0** corrects the post-release health check for the managed DSH and
14
+ plugin-owned MCP release:
15
+
16
+ - `ai-toolkit doctor` now extracts `1.0.80` from the official Copilot CLI output
17
+ `GitHub Copilot CLI 1.0.80.` instead of treating sentence punctuation as an
18
+ invalid SemVer suffix.
19
+ - Complete-token validation remains fail closed for malformed versions such as
20
+ `1.2.3.4`, invalid prerelease identifiers, and leading-zero numeric fields.
21
+ - The DSH cold-add regression keeps its legacy-timeout coverage with macOS CI
22
+ process-startup headroom, removing the release-blocking timing flake.
23
+ - Release tags now require green Ubuntu and macOS branch CI for the exact commit
24
+ before the publish workflow can start.
25
+ - The release retains the explicit DSH lifecycle, plugin-owned MCP/rules, portable
26
+ recovery gates, and the exact DSH package set published in v4.30.2. Test count:
27
+ 1920 -> 1931.
28
+
29
+ See [CHANGELOG.md](CHANGELOG.md) for full history.
31
30
 
32
31
  ## Table of Contents
33
32
 
@@ -61,7 +60,7 @@ ai-toolkit install
61
60
  npx @softspark/ai-toolkit install
62
61
  ```
63
62
 
64
- **That's it.** Claude Code picks up 109 skills, 44 agents, quality hooks, and the safety constitution automatically.
63
+ **That's it.** Claude Code picks up 114 skills, 44 agents, quality hooks, and the safety constitution automatically.
65
64
 
66
65
  **Windows:** WSL is the recommended runtime. Native Windows works when Git Bash is available for hook scripts; dependency hints cover `winget`, Chocolatey, and Scoop. See [Windows Support](kb/reference/windows-support.md).
67
66
 
@@ -187,7 +186,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
187
186
  |-----------|-------|-------------|
188
187
  | `skills/` (task) | 32 | Slash commands: `/commit`, `/build`, `/deploy`, `/test`, `/mcp-builder`, ... |
189
188
  | `skills/` (hybrid) | 31 | Slash commands with agent knowledge base |
190
- | `skills/` (knowledge) | 46 | Domain knowledge auto-loaded by agents (includes 13 `<lang>-rules` skills) |
189
+ | `skills/` (knowledge) | 51 | Domain knowledge auto-loaded by agents (includes 13 `<lang>-rules` skills) |
191
190
  | `agents/` | 44 | Specialized agents across 10 categories |
192
191
  | `hooks/` | 28 entries / 14 events + statusLine | Quality gates, path safety, prompt governance, loop guard, session lifecycle |
193
192
  | `plugins/` | 2 packs | Opt-in packs that install files of their own (memory, enterprise) |
@@ -203,7 +202,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
203
202
  ai-toolkit/
204
203
  ├── app/
205
204
  │ ├── agents/ # 44 agent definitions
206
- │ ├── skills/ # 109 skills (task / hybrid / knowledge)
205
+ │ ├── skills/ # 114 skills (task / hybrid / knowledge)
207
206
  │ ├── rules/ # Source rules synced into Claude/editor rule files
208
207
  │ ├── hooks/ # Hook scripts (29 entries, 14 lifecycle events)
209
208
  │ ├── claude-app/ # Generated Chat/Cowork plugin rules, hooks, instructions
@@ -342,7 +341,7 @@ Need multi-agent coordination?
342
341
  | opencode Compatibility | [kb/reference/opencode-compatibility.md](kb/reference/opencode-compatibility.md) |
343
342
  | GitHub Copilot Compatibility | [kb/reference/copilot-compatibility.md](kb/reference/copilot-compatibility.md) |
344
343
  | DSH Compatibility | [kb/reference/dsh-compatibility.md](kb/reference/dsh-compatibility.md) |
345
- | Maintenance SOP | [kb/procedures/maintenance-sop.md](kb/procedures/maintenance-sop.md) |
344
+ | Maintenance SOP | [kb/procedures/sop-maintenance.md](kb/procedures/sop-maintenance.md) |
346
345
 
347
346
  ---
348
347
 
@@ -3,7 +3,7 @@
3
3
  "name": "ai-toolkit",
4
4
  "displayName": "AI Toolkit",
5
5
  "description": "Professional-grade engineering skills, agents, rules, and lifecycle guardrails for Claude Code, Claude Chat, and Cowork.",
6
- "version": "4.30.2",
6
+ "version": "4.31.0",
7
7
  "author": {
8
8
  "name": "SoftSpark",
9
9
  "url": "https://github.com/softspark"
@@ -59,6 +59,13 @@ Before reviewing, gather context using available tools:
59
59
  - Secrets management
60
60
  - IAM/permissions scope
61
61
 
62
+ ### 5. Frontend & UI Craft (Anti-Slop Audit)
63
+ - Generic AI tells: gradient text headlines, purple/blue washes, 3-column card clichés, nested cards
64
+ - Missing interactive states: lacking focus-visible, active, disabled, loading, error, success
65
+ - Input stability: layout shifts caused by changing border-widths
66
+ - Mobile responsiveness: horizontal scroll risk, clickable affordance text wrapping
67
+ - Fabricated content: invented metrics, fake testimonials, mock OS/browser chrome
68
+
62
69
  ## Review Checklist
63
70
 
64
71
  ### Security (check first)
@@ -78,6 +85,13 @@ Before reviewing, gather context using available tools:
78
85
  - [ ] Tests cover critical paths
79
86
  - [ ] Documentation is accurate
80
87
 
88
+ ### Frontend & UI Craft
89
+ - [ ] No gradient headlines (`background-clip: text`) or purple/blue gradient heroes
90
+ - [ ] Interactive elements implement all 8 states
91
+ - [ ] Inputs maintain constant 1px border-width (zero layout shift)
92
+ - [ ] Mobile responsive: `overflow-x: clip`, single-line button text
93
+ - [ ] No invented metrics, fake testimonials, or mock chrome
94
+
81
95
  ### Performance
82
96
  - [ ] No obvious N+1 queries
83
97
  - [ ] Resources are properly cleaned up
@@ -104,15 +104,17 @@ hybrid_search_kb("[UI patterns, accessibility]")
104
104
  - Image optimization
105
105
  - Bundle analysis
106
106
 
107
- ### Design Craft (impeccable-inspired — guidance, not mandate)
108
- Frontend is craft as much as system. Seven domains, one concrete rule each:
109
- - **Typography** — reject Arial/Inter defaults; pair display + text on a modular scale; enable OpenType features when they serve content
110
- - **Color** — prefer OKLCH; tint neutrals; no pure `#000`; verify gray-on-color contrast
111
- - **Spatial** — consistent spacing scale (4/8/12/16/24/32/48); do not nest cards in cards
112
- - **Motion** — no bounce/elastic easing; stagger reveals; respect `prefers-reduced-motion`
113
- - **Interaction** — replace default focus outlines, never just remove; loaders show progress; errors name the remedy
114
- - **Responsive** — mobile-first; `clamp()` for fluid type; container queries for component-level behavior
115
- - **UX Writing** — button labels = verb + object; errors = cause + remedy; empty states earn their screen
107
+ ### Design Craft & Anti-Slop Standards
108
+ Frontend is craft as much as system. Core non-negotiables:
109
+ - **Typography (2+1 Rule)** — Reject Inter/system-default with no pairing; pair display + text on a modular scale; display headers are strictly roman (`font-style: normal`, never italic emphasis words in headlines); max 3 font families, outlier face in at most 2 slots.
110
+ - **Color & Locked Tokens** — Prefer OKLCH; tint neutral surfaces toward anchor hue (>=0.005 chroma); no pure `#000`/`#fff`; lock tokens to CSS variables (`var(--color-accent)`) without inline hex/rgb improvisation; accent area <=5% of viewport.
111
+ - **Spatial & Macrostructures** — Reject default-attractor rhythm (Hero → 3 features → CTA → footer); choose distinct macrostructures (Bento Grid, Long Document, Marquee, Stat-Led, Workbench, FAQ, Manifesto); do not nest cards in cards or use thick side stripes.
112
+ - **8 Interactive States** — Every interactive component MUST implement all 8 states: default, hover, focus-visible, active, disabled, loading, error, success.
113
+ - **Input Stability (Zero Layout Shift)** — Constant 1px `border-width` across all states; reserve 2px transparent outline at rest; input height = button height (>=44px floor); reserve 1lh helper text slot.
114
+ - **Responsive Non-Negotiables** — Mobile-first (320px–768px verified); `overflow-x: clip` on `html` and `body`; clickable buttons/links never wrap to 2 lines; image grid tracks use `minmax(0, 1fr)`.
115
+ - **Motion** — No bounce/elastic easing; GPU-accelerated transforms; faster exit than enter; respect `prefers-reduced-motion`.
116
+ - **Content Honesty & No Fake Chrome** — Never invent metrics, testimonials, or fake logos; do not hand-draw fake browser/phone frames.
117
+ - **Pre-Emit Self-Critique** — Score output 1–5 on Philosophy, Hierarchy, Execution, Specificity, Restraint, Variety (all >=3).
116
118
 
117
119
  ### AI-Native UI (inspired by 21st.dev)
118
120
  For agentic / LLM-powered products: streaming messages, tool-call expandables, agent-plan visualizations, prompt boxes with inline controls, spending guardrails in UI, retry/stop affordances, draft preservation across navigation.
@@ -122,13 +124,13 @@ For agentic / LLM-powered products: streaming messages, tool-call expandables, a
122
124
  ### Component Design
123
125
  ✅ Single responsibility per component
124
126
  ✅ Props interface with TypeScript
125
- ✅ Accessible by default (ARIA, keyboard)
126
- ✅ Responsive mobile-first
127
+ ✅ Accessible by default (ARIA, keyboard, focus-visible)
128
+ ✅ Responsive mobile-first with 8 interactive states
127
129
  ✅ Error boundaries for failure handling
128
130
 
129
131
  ❌ Don't create god components
130
- ❌ Don't inline all styles
131
- ❌ Don't skip accessibility
132
+ ❌ Don't inline all styles or improvise tokens mid-render
133
+ ❌ Don't skip accessibility or interactive states
132
134
 
133
135
  ### State Management
134
136
  ✅ Colocate state near usage
@@ -138,7 +140,7 @@ For agentic / LLM-powered products: streaming messages, tool-call expandables, a
138
140
 
139
141
  ### Performance
140
142
  ✅ Lazy load routes and heavy components
141
- ✅ Optimize images (next/image, @nuxt/image)
143
+ ✅ Optimize images (next/image, @nuxt/image, fetchpriority for LCP)
142
144
  ✅ Minimize bundle size
143
145
  ✅ Use virtualization for long lists
144
146
 
@@ -147,18 +149,19 @@ For agentic / LLM-powered products: streaming messages, tool-call expandables, a
147
149
  ### Engineering
148
150
  ❌ **Prop drilling** → Use context or state management
149
151
  ❌ **Unnecessary re-renders** → Memoize appropriately
150
- ❌ **Layout shift** → Reserve space, use skeleton
152
+ ❌ **Layout shift** → Reserve space, use skeleton, constant 1px input borders
151
153
  ❌ **Giant components** → Split into smaller units
152
154
 
153
- ### Taste (the LLM defaults — reject on sight)
154
- Arial / Inter / system-default type with no intentional pairing
155
- Gray text on colored backgrounds (contrast failure)
156
- Pure `#000` black use tinted near-black
157
- Cards nested inside cards flatten with type + spacing hierarchy
158
- Bounce / elastic easing curves (feel dated)
159
- Purple gradients (the generic-LLM tell)
160
- Motion that ignores `prefers-reduced-motion`
161
- Generic stock illustrations for empty states
155
+ ### Taste & AI-Slop (Reject on Sight)
156
+ Saturated purple-to-pink/blue full-bleed gradient heroes or gradient headline text (`background-clip: text`)
157
+ 3-equal-column cards with icon-above-heading tiles (the generic AI template)
158
+ Cards nested inside cards or cards with thick side-stripe borders
159
+ Missing interactive states (only styling default + hover, forgetting focus/active/disabled/error/loading)
160
+ Changing `border-width` on input focus/hover causing layout shifts
161
+ Italic headings or single-word italic emphasis in headlines
162
+ Pure `#000` / `#fff` flat backgrounds with zero tint
163
+ Invented metrics ("+47% conversion"), fake testimonials, or placeholder stock logos
164
+ ❌ Re-drawn fake browser bars / phone chrome
162
165
  ❌ Emoji standing in for proper icons
163
166
 
164
167
  ## 🔴 MANDATORY: Post-Code Validation
@@ -18,7 +18,7 @@ Ensure deployments are successful, services are healthy, and rollback procedures
18
18
  ```python
19
19
  # ALWAYS call this FIRST - NO TEXT BEFORE
20
20
  smart_query(query="deployment validation: {service}")
21
- get_document(path="procedures/maintenance-sop.md")
21
+ get_document(path="procedures/sop-maintenance.md")
22
22
  hybrid_search_kb(query="health check {service}", limit=10)
23
23
  ```
24
24
 
@@ -172,7 +172,7 @@ deployment:
172
172
  status: successful
173
173
  rollback_tested: yes
174
174
  kb_references:
175
- - kb/procedures/maintenance-sop.md
175
+ - kb/procedures/sop-maintenance.md
176
176
  next_agent: documenter
177
177
  instructions: |
178
178
  Update deployment documentation with any changes
@@ -23,7 +23,10 @@ Shared AI development toolkit — lifecycle hooks, safety constitution, multi-pl
23
23
 
24
24
  ## Path Safety
25
25
  - NEVER guess or hallucinate user home directory paths
26
- - Use `~` or `$HOME` instead of hardcoded `/Users/<username>/` or `/home/<username>/`
26
+ - Use `~` or `$HOME` instead of a hardcoded `/Users` or `/home` prefix followed
27
+ by a user name. The literal prefix is deliberately not written out here: the
28
+ plugin export scans shipped files for exactly that pattern, so an example of
29
+ the mistake would be indistinguishable from the mistake.
27
30
  - When an absolute path is needed, run `echo $HOME` first to get the correct value
28
31
 
29
32
  ## User Preferences
@@ -32,6 +35,46 @@ Shared AI development toolkit — lifecycle hooks, safety constitution, multi-pl
32
35
  - **Methodology:** Provide >=3 alternatives. Use Socratic questioning.
33
36
  - **Review:** Apply "Devil's Advocate" critique to decisions.
34
37
 
38
+ ## Source: `app/rules/edit-discipline.md`
39
+
40
+ # Edit Discipline & Reviewable Changes
41
+
42
+ ## Edit files with the editing tools, not the shell
43
+
44
+ Use the `edit` and `write` tools to change a file. Do not rewrite tracked files
45
+ through `bash` with `sed`, `awk`, `tee`, a heredoc, or `>` redirection.
46
+
47
+ This is not a style preference. A shell rewrite is opaque to the host: the
48
+ session records a command, not a change. An `edit` call records which file
49
+ changed and how, so the interface can render it, a reviewer can read it, and a
50
+ later turn can cite it. A `sed` line records none of that, and the only way to
51
+ find out what happened is to read the file again.
52
+
53
+ The shell remains correct for what it is for: running builds, tests, linters,
54
+ git, package managers, and generators that own their own output.
55
+
56
+ ## Show the change before calling the work done
57
+
58
+ Before reporting a file-changing task as finished, show what changed:
59
+
60
+ ```bash
61
+ git diff -- <paths> # tracked files
62
+ git status --short # what is new or removed
63
+ ```
64
+
65
+ Paste the diff into the reply, or state precisely why it is too large and
66
+ summarise it by file with the counts. A task that reports success without
67
+ showing the change asks the reader to take the result on trust, and the reader
68
+ is the one who has to decide whether to commit it.
69
+
70
+ For an untracked file, show the content you wrote, not a description of it.
71
+
72
+ ## Why both halves matter together
73
+
74
+ Editing through the tools makes a change *recordable*; showing the diff makes it
75
+ *reviewed*. Either alone leaves the person deciding whether to ship blind to
76
+ something they are accountable for.
77
+
35
78
  ## Source: `app/rules/git-conventions.md`
36
79
 
37
80
  # Git Conventions
@@ -8,26 +8,34 @@
8
8
  - Names specific failure modes; rejects vague advice like "use good design"
9
9
 
10
10
  ## Design Craft Priorities
11
- Impeccable frontend covers seven domains. One concrete rule per domain (guidance, not mandate):
11
+ Core frontend craft covers eight domains (guidance, not mandate):
12
12
 
13
- 1. **Typography** — Reject Arial/Inter as defaults. Pair display + text faces on a modular scale (e.g., 1.125 / 1.25 / 1.333). Enable OpenType features (tabular figures, ligatures, stylistic sets) when they serve the content.
14
- 2. **Color & Contrast** — Prefer OKLCH over HSL/RGB for perceptual uniformity. Tint neutrals toward the brand hue (pure grays feel sterile). Never pure `#000` use tinted near-black. Gray-on-color frequently fails contrast; verify.
15
- 3. **Spatial** — Consistent spacing scale (e.g., 4/8/12/16/24/32/48), not ad-hoc pixel values. Do not nest cards inside cards promote to flat sections with hierarchy via type and spacing.
16
- 4. **Motion** — Easing conveys mass and intent. Avoid bounce/elastic curves (feel dated). Stagger sequential reveals. Always respect `prefers-reduced-motion`.
17
- 5. **Interaction** — Replace default focus outlines; never just remove them. Loading states show progress, not just spinners. Errors name the remedy, not just the failure.
18
- 6. **Responsive** — Mobile-first. Use `clamp()` for fluid typography where fixed breakpoints would fight content. Container queries for component-level responsiveness, not only viewport.
19
- 7. **UX Writing** — Button labels = verb + object ("Save changes", not "OK"). Error messages = cause + remedy. Empty states earn their screen with value, not apologies.
13
+ 1. **Typography (2+1 Rule)** — Reject Arial/Inter as unconsidered defaults. Pair display + text faces on a modular scale. Display headers are strictly roman (`font-style: normal`, never single-word italic emphasis in headlines). Max 3 font families; outlier face used in at most 2 slots.
14
+ 2. **Color & Locked Tokens** — Prefer OKLCH over HSL/RGB for perceptual uniformity. Tint neutrals toward the brand hue (pure grays feel sterile; minimum 0.005 chroma). Never pure `#000` or `#fff`. Lock tokens to CSS variables (`var(--color-accent)`) without mid-render inline hex/rgb improvisation. Keep accent area <=5% of viewport.
15
+ 3. **Spatial & Macrostructures** — Consistent spacing scale (e.g., 4/8/12/16/24/32/48), not ad-hoc pixel values. Break the repetitive Hero 3 features CTA footer template by choosing intentional macrostructures (Bento Grid, Long Document, Marquee, Stat-Led, Workbench, FAQ, Manifesto). Do not nest cards inside cards or use thick side stripes.
16
+ 4. **Motion** — Easing conveys mass and intent. Avoid bounce/elastic curves (feel dated). Stagger sequential reveals. Exit faster than enter. Always respect `prefers-reduced-motion`.
17
+ 5. **Interaction & 8 States** — Every interactive element implements all 8 states: default, hover, focus-visible, active, disabled, loading, error, success. Maintain constant 1px `border-width` on inputs across all states (zero layout shift) with a reserved 2px transparent outline. Input height equals button height (>=44px floor).
18
+ 6. **Responsive Non-Negotiables** — Mobile-first (320px–768px verified). Apply `overflow-x: clip` on `html` and `body` (never `hidden`). Buttons, nav links, and CTAs never wrap to 2 lines. Use `minmax(0, 1fr)` for image grid tracks.
19
+ 7. **UX Writing** — Button labels = verb + object ("Save changes", not "OK"). Error messages = cause + remedy. Empty states earn their screen with value, not apologies. Never invent fake metrics or testimonials.
20
+ 8. **Pre-Emit Self-Critique** — Score output 1–5 on Philosophy, Hierarchy, Execution, Specificity, Restraint, Variety (all >=3).
20
21
 
21
- ## Anti-Patterns (Taste Failures)
22
+ ## Anti-Patterns (Taste & AI-Slop Failures)
22
23
  The LLM defaults — reject on sight:
24
+ - Saturated purple-to-pink/blue full-bleed gradient heroes or gradient headline text (`background-clip: text`)
25
+ - Cliché 3-equal-column cards with icon-above-heading tiles
26
+ - Cards nested inside cards or cards with thick side-stripe borders
23
27
  - Arial / Inter / system-default typography with no intentional pairing
28
+ - Italic headings or single-word italic emphasis in headlines
29
+ - Changing `border-width` on input focus/hover causing layout shifts
30
+ - Missing interactive states (only styling default + hover)
31
+ - Buttons or links wrapping to two lines on mobile
24
32
  - Gray text on colored backgrounds (contrast failure)
25
- - Pure `#000` black (use tinted near-black instead)
26
- - Cards nested inside cards
33
+ - Pure `#000` black or `#fff` flat surfaces (use tinted neutrals)
27
34
  - Bounce / elastic easing curves
28
- - Purple gradients (the generic-LLM tell)
29
35
  - Motion that ignores `prefers-reduced-motion`
30
36
  - Generic stock illustrations for empty states
37
+ - Fake re-drawn browser bars or phone chrome
38
+ - Invented metrics ("+47% conversion"), fake testimonials, or placeholder stock logos
31
39
  - Emoji standing in for proper icons (outside branded contexts)
32
40
  - Everything centered because no layout opinion was formed
33
41
 
@@ -11,7 +11,10 @@ Shared AI development toolkit — lifecycle hooks, safety constitution, multi-pl
11
11
 
12
12
  ## Path Safety
13
13
  - NEVER guess or hallucinate user home directory paths
14
- - Use `~` or `$HOME` instead of hardcoded `/Users/<username>/` or `/home/<username>/`
14
+ - Use `~` or `$HOME` instead of a hardcoded `/Users` or `/home` prefix followed
15
+ by a user name. The literal prefix is deliberately not written out here: the
16
+ plugin export scans shipped files for exactly that pattern, so an example of
17
+ the mistake would be indistinguishable from the mistake.
15
18
  - When an absolute path is needed, run `echo $HOME` first to get the correct value
16
19
 
17
20
  ## User Preferences
@@ -0,0 +1,37 @@
1
+ # Edit Discipline & Reviewable Changes
2
+
3
+ ## Edit files with the editing tools, not the shell
4
+
5
+ Use the `edit` and `write` tools to change a file. Do not rewrite tracked files
6
+ through `bash` with `sed`, `awk`, `tee`, a heredoc, or `>` redirection.
7
+
8
+ This is not a style preference. A shell rewrite is opaque to the host: the
9
+ session records a command, not a change. An `edit` call records which file
10
+ changed and how, so the interface can render it, a reviewer can read it, and a
11
+ later turn can cite it. A `sed` line records none of that, and the only way to
12
+ find out what happened is to read the file again.
13
+
14
+ The shell remains correct for what it is for: running builds, tests, linters,
15
+ git, package managers, and generators that own their own output.
16
+
17
+ ## Show the change before calling the work done
18
+
19
+ Before reporting a file-changing task as finished, show what changed:
20
+
21
+ ```bash
22
+ git diff -- <paths> # tracked files
23
+ git status --short # what is new or removed
24
+ ```
25
+
26
+ Paste the diff into the reply, or state precisely why it is too large and
27
+ summarise it by file with the counts. A task that reports success without
28
+ showing the change asks the reader to take the result on trust, and the reader
29
+ is the one who has to decide whether to commit it.
30
+
31
+ For an untracked file, show the content you wrote, not a description of it.
32
+
33
+ ## Why both halves matter together
34
+
35
+ Editing through the tools makes a change *recordable*; showing the diff makes it
36
+ *reviewed*. Either alone leaves the person deciding whether to ship blind to
37
+ something they are accountable for.
@@ -125,17 +125,48 @@ project/
125
125
 
126
126
  ---
127
127
 
128
+ ## Design Context Gate & Pre-Flight Discipline (Web & UI Projects)
129
+
130
+ Before scaffolding UI pages, establish the design foundation to avoid generic "AI slop":
131
+
132
+ ### 1. Design Context Gate
133
+ Gather 3 essential dimensions (ask once, or infer with clear stated assumptions):
134
+ - **Audience**: Who will use this? What do they care about?
135
+ - **Use Case**: What is the single primary action the page drives? (Sign up, purchase, explore, read, configure?)
136
+ - **Tone**: Pick an explicit extreme — *editorial, brutalist, soft, utilitarian, luxury, playful, technical, austere* ("clean and modern" is not a tone).
137
+
138
+ ### 2. Pre-Flight Scan (Existing Projects)
139
+ Before generating new pages or components, scan:
140
+ - **`design.md`** (or `DESIGN.md`) — if present, it is the locked design system and overrides defaults.
141
+ - **Font Stack** — inspect package dependencies and CSS imports (preserve existing font pairings).
142
+ - **Palette Tokens** — read `:root` variables, Tailwind `@theme` definitions, and OKLCH color spaces.
143
+ - **Motion Stance** — detect installed motion libraries (`framer-motion`, `motion`, `gsap`) vs motion-cut projects.
144
+ - **Framework & Spacing Scale** — conform to existing grid and spacing scale (4-pt / 8-pt).
145
+
146
+ ### 3. Structural Variety & Macrostructures
147
+ Break the repetitive "Hero → 3 features → CTA → footer" template. Select a named whole-page macrostructure matched to the brief:
148
+ - **Bento Grid**: Modular irregular grid where visual rhythm comes from varying card sizes and asymmetric spans.
149
+ - **Long Document**: Literature-led, memo/journal prose format with inline section heads.
150
+ - **Marquee Hero**: The hero fills the viewport above the fold; content shifts below the fold into a list or dense grid.
151
+ - **Stat-Led**: A massive metric/number anchors the narrative; subsequent content qualifies the data.
152
+ - **Workbench**: Guided product tour with real screenshots in frames; focus on functional workflow over marketing copy.
153
+ - **Conversational FAQ**: Bold questions and honest accordion answers reading like an interview with the product.
154
+ - **Manifesto**: Large declaration typography; establishes core philosophy before presenting product.
155
+ - **Photographic / Quote-Led**: Led by primary imagery or borrowed credibility pull-quotes.
156
+
157
+ ---
158
+
128
159
  ## Agent Coordination
129
160
 
130
161
  ### New Project Flow
131
162
 
132
163
  ```
133
- 1. project-planner → Task breakdown
134
- 2. database-architect → Schema design
135
- 3. backend-specialist → API implementation
136
- 4. frontend-specialist → UI implementation
137
- 5. test-engineer → Test coverage
138
- 6. devops-implementer → Deployment
164
+ 1. project-planner → Task breakdown & tech selection
165
+ 2. database-architect → Schema design & migrations
166
+ 3. backend-specialist → API & business logic implementation
167
+ 4. frontend-specialist → UI implementation (anti-slop, 8 states)
168
+ 5. test-engineer → Unit, integration, and E2E test coverage
169
+ 6. devops-implementer → Deployment & CI/CD setup
139
170
  ```
140
171
 
141
172
  ### Feature Addition Flow
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: claude-toolkit-rules
3
+ description: "SoftSpark working agreement: never guess a home directory path, give at least three alternatives, and apply a devil's advocate critique to decisions. Triggers: toolkit, conventions, workflow, alternatives, review."
4
+ effort: low
5
+ user-invocable: false
6
+ allowed-tools: Read
7
+ ---
8
+
9
+ # Claude Toolkit Rules
10
+
11
+ This rule comes from `app/rules/claude-toolkit-rules.md` in ai-toolkit. It applies to
12
+ every task in this workspace, not only when it is loaded.
13
+
14
+ # Claude Toolkit
15
+
16
+ Shared AI development toolkit — lifecycle hooks, safety constitution, multi-platform support.
17
+
18
+ ## Skill Tiers
19
+
20
+ - **Tier 1** — single-agent: `/debug`, `/review`, `/refactor`, `/analyze`, `/docs`, `/plan`, `/explain`, `/tdd`, `/triage-issue`
21
+ - **Tier 1.5** — planning: `/write-a-prd` → `/prd-to-plan` → `/prd-to-issues`; design: `/design-an-interface`, `/architecture-audit`, `/refactor-plan`
22
+ - **Tier 2** — multi-agent: `/workflow <type>` (feature-development, backend-feature, frontend-feature, api-design, database-evolution, test-coverage, security-audit, debugging, incident-response, spike, codebase-onboarding, performance-optimization, infrastructure-change, application-deploy, proactive-troubleshooting)
23
+ - **Tier 3** — custom: `/orchestrate <desc>` (3–6 agents) | `/swarm <mode> <desc>` (map-reduce | consensus | relay)
24
+
25
+ ## Path Safety
26
+ - NEVER guess or hallucinate user home directory paths
27
+ - Use `~` or `$HOME` instead of a hardcoded `/Users` or `/home` prefix followed
28
+ by a user name. The literal prefix is deliberately not written out here: the
29
+ plugin export scans shipped files for exactly that pattern, so an example of
30
+ the mistake would be indistinguishable from the mistake.
31
+ - When an absolute path is needed, run `echo $HOME` first to get the correct value
32
+
33
+ ## User Preferences
34
+
35
+ - **Style:** Direct & efficient. No pleasantries. Measurable results.
36
+ - **Methodology:** Provide >=3 alternatives. Use Socratic questioning.
37
+ - **Review:** Apply "Devil's Advocate" critique to decisions.