@soleri/cli 9.14.2 → 9.15.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 (53) hide show
  1. package/dist/commands/agent.js +51 -20
  2. package/dist/commands/agent.js.map +1 -1
  3. package/dist/commands/brain.d.ts +8 -0
  4. package/dist/commands/brain.js +83 -0
  5. package/dist/commands/brain.js.map +1 -0
  6. package/dist/commands/dream.js +1 -12
  7. package/dist/commands/dream.js.map +1 -1
  8. package/dist/commands/install.js +3 -9
  9. package/dist/commands/install.js.map +1 -1
  10. package/dist/commands/validate-skills.d.ts +10 -0
  11. package/dist/commands/validate-skills.js +47 -0
  12. package/dist/commands/validate-skills.js.map +1 -0
  13. package/dist/commands/vault.js +2 -11
  14. package/dist/commands/vault.js.map +1 -1
  15. package/dist/main.js +4 -0
  16. package/dist/main.js.map +1 -1
  17. package/dist/prompts/create-wizard.js +4 -1
  18. package/dist/prompts/create-wizard.js.map +1 -1
  19. package/dist/utils/checks.js +17 -32
  20. package/dist/utils/checks.js.map +1 -1
  21. package/dist/utils/core-resolver.d.ts +3 -0
  22. package/dist/utils/core-resolver.js +38 -0
  23. package/dist/utils/core-resolver.js.map +1 -0
  24. package/dist/utils/vault-db.d.ts +5 -0
  25. package/dist/utils/vault-db.js +17 -0
  26. package/dist/utils/vault-db.js.map +1 -0
  27. package/package.json +1 -1
  28. package/src/__tests__/create-wizard.test.ts +86 -0
  29. package/src/__tests__/doctor.test.ts +46 -1
  30. package/src/__tests__/install-verify.test.ts +1 -1
  31. package/src/__tests__/install.test.ts +7 -10
  32. package/src/commands/agent.ts +53 -17
  33. package/src/commands/brain.ts +93 -0
  34. package/src/commands/dream.ts +1 -11
  35. package/src/commands/install.ts +3 -8
  36. package/src/commands/validate-skills.ts +58 -0
  37. package/src/commands/vault.ts +2 -11
  38. package/src/main.ts +4 -0
  39. package/src/prompts/create-wizard.ts +5 -1
  40. package/src/utils/checks.ts +18 -30
  41. package/src/utils/core-resolver.ts +39 -0
  42. package/src/utils/vault-db.ts +15 -0
  43. package/dist/hook-packs/converter/template.test.ts +0 -133
  44. package/dist/hook-packs/yolo-safety/scripts/anti-deletion.sh +0 -274
  45. package/dist/prompts/archetypes.d.ts +0 -22
  46. package/dist/prompts/archetypes.js +0 -298
  47. package/dist/prompts/archetypes.js.map +0 -1
  48. package/dist/prompts/playbook.d.ts +0 -64
  49. package/dist/prompts/playbook.js +0 -436
  50. package/dist/prompts/playbook.js.map +0 -1
  51. package/dist/utils/format-paths.d.ts +0 -14
  52. package/dist/utils/format-paths.js +0 -27
  53. package/dist/utils/format-paths.js.map +0 -1
