@soleri/forge 5.14.2 → 5.14.4
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/skills/skills/agent-dev.md +122 -0
- package/dist/skills/skills/agent-persona.md +66 -0
- package/dist/skills/skills/brain-debrief.md +214 -0
- package/dist/skills/skills/brainstorming.md +180 -0
- package/dist/skills/skills/code-patrol.md +178 -0
- package/dist/skills/skills/context-resume.md +146 -0
- package/dist/skills/skills/deliver-and-ship.md +123 -0
- package/dist/skills/skills/env-setup.md +151 -0
- package/dist/skills/skills/executing-plans.md +216 -0
- package/dist/skills/skills/fix-and-learn.md +167 -0
- package/dist/skills/skills/health-check.md +231 -0
- package/dist/skills/skills/knowledge-harvest.md +185 -0
- package/dist/skills/skills/onboard-me.md +198 -0
- package/dist/skills/skills/retrospective.md +205 -0
- package/dist/skills/skills/second-opinion.md +149 -0
- package/dist/skills/skills/systematic-debugging.md +241 -0
- package/dist/skills/skills/test-driven-development.md +281 -0
- package/dist/skills/skills/vault-capture.md +170 -0
- package/dist/skills/skills/vault-curate.md +107 -0
- package/dist/skills/skills/vault-navigator.md +140 -0
- package/dist/skills/skills/verification-before-completion.md +182 -0
- package/dist/skills/skills/writing-plans.md +215 -0
- package/dist/templates/skills.js +4 -0
- package/dist/templates/skills.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/scaffolder.test.ts +6 -1
- package/src/skills/agent-dev.md +122 -0
- package/src/skills/agent-persona.md +66 -0
- package/src/skills/deliver-and-ship.md +123 -0
- package/src/skills/env-setup.md +151 -0
- package/src/skills/vault-curate.md +107 -0
- package/src/templates/skills.ts +4 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: writing-plans
|
|
3
|
+
description: Use when you have a spec or requirements for a multi-step task, before touching code
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Adapted from superpowers (MIT License) -->
|
|
7
|
+
|
|
8
|
+
# Writing Plans
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
|
|
13
|
+
|
|
14
|
+
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
|
|
15
|
+
|
|
16
|
+
**Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
|
|
17
|
+
|
|
18
|
+
**Save plans to:** `docs/plans/YYYY-MM-DD-<feature-name>.md`
|
|
19
|
+
|
|
20
|
+
## Before Writing — Search First, Plan Second
|
|
21
|
+
|
|
22
|
+
**Never write a plan from scratch.** Always search for existing knowledge first.
|
|
23
|
+
|
|
24
|
+
### 1. Vault First
|
|
25
|
+
|
|
26
|
+
Check the vault for relevant implementation patterns:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
YOUR_AGENT_core op:search_intelligent
|
|
30
|
+
params: { query: "<feature being planned>" }
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Look for:
|
|
34
|
+
|
|
35
|
+
- **Implementation patterns** — proven approaches for similar features
|
|
36
|
+
- **Anti-patterns** — approaches that failed and should be avoided
|
|
37
|
+
- **Testing patterns** — how similar features were tested
|
|
38
|
+
|
|
39
|
+
Also check brain strengths for what's worked:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
YOUR_AGENT_core op:brain_strengths
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Browse related knowledge domains for additional context:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
YOUR_AGENT_core op:vault_domains
|
|
49
|
+
YOUR_AGENT_core op:vault_tags
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 2. Web Search Second
|
|
53
|
+
|
|
54
|
+
If the vault doesn't have implementation guidance, search the web:
|
|
55
|
+
|
|
56
|
+
- **Libraries and tools** — is there a package that does this already?
|
|
57
|
+
- **Reference implementations** — how did other projects solve this?
|
|
58
|
+
- **API documentation** — official docs for libraries you'll use
|
|
59
|
+
- **Known issues** — pitfalls others ran into
|
|
60
|
+
|
|
61
|
+
### 3. Then Write the Plan
|
|
62
|
+
|
|
63
|
+
Incorporate vault insights and web findings into the plan. Reference specific vault entries and documentation links when they inform a step. A plan informed by existing knowledge is dramatically better than one written from first principles.
|
|
64
|
+
|
|
65
|
+
## Create a Tracked Plan
|
|
66
|
+
|
|
67
|
+
Use the agent's planning system to create a tracked, resumable plan:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
YOUR_AGENT_core op:create_plan
|
|
71
|
+
params: {
|
|
72
|
+
objective: "<one-sentence goal>",
|
|
73
|
+
scope: { included: [...], excluded: [...] },
|
|
74
|
+
steps: [
|
|
75
|
+
{ title: "Step 1 title", description: "details" },
|
|
76
|
+
...
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This makes the plan persistent across sessions — if context compacts or sessions change, the plan survives.
|
|
82
|
+
|
|
83
|
+
## Grade the Plan
|
|
84
|
+
|
|
85
|
+
After drafting, grade the plan for quality before presenting to the user:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
YOUR_AGENT_core op:plan_grade
|
|
89
|
+
params: { planId: "<id from create_plan>" }
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
If the grade is below target, auto-improve:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
YOUR_AGENT_core op:plan_auto_improve
|
|
96
|
+
params: { planId: "<id>" }
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
This iterates on the plan — filling gaps, adding missing test steps, clarifying ambiguous instructions. Repeat until the grade meets the target:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
YOUR_AGENT_core op:plan_meets_grade
|
|
103
|
+
params: { planId: "<id>", targetGrade: "A" }
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Iterate on Drafts
|
|
107
|
+
|
|
108
|
+
For complex plans, iterate before finalizing:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
YOUR_AGENT_core op:plan_iterate
|
|
112
|
+
params: { planId: "<id>", feedback: "<what needs improvement>" }
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This creates a new version of the plan incorporating the feedback, preserving version history.
|
|
116
|
+
|
|
117
|
+
## Split into Tasks
|
|
118
|
+
|
|
119
|
+
Once the plan is approved, split it into trackable tasks:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
YOUR_AGENT_core op:plan_split
|
|
123
|
+
params: { planId: "<id>" }
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
This generates individual tasks from the plan steps, ready for execution tracking.
|
|
127
|
+
|
|
128
|
+
## Bite-Sized Task Granularity
|
|
129
|
+
|
|
130
|
+
**Each step is one action (2-5 minutes):**
|
|
131
|
+
|
|
132
|
+
- "Write the failing test" - step
|
|
133
|
+
- "Run it to make sure it fails" - step
|
|
134
|
+
- "Implement the minimal code to make the test pass" - step
|
|
135
|
+
- "Run the tests and make sure they pass" - step
|
|
136
|
+
- "Commit" - step
|
|
137
|
+
|
|
138
|
+
## Plan Document Header
|
|
139
|
+
|
|
140
|
+
**Every plan MUST start with this header:**
|
|
141
|
+
|
|
142
|
+
```markdown
|
|
143
|
+
# [Feature Name] Implementation Plan
|
|
144
|
+
|
|
145
|
+
> **For Claude:** REQUIRED SUB-SKILL: Use executing-plans to implement this plan task-by-task.
|
|
146
|
+
|
|
147
|
+
**Goal:** [One sentence describing what this builds]
|
|
148
|
+
|
|
149
|
+
**Architecture:** [2-3 sentences about approach]
|
|
150
|
+
|
|
151
|
+
**Tech Stack:** [Key technologies/libraries]
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Task Structure
|
|
157
|
+
|
|
158
|
+
Each task uses this format:
|
|
159
|
+
|
|
160
|
+
- Files: Create / Modify / Test paths
|
|
161
|
+
- Step 1: Write the failing test (with code)
|
|
162
|
+
- Step 2: Run test to verify it fails (with expected output)
|
|
163
|
+
- Step 3: Write minimal implementation (with code)
|
|
164
|
+
- Step 4: Run test to verify it passes (with expected output)
|
|
165
|
+
- Step 5: Commit (with exact git commands)
|
|
166
|
+
|
|
167
|
+
## Remember
|
|
168
|
+
|
|
169
|
+
- Exact file paths always
|
|
170
|
+
- Complete code in plan (not "add validation")
|
|
171
|
+
- Exact commands with expected output
|
|
172
|
+
- DRY, YAGNI, TDD, frequent commits
|
|
173
|
+
|
|
174
|
+
## After Plan Approval
|
|
175
|
+
|
|
176
|
+
Once the user approves the plan, register it for tracking:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
YOUR_AGENT_core op:approve_plan
|
|
180
|
+
params: { planId: "<id from create_plan>" }
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Check plan stats for an overview:
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
YOUR_AGENT_core op:plan_stats
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Execution Handoff
|
|
190
|
+
|
|
191
|
+
After saving the plan, offer execution choice:
|
|
192
|
+
|
|
193
|
+
"Plan complete and saved to `docs/plans/<filename>.md`. Two execution options:
|
|
194
|
+
|
|
195
|
+
**1. Subagent-Driven (this session)** - I dispatch fresh subagent per task, review between tasks, fast iteration
|
|
196
|
+
|
|
197
|
+
**2. Parallel Session (separate)** - Open new session with executing-plans, batch execution with checkpoints
|
|
198
|
+
|
|
199
|
+
Which approach?"
|
|
200
|
+
|
|
201
|
+
## Agent Tools Reference
|
|
202
|
+
|
|
203
|
+
| Op | When to Use |
|
|
204
|
+
| ------------------------------ | -------------------------------------- |
|
|
205
|
+
| `search_intelligent` | Find relevant patterns before planning |
|
|
206
|
+
| `brain_strengths` | Check proven approaches |
|
|
207
|
+
| `vault_domains` / `vault_tags` | Browse knowledge landscape |
|
|
208
|
+
| `create_plan` | Create tracked, persistent plan |
|
|
209
|
+
| `plan_grade` | Grade plan quality |
|
|
210
|
+
| `plan_auto_improve` | Auto-fix plan weaknesses |
|
|
211
|
+
| `plan_meets_grade` | Verify grade target reached |
|
|
212
|
+
| `plan_iterate` | Iterate on draft with feedback |
|
|
213
|
+
| `plan_split` | Split plan into trackable tasks |
|
|
214
|
+
| `approve_plan` | Lock in approved plan |
|
|
215
|
+
| `plan_stats` | Overview of plan metrics |
|
package/dist/templates/skills.js
CHANGED
|
@@ -5,10 +5,13 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
5
5
|
const SKILLS_DIR = join(__dirname, '..', 'skills');
|
|
6
6
|
/** Skills that use YOUR_AGENT_core placeholder and need agent-specific substitution. */
|
|
7
7
|
const AGENT_SPECIFIC_SKILLS = new Set([
|
|
8
|
+
'agent-dev',
|
|
9
|
+
'agent-persona',
|
|
8
10
|
'brain-debrief',
|
|
9
11
|
'brainstorming',
|
|
10
12
|
'code-patrol',
|
|
11
13
|
'context-resume',
|
|
14
|
+
'deliver-and-ship',
|
|
12
15
|
'executing-plans',
|
|
13
16
|
'fix-and-learn',
|
|
14
17
|
'health-check',
|
|
@@ -19,6 +22,7 @@ const AGENT_SPECIFIC_SKILLS = new Set([
|
|
|
19
22
|
'systematic-debugging',
|
|
20
23
|
'test-driven-development',
|
|
21
24
|
'vault-capture',
|
|
25
|
+
'vault-curate',
|
|
22
26
|
'vault-navigator',
|
|
23
27
|
'verification-before-completion',
|
|
24
28
|
'writing-plans',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/templates/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CA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B,IAAI,CAAC;QACH,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IAED,2DAA2D;IAC3D,gEAAgE;IAChE,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,uCAAuC;IAE5G,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAE1C,IAAI,aAAa,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACnD,SAAS;QACX,CAAC;QAED,IAAI,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;QAE5D,IAAI,qBAAqB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACzC,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"}
|
package/package.json
CHANGED
|
@@ -262,7 +262,7 @@ describe('Scaffolder', () => {
|
|
|
262
262
|
.filter((e) => e.isDirectory())
|
|
263
263
|
.map((e) => e.name);
|
|
264
264
|
|
|
265
|
-
expect(skillDirs).toHaveLength(
|
|
265
|
+
expect(skillDirs).toHaveLength(22);
|
|
266
266
|
|
|
267
267
|
// Verify each skill dir has a SKILL.md
|
|
268
268
|
for (const dir of skillDirs) {
|
|
@@ -276,10 +276,14 @@ describe('Scaffolder', () => {
|
|
|
276
276
|
const skillDirs = readdirSync(skillsDir).sort();
|
|
277
277
|
|
|
278
278
|
expect(skillDirs).toEqual([
|
|
279
|
+
'agent-dev',
|
|
280
|
+
'agent-persona',
|
|
279
281
|
'brain-debrief',
|
|
280
282
|
'brainstorming',
|
|
281
283
|
'code-patrol',
|
|
282
284
|
'context-resume',
|
|
285
|
+
'deliver-and-ship',
|
|
286
|
+
'env-setup',
|
|
283
287
|
'executing-plans',
|
|
284
288
|
'fix-and-learn',
|
|
285
289
|
'health-check',
|
|
@@ -290,6 +294,7 @@ describe('Scaffolder', () => {
|
|
|
290
294
|
'systematic-debugging',
|
|
291
295
|
'test-driven-development',
|
|
292
296
|
'vault-capture',
|
|
297
|
+
'vault-curate',
|
|
293
298
|
'vault-navigator',
|
|
294
299
|
'verification-before-completion',
|
|
295
300
|
'writing-plans',
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-dev
|
|
3
|
+
description: >
|
|
4
|
+
Use when extending the agent itself — adding facades, tools, vault operations,
|
|
5
|
+
brain features, new skills, or modifying agent internals. Triggers on "add a facade",
|
|
6
|
+
"new tool", "extend vault", "add brain feature", "new skill", "add operation",
|
|
7
|
+
"extend agent", or when the work target is the agent's own codebase rather than
|
|
8
|
+
a project the agent assists with. Enforces vault-first knowledge gathering before
|
|
9
|
+
any code reading or planning.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Agent Dev — Vault-First Internal Development
|
|
13
|
+
|
|
14
|
+
Develop the agent's own internals with the vault as the primary source of truth. The vault knows more about the agent than any code scan or model training data. Always search the vault first, extract maximum context, and only then touch code.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
Any time the work target is the agent's own codebase: adding tools, extending facades, modifying vault operations, brain features, skills, or transport. Not for projects that merely *use* the agent.
|
|
19
|
+
|
|
20
|
+
## Core Principle
|
|
21
|
+
|
|
22
|
+
**Vault first. Before code. Before training data. Always.**
|
|
23
|
+
|
|
24
|
+
The vault is the authoritative source for how the agent works. Do not rely on general knowledge from training data — it is outdated and lacks project-specific decisions. Do not scan the codebase to understand architecture — the vault already has it.
|
|
25
|
+
|
|
26
|
+
## Orchestration Sequence
|
|
27
|
+
|
|
28
|
+
### Step 1: Search the Vault (MANDATORY — before anything else)
|
|
29
|
+
|
|
30
|
+
Before reading any source file, before making any plan, before offering any advice:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
YOUR_AGENT_core op:search_vault_intelligent
|
|
34
|
+
params: { query: "<description of planned work>", options: { intent: "pattern" } }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Search again with architecture-specific terms: the facade name, tool name, or subsystem being modified.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
YOUR_AGENT_core op:query_vault_knowledge
|
|
41
|
+
params: { type: "workflow", category: "<relevant category>" }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If initial results are sparse, search again with broader terms — synonyms, related subsystem names, parent concepts. Exhaust the vault before moving on.
|
|
45
|
+
|
|
46
|
+
Review all results. Extract file paths, module names, function references, conventions, and constraints. These become the foundation for every step that follows.
|
|
47
|
+
|
|
48
|
+
### Step 2: Check Brain for Proven Patterns
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
YOUR_AGENT_core op:strengths
|
|
52
|
+
params: { days: 30, minStrength: 60 }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
YOUR_AGENT_core op:recommend
|
|
57
|
+
params: { projectPath: "." }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Check if the brain has learned anything relevant from recent sessions.
|
|
61
|
+
|
|
62
|
+
### Step 3: Targeted Code Reading (Only What Vault Pointed To)
|
|
63
|
+
|
|
64
|
+
By now the vault has provided architecture context, file paths, and module references. Only read code when the vault describes the subsystem but lacks implementation detail (e.g., method signatures, exact line numbers).
|
|
65
|
+
|
|
66
|
+
**Read only what the vault pointed to.** Open the specific files referenced in vault results — not the surrounding codebase, not the parent directory, not "let me explore the project structure."
|
|
67
|
+
|
|
68
|
+
**Fallback: Codebase scan.** Only when vault search returned zero relevant results for the subsystem — meaning the vault genuinely has no knowledge about it — fall back to `Grep` with targeted terms. This is the last resort, not the default.
|
|
69
|
+
|
|
70
|
+
### Step 4: Plan with Vault Context
|
|
71
|
+
|
|
72
|
+
Create the implementation plan referencing vault findings explicitly:
|
|
73
|
+
|
|
74
|
+
- Which patterns apply (cite vault entry titles)
|
|
75
|
+
- Which anti-patterns to avoid (cite the specific anti-pattern)
|
|
76
|
+
- Which conventions to follow (naming, facade structure, tool registration)
|
|
77
|
+
|
|
78
|
+
Every plan must trace its decisions back to vault knowledge. If a decision has no vault backing, flag it as a new architectural choice that should be captured after implementation (Step 7).
|
|
79
|
+
|
|
80
|
+
### Step 5: Implement
|
|
81
|
+
|
|
82
|
+
Follow the plan. Key conventions for agent internals:
|
|
83
|
+
|
|
84
|
+
- **Facades**: Thin routing layer — delegate to domain modules. No business logic in facades.
|
|
85
|
+
- **Tools**: Follow `op:operation_name` naming, return structured responses.
|
|
86
|
+
- **Vault writes**: All writes go through the vault intelligence layer.
|
|
87
|
+
- **Tests**: Colocated test files. Run with vitest.
|
|
88
|
+
- **Build**: Must compile without errors before considering done.
|
|
89
|
+
|
|
90
|
+
### Step 6: Validate and Self-Correct
|
|
91
|
+
|
|
92
|
+
Run the relevant test suite. Rebuild — must complete without errors.
|
|
93
|
+
|
|
94
|
+
**Self-correction loop:** If tests fail or build breaks, do NOT ask the user what to do. Read the error, trace the cause in the code just written, fix it, and re-run. Repeat until green. The agent owns the code it wrote — if something fails, the agent fixes its own implementation. Only escalate to the user when the failure is outside the agent's control (missing infrastructure, permissions, unclear requirements).
|
|
95
|
+
|
|
96
|
+
### Step 7: Capture What Was Learned
|
|
97
|
+
|
|
98
|
+
If this work revealed new architectural knowledge, a useful pattern, or a surprising anti-pattern:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
YOUR_AGENT_core op:capture_knowledge
|
|
102
|
+
params: {
|
|
103
|
+
title: "<what was learned>",
|
|
104
|
+
description: "<the pattern or anti-pattern>",
|
|
105
|
+
type: "pattern",
|
|
106
|
+
tags: ["<relevant-tags>"]
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This ensures future sessions benefit from today's discovery — making the vault smarter for the next developer.
|
|
111
|
+
|
|
112
|
+
## Anti-Patterns to Avoid
|
|
113
|
+
|
|
114
|
+
- **Code-first exploration**: Reading source files before searching the vault. The vault already has the architecture — scanning code is slower and gives less context.
|
|
115
|
+
- **Training-data advice**: Offering general guidance from model training data instead of searching the vault for project-specific knowledge.
|
|
116
|
+
- **Skipping vault search**: The vault contains all architecture knowledge. Not searching it means reinventing knowledge that already exists.
|
|
117
|
+
- **Planning without vault context**: Plans created without vault knowledge miss conventions, duplicate existing patterns, or violate architectural boundaries.
|
|
118
|
+
- **Broad codebase scanning**: Exploring directories and reading files "to understand the project" instead of using vault results as a targeted map.
|
|
119
|
+
|
|
120
|
+
## Exit Criteria
|
|
121
|
+
|
|
122
|
+
Development is complete when: vault was searched exhaustively first (Step 1), implementation follows discovered patterns, tests pass, build succeeds, and any new learning is captured back to vault (Step 7).
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-persona
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user activates the agent's persona via its greeting phrase, or says
|
|
5
|
+
"activate persona", "be yourself", "stay in character", or any activation phrase
|
|
6
|
+
defined in the agent's persona configuration. Reinforces character persistence
|
|
7
|
+
through the session and survives context compaction.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Agent Persona — Stay in Character
|
|
11
|
+
|
|
12
|
+
This skill reinforces persona persistence. The MCP activation loads the runtime payload — this skill ensures the character sticks across the full session, including after context compaction.
|
|
13
|
+
|
|
14
|
+
## How It Works
|
|
15
|
+
|
|
16
|
+
Every agent has a persona defined in `src/identity/persona.ts` (or `src/activation/persona.ts` in older agents). This file contains:
|
|
17
|
+
|
|
18
|
+
- **name** — the agent's display name
|
|
19
|
+
- **role** — what the agent does
|
|
20
|
+
- **tone** — `precise`, `mentor`, or `pragmatic`
|
|
21
|
+
- **greeting** — the activation response
|
|
22
|
+
- **principles** — core values that guide behavior
|
|
23
|
+
|
|
24
|
+
## Activation
|
|
25
|
+
|
|
26
|
+
When the user triggers activation (greeting phrase or explicit request):
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
YOUR_AGENT_core op:activate
|
|
30
|
+
params: { projectPath: "." }
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The activation response contains the full persona payload. Adopt it immediately.
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
1. **Stay in character for EVERY response** until the user explicitly deactivates
|
|
38
|
+
2. **Technical accuracy is the priority** — persona is the wrapper, not a replacement for correctness
|
|
39
|
+
3. **Tone consistency** — match the configured tone (`precise` = concise and exact, `mentor` = educational and encouraging, `pragmatic` = direct and practical)
|
|
40
|
+
4. If character drifts after context compaction, the persona information in the compacted summary should restore it — follow it
|
|
41
|
+
|
|
42
|
+
## Context Compaction Survival
|
|
43
|
+
|
|
44
|
+
Long sessions trigger context compaction. To survive:
|
|
45
|
+
|
|
46
|
+
- The persona activation state is included in compaction summaries
|
|
47
|
+
- After compaction, check if persona was active and re-adopt the character
|
|
48
|
+
- Never break character just because the conversation was compacted
|
|
49
|
+
|
|
50
|
+
## Deactivation
|
|
51
|
+
|
|
52
|
+
When the user says "deactivate", "stop persona", "be normal", or uses the agent's deactivation phrase:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
YOUR_AGENT_core op:activate
|
|
56
|
+
params: { deactivate: true }
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Return to neutral assistant mode.
|
|
60
|
+
|
|
61
|
+
## Anti-Patterns
|
|
62
|
+
|
|
63
|
+
- **Dropping character mid-session** — if activated, stay activated
|
|
64
|
+
- **Over-persona, under-substance** — character adds flavor, not replaces technical depth
|
|
65
|
+
- **Forcing persona on unwilling users** — only activate when explicitly triggered
|
|
66
|
+
- **Ignoring tone setting** — a `precise` agent should not use flowery language; a `mentor` agent should not be terse
|
|
@@ -0,0 +1,123 @@
|
|
|
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 |
|