@soleri/forge 9.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scaffold-filetree.js +15 -1
- package/dist/scaffold-filetree.js.map +1 -1
- package/dist/skills/brain-debrief/SKILL.md +66 -0
- package/dist/skills/brainstorming/SKILL.md +85 -0
- package/dist/skills/code-patrol/SKILL.md +86 -0
- package/dist/skills/context-resume/SKILL.md +92 -0
- package/dist/skills/executing-plans/SKILL.md +87 -0
- package/dist/skills/fix-and-learn/SKILL.md +98 -0
- package/dist/skills/health-check/SKILL.md +131 -0
- package/dist/skills/knowledge-harvest/SKILL.md +93 -0
- package/dist/skills/onboard-me/SKILL.md +118 -0
- package/dist/skills/retrospective/SKILL.md +95 -0
- package/dist/skills/second-opinion/SKILL.md +97 -0
- package/dist/skills/systematic-debugging/SKILL.md +99 -0
- package/dist/skills/test-driven-development/SKILL.md +91 -0
- package/dist/skills/vault-capture/SKILL.md +82 -0
- package/dist/skills/vault-navigator/SKILL.md +80 -0
- package/dist/skills/verification-before-completion/SKILL.md +82 -0
- package/dist/skills/writing-plans/SKILL.md +105 -0
- package/package.json +1 -1
- package/src/scaffold-filetree.ts +16 -1
- package/src/skills/brain-debrief/SKILL.md +66 -0
- package/src/skills/brainstorming/SKILL.md +85 -0
- package/src/skills/code-patrol/SKILL.md +86 -0
- package/src/skills/context-resume/SKILL.md +92 -0
- package/src/skills/executing-plans/SKILL.md +87 -0
- package/src/skills/fix-and-learn/SKILL.md +98 -0
- package/src/skills/health-check/SKILL.md +131 -0
- package/src/skills/knowledge-harvest/SKILL.md +93 -0
- package/src/skills/onboard-me/SKILL.md +118 -0
- package/src/skills/retrospective/SKILL.md +95 -0
- package/src/skills/second-opinion/SKILL.md +97 -0
- package/src/skills/systematic-debugging/SKILL.md +99 -0
- package/src/skills/test-driven-development/SKILL.md +91 -0
- package/src/skills/vault-capture/SKILL.md +82 -0
- package/src/skills/vault-navigator/SKILL.md +80 -0
- package/src/skills/verification-before-completion/SKILL.md +82 -0
- package/src/skills/writing-plans/SKILL.md +105 -0
- package/dist/skills/agent-dev.md +0 -122
- package/dist/skills/agent-guide.md +0 -110
- package/dist/skills/agent-persona.md +0 -66
- package/dist/skills/brain-debrief.md +0 -214
- package/dist/skills/brainstorming.md +0 -180
- package/dist/skills/code-patrol.md +0 -178
- package/dist/skills/context-resume.md +0 -146
- package/dist/skills/deliver-and-ship.md +0 -123
- package/dist/skills/env-setup.md +0 -151
- package/dist/skills/executing-plans.md +0 -216
- package/dist/skills/fix-and-learn.md +0 -167
- package/dist/skills/health-check.md +0 -231
- package/dist/skills/knowledge-harvest.md +0 -185
- package/dist/skills/onboard-me.md +0 -198
- package/dist/skills/retrospective.md +0 -205
- package/dist/skills/second-opinion.md +0 -149
- package/dist/skills/systematic-debugging.md +0 -241
- package/dist/skills/test-driven-development.md +0 -281
- package/dist/skills/vault-capture.md +0 -170
- package/dist/skills/vault-curate.md +0 -107
- package/dist/skills/vault-navigator.md +0 -140
- package/dist/skills/verification-before-completion.md +0 -182
- package/dist/skills/writing-plans.md +0 -215
- package/src/skills/agent-dev.md +0 -122
- package/src/skills/agent-guide.md +0 -110
- package/src/skills/agent-persona.md +0 -66
- package/src/skills/brain-debrief.md +0 -214
- package/src/skills/brainstorming.md +0 -180
- package/src/skills/code-patrol.md +0 -178
- package/src/skills/context-resume.md +0 -146
- package/src/skills/deliver-and-ship.md +0 -123
- package/src/skills/env-setup.md +0 -151
- package/src/skills/executing-plans.md +0 -216
- package/src/skills/fix-and-learn.md +0 -167
- package/src/skills/health-check.md +0 -231
- package/src/skills/knowledge-harvest.md +0 -185
- package/src/skills/onboard-me.md +0 -198
- package/src/skills/retrospective.md +0 -205
- package/src/skills/second-opinion.md +0 -149
- package/src/skills/systematic-debugging.md +0 -241
- package/src/skills/test-driven-development.md +0 -281
- package/src/skills/vault-capture.md +0 -170
- package/src/skills/vault-curate.md +0 -107
- package/src/skills/vault-navigator.md +0 -140
- package/src/skills/verification-before-completion.md +0 -182
- package/src/skills/writing-plans.md +0 -215
package/dist/skills/env-setup.md
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: env-setup
|
|
3
|
-
description: >
|
|
4
|
-
Use when a developer needs to set up, fix, or restore a local development environment.
|
|
5
|
-
Triggers on post-clone setup, project onboarding, first-time running a repo, pulled changes
|
|
6
|
-
that broke the build, missing or misconfigured dependencies, MODULE_NOT_FOUND or Cannot find
|
|
7
|
-
module errors, gyp ERR or native module build failures, missing .env files or unknown required
|
|
8
|
-
environment variables, database setup, Docker compose issues, or connection refused during
|
|
9
|
-
local dev. Covers Node.js, Python, Rust, Go, Ruby, PHP, and Docker-based projects.
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Environment Setup
|
|
13
|
-
|
|
14
|
-
Detect what a project needs, diagnose what's missing, and produce an actionable setup checklist.
|
|
15
|
-
|
|
16
|
-
## Overview
|
|
17
|
-
|
|
18
|
-
Scan the project root for configuration files, detect the tech stack and dependencies, identify gaps between what's required and what's present, then generate ordered setup steps. Offer to execute each step.
|
|
19
|
-
|
|
20
|
-
## When to Use
|
|
21
|
-
|
|
22
|
-
- Just cloned a repo and need to get it running
|
|
23
|
-
- Getting errors after pulling changes (missing deps, env vars, DB migrations)
|
|
24
|
-
- Onboarding to an unfamiliar project
|
|
25
|
-
- Setting up a project on a new machine
|
|
26
|
-
- Docker/container environment not starting
|
|
27
|
-
- Missing `.env` file or environment variables
|
|
28
|
-
|
|
29
|
-
## Detection Phase
|
|
30
|
-
|
|
31
|
-
Scan the project root and identify:
|
|
32
|
-
|
|
33
|
-
### Package Managers & Dependencies
|
|
34
|
-
|
|
35
|
-
| File | Stack | Install Command |
|
|
36
|
-
|------|-------|-----------------|
|
|
37
|
-
| `package.json` | Node.js | `npm install` / `yarn` / `pnpm install` (check for lockfile) |
|
|
38
|
-
| `requirements.txt` | Python | `pip install -r requirements.txt` |
|
|
39
|
-
| `pyproject.toml` | Python | `pip install -e .` or `poetry install` or `uv sync` |
|
|
40
|
-
| `Pipfile` | Python | `pipenv install` |
|
|
41
|
-
| `Cargo.toml` | Rust | `cargo build` |
|
|
42
|
-
| `go.mod` | Go | `go mod download` |
|
|
43
|
-
| `Gemfile` | Ruby | `bundle install` |
|
|
44
|
-
| `composer.json` | PHP | `composer install` |
|
|
45
|
-
|
|
46
|
-
**Lockfile priority:** If a lockfile exists (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `Pipfile.lock`, `poetry.lock`), use the matching package manager. Don't mix.
|
|
47
|
-
|
|
48
|
-
### Environment Variables
|
|
49
|
-
|
|
50
|
-
1. Check for `.env.example`, `.env.sample`, `.env.template`
|
|
51
|
-
2. Check for existing `.env` — if missing, copy from template
|
|
52
|
-
3. Parse template for required variables (lines without defaults or with placeholder values)
|
|
53
|
-
4. Flag variables that need real values (API keys, secrets, database URLs)
|
|
54
|
-
5. **If no template exists:** grep source for `process.env.`, `os.environ`, `env::var`, `os.Getenv` to discover env vars the project actually uses.
|
|
55
|
-
|
|
56
|
-
### Native Dependencies
|
|
57
|
-
|
|
58
|
-
| Indicator | What It Means |
|
|
59
|
-
|-----------|--------------|
|
|
60
|
-
| `better-sqlite3`, `sqlite3` in deps | Needs C++ compiler |
|
|
61
|
-
| `node-gyp` in deps or scripts | Needs Python 3 + C++ toolchain |
|
|
62
|
-
| `sharp` in deps | Needs `libvips` |
|
|
63
|
-
| `Cargo.toml` with `[build-dependencies]` | Needs Rust toolchain for build scripts |
|
|
64
|
-
| `setup.py` with `ext_modules` | Needs C compiler for Python extensions |
|
|
65
|
-
|
|
66
|
-
### Databases
|
|
67
|
-
|
|
68
|
-
| File/Config | Database | Setup Needed |
|
|
69
|
-
|-------------|----------|-------------|
|
|
70
|
-
| `docker-compose.yml` with postgres/mysql | PostgreSQL/MySQL | Container + migrations |
|
|
71
|
-
| `prisma/schema.prisma` | Prisma-managed | `npx prisma migrate dev` |
|
|
72
|
-
| `drizzle.config.*` | Drizzle-managed | `npx drizzle-kit push` |
|
|
73
|
-
| `alembic.ini` | SQLAlchemy | `alembic upgrade head` |
|
|
74
|
-
| `config/database.yml` | Rails | `rails db:create db:migrate` |
|
|
75
|
-
|
|
76
|
-
### Infrastructure
|
|
77
|
-
|
|
78
|
-
| File | What It Means |
|
|
79
|
-
|------|--------------|
|
|
80
|
-
| `docker-compose.yml` | Services to start with `docker compose up` |
|
|
81
|
-
| `Dockerfile` | Can build container locally |
|
|
82
|
-
| `Makefile` | Check for `setup`, `install`, `dev` targets |
|
|
83
|
-
| `.tool-versions` / `.node-version` / `.nvmrc` | Required runtime version |
|
|
84
|
-
| `turbo.json` / `nx.json` / `lerna.json` | Monorepo setup |
|
|
85
|
-
|
|
86
|
-
### IDE & Tool Integration
|
|
87
|
-
|
|
88
|
-
| File | Integration |
|
|
89
|
-
|------|------------|
|
|
90
|
-
| `.vscode/` | VS Code settings, extensions |
|
|
91
|
-
| `.mcp.json` / `mcp.json` | MCP server config |
|
|
92
|
-
| `.editorconfig` | Cross-editor formatting |
|
|
93
|
-
|
|
94
|
-
## Diagnosis Phase
|
|
95
|
-
|
|
96
|
-
After detection, check what's present vs needed:
|
|
97
|
-
|
|
98
|
-
1. **Runtime version** — does installed version match version files?
|
|
99
|
-
2. **Dependencies installed?** — does `node_modules/`, `venv/`, `vendor/` exist?
|
|
100
|
-
3. **Native build tools?** — are compilers available?
|
|
101
|
-
4. **Env file present?** — does `.env` exist when a template does?
|
|
102
|
-
5. **Database reachable?** — can the configured DB URL connect?
|
|
103
|
-
6. **Docker running?** — is Docker daemon running if needed?
|
|
104
|
-
7. **Build artifacts** — does the project need an initial build step?
|
|
105
|
-
|
|
106
|
-
## Checklist Generation
|
|
107
|
-
|
|
108
|
-
Produce steps in dependency order:
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
## Setup Checklist
|
|
112
|
-
|
|
113
|
-
1. [ ] Install runtime (Node 20.x via nvm)
|
|
114
|
-
2. [ ] Install dependencies (pnpm install)
|
|
115
|
-
3. [ ] Copy environment file (cp .env.example .env)
|
|
116
|
-
4. [ ] Fill in required env vars: DATABASE_URL, API_KEY
|
|
117
|
-
5. [ ] Start Docker services (docker compose up -d)
|
|
118
|
-
6. [ ] Run database migrations (npx prisma migrate dev)
|
|
119
|
-
7. [ ] Build the project (pnpm build)
|
|
120
|
-
8. [ ] Start dev server (pnpm dev)
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Order matters:** runtime → deps → env → infrastructure → migrations → build → run.
|
|
124
|
-
|
|
125
|
-
After presenting the checklist, offer: "Want me to run these steps for you?"
|
|
126
|
-
|
|
127
|
-
## Execution Phase
|
|
128
|
-
|
|
129
|
-
If the user says yes, execute steps sequentially. Stop and ask if:
|
|
130
|
-
|
|
131
|
-
- A step fails
|
|
132
|
-
- A step requires manual input (API keys, passwords)
|
|
133
|
-
- A step would modify system-level config (global installs, PATH changes)
|
|
134
|
-
|
|
135
|
-
## Monorepo Handling
|
|
136
|
-
|
|
137
|
-
If monorepo detected (turbo.json, nx.json, pnpm-workspace.yaml):
|
|
138
|
-
|
|
139
|
-
1. Install root dependencies first
|
|
140
|
-
2. Ask which package/app the user wants to work on
|
|
141
|
-
3. Check for package-specific setup
|
|
142
|
-
4. Run package-specific setup after root
|
|
143
|
-
|
|
144
|
-
## Common Mistakes
|
|
145
|
-
|
|
146
|
-
- **Wrong package manager** — using `npm install` when `yarn.lock` exists. Always check lockfiles first.
|
|
147
|
-
- **Skipping env file** — project crashes on first API call. Always check for templates.
|
|
148
|
-
- **Missing native build tools** — `npm install` fails with gyp errors. Check before installing.
|
|
149
|
-
- **Missing runtime version** — subtle bugs from wrong Node/Python version.
|
|
150
|
-
- **Docker not running** — cryptic "connection refused" errors.
|
|
151
|
-
- **Stale dependencies** — after `git pull`, always re-install if lockfile changed.
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: executing-plans
|
|
3
|
-
description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- Adapted from superpowers (MIT License) -->
|
|
7
|
-
|
|
8
|
-
# Executing Plans
|
|
9
|
-
|
|
10
|
-
## Overview
|
|
11
|
-
|
|
12
|
-
Load plan, review critically, execute tasks in batches, report for review between batches.
|
|
13
|
-
|
|
14
|
-
**Core principle:** Batch execution with checkpoints for architect review.
|
|
15
|
-
|
|
16
|
-
**Announce at start:** "I'm using the executing-plans skill to implement this plan."
|
|
17
|
-
|
|
18
|
-
## The Process
|
|
19
|
-
|
|
20
|
-
### Step 1: Load and Review Plan
|
|
21
|
-
|
|
22
|
-
First, load the tracked plan from the agent:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
YOUR_AGENT_core op:get_plan
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
List all tasks to understand scope:
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
YOUR_AGENT_core op:plan_list_tasks
|
|
32
|
-
params: { planId: "<id>" }
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Check plan stats for an overview:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
YOUR_AGENT_core op:plan_stats
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
If no tracked plan exists, read the plan file from `docs/plans/`.
|
|
42
|
-
|
|
43
|
-
Review critically — identify any questions or concerns about the plan.
|
|
44
|
-
|
|
45
|
-
- If concerns: Raise them with your human partner before starting
|
|
46
|
-
- If no concerns: Create TodoWrite and proceed
|
|
47
|
-
|
|
48
|
-
### Step 2: Start Execution Loop
|
|
49
|
-
|
|
50
|
-
For iterative tasks, start a validation loop:
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
YOUR_AGENT_core op:loop_start
|
|
54
|
-
params: { prompt: "<plan objective>", mode: "custom" }
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
The loop tracks iterations and validates progress automatically.
|
|
58
|
-
|
|
59
|
-
### Step 3: Execute Batch
|
|
60
|
-
|
|
61
|
-
**Default: First 3 tasks**
|
|
62
|
-
|
|
63
|
-
For each task:
|
|
64
|
-
|
|
65
|
-
1. Mark as in_progress:
|
|
66
|
-
```
|
|
67
|
-
YOUR_AGENT_core op:update_task
|
|
68
|
-
params: { planId: "<id>", taskIndex: <n>, status: "in_progress" }
|
|
69
|
-
```
|
|
70
|
-
2. Follow each step exactly (plan has bite-sized steps)
|
|
71
|
-
3. Run verifications as specified
|
|
72
|
-
4. Mark as completed:
|
|
73
|
-
```
|
|
74
|
-
YOUR_AGENT_core op:update_task
|
|
75
|
-
params: { planId: "<id>", taskIndex: <n>, status: "completed" }
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
After each task, iterate the loop:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
YOUR_AGENT_core op:loop_iterate
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Step 4: Report
|
|
85
|
-
|
|
86
|
-
When batch complete:
|
|
87
|
-
|
|
88
|
-
- Show what was implemented
|
|
89
|
-
- Show verification output
|
|
90
|
-
- Check loop status:
|
|
91
|
-
```
|
|
92
|
-
YOUR_AGENT_core op:loop_status
|
|
93
|
-
```
|
|
94
|
-
- Say: "Ready for feedback."
|
|
95
|
-
|
|
96
|
-
### Step 5: Continue
|
|
97
|
-
|
|
98
|
-
Based on feedback:
|
|
99
|
-
|
|
100
|
-
- Apply changes if needed
|
|
101
|
-
- Execute next batch
|
|
102
|
-
- Repeat until complete
|
|
103
|
-
|
|
104
|
-
### Step 6: Complete Development
|
|
105
|
-
|
|
106
|
-
After all tasks complete and verified:
|
|
107
|
-
|
|
108
|
-
1. Run final verification (use verification-before-completion skill)
|
|
109
|
-
|
|
110
|
-
2. Complete the validation loop:
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
YOUR_AGENT_core op:loop_complete
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
3. Reconcile plan — compare what was planned vs what actually happened:
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
YOUR_AGENT_core op:plan_reconcile
|
|
120
|
-
params: {
|
|
121
|
-
planId: "<id>",
|
|
122
|
-
actualSteps: "<description of what was actually done>",
|
|
123
|
-
driftNotes: "<what differed from the plan>"
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
4. Complete plan lifecycle — extract knowledge and archive:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
YOUR_AGENT_core op:plan_complete_lifecycle
|
|
131
|
-
params: { planId: "<id>" }
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
5. Archive the plan for historical reference:
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
YOUR_AGENT_core op:plan_archive
|
|
138
|
-
params: { planId: "<id>" }
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
6. Capture a session summary:
|
|
142
|
-
```
|
|
143
|
-
YOUR_AGENT_core op:session_capture
|
|
144
|
-
params: { summary: "<what was built, key decisions, files modified>" }
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Capture Learnings During Execution
|
|
148
|
-
|
|
149
|
-
If you discover something worth remembering during execution (a gotcha, a better approach, an anti-pattern):
|
|
150
|
-
|
|
151
|
-
```
|
|
152
|
-
YOUR_AGENT_core op:capture_quick
|
|
153
|
-
params: {
|
|
154
|
-
title: "<what you learned>",
|
|
155
|
-
description: "<context, why it matters, when it applies>"
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Don't wait until the end — capture insights as they happen.
|
|
160
|
-
|
|
161
|
-
## When to Stop and Ask for Help
|
|
162
|
-
|
|
163
|
-
**STOP executing immediately when:**
|
|
164
|
-
|
|
165
|
-
- Hit a blocker mid-batch (missing dependency, test fails, instruction unclear)
|
|
166
|
-
- Plan has critical gaps preventing starting
|
|
167
|
-
- You don't understand an instruction
|
|
168
|
-
- Verification fails repeatedly
|
|
169
|
-
|
|
170
|
-
**Ask for clarification rather than guessing.**
|
|
171
|
-
|
|
172
|
-
## When to Revisit Earlier Steps
|
|
173
|
-
|
|
174
|
-
**Return to Review (Step 1) when:**
|
|
175
|
-
|
|
176
|
-
- Partner updates the plan based on your feedback
|
|
177
|
-
- Fundamental approach needs rethinking
|
|
178
|
-
|
|
179
|
-
**Don't force through blockers** - stop and ask.
|
|
180
|
-
|
|
181
|
-
## Remember
|
|
182
|
-
|
|
183
|
-
- Review plan critically first
|
|
184
|
-
- Follow plan steps exactly
|
|
185
|
-
- Don't skip verifications
|
|
186
|
-
- Between batches: just report and wait
|
|
187
|
-
- Stop when blocked, don't guess
|
|
188
|
-
- Capture learnings as you go, not just at the end
|
|
189
|
-
- Always reconcile the plan after execution — drift data makes future plans better
|
|
190
|
-
- Never start implementation on main/master branch without explicit user consent
|
|
191
|
-
|
|
192
|
-
## Agent Tools Reference
|
|
193
|
-
|
|
194
|
-
| Op | When to Use |
|
|
195
|
-
| ------------------------- | --------------------------------------------- |
|
|
196
|
-
| `get_plan` | Load tracked plan |
|
|
197
|
-
| `plan_list_tasks` | List all tasks in the plan |
|
|
198
|
-
| `plan_stats` | Plan overview and metrics |
|
|
199
|
-
| `update_task` | Mark tasks in_progress / completed |
|
|
200
|
-
| `loop_start` | Begin validation loop for iterative execution |
|
|
201
|
-
| `loop_iterate` | Track each iteration |
|
|
202
|
-
| `loop_status` | Check loop progress |
|
|
203
|
-
| `loop_complete` | Finish validation loop |
|
|
204
|
-
| `plan_reconcile` | Compare planned vs actual (post-execution) |
|
|
205
|
-
| `plan_complete_lifecycle` | Extract knowledge from execution |
|
|
206
|
-
| `plan_archive` | Archive plan for history |
|
|
207
|
-
| `session_capture` | Save session context |
|
|
208
|
-
| `capture_quick` | Capture mid-execution learnings |
|
|
209
|
-
|
|
210
|
-
## Integration
|
|
211
|
-
|
|
212
|
-
**Required workflow skills:**
|
|
213
|
-
|
|
214
|
-
- writing-plans — Creates the plan this skill executes
|
|
215
|
-
- verification-before-completion — Verify work before claiming completion
|
|
216
|
-
- test-driven-development — Follow TDD for each implementation step
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fix-and-learn
|
|
3
|
-
description: Use AFTER systematic-debugging completes to execute the fix and capture the learning in the vault. Invoke this skill when moving from diagnosis to repair for bugs, broken behavior, errors, regressions, or unexpected results. Chains with systematic-debugging — debugging finds root cause, this skill fixes and captures the anti-pattern.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Fix & Learn — Debug, Repair, Capture
|
|
7
|
-
|
|
8
|
-
Fix bugs through a structured recovery workflow, then capture the root cause as a reusable anti-pattern. The learning step is what makes fixes compound across sessions.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
Any time something is broken, behaving unexpectedly, or producing errors. This includes runtime bugs, visual regressions, type errors, and "it used to work" situations.
|
|
13
|
-
|
|
14
|
-
## The Search Order — MANDATORY
|
|
15
|
-
|
|
16
|
-
**Never jump to writing code.** Always follow this lookup order:
|
|
17
|
-
|
|
18
|
-
1. **Vault first** — has this been solved before?
|
|
19
|
-
2. **Web search** — is there a known solution or pattern?
|
|
20
|
-
3. **Plan the fix** — design the approach before touching code
|
|
21
|
-
4. **Implement** — only after steps 1-3
|
|
22
|
-
|
|
23
|
-
Skipping to implementation is the #1 cause of wasted time and recurring bugs.
|
|
24
|
-
|
|
25
|
-
## Orchestration Sequence
|
|
26
|
-
|
|
27
|
-
### Step 1: Classify and Route
|
|
28
|
-
|
|
29
|
-
Classify the intent to confirm this is a FIX and get routing context:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
YOUR_AGENT_core op:route_intent
|
|
33
|
-
params: { prompt: "<user's bug description>" }
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Step 2: Check Vault First
|
|
37
|
-
|
|
38
|
-
Search for this bug or similar issues:
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
YOUR_AGENT_core op:search_intelligent
|
|
42
|
-
params: { query: "<error message or bug description>" }
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Check memory for patterns across sessions:
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
YOUR_AGENT_core op:memory_search
|
|
49
|
-
params: { query: "<bug description>" }
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Check memory topics — are bugs clustering in a specific area?
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
YOUR_AGENT_core op:memory_topics
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Check memory stats to understand the debugging landscape:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
YOUR_AGENT_core op:memory_stats
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
If vault returns a match with high confidence — **use it**. Don't re-investigate what's already been solved.
|
|
65
|
-
|
|
66
|
-
### Step 3: Search the Web
|
|
67
|
-
|
|
68
|
-
If the vault has no answer, search for existing solutions before investigating from scratch:
|
|
69
|
-
|
|
70
|
-
- Known issues in the library/framework
|
|
71
|
-
- Stack Overflow answers for the exact error
|
|
72
|
-
- GitHub issues on relevant repos
|
|
73
|
-
- Official documentation for the API or feature involved
|
|
74
|
-
|
|
75
|
-
A 30-second web search can save hours of investigation.
|
|
76
|
-
|
|
77
|
-
### Step 4: Start Fix Loop
|
|
78
|
-
|
|
79
|
-
For complex bugs requiring multiple iterations, start a validation loop:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
YOUR_AGENT_core op:loop_start
|
|
83
|
-
params: { prompt: "Fix: <bug description>", mode: "custom" }
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Step 5: Diagnose and Fix
|
|
87
|
-
|
|
88
|
-
Only if Steps 2-3 didn't produce a solution, apply the systematic debugging approach (use systematic-debugging skill):
|
|
89
|
-
|
|
90
|
-
1. Reproduce the issue
|
|
91
|
-
2. Isolate the root cause
|
|
92
|
-
3. **Plan the fix before writing code** — even a one-line mental plan
|
|
93
|
-
4. Implement the fix
|
|
94
|
-
5. Verify the fix resolves the issue without regressions
|
|
95
|
-
|
|
96
|
-
Track each iteration:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
YOUR_AGENT_core op:loop_iterate
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Step 6: Validate the Fix
|
|
103
|
-
|
|
104
|
-
Run the project's test suite to ensure the fix didn't introduce regressions. Use the verification-before-completion skill to confirm all checks pass.
|
|
105
|
-
|
|
106
|
-
Complete the loop when validated:
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
YOUR_AGENT_core op:loop_complete
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Step 7: Capture the Learning
|
|
113
|
-
|
|
114
|
-
This step is critical — it's what makes the agent smarter over time.
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
YOUR_AGENT_core op:capture_knowledge
|
|
118
|
-
params: {
|
|
119
|
-
title: "<bug title>",
|
|
120
|
-
description: "<root cause, solution, what made it hard to find>",
|
|
121
|
-
type: "anti-pattern",
|
|
122
|
-
category: "<domain>",
|
|
123
|
-
tags: ["<error-type>", "<component>"]
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
For quick captures:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
YOUR_AGENT_core op:capture_quick
|
|
131
|
-
params: { title: "<bug>", description: "<root cause and fix>" }
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Step 8: Post-Capture Quality
|
|
135
|
-
|
|
136
|
-
Run duplicate detection to ensure we didn't create redundant entries:
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
YOUR_AGENT_core op:curator_detect_duplicates
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Step 9: Verify Health
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
YOUR_AGENT_core op:admin_health
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
## Exit Criteria
|
|
149
|
-
|
|
150
|
-
Fix is complete when: the bug is resolved, tests pass (Step 6), and the root cause is captured in vault (Step 7). A fix without a capture is an incomplete fix.
|
|
151
|
-
|
|
152
|
-
## Agent Tools Reference
|
|
153
|
-
|
|
154
|
-
| Op | When to Use |
|
|
155
|
-
| --------------------------- | ------------------------------ |
|
|
156
|
-
| `route_intent` | Classify as FIX intent |
|
|
157
|
-
| `search_intelligent` | Check vault for known bugs |
|
|
158
|
-
| `memory_search` | Search across session memories |
|
|
159
|
-
| `memory_topics` | See if bugs cluster in an area |
|
|
160
|
-
| `memory_stats` | Understand debugging landscape |
|
|
161
|
-
| `loop_start` | Begin iterative fix cycle |
|
|
162
|
-
| `loop_iterate` | Track each fix attempt |
|
|
163
|
-
| `loop_complete` | Finish fix cycle |
|
|
164
|
-
| `capture_knowledge` | Full anti-pattern capture |
|
|
165
|
-
| `capture_quick` | Fast capture |
|
|
166
|
-
| `curator_detect_duplicates` | Prevent redundant entries |
|
|
167
|
-
| `admin_health` | Verify system health |
|