@soleri/forge 9.3.1 → 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 +128 -5
- 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 +130 -5
- package/src/templates/skills.ts +3 -29
- package/src/templates/vitest-config.ts +1 -0
- package/vitest.config.ts +1 -0
|
@@ -77,6 +77,18 @@ Capture mid-execution learnings with `op:capture_quick` as they happen — don't
|
|
|
77
77
|
- Forgetting to reconcile the plan after execution (drift data improves future plans)
|
|
78
78
|
- Starting implementation on main/master without explicit consent
|
|
79
79
|
|
|
80
|
+
## Rationalization Prevention
|
|
81
|
+
|
|
82
|
+
Do NOT rationalize away failures. If a verification step fails, the task is not complete.
|
|
83
|
+
|
|
84
|
+
- **HARD-GATE: Each task's verification must pass before marking it `completed`.**
|
|
85
|
+
- **HARD-GATE: Final verification (Step 6) must pass before `plan_reconcile`. Do not reconcile a failing plan.**
|
|
86
|
+
- Do not say "this task is basically done" when its verification has not run.
|
|
87
|
+
- Do not skip verification steps "to save time" -- they exist for a reason.
|
|
88
|
+
- Do not mark a task `completed` while its tests fail, even if the code "looks right."
|
|
89
|
+
- If a task is blocked or failing, leave it `in_progress` and report honestly.
|
|
90
|
+
- Do not treat reconciliation drift as permission to ignore failures.
|
|
91
|
+
|
|
80
92
|
## Quick Reference
|
|
81
93
|
|
|
82
94
|
| Op | When to Use |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: finishing-a-development-branch
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user says "finish branch", "merge branch", "ready to merge", "PR ready",
|
|
5
|
+
"close branch", "submit PR", or wants to finalize a development branch for merge into
|
|
6
|
+
the base branch.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Finishing a Development Branch
|
|
10
|
+
|
|
11
|
+
Pre-merge checks, PR creation, merge strategy, and branch cleanup.
|
|
12
|
+
|
|
13
|
+
**Announce at start:** "I'm using the finishing-a-development-branch skill to prepare this branch for merge."
|
|
14
|
+
|
|
15
|
+
## Step 1: Pre-Merge Checklist
|
|
16
|
+
|
|
17
|
+
Run all checks before creating a PR. Stop on any failure.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm test # all tests pass
|
|
21
|
+
npx tsc --noEmit # typecheck clean
|
|
22
|
+
npm run lint # no lint errors (if configured)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Verify no uncommitted changes: `git status` should be clean. Commit or stash before proceeding.
|
|
26
|
+
|
|
27
|
+
## Step 2: Create the Pull Request
|
|
28
|
+
|
|
29
|
+
1. Push the branch: `git push -u origin <branch>`
|
|
30
|
+
2. Create PR with `gh pr create`:
|
|
31
|
+
- **Title**: under 70 chars, conventional format (`feat:`, `fix:`, `refactor:`)
|
|
32
|
+
- **Body**: summary (what + why), test plan, breaking changes if any
|
|
33
|
+
- **Reviewers**: add if the user specifies or the repo has CODEOWNERS
|
|
34
|
+
- **Labels/milestone**: add if relevant
|
|
35
|
+
|
|
36
|
+
Keep the description focused on *why* the change exists, not a file-by-file diff recap.
|
|
37
|
+
|
|
38
|
+
## Step 3: Squash vs Merge Commit
|
|
39
|
+
|
|
40
|
+
| Signal | Strategy | Rationale |
|
|
41
|
+
|--------|----------|-----------|
|
|
42
|
+
| Many WIP/fixup commits | **Squash** | Clean history, one logical change |
|
|
43
|
+
| Each commit is a meaningful unit | **Merge commit** | Preserves granular history |
|
|
44
|
+
| Single commit on branch | Either | No difference |
|
|
45
|
+
| Team convention exists | **Follow it** | Consistency wins |
|
|
46
|
+
|
|
47
|
+
Default to **squash** unless the user or repo convention says otherwise.
|
|
48
|
+
|
|
49
|
+
## Step 4: Handle Merge Conflicts
|
|
50
|
+
|
|
51
|
+
If the base branch has diverged:
|
|
52
|
+
|
|
53
|
+
1. `git fetch origin && git rebase origin/<base>` — preferred, keeps history linear
|
|
54
|
+
2. Resolve conflicts file by file, run the full checklist (Step 1) again after resolving
|
|
55
|
+
3. `git rebase --continue` after each resolution
|
|
56
|
+
4. If rebase is too complex, `git merge origin/<base>` is acceptable — ask the user
|
|
57
|
+
|
|
58
|
+
Never force-push a rebased branch that others are working on.
|
|
59
|
+
|
|
60
|
+
## Step 5: Branch Cleanup
|
|
61
|
+
|
|
62
|
+
After merge is confirmed:
|
|
63
|
+
|
|
64
|
+
1. `git checkout <base> && git pull`
|
|
65
|
+
2. `git branch -d <branch>` — delete local branch
|
|
66
|
+
3. If remote branch not auto-deleted: `git push origin --delete <branch>`
|
|
67
|
+
|
|
68
|
+
## Anti-Patterns
|
|
69
|
+
|
|
70
|
+
- **Force-pushing to shared branches** — destroys others' history; only force-push personal branches
|
|
71
|
+
- **Merging without tests passing** — broken main is worse than a delayed merge
|
|
72
|
+
- **Giant PRs** — split if touching 10+ files across unrelated concerns
|
|
73
|
+
- **Empty PR descriptions** — reviewers need context; "fixes stuff" is not a description
|
|
74
|
+
- **Leaving stale branches** — delete after merge; stale branches create confusion
|
|
75
|
+
|
|
76
|
+
**Related skills:** executing-plans, verification-before-completion
|
|
@@ -90,6 +90,18 @@ Bug resolved, tests pass, root cause captured in vault. A fix without a capture
|
|
|
90
90
|
- Skipping the capture step after fixing
|
|
91
91
|
- Not running the full test suite to check regressions
|
|
92
92
|
|
|
93
|
+
## Rationalization Prevention
|
|
94
|
+
|
|
95
|
+
Do NOT rationalize away failures. A fix is not done until it is proven done.
|
|
96
|
+
|
|
97
|
+
- **HARD-GATE: The original symptom must be verified as resolved (test passes, error gone) before claiming the bug is fixed.**
|
|
98
|
+
- **HARD-GATE: Full test suite must pass (no regressions) before completing the fix loop.**
|
|
99
|
+
- Do not say "the fix should work" -- reproduce the original issue and confirm it is gone.
|
|
100
|
+
- Do not say "this is unrelated" to dismiss a new test failure without investigation.
|
|
101
|
+
- Do not skip the capture step -- a fix without a vault entry is incomplete.
|
|
102
|
+
- If the fix introduces a new failure, the fix is not done. Do not rationalize it away.
|
|
103
|
+
- If you cannot verify the fix, say so. Never claim success without evidence.
|
|
104
|
+
|
|
93
105
|
## Quick Reference
|
|
94
106
|
|
|
95
107
|
| Op | When to Use |
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-doctor
|
|
3
|
+
description: >
|
|
4
|
+
Use when MCP servers fail to connect, tools are missing, or the user says "check MCP",
|
|
5
|
+
"MCP not working", "server not connecting", "tools missing", "heal MCP", "fix MCP",
|
|
6
|
+
"mcp doctor", "mcp status". Diagnoses and repairs MCP server connectivity issues.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# MCP Doctor — Diagnose and Heal MCP Connections
|
|
10
|
+
|
|
11
|
+
Systematically diagnose why MCP servers are not connecting and attempt to repair them.
|
|
12
|
+
|
|
13
|
+
## Phase 1: Inventory
|
|
14
|
+
|
|
15
|
+
Read the `.mcp.json` in the project root to get the list of configured servers.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cat .mcp.json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
For each server entry, record:
|
|
22
|
+
- Server name
|
|
23
|
+
- Command (`command` field)
|
|
24
|
+
- Arguments (`args` field)
|
|
25
|
+
- Working directory (`cwd` field, defaults to `.`)
|
|
26
|
+
- Environment variables (`env` field, if any)
|
|
27
|
+
|
|
28
|
+
## Phase 2: Diagnose Each Server
|
|
29
|
+
|
|
30
|
+
For each configured server, run these checks in order:
|
|
31
|
+
|
|
32
|
+
### 2a. Binary exists?
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
which <command>
|
|
36
|
+
# e.g. which node, which uvx, which npx
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If the binary is missing, report it and suggest installation.
|
|
40
|
+
|
|
41
|
+
### 2b. Entry point exists?
|
|
42
|
+
|
|
43
|
+
For `node` commands, check the script file exists:
|
|
44
|
+
```bash
|
|
45
|
+
ls -la <args[0]>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For `npx`/`uvx` commands, check the package resolves:
|
|
49
|
+
```bash
|
|
50
|
+
npx --yes <package> --help 2>&1 | head -5
|
|
51
|
+
# or
|
|
52
|
+
uvx --from <source> <command> --help 2>&1 | head -5
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 2c. Server starts?
|
|
56
|
+
|
|
57
|
+
Attempt to start the server with a timeout to verify it initializes:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
timeout 10 <full command> 2>&1 &
|
|
61
|
+
sleep 3
|
|
62
|
+
kill %1 2>/dev/null
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Look for:
|
|
66
|
+
- Startup success messages (e.g. "Starting MCP server", "tools loaded")
|
|
67
|
+
- Error messages (missing dependencies, port conflicts, config errors)
|
|
68
|
+
- Crash/exit codes
|
|
69
|
+
|
|
70
|
+
### 2d. Port conflicts?
|
|
71
|
+
|
|
72
|
+
If the server binds to a port, check for conflicts:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
lsof -i :<port>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If a stale process holds the port, report the PID and suggest killing it.
|
|
79
|
+
|
|
80
|
+
### 2e. Dependencies met?
|
|
81
|
+
|
|
82
|
+
For Node.js servers, check if `node_modules` exist:
|
|
83
|
+
```bash
|
|
84
|
+
ls <cwd>/node_modules/.package-lock.json 2>/dev/null
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If missing, suggest `npm install`.
|
|
88
|
+
|
|
89
|
+
For Python (uvx) servers, the virtual env is managed by uvx — check if the package installs cleanly.
|
|
90
|
+
|
|
91
|
+
## Phase 3: Repair
|
|
92
|
+
|
|
93
|
+
For each issue found, apply the appropriate fix:
|
|
94
|
+
|
|
95
|
+
| Issue | Fix |
|
|
96
|
+
|-------|-----|
|
|
97
|
+
| Binary not found | Suggest install command |
|
|
98
|
+
| Entry point missing | `npm run build` or check path |
|
|
99
|
+
| Port conflict (stale process) | `kill <PID>` (ask user first) |
|
|
100
|
+
| Missing node_modules | `npm install` in the right directory |
|
|
101
|
+
| Config error in .mcp.json | Show the fix, apply with user approval |
|
|
102
|
+
| Package resolution failure | Clear cache, retry install |
|
|
103
|
+
| Server crashes on start | Show error log, diagnose root cause |
|
|
104
|
+
|
|
105
|
+
**IMPORTANT:** Never kill processes without user confirmation. Always show the PID and process name first.
|
|
106
|
+
|
|
107
|
+
## Phase 4: Verify
|
|
108
|
+
|
|
109
|
+
After repairs, instruct the user:
|
|
110
|
+
|
|
111
|
+
> Repairs complete. Please restart MCP connections:
|
|
112
|
+
> 1. Type `/mcp` in the prompt
|
|
113
|
+
> 2. Toggle the repaired server(s) off and back on
|
|
114
|
+
> 3. Verify tools appear with a ToolSearch
|
|
115
|
+
|
|
116
|
+
Note: Claude Code does not support programmatic MCP restarts. The user must use `/mcp` to reconnect.
|
|
117
|
+
|
|
118
|
+
## Phase 5: Report
|
|
119
|
+
|
|
120
|
+
Present findings as a table:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
## MCP Doctor Report
|
|
124
|
+
|
|
125
|
+
| Server | Binary | Entry Point | Starts | Port | Status |
|
|
126
|
+
|--------|--------|-------------|--------|------|--------|
|
|
127
|
+
| soleri | node OK | dist/index.js OK | OK | — | Healthy |
|
|
128
|
+
| serena | uvx OK | git+... OK | OK | 24285 OK | Healthy |
|
|
129
|
+
|
|
130
|
+
### Issues Found
|
|
131
|
+
| Server | Issue | Fix Applied |
|
|
132
|
+
|--------|-------|-------------|
|
|
133
|
+
| serena | Stale process on :24285 | Killed PID 1234 |
|
|
134
|
+
|
|
135
|
+
### Action Required
|
|
136
|
+
- [ ] Run `/mcp` and reconnect repaired servers
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Common Issues
|
|
140
|
+
|
|
141
|
+
- **uvx servers**: Often fail due to network issues when pulling from git. Check connectivity.
|
|
142
|
+
- **Node servers**: Often fail because `dist/` hasn't been built. Run the build command.
|
|
143
|
+
- **Port conflicts**: Previous server instances that didn't shut down cleanly. Kill and restart.
|
|
144
|
+
- **cwd issues**: Relative `cwd: "."` resolves from where Claude Code launched, not the .mcp.json location.
|
|
145
|
+
|
|
146
|
+
## Quick Reference
|
|
147
|
+
|
|
148
|
+
| Check | Command | What it tells you |
|
|
149
|
+
|-------|---------|-------------------|
|
|
150
|
+
| Binary exists | `which <cmd>` | Is the runtime installed? |
|
|
151
|
+
| Script exists | `ls <path>` | Is the entry point built? |
|
|
152
|
+
| Port free | `lsof -i :<port>` | Is something blocking the port? |
|
|
153
|
+
| Deps installed | `ls node_modules` | Are npm packages present? |
|
|
154
|
+
| Server starts | `timeout 10 <cmd>` | Does initialization succeed? |
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: subagent-driven-development
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user says "use subagents", "parallel agents", "fan out", "dispatch agents",
|
|
5
|
+
"subagent driven", or when a task decomposes into 2+ independent units that benefit from
|
|
6
|
+
isolated execution. Covers when to dispatch, worktree isolation, and merge strategy.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Subagent-Driven Development
|
|
10
|
+
|
|
11
|
+
Decompose work into isolated units, dispatch subagents via the Agent tool, merge results back. You are the controller — you never implement, you orchestrate.
|
|
12
|
+
|
|
13
|
+
**Announce at start:** "I'm using the subagent-driven-development skill to dispatch isolated agents."
|
|
14
|
+
|
|
15
|
+
## When to Dispatch
|
|
16
|
+
|
|
17
|
+
| Signal | Dispatch? |
|
|
18
|
+
|--------|-----------|
|
|
19
|
+
| 2+ independent tasks touching different files | Yes — no conflict risk, parallel speedup |
|
|
20
|
+
| Risky/experimental work (spike, prototype) | Yes — isolate blast radius in a worktree |
|
|
21
|
+
| Large refactor across unrelated modules | Yes — each module is a clean unit |
|
|
22
|
+
| Single-file change or trivial fix | **No** — overhead exceeds benefit |
|
|
23
|
+
| Tasks with sequential dependencies | **No** — cannot parallelize |
|
|
24
|
+
| Tasks modifying the same file | **No** — guaranteed merge conflicts |
|
|
25
|
+
|
|
26
|
+
## The Process
|
|
27
|
+
|
|
28
|
+
### Step 1: Decompose
|
|
29
|
+
|
|
30
|
+
Break work into discrete units. For each, determine: files involved, dependencies on other units, conflict risk. Only units with no file overlap and no inter-dependency qualify for dispatch.
|
|
31
|
+
|
|
32
|
+
### Step 2: Dispatch with Worktree Isolation
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Agent(prompt: "<task prompt>", isolation: "worktree")
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Each subagent prompt must include: (1) task scope, (2) file boundaries, (3) acceptance criteria, (4) rules — no commits, no out-of-scope changes, run tests before reporting.
|
|
39
|
+
|
|
40
|
+
Launch all independent subagents in a **single message** so they run in parallel.
|
|
41
|
+
|
|
42
|
+
### Step 3: Review and Merge
|
|
43
|
+
|
|
44
|
+
For each returning subagent:
|
|
45
|
+
1. **Review** — read actual file changes (do not trust self-reports alone), verify tests pass, check scope compliance
|
|
46
|
+
2. **Merge** — `git merge` or `git cherry-pick` from the worktree branch, one at a time
|
|
47
|
+
3. **Test** — run the full suite after each merge; only proceed if green
|
|
48
|
+
4. **Conflicts** — resolve manually, re-run tests, capture as anti-pattern for future planning
|
|
49
|
+
|
|
50
|
+
After all merges, capture learnings:
|
|
51
|
+
```
|
|
52
|
+
YOUR_AGENT_core op:capture_quick params:{
|
|
53
|
+
title: "subagent dispatch outcome",
|
|
54
|
+
description: "<which tasks parallelized well, which conflicted>"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Anti-Patterns
|
|
59
|
+
|
|
60
|
+
| Anti-Pattern | Why It Fails |
|
|
61
|
+
|-------------|--------------|
|
|
62
|
+
| Dispatching for a 5-line fix | Startup overhead exceeds the work |
|
|
63
|
+
| Parallel dispatch of dependent tasks | Second agent works on stale assumptions |
|
|
64
|
+
| Skipping worktree isolation for nearby files | Silent overwrites between agents |
|
|
65
|
+
| Trusting self-reports without reading code | Agents miss edge cases or misunderstand scope |
|
|
66
|
+
| Dispatching 10+ agents at once | Review bottleneck shifts to the controller |
|
|
67
|
+
|
|
68
|
+
## Merge Strategy
|
|
69
|
+
|
|
70
|
+
| Situation | Strategy |
|
|
71
|
+
|-----------|----------|
|
|
72
|
+
| Completely separate directories | Fast-forward merge, no conflicts expected |
|
|
73
|
+
| Different files in the same package | Merge one by one, test after each |
|
|
74
|
+
| Unexpected conflict | Resolve manually, re-run tests, capture as anti-pattern |
|
|
75
|
+
| Subagent result fails review | Dispatch fix subagent into same worktree (max 2 retries) |
|
|
76
|
+
|
|
77
|
+
**Related skills:** parallel-execute, executing-plans, verification-before-completion
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: using-git-worktrees
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user says "worktree", "isolate", "parallel branch", "safe branch", or when a plan
|
|
5
|
+
has independent tasks that benefit from parallel execution in isolated branches. Provides the
|
|
6
|
+
protocol for creating, working in, and cleaning up git worktrees safely.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Using Git Worktrees
|
|
10
|
+
|
|
11
|
+
Isolate work into parallel branches without stashing or switching. Use for multi-task plans, risky changes, or parallel execution. Claude Code natively supports `isolation: "worktree"` on sub-agents.
|
|
12
|
+
|
|
13
|
+
**Announce at start:** "I'm using the using-git-worktrees skill to isolate this work."
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- Plan has 2+ independent tasks that can run in parallel
|
|
18
|
+
- Risky or experimental change that should not touch the main working tree
|
|
19
|
+
- Long-running task where you need the main branch clean for hotfixes
|
|
20
|
+
|
|
21
|
+
## Creation Protocol
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# 1. Pre-flight — working tree must be clean
|
|
25
|
+
git status
|
|
26
|
+
git log origin/main..main # check for unpushed commits
|
|
27
|
+
|
|
28
|
+
# 2. Create worktree
|
|
29
|
+
git worktree add ../<repo>-<task> -b <branch-name>
|
|
30
|
+
cd ../<repo>-<task>
|
|
31
|
+
|
|
32
|
+
# 3. Bootstrap and baseline
|
|
33
|
+
npm install # shared .git does NOT share node_modules
|
|
34
|
+
npm test # must pass before any changes
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If the working tree is dirty, commit or stash first. If baseline tests fail, stop and investigate.
|
|
38
|
+
|
|
39
|
+
## Working in a Worktree
|
|
40
|
+
|
|
41
|
+
- Full working copy — edit, test, commit normally
|
|
42
|
+
- Commits are visible across worktrees (shared `.git`)
|
|
43
|
+
- `git worktree list` to see all active worktrees
|
|
44
|
+
|
|
45
|
+
## Cleanup Protocol
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# 1. Safety check — never delete with unpushed/uncommitted work
|
|
49
|
+
git log origin/<branch>..<branch> # unpushed commits?
|
|
50
|
+
git diff --stat # uncommitted changes?
|
|
51
|
+
|
|
52
|
+
# 2. Merge or discard
|
|
53
|
+
git merge <branch-name> # from main worktree
|
|
54
|
+
# OR: git branch -D <branch-name> # only if work is abandoned
|
|
55
|
+
|
|
56
|
+
# 3. Remove and verify
|
|
57
|
+
git worktree remove ../<repo>-<task>
|
|
58
|
+
git worktree prune
|
|
59
|
+
git worktree list # confirm removal
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Anti-Patterns
|
|
63
|
+
- Creating worktrees for single-file changes or one-liner fixes
|
|
64
|
+
- Leaving orphan worktrees after tasks complete — always clean up
|
|
65
|
+
- Deleting the worktree directory manually instead of `git worktree remove`
|
|
66
|
+
- Forgetting `npm install` in new worktree
|
|
67
|
+
- Skipping baseline tests before starting work
|
|
68
|
+
|
|
69
|
+
## Quick Reference
|
|
70
|
+
|
|
71
|
+
| Action | Command |
|
|
72
|
+
| ---------------- | ------------------------------------------------ |
|
|
73
|
+
| Create | `git worktree add ../<name> -b <branch>` |
|
|
74
|
+
| List | `git worktree list` |
|
|
75
|
+
| Remove | `git worktree remove ../<name>` |
|
|
76
|
+
| Prune | `git worktree prune` |
|
|
77
|
+
| Check unpushed | `git log origin/<branch>..<branch>` |
|
|
78
|
+
| Claude Code | Sub-agent with `isolation: "worktree"` parameter |
|
|
79
|
+
|
|
80
|
+
**Related skills:** executing-plans, parallel-execute
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vault-curate
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user says "clean vault", "deduplicate", "groom knowledge",
|
|
5
|
+
"consolidate vault", "vault maintenance", "find duplicates", "merge patterns",
|
|
6
|
+
"check contradictions", "vault health", or wants to maintain, clean, reorganize,
|
|
7
|
+
or improve the quality of the agent's knowledge base.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Vault Curate — Knowledge Maintenance
|
|
11
|
+
|
|
12
|
+
Maintain vault quality through deduplication, grooming, contradiction detection, and consolidation. A well-curated vault produces better search results and brain recommendations.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
Periodically (weekly or after heavy capture sessions), when search quality degrades, when vault health shows warnings, or when the user explicitly requests maintenance.
|
|
17
|
+
|
|
18
|
+
## Orchestration Sequence
|
|
19
|
+
|
|
20
|
+
### Step 1: Health Assessment
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
YOUR_AGENT_core op:knowledge_health
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
YOUR_AGENT_core op:get_vault_analytics
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Present the health summary to the user before proceeding: total entries, quality scores, staleness, coverage gaps.
|
|
31
|
+
|
|
32
|
+
### Step 2: Detect Duplicates
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
YOUR_AGENT_core op:curator_detect_duplicates
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This finds entries with overlapping titles, descriptions, or content. Review the duplicate pairs — some may be intentional (different contexts) while others are true duplicates.
|
|
39
|
+
|
|
40
|
+
For true duplicates:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
YOUR_AGENT_core op:merge_patterns
|
|
44
|
+
params: { patternIds: ["<id1>", "<id2>"] }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Preserve the best content from each.
|
|
48
|
+
|
|
49
|
+
### Step 3: Find Contradictions
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
YOUR_AGENT_core op:curator_contradictions
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Contradictions erode trust in vault search results. For each contradiction: decide which entry is correct (check dates, context, evidence), then archive or update the incorrect one.
|
|
56
|
+
|
|
57
|
+
### Step 4: Groom Entries
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
YOUR_AGENT_core op:curator_groom_all
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Runs tag enrichment and metadata cleanup across all entries. This improves searchability and categorization.
|
|
64
|
+
|
|
65
|
+
For targeted grooming of specific entries:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
YOUR_AGENT_core op:curator_groom
|
|
69
|
+
params: { entryIds: ["<id>"], tags: ["<tag>"] }
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Step 5: Full Consolidation
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
YOUR_AGENT_core op:curator_consolidate
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Runs the complete pipeline: dedup + archive stale entries + resolve contradictions. This is the heavy-duty cleanup.
|
|
79
|
+
|
|
80
|
+
### Step 6: Knowledge Reorganization
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
YOUR_AGENT_core op:knowledge_reorganize
|
|
84
|
+
params: { mode: "preview" }
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Preview first, then run again with `mode: "apply"` if the preview looks good.
|
|
88
|
+
|
|
89
|
+
### Step 7: Verify Results
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
YOUR_AGENT_core op:knowledge_health
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Compare with Step 1 metrics. Vault health should improve: fewer duplicates, no contradictions, better coverage.
|
|
96
|
+
|
|
97
|
+
## Exit Criteria
|
|
98
|
+
|
|
99
|
+
Curation is complete when: duplicates merged, contradictions resolved, entries groomed, and health metrics improved compared to Step 1 baseline.
|
|
@@ -75,6 +75,18 @@ Capture session summary: `YOUR_AGENT_core op:session_capture params: { summary:
|
|
|
75
75
|
- Running linter but not build (linter does not check compilation)
|
|
76
76
|
- Skipping the red-green cycle for regression tests
|
|
77
77
|
|
|
78
|
+
## Rationalization Prevention
|
|
79
|
+
|
|
80
|
+
Do NOT rationalize away failures. If a check fails, it fails. Period.
|
|
81
|
+
|
|
82
|
+
- **HARD-GATE: All verification commands must pass (exit 0, 0 failures) before claiming task complete.**
|
|
83
|
+
- **HARD-GATE: Agent system checks (`admin_health`, `admin_diagnostic`) must report no problems before completion.**
|
|
84
|
+
- Do not say "tests probably pass" -- run them and read the output.
|
|
85
|
+
- Do not say "this is a minor issue" to skip a failing check.
|
|
86
|
+
- Do not say "it worked last time" -- stale results are not evidence.
|
|
87
|
+
- Do not downgrade a failure to a warning to avoid blocking completion.
|
|
88
|
+
- If a check fails and you cannot fix it, report the failure honestly. Never hide it.
|
|
89
|
+
|
|
78
90
|
## Quick Reference
|
|
79
91
|
|
|
80
92
|
| Op | When to Use |
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: yolo-mode
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user says "yolo", "autonomous", "skip approvals", "full auto", "hands off",
|
|
5
|
+
or asks to execute without approval gates. Activates autonomous execution mode where the
|
|
6
|
+
agent skips plan approval gates but preserves all safety invariants.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# YOLO Mode
|
|
10
|
+
|
|
11
|
+
Autonomous execution without approval gates. Plans execute immediately — no Gate 1, no Gate 2, no confirmation prompts.
|
|
12
|
+
|
|
13
|
+
**Announce at start:** "I'm activating YOLO mode — autonomous execution with safety invariants intact."
|
|
14
|
+
|
|
15
|
+
## Activation Flow
|
|
16
|
+
|
|
17
|
+
### Step 1: Verify Safety Hook Pack
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
YOUR_AGENT_core op:admin_health
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Check that the YOLO Safety Hook Pack is installed. This pack intercepts destructive commands (force push, reset --hard, drop table, rm -rf).
|
|
24
|
+
|
|
25
|
+
**HARD-GATE: Refuse to activate YOLO mode if the safety hook pack is not installed.** Tell the user: "YOLO mode requires the safety hook pack. Run `soleri hooks add-pack yolo-safety` first."
|
|
26
|
+
|
|
27
|
+
### Step 2: Morph to YOLO Mode
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
YOUR_AGENT_core op:morph
|
|
31
|
+
params: { mode: "YOLO-MODE" }
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Step 3: Confirm to User
|
|
35
|
+
|
|
36
|
+
State clearly: "YOLO mode active. Approval gates are off. Safety invariants remain enforced. Say 'exit YOLO' to return to normal mode."
|
|
37
|
+
|
|
38
|
+
## What Gets Skipped
|
|
39
|
+
|
|
40
|
+
- Plan approval Gate 1 (`op:approve_plan`)
|
|
41
|
+
- Plan approval Gate 2 (`op:plan_split` confirmation)
|
|
42
|
+
- User confirmation prompts between steps
|
|
43
|
+
- "Ready for feedback?" checkpoints
|
|
44
|
+
|
|
45
|
+
## What Is NEVER Skipped
|
|
46
|
+
|
|
47
|
+
- **`op:orchestrate_complete`** — knowledge capture runs on every task, always
|
|
48
|
+
- **Vault search before decisions** — check vault for patterns/anti-patterns before acting
|
|
49
|
+
- **YOLO Safety Hook Pack** — intercepts destructive commands (force push, drop table, rm -rf, reset --hard)
|
|
50
|
+
- **Test execution** — tests still run; failures still block completion
|
|
51
|
+
- **`op:plan_reconcile`** — drift reports still generated after execution
|
|
52
|
+
|
|
53
|
+
## Exit Conditions
|
|
54
|
+
|
|
55
|
+
YOLO mode deactivates when any of these occur:
|
|
56
|
+
|
|
57
|
+
- User says "exit YOLO", "stop YOLO", or "normal mode"
|
|
58
|
+
- Session ends
|
|
59
|
+
- Explicit deactivation: `op:morph params: { mode: "DEFAULT" }`
|
|
60
|
+
- Safety hook intercepts a destructive command (auto-exits, requires re-activation)
|
|
61
|
+
|
|
62
|
+
## Anti-Patterns
|
|
63
|
+
|
|
64
|
+
- Activating YOLO on an unfamiliar codebase — you need vault context first
|
|
65
|
+
- Skipping tests in YOLO — tests are safety, not ceremony
|
|
66
|
+
- Using YOLO for architectural decisions that need human judgment
|
|
67
|
+
- Staying in YOLO after a safety hook triggers — re-evaluate before re-activating
|
|
68
|
+
- Running YOLO without reviewing what the safety hook pack actually covers
|
|
69
|
+
|
|
70
|
+
## Quick Reference
|
|
71
|
+
|
|
72
|
+
| Op | When to Use |
|
|
73
|
+
| --------------------- | ------------------------------------ |
|
|
74
|
+
| `admin_health` | Verify safety hook pack is installed |
|
|
75
|
+
| `morph` | Activate/deactivate YOLO mode |
|
|
76
|
+
| `orchestrate_complete`| After every task (never skip) |
|
|
77
|
+
| `search_intelligent` | Before every decision (never skip) |
|
|
78
|
+
| `plan_reconcile` | After execution (never skip) |
|
|
79
|
+
|
|
80
|
+
**Related skills:** executing-plans, writing-plans
|