@soleri/forge 9.3.0 → 9.4.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/dist/compose-claude-md.js +118 -7
- package/dist/compose-claude-md.js.map +1 -1
- package/dist/scaffolder.js +39 -1
- package/dist/scaffolder.js.map +1 -1
- package/dist/skills/agent-dev/SKILL.md +122 -0
- package/dist/skills/agent-guide/SKILL.md +116 -0
- package/dist/skills/agent-issues/SKILL.md +268 -0
- package/dist/skills/agent-persona/SKILL.md +66 -0
- package/dist/skills/deep-review/SKILL.md +12 -0
- package/dist/skills/deliver-and-ship/SKILL.md +123 -0
- package/dist/skills/discovery-phase/SKILL.md +69 -0
- package/dist/skills/env-setup/SKILL.md +151 -0
- package/dist/skills/executing-plans/SKILL.md +12 -0
- package/dist/skills/finishing-a-development-branch/SKILL.md +76 -0
- package/dist/skills/fix-and-learn/SKILL.md +12 -0
- package/dist/skills/mcp-doctor/SKILL.md +154 -0
- package/dist/skills/subagent-driven-development/SKILL.md +77 -0
- package/dist/skills/using-git-worktrees/SKILL.md +80 -0
- package/dist/skills/vault-curate/SKILL.md +99 -0
- package/dist/skills/verification-before-completion/SKILL.md +12 -0
- package/dist/skills/yolo-mode/SKILL.md +80 -0
- package/dist/templates/clean-worktrees.d.ts +5 -0
- package/dist/templates/clean-worktrees.js +59 -0
- package/dist/templates/clean-worktrees.js.map +1 -0
- package/dist/templates/setup-script.js +26 -1
- package/dist/templates/setup-script.js.map +1 -1
- package/dist/templates/shared-rules.js +221 -11
- package/dist/templates/shared-rules.js.map +1 -1
- package/dist/templates/skills.js +3 -29
- package/dist/templates/skills.js.map +1 -1
- package/dist/templates/vitest-config.js +1 -0
- package/dist/templates/vitest-config.js.map +1 -1
- package/package.json +1 -1
- package/src/compose-claude-md.ts +126 -9
- package/src/scaffolder.ts +41 -1
- package/src/skills/agent-dev/SKILL.md +122 -0
- package/src/skills/agent-guide/SKILL.md +116 -0
- package/src/skills/agent-issues/SKILL.md +268 -0
- package/src/skills/agent-persona/SKILL.md +66 -0
- package/src/skills/deep-review/SKILL.md +12 -0
- package/src/skills/deliver-and-ship/SKILL.md +123 -0
- package/src/skills/discovery-phase/SKILL.md +69 -0
- package/src/skills/env-setup/SKILL.md +151 -0
- package/src/skills/executing-plans/SKILL.md +12 -0
- package/src/skills/finishing-a-development-branch/SKILL.md +76 -0
- package/src/skills/fix-and-learn/SKILL.md +12 -0
- package/src/skills/mcp-doctor/SKILL.md +154 -0
- package/src/skills/subagent-driven-development/SKILL.md +77 -0
- package/src/skills/using-git-worktrees/SKILL.md +80 -0
- package/src/skills/vault-curate/SKILL.md +99 -0
- package/src/skills/verification-before-completion/SKILL.md +12 -0
- package/src/skills/yolo-mode/SKILL.md +80 -0
- package/src/templates/clean-worktrees.ts +58 -0
- package/src/templates/setup-script.ts +26 -1
- package/src/templates/shared-rules.ts +224 -11
- package/src/templates/skills.ts +3 -29
- package/src/templates/vitest-config.ts +1 -0
- package/vitest.config.ts +1 -0
|
@@ -53,11 +53,18 @@ if [ ! -f "$SETTINGS_FILE" ]; then
|
|
|
53
53
|
"type": "prompt",
|
|
54
54
|
"prompt": "Before context is compacted, capture a session summary by calling ${config.id}_core op:session_capture with a brief summary of what was accomplished, the topics covered, files modified, and tools used."
|
|
55
55
|
}
|
|
56
|
+
],
|
|
57
|
+
"SessionStart": [
|
|
58
|
+
{
|
|
59
|
+
"type": "command",
|
|
60
|
+
"command": "sh $AGENT_DIR/scripts/clean-worktrees.sh",
|
|
61
|
+
"timeout": 10
|
|
62
|
+
}
|
|
56
63
|
]
|
|
57
64
|
}
|
|
58
65
|
}
|
|
59
66
|
SETTINGS
|
|
60
|
-
echo "[ok] Created $SETTINGS_FILE with PreCompact
|
|
67
|
+
echo "[ok] Created $SETTINGS_FILE with PreCompact + SessionStart hooks"
|
|
61
68
|
else
|
|
62
69
|
if grep -q "PreCompact" "$SETTINGS_FILE" 2>/dev/null; then
|
|
63
70
|
echo "[ok] PreCompact hook already configured — skipping"
|
|
@@ -75,6 +82,24 @@ else
|
|
|
75
82
|
"
|
|
76
83
|
echo "[ok] Added PreCompact hook to $SETTINGS_FILE"
|
|
77
84
|
fi
|
|
85
|
+
# Add SessionStart worktree cleanup hook
|
|
86
|
+
if grep -q "clean-worktrees" "$SETTINGS_FILE" 2>/dev/null; then
|
|
87
|
+
echo "[ok] SessionStart worktree cleanup hook already configured"
|
|
88
|
+
else
|
|
89
|
+
node -e "
|
|
90
|
+
const fs = require('fs');
|
|
91
|
+
const settings = JSON.parse(fs.readFileSync('$SETTINGS_FILE', 'utf-8'));
|
|
92
|
+
if (!settings.hooks) settings.hooks = {};
|
|
93
|
+
if (!settings.hooks.SessionStart) settings.hooks.SessionStart = [];
|
|
94
|
+
settings.hooks.SessionStart.push({
|
|
95
|
+
type: 'command',
|
|
96
|
+
command: 'sh $AGENT_DIR/scripts/clean-worktrees.sh',
|
|
97
|
+
timeout: 10
|
|
98
|
+
});
|
|
99
|
+
fs.writeFileSync('$SETTINGS_FILE', JSON.stringify(settings, null, 2) + '\\n');
|
|
100
|
+
"
|
|
101
|
+
echo "[ok] Added SessionStart worktree cleanup hook"
|
|
102
|
+
fi
|
|
78
103
|
fi
|
|
79
104
|
|
|
80
105
|
# Install skills to ~/.claude/commands/
|
|
@@ -114,13 +114,25 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
114
114
|
'- Persist lessons: capture + link. An unlinked entry is incomplete.',
|
|
115
115
|
'- Exceptions: runtime errors with stack traces → codebase first; user explicitly asks to search web.',
|
|
116
116
|
'',
|
|
117
|
+
'### Vault Search Strategy',
|
|
118
|
+
'',
|
|
119
|
+
"Default to **two-pass search** — scan first, load only what's relevant. This saves tokens and keeps context lean.",
|
|
120
|
+
'',
|
|
121
|
+
'| Situation | Strategy |',
|
|
122
|
+
'|-----------|----------|',
|
|
123
|
+
'| Broad/exploratory query | `mode: "scan"` → triage by score → `op:load_entries` for top matches |',
|
|
124
|
+
'| Specific known entry | `mode: "full"` directly |',
|
|
125
|
+
'| Work task (need vault context before coding) | Scan → pick relevant → load |',
|
|
126
|
+
'| Existence check ("do we have X?") | `mode: "scan"` only, no load needed |',
|
|
127
|
+
'',
|
|
128
|
+
'**Never load all scan results.** Pick the top 2-4 by relevance score and skip entries below 0.30 unless the query is very specific.',
|
|
129
|
+
'',
|
|
117
130
|
|
|
118
131
|
// ─── Planning ────────────────────────────────────────────
|
|
119
132
|
'## Planning',
|
|
120
133
|
'<!-- soleri:planning -->',
|
|
121
134
|
'',
|
|
122
|
-
'-
|
|
123
|
-
'- Use `op:create_plan` before writing ANY code. Show the plan, wait for approval.',
|
|
135
|
+
'- For complex tasks, use `op:create_plan` before writing code. Simple tasks can execute directly — but always run `op:orchestrate_complete`.',
|
|
124
136
|
'- Two-gate approval: Gate 1 (`op:approve_plan`), Gate 2 (`op:plan_split`). Never skip either.',
|
|
125
137
|
'- Wait for explicit "yes" / "approve" before proceeding past each gate.',
|
|
126
138
|
'- After execution: `op:plan_reconcile` (drift report) then `op:plan_complete_lifecycle` (knowledge capture, archive).',
|
|
@@ -128,6 +140,26 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
128
140
|
'- On session start: check for plans in `executing`/`reconciling` state and remind.',
|
|
129
141
|
'- Exceptions: read-only operations, user says "just do it", single-line fixes.',
|
|
130
142
|
'',
|
|
143
|
+
'### Task Auto-Assessment',
|
|
144
|
+
'',
|
|
145
|
+
'When picking up a work task (including GH issues decomposed from a parent plan), autonomously assess complexity — do NOT ask the user whether to create a plan.',
|
|
146
|
+
'',
|
|
147
|
+
'| Signal | Classification | Action |',
|
|
148
|
+
'|--------|---------------|--------|',
|
|
149
|
+
'| Single file, clear acceptance criteria | **Simple** | Execute directly |',
|
|
150
|
+
'| Approach already described in parent plan | **Simple** | Execute directly |',
|
|
151
|
+
'| Touches 3+ files or has cross-cutting concerns | **Complex** | Create scoped plan |',
|
|
152
|
+
'| Unresolved design decisions not in parent plan | **Complex** | Create scoped plan |',
|
|
153
|
+
'| New dependencies or architectural choices needed | **Complex** | Create scoped plan |',
|
|
154
|
+
'',
|
|
155
|
+
'**Simple task flow:** Vault search (quick) → execute → `op:orchestrate_complete` (captures knowledge).',
|
|
156
|
+
'',
|
|
157
|
+
'**Complex task flow:** Vault search → create lightweight scoped plan → two-gate approval → execute → reconcile → complete.',
|
|
158
|
+
'',
|
|
159
|
+
'**Key rule:** Knowledge gets captured either way via `op:orchestrate_complete`. Planning ceremony is for *decision-making*, not record-keeping.',
|
|
160
|
+
'',
|
|
161
|
+
'**Anti-pattern:** Creating a full graded plan for trivial tasks (add a CSS class, rename a variable, single-line fix).',
|
|
162
|
+
'',
|
|
131
163
|
'### Grade Gate',
|
|
132
164
|
'',
|
|
133
165
|
'**MANDATORY**: Plans must grade **A or higher** before approval. The engine enforces this programmatically.',
|
|
@@ -191,6 +223,38 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
191
223
|
'```',
|
|
192
224
|
'',
|
|
193
225
|
|
|
226
|
+
// ─── YOLO Mode ──────────────────────────────────────────
|
|
227
|
+
'## YOLO Mode',
|
|
228
|
+
'<!-- soleri:yolo-mode -->',
|
|
229
|
+
'',
|
|
230
|
+
'YOLO mode skips plan approval gates for faster execution. The agent executes tasks directly without waiting for Gate 1 (`op:approve_plan`) or Gate 2 (`op:plan_split`) confirmation.',
|
|
231
|
+
'',
|
|
232
|
+
'### What Changes',
|
|
233
|
+
'',
|
|
234
|
+
'- Plan approval gates are **auto-approved** — no user confirmation needed.',
|
|
235
|
+
'- Task routing skips the two-gate ceremony — plans are created, approved, and split in one pass.',
|
|
236
|
+
'',
|
|
237
|
+
'### What Does NOT Change',
|
|
238
|
+
'',
|
|
239
|
+
'- `op:orchestrate_complete` **always runs** — knowledge capture is never skipped.',
|
|
240
|
+
'- Vault search **always runs** — decisions must be informed by existing patterns.',
|
|
241
|
+
'- Brain feedback loop remains active.',
|
|
242
|
+
'- Grade gate still applies — plans must grade A or higher.',
|
|
243
|
+
'',
|
|
244
|
+
'### Prerequisites',
|
|
245
|
+
'',
|
|
246
|
+
'- **YOLO Safety Hook Pack** must be installed: `soleri hooks add-pack yolo-safety`',
|
|
247
|
+
'- The hook pack intercepts destructive commands (force push, reset --hard, drop table) and requires explicit confirmation.',
|
|
248
|
+
'- Staging backups are created before destructive operations.',
|
|
249
|
+
'',
|
|
250
|
+
'### Activation & Deactivation',
|
|
251
|
+
'',
|
|
252
|
+
'| Action | Method |',
|
|
253
|
+
'|--------|--------|',
|
|
254
|
+
'| Activate | `soleri yolo` or `op:morph params:{ mode: "YOLO-MODE" }` |',
|
|
255
|
+
'| Deactivate | "exit YOLO", session end, or `op:activate params:{ deactivate: true }` |',
|
|
256
|
+
'',
|
|
257
|
+
|
|
194
258
|
// ─── Output Formatting ───────────────────────────────────
|
|
195
259
|
'## Output Formatting',
|
|
196
260
|
'<!-- soleri:output-formatting -->',
|
|
@@ -256,12 +320,40 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
256
320
|
'## Work Task Routing',
|
|
257
321
|
'<!-- soleri:task-routing -->',
|
|
258
322
|
'',
|
|
259
|
-
'
|
|
260
|
-
'
|
|
261
|
-
'-
|
|
262
|
-
'
|
|
323
|
+
'On every work task, assess complexity then route:',
|
|
324
|
+
'',
|
|
325
|
+
'### Auto-Assessment',
|
|
326
|
+
'',
|
|
327
|
+
'Evaluate these signals before deciding the execution path:',
|
|
328
|
+
'',
|
|
329
|
+
'| Signal | Simple (< 40) | Complex (≥ 40) |',
|
|
330
|
+
'|--------|---------------|----------------|',
|
|
331
|
+
'| Files touched | 1-2 | 3+ |',
|
|
332
|
+
'| Cross-cutting concerns | No | Yes |',
|
|
333
|
+
'| New dependencies | None | Yes |',
|
|
334
|
+
'| Design decisions | Already decided | Unresolved |',
|
|
335
|
+
'| Approach described | In parent plan/issue | Not yet |',
|
|
336
|
+
'',
|
|
337
|
+
'### Routing',
|
|
338
|
+
'',
|
|
339
|
+
'- **Simple tasks** → execute directly → `op:orchestrate_complete` (always)',
|
|
340
|
+
'- **Complex tasks** → `op:orchestrate_plan` → approve → execute → `op:orchestrate_complete` (always)',
|
|
341
|
+
'',
|
|
342
|
+
'### The Non-Negotiable Rule',
|
|
343
|
+
'',
|
|
344
|
+
'`op:orchestrate_complete` runs for EVERY task — simple or complex. This captures:',
|
|
345
|
+
'- Knowledge to vault (patterns learned, decisions made)',
|
|
346
|
+
'- Session summary (what was done, files changed)',
|
|
347
|
+
"- Brain feedback (what worked, what didn't)",
|
|
348
|
+
'',
|
|
349
|
+
'Without completion, the knowledge trail is lost. The code is in git, but the WHY disappears.',
|
|
350
|
+
'',
|
|
351
|
+
'### Exceptions (skip assessment, execute directly)',
|
|
263
352
|
'',
|
|
264
|
-
'
|
|
353
|
+
'- Read-only operations (search, status, health check)',
|
|
354
|
+
'- User explicitly says "just do it"',
|
|
355
|
+
'- Single-line fixes (typo, rename, one-liner)',
|
|
356
|
+
'- Questions and explanations',
|
|
265
357
|
'',
|
|
266
358
|
|
|
267
359
|
// ─── Intent Detection ────────────────────────────────────
|
|
@@ -303,6 +395,36 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
303
395
|
'- Brain tells you **which** patterns matter (names + strength scores). Vault tells you **what** they are (rules, examples).',
|
|
304
396
|
"- Pull only what's relevant to the current task — don't load everything at session start.",
|
|
305
397
|
'',
|
|
398
|
+
'### Second Brain Features',
|
|
399
|
+
'',
|
|
400
|
+
'| Feature | How to use |',
|
|
401
|
+
'|---------|-----------|',
|
|
402
|
+
'| **Two-pass search** | `op:search_intelligent` with `mode: "scan"` for lightweight results, then `op:load_entries` for full content. See **Vault Search Strategy**. |',
|
|
403
|
+
'| **Session briefing** | `op:session_briefing` on session start — surfaces last session, active plans, recent captures, brain recommendations |',
|
|
404
|
+
'| **Evidence reconciliation** | `op:plan_reconcile_with_evidence` — cross-references plan tasks against git diff |',
|
|
405
|
+
'| **Learning radar** | `op:radar_analyze` to detect patterns from corrections, search misses, workarounds. `op:radar_candidates` to review, `op:radar_approve`/`op:radar_dismiss` |',
|
|
406
|
+
'| **External ingestion** | `op:ingest_url` for articles, `op:ingest_text` for transcripts/notes, `op:ingest_batch` for multiple items |',
|
|
407
|
+
'| **Content synthesis** | `op:synthesize` — turn vault knowledge into briefs, outlines, talking points, or post drafts |',
|
|
408
|
+
'| **Skill chains** | `op:chain_execute` — multi-step workflows with data flow between steps and approval gates |',
|
|
409
|
+
'',
|
|
410
|
+
'### Brain Feedback Loop',
|
|
411
|
+
'',
|
|
412
|
+
'After using a vault search result to inform a decision, action, or response, call `op:record_feedback` with:',
|
|
413
|
+
'- `query`: the original search query',
|
|
414
|
+
'- `entryId`: the vault entry ID that was used',
|
|
415
|
+
'- `action`: "accepted" (result was useful) or "rejected" (result was irrelevant/wrong)',
|
|
416
|
+
'- `confidence`: 0.0–1.0 how relevant the result was to the task',
|
|
417
|
+
'',
|
|
418
|
+
'Do this for:',
|
|
419
|
+
'- `search_intelligent` results that influence your next action',
|
|
420
|
+
'- `orchestrate_plan` vault recommendations you follow',
|
|
421
|
+
'- Vault entries you cite or reference in responses',
|
|
422
|
+
'',
|
|
423
|
+
'Do NOT record feedback for:',
|
|
424
|
+
'- Existence checks ("do we have X?" — just scanning, not using)',
|
|
425
|
+
"- Results you browse but don't act on",
|
|
426
|
+
'- Duplicate feedback for the same entry in the same task',
|
|
427
|
+
'',
|
|
306
428
|
|
|
307
429
|
// ─── Cross-Project Memory ────────────────────────────────
|
|
308
430
|
'## Cross-Project Memory',
|
|
@@ -342,15 +464,72 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
342
464
|
'**Do NOT suggest tools when:** the user is having a conversation (not a task), already declined, or explicitly says "just tell me".',
|
|
343
465
|
'',
|
|
344
466
|
|
|
467
|
+
// ─── Overlay Mode ─────────────────────────────────────────
|
|
468
|
+
'## Overlay Mode — Active Agent Protocol',
|
|
469
|
+
'<!-- soleri:overlay-mode -->',
|
|
470
|
+
'',
|
|
471
|
+
'When you are activated as an agent (via greeting or activation command), you ARE this agent — not Claude with tools on the side. You drive the full cycle through your toolset.',
|
|
472
|
+
'',
|
|
473
|
+
'### Tool-First Routing (MANDATORY when active)',
|
|
474
|
+
'',
|
|
475
|
+
'On every user request:',
|
|
476
|
+
'1. **Discover capabilities** — call `op:admin_tool_list` on first request of the session (or after context compaction resets your state)',
|
|
477
|
+
'2. **Parse intent** — what does the user want? Use semantic-first analysis.',
|
|
478
|
+
'3. **Route through agent tools** — always prefer your MCP tools over raw Claude reasoning:',
|
|
479
|
+
' - **Knowledge questions** → vault search before answering from training data',
|
|
480
|
+
' - **Recommendations** → brain recommend before proposing approaches',
|
|
481
|
+
' - **Work tasks** → orchestrate plan before writing code',
|
|
482
|
+
' - **Quality checks** → curator or admin health before manual inspection',
|
|
483
|
+
' - **Learning moments** → capture to vault, don\'t just say "I\'ll remember"',
|
|
484
|
+
'4. **Fall back only when no tool fits** — file read/write/edit, git operations, shell commands, casual conversation',
|
|
485
|
+
'',
|
|
486
|
+
'### Self-Healing Discovery',
|
|
487
|
+
'',
|
|
488
|
+
'- After activation or context compaction, call `op:admin_tool_list` to refresh your capability inventory',
|
|
489
|
+
'- Do NOT rely on memorized tool lists from earlier in the conversation',
|
|
490
|
+
'- The tool list adapts when packs are installed — always discover dynamically',
|
|
491
|
+
'',
|
|
492
|
+
'### Character Persistence',
|
|
493
|
+
'',
|
|
494
|
+
'- **MANDATORY**: Prefix every response with `{AgentName} >` when activated (e.g., `Ernesto >`, `Salvador >`). This signals to the user that the agent persona is active.',
|
|
495
|
+
"- All communication flows through your persona's voice — tone, vocabulary, opinions",
|
|
496
|
+
'- Stay in character until explicitly deactivated',
|
|
497
|
+
'- Context compaction does not change who you are — these rules persist in CLAUDE.md',
|
|
498
|
+
'- If you notice yourself dropping character, re-read your activation context',
|
|
499
|
+
'',
|
|
500
|
+
'### Operator Learning (automatic, silent)',
|
|
501
|
+
'When calling `op:orchestrate_complete`, fill the `operatorSignals` field with your observations from this session:',
|
|
502
|
+
'',
|
|
503
|
+
'- **Expertise**: which topics did the operator demonstrate knowledge in? Where did they need explanation? Report topic + level (learning/intermediate/expert).',
|
|
504
|
+
"- **Corrections**: did they tell you to change behavior? Quote their exact words. Note if it's global or project-specific.",
|
|
505
|
+
'- **Interests**: did they share anything personal? Hobbies, background, music, culture? Report the tag and context.',
|
|
506
|
+
'- **Patterns**: did you notice work habits? Batching, scoping, pacing, communication style? Report what you observed.',
|
|
507
|
+
'',
|
|
508
|
+
'Rules:',
|
|
509
|
+
"- Fill what you observed. Empty arrays for what you didn't notice.",
|
|
510
|
+
'- Store facts, not assumptions. "User asked about React hooks" not "User doesn\'t know React."',
|
|
511
|
+
'- Never announce you are learning. Never ask for confirmation.',
|
|
512
|
+
'- Decline to store: health, medical, political, religious, sexual, financial, legal content.',
|
|
513
|
+
'- The engine handles compounding and persistence — just report honestly.',
|
|
514
|
+
'',
|
|
515
|
+
'### What NOT to Route Through Tools',
|
|
516
|
+
'',
|
|
517
|
+
'- Pure file read/write/edit operations (use Read, Edit, Write tools directly)',
|
|
518
|
+
'- Git operations (commit, push, branch, status)',
|
|
519
|
+
'- Shell commands the user explicitly requests',
|
|
520
|
+
'- Casual conversation, greetings, explanations',
|
|
521
|
+
'- One-line fixes where planning overhead exceeds the work',
|
|
522
|
+
'',
|
|
523
|
+
|
|
345
524
|
// ─── Session Lifecycle ───────────────────────────────────
|
|
346
525
|
'## Session Lifecycle',
|
|
347
526
|
'<!-- soleri:session -->',
|
|
348
527
|
'',
|
|
349
528
|
'### Session Start Protocol',
|
|
350
529
|
'',
|
|
351
|
-
'
|
|
352
|
-
'Call `op:
|
|
353
|
-
'
|
|
530
|
+
'On activation, discover capabilities via `op:admin_tool_list`. Call `op:session_briefing` to surface last session context, active plans, and brain recommendations.',
|
|
531
|
+
'Call `op:register` when project context is needed for a task. Call `op:activate` only when checking evolved capabilities or recovering session state.',
|
|
532
|
+
'After context compaction, re-discover capabilities — do not assume your tool inventory is still cached.',
|
|
354
533
|
'',
|
|
355
534
|
'### Context Compaction',
|
|
356
535
|
'',
|
|
@@ -428,6 +607,39 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
428
607
|
'| Template drift suspected | `soleri agent diff` to see what changed |',
|
|
429
608
|
'',
|
|
430
609
|
|
|
610
|
+
// ─── Persona Self-Update ────────────────────────────────────
|
|
611
|
+
'## Persona Self-Update',
|
|
612
|
+
'<!-- soleri:persona-self-update -->',
|
|
613
|
+
'',
|
|
614
|
+
'When the user asks to change your personality, voice, quirks, or character:',
|
|
615
|
+
'',
|
|
616
|
+
'1. **Edit your own `agent.yaml`** — the `persona:` block is the source of truth for your character.',
|
|
617
|
+
'2. **NEVER modify Soleri engine code** — `@soleri/core`, `packages/core/src/persona/defaults.ts`, or any engine package. Those define the default template for ALL agents.',
|
|
618
|
+
'3. After editing `agent.yaml`, tell the user to run `soleri agent refresh` to regenerate CLAUDE.md, then reactivate.',
|
|
619
|
+
'',
|
|
620
|
+
'### What You Can Change',
|
|
621
|
+
'',
|
|
622
|
+
'| Field | Purpose |',
|
|
623
|
+
'|-------|---------|',
|
|
624
|
+
'| `persona.template` | Template ID (informational, can be custom) |',
|
|
625
|
+
'| `persona.inspiration` | Who/what inspires the character |',
|
|
626
|
+
'| `persona.culture` | Cultural background |',
|
|
627
|
+
'| `persona.voice` | How you sound (tone, cadence, vocabulary) |',
|
|
628
|
+
'| `persona.traits` | Personality traits |',
|
|
629
|
+
'| `persona.quirks` | Memorable behaviors and expressions |',
|
|
630
|
+
'| `persona.opinions` | Beliefs about craft and quality |',
|
|
631
|
+
'| `persona.metaphors` | Domains you draw metaphors from |',
|
|
632
|
+
'| `persona.languageRule` | How you mix languages |',
|
|
633
|
+
'| `persona.greetings` | Session start messages |',
|
|
634
|
+
'| `persona.signoffs` | Session end messages |',
|
|
635
|
+
'',
|
|
636
|
+
'### What You Must NOT Change',
|
|
637
|
+
'',
|
|
638
|
+
'- Engine defaults in `packages/core/src/persona/defaults.ts`',
|
|
639
|
+
'- The `PERSONA_TEMPLATES` registry',
|
|
640
|
+
'- Any file inside `@soleri/core` or `@soleri/forge`',
|
|
641
|
+
'',
|
|
642
|
+
|
|
431
643
|
// ─── Verification Protocol ─────────────────────────────────
|
|
432
644
|
'## Verification Protocol',
|
|
433
645
|
'<!-- soleri:verification-protocol -->',
|
|
@@ -440,11 +652,12 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
440
652
|
'2. **Prove** — reproduce the issue (test case, error log, stack trace)',
|
|
441
653
|
'3. **Fix** — only after the issue is proven reproducible',
|
|
442
654
|
'',
|
|
443
|
-
'### Anti-
|
|
655
|
+
'### Anti-patterns',
|
|
444
656
|
'',
|
|
445
657
|
'- Fixing code "just in case" or for aesthetics without a proven issue',
|
|
446
658
|
'- Claiming a bug exists without reproduction evidence',
|
|
447
659
|
'- Refactoring working code under the guise of a bug fix',
|
|
660
|
+
'- **Dismissing test failures as "flaky" or "pre-existing" without reading the test code and the handler it exercises.** A test that fails consistently is broken, not flaky. Investigate the root cause before classifying.',
|
|
448
661
|
'',
|
|
449
662
|
'### Scope',
|
|
450
663
|
'',
|
package/src/templates/skills.ts
CHANGED
|
@@ -6,34 +6,8 @@ import type { AgentConfig } from '../types.js';
|
|
|
6
6
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
7
|
const SKILLS_DIR = join(__dirname, '..', 'skills');
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
const
|
|
11
|
-
'agent-dev',
|
|
12
|
-
'agent-guide',
|
|
13
|
-
'agent-persona',
|
|
14
|
-
'brain-debrief',
|
|
15
|
-
'brainstorming',
|
|
16
|
-
'code-patrol',
|
|
17
|
-
'context-resume',
|
|
18
|
-
'deep-review',
|
|
19
|
-
'deliver-and-ship',
|
|
20
|
-
'executing-plans',
|
|
21
|
-
'fix-and-learn',
|
|
22
|
-
'health-check',
|
|
23
|
-
'knowledge-harvest',
|
|
24
|
-
'onboard-me',
|
|
25
|
-
'parallel-execute',
|
|
26
|
-
'retrospective',
|
|
27
|
-
'second-opinion',
|
|
28
|
-
'systematic-debugging',
|
|
29
|
-
'test-driven-development',
|
|
30
|
-
'vault-capture',
|
|
31
|
-
'vault-curate',
|
|
32
|
-
'vault-navigator',
|
|
33
|
-
'vault-smells',
|
|
34
|
-
'verification-before-completion',
|
|
35
|
-
'writing-plans',
|
|
36
|
-
]);
|
|
9
|
+
/** Placeholder token in skill templates that gets replaced with agent-specific tool name. */
|
|
10
|
+
const AGENT_PLACEHOLDER = 'YOUR_AGENT_core';
|
|
37
11
|
|
|
38
12
|
/**
|
|
39
13
|
* Generate skill files for the scaffolded agent.
|
|
@@ -85,7 +59,7 @@ export function generateSkills(config: AgentConfig): Array<[string, string]> {
|
|
|
85
59
|
|
|
86
60
|
let content = readFileSync(contentPath, 'utf-8');
|
|
87
61
|
|
|
88
|
-
if (
|
|
62
|
+
if (content.includes(AGENT_PLACEHOLDER)) {
|
|
89
63
|
content = content.replace(/YOUR_AGENT_core/g, `${config.id}_core`);
|
|
90
64
|
}
|
|
91
65
|
|