@soleri/forge 5.14.3 → 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.
@@ -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,107 @@
1
+ ---
2
+ name: vault-curate
3
+ description: >
4
+ Use when the user says "clean vault", "deduplicate", "groom knowledge",
5
+ "consolidate vault", "vault maintenance", "find duplicates", "merge patterns",
6
+ "check contradictions", "vault health", or wants to maintain, clean, reorganize,
7
+ or improve the quality of the agent's knowledge base.
8
+ ---
9
+
10
+ # Vault Curate — Knowledge Maintenance
11
+
12
+ Maintain vault quality through deduplication, grooming, contradiction detection, and consolidation. A well-curated vault produces better search results and brain recommendations.
13
+
14
+ ## When to Use
15
+
16
+ Periodically (weekly or after heavy capture sessions), when search quality degrades, when vault health shows warnings, or when the user explicitly requests maintenance.
17
+
18
+ ## Orchestration Sequence
19
+
20
+ ### Step 1: Health Assessment
21
+
22
+ ```
23
+ YOUR_AGENT_core op:knowledge_health
24
+ ```
25
+
26
+ ```
27
+ YOUR_AGENT_core op:get_vault_analytics
28
+ ```
29
+
30
+ Present the health summary to the user before proceeding: total entries, quality scores, staleness, coverage gaps.
31
+
32
+ ### Step 2: Detect Duplicates
33
+
34
+ ```
35
+ YOUR_AGENT_core op:curator_detect_duplicates
36
+ ```
37
+
38
+ This finds entries with overlapping titles, descriptions, or content. Review the duplicate pairs — some may be intentional (different contexts) while others are true duplicates.
39
+
40
+ For true duplicates:
41
+
42
+ ```
43
+ YOUR_AGENT_core op:merge_patterns
44
+ params: { patternIds: ["<id1>", "<id2>"] }
45
+ ```
46
+
47
+ Preserve the best content from each.
48
+
49
+ ### Step 3: Find Contradictions
50
+
51
+ ```
52
+ YOUR_AGENT_core op:curator_contradictions
53
+ ```
54
+
55
+ Contradictions erode trust in vault search results. For each contradiction: decide which entry is correct (check dates, context, evidence), then archive or update the incorrect one.
56
+
57
+ ### Step 4: Groom Entries
58
+
59
+ ```
60
+ YOUR_AGENT_core op:curator_groom_all
61
+ ```
62
+
63
+ Runs tag enrichment and metadata cleanup across all entries. This improves searchability and categorization.
64
+
65
+ For targeted grooming of specific entries:
66
+
67
+ ```
68
+ YOUR_AGENT_core op:curator_groom
69
+ params: { entryIds: ["<id>"], tags: ["<tag>"] }
70
+ ```
71
+
72
+ ### Step 5: GPT Enrichment (Optional)
73
+
74
+ ```
75
+ YOUR_AGENT_core op:curator_gpt_enrich
76
+ ```
77
+
78
+ Adds AI-generated metadata to entries that lack descriptions, examples, or context. Fills in gaps without changing the core content.
79
+
80
+ ### Step 6: Full Consolidation
81
+
82
+ ```
83
+ YOUR_AGENT_core op:curator_consolidate
84
+ ```
85
+
86
+ Runs the complete pipeline: dedup + archive stale entries + resolve contradictions. This is the heavy-duty cleanup.
87
+
88
+ ### Step 7: Knowledge Reorganization
89
+
90
+ ```
91
+ YOUR_AGENT_core op:knowledge_reorganize
92
+ params: { mode: "preview" }
93
+ ```
94
+
95
+ Preview first, then run again with `mode: "apply"` if the preview looks good.
96
+
97
+ ### Step 8: Verify Results
98
+
99
+ ```
100
+ YOUR_AGENT_core op:knowledge_health
101
+ ```
102
+
103
+ Compare with Step 1 metrics. Vault health should improve: fewer duplicates, no contradictions, better coverage.
104
+
105
+ ## Exit Criteria
106
+
107
+ Curation is complete when: duplicates merged, contradictions resolved, entries groomed, and health metrics improved compared to Step 1 baseline.
@@ -5,6 +5,8 @@ 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',
@@ -20,6 +22,7 @@ const AGENT_SPECIFIC_SKILLS = new Set([
20
22
  'systematic-debugging',
21
23
  'test-driven-development',
22
24
  'vault-capture',
25
+ 'vault-curate',
23
26
  'vault-navigator',
24
27
  'verification-before-completion',
25
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,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAEnD,wFAAwF;AACxF,MAAM,qBAAqB,GAA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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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleri/forge",
3
- "version": "5.14.3",
3
+ "version": "5.14.4",
4
4
  "description": "Scaffold AI agents that learn, remember, and grow with you.",
5
5
  "keywords": [
6
6
  "agent",
@@ -262,7 +262,7 @@ describe('Scaffolder', () => {
262
262
  .filter((e) => e.isDirectory())
263
263
  .map((e) => e.name);
264
264
 
265
- expect(skillDirs).toHaveLength(19);
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,6 +276,8 @@ 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',
@@ -292,6 +294,7 @@ describe('Scaffolder', () => {
292
294
  'systematic-debugging',
293
295
  'test-driven-development',
294
296
  'vault-capture',
297
+ 'vault-curate',
295
298
  'vault-navigator',
296
299
  'verification-before-completion',
297
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,107 @@
1
+ ---
2
+ name: vault-curate
3
+ description: >
4
+ Use when the user says "clean vault", "deduplicate", "groom knowledge",
5
+ "consolidate vault", "vault maintenance", "find duplicates", "merge patterns",
6
+ "check contradictions", "vault health", or wants to maintain, clean, reorganize,
7
+ or improve the quality of the agent's knowledge base.
8
+ ---
9
+
10
+ # Vault Curate — Knowledge Maintenance
11
+
12
+ Maintain vault quality through deduplication, grooming, contradiction detection, and consolidation. A well-curated vault produces better search results and brain recommendations.
13
+
14
+ ## When to Use
15
+
16
+ Periodically (weekly or after heavy capture sessions), when search quality degrades, when vault health shows warnings, or when the user explicitly requests maintenance.
17
+
18
+ ## Orchestration Sequence
19
+
20
+ ### Step 1: Health Assessment
21
+
22
+ ```
23
+ YOUR_AGENT_core op:knowledge_health
24
+ ```
25
+
26
+ ```
27
+ YOUR_AGENT_core op:get_vault_analytics
28
+ ```
29
+
30
+ Present the health summary to the user before proceeding: total entries, quality scores, staleness, coverage gaps.
31
+
32
+ ### Step 2: Detect Duplicates
33
+
34
+ ```
35
+ YOUR_AGENT_core op:curator_detect_duplicates
36
+ ```
37
+
38
+ This finds entries with overlapping titles, descriptions, or content. Review the duplicate pairs — some may be intentional (different contexts) while others are true duplicates.
39
+
40
+ For true duplicates:
41
+
42
+ ```
43
+ YOUR_AGENT_core op:merge_patterns
44
+ params: { patternIds: ["<id1>", "<id2>"] }
45
+ ```
46
+
47
+ Preserve the best content from each.
48
+
49
+ ### Step 3: Find Contradictions
50
+
51
+ ```
52
+ YOUR_AGENT_core op:curator_contradictions
53
+ ```
54
+
55
+ Contradictions erode trust in vault search results. For each contradiction: decide which entry is correct (check dates, context, evidence), then archive or update the incorrect one.
56
+
57
+ ### Step 4: Groom Entries
58
+
59
+ ```
60
+ YOUR_AGENT_core op:curator_groom_all
61
+ ```
62
+
63
+ Runs tag enrichment and metadata cleanup across all entries. This improves searchability and categorization.
64
+
65
+ For targeted grooming of specific entries:
66
+
67
+ ```
68
+ YOUR_AGENT_core op:curator_groom
69
+ params: { entryIds: ["<id>"], tags: ["<tag>"] }
70
+ ```
71
+
72
+ ### Step 5: GPT Enrichment (Optional)
73
+
74
+ ```
75
+ YOUR_AGENT_core op:curator_gpt_enrich
76
+ ```
77
+
78
+ Adds AI-generated metadata to entries that lack descriptions, examples, or context. Fills in gaps without changing the core content.
79
+
80
+ ### Step 6: Full Consolidation
81
+
82
+ ```
83
+ YOUR_AGENT_core op:curator_consolidate
84
+ ```
85
+
86
+ Runs the complete pipeline: dedup + archive stale entries + resolve contradictions. This is the heavy-duty cleanup.
87
+
88
+ ### Step 7: Knowledge Reorganization
89
+
90
+ ```
91
+ YOUR_AGENT_core op:knowledge_reorganize
92
+ params: { mode: "preview" }
93
+ ```
94
+
95
+ Preview first, then run again with `mode: "apply"` if the preview looks good.
96
+
97
+ ### Step 8: Verify Results
98
+
99
+ ```
100
+ YOUR_AGENT_core op:knowledge_health
101
+ ```
102
+
103
+ Compare with Step 1 metrics. Vault health should improve: fewer duplicates, no contradictions, better coverage.
104
+
105
+ ## Exit Criteria
106
+
107
+ Curation is complete when: duplicates merged, contradictions resolved, entries groomed, and health metrics improved compared to Step 1 baseline.
@@ -8,6 +8,8 @@ const SKILLS_DIR = join(__dirname, '..', 'skills');
8
8
 
9
9
  /** Skills that use YOUR_AGENT_core placeholder and need agent-specific substitution. */
10
10
  const AGENT_SPECIFIC_SKILLS = new Set([
11
+ 'agent-dev',
12
+ 'agent-persona',
11
13
  'brain-debrief',
12
14
  'brainstorming',
13
15
  'code-patrol',
@@ -23,6 +25,7 @@ const AGENT_SPECIFIC_SKILLS = new Set([
23
25
  'systematic-debugging',
24
26
  'test-driven-development',
25
27
  'vault-capture',
28
+ 'vault-curate',
26
29
  'vault-navigator',
27
30
  'verification-before-completion',
28
31
  'writing-plans',