@soleri/forge 9.0.0 → 9.2.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 +1 -1
- package/dist/compose-claude-md.js.map +1 -1
- package/dist/scaffold-filetree.js +10 -1
- package/dist/scaffold-filetree.js.map +1 -1
- package/dist/skills/brain-debrief/SKILL.md +70 -0
- package/dist/skills/brainstorming/SKILL.md +89 -0
- package/dist/skills/code-patrol/SKILL.md +86 -0
- package/dist/skills/context-resume/SKILL.md +95 -0
- package/dist/skills/deep-review/SKILL.md +186 -0
- package/dist/skills/executing-plans/SKILL.md +91 -0
- package/dist/skills/fix-and-learn/SKILL.md +102 -0
- package/dist/skills/health-check/SKILL.md +135 -0
- package/dist/skills/knowledge-harvest/SKILL.md +97 -0
- package/dist/skills/onboard-me/SKILL.md +121 -0
- package/dist/skills/parallel-execute/SKILL.md +277 -0
- package/dist/skills/retrospective/SKILL.md +98 -0
- package/dist/skills/second-opinion/SKILL.md +97 -0
- package/dist/skills/systematic-debugging/SKILL.md +103 -0
- package/dist/skills/test-driven-development/SKILL.md +91 -0
- package/dist/skills/vault-capture/SKILL.md +86 -0
- package/dist/skills/vault-navigator/SKILL.md +84 -0
- package/dist/skills/vault-smells/SKILL.md +251 -0
- package/dist/skills/verification-before-completion/SKILL.md +85 -0
- package/dist/skills/writing-plans/SKILL.md +108 -0
- package/dist/templates/agents-md.js +2 -2
- package/dist/templates/agents-md.js.map +1 -1
- package/dist/templates/claude-md-template.js +2 -2
- package/dist/templates/claude-md-template.js.map +1 -1
- package/dist/templates/shared-rules.js +35 -1
- package/dist/templates/shared-rules.js.map +1 -1
- package/dist/templates/skills.js +28 -6
- package/dist/templates/skills.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +6 -2
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/scaffolder.test.ts +17 -35
- package/src/compose-claude-md.ts +1 -1
- package/src/scaffold-filetree.ts +12 -1
- package/src/skills/brain-debrief/SKILL.md +70 -0
- package/src/skills/brainstorming/SKILL.md +89 -0
- package/src/skills/code-patrol/SKILL.md +86 -0
- package/src/skills/context-resume/SKILL.md +95 -0
- package/src/skills/deep-review/SKILL.md +186 -0
- package/src/skills/executing-plans/SKILL.md +91 -0
- package/src/skills/fix-and-learn/SKILL.md +102 -0
- package/src/skills/health-check/SKILL.md +135 -0
- package/src/skills/knowledge-harvest/SKILL.md +97 -0
- package/src/skills/onboard-me/SKILL.md +121 -0
- package/src/skills/parallel-execute/SKILL.md +277 -0
- package/src/skills/retrospective/SKILL.md +98 -0
- package/src/skills/second-opinion/SKILL.md +97 -0
- package/src/skills/systematic-debugging/SKILL.md +103 -0
- package/src/skills/test-driven-development/SKILL.md +91 -0
- package/src/skills/vault-capture/SKILL.md +86 -0
- package/src/skills/vault-navigator/SKILL.md +84 -0
- package/src/skills/vault-smells/SKILL.md +251 -0
- package/src/skills/verification-before-completion/SKILL.md +85 -0
- package/src/skills/writing-plans/SKILL.md +108 -0
- package/src/templates/agents-md.ts +2 -2
- package/src/templates/claude-md-template.ts +2 -2
- package/src/templates/shared-rules.ts +36 -1
- package/src/templates/skills.ts +27 -6
- package/src/types.ts +7 -2
- 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
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-patrol
|
|
3
|
-
description: Use when the user asks "review this code", "check this against patterns", "code patrol", "does this follow our rules", "validate against vault", "check for anti-patterns", or wants code reviewed not against generic lint rules but against the project's own captured patterns, anti-patterns, and conventions.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Code Patrol — Review Code Against Your Own Knowledge
|
|
7
|
-
|
|
8
|
-
Review code against the vault's patterns, anti-patterns, and project conventions — not generic lint rules, but YOUR team's captured knowledge applied to new code. Catches violations that no linter knows about.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
- Before committing or creating a PR
|
|
13
|
-
- "Does this follow our patterns?"
|
|
14
|
-
- "Check this code against our rules"
|
|
15
|
-
- Code review with institutional knowledge
|
|
16
|
-
- After writing implementation code
|
|
17
|
-
|
|
18
|
-
## The Magic: Project-Specific Code Intelligence
|
|
19
|
-
|
|
20
|
-
### Step 1: Understand the Code's Domain
|
|
21
|
-
|
|
22
|
-
Classify what domain this code belongs to:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
YOUR_AGENT_core op:route_intent
|
|
26
|
-
params: { prompt: "Code review: <brief description of the code>" }
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Determine which vault domains are relevant:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
YOUR_AGENT_core op:vault_domains
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Step 2: Load Relevant Patterns
|
|
36
|
-
|
|
37
|
-
Search for patterns in the code's domain:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
YOUR_AGENT_core op:search_intelligent
|
|
41
|
-
params: { query: "<what this code does>" }
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Search specifically for anti-patterns to check against:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
YOUR_AGENT_core op:search
|
|
48
|
-
params: { type: "anti-pattern" }
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Search for critical rules that must not be violated:
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
YOUR_AGENT_core op:search
|
|
55
|
-
params: { severity: "critical" }
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Load project-specific rules:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
YOUR_AGENT_core op:project_list_rules
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
YOUR_AGENT_core op:get_behavior_rules
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Get proven approaches from the brain:
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
YOUR_AGENT_core op:brain_strengths
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Step 3: Review the Code
|
|
75
|
-
|
|
76
|
-
With vault patterns loaded, review the code checking for:
|
|
77
|
-
|
|
78
|
-
| Check | Source | Severity |
|
|
79
|
-
| -------------------------------------- | ----------------------------- | ------------- |
|
|
80
|
-
| Violates a critical rule | `search (severity: critical)` | Must fix |
|
|
81
|
-
| Matches a known anti-pattern | `search (type: anti-pattern)` | Must fix |
|
|
82
|
-
| Doesn't follow a proven pattern | `brain_strengths` | Should fix |
|
|
83
|
-
| Breaks project conventions | `project_list_rules` | Should fix |
|
|
84
|
-
| Misses an opportunity to use a pattern | `search_intelligent` | Could improve |
|
|
85
|
-
|
|
86
|
-
### Step 4: Present the Review
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
## Code Patrol Report
|
|
90
|
-
|
|
91
|
-
### Must Fix (Critical)
|
|
92
|
-
- **[Rule name]**: [What's wrong and why]
|
|
93
|
-
Vault ref: [entry title] (severity: critical)
|
|
94
|
-
Fix: [How to fix it]
|
|
95
|
-
|
|
96
|
-
### Should Fix (Warning)
|
|
97
|
-
- **[Anti-pattern name]**: [What's wrong]
|
|
98
|
-
Vault ref: [entry title] (type: anti-pattern)
|
|
99
|
-
Better approach: [The pattern to follow]
|
|
100
|
-
|
|
101
|
-
### Could Improve (Suggestion)
|
|
102
|
-
- **[Pattern opportunity]**: [The code works but could benefit from...]
|
|
103
|
-
Vault ref: [entry title] (type: pattern)
|
|
104
|
-
|
|
105
|
-
### Looks Good
|
|
106
|
-
- [What the code does well — patterns it follows correctly]
|
|
107
|
-
|
|
108
|
-
### Summary
|
|
109
|
-
X critical issues, Y warnings, Z suggestions
|
|
110
|
-
Patterns followed: [list]
|
|
111
|
-
Patterns missed: [list]
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### Step 5: Learn From the Review
|
|
115
|
-
|
|
116
|
-
If the review reveals a new pattern or anti-pattern not in the vault, capture it:
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
YOUR_AGENT_core op:capture_quick
|
|
120
|
-
params: {
|
|
121
|
-
title: "<new pattern or anti-pattern discovered>",
|
|
122
|
-
description: "<what it is, when it applies>"
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
If the review reveals a knowledge gap, note it:
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
YOUR_AGENT_core op:capture_knowledge
|
|
130
|
-
params: {
|
|
131
|
-
title: "<missing convention>",
|
|
132
|
-
description: "<this should be documented as a project rule>",
|
|
133
|
-
type: "principle",
|
|
134
|
-
category: "<domain>",
|
|
135
|
-
tags: ["convention", "code-review"]
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### Step 6: Verify After Fixes
|
|
140
|
-
|
|
141
|
-
After the user applies fixes, re-run the patrol to confirm clean:
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
YOUR_AGENT_core op:search_intelligent
|
|
145
|
-
params: { query: "<re-check the specific violations>" }
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Check system health:
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
YOUR_AGENT_core op:admin_health
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## The Magic
|
|
155
|
-
|
|
156
|
-
This feels like magic because:
|
|
157
|
-
|
|
158
|
-
1. It's not ESLint — it catches things like "we decided not to use inheritance here" or "this API pattern caused production issues last month"
|
|
159
|
-
2. The rules come from YOUR team's experience, not a generic config file
|
|
160
|
-
3. It gets smarter over time — every captured pattern becomes a new check
|
|
161
|
-
4. It catches institutional knowledge violations that no static analyzer can
|
|
162
|
-
|
|
163
|
-
A linter checks syntax. Code patrol checks wisdom.
|
|
164
|
-
|
|
165
|
-
## Agent Tools Reference
|
|
166
|
-
|
|
167
|
-
| Op | When to Use |
|
|
168
|
-
| -------------------- | --------------------------------------------- |
|
|
169
|
-
| `route_intent` | Classify the code's domain |
|
|
170
|
-
| `vault_domains` | See which domains are relevant |
|
|
171
|
-
| `search_intelligent` | Find relevant patterns for this code |
|
|
172
|
-
| `search` | Find anti-patterns and critical rules |
|
|
173
|
-
| `project_list_rules` | Project-specific conventions |
|
|
174
|
-
| `get_behavior_rules` | Behavioral rules |
|
|
175
|
-
| `brain_strengths` | Proven patterns to check against |
|
|
176
|
-
| `capture_quick` | Capture new patterns discovered during review |
|
|
177
|
-
| `capture_knowledge` | Capture new conventions |
|
|
178
|
-
| `admin_health` | Post-review health check |
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: context-resume
|
|
3
|
-
description: Use when starting a new session, returning to work, or when the user asks "what was I working on", "where did I leave off", "catch me up", "morning standup", "resume", "what's the status". Reconstructs full working context from memory, plans, and sessions.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Context Resume — Pick Up Where You Left Off
|
|
7
|
-
|
|
8
|
-
Reconstruct your full working context in seconds. Chains memory, plans, sessions, and brain to rebuild exactly where you left off — even across session boundaries and context compactions.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
- Starting a new Claude Code session
|
|
13
|
-
- Returning after a break
|
|
14
|
-
- "What was I working on?"
|
|
15
|
-
- "Morning standup"
|
|
16
|
-
- After context compaction (session_capture fires automatically, this reads it back)
|
|
17
|
-
|
|
18
|
-
## The Magic: Full Context Reconstruction
|
|
19
|
-
|
|
20
|
-
### Step 1: Load Active Plans
|
|
21
|
-
|
|
22
|
-
Check for plans in progress — these are your active work streams:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
YOUR_AGENT_core op:plan_stats
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
For each active plan, load its details and task status:
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
YOUR_AGENT_core op:get_plan
|
|
32
|
-
YOUR_AGENT_core op:plan_list_tasks
|
|
33
|
-
params: { planId: "<id>" }
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Present:
|
|
37
|
-
|
|
38
|
-
- Plan objective and current status
|
|
39
|
-
- Which tasks are completed, in progress, or pending
|
|
40
|
-
- What's next to do
|
|
41
|
-
|
|
42
|
-
### Step 2: Search Recent Memory
|
|
43
|
-
|
|
44
|
-
Load the latest session summaries — these capture what happened before:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
YOUR_AGENT_core op:memory_search
|
|
48
|
-
params: { query: "session summary" }
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
YOUR_AGENT_core op:memory_list
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Also check recent vault captures — what knowledge was added recently?
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
YOUR_AGENT_core op:vault_recent
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Step 3: Check Active Loops
|
|
62
|
-
|
|
63
|
-
See if there's a validation loop in progress:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
YOUR_AGENT_core op:loop_is_active
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
If active:
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
YOUR_AGENT_core op:loop_status
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
This tells you if an iterative workflow (TDD, debugging, migration) was mid-flight.
|
|
76
|
-
|
|
77
|
-
### Step 4: Brain Snapshot
|
|
78
|
-
|
|
79
|
-
Get the latest brain insights relevant to current work:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
YOUR_AGENT_core op:brain_strengths
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Step 5: System Health
|
|
86
|
-
|
|
87
|
-
Quick health check to make sure everything is working:
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
YOUR_AGENT_core op:admin_health
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## Presenting the Resume
|
|
94
|
-
|
|
95
|
-
Format as a concise standup:
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
## Where You Left Off
|
|
99
|
-
|
|
100
|
-
**Active Plans:**
|
|
101
|
-
- [Plan name] — X/Y tasks complete, next: [task description]
|
|
102
|
-
|
|
103
|
-
**Last Session:**
|
|
104
|
-
- [Summary from memory — what was done, key decisions]
|
|
105
|
-
|
|
106
|
-
**Recent Captures:**
|
|
107
|
-
- [New patterns/anti-patterns added to vault]
|
|
108
|
-
|
|
109
|
-
**Active Loops:**
|
|
110
|
-
- [Any in-progress validation loops]
|
|
111
|
-
|
|
112
|
-
**Brain Says:**
|
|
113
|
-
- [Top relevant patterns for current work]
|
|
114
|
-
|
|
115
|
-
**Health:** [OK / Issues found]
|
|
116
|
-
|
|
117
|
-
## Recommended Next Step
|
|
118
|
-
[Based on active plans and last session context]
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## The Magic
|
|
122
|
-
|
|
123
|
-
This feels like magic because the user just says "catch me up" and the agent:
|
|
124
|
-
|
|
125
|
-
1. Knows what plans are active and where they stand
|
|
126
|
-
2. Remembers what happened last session (even across context compactions)
|
|
127
|
-
3. Shows what knowledge was recently captured
|
|
128
|
-
4. Detects in-flight loops
|
|
129
|
-
5. Recommends what to work on next
|
|
130
|
-
|
|
131
|
-
No other tool does this — the agent has genuine persistent memory.
|
|
132
|
-
|
|
133
|
-
## Agent Tools Reference
|
|
134
|
-
|
|
135
|
-
| Op | When to Use |
|
|
136
|
-
| ----------------- | --------------------------- |
|
|
137
|
-
| `plan_stats` | Find active plans |
|
|
138
|
-
| `get_plan` | Load plan details |
|
|
139
|
-
| `plan_list_tasks` | See task status within plan |
|
|
140
|
-
| `memory_search` | Find session summaries |
|
|
141
|
-
| `memory_list` | Browse recent memories |
|
|
142
|
-
| `vault_recent` | Recently captured knowledge |
|
|
143
|
-
| `loop_is_active` | Check for in-flight loops |
|
|
144
|
-
| `loop_status` | Get loop details |
|
|
145
|
-
| `brain_strengths` | Relevant proven patterns |
|
|
146
|
-
| `admin_health` | System health check |
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: deliver-and-ship
|
|
3
|
-
description: >
|
|
4
|
-
Use when the user says "ship it", "ready to deploy", "package", "release",
|
|
5
|
-
"pre-PR check", "delivery checklist", "is this ready", "final review", or mentions
|
|
6
|
-
shipping, deploying, packaging, or releasing work. Runs pre-delivery quality gates
|
|
7
|
-
to ensure nothing ships without passing stability, knowledge capture, and code quality checks.
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Deliver & Ship — Quality Gate Runner
|
|
11
|
-
|
|
12
|
-
Run all pre-delivery quality gates before shipping. This ensures nothing leaves without passing stability checks, knowledge capture, and code quality verification.
|
|
13
|
-
|
|
14
|
-
## When to Use
|
|
15
|
-
|
|
16
|
-
When work is considered "done" and ready to be committed, PR'd, or deployed. This is the last checkpoint before code leaves the developer's hands.
|
|
17
|
-
|
|
18
|
-
## Orchestration Sequence
|
|
19
|
-
|
|
20
|
-
### Step 1: Code Quality
|
|
21
|
-
|
|
22
|
-
Run the project's linter, formatter, and type checker on all modified files:
|
|
23
|
-
|
|
24
|
-
1. Check for lint/format scripts in `package.json` (or equivalent)
|
|
25
|
-
2. Run `typecheck` / `tsc --noEmit` if TypeScript
|
|
26
|
-
3. Run any project-specific quality gates (clippy for Rust, mypy for Python, etc.)
|
|
27
|
-
|
|
28
|
-
Any type error or lint failure is a blocker.
|
|
29
|
-
|
|
30
|
-
### Step 2: Test Suite
|
|
31
|
-
|
|
32
|
-
Run the full test suite to catch regressions:
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
YOUR_AGENT_core op:admin_health
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Verify the agent itself is healthy, then run project tests. All tests must pass.
|
|
39
|
-
|
|
40
|
-
### Step 3: Stability Assessment
|
|
41
|
-
|
|
42
|
-
Classify the changes as safe or breaking:
|
|
43
|
-
|
|
44
|
-
- **Safe**: Internal refactors, bug fixes, additive features (new exports, new ops)
|
|
45
|
-
- **Breaking**: Removed exports, changed signatures, renamed public APIs, schema migrations
|
|
46
|
-
- Breaking changes need migration guidance in the commit/PR description
|
|
47
|
-
|
|
48
|
-
### Step 4: Knowledge Audit
|
|
49
|
-
|
|
50
|
-
Check if patterns discovered during this work session should be captured before shipping:
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
YOUR_AGENT_core op:memory_search
|
|
54
|
-
params: { query: "current session" }
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
YOUR_AGENT_core op:brain_stats
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Look for:
|
|
62
|
-
|
|
63
|
-
- Bug fixes that reveal an anti-pattern worth capturing
|
|
64
|
-
- New patterns that should be in the vault for next time
|
|
65
|
-
- Architectural decisions that need documenting
|
|
66
|
-
|
|
67
|
-
Uncaptured knowledge is lost knowledge. If something should be captured:
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
YOUR_AGENT_core op:capture_knowledge
|
|
71
|
-
params: {
|
|
72
|
-
title: "<what was learned>",
|
|
73
|
-
description: "<the pattern or anti-pattern>",
|
|
74
|
-
type: "pattern",
|
|
75
|
-
tags: ["<relevant-tags>"]
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Step 5: Commit Quality
|
|
80
|
-
|
|
81
|
-
Verify commit messages follow conventional commits:
|
|
82
|
-
|
|
83
|
-
- `feat:` for new features
|
|
84
|
-
- `fix:` for bug fixes
|
|
85
|
-
- `refactor:` for refactors
|
|
86
|
-
- `chore:` for maintenance
|
|
87
|
-
- No AI attribution (blocked by engine rules)
|
|
88
|
-
|
|
89
|
-
### Step 6: Delivery Report
|
|
90
|
-
|
|
91
|
-
Present a checklist:
|
|
92
|
-
|
|
93
|
-
- [ ] Code quality: pass/fail (Step 1)
|
|
94
|
-
- [ ] Tests: pass/fail (Step 2)
|
|
95
|
-
- [ ] Stability: safe change / breaking change (Step 3)
|
|
96
|
-
- [ ] Knowledge: captured / needs capture (Step 4)
|
|
97
|
-
- [ ] Commits: clean / needs cleanup (Step 5)
|
|
98
|
-
|
|
99
|
-
All items must pass before recommending "ship it."
|
|
100
|
-
|
|
101
|
-
## Domain-Specific Gates
|
|
102
|
-
|
|
103
|
-
Agents with domain-specific facades may add extra gates. For example:
|
|
104
|
-
|
|
105
|
-
- **Design system agents**: token validation, contrast checks, accessibility audit
|
|
106
|
-
- **API agents**: schema validation, backward compatibility checks
|
|
107
|
-
- **Security agents**: dependency audit, secret scanning
|
|
108
|
-
|
|
109
|
-
These are additive — they don't replace the generic gates above.
|
|
110
|
-
|
|
111
|
-
## Exit Criteria
|
|
112
|
-
|
|
113
|
-
Delivery is approved when all gates pass. If any gate fails, report the failure and recommend fixes before shipping. Never approve delivery with blocking issues.
|
|
114
|
-
|
|
115
|
-
## Agent Tools Reference
|
|
116
|
-
|
|
117
|
-
| Op | When to Use |
|
|
118
|
-
|----|-------------|
|
|
119
|
-
| `admin_health` | Verify agent/system health |
|
|
120
|
-
| `memory_search` | Check for uncaptured session knowledge |
|
|
121
|
-
| `brain_stats` | Review learning state |
|
|
122
|
-
| `capture_knowledge` | Persist patterns before shipping |
|
|
123
|
-
| `capture_quick` | Fast capture for simple learnings |
|
package/src/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.
|