@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
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a POSIX sh script that cleans up stale Claude Code worktrees.
|
|
3
|
+
* Registered as a SessionStart hook in scaffolded agents.
|
|
4
|
+
*/
|
|
5
|
+
export function generateCleanWorktreesScript() {
|
|
6
|
+
return `#!/bin/sh
|
|
7
|
+
# Clean stale Claude Code worktrees on session start.
|
|
8
|
+
# Registered as a SessionStart hook by Soleri scaffolding.
|
|
9
|
+
# Safe: skips active worktrees, checks for unpushed commits.
|
|
10
|
+
|
|
11
|
+
WORKTREE_DIR=".claude/worktrees"
|
|
12
|
+
|
|
13
|
+
# Exit silently if no worktrees directory
|
|
14
|
+
[ -d "$WORKTREE_DIR" ] || exit 0
|
|
15
|
+
|
|
16
|
+
# Prune worktrees whose branches have been deleted
|
|
17
|
+
git worktree prune 2>/dev/null
|
|
18
|
+
|
|
19
|
+
# Get list of active worktrees (skip the main one)
|
|
20
|
+
active_worktrees="$(git worktree list --porcelain 2>/dev/null | grep '^worktree ' | sed 's/^worktree //')"
|
|
21
|
+
|
|
22
|
+
cleaned=0
|
|
23
|
+
skipped=0
|
|
24
|
+
|
|
25
|
+
for dir in "$WORKTREE_DIR"/*/; do
|
|
26
|
+
[ -d "$dir" ] || continue
|
|
27
|
+
|
|
28
|
+
# Resolve to absolute path for comparison
|
|
29
|
+
abs_dir="$(cd "$dir" 2>/dev/null && pwd)" || continue
|
|
30
|
+
|
|
31
|
+
# Skip if still in git worktree list (active)
|
|
32
|
+
if echo "$active_worktrees" | grep -qF "$abs_dir"; then
|
|
33
|
+
skipped=$((skipped + 1))
|
|
34
|
+
continue
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
# Safety: check for unpushed commits before removing
|
|
38
|
+
branch="$(git -C "$dir" rev-parse --abbrev-ref HEAD 2>/dev/null)" || branch=""
|
|
39
|
+
if [ -n "$branch" ] && [ "$branch" != "HEAD" ]; then
|
|
40
|
+
upstream="$(git -C "$dir" rev-parse --abbrev-ref "@{upstream}" 2>/dev/null)" || upstream=""
|
|
41
|
+
if [ -n "$upstream" ]; then
|
|
42
|
+
unpushed="$(git -C "$dir" log "$upstream..$branch" --oneline 2>/dev/null)"
|
|
43
|
+
if [ -n "$unpushed" ]; then
|
|
44
|
+
skipped=$((skipped + 1))
|
|
45
|
+
continue
|
|
46
|
+
fi
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
rm -rf "$dir" 2>/dev/null && cleaned=$((cleaned + 1))
|
|
51
|
+
done
|
|
52
|
+
|
|
53
|
+
# Silent unless something was cleaned
|
|
54
|
+
if [ "$cleaned" -gt 0 ]; then
|
|
55
|
+
echo "Cleaned $cleaned stale worktree(s), $skipped active/protected"
|
|
56
|
+
fi
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=clean-worktrees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clean-worktrees.js","sourceRoot":"","sources":["../../src/templates/clean-worktrees.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,4BAA4B;IAC1C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDR,CAAC;AACF,CAAC"}
|
|
@@ -50,11 +50,18 @@ if [ ! -f "$SETTINGS_FILE" ]; then
|
|
|
50
50
|
"type": "prompt",
|
|
51
51
|
"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."
|
|
52
52
|
}
|
|
53
|
+
],
|
|
54
|
+
"SessionStart": [
|
|
55
|
+
{
|
|
56
|
+
"type": "command",
|
|
57
|
+
"command": "sh $AGENT_DIR/scripts/clean-worktrees.sh",
|
|
58
|
+
"timeout": 10
|
|
59
|
+
}
|
|
53
60
|
]
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
63
|
SETTINGS
|
|
57
|
-
echo "[ok] Created $SETTINGS_FILE with PreCompact
|
|
64
|
+
echo "[ok] Created $SETTINGS_FILE with PreCompact + SessionStart hooks"
|
|
58
65
|
else
|
|
59
66
|
if grep -q "PreCompact" "$SETTINGS_FILE" 2>/dev/null; then
|
|
60
67
|
echo "[ok] PreCompact hook already configured — skipping"
|
|
@@ -72,6 +79,24 @@ else
|
|
|
72
79
|
"
|
|
73
80
|
echo "[ok] Added PreCompact hook to $SETTINGS_FILE"
|
|
74
81
|
fi
|
|
82
|
+
# Add SessionStart worktree cleanup hook
|
|
83
|
+
if grep -q "clean-worktrees" "$SETTINGS_FILE" 2>/dev/null; then
|
|
84
|
+
echo "[ok] SessionStart worktree cleanup hook already configured"
|
|
85
|
+
else
|
|
86
|
+
node -e "
|
|
87
|
+
const fs = require('fs');
|
|
88
|
+
const settings = JSON.parse(fs.readFileSync('$SETTINGS_FILE', 'utf-8'));
|
|
89
|
+
if (!settings.hooks) settings.hooks = {};
|
|
90
|
+
if (!settings.hooks.SessionStart) settings.hooks.SessionStart = [];
|
|
91
|
+
settings.hooks.SessionStart.push({
|
|
92
|
+
type: 'command',
|
|
93
|
+
command: 'sh $AGENT_DIR/scripts/clean-worktrees.sh',
|
|
94
|
+
timeout: 10
|
|
95
|
+
});
|
|
96
|
+
fs.writeFileSync('$SETTINGS_FILE', JSON.stringify(settings, null, 2) + '\\n');
|
|
97
|
+
"
|
|
98
|
+
echo "[ok] Added SessionStart worktree cleanup hook"
|
|
99
|
+
fi
|
|
75
100
|
fi
|
|
76
101
|
|
|
77
102
|
# Install skills to ~/.claude/commands/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-script.js","sourceRoot":"","sources":["../../src/templates/setup-script.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAmB;IACrD,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC;IACnD,MAAM,WAAW,GAAG,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,MAAM,IAAI,WAAW,KAAK,KAAK,CAAC;IAChG,MAAM,UAAU,GAAG,WAAW,KAAK,OAAO,IAAI,WAAW,KAAK,MAAM,IAAI,WAAW,KAAK,KAAK,CAAC;IAC9F,MAAM,aAAa,GAAG,WAAW,KAAK,UAAU,IAAI,WAAW,KAAK,KAAK,CAAC;IAC1E,MAAM,SAAS,GAAG;QAChB,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACvC,CAAC;IACF,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAExC,MAAM,aAAa,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,CAAC,CAAC;IAEb,OAAO;;;;cAIK,MAAM,CAAC,EAAE;;YAEX,MAAM,CAAC,IAAI,WAAW,SAAS;;;;;;;;;;;;;;;;;;;mBAmBxB,MAAM,CAAC,IAAI;;;;;;;;EAQ5B,aAAa;EACb,eAAe;EACf,YAAY;EACZ,eAAe;EACf,SAAS;CACV,CAAC;AACF,CAAC"}
|
|
@@ -105,12 +105,24 @@ const ENGINE_RULES_LINES = [
|
|
|
105
105
|
'- Persist lessons: capture + link. An unlinked entry is incomplete.',
|
|
106
106
|
'- Exceptions: runtime errors with stack traces → codebase first; user explicitly asks to search web.',
|
|
107
107
|
'',
|
|
108
|
+
'### Vault Search Strategy',
|
|
109
|
+
'',
|
|
110
|
+
"Default to **two-pass search** — scan first, load only what's relevant. This saves tokens and keeps context lean.",
|
|
111
|
+
'',
|
|
112
|
+
'| Situation | Strategy |',
|
|
113
|
+
'|-----------|----------|',
|
|
114
|
+
'| Broad/exploratory query | `mode: "scan"` → triage by score → `op:load_entries` for top matches |',
|
|
115
|
+
'| Specific known entry | `mode: "full"` directly |',
|
|
116
|
+
'| Work task (need vault context before coding) | Scan → pick relevant → load |',
|
|
117
|
+
'| Existence check ("do we have X?") | `mode: "scan"` only, no load needed |',
|
|
118
|
+
'',
|
|
119
|
+
'**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.',
|
|
120
|
+
'',
|
|
108
121
|
// ─── Planning ────────────────────────────────────────────
|
|
109
122
|
'## Planning',
|
|
110
123
|
'<!-- soleri:planning -->',
|
|
111
124
|
'',
|
|
112
|
-
'-
|
|
113
|
-
'- Use `op:create_plan` before writing ANY code. Show the plan, wait for approval.',
|
|
125
|
+
'- For complex tasks, use `op:create_plan` before writing code. Simple tasks can execute directly — but always run `op:orchestrate_complete`.',
|
|
114
126
|
'- Two-gate approval: Gate 1 (`op:approve_plan`), Gate 2 (`op:plan_split`). Never skip either.',
|
|
115
127
|
'- Wait for explicit "yes" / "approve" before proceeding past each gate.',
|
|
116
128
|
'- After execution: `op:plan_reconcile` (drift report) then `op:plan_complete_lifecycle` (knowledge capture, archive).',
|
|
@@ -118,6 +130,26 @@ const ENGINE_RULES_LINES = [
|
|
|
118
130
|
'- On session start: check for plans in `executing`/`reconciling` state and remind.',
|
|
119
131
|
'- Exceptions: read-only operations, user says "just do it", single-line fixes.',
|
|
120
132
|
'',
|
|
133
|
+
'### Task Auto-Assessment',
|
|
134
|
+
'',
|
|
135
|
+
'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.',
|
|
136
|
+
'',
|
|
137
|
+
'| Signal | Classification | Action |',
|
|
138
|
+
'|--------|---------------|--------|',
|
|
139
|
+
'| Single file, clear acceptance criteria | **Simple** | Execute directly |',
|
|
140
|
+
'| Approach already described in parent plan | **Simple** | Execute directly |',
|
|
141
|
+
'| Touches 3+ files or has cross-cutting concerns | **Complex** | Create scoped plan |',
|
|
142
|
+
'| Unresolved design decisions not in parent plan | **Complex** | Create scoped plan |',
|
|
143
|
+
'| New dependencies or architectural choices needed | **Complex** | Create scoped plan |',
|
|
144
|
+
'',
|
|
145
|
+
'**Simple task flow:** Vault search (quick) → execute → `op:orchestrate_complete` (captures knowledge).',
|
|
146
|
+
'',
|
|
147
|
+
'**Complex task flow:** Vault search → create lightweight scoped plan → two-gate approval → execute → reconcile → complete.',
|
|
148
|
+
'',
|
|
149
|
+
'**Key rule:** Knowledge gets captured either way via `op:orchestrate_complete`. Planning ceremony is for *decision-making*, not record-keeping.',
|
|
150
|
+
'',
|
|
151
|
+
'**Anti-pattern:** Creating a full graded plan for trivial tasks (add a CSS class, rename a variable, single-line fix).',
|
|
152
|
+
'',
|
|
121
153
|
'### Grade Gate',
|
|
122
154
|
'',
|
|
123
155
|
'**MANDATORY**: Plans must grade **A or higher** before approval. The engine enforces this programmatically.',
|
|
@@ -180,6 +212,37 @@ const ENGINE_RULES_LINES = [
|
|
|
180
212
|
'| skipped | ... | medium | ... |',
|
|
181
213
|
'```',
|
|
182
214
|
'',
|
|
215
|
+
// ─── YOLO Mode ──────────────────────────────────────────
|
|
216
|
+
'## YOLO Mode',
|
|
217
|
+
'<!-- soleri:yolo-mode -->',
|
|
218
|
+
'',
|
|
219
|
+
'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.',
|
|
220
|
+
'',
|
|
221
|
+
'### What Changes',
|
|
222
|
+
'',
|
|
223
|
+
'- Plan approval gates are **auto-approved** — no user confirmation needed.',
|
|
224
|
+
'- Task routing skips the two-gate ceremony — plans are created, approved, and split in one pass.',
|
|
225
|
+
'',
|
|
226
|
+
'### What Does NOT Change',
|
|
227
|
+
'',
|
|
228
|
+
'- `op:orchestrate_complete` **always runs** — knowledge capture is never skipped.',
|
|
229
|
+
'- Vault search **always runs** — decisions must be informed by existing patterns.',
|
|
230
|
+
'- Brain feedback loop remains active.',
|
|
231
|
+
'- Grade gate still applies — plans must grade A or higher.',
|
|
232
|
+
'',
|
|
233
|
+
'### Prerequisites',
|
|
234
|
+
'',
|
|
235
|
+
'- **YOLO Safety Hook Pack** must be installed: `soleri hooks add-pack yolo-safety`',
|
|
236
|
+
'- The hook pack intercepts destructive commands (force push, reset --hard, drop table) and requires explicit confirmation.',
|
|
237
|
+
'- Staging backups are created before destructive operations.',
|
|
238
|
+
'',
|
|
239
|
+
'### Activation & Deactivation',
|
|
240
|
+
'',
|
|
241
|
+
'| Action | Method |',
|
|
242
|
+
'|--------|--------|',
|
|
243
|
+
'| Activate | `soleri yolo` or `op:morph params:{ mode: "YOLO-MODE" }` |',
|
|
244
|
+
'| Deactivate | "exit YOLO", session end, or `op:activate params:{ deactivate: true }` |',
|
|
245
|
+
'',
|
|
183
246
|
// ─── Output Formatting ───────────────────────────────────
|
|
184
247
|
'## Output Formatting',
|
|
185
248
|
'<!-- soleri:output-formatting -->',
|
|
@@ -242,12 +305,40 @@ const ENGINE_RULES_LINES = [
|
|
|
242
305
|
'## Work Task Routing',
|
|
243
306
|
'<!-- soleri:task-routing -->',
|
|
244
307
|
'',
|
|
245
|
-
'
|
|
246
|
-
'
|
|
247
|
-
'-
|
|
248
|
-
'
|
|
308
|
+
'On every work task, assess complexity then route:',
|
|
309
|
+
'',
|
|
310
|
+
'### Auto-Assessment',
|
|
311
|
+
'',
|
|
312
|
+
'Evaluate these signals before deciding the execution path:',
|
|
313
|
+
'',
|
|
314
|
+
'| Signal | Simple (< 40) | Complex (≥ 40) |',
|
|
315
|
+
'|--------|---------------|----------------|',
|
|
316
|
+
'| Files touched | 1-2 | 3+ |',
|
|
317
|
+
'| Cross-cutting concerns | No | Yes |',
|
|
318
|
+
'| New dependencies | None | Yes |',
|
|
319
|
+
'| Design decisions | Already decided | Unresolved |',
|
|
320
|
+
'| Approach described | In parent plan/issue | Not yet |',
|
|
321
|
+
'',
|
|
322
|
+
'### Routing',
|
|
323
|
+
'',
|
|
324
|
+
'- **Simple tasks** → execute directly → `op:orchestrate_complete` (always)',
|
|
325
|
+
'- **Complex tasks** → `op:orchestrate_plan` → approve → execute → `op:orchestrate_complete` (always)',
|
|
326
|
+
'',
|
|
327
|
+
'### The Non-Negotiable Rule',
|
|
328
|
+
'',
|
|
329
|
+
'`op:orchestrate_complete` runs for EVERY task — simple or complex. This captures:',
|
|
330
|
+
'- Knowledge to vault (patterns learned, decisions made)',
|
|
331
|
+
'- Session summary (what was done, files changed)',
|
|
332
|
+
"- Brain feedback (what worked, what didn't)",
|
|
249
333
|
'',
|
|
250
|
-
'
|
|
334
|
+
'Without completion, the knowledge trail is lost. The code is in git, but the WHY disappears.',
|
|
335
|
+
'',
|
|
336
|
+
'### Exceptions (skip assessment, execute directly)',
|
|
337
|
+
'',
|
|
338
|
+
'- Read-only operations (search, status, health check)',
|
|
339
|
+
'- User explicitly says "just do it"',
|
|
340
|
+
'- Single-line fixes (typo, rename, one-liner)',
|
|
341
|
+
'- Questions and explanations',
|
|
251
342
|
'',
|
|
252
343
|
// ─── Intent Detection ────────────────────────────────────
|
|
253
344
|
'## Intent Detection',
|
|
@@ -286,6 +377,36 @@ const ENGINE_RULES_LINES = [
|
|
|
286
377
|
'- Brain tells you **which** patterns matter (names + strength scores). Vault tells you **what** they are (rules, examples).',
|
|
287
378
|
"- Pull only what's relevant to the current task — don't load everything at session start.",
|
|
288
379
|
'',
|
|
380
|
+
'### Second Brain Features',
|
|
381
|
+
'',
|
|
382
|
+
'| Feature | How to use |',
|
|
383
|
+
'|---------|-----------|',
|
|
384
|
+
'| **Two-pass search** | `op:search_intelligent` with `mode: "scan"` for lightweight results, then `op:load_entries` for full content. See **Vault Search Strategy**. |',
|
|
385
|
+
'| **Session briefing** | `op:session_briefing` on session start — surfaces last session, active plans, recent captures, brain recommendations |',
|
|
386
|
+
'| **Evidence reconciliation** | `op:plan_reconcile_with_evidence` — cross-references plan tasks against git diff |',
|
|
387
|
+
'| **Learning radar** | `op:radar_analyze` to detect patterns from corrections, search misses, workarounds. `op:radar_candidates` to review, `op:radar_approve`/`op:radar_dismiss` |',
|
|
388
|
+
'| **External ingestion** | `op:ingest_url` for articles, `op:ingest_text` for transcripts/notes, `op:ingest_batch` for multiple items |',
|
|
389
|
+
'| **Content synthesis** | `op:synthesize` — turn vault knowledge into briefs, outlines, talking points, or post drafts |',
|
|
390
|
+
'| **Skill chains** | `op:chain_execute` — multi-step workflows with data flow between steps and approval gates |',
|
|
391
|
+
'',
|
|
392
|
+
'### Brain Feedback Loop',
|
|
393
|
+
'',
|
|
394
|
+
'After using a vault search result to inform a decision, action, or response, call `op:record_feedback` with:',
|
|
395
|
+
'- `query`: the original search query',
|
|
396
|
+
'- `entryId`: the vault entry ID that was used',
|
|
397
|
+
'- `action`: "accepted" (result was useful) or "rejected" (result was irrelevant/wrong)',
|
|
398
|
+
'- `confidence`: 0.0–1.0 how relevant the result was to the task',
|
|
399
|
+
'',
|
|
400
|
+
'Do this for:',
|
|
401
|
+
'- `search_intelligent` results that influence your next action',
|
|
402
|
+
'- `orchestrate_plan` vault recommendations you follow',
|
|
403
|
+
'- Vault entries you cite or reference in responses',
|
|
404
|
+
'',
|
|
405
|
+
'Do NOT record feedback for:',
|
|
406
|
+
'- Existence checks ("do we have X?" — just scanning, not using)',
|
|
407
|
+
"- Results you browse but don't act on",
|
|
408
|
+
'- Duplicate feedback for the same entry in the same task',
|
|
409
|
+
'',
|
|
289
410
|
// ─── Cross-Project Memory ────────────────────────────────
|
|
290
411
|
'## Cross-Project Memory',
|
|
291
412
|
'<!-- soleri:cross-project -->',
|
|
@@ -322,15 +443,71 @@ const ENGINE_RULES_LINES = [
|
|
|
322
443
|
'',
|
|
323
444
|
'**Do NOT suggest tools when:** the user is having a conversation (not a task), already declined, or explicitly says "just tell me".',
|
|
324
445
|
'',
|
|
446
|
+
// ─── Overlay Mode ─────────────────────────────────────────
|
|
447
|
+
'## Overlay Mode — Active Agent Protocol',
|
|
448
|
+
'<!-- soleri:overlay-mode -->',
|
|
449
|
+
'',
|
|
450
|
+
'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.',
|
|
451
|
+
'',
|
|
452
|
+
'### Tool-First Routing (MANDATORY when active)',
|
|
453
|
+
'',
|
|
454
|
+
'On every user request:',
|
|
455
|
+
'1. **Discover capabilities** — call `op:admin_tool_list` on first request of the session (or after context compaction resets your state)',
|
|
456
|
+
'2. **Parse intent** — what does the user want? Use semantic-first analysis.',
|
|
457
|
+
'3. **Route through agent tools** — always prefer your MCP tools over raw Claude reasoning:',
|
|
458
|
+
' - **Knowledge questions** → vault search before answering from training data',
|
|
459
|
+
' - **Recommendations** → brain recommend before proposing approaches',
|
|
460
|
+
' - **Work tasks** → orchestrate plan before writing code',
|
|
461
|
+
' - **Quality checks** → curator or admin health before manual inspection',
|
|
462
|
+
' - **Learning moments** → capture to vault, don\'t just say "I\'ll remember"',
|
|
463
|
+
'4. **Fall back only when no tool fits** — file read/write/edit, git operations, shell commands, casual conversation',
|
|
464
|
+
'',
|
|
465
|
+
'### Self-Healing Discovery',
|
|
466
|
+
'',
|
|
467
|
+
'- After activation or context compaction, call `op:admin_tool_list` to refresh your capability inventory',
|
|
468
|
+
'- Do NOT rely on memorized tool lists from earlier in the conversation',
|
|
469
|
+
'- The tool list adapts when packs are installed — always discover dynamically',
|
|
470
|
+
'',
|
|
471
|
+
'### Character Persistence',
|
|
472
|
+
'',
|
|
473
|
+
'- **MANDATORY**: Prefix every response with `{AgentName} >` when activated (e.g., `Ernesto >`, `Salvador >`). This signals to the user that the agent persona is active.',
|
|
474
|
+
"- All communication flows through your persona's voice — tone, vocabulary, opinions",
|
|
475
|
+
'- Stay in character until explicitly deactivated',
|
|
476
|
+
'- Context compaction does not change who you are — these rules persist in CLAUDE.md',
|
|
477
|
+
'- If you notice yourself dropping character, re-read your activation context',
|
|
478
|
+
'',
|
|
479
|
+
'### Operator Learning (automatic, silent)',
|
|
480
|
+
'When calling `op:orchestrate_complete`, fill the `operatorSignals` field with your observations from this session:',
|
|
481
|
+
'',
|
|
482
|
+
'- **Expertise**: which topics did the operator demonstrate knowledge in? Where did they need explanation? Report topic + level (learning/intermediate/expert).',
|
|
483
|
+
"- **Corrections**: did they tell you to change behavior? Quote their exact words. Note if it's global or project-specific.",
|
|
484
|
+
'- **Interests**: did they share anything personal? Hobbies, background, music, culture? Report the tag and context.',
|
|
485
|
+
'- **Patterns**: did you notice work habits? Batching, scoping, pacing, communication style? Report what you observed.',
|
|
486
|
+
'',
|
|
487
|
+
'Rules:',
|
|
488
|
+
"- Fill what you observed. Empty arrays for what you didn't notice.",
|
|
489
|
+
'- Store facts, not assumptions. "User asked about React hooks" not "User doesn\'t know React."',
|
|
490
|
+
'- Never announce you are learning. Never ask for confirmation.',
|
|
491
|
+
'- Decline to store: health, medical, political, religious, sexual, financial, legal content.',
|
|
492
|
+
'- The engine handles compounding and persistence — just report honestly.',
|
|
493
|
+
'',
|
|
494
|
+
'### What NOT to Route Through Tools',
|
|
495
|
+
'',
|
|
496
|
+
'- Pure file read/write/edit operations (use Read, Edit, Write tools directly)',
|
|
497
|
+
'- Git operations (commit, push, branch, status)',
|
|
498
|
+
'- Shell commands the user explicitly requests',
|
|
499
|
+
'- Casual conversation, greetings, explanations',
|
|
500
|
+
'- One-line fixes where planning overhead exceeds the work',
|
|
501
|
+
'',
|
|
325
502
|
// ─── Session Lifecycle ───────────────────────────────────
|
|
326
503
|
'## Session Lifecycle',
|
|
327
504
|
'<!-- soleri:session -->',
|
|
328
505
|
'',
|
|
329
506
|
'### Session Start Protocol',
|
|
330
507
|
'',
|
|
331
|
-
'
|
|
332
|
-
'Call `op:
|
|
333
|
-
'
|
|
508
|
+
'On activation, discover capabilities via `op:admin_tool_list`. Call `op:session_briefing` to surface last session context, active plans, and brain recommendations.',
|
|
509
|
+
'Call `op:register` when project context is needed for a task. Call `op:activate` only when checking evolved capabilities or recovering session state.',
|
|
510
|
+
'After context compaction, re-discover capabilities — do not assume your tool inventory is still cached.',
|
|
334
511
|
'',
|
|
335
512
|
'### Context Compaction',
|
|
336
513
|
'',
|
|
@@ -406,6 +583,38 @@ const ENGINE_RULES_LINES = [
|
|
|
406
583
|
'| "Check my setup" | `soleri doctor` |',
|
|
407
584
|
'| Template drift suspected | `soleri agent diff` to see what changed |',
|
|
408
585
|
'',
|
|
586
|
+
// ─── Persona Self-Update ────────────────────────────────────
|
|
587
|
+
'## Persona Self-Update',
|
|
588
|
+
'<!-- soleri:persona-self-update -->',
|
|
589
|
+
'',
|
|
590
|
+
'When the user asks to change your personality, voice, quirks, or character:',
|
|
591
|
+
'',
|
|
592
|
+
'1. **Edit your own `agent.yaml`** — the `persona:` block is the source of truth for your character.',
|
|
593
|
+
'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.',
|
|
594
|
+
'3. After editing `agent.yaml`, tell the user to run `soleri agent refresh` to regenerate CLAUDE.md, then reactivate.',
|
|
595
|
+
'',
|
|
596
|
+
'### What You Can Change',
|
|
597
|
+
'',
|
|
598
|
+
'| Field | Purpose |',
|
|
599
|
+
'|-------|---------|',
|
|
600
|
+
'| `persona.template` | Template ID (informational, can be custom) |',
|
|
601
|
+
'| `persona.inspiration` | Who/what inspires the character |',
|
|
602
|
+
'| `persona.culture` | Cultural background |',
|
|
603
|
+
'| `persona.voice` | How you sound (tone, cadence, vocabulary) |',
|
|
604
|
+
'| `persona.traits` | Personality traits |',
|
|
605
|
+
'| `persona.quirks` | Memorable behaviors and expressions |',
|
|
606
|
+
'| `persona.opinions` | Beliefs about craft and quality |',
|
|
607
|
+
'| `persona.metaphors` | Domains you draw metaphors from |',
|
|
608
|
+
'| `persona.languageRule` | How you mix languages |',
|
|
609
|
+
'| `persona.greetings` | Session start messages |',
|
|
610
|
+
'| `persona.signoffs` | Session end messages |',
|
|
611
|
+
'',
|
|
612
|
+
'### What You Must NOT Change',
|
|
613
|
+
'',
|
|
614
|
+
'- Engine defaults in `packages/core/src/persona/defaults.ts`',
|
|
615
|
+
'- The `PERSONA_TEMPLATES` registry',
|
|
616
|
+
'- Any file inside `@soleri/core` or `@soleri/forge`',
|
|
617
|
+
'',
|
|
409
618
|
// ─── Verification Protocol ─────────────────────────────────
|
|
410
619
|
'## Verification Protocol',
|
|
411
620
|
'<!-- soleri:verification-protocol -->',
|
|
@@ -418,11 +627,12 @@ const ENGINE_RULES_LINES = [
|
|
|
418
627
|
'2. **Prove** — reproduce the issue (test case, error log, stack trace)',
|
|
419
628
|
'3. **Fix** — only after the issue is proven reproducible',
|
|
420
629
|
'',
|
|
421
|
-
'### Anti-
|
|
630
|
+
'### Anti-patterns',
|
|
422
631
|
'',
|
|
423
632
|
'- Fixing code "just in case" or for aesthetics without a proven issue',
|
|
424
633
|
'- Claiming a bug exists without reproduction evidence',
|
|
425
634
|
'- Refactoring working code under the guise of a bug fix',
|
|
635
|
+
'- **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.',
|
|
426
636
|
'',
|
|
427
637
|
'### Scope',
|
|
428
638
|
'',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-rules.js","sourceRoot":"","sources":["../../src/templates/shared-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAE5C,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,qBAAqB;IACnC,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,kBAAkB,GAAa;IACnC,QAAQ,aAAa,MAAM;IAC3B,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,qGAAqG;IACrG,EAAE;IAEF,2DAA2D;IAC3D,mBAAmB;IACnB,gCAAgC;IAChC,EAAE;IACF,2MAA2M;IAC3M,EAAE;IACF,kIAAkI;IAClI,qHAAqH;IACrH,iFAAiF;IACjF,iGAAiG;IACjG,8GAA8G;IAC9G,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,2EAA2E;IAC3E,EAAE;IACF,4EAA4E;IAC5E,2DAA2D;IAC3D,qDAAqD;IACrD,gFAAgF;IAChF,gEAAgE;IAChE,EAAE;IACF,+BAA+B;IAC/B,EAAE;IACF,iFAAiF;IACjF,EAAE;IACF,oGAAoG;IACpG,oFAAoF;IACpF,wEAAwE;IACxE,EAAE;IACF,oIAAoI;IACpI,EAAE;IAEF,2DAA2D;IAC3D,uBAAuB;IACvB,oCAAoC;IACpC,EAAE;IACF,8FAA8F;IAC9F,uFAAuF;IACvF,EAAE;IAEF,2DAA2D;IAC3D,+BAA+B;IAC/B,wCAAwC;IACxC,EAAE;IACF,+GAA+G;IAC/G,EAAE;IACF,iGAAiG;IACjG,yEAAyE;IACzE,iGAAiG;IACjG,uEAAuE;IACvE,EAAE;IACF,yOAAyO;IACzO,EAAE;IACF,mBAAmB;IACnB,mBAAmB;IACnB,yFAAyF;IACzF,mGAAmG;IACnG,+FAA+F;IAC/F,EAAE;IAEF,0DAA0D;IAC1D,wBAAwB;IACxB,gCAAgC;IAChC,EAAE;IACF,2FAA2F;IAC3F,EAAE;IACF,2GAA2G;IAC3G,+KAA+K;IAC/K,EAAE;IACF,qFAAqF;IACrF,EAAE;IAEF,4DAA4D;IAC5D,4CAA4C;IAC5C,gCAAgC;IAChC,EAAE;IACF,2KAA2K;IAC3K,EAAE;IACF,8FAA8F;IAC9F,wHAAwH;IACxH,+HAA+H;IAC/H,uGAAuG;IACvG,qEAAqE;IACrE,sGAAsG;IACtG,EAAE;IAEF,4DAA4D;IAC5D,aAAa;IACb,0BAA0B;IAC1B,EAAE;IACF,
|
|
1
|
+
{"version":3,"file":"shared-rules.js","sourceRoot":"","sources":["../../src/templates/shared-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAE5C,MAAM,UAAU,eAAe;IAC7B,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,qBAAqB;IACnC,OAAO,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,kBAAkB,GAAa;IACnC,QAAQ,aAAa,MAAM;IAC3B,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,qGAAqG;IACrG,EAAE;IAEF,2DAA2D;IAC3D,mBAAmB;IACnB,gCAAgC;IAChC,EAAE;IACF,2MAA2M;IAC3M,EAAE;IACF,kIAAkI;IAClI,qHAAqH;IACrH,iFAAiF;IACjF,iGAAiG;IACjG,8GAA8G;IAC9G,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,2EAA2E;IAC3E,EAAE;IACF,4EAA4E;IAC5E,2DAA2D;IAC3D,qDAAqD;IACrD,gFAAgF;IAChF,gEAAgE;IAChE,EAAE;IACF,+BAA+B;IAC/B,EAAE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C;IACxC,wEAAwE;IACxE,EAAE;IAEF,+DAA+D;IAC/D,wBAAwB;IACxB,qCAAqC;IACrC,EAAE;IACF,6EAA6E;IAC7E,EAAE;IACF,qGAAqG;IACrG,4KAA4K;IAC5K,sHAAsH;IACtH,EAAE;IACF,yBAAyB;IACzB,EAAE;IACF,qBAAqB;IACrB,qBAAqB;IACrB,qEAAqE;IACrE,6DAA6D;IAC7D,6CAA6C;IAC7C,iEAAiE;IACjE,2CAA2C;IAC3C,4DAA4D;IAC5D,0DAA0D;IAC1D,2DAA2D;IAC3D,oDAAoD;IACpD,kDAAkD;IAClD,+CAA+C;IAC/C,EAAE;IACF,8BAA8B;IAC9B,EAAE;IACF,8DAA8D;IAC9D,oCAAoC;IACpC,qDAAqD;IACrD,EAAE;IAEF,8DAA8D;IAC9D,0BAA0B;IAC1B,uCAAuC;IACvC,EAAE;IACF,mEAAmE;IACnE,EAAE;IACF,cAAc;IACd,EAAE;IACF,mDAAmD;IACnD,wEAAwE;IACxE,0DAA0D;IAC1D,EAAE;IACF,mBAAmB;IACnB,EAAE;IACF,uEAAuE;IACvE,uDAAuD;IACvD,yDAAyD;IACzD,6NAA6N;IAC7N,EAAE;IACF,WAAW;IACX,EAAE;IACF,mDAAmD;IACnD,iEAAiE;IACjE,0DAA0D;IAC1D,EAAE;IAEF,SAAS,aAAa,MAAM;CAC7B,CAAC"}
|
package/dist/templates/skills.js
CHANGED
|
@@ -3,34 +3,8 @@ import { join, dirname } from 'node:path';
|
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
5
|
const SKILLS_DIR = join(__dirname, '..', 'skills');
|
|
6
|
-
/**
|
|
7
|
-
const
|
|
8
|
-
'agent-dev',
|
|
9
|
-
'agent-guide',
|
|
10
|
-
'agent-persona',
|
|
11
|
-
'brain-debrief',
|
|
12
|
-
'brainstorming',
|
|
13
|
-
'code-patrol',
|
|
14
|
-
'context-resume',
|
|
15
|
-
'deep-review',
|
|
16
|
-
'deliver-and-ship',
|
|
17
|
-
'executing-plans',
|
|
18
|
-
'fix-and-learn',
|
|
19
|
-
'health-check',
|
|
20
|
-
'knowledge-harvest',
|
|
21
|
-
'onboard-me',
|
|
22
|
-
'parallel-execute',
|
|
23
|
-
'retrospective',
|
|
24
|
-
'second-opinion',
|
|
25
|
-
'systematic-debugging',
|
|
26
|
-
'test-driven-development',
|
|
27
|
-
'vault-capture',
|
|
28
|
-
'vault-curate',
|
|
29
|
-
'vault-navigator',
|
|
30
|
-
'vault-smells',
|
|
31
|
-
'verification-before-completion',
|
|
32
|
-
'writing-plans',
|
|
33
|
-
]);
|
|
6
|
+
/** Placeholder token in skill templates that gets replaced with agent-specific tool name. */
|
|
7
|
+
const AGENT_PLACEHOLDER = 'YOUR_AGENT_core';
|
|
34
8
|
/**
|
|
35
9
|
* Generate skill files for the scaffolded agent.
|
|
36
10
|
* Returns [relativePath, content] tuples for each skill.
|
|
@@ -77,7 +51,7 @@ export function generateSkills(config) {
|
|
|
77
51
|
continue;
|
|
78
52
|
}
|
|
79
53
|
let content = readFileSync(contentPath, 'utf-8');
|
|
80
|
-
if (
|
|
54
|
+
if (content.includes(AGENT_PLACEHOLDER)) {
|
|
81
55
|
content = content.replace(/YOUR_AGENT_core/g, `${config.id}_core`);
|
|
82
56
|
}
|
|
83
57
|
files.push([`skills/${skillName}/SKILL.md`, content]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/templates/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IA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AAiB,CAAC;QACtB,IAAI,WAAmB,CAAC;QAExB,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YAC5C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;gBAAE,SAAS;YACnC,SAAS,GAAG,KAAK,CAAC;YAClB,WAAW,GAAG,OAAO,CAAC;QACxB,CAAC;aAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACjC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACrC,WAAW,GAAG,SAAS,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,SAAS;QACX,CAAC;QAED,IAAI,aAAa,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACnD,SAAS;QACX,CAAC;QAED,IAAI,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAEjD,IAAI,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACxC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;QACrE,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,SAAS,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest-config.js","sourceRoot":"","sources":["../../src/templates/vitest-config.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB;IAClC,OAAO
|
|
1
|
+
{"version":3,"file":"vitest-config.js","sourceRoot":"","sources":["../../src/templates/vitest-config.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB;IAClC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AACF,CAAC"}
|