@soleri/cli 1.9.0 → 1.10.1

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 (94) hide show
  1. package/README.md +4 -0
  2. package/dist/commands/agent.d.ts +8 -0
  3. package/dist/commands/agent.js +150 -0
  4. package/dist/commands/agent.js.map +1 -0
  5. package/dist/commands/create.js +38 -6
  6. package/dist/commands/create.js.map +1 -1
  7. package/dist/commands/install-knowledge.js +65 -3
  8. package/dist/commands/install-knowledge.js.map +1 -1
  9. package/dist/commands/install.d.ts +2 -0
  10. package/dist/commands/install.js +80 -0
  11. package/dist/commands/install.js.map +1 -0
  12. package/dist/commands/pack.d.ts +10 -0
  13. package/dist/commands/pack.js +512 -0
  14. package/dist/commands/pack.js.map +1 -0
  15. package/dist/commands/skills.d.ts +8 -0
  16. package/dist/commands/skills.js +167 -0
  17. package/dist/commands/skills.js.map +1 -0
  18. package/dist/commands/uninstall.d.ts +2 -0
  19. package/dist/commands/uninstall.js +74 -0
  20. package/dist/commands/uninstall.js.map +1 -0
  21. package/dist/hook-packs/installer.d.ts +0 -7
  22. package/dist/hook-packs/installer.js +1 -14
  23. package/dist/hook-packs/installer.js.map +1 -1
  24. package/dist/hook-packs/installer.ts +1 -18
  25. package/dist/hook-packs/registry.d.ts +2 -1
  26. package/dist/hook-packs/registry.ts +1 -1
  27. package/dist/main.js +40 -1
  28. package/dist/main.js.map +1 -1
  29. package/dist/prompts/archetypes.d.ts +1 -0
  30. package/dist/prompts/archetypes.js +177 -62
  31. package/dist/prompts/archetypes.js.map +1 -1
  32. package/dist/prompts/create-wizard.d.ts +3 -3
  33. package/dist/prompts/create-wizard.js +99 -50
  34. package/dist/prompts/create-wizard.js.map +1 -1
  35. package/dist/prompts/playbook.d.ts +8 -7
  36. package/dist/prompts/playbook.js +201 -15
  37. package/dist/prompts/playbook.js.map +1 -1
  38. package/dist/utils/checks.d.ts +0 -1
  39. package/dist/utils/checks.js +1 -1
  40. package/dist/utils/checks.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/__tests__/archetypes.test.ts +84 -0
  43. package/src/__tests__/doctor.test.ts +2 -2
  44. package/src/__tests__/wizard-e2e.mjs +508 -0
  45. package/src/commands/agent.ts +181 -0
  46. package/src/commands/create.ts +152 -104
  47. package/src/commands/install-knowledge.ts +75 -4
  48. package/src/commands/install.ts +101 -0
  49. package/src/commands/pack.ts +585 -0
  50. package/src/commands/skills.ts +191 -0
  51. package/src/commands/uninstall.ts +93 -0
  52. package/src/hook-packs/installer.ts +1 -18
  53. package/src/hook-packs/registry.ts +1 -1
  54. package/src/main.ts +42 -1
  55. package/src/prompts/archetypes.ts +193 -62
  56. package/src/prompts/create-wizard.ts +117 -61
  57. package/src/prompts/playbook.ts +207 -21
  58. package/src/utils/checks.ts +1 -1
  59. package/code-reviewer/.claude/hookify.focus-ring-required.local.md +0 -21
  60. package/code-reviewer/.claude/hookify.no-ai-attribution.local.md +0 -18
  61. package/code-reviewer/.claude/hookify.no-any-types.local.md +0 -18
  62. package/code-reviewer/.claude/hookify.no-console-log.local.md +0 -21
  63. package/code-reviewer/.claude/hookify.no-important.local.md +0 -18
  64. package/code-reviewer/.claude/hookify.no-inline-styles.local.md +0 -21
  65. package/code-reviewer/.claude/hookify.semantic-html.local.md +0 -18
  66. package/code-reviewer/.claude/hookify.ux-touch-targets.local.md +0 -18
  67. package/code-reviewer/.mcp.json +0 -11
  68. package/code-reviewer/README.md +0 -346
  69. package/code-reviewer/package-lock.json +0 -4484
  70. package/code-reviewer/package.json +0 -45
  71. package/code-reviewer/scripts/copy-assets.js +0 -15
  72. package/code-reviewer/scripts/setup.sh +0 -130
  73. package/code-reviewer/skills/brainstorming/SKILL.md +0 -170
  74. package/code-reviewer/skills/code-patrol/SKILL.md +0 -176
  75. package/code-reviewer/skills/context-resume/SKILL.md +0 -143
  76. package/code-reviewer/skills/executing-plans/SKILL.md +0 -201
  77. package/code-reviewer/skills/fix-and-learn/SKILL.md +0 -164
  78. package/code-reviewer/skills/health-check/SKILL.md +0 -225
  79. package/code-reviewer/skills/second-opinion/SKILL.md +0 -142
  80. package/code-reviewer/skills/systematic-debugging/SKILL.md +0 -230
  81. package/code-reviewer/skills/verification-before-completion/SKILL.md +0 -170
  82. package/code-reviewer/skills/writing-plans/SKILL.md +0 -207
  83. package/code-reviewer/src/__tests__/facades.test.ts +0 -598
  84. package/code-reviewer/src/activation/activate.ts +0 -125
  85. package/code-reviewer/src/activation/claude-md-content.ts +0 -217
  86. package/code-reviewer/src/activation/inject-claude-md.ts +0 -113
  87. package/code-reviewer/src/extensions/index.ts +0 -47
  88. package/code-reviewer/src/extensions/ops/example.ts +0 -28
  89. package/code-reviewer/src/identity/persona.ts +0 -62
  90. package/code-reviewer/src/index.ts +0 -278
  91. package/code-reviewer/src/intelligence/data/architecture.json +0 -5
  92. package/code-reviewer/src/intelligence/data/code-review.json +0 -5
  93. package/code-reviewer/tsconfig.json +0 -30
  94. package/code-reviewer/vitest.config.ts +0 -23
@@ -7,7 +7,7 @@
7
7
 
8
8
  // ─── Domains ────────────────────────────────────────────────
9
9
 
10
- export interface DomainOption {
10
+ interface DomainOption {
11
11
  value: string;
12
12
  label: string;
13
13
  hint: string;
@@ -60,6 +60,36 @@ export const DOMAIN_OPTIONS: DomainOption[] = [
60
60
  hint: 'API docs, READMEs, changelogs, code comments',
61
61
  },
62
62
  { value: 'devops', label: 'devops', hint: 'CI/CD pipelines, infrastructure as code, deployment' },
63
+ {
64
+ value: 'developer-experience',
65
+ label: 'developer-experience',
66
+ hint: 'Developer tooling, onboarding, and ergonomics',
67
+ },
68
+ {
69
+ value: 'design-tokens',
70
+ label: 'design-tokens',
71
+ hint: 'Semantic tokens, color systems, spacing scales, typography',
72
+ },
73
+ {
74
+ value: 'frontend',
75
+ label: 'frontend',
76
+ hint: 'Component patterns, state management, rendering, bundling',
77
+ },
78
+ {
79
+ value: 'ux-design',
80
+ label: 'ux-design',
81
+ hint: 'User flows, conversion, onboarding, forms, navigation',
82
+ },
83
+ {
84
+ value: 'knowledge-management',
85
+ label: 'knowledge-management',
86
+ hint: 'Vault curation, pattern lifecycle, cross-project learning',
87
+ },
88
+ {
89
+ value: 'governance',
90
+ label: 'governance',
91
+ hint: 'Approval gates, policy enforcement, audit trails',
92
+ },
63
93
  ];
64
94
 
65
95
  export const CUSTOM_DOMAIN_GUIDANCE = {
@@ -77,12 +107,12 @@ export const CUSTOM_DOMAIN_GUIDANCE = {
77
107
 
78
108
  // ─── Principles ─────────────────────────────────────────────
79
109
 
80
- export interface PrincipleCategory {
110
+ interface PrincipleCategory {
81
111
  label: string;
82
112
  options: PrincipleOption[];
83
113
  }
84
114
 
85
- export interface PrincipleOption {
115
+ interface PrincipleOption {
86
116
  value: string;
87
117
  label: string;
88
118
  }
@@ -95,6 +125,7 @@ export const PRINCIPLE_CATEGORIES: PrincipleCategory[] = [
95
125
  { value: 'Convention over configuration', label: 'Convention over configuration' },
96
126
  { value: 'Test everything that can break', label: 'Test everything that can break' },
97
127
  { value: 'Respect existing patterns', label: 'Respect existing patterns' },
128
+ { value: 'Progressive enhancement', label: 'Progressive enhancement' },
98
129
  ],
99
130
  },
100
131
  {
@@ -104,6 +135,7 @@ export const PRINCIPLE_CATEGORIES: PrincipleCategory[] = [
104
135
  { value: 'Fail closed, not open', label: 'Fail closed, not open' },
105
136
  { value: 'Zero trust by default', label: 'Zero trust by default' },
106
137
  { value: 'Least privilege always', label: 'Least privilege always' },
138
+ { value: 'Defense in depth', label: 'Defense in depth' },
107
139
  ],
108
140
  },
109
141
  {
@@ -136,6 +168,173 @@ export const PRINCIPLE_CATEGORIES: PrincipleCategory[] = [
136
168
  { value: 'Every migration must be reversible', label: 'Every migration must be reversible' },
137
169
  ],
138
170
  },
171
+ {
172
+ label: 'Code Review',
173
+ options: [
174
+ { value: 'Readable over clever', label: 'Readable over clever' },
175
+ { value: 'Small PR scope', label: 'Small PR scope' },
176
+ ],
177
+ },
178
+ {
179
+ label: 'API Design',
180
+ options: [
181
+ { value: 'Backward compatibility by default', label: 'Backward compatibility by default' },
182
+ { value: 'Consumer-driven contracts', label: 'Consumer-driven contracts' },
183
+ ],
184
+ },
185
+ {
186
+ label: 'Testing',
187
+ options: [
188
+ { value: 'Deterministic tests only', label: 'Deterministic tests only' },
189
+ { value: 'Test at boundaries, not internals', label: 'Test at boundaries, not internals' },
190
+ ],
191
+ },
192
+ {
193
+ label: 'Operations',
194
+ options: [
195
+ { value: 'Infrastructure as code', label: 'Infrastructure as code' },
196
+ { value: 'Blast radius awareness', label: 'Blast radius awareness' },
197
+ ],
198
+ },
199
+ {
200
+ label: 'Data',
201
+ options: [
202
+ {
203
+ value: 'Schema evolution over breaking changes',
204
+ label: 'Schema evolution over breaking changes',
205
+ },
206
+ { value: 'Query performance first', label: 'Query performance first' },
207
+ ],
208
+ },
209
+ {
210
+ label: 'Accessibility',
211
+ options: [
212
+ { value: 'WCAG compliance is non-negotiable', label: 'WCAG compliance is non-negotiable' },
213
+ { value: 'Semantic HTML before ARIA', label: 'Semantic HTML before ARIA' },
214
+ {
215
+ value: 'Keyboard navigation for every interaction',
216
+ label: 'Keyboard navigation for every interaction',
217
+ },
218
+ ],
219
+ },
220
+ {
221
+ label: 'Documentation',
222
+ options: [
223
+ { value: 'Clarity over completeness', label: 'Clarity over completeness' },
224
+ { value: 'Every concept needs an example', label: 'Every concept needs an example' },
225
+ {
226
+ value: 'Docs rot faster than code — keep current',
227
+ label: 'Docs rot faster than code — keep current',
228
+ },
229
+ ],
230
+ },
231
+ {
232
+ label: 'Design Systems',
233
+ options: [
234
+ { value: 'Semantic tokens over primitives', label: 'Semantic tokens over primitives' },
235
+ {
236
+ value: 'Component variant enum over boolean props',
237
+ label: 'Component variant enum over boolean props',
238
+ },
239
+ {
240
+ value: 'Atomic design classification for component hierarchy',
241
+ label: 'Atomic design classification for component hierarchy',
242
+ },
243
+ {
244
+ value: 'Token enforcement: blocked then forbidden then preferred',
245
+ label: 'Token enforcement: blocked then forbidden then preferred',
246
+ },
247
+ {
248
+ value: 'Respect existing design system patterns',
249
+ label: 'Respect existing design system patterns',
250
+ },
251
+ {
252
+ value: 'Every component needs accessibility baseline',
253
+ label: 'Every component needs accessibility baseline',
254
+ },
255
+ ],
256
+ },
257
+ {
258
+ label: 'Frontend Engineering',
259
+ options: [
260
+ {
261
+ value: 'Stack-aware implementation over generic advice',
262
+ label: 'Stack-aware implementation over generic advice',
263
+ },
264
+ { value: 'UX patterns inform code structure', label: 'UX patterns inform code structure' },
265
+ {
266
+ value: 'Performance budget before feature scope',
267
+ label: 'Performance budget before feature scope',
268
+ },
269
+ {
270
+ value: 'Accessible by default, not bolted on after',
271
+ label: 'Accessible by default, not bolted on after',
272
+ },
273
+ ],
274
+ },
275
+ {
276
+ label: 'UX Intelligence',
277
+ options: [
278
+ {
279
+ value: 'User behavior drives design decisions',
280
+ label: 'User behavior drives design decisions',
281
+ },
282
+ {
283
+ value: 'Accessibility is not a feature, it is a baseline',
284
+ label: 'Accessibility is not a feature, it is a baseline',
285
+ },
286
+ {
287
+ value: 'Measure conversion impact of every UX change',
288
+ label: 'Measure conversion impact of every UX change',
289
+ },
290
+ {
291
+ value: 'Progressive disclosure over information overload',
292
+ label: 'Progressive disclosure over information overload',
293
+ },
294
+ ],
295
+ },
296
+ {
297
+ label: 'Knowledge Management',
298
+ options: [
299
+ {
300
+ value: 'Knowledge-gather before execute, always',
301
+ label: 'Knowledge-gather before execute, always',
302
+ },
303
+ {
304
+ value: 'Vault is the single source of truth',
305
+ label: 'Vault is the single source of truth',
306
+ },
307
+ {
308
+ value: 'Capture lessons at the moment of discovery',
309
+ label: 'Capture lessons at the moment of discovery',
310
+ },
311
+ {
312
+ value: 'Cross-project patterns beat project-local fixes',
313
+ label: 'Cross-project patterns beat project-local fixes',
314
+ },
315
+ {
316
+ value: 'Domain vocabulary must be explicit and extensible',
317
+ label: 'Domain vocabulary must be explicit and extensible',
318
+ },
319
+ ],
320
+ },
321
+ {
322
+ label: 'Governance',
323
+ options: [
324
+ {
325
+ value: 'Two-gate approval: plan then execute, never skip',
326
+ label: 'Two-gate approval: plan then execute, never skip',
327
+ },
328
+ {
329
+ value: 'Protocol enforcement via checkpoint gates',
330
+ label: 'Protocol enforcement via checkpoint gates',
331
+ },
332
+ {
333
+ value: 'Data-driven architecture: logic in config, not code',
334
+ label: 'Data-driven architecture: logic in config, not code',
335
+ },
336
+ ],
337
+ },
139
338
  ];
140
339
 
141
340
  export const CUSTOM_PRINCIPLE_GUIDANCE = {
@@ -160,35 +359,22 @@ export const CORE_SKILLS = [
160
359
  'verification-before-completion',
161
360
  'health-check',
162
361
  'context-resume',
362
+ 'writing-plans',
363
+ 'executing-plans',
163
364
  ] as const;
164
365
 
165
- export interface SkillCategory {
366
+ interface SkillCategory {
166
367
  label: string;
167
368
  options: SkillOption[];
168
369
  }
169
370
 
170
- export interface SkillOption {
371
+ interface SkillOption {
171
372
  value: string;
172
373
  label: string;
173
374
  hint: string;
174
375
  }
175
376
 
176
377
  export const SKILL_CATEGORIES: SkillCategory[] = [
177
- {
178
- label: 'Planning & Execution',
179
- options: [
180
- {
181
- value: 'writing-plans',
182
- label: 'writing-plans',
183
- hint: 'Structured multi-step planning before code changes',
184
- },
185
- {
186
- value: 'executing-plans',
187
- label: 'executing-plans',
188
- hint: 'Execute approved plans with review checkpoints',
189
- },
190
- ],
191
- },
192
378
  {
193
379
  label: 'Knowledge & Learning',
194
380
  options: [
@@ -261,7 +447,7 @@ export const ALL_OPTIONAL_SKILLS = SKILL_CATEGORIES.flatMap((c) => c.options.map
261
447
 
262
448
  // ─── Tones ──────────────────────────────────────────────────
263
449
 
264
- export interface ToneOption {
450
+ interface ToneOption {
265
451
  value: 'precise' | 'mentor' | 'pragmatic';
266
452
  label: string;
267
453
  hint: string;
@@ -135,7 +135,7 @@ function checkCognee(): CheckResult {
135
135
  }
136
136
  }
137
137
 
138
- export function checkHookPacks(): CheckResult {
138
+ function checkHookPacks(): CheckResult {
139
139
  const installed = getInstalledPacks();
140
140
  if (installed.length === 0) {
141
141
  return {
@@ -1,21 +0,0 @@
1
- ---
2
- # Soleri Hook Pack: a11y
3
- # Version: 1.0.0
4
- # Rule: focus-ring-required
5
- name: focus-ring-required
6
- enabled: true
7
- event: file
8
- action: warn
9
- conditions:
10
- - field: file_path
11
- operator: regex_match
12
- pattern: src/components/ui/.*\.tsx$
13
- - field: content
14
- operator: regex_match
15
- pattern: (<button|<Button|<a\s+href)
16
- - field: content
17
- operator: not_regex_match
18
- pattern: (focus:ring|focus-visible:ring|focus:outline)
19
- ---
20
-
21
- ⚠️ **A11y:** Add focus ring for keyboard navigation: `focus:ring-2 focus:ring-accent focus:ring-offset-2`
@@ -1,18 +0,0 @@
1
- ---
2
- # Soleri Hook Pack: clean-commits
3
- # Version: 1.0.0
4
- # Rule: no-ai-attribution
5
- name: no-ai-attribution
6
- enabled: true
7
- event: bash
8
- action: block
9
- conditions:
10
- - field: command
11
- operator: regex_match
12
- pattern: git\s+commit.*(-m|--message)
13
- - field: command
14
- operator: regex_match
15
- pattern: (🤖|Co-Authored-By|Generated with|AI-generated|by Claude|Claude Code|with Claude|noreply@anthropic\.com|Anthropic|Claude\s+(Opus|Sonnet|Haiku))
16
- ---
17
-
18
- 🚫 **AI attribution blocked.** Use clean conventional commits: `feat:`, `fix:`, `refactor:`. No 🤖, Claude, Co-Authored-By, or Anthropic references.
@@ -1,18 +0,0 @@
1
- ---
2
- # Soleri Hook Pack: typescript-safety
3
- # Version: 1.0.0
4
- # Rule: no-any-types
5
- name: no-any-types
6
- enabled: true
7
- event: file
8
- action: block
9
- conditions:
10
- - field: file_path
11
- operator: regex_match
12
- pattern: \.(tsx?|jsx?)$
13
- - field: content
14
- operator: regex_match
15
- pattern: (:\s*any(?![a-zA-Z])|as\s+any(?![a-zA-Z])|<any>|Record<string,\s*any>)
16
- ---
17
-
18
- 🚫 **Type bypass blocked.** Replace `:any` with specific type or `unknown`. Fix `as any` at the source.
@@ -1,21 +0,0 @@
1
- ---
2
- # Soleri Hook Pack: typescript-safety
3
- # Version: 1.0.0
4
- # Rule: no-console-log
5
- name: no-console-log
6
- enabled: true
7
- event: file
8
- action: warn
9
- conditions:
10
- - field: file_path
11
- operator: regex_match
12
- pattern: src/.*\.(tsx?|jsx?)$
13
- - field: file_path
14
- operator: not_regex_match
15
- pattern: (\.test\.|\.spec\.|\.stories\.)
16
- - field: content
17
- operator: regex_match
18
- pattern: console\.(log|debug|info)\(
19
- ---
20
-
21
- ⚠️ **Debug code detected.** Remove `console.log/debug/info` before commit. `console.error/warn` allowed.
@@ -1,18 +0,0 @@
1
- ---
2
- # Soleri Hook Pack: css-discipline
3
- # Version: 1.0.0
4
- # Rule: no-important
5
- name: no-important
6
- enabled: true
7
- event: file
8
- action: block
9
- conditions:
10
- - field: file_path
11
- operator: regex_match
12
- pattern: \.(tsx?|jsx?|css)$
13
- - field: content
14
- operator: regex_match
15
- pattern: '!important'
16
- ---
17
-
18
- 🚫 **!important blocked.** Fix specificity instead. Use Tailwind `!` prefix (`!text-error`) only if needed.
@@ -1,21 +0,0 @@
1
- ---
2
- # Soleri Hook Pack: css-discipline
3
- # Version: 1.0.0
4
- # Rule: no-inline-styles
5
- name: no-inline-styles
6
- enabled: true
7
- event: file
8
- action: warn
9
- conditions:
10
- - field: file_path
11
- operator: regex_match
12
- pattern: src/components/.*\.tsx$
13
- - field: file_path
14
- operator: not_contains
15
- pattern: .stories.tsx
16
- - field: content
17
- operator: regex_match
18
- pattern: style=\{\{[^}]*(padding|margin|width|height|fontSize|color|background)[^}]*\}\}
19
- ---
20
-
21
- ⚠️ **Inline style detected.** Use Tailwind: `p-4` not `style={{ padding: '16px' }}`. Exception: CSS variables.
@@ -1,18 +0,0 @@
1
- ---
2
- # Soleri Hook Pack: a11y
3
- # Version: 1.0.0
4
- # Rule: semantic-html
5
- name: semantic-html
6
- enabled: true
7
- event: file
8
- action: warn
9
- conditions:
10
- - field: file_path
11
- operator: regex_match
12
- pattern: src/components/.*\.tsx$
13
- - field: content
14
- operator: regex_match
15
- pattern: (<div\s+onClick(?!=)|<span\s+onClick(?!=))
16
- ---
17
-
18
- ⚠️ **A11y:** Use `<button>` instead of `<div onClick>`. Semantic HTML provides keyboard support.
@@ -1,18 +0,0 @@
1
- ---
2
- # Soleri Hook Pack: a11y
3
- # Version: 1.0.0
4
- # Rule: ux-touch-targets
5
- name: ux-touch-targets
6
- enabled: true
7
- event: file
8
- action: warn
9
- conditions:
10
- - field: file_path
11
- operator: regex_match
12
- pattern: src/components/.*\.tsx$
13
- - field: content
14
- operator: regex_match
15
- pattern: (<button[^>]*className="[^"]*(?:p-1|p-2|h-6|h-7|h-8|w-6|w-7|w-8)[^"]*"[^>]*>|className="[^"]*(?:p-1|p-2)[^"]*"[^>]*onClick)
16
- ---
17
-
18
- ⚠️ **Touch target too small.** Min 44x44px required. Add `min-h-11 min-w-11` to small interactive elements.
@@ -1,11 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "code-reviewer": {
4
- "command": "node",
5
- "args": [
6
- "dist/index.js"
7
- ],
8
- "cwd": "."
9
- }
10
- }
11
- }