@soleri/forge 8.1.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/agent-schema.d.ts +16 -18
- package/dist/agent-schema.js +6 -6
- package/dist/agent-schema.js.map +1 -1
- package/dist/scaffold-filetree.js +19 -3
- package/dist/scaffold-filetree.js.map +1 -1
- package/dist/scaffolder.js +0 -4
- package/dist/scaffolder.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/dist/templates/agents-md.js +0 -1
- 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/entry-point.js +1 -1
- package/dist/templates/entry-point.js.map +1 -1
- package/dist/templates/shared-rules.js +19 -0
- package/dist/templates/shared-rules.js.map +1 -1
- package/dist/templates/test-facades.js +0 -11
- package/dist/templates/test-facades.js.map +1 -1
- package/dist/types.d.ts +20 -20
- package/dist/types.js +6 -6
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/scaffold-filetree.test.ts +0 -2
- package/src/agent-schema.ts +6 -6
- package/src/scaffold-filetree.ts +21 -2
- package/src/scaffolder.ts +0 -4
- 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/src/templates/agents-md.ts +0 -1
- package/src/templates/claude-md-template.ts +1 -2
- package/src/templates/entry-point.ts +1 -1
- package/src/templates/shared-rules.ts +20 -0
- package/src/templates/test-facades.ts +0 -11
- package/src/types.ts +6 -6
- 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
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: writing-plans
|
|
3
|
+
description: Use when there is a spec or requirements for a multi-step task and an implementation plan needs to be written before touching code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Writing Plans
|
|
7
|
+
|
|
8
|
+
Write implementation plans assuming the engineer has zero codebase context. Document everything: which files to touch, code, testing, expected output. Bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
|
|
9
|
+
|
|
10
|
+
**Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
|
|
11
|
+
|
|
12
|
+
**Save plans to:** `docs/plans/YYYY-MM-DD-<feature-name>.md`
|
|
13
|
+
|
|
14
|
+
## Before Writing — Search First
|
|
15
|
+
|
|
16
|
+
### 1. Vault First
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
ernesto_core op:search_intelligent
|
|
20
|
+
params: { query: "<feature being planned>" }
|
|
21
|
+
ernesto_core op:brain_strengths
|
|
22
|
+
ernesto_core op:vault_domains
|
|
23
|
+
ernesto_core op:vault_tags
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### 2. Web Search Second
|
|
27
|
+
|
|
28
|
+
If vault lacks guidance: libraries, reference implementations, API docs, known pitfalls.
|
|
29
|
+
|
|
30
|
+
### 3. Then Write the Plan
|
|
31
|
+
|
|
32
|
+
Incorporate vault insights and web findings. Reference specific entries.
|
|
33
|
+
|
|
34
|
+
## Create a Tracked Plan
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
ernesto_core op:create_plan
|
|
38
|
+
params: {
|
|
39
|
+
objective: "<one-sentence goal>",
|
|
40
|
+
scope: { included: [...], excluded: [...] },
|
|
41
|
+
steps: [{ title: "Step 1", description: "details" }, ...]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Grade and Improve
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
ernesto_core op:plan_grade params: { planId: "<id>" }
|
|
49
|
+
ernesto_core op:plan_auto_improve params: { planId: "<id>" }
|
|
50
|
+
ernesto_core op:plan_meets_grade params: { planId: "<id>", targetGrade: "A" }
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Iterate with: `op:plan_iterate params: { planId: "<id>", feedback: "<improvement>" }`
|
|
54
|
+
|
|
55
|
+
## Split into Tasks
|
|
56
|
+
|
|
57
|
+
After approval: `ernesto_core op:plan_split params: { planId: "<id>" }`
|
|
58
|
+
|
|
59
|
+
## Task Granularity
|
|
60
|
+
|
|
61
|
+
Each step is one action (2-5 minutes): write failing test, run it, implement, run tests, commit.
|
|
62
|
+
|
|
63
|
+
## Plan Document Header
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
# [Feature] Implementation Plan
|
|
67
|
+
|
|
68
|
+
> **For Claude:** REQUIRED SUB-SKILL: Use executing-plans to implement this plan task-by-task.
|
|
69
|
+
|
|
70
|
+
**Goal:** [One sentence]
|
|
71
|
+
**Architecture:** [2-3 sentences]
|
|
72
|
+
**Tech Stack:** [Key technologies]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Task Structure
|
|
76
|
+
|
|
77
|
+
- Files: Create / Modify / Test paths
|
|
78
|
+
- Steps: Write failing test (code) -> verify fail (expected output) -> implement (code) -> verify pass (expected output) -> commit (exact commands)
|
|
79
|
+
|
|
80
|
+
## After Approval
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
ernesto_core op:approve_plan params: { planId: "<id>" }
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Offer execution choice: subagent-driven (this session) or parallel session with executing-plans.
|
|
87
|
+
|
|
88
|
+
## Common Mistakes
|
|
89
|
+
|
|
90
|
+
- Writing plans from scratch without searching vault first
|
|
91
|
+
- Vague steps like "add validation" instead of exact code
|
|
92
|
+
- Missing test steps in the plan
|
|
93
|
+
- Not grading the plan before presenting to user
|
|
94
|
+
|
|
95
|
+
## Quick Reference
|
|
96
|
+
|
|
97
|
+
| Op | When to Use |
|
|
98
|
+
|----|-------------|
|
|
99
|
+
| `search_intelligent` | Find patterns before planning |
|
|
100
|
+
| `brain_strengths` | Proven approaches |
|
|
101
|
+
| `create_plan` | Create tracked plan |
|
|
102
|
+
| `plan_grade` / `plan_auto_improve` | Grade and improve |
|
|
103
|
+
| `plan_iterate` | Iterate with feedback |
|
|
104
|
+
| `plan_split` | Split into tasks |
|
|
105
|
+
| `approve_plan` | Lock in approved plan |
|
|
@@ -80,7 +80,6 @@ ${domainRows}
|
|
|
80
80
|
| ${bt}${tp}_memory${bt} | ${bt}memory_search${bt}, ${bt}memory_capture${bt}, ${bt}session_capture${bt} |
|
|
81
81
|
| ${bt}${tp}_control${bt} | ${bt}route_intent${bt}, ${bt}morph${bt}, ${bt}get_behavior_rules${bt}, ${bt}governance_dashboard${bt}, ${bt}governance_policy${bt} |
|
|
82
82
|
| ${bt}${tp}_loop${bt} | ${bt}loop_start${bt}, ${bt}loop_iterate${bt}, ${bt}loop_status${bt}, ${bt}loop_cancel${bt} |
|
|
83
|
-
| ${bt}${tp}_cognee${bt} | ${bt}cognee_search${bt}, ${bt}cognee_graph_stats${bt}, ${bt}cognee_export_status${bt} |
|
|
84
83
|
| ${bt}${tp}_context${bt} | ${bt}context_extract_entities${bt}, ${bt}context_retrieve_knowledge${bt}, ${bt}context_analyze${bt} |
|
|
85
84
|
| ${bt}${tp}_agency${bt} | ${bt}agency_enable${bt}, ${bt}agency_status${bt}, ${bt}agency_surface_patterns${bt}, ${bt}agency_warnings${bt}, ${bt}agency_clarify${bt} |
|
|
86
85
|
| ${bt}${tp}_admin${bt} | ${bt}admin_health${bt}, ${bt}admin_tool_list${bt}, ${bt}admin_diagnostic${bt} |
|
|
@@ -115,8 +115,7 @@ export function generateClaudeMdTemplate(config: AgentConfig): string {
|
|
|
115
115
|
`| ${bt}${toolPrefix}_memory${bt} | ${bt}memory_search${bt}, ${bt}memory_capture${bt}, ${bt}session_capture${bt} |`,
|
|
116
116
|
`| ${bt}${toolPrefix}_control${bt} | ${bt}route_intent${bt}, ${bt}morph${bt}, ${bt}get_behavior_rules${bt}, ${bt}governance_dashboard${bt}, ${bt}governance_policy${bt} |`,
|
|
117
117
|
`| ${bt}${toolPrefix}_loop${bt} | ${bt}loop_start${bt}, ${bt}loop_iterate${bt}, ${bt}loop_status${bt}, ${bt}loop_cancel${bt} |`,
|
|
118
|
-
// Intelligence —
|
|
119
|
-
`| ${bt}${toolPrefix}_cognee${bt} | ${bt}cognee_search${bt}, ${bt}cognee_graph_stats${bt}, ${bt}cognee_export_status${bt} |`,
|
|
118
|
+
// Intelligence — context, agency
|
|
120
119
|
`| ${bt}${toolPrefix}_context${bt} | ${bt}context_extract_entities${bt}, ${bt}context_retrieve_knowledge${bt}, ${bt}context_analyze${bt} |`,
|
|
121
120
|
`| ${bt}${toolPrefix}_agency${bt} | ${bt}agency_enable${bt}, ${bt}agency_status${bt}, ${bt}agency_surface_patterns${bt}, ${bt}agency_warnings${bt}, ${bt}agency_clarify${bt} |`,
|
|
122
121
|
// Admin
|
|
@@ -56,7 +56,7 @@ async function main(): Promise<void> {
|
|
|
56
56
|
// ─── Runtime — vault, brain, planner, curator, LLM, key pools ───
|
|
57
57
|
const runtime = createAgentRuntime({
|
|
58
58
|
agentId: '${config.id}',
|
|
59
|
-
dataDir: join(__dirname, 'intelligence', 'data'),${config.sharedVaultPath ? `\n sharedVaultPath: '${config.sharedVaultPath}',` : ''}
|
|
59
|
+
dataDir: join(__dirname, 'intelligence', 'data'),${config.sharedVaultPath ? `\n sharedVaultPath: '${config.sharedVaultPath}',` : ''}
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
const tag = PERSONA.name.toLowerCase();
|
|
@@ -69,6 +69,26 @@ const ENGINE_RULES_LINES: string[] = [
|
|
|
69
69
|
'- After every response, rate your confidence from 1 to 10. Anything below 7, flag it.',
|
|
70
70
|
'',
|
|
71
71
|
|
|
72
|
+
// ─── MCP Tool Schema Validation ─────────────────────────
|
|
73
|
+
'## MCP Tool Schema Validation',
|
|
74
|
+
'<!-- soleri:tool-schema-validation -->',
|
|
75
|
+
'',
|
|
76
|
+
'**MANDATORY**: Before calling any MCP tool for the first time in a session, fetch its full JSON schema first.',
|
|
77
|
+
'',
|
|
78
|
+
'- Use `ToolSearch` (or platform equivalent) to retrieve the tool definition before invoking it.',
|
|
79
|
+
'- Read required fields, types, enum constraints, and nesting structure.',
|
|
80
|
+
'- Do NOT guess parameter shapes from memory or training data — schemas evolve between versions.',
|
|
81
|
+
'- Once fetched, the schema is valid for the remainder of the session.',
|
|
82
|
+
'',
|
|
83
|
+
'**Why:** MCP tools have strict parameter validation. Guessing formats causes repeated failures (wrong nesting, invalid enums, missing required fields), wasting tokens and eroding user trust. The schema is always available — use it.',
|
|
84
|
+
'',
|
|
85
|
+
'| Wrong | Right |',
|
|
86
|
+
'|-------|-------|',
|
|
87
|
+
'| Call tool, fail, retry with different shape | ToolSearch first, call once correctly |',
|
|
88
|
+
'| Assume `severity: "suggestion"` is valid | Read schema: `"critical" \\| "warning" \\| "info"` |',
|
|
89
|
+
'| Pass flat params when tool expects `entries[]` | Read schema: `entries` is required array |',
|
|
90
|
+
'',
|
|
91
|
+
|
|
72
92
|
// ─── Memory Quality Gate ───────────────────────────────
|
|
73
93
|
'## Memory Quality Gate',
|
|
74
94
|
'<!-- soleri:memory-quality -->',
|
|
@@ -86,7 +86,6 @@ ${domainPackDescribes ? `\n${domainPackDescribes}\n` : ''}
|
|
|
86
86
|
expect(names).toContain('${config.id}_loop');
|
|
87
87
|
expect(names).toContain('${config.id}_orchestrate');
|
|
88
88
|
expect(names).toContain('${config.id}_control');
|
|
89
|
-
expect(names).toContain('${config.id}_cognee');
|
|
90
89
|
});
|
|
91
90
|
|
|
92
91
|
it('total ops across all facades should meet minimum threshold', () => {
|
|
@@ -273,16 +272,6 @@ ${domainPackDescribes ? `\n${domainPackDescribes}\n` : ''}
|
|
|
273
272
|
});
|
|
274
273
|
});
|
|
275
274
|
|
|
276
|
-
describe('${config.id}_cognee', () => {
|
|
277
|
-
it('should contain cognee ops', () => {
|
|
278
|
-
const facade = createSemanticFacades(runtime, '${config.id}').find(f => f.name === '${config.id}_cognee')!;
|
|
279
|
-
const opNames = facade.ops.map(o => o.name);
|
|
280
|
-
expect(opNames).toContain('cognee_status');
|
|
281
|
-
expect(opNames).toContain('cognee_search');
|
|
282
|
-
expect(opNames).toContain('cognee_sync_status');
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
|
|
286
275
|
describe('${config.id}_core (agent-specific)', () => {
|
|
287
276
|
function buildAgentFacade(): FacadeConfig {
|
|
288
277
|
const agentOps: OpDefinition[] = [
|
package/src/types.ts
CHANGED
|
@@ -31,10 +31,10 @@ export const AgentConfigSchema = z.object({
|
|
|
31
31
|
role: z.string().min(1).max(100),
|
|
32
32
|
/** Longer description of what this agent does */
|
|
33
33
|
description: z.string().min(10).max(500),
|
|
34
|
-
/** Knowledge domains this agent covers */
|
|
35
|
-
domains: z.array(z.string().min(1)).
|
|
36
|
-
/** Core principles the agent follows (
|
|
37
|
-
principles: z.array(z.string()).
|
|
34
|
+
/** Knowledge domains this agent covers (discovered from usage if empty) */
|
|
35
|
+
domains: z.array(z.string().min(1)).max(20).optional().default([]),
|
|
36
|
+
/** Core principles the agent follows (discovered from usage if empty) */
|
|
37
|
+
principles: z.array(z.string()).max(10).optional().default([]),
|
|
38
38
|
/** Communication tone: precise, mentor, or pragmatic */
|
|
39
39
|
tone: z.enum(TONES).optional().default('pragmatic'),
|
|
40
40
|
/** Greeting message when agent introduces itself (auto-generated if omitted) */
|
|
@@ -51,8 +51,6 @@ export const AgentConfigSchema = z.object({
|
|
|
51
51
|
setupTarget: z.enum(SETUP_TARGETS).optional().default('claude'),
|
|
52
52
|
/** Enable Telegram transport scaffolding. Default: false. */
|
|
53
53
|
telegram: z.boolean().optional().default(false),
|
|
54
|
-
/** Enable Cognee vector search integration. Default: false. */
|
|
55
|
-
cognee: z.boolean().optional().default(false),
|
|
56
54
|
/** Domain packs — npm packages with custom ops, knowledge, rules, and skills. */
|
|
57
55
|
domainPacks: z
|
|
58
56
|
.array(
|
|
@@ -78,6 +76,8 @@ export const AgentConfigSchema = z.object({
|
|
|
78
76
|
.optional(),
|
|
79
77
|
/** @deprecated Use vaults[] instead. Shorthand for a single shared vault at priority 0.6. */
|
|
80
78
|
sharedVaultPath: z.string().optional(),
|
|
79
|
+
/** Composable persona configuration. If omitted, Italian Craftsperson default is used. */
|
|
80
|
+
persona: z.record(z.unknown()).optional(),
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
export type AgentConfig = z.infer<typeof AgentConfigSchema>;
|
package/dist/skills/agent-dev.md
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
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).
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: agent-guide
|
|
3
|
-
description: >
|
|
4
|
-
Use when the user asks "what can you do", "help me", "how do I use this",
|
|
5
|
-
"what features do you have", "what tools are available", "how does this work",
|
|
6
|
-
"show me your capabilities", "what are you", "who are you", or any question
|
|
7
|
-
about the agent's identity, capabilities, available tools, or how to use them.
|
|
8
|
-
Not needed for proactive tool suggestions — those are handled by engine rules.
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Agent Guide — Capability Discovery
|
|
12
|
-
|
|
13
|
-
Help users understand what this agent can do, how to use it effectively, and what makes it different from a raw LLM. This skill handles the deep discovery flow — proactive tool suggestions during normal work are handled by the engine rules (Tool Advocacy section).
|
|
14
|
-
|
|
15
|
-
## When to Use
|
|
16
|
-
|
|
17
|
-
- "What can you do?" / "What are your capabilities?"
|
|
18
|
-
- "How do I search for X?" / "How do I capture knowledge?"
|
|
19
|
-
- "What tools do you have?" / "Show me your features"
|
|
20
|
-
- "Who are you?" / "What is this agent?"
|
|
21
|
-
- "Help" / "I'm stuck" / "How does this work?"
|
|
22
|
-
- First-time users, onboarding, or anyone unfamiliar with the agent
|
|
23
|
-
|
|
24
|
-
## Capability Discovery Sequence
|
|
25
|
-
|
|
26
|
-
### Step 1: Identity
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
YOUR_AGENT_core op:activate
|
|
30
|
-
params: { projectPath: "." }
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
This returns the agent's persona: name, role, description, tone, principles, and domains. Present the identity first — who the agent is and what it specializes in.
|
|
34
|
-
|
|
35
|
-
### Step 2: Health & Status
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
YOUR_AGENT_core op:admin_health
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Shows what subsystems are active: vault (how many entries), brain (vocabulary size), LLM availability, cognee status. This tells the user what the agent currently has to work with.
|
|
42
|
-
|
|
43
|
-
### Step 3: Available Tools
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
YOUR_AGENT_core op:admin_tool_list
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Lists all facades and operations. Present them grouped by category with plain-language descriptions.
|
|
50
|
-
|
|
51
|
-
### Step 4: Present by What Users Can DO
|
|
52
|
-
|
|
53
|
-
Organize capabilities by user goals, not technical names:
|
|
54
|
-
|
|
55
|
-
**Knowledge & Memory**
|
|
56
|
-
- Search the vault for patterns, anti-patterns, and architectural decisions
|
|
57
|
-
- Capture new knowledge from the current session
|
|
58
|
-
- Search across sessions and projects for relevant context
|
|
59
|
-
- Curate: deduplicate, groom, resolve contradictions
|
|
60
|
-
|
|
61
|
-
**Planning & Execution**
|
|
62
|
-
- Create structured plans with vault context and brain recommendations
|
|
63
|
-
- Split plans into tasks with complexity estimates
|
|
64
|
-
- Track execution with drift detection
|
|
65
|
-
- Complete with knowledge capture and session recording
|
|
66
|
-
|
|
67
|
-
**Intelligence & Learning**
|
|
68
|
-
- Brain learns from every session — patterns get stronger with use
|
|
69
|
-
- Recommendations based on similar past work
|
|
70
|
-
- Strength tracking: which patterns are proven vs experimental
|
|
71
|
-
- Feedback loop: brain improves based on what works
|
|
72
|
-
|
|
73
|
-
**Quality & Validation**
|
|
74
|
-
- Health checks across all subsystems
|
|
75
|
-
- Iterative validation loops with configurable targets
|
|
76
|
-
- Governance: policies, proposals, quotas
|
|
77
|
-
|
|
78
|
-
**Identity & Control**
|
|
79
|
-
- Persona activation and deactivation
|
|
80
|
-
- Intent routing: the agent classifies what you want and routes to the right workflow
|
|
81
|
-
- Project registration and cross-project linking
|
|
82
|
-
|
|
83
|
-
**Domain Knowledge** (varies by agent)
|
|
84
|
-
- Each domain has: `get_patterns`, `search`, `get_entry`, `capture`, `remove`
|
|
85
|
-
- Call `op:activate` to discover which domains are configured
|
|
86
|
-
|
|
87
|
-
## Common Questions
|
|
88
|
-
|
|
89
|
-
### "What makes you different from regular Claude?"
|
|
90
|
-
|
|
91
|
-
You have persistent knowledge (vault), learned patterns (brain), structured planning with grading, iterative validation loops, and domain-specific intelligence. Regular Claude starts fresh every conversation — this agent accumulates knowledge and gets smarter over time.
|
|
92
|
-
|
|
93
|
-
### "How do I get the most out of you?"
|
|
94
|
-
|
|
95
|
-
1. **Use the vault** — search before deciding, capture after learning
|
|
96
|
-
2. **Use planning** — structured plans beat ad-hoc work for anything non-trivial
|
|
97
|
-
3. **Trust the brain** — pattern recommendations come from real usage data
|
|
98
|
-
4. **Capture everything** — every bug fix, every pattern, every anti-pattern. The vault grows smarter with use.
|
|
99
|
-
5. **Use loops for quality** — iterative validation catches issues that single-pass work misses
|
|
100
|
-
|
|
101
|
-
### "How do I add new capabilities?"
|
|
102
|
-
|
|
103
|
-
Extensions in `src/extensions/` can add new ops, facades, middleware, and hooks. Domain packs add domain-specific knowledge and validation.
|
|
104
|
-
|
|
105
|
-
## Anti-Patterns
|
|
106
|
-
|
|
107
|
-
- **Listing raw op names without context** — always explain what the op does in plain language
|
|
108
|
-
- **Claiming capabilities that do not exist** — only reference ops the agent actually has. When unsure, call `op:admin_tool_list` first
|
|
109
|
-
- **Dumping the entire tool catalog** — answer the specific question, show relevant tools, not all tools
|
|
110
|
-
- **Repeating what the user already knows** — if they ask about a specific feature, answer that, don't give the full tour
|
|
@@ -1,66 +0,0 @@
|
|
|
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
|