@@ -1,274 +0,0 @@
1
- #!/bin/sh
2
- # Anti-Deletion Staging Hook for Claude Code (Soleri Hook Pack: yolo-safety)
3
- # PreToolUse -> Bash: intercepts destructive commands, stages files, blocks execution.
4
- #
5
- # Intercepted patterns:
6
- # - rm / rmdir (files/dirs — stages first, then blocks)
7
- # - git push --force (blocks outright)
8
- # - git reset --hard (blocks outright)
9
- # - git clean (blocks outright)
10
- # - git checkout -- . (blocks outright)
11
- # - git restore . (blocks outright)
12
- # - mv ~/projects/... (blocks outright)
13
- # - drop table (SQL — blocks outright)
14
- # - docker rm / rmi (blocks outright)
15
- #
16
- # Catastrophic commands (rm -rf /, rm -rf ~) should stay in deny rules —
17
- # this hook handles targeted deletes only.
18
- #
19
- # Dependencies: jq (required)
20
- # POSIX sh compatible — no bash-specific features.
21
-
22
- set -eu
23
-
24
- STAGING_ROOT="$HOME/.soleri/staging"
25
- INPUT=$(cat)
26
-
27
- # Extract the command from stdin JSON
28
- CMD=$(printf '%s' "$INPUT" | jq -r '.tool_input.command // empty' 2>/dev/null)
29
-
30
- # No command found — let it through
31
- if [ -z "$CMD" ]; then
32
- exit 0
33
- fi
34
-
35
- # --- Strip heredocs and quoted strings to avoid false positives ---
36
- # Commands like: gh issue comment --body "$(cat <<'EOF' ... rmdir ... EOF)"
37
- # contain destructive keywords in text, not as actual commands.
38
-
39
- # Remove heredoc blocks (best-effort with sed)
40
- STRIPPED=$(printf '%s' "$CMD" | sed -e "s/<<'[A-Za-z_]*'.*//g" -e 's/<<[A-Za-z_]*.*//g' 2>/dev/null || printf '%s' "$CMD")
41
- # Remove double-quoted strings
42
- STRIPPED=$(printf '%s' "$STRIPPED" | sed 's/"[^"]*"//g' 2>/dev/null || printf '%s' "$STRIPPED")
43
- # Remove single-quoted strings
44
- STRIPPED=$(printf '%s' "$STRIPPED" | sed "s/'[^']*'//g" 2>/dev/null || printf '%s' "$STRIPPED")
45
-
46
- # --- Helper: check if pattern matches stripped command ---
47
- matches() {
48
- printf '%s' "$STRIPPED" | grep -qE "$1"
49
- }
50
-
51
- # --- Detect destructive commands (on stripped command only) ---
52
-
53
- IS_RM=false
54
- IS_RMDIR=false
55
- IS_MV_PROJECT=false
56
- IS_GIT_CLEAN=false
57
- IS_RESET_HARD=false
58
- IS_GIT_CHECKOUT_DOT=false
59
- IS_GIT_RESTORE_DOT=false
60
- IS_GIT_PUSH_FORCE=false
61
- IS_DROP_TABLE=false
62
- IS_DOCKER_RM=false
63
-
64
- # rm (but not git rm which stages, doesn't destroy)
65
- if matches '(^|\s|;|&&|\|\|)rm\s'; then
66
- if ! matches '(^|\s)git\s+rm\s'; then
67
- IS_RM=true
68
- fi
69
- fi
70
-
71
- # rmdir
72
- if matches '(^|\s|;|&&|\|\|)rmdir\s'; then
73
- IS_RMDIR=true
74
- fi
75
-
76
- # mv of project directories or git repos
77
- if matches '(^|\s|;|&&|\|\|)mv\s'; then
78
- MV_TAIL=$(printf '%s' "$STRIPPED" | sed 's/^.*\bmv //' | sed 's/-[finv] //g')
79
- if printf '%s' "$MV_TAIL" | grep -qE '(~/projects|\.git)'; then
80
- IS_MV_PROJECT=true
81
- fi
82
- fi
83
-
84
- # git clean
85
- if matches '(^|\s|;|&&|\|\|)git\s+clean\b'; then
86
- IS_GIT_CLEAN=true
87
- fi
88
-
89
- # git reset --hard
90
- if matches '(^|\s|;|&&|\|\|)git\s+reset\s+--hard'; then
91
- IS_RESET_HARD=true
92
- fi
93
-
94
- # git checkout -- .
95
- if matches '(^|\s|;|&&|\|\|)git\s+checkout\s+--\s+\.'; then
96
- IS_GIT_CHECKOUT_DOT=true
97
- fi
98
-
99
- # git restore .
100
- if matches '(^|\s|;|&&|\|\|)git\s+restore\s+\.'; then
101
- IS_GIT_RESTORE_DOT=true
102
- fi
103
-
104
- # git push --force / -f (but not --force-with-lease which is safer)
105
- if matches '(^|\s|;|&&|\|\|)git\s+push\s'; then
106
- if matches 'git\s+push\s.*--force([^-]|$)' || matches 'git\s+push\s+-f(\s|$)' || matches 'git\s+push\s.*\s-f(\s|$)'; then
107
- IS_GIT_PUSH_FORCE=true
108
- fi
109
- fi
110
-
111
- # SQL drop table (case-insensitive)
112
- if printf '%s' "$STRIPPED" | grep -qiE '(^|\s|;)drop\s+table'; then
113
- IS_DROP_TABLE=true
114
- fi
115
-
116
- # docker rm / docker rmi
117
- if matches '(^|\s|;|&&|\|\|)docker\s+(rm|rmi)\b'; then
118
- IS_DOCKER_RM=true
119
- fi
120
-
121
- # --- Not a destructive command — let it through ---
122
-
123
- if [ "$IS_RM" = false ] && [ "$IS_RMDIR" = false ] && [ "$IS_MV_PROJECT" = false ] && \
124
- [ "$IS_GIT_CLEAN" = false ] && [ "$IS_RESET_HARD" = false ] && \
125
- [ "$IS_GIT_CHECKOUT_DOT" = false ] && [ "$IS_GIT_RESTORE_DOT" = false ] && \
126
- [ "$IS_GIT_PUSH_FORCE" = false ] && [ "$IS_DROP_TABLE" = false ] && \
127
- [ "$IS_DOCKER_RM" = false ]; then
128
- exit 0
129
- fi
130
-
131
- # --- Block: git clean ---
132
- if [ "$IS_GIT_CLEAN" = true ]; then
133
- jq -n '{
134
- continue: false,
135
- stopReason: "BLOCKED: git clean would remove untracked files. Use git stash --include-untracked to save them first, or ask the user to run git clean manually."
136
- }'
137
- exit 0
138
- fi
139
-
140
- # --- Block: git reset --hard ---
141
- if [ "$IS_RESET_HARD" = true ]; then
142
- jq -n '{
143
- continue: false,
144
- stopReason: "BLOCKED: git reset --hard would discard uncommitted changes. Use git stash to save them first, or ask the user to run this manually."
145
- }'
146
- exit 0
147
- fi
148
-
149
- # --- Block: git checkout -- . ---
150
- if [ "$IS_GIT_CHECKOUT_DOT" = true ]; then
151
- jq -n '{
152
- continue: false,
153
- stopReason: "BLOCKED: git checkout -- . would discard all uncommitted changes. Use git stash to save them first, or ask the user to run this manually."
154
- }'
155
- exit 0
156
- fi
157
-
158
- # --- Block: git restore . ---
159
- if [ "$IS_GIT_RESTORE_DOT" = true ]; then
160
- jq -n '{
161
- continue: false,
162
- stopReason: "BLOCKED: git restore . would discard all uncommitted changes. Use git stash to save them first, or ask the user to run this manually."
163
- }'
164
- exit 0
165
- fi
166
-
167
- # --- Block: git push --force ---
168
- if [ "$IS_GIT_PUSH_FORCE" = true ]; then
169
- jq -n '{
170
- continue: false,
171
- stopReason: "BLOCKED: git push --force can overwrite remote history and cause data loss for collaborators. Use --force-with-lease instead, or ask the user to run this manually."
172
- }'
173
- exit 0
174
- fi
175
-
176
- # --- Block: mv of project directories ---
177
- if [ "$IS_MV_PROJECT" = true ]; then
178
- jq -n '{
179
- continue: false,
180
- stopReason: "BLOCKED: mv of a project directory or git repo detected. Moving project directories can cause data loss if the operation fails midway. Ask the user to run this manually, or use cp + verify + rm instead."
181
- }'
182
- exit 0
183
- fi
184
-
185
- # --- Block: rmdir ---
186
- if [ "$IS_RMDIR" = true ]; then
187
- jq -n '{
188
- continue: false,
189
- stopReason: "BLOCKED: rmdir detected. Removing directories can break project structure. Ask the user to confirm this operation manually."
190
- }'
191
- exit 0
192
- fi
193
-
194
- # --- Block: drop table ---
195
- if [ "$IS_DROP_TABLE" = true ]; then
196
- jq -n '{
197
- continue: false,
198
- stopReason: "BLOCKED: DROP TABLE detected. This would permanently destroy database data. Ask the user to run this SQL statement manually after confirming intent."
199
- }'
200
- exit 0
201
- fi
202
-
203
- # --- Block: docker rm / rmi ---
204
- if [ "$IS_DOCKER_RM" = true ]; then
205
- jq -n '{
206
- continue: false,
207
- stopReason: "BLOCKED: docker rm/rmi detected. Removing containers or images can cause data loss. Ask the user to run this manually."
208
- }'
209
- exit 0
210
- fi
211
-
212
- # --- Handle rm commands — copy to staging, then block ---
213
-
214
- # Create timestamped staging directory
215
- TIMESTAMP=$(date +%Y-%m-%d_%H%M%S)
216
- STAGE_DIR="$STAGING_ROOT/$TIMESTAMP"
217
-
218
- # Extract file paths from the rm command
219
- # Strip rm and its flags, keeping only the file arguments
220
- FILES=$(printf '%s' "$CMD" | sed 's/^.*\brm //' | sed 's/-[rRfivd]* //g' | tr ' ' '\n' | grep -v '^-' | grep -v '^$' || true)
221
-
222
- if [ -z "$FILES" ]; then
223
- jq -n '{
224
- continue: false,
225
- stopReason: "BLOCKED: rm command detected but could not parse file targets. Please specify files explicitly."
226
- }'
227
- exit 0
228
- fi
229
-
230
- STAGED_COUNT=0
231
- STAGED_LIST=""
232
- MISSING_COUNT=0
233
-
234
- mkdir -p "$STAGE_DIR"
235
-
236
- printf '%s\n' "$FILES" | while IFS= read -r filepath; do
237
- # Expand path (handle ~, relative paths)
238
- expanded=$(eval printf '%s' "$filepath" 2>/dev/null || printf '%s' "$filepath")
239
-
240
- if [ -e "$expanded" ]; then
241
- # Preserve directory structure in staging
242
- target_dir="$STAGE_DIR/$(dirname "$expanded")"
243
- mkdir -p "$target_dir"
244
- # COPY instead of MOVE — originals stay intact, staging is a backup
245
- if [ -d "$expanded" ]; then
246
- # Use rsync if available (excludes node_modules/dist/.git), fall back to cp
247
- if command -v rsync >/dev/null 2>&1; then
248
- rsync -a --exclude='node_modules' --exclude='dist' --exclude='.git' "$expanded/" "$target_dir/$(basename "$expanded")/" 2>/dev/null
249
- else
250
- cp -R "$expanded" "$target_dir/" 2>/dev/null
251
- fi
252
- else
253
- cp "$expanded" "$target_dir/" 2>/dev/null
254
- fi
255
- fi
256
- done
257
-
258
- # Count what was staged (check if staging dir has content)
259
- if [ -d "$STAGE_DIR" ] && [ "$(ls -A "$STAGE_DIR" 2>/dev/null)" ]; then
260
- STAGED_COUNT=$(find "$STAGE_DIR" -mindepth 1 -maxdepth 1 | wc -l | tr -d ' ')
261
- fi
262
-
263
- if [ "$STAGED_COUNT" -eq 0 ]; then
264
- # All files were missing — let the rm fail naturally
265
- rmdir "$STAGE_DIR" 2>/dev/null || true
266
- exit 0
267
- fi
268
-
269
- jq -n \
270
- --arg dir "$STAGE_DIR" \
271
- '{
272
- continue: false,
273
- stopReason: ("BLOCKED & BACKED UP: Files copied to " + $dir + ". The originals are untouched. To proceed with deletion, ask the user to run the rm command manually.")
274
- }'
@@ -1,22 +0,0 @@
1
- /**
2
- * Pre-built agent archetypes that pre-fill the wizard.
3
- * Each archetype provides sensible defaults for role, description,
4
- * domains, principles, skills, and greeting — so the user can
5
- * scaffold a full agent with minimal typing.
6
- */
7
- export interface Archetype {
8
- value: string;
9
- label: string;
10
- hint: string;
11
- tier: 'free' | 'premium';
12
- defaults: {
13
- role: string;
14
- description: string;
15
- domains: string[];
16
- principles: string[];
17
- skills: string[];
18
- tone: 'precise' | 'mentor' | 'pragmatic';
19
- greetingTemplate: (name: string) => string;
20
- };
21
- }
22
- export declare const ARCHETYPES: Archetype[];
@@ -1,298 +0,0 @@
1
- /**
2
- * Pre-built agent archetypes that pre-fill the wizard.
3
- * Each archetype provides sensible defaults for role, description,
4
- * domains, principles, skills, and greeting — so the user can
5
- * scaffold a full agent with minimal typing.
6
- */
7
- export const ARCHETYPES = [
8
- {
9
- value: 'code-reviewer',
10
- label: 'Code Reviewer',
11
- hint: 'Catches bugs, enforces patterns, reviews PRs before merge',
12
- tier: 'free',
13
- defaults: {
14
- role: 'Catches bugs, enforces code patterns, and reviews pull requests before merge',
15
- description: 'This agent reviews code for quality issues, anti-patterns, naming conventions, test coverage gaps, and architectural violations. It provides actionable feedback with concrete fix suggestions.',
16
- domains: ['code-review', 'architecture'],
17
- principles: [
18
- 'Actionable feedback only',
19
- 'Readable over clever',
20
- 'Small PR scope',
21
- 'Respect existing patterns',
22
- ],
23
- skills: ['code-patrol', 'fix-and-learn', 'second-opinion'],
24
- tone: 'mentor',
25
- greetingTemplate: (name) => `Hello! I'm ${name}. Drop a PR link or paste code — I'll review it for bugs, patterns, and quality.`,
26
- },
27
- },
28
- {
29
- value: 'security-auditor',
30
- label: 'Security Auditor',
31
- hint: 'OWASP Top 10, dependency scanning, secrets detection',
32
- tier: 'free',
33
- defaults: {
34
- role: 'Identifies vulnerabilities and enforces secure coding practices',
35
- description: 'This agent scans code for security issues including OWASP Top 10, dependency vulnerabilities, secrets exposure, injection risks, and insecure configurations. It provides remediation guidance with severity ratings.',
36
- domains: ['security', 'code-review'],
37
- principles: [
38
- 'Security first',
39
- 'Fail closed, not open',
40
- 'Zero trust by default',
41
- 'Least privilege always',
42
- 'Defense in depth',
43
- ],
44
- skills: ['code-patrol', 'fix-and-learn', 'vault-navigator'],
45
- tone: 'precise',
46
- greetingTemplate: (name) => `Hello! I'm ${name}. I help identify vulnerabilities and enforce secure coding practices across your codebase.`,
47
- },
48
- },
49
- {
50
- value: 'api-architect',
51
- label: 'API Architect',
52
- hint: 'REST/GraphQL design, contract validation, versioning',
53
- tier: 'free',
54
- defaults: {
55
- role: 'Designs and validates APIs for consistency, usability, and correctness',
56
- description: 'This agent reviews API designs for RESTful conventions, GraphQL best practices, versioning strategy, error handling, pagination patterns, and contract consistency. It catches breaking changes before they ship.',
57
- domains: ['api-design', 'architecture'],
58
- principles: [
59
- 'Backward compatibility by default',
60
- 'Consumer-driven contracts',
61
- 'Design for the consumer, not the implementer',
62
- 'Every migration must be reversible',
63
- ],
64
- skills: ['vault-navigator', 'vault-capture', 'second-opinion'],
65
- tone: 'pragmatic',
66
- greetingTemplate: (name) => `Hello! I'm ${name}. Share your API design or schema — I'll review it for consistency, usability, and best practices.`,
67
- },
68
- },
69
- {
70
- value: 'test-engineer',
71
- label: 'Test Engineer',
72
- hint: 'Test generation, coverage analysis, TDD workflow',
73
- tier: 'free',
74
- defaults: {
75
- role: 'Generates tests, analyzes coverage, and enforces test-driven development',
76
- description: 'This agent helps write comprehensive test suites, identifies coverage gaps, suggests edge cases, and guides TDD workflows. It supports unit, integration, and end-to-end testing strategies.',
77
- domains: ['testing', 'code-review'],
78
- principles: [
79
- 'Test everything that can break',
80
- 'Deterministic tests only',
81
- 'Test at boundaries, not internals',
82
- 'Simplicity over cleverness',
83
- ],
84
- skills: ['test-driven-development', 'fix-and-learn', 'code-patrol'],
85
- tone: 'mentor',
86
- greetingTemplate: (name) => `Hello! I'm ${name}. Point me at code that needs tests — I'll generate comprehensive suites and identify coverage gaps.`,
87
- },
88
- },
89
- {
90
- value: 'devops-pilot',
91
- label: 'DevOps Pilot',
92
- hint: 'CI/CD pipelines, infrastructure, deployment automation',
93
- tier: 'free',
94
- defaults: {
95
- role: 'Manages CI/CD pipelines, infrastructure, and deployment automation',
96
- description: 'This agent helps design and maintain CI/CD pipelines, Docker configurations, infrastructure as code, monitoring setup, and deployment strategies. It follows reliability engineering best practices.',
97
- domains: ['devops', 'architecture'],
98
- principles: [
99
- 'Automate everything repeatable',
100
- 'Infrastructure as code',
101
- 'Blast radius awareness',
102
- 'Observability built in from day one',
103
- ],
104
- skills: ['vault-navigator', 'fix-and-learn', 'knowledge-harvest'],
105
- tone: 'pragmatic',
106
- greetingTemplate: (name) => `Hello! I'm ${name}. I help with CI/CD, infrastructure, and deployment — describe your setup or issue.`,
107
- },
108
- },
109
- {
110
- value: 'database-architect',
111
- label: 'Database Architect',
112
- hint: 'Schema design, migrations, query optimization',
113
- tier: 'free',
114
- defaults: {
115
- role: 'Designs database schemas, manages migrations, and optimizes queries',
116
- description: 'This agent reviews database designs for normalization, indexing strategy, migration safety, query performance, and data integrity. It supports SQL and NoSQL patterns.',
117
- domains: ['database', 'performance'],
118
- principles: [
119
- 'Schema evolution over breaking changes',
120
- 'Query performance first',
121
- 'Every migration must be reversible',
122
- 'Convention over configuration',
123
- ],
124
- skills: ['vault-navigator', 'vault-capture', 'knowledge-harvest'],
125
- tone: 'precise',
126
- greetingTemplate: (name) => `Hello! I'm ${name}. Share your schema, migration, or query — I'll review it for correctness and performance.`,
127
- },
128
- },
129
- {
130
- value: 'full-stack',
131
- label: 'Full-Stack Assistant',
132
- hint: 'General-purpose dev helper across the entire stack',
133
- tier: 'free',
134
- defaults: {
135
- role: 'A general-purpose development assistant across the full stack',
136
- description: 'This agent helps with frontend, backend, database, testing, and deployment tasks. It provides balanced guidance across the entire stack without deep specialization in any single area.',
137
- domains: ['code-review', 'testing', 'architecture'],
138
- principles: [
139
- 'Simplicity over cleverness',
140
- 'Progressive enhancement',
141
- 'Test everything that can break',
142
- 'Respect existing patterns',
143
- ],
144
- skills: ['test-driven-development', 'code-patrol', 'fix-and-learn', 'vault-navigator'],
145
- tone: 'mentor',
146
- greetingTemplate: (name) => `Hello! I'm ${name}. I help across the full stack — frontend, backend, testing, deployment. What are you working on?`,
147
- },
148
- },
149
- {
150
- value: 'accessibility-guardian',
151
- label: 'Accessibility Guardian',
152
- hint: 'WCAG compliance, semantic HTML, keyboard navigation audits',
153
- tier: 'free',
154
- defaults: {
155
- role: 'Audits code for WCAG compliance and accessibility best practices',
156
- description: 'This agent reviews components and pages for accessibility issues including WCAG 2.1 violations, missing ARIA labels, keyboard navigation gaps, color contrast failures, and semantic HTML problems. It provides fix suggestions with severity ratings.',
157
- domains: ['accessibility', 'code-review'],
158
- principles: [
159
- 'WCAG compliance is non-negotiable',
160
- 'Semantic HTML before ARIA',
161
- 'Keyboard navigation for every interaction',
162
- 'Actionable feedback only',
163
- ],
164
- skills: ['code-patrol', 'second-opinion'],
165
- tone: 'precise',
166
- greetingTemplate: (name) => `Hello! I'm ${name}. I audit your code for accessibility — WCAG compliance, keyboard navigation, screen reader support, and more.`,
167
- },
168
- },
169
- {
170
- value: 'documentation-writer',
171
- label: 'Documentation Writer',
172
- hint: 'Technical docs, API references, example-driven guides',
173
- tier: 'free',
174
- defaults: {
175
- role: 'Creates and maintains clear, example-driven technical documentation',
176
- description: 'This agent helps write and maintain technical documentation including API references, getting-started guides, architecture docs, and changelogs. It follows docs-as-code practices and ensures every concept has a working example.',
177
- domains: ['documentation', 'developer-experience'],
178
- principles: [
179
- 'Clarity over completeness',
180
- 'Every concept needs an example',
181
- 'Docs rot faster than code — keep current',
182
- 'Design for the consumer, not the implementer',
183
- ],
184
- skills: ['knowledge-harvest', 'vault-navigator'],
185
- tone: 'mentor',
186
- greetingTemplate: (name) => `Hello! I'm ${name}. I help write and maintain clear, example-driven documentation. What needs documenting?`,
187
- },
188
- },
189
- // ─── Premium Archetypes ──────────────────────────────────────────
190
- {
191
- value: 'design-system-architect',
192
- label: 'Design System Architect',
193
- hint: 'Tokens, component APIs, accessibility, atomic design hierarchy',
194
- tier: 'premium',
195
- defaults: {
196
- role: 'Designs and enforces design systems with semantic tokens, component APIs, and accessibility baselines',
197
- description: 'This agent architects design systems end-to-end: semantic token hierarchies, component variant APIs, atomic design classification, spacing and typography scales, color contrast enforcement, and cross-platform consistency. It bridges design and engineering with a token-first methodology.',
198
- domains: ['architecture', 'accessibility', 'code-review', 'design-tokens', 'frontend'],
199
- principles: [
200
- 'Semantic tokens over primitives',
201
- 'Component variant enum over boolean props',
202
- 'Atomic design classification for component hierarchy',
203
- 'Token enforcement: blocked then forbidden then preferred',
204
- 'Respect existing design system patterns',
205
- 'Every component needs accessibility baseline',
206
- ],
207
- skills: ['code-patrol', 'vault-navigator', 'vault-capture', 'knowledge-harvest'],
208
- tone: 'precise',
209
- greetingTemplate: (name) => `Hello! I'm ${name}. I architect design systems — tokens, component APIs, accessibility, and cross-platform consistency. Show me your system or describe what you need.`,
210
- },
211
- },
212
- {
213
- value: 'frontend-craftsman',
214
- label: 'Frontend Craftsman',
215
- hint: 'Stack-aware implementation, UX patterns, performance budgets, accessibility',
216
- tier: 'premium',
217
- defaults: {
218
- role: 'Builds production-grade frontends with stack-specific expertise, UX-informed structure, and performance discipline',
219
- description: 'This agent combines deep stack knowledge (React, Next.js, Vue, Svelte, Flutter, SwiftUI) with UX design principles, performance budgets, and accessibility-first development. It provides implementation guidance tailored to your specific framework and UI patterns.',
220
- domains: ['code-review', 'testing', 'performance', 'accessibility', 'frontend'],
221
- principles: [
222
- 'Stack-aware implementation over generic advice',
223
- 'UX patterns inform code structure',
224
- 'Performance budget before feature scope',
225
- 'Accessible by default, not bolted on after',
226
- 'Convention over configuration',
227
- ],
228
- skills: ['test-driven-development', 'code-patrol', 'fix-and-learn', 'vault-navigator'],
229
- tone: 'mentor',
230
- greetingTemplate: (name) => `Hello! I'm ${name}. I build production-grade frontends with stack-specific expertise, performance discipline, and accessibility built in. What are you working on?`,
231
- },
232
- },
233
- {
234
- value: 'ux-intelligence',
235
- label: 'UX Intelligence Agent',
236
- hint: 'User behavior, conversion optimization, inclusive design, ethical patterns',
237
- tier: 'premium',
238
- defaults: {
239
- role: 'Applies user behavior research to design decisions for conversion, accessibility, and ethical UX',
240
- description: 'This agent brings UX research intelligence to every design decision: onboarding flows, form optimization, navigation patterns, data entry, search UX, touch targets, animation, performance perception, and AI interaction patterns. It measures conversion impact and ensures inclusive, ethical design.',
241
- domains: ['accessibility', 'performance', 'testing', 'frontend', 'ux-design'],
242
- principles: [
243
- 'User behavior drives design decisions',
244
- 'Accessibility is not a feature, it is a baseline',
245
- 'Measure conversion impact of every UX change',
246
- 'Progressive disclosure over information overload',
247
- 'Design for the consumer, not the implementer',
248
- ],
249
- skills: ['vault-navigator', 'vault-capture', 'second-opinion', 'knowledge-harvest'],
250
- tone: 'mentor',
251
- greetingTemplate: (name) => `Hello! I'm ${name}. I help make UX decisions backed by user behavior research — onboarding, forms, navigation, accessibility, and conversion optimization.`,
252
- },
253
- },
254
- {
255
- value: 'knowledge-curator',
256
- label: 'Knowledge Curator',
257
- hint: 'Vault lifecycle, cross-project patterns, domain vocabulary, knowledge architecture',
258
- tier: 'premium',
259
- defaults: {
260
- role: 'Manages knowledge capture, curation, and cross-project pattern extraction for organizational learning',
261
- description: 'This agent manages the full knowledge lifecycle: capturing patterns at the moment of discovery, curating vault entries for quality and consistency, extracting cross-project patterns, maintaining domain vocabulary, and ensuring knowledge is searchable and actionable.',
262
- domains: ['documentation', 'architecture', 'code-review', 'knowledge-management'],
263
- principles: [
264
- 'Knowledge-gather before execute, always',
265
- 'Vault is the single source of truth',
266
- 'Capture lessons at the moment of discovery',
267
- 'Cross-project patterns beat project-local fixes',
268
- 'Domain vocabulary must be explicit and extensible',
269
- ],
270
- skills: ['vault-navigator', 'vault-capture', 'knowledge-harvest', 'brain-debrief'],
271
- tone: 'precise',
272
- greetingTemplate: (name) => `Hello! I'm ${name}. I manage knowledge — capturing patterns, curating quality, and extracting insights across projects. What knowledge needs attention?`,
273
- },
274
- },
275
- {
276
- value: 'architecture-sentinel',
277
- label: 'Architecture Sentinel',
278
- hint: 'Governance gates, protocol enforcement, reversible migrations, graceful degradation',
279
- tier: 'premium',
280
- defaults: {
281
- role: 'Enforces architectural governance with checkpoint gates, protocol enforcement, and data-driven decision making',
282
- description: 'This agent guards architectural integrity through two-gate approval (plan then execute), checkpoint-based protocol enforcement, data-driven architecture decisions, reversible migration strategies, and graceful degradation patterns. It ensures systems fail closed and degrade gracefully.',
283
- domains: ['architecture', 'security', 'code-review', 'testing', 'governance'],
284
- principles: [
285
- 'Two-gate approval: plan then execute, never skip',
286
- 'Protocol enforcement via checkpoint gates',
287
- 'Data-driven architecture: logic in config, not code',
288
- 'Every migration must be reversible',
289
- 'Fail closed, not open',
290
- 'Graceful degradation over hard failures',
291
- ],
292
- skills: ['code-patrol', 'vault-navigator', 'second-opinion', 'knowledge-harvest'],
293
- tone: 'precise',
294
- greetingTemplate: (name) => `Hello! I'm ${name}. I enforce architectural governance — approval gates, protocol checkpoints, reversible migrations, and graceful degradation. What needs review?`,
295
- },
296
- },
297
- ];
298
- //# sourceMappingURL=archetypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archetypes.js","sourceRoot":"","sources":["../../src/promp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K,EAAE,mBAAmB;QAC1B,IAAI,EAAE,oFAAoF;QAC1F,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE;YACR,IAAI,EAAE,uGAAuG;YAC7G,WAAW,EACT,4QAA4Q;YAC9Q,OAAO,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,sBAAsB,CAAC;YACjF,UAAU,EAAE;gBACV,yCAAyC;gBACzC,qCAAqC;gBACrC,4CAA4C;gBAC5C,iDAAiD;gBACjD,mDAAmD;aACpD;YACD,MAAM,EAAE,CAAC,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC;YAClF,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CACzB,cAAc,IAAI,uIAAuI;SAC5J;KACF;IACD;QACE,KAAK,EAAE,uBAAuB;QAC9B,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,qFAAqF;QAC3F,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE;YACR,IAAI,EAAE,gHAAgH;YACtH,WAAW,EACT,gSAAgS;YAClS,OAAO,EAAE,CAAC,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC;YAC7E,UAAU,EAAE;gBACV,kDAAkD;gBAClD,2CAA2C;gBAC3C,qDAAqD;gBACrD,oCAAoC;gBACpC,uBAAuB;gBACvB,yCAAyC;aAC1C;YACD,MAAM,EAAE,CAAC,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB,CAAC;YACjF,IAAI,EAAE,SAAS;YACf,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CACzB,cAAc,IAAI,kJAAkJ;SACvK;KACF;CACF,CAAC"}
@@ -1,64 +0,0 @@
1
- /**
2
- * Playbook data for the guided wizard.
3
- * Provides curated options with self-explanatory hints,
4
- * organized by category. Each list also supports a "custom" escape hatch
5
- * with examples and anti-examples so the user is never staring at a blank cursor.
6
- */
7
- interface DomainOption {
8
- value: string;
9
- label: string;
10
- hint: string;
11
- }
12
- export declare const DOMAIN_OPTIONS: DomainOption[];
13
- export declare const CUSTOM_DOMAIN_GUIDANCE: {
14
- instruction: string;
15
- examples: string[];
16
- antiExamples: string[];
17
- };
18
- interface PrincipleCategory {
19
- label: string;
20
- options: PrincipleOption[];
21
- }
22
- interface PrincipleOption {
23
- value: string;
24
- label: string;
25
- }
26
- export declare const PRINCIPLE_CATEGORIES: PrincipleCategory[];
27
- export declare const CUSTOM_PRINCIPLE_GUIDANCE: {
28
- instruction: string;
29
- examples: string[];
30
- antiExamples: string[];
31
- };
32
- /** Core skills — always included, never shown in picker. */
33
- export declare const CORE_SKILLS: readonly ["brainstorming", "systematic-debugging", "verification-before-completion", "health-check", "context-resume", "writing-plans", "executing-plans"];
34
- interface SkillCategory {
35
- label: string;
36
- options: SkillOption[];
37
- }
38
- interface SkillOption {
39
- value: string;
40
- label: string;
41
- hint: string;
42
- }
43
- export declare const SKILL_CATEGORIES: SkillCategory[];
44
- /** Flat list of all optional skill values. */
45
- export declare const ALL_OPTIONAL_SKILLS: string[];
46
- interface ToneOption {
47
- value: 'precise' | 'mentor' | 'pragmatic';
48
- label: string;
49
- hint: string;
50
- }
51
- export declare const TONE_OPTIONS: ToneOption[];
52
- export declare const CUSTOM_ROLE_GUIDANCE: {
53
- instruction: string;
54
- examples: string[];
55
- };
56
- export declare const CUSTOM_DESCRIPTION_GUIDANCE: {
57
- instruction: string;
58
- examples: string[];
59
- };
60
- export declare const CUSTOM_GREETING_GUIDANCE: {
61
- instruction: string;
62
- examples: string[];
63
- };
64
- export {};