@soleri/forge 9.0.0 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/compose-claude-md.js +1 -1
  2. package/dist/compose-claude-md.js.map +1 -1
  3. package/dist/scaffold-filetree.js +10 -1
  4. package/dist/scaffold-filetree.js.map +1 -1
  5. package/dist/skills/brain-debrief/SKILL.md +70 -0
  6. package/dist/skills/brainstorming/SKILL.md +89 -0
  7. package/dist/skills/code-patrol/SKILL.md +86 -0
  8. package/dist/skills/context-resume/SKILL.md +95 -0
  9. package/dist/skills/deep-review/SKILL.md +186 -0
  10. package/dist/skills/executing-plans/SKILL.md +91 -0
  11. package/dist/skills/fix-and-learn/SKILL.md +102 -0
  12. package/dist/skills/health-check/SKILL.md +135 -0
  13. package/dist/skills/knowledge-harvest/SKILL.md +97 -0
  14. package/dist/skills/onboard-me/SKILL.md +121 -0
  15. package/dist/skills/parallel-execute/SKILL.md +277 -0
  16. package/dist/skills/retrospective/SKILL.md +98 -0
  17. package/dist/skills/second-opinion/SKILL.md +97 -0
  18. package/dist/skills/systematic-debugging/SKILL.md +103 -0
  19. package/dist/skills/test-driven-development/SKILL.md +91 -0
  20. package/dist/skills/vault-capture/SKILL.md +86 -0
  21. package/dist/skills/vault-navigator/SKILL.md +84 -0
  22. package/dist/skills/vault-smells/SKILL.md +251 -0
  23. package/dist/skills/verification-before-completion/SKILL.md +85 -0
  24. package/dist/skills/writing-plans/SKILL.md +108 -0
  25. package/dist/templates/agents-md.js +2 -2
  26. package/dist/templates/agents-md.js.map +1 -1
  27. package/dist/templates/claude-md-template.js +2 -2
  28. package/dist/templates/claude-md-template.js.map +1 -1
  29. package/dist/templates/shared-rules.js +35 -1
  30. package/dist/templates/shared-rules.js.map +1 -1
  31. package/dist/templates/skills.js +28 -6
  32. package/dist/templates/skills.js.map +1 -1
  33. package/dist/types.d.ts +1 -1
  34. package/dist/types.js +6 -2
  35. package/dist/types.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/__tests__/scaffolder.test.ts +17 -35
  38. package/src/compose-claude-md.ts +1 -1
  39. package/src/scaffold-filetree.ts +12 -1
  40. package/src/skills/brain-debrief/SKILL.md +70 -0
  41. package/src/skills/brainstorming/SKILL.md +89 -0
  42. package/src/skills/code-patrol/SKILL.md +86 -0
  43. package/src/skills/context-resume/SKILL.md +95 -0
  44. package/src/skills/deep-review/SKILL.md +186 -0
  45. package/src/skills/executing-plans/SKILL.md +91 -0
  46. package/src/skills/fix-and-learn/SKILL.md +102 -0
  47. package/src/skills/health-check/SKILL.md +135 -0
  48. package/src/skills/knowledge-harvest/SKILL.md +97 -0
  49. package/src/skills/onboard-me/SKILL.md +121 -0
  50. package/src/skills/parallel-execute/SKILL.md +277 -0
  51. package/src/skills/retrospective/SKILL.md +98 -0
  52. package/src/skills/second-opinion/SKILL.md +97 -0
  53. package/src/skills/systematic-debugging/SKILL.md +103 -0
  54. package/src/skills/test-driven-development/SKILL.md +91 -0
  55. package/src/skills/vault-capture/SKILL.md +86 -0
  56. package/src/skills/vault-navigator/SKILL.md +84 -0
  57. package/src/skills/vault-smells/SKILL.md +251 -0
  58. package/src/skills/verification-before-completion/SKILL.md +85 -0
  59. package/src/skills/writing-plans/SKILL.md +108 -0
  60. package/src/templates/agents-md.ts +2 -2
  61. package/src/templates/claude-md-template.ts +2 -2
  62. package/src/templates/shared-rules.ts +36 -1
  63. package/src/templates/skills.ts +27 -6
  64. package/src/types.ts +7 -2
  65. package/dist/skills/agent-dev.md +0 -122
  66. package/dist/skills/agent-guide.md +0 -110
  67. package/dist/skills/agent-persona.md +0 -66
  68. package/dist/skills/brain-debrief.md +0 -214
  69. package/dist/skills/brainstorming.md +0 -180
  70. package/dist/skills/code-patrol.md +0 -178
  71. package/dist/skills/context-resume.md +0 -146
  72. package/dist/skills/deliver-and-ship.md +0 -123
  73. package/dist/skills/env-setup.md +0 -151
  74. package/dist/skills/executing-plans.md +0 -216
  75. package/dist/skills/fix-and-learn.md +0 -167
  76. package/dist/skills/health-check.md +0 -231
  77. package/dist/skills/knowledge-harvest.md +0 -185
  78. package/dist/skills/onboard-me.md +0 -198
  79. package/dist/skills/retrospective.md +0 -205
  80. package/dist/skills/second-opinion.md +0 -149
  81. package/dist/skills/systematic-debugging.md +0 -241
  82. package/dist/skills/test-driven-development.md +0 -281
  83. package/dist/skills/vault-capture.md +0 -170
  84. package/dist/skills/vault-curate.md +0 -107
  85. package/dist/skills/vault-navigator.md +0 -140
  86. package/dist/skills/verification-before-completion.md +0 -182
  87. package/dist/skills/writing-plans.md +0 -215
  88. package/src/skills/agent-dev.md +0 -122
  89. package/src/skills/agent-guide.md +0 -110
  90. package/src/skills/agent-persona.md +0 -66
  91. package/src/skills/brain-debrief.md +0 -214
  92. package/src/skills/brainstorming.md +0 -180
  93. package/src/skills/code-patrol.md +0 -178
  94. package/src/skills/context-resume.md +0 -146
  95. package/src/skills/deliver-and-ship.md +0 -123
  96. package/src/skills/env-setup.md +0 -151
  97. package/src/skills/executing-plans.md +0 -216
  98. package/src/skills/fix-and-learn.md +0 -167
  99. package/src/skills/health-check.md +0 -231
  100. package/src/skills/knowledge-harvest.md +0 -185
  101. package/src/skills/onboard-me.md +0 -198
  102. package/src/skills/retrospective.md +0 -205
  103. package/src/skills/second-opinion.md +0 -149
  104. package/src/skills/systematic-debugging.md +0 -241
  105. package/src/skills/test-driven-development.md +0 -281
  106. package/src/skills/vault-capture.md +0 -170
  107. package/src/skills/vault-curate.md +0 -107
  108. package/src/skills/vault-navigator.md +0 -140
  109. package/src/skills/verification-before-completion.md +0 -182
  110. package/src/skills/writing-plans.md +0 -215
@@ -61,13 +61,13 @@ When the user asks about your capabilities or you need to check what you've lear
61
61
  ## Session Start
62
62
 
63
63
  Do NOT call any tools automatically on session start. Just greet the user in character.
64
- Only call ${bt}${tp}_orchestrate op:register${bt} or ${bt}${tp}_core op:activate${bt} when you actually need project context or capability discovery — not on every message.
64
+ Only call ${bt}${tp}_orchestrate op:session_start${bt} or ${bt}${tp}_core op:activate${bt} when you actually need project context or capability discovery — not on every message.
65
65
 
66
66
  ## Essential Tools
67
67
 
68
68
  | Facade | Key Ops |
69
69
  |--------|---------|
70
- | ${bt}${tp}_core${bt} | ${bt}health${bt}, ${bt}search${bt}, ${bt}identity${bt}, ${bt}register${bt}, ${bt}activate${bt} |
70
+ | ${bt}${tp}_core${bt} | ${bt}health${bt}, ${bt}search${bt}, ${bt}identity${bt}, ${bt}session_start${bt}, ${bt}activate${bt} |
71
71
  ${domainRows}
72
72
  | ${bt}${tp}_vault${bt} | ${bt}search_intelligent${bt}, ${bt}capture_knowledge${bt}, ${bt}capture_quick${bt}, ${bt}search_feedback${bt} |
73
73
  | ${bt}${tp}_vault${bt} (keeper) | ${bt}knowledge_audit${bt}, ${bt}knowledge_health${bt}, ${bt}knowledge_merge${bt}, ${bt}knowledge_reorganize${bt} |
@@ -66,7 +66,7 @@ export function generateClaudeMdTemplate(config: AgentConfig): string {
66
66
  // ─── Session Start ─────────────────────────────────────
67
67
  '## Session Start',
68
68
  '',
69
- `On every new session: ${bt}${toolPrefix}_orchestrate op:register params:{ projectPath: "." }${bt}`,
69
+ `On every new session: ${bt}${toolPrefix}_orchestrate op:session_start params:{ projectPath: "." }${bt}`,
70
70
  '',
71
71
  ];
72
72
 
@@ -77,7 +77,7 @@ export function generateClaudeMdTemplate(config: AgentConfig): string {
77
77
  '',
78
78
  '| Facade | Key Ops |',
79
79
  '|--------|---------|',
80
- `| ${bt}${toolPrefix}_core${bt} | ${bt}health${bt}, ${bt}search${bt}, ${bt}identity${bt}, ${bt}register${bt}, ${bt}activate${bt} |`,
80
+ `| ${bt}${toolPrefix}_core${bt} | ${bt}health${bt}, ${bt}search${bt}, ${bt}identity${bt}, ${bt}session_start${bt}, ${bt}activate${bt} |`,
81
81
  );
82
82
 
83
83
  // Domain facades — one row per domain
@@ -119,6 +119,7 @@ const ENGINE_RULES_LINES: string[] = [
119
119
  '## Planning',
120
120
  '<!-- soleri:planning -->',
121
121
  '',
122
+ '- **MANDATORY**: Create a formal plan (`op:create_plan`) for every work task. Memory and vault knowledge alone are not sufficient — plans must be persisted and graded.',
122
123
  '- Use `op:create_plan` before writing ANY code. Show the plan, wait for approval.',
123
124
  '- Two-gate approval: Gate 1 (`op:approve_plan`), Gate 2 (`op:plan_split`). Never skip either.',
124
125
  '- Wait for explicit "yes" / "approve" before proceeding past each gate.',
@@ -127,6 +128,15 @@ const ENGINE_RULES_LINES: string[] = [
127
128
  '- On session start: check for plans in `executing`/`reconciling` state and remind.',
128
129
  '- Exceptions: read-only operations, user says "just do it", single-line fixes.',
129
130
  '',
131
+ '### Grade Gate',
132
+ '',
133
+ '**MANDATORY**: Plans must grade **A or higher** before approval. The engine enforces this programmatically.',
134
+ '',
135
+ '- `op:approve_plan` will **reject** any plan with a latest grade below A (score < 90).',
136
+ '- If rejected, iterate on the plan (`op:create_plan`) to address the gaps, then re-grade (`op:plan_grade`) before approving.',
137
+ '- The threshold is configurable per-agent via `engine.minGradeForApproval` in `agent.yaml` (default: `A`).',
138
+ '- Plans with no grade check are allowed through for backward compatibility.',
139
+ '',
130
140
  '### Lifecycle States',
131
141
  '',
132
142
  '| State | Expires | Next Action |',
@@ -339,7 +349,7 @@ const ENGINE_RULES_LINES: string[] = [
339
349
  '### Session Start Protocol',
340
350
  '',
341
351
  'Do NOT call tools automatically on session start — just greet the user in character.',
342
- 'Call `op:register` only when you need project context for a task (not on every message).',
352
+ 'Call `op:session_start` only when you need project context for a task (not on every message).',
343
353
  'Call `op:activate` only when checking evolved capabilities or recovering session state.',
344
354
  '',
345
355
  '### Context Compaction',
@@ -418,5 +428,30 @@ const ENGINE_RULES_LINES: string[] = [
418
428
  '| Template drift suspected | `soleri agent diff` to see what changed |',
419
429
  '',
420
430
 
431
+ // ─── Verification Protocol ─────────────────────────────────
432
+ '## Verification Protocol',
433
+ '<!-- soleri:verification-protocol -->',
434
+ '',
435
+ '**MANDATORY** when modifying existing code: prove before you fix.',
436
+ '',
437
+ '### The Rule',
438
+ '',
439
+ '1. **Find** — identify the issue in existing code',
440
+ '2. **Prove** — reproduce the issue (test case, error log, stack trace)',
441
+ '3. **Fix** — only after the issue is proven reproducible',
442
+ '',
443
+ '### Anti-pattern',
444
+ '',
445
+ '- Fixing code "just in case" or for aesthetics without a proven issue',
446
+ '- Claiming a bug exists without reproduction evidence',
447
+ '- Refactoring working code under the guise of a bug fix',
448
+ '',
449
+ '### Scope',
450
+ '',
451
+ '- Applies ONLY to tasks that modify existing code',
452
+ '- Does NOT apply to new code, new files, or greenfield features',
453
+ '- Advisory only — flags warnings, never blocks execution',
454
+ '',
455
+
421
456
  `<!-- /${ENGINE_MARKER} -->`,
422
457
  ];
@@ -1,4 +1,4 @@
1
- import { readFileSync, readdirSync } from 'node:fs';
1
+ import { readFileSync, readdirSync, existsSync, statSync } from 'node:fs';
2
2
  import { join, dirname } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import type { AgentConfig } from '../types.js';
@@ -15,12 +15,14 @@ const AGENT_SPECIFIC_SKILLS = new Set([
15
15
  'brainstorming',
16
16
  'code-patrol',
17
17
  'context-resume',
18
+ 'deep-review',
18
19
  'deliver-and-ship',
19
20
  'executing-plans',
20
21
  'fix-and-learn',
21
22
  'health-check',
22
23
  'knowledge-harvest',
23
24
  'onboard-me',
25
+ 'parallel-execute',
24
26
  'retrospective',
25
27
  'second-opinion',
26
28
  'systematic-debugging',
@@ -28,6 +30,7 @@ const AGENT_SPECIFIC_SKILLS = new Set([
28
30
  'vault-capture',
29
31
  'vault-curate',
30
32
  'vault-navigator',
33
+ 'vault-smells',
31
34
  'verification-before-completion',
32
35
  'writing-plans',
33
36
  ]);
@@ -43,10 +46,10 @@ const AGENT_SPECIFIC_SKILLS = new Set([
43
46
  */
44
47
  export function generateSkills(config: AgentConfig): Array<[string, string]> {
45
48
  const files: Array<[string, string]> = [];
46
- let skillFiles: string[];
49
+ let entries: string[];
47
50
 
48
51
  try {
49
- skillFiles = readdirSync(SKILLS_DIR).filter((f) => f.endsWith('.md'));
52
+ entries = readdirSync(SKILLS_DIR);
50
53
  } catch {
51
54
  return files;
52
55
  }
@@ -55,14 +58,32 @@ export function generateSkills(config: AgentConfig): Array<[string, string]> {
55
58
  // undefined = include all (backward compat), [] = include none.
56
59
  const allowedSkills = config.skills ? new Set(config.skills) : null; // null = include all (backward compat)
57
60
 
58
- for (const file of skillFiles) {
59
- const skillName = file.replace('.md', '');
61
+ for (const entry of entries) {
62
+ const entryPath = join(SKILLS_DIR, entry);
63
+
64
+ // Support both layouts:
65
+ // - Directory: skills/{name}/SKILL.md (current)
66
+ // - Flat file: skills/{name}.md (legacy)
67
+ let skillName: string;
68
+ let contentPath: string;
69
+
70
+ if (statSync(entryPath).isDirectory()) {
71
+ const skillMd = join(entryPath, 'SKILL.md');
72
+ if (!existsSync(skillMd)) continue;
73
+ skillName = entry;
74
+ contentPath = skillMd;
75
+ } else if (entry.endsWith('.md')) {
76
+ skillName = entry.replace('.md', '');
77
+ contentPath = entryPath;
78
+ } else {
79
+ continue;
80
+ }
60
81
 
61
82
  if (allowedSkills && !allowedSkills.has(skillName)) {
62
83
  continue;
63
84
  }
64
85
 
65
- let content = readFileSync(join(SKILLS_DIR, file), 'utf-8');
86
+ let content = readFileSync(contentPath, 'utf-8');
66
87
 
67
88
  if (AGENT_SPECIFIC_SKILLS.has(skillName)) {
68
89
  content = content.replace(/YOUR_AGENT_core/g, `${config.id}_core`);
package/src/types.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  import { z } from 'zod';
2
+ import { join } from 'node:path';
3
+ import { homedir } from 'node:os';
2
4
 
3
5
  /** Communication tone for the agent persona */
4
6
  const TONES = ['precise', 'mentor', 'pragmatic'] as const;
5
7
 
8
+ /** Default parent directory for new agents: ~/.soleri/ */
9
+ const SOLERI_HOME_DEFAULT = process.env.SOLERI_HOME ?? join(homedir(), '.soleri');
10
+
6
11
  /** Where to scaffold host/client integration setup. */
7
12
  export const SETUP_TARGETS = ['claude', 'codex', 'opencode', 'both', 'all'] as const;
8
13
  export type SetupTarget = (typeof SETUP_TARGETS)[number];
@@ -39,8 +44,8 @@ export const AgentConfigSchema = z.object({
39
44
  tone: z.enum(TONES).optional().default('pragmatic'),
40
45
  /** Greeting message when agent introduces itself (auto-generated if omitted) */
41
46
  greeting: z.string().min(10).max(300).optional(),
42
- /** Output directory (parent — agent dir will be created inside, defaults to cwd) */
43
- outputDir: z.string().min(1).optional().default(process.cwd()),
47
+ /** Output directory (parent — agent dir will be created inside, defaults to ~/.soleri/) */
48
+ outputDir: z.string().min(1).optional().default(SOLERI_HOME_DEFAULT),
44
49
  /** Hook packs to install after scaffolding (optional) */
45
50
  hookPacks: z.array(z.string()).optional(),
46
51
  /** Skills to include (if omitted, all skills are included for backward compat) */
@@ -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. 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