@soleri/forge 9.0.0 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compose-claude-md.js +1 -1
- package/dist/compose-claude-md.js.map +1 -1
- package/dist/scaffold-filetree.js +10 -1
- package/dist/scaffold-filetree.js.map +1 -1
- package/dist/skills/brain-debrief/SKILL.md +70 -0
- package/dist/skills/brainstorming/SKILL.md +89 -0
- package/dist/skills/code-patrol/SKILL.md +86 -0
- package/dist/skills/context-resume/SKILL.md +95 -0
- package/dist/skills/deep-review/SKILL.md +186 -0
- package/dist/skills/executing-plans/SKILL.md +91 -0
- package/dist/skills/fix-and-learn/SKILL.md +102 -0
- package/dist/skills/health-check/SKILL.md +135 -0
- package/dist/skills/knowledge-harvest/SKILL.md +97 -0
- package/dist/skills/onboard-me/SKILL.md +121 -0
- package/dist/skills/parallel-execute/SKILL.md +277 -0
- package/dist/skills/retrospective/SKILL.md +98 -0
- package/dist/skills/second-opinion/SKILL.md +97 -0
- package/dist/skills/systematic-debugging/SKILL.md +103 -0
- package/dist/skills/test-driven-development/SKILL.md +91 -0
- package/dist/skills/vault-capture/SKILL.md +86 -0
- package/dist/skills/vault-navigator/SKILL.md +84 -0
- package/dist/skills/vault-smells/SKILL.md +251 -0
- package/dist/skills/verification-before-completion/SKILL.md +85 -0
- package/dist/skills/writing-plans/SKILL.md +108 -0
- package/dist/templates/agents-md.js +2 -2
- package/dist/templates/agents-md.js.map +1 -1
- package/dist/templates/claude-md-template.js +2 -2
- package/dist/templates/claude-md-template.js.map +1 -1
- package/dist/templates/shared-rules.js +35 -1
- package/dist/templates/shared-rules.js.map +1 -1
- package/dist/templates/skills.js +28 -6
- package/dist/templates/skills.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +6 -2
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/scaffolder.test.ts +17 -35
- package/src/compose-claude-md.ts +1 -1
- package/src/scaffold-filetree.ts +12 -1
- package/src/skills/brain-debrief/SKILL.md +70 -0
- package/src/skills/brainstorming/SKILL.md +89 -0
- package/src/skills/code-patrol/SKILL.md +86 -0
- package/src/skills/context-resume/SKILL.md +95 -0
- package/src/skills/deep-review/SKILL.md +186 -0
- package/src/skills/executing-plans/SKILL.md +91 -0
- package/src/skills/fix-and-learn/SKILL.md +102 -0
- package/src/skills/health-check/SKILL.md +135 -0
- package/src/skills/knowledge-harvest/SKILL.md +97 -0
- package/src/skills/onboard-me/SKILL.md +121 -0
- package/src/skills/parallel-execute/SKILL.md +277 -0
- package/src/skills/retrospective/SKILL.md +98 -0
- package/src/skills/second-opinion/SKILL.md +97 -0
- package/src/skills/systematic-debugging/SKILL.md +103 -0
- package/src/skills/test-driven-development/SKILL.md +91 -0
- package/src/skills/vault-capture/SKILL.md +86 -0
- package/src/skills/vault-navigator/SKILL.md +84 -0
- package/src/skills/vault-smells/SKILL.md +251 -0
- package/src/skills/verification-before-completion/SKILL.md +85 -0
- package/src/skills/writing-plans/SKILL.md +108 -0
- package/src/templates/agents-md.ts +2 -2
- package/src/templates/claude-md-template.ts +2 -2
- package/src/templates/shared-rules.ts +36 -1
- package/src/templates/skills.ts +27 -6
- package/src/types.ts +7 -2
- package/dist/skills/agent-dev.md +0 -122
- package/dist/skills/agent-guide.md +0 -110
- package/dist/skills/agent-persona.md +0 -66
- package/dist/skills/brain-debrief.md +0 -214
- package/dist/skills/brainstorming.md +0 -180
- package/dist/skills/code-patrol.md +0 -178
- package/dist/skills/context-resume.md +0 -146
- package/dist/skills/deliver-and-ship.md +0 -123
- package/dist/skills/env-setup.md +0 -151
- package/dist/skills/executing-plans.md +0 -216
- package/dist/skills/fix-and-learn.md +0 -167
- package/dist/skills/health-check.md +0 -231
- package/dist/skills/knowledge-harvest.md +0 -185
- package/dist/skills/onboard-me.md +0 -198
- package/dist/skills/retrospective.md +0 -205
- package/dist/skills/second-opinion.md +0 -149
- package/dist/skills/systematic-debugging.md +0 -241
- package/dist/skills/test-driven-development.md +0 -281
- package/dist/skills/vault-capture.md +0 -170
- package/dist/skills/vault-curate.md +0 -107
- package/dist/skills/vault-navigator.md +0 -140
- package/dist/skills/verification-before-completion.md +0 -182
- package/dist/skills/writing-plans.md +0 -215
- package/src/skills/agent-dev.md +0 -122
- package/src/skills/agent-guide.md +0 -110
- package/src/skills/agent-persona.md +0 -66
- package/src/skills/brain-debrief.md +0 -214
- package/src/skills/brainstorming.md +0 -180
- package/src/skills/code-patrol.md +0 -178
- package/src/skills/context-resume.md +0 -146
- package/src/skills/deliver-and-ship.md +0 -123
- package/src/skills/env-setup.md +0 -151
- package/src/skills/executing-plans.md +0 -216
- package/src/skills/fix-and-learn.md +0 -167
- package/src/skills/health-check.md +0 -231
- package/src/skills/knowledge-harvest.md +0 -185
- package/src/skills/onboard-me.md +0 -198
- package/src/skills/retrospective.md +0 -205
- package/src/skills/second-opinion.md +0 -149
- package/src/skills/systematic-debugging.md +0 -241
- package/src/skills/test-driven-development.md +0 -281
- package/src/skills/vault-capture.md +0 -170
- package/src/skills/vault-curate.md +0 -107
- package/src/skills/vault-navigator.md +0 -140
- package/src/skills/verification-before-completion.md +0 -182
- package/src/skills/writing-plans.md +0 -215
|
@@ -106,7 +106,7 @@ function composeSessionStart(agent) {
|
|
|
106
106
|
return [
|
|
107
107
|
'## Session Start',
|
|
108
108
|
'',
|
|
109
|
-
`On every new session: \`${agent.id}_core op:
|
|
109
|
+
`On every new session: \`${agent.id}_core op:session_start params:{ projectPath: "." }\``,
|
|
110
110
|
].join('\n');
|
|
111
111
|
}
|
|
112
112
|
function composeToolsTable(agent, tools) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-claude-md.js","sourceRoot":"","sources":["../src/compose-claude-md.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,M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{ AgentYamlSchema } from './agent-schema.js';
|
|
14
14
|
import { getEngineRulesContent } from './templates/shared-rules.js';
|
|
15
15
|
import { composeClaudeMd } from './compose-claude-md.js';
|
|
16
|
+
import { generateSkills } from './templates/skills.js';
|
|
16
17
|
const BUILTIN_WORKFLOWS = [
|
|
17
18
|
{
|
|
18
19
|
name: 'feature-dev',
|
|
@@ -215,6 +216,8 @@ export function scaffoldFileTree(input, outputDir) {
|
|
|
215
216
|
});
|
|
216
217
|
writeFile(agentDir, 'agent.yaml', agentYamlContent, filesCreated);
|
|
217
218
|
// ─── 3. Write .mcp.json ─────────────────────────────────────
|
|
219
|
+
// Scaffold uses npx as portable fallback. `soleri install` overwrites
|
|
220
|
+
// with resolved absolute path for instant startup (no npm resolution).
|
|
218
221
|
const mcpJson = {
|
|
219
222
|
mcpServers: {
|
|
220
223
|
'soleri-engine': {
|
|
@@ -267,7 +270,13 @@ export function scaffoldFileTree(input, outputDir) {
|
|
|
267
270
|
writeFile(agentDir, `workflows/${wf.name}/gates.yaml`, wf.gates, filesCreated);
|
|
268
271
|
writeFile(agentDir, `workflows/${wf.name}/tools.yaml`, wf.tools, filesCreated);
|
|
269
272
|
}
|
|
270
|
-
// ─── 8.
|
|
273
|
+
// ─── 8. Copy bundled skills (with placeholder substitution) ─
|
|
274
|
+
const skills = generateSkills({ id: config.id });
|
|
275
|
+
for (const [relativePath, content] of skills) {
|
|
276
|
+
mkdirSync(join(agentDir, dirname(relativePath)), { recursive: true });
|
|
277
|
+
writeFile(agentDir, relativePath, content, filesCreated);
|
|
278
|
+
}
|
|
279
|
+
// ─── 9. Write knowledge bundles (seed from starter packs if available) ──
|
|
271
280
|
const starterPacksDir = resolveStarterPacksDir();
|
|
272
281
|
let totalSeeded = 0;
|
|
273
282
|
for (const domain of config.domains) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold-filetree.js","sourceRoot":"","sources":["../src/scaffold-filetree.ts"],"names":[],"mappings":"AAAA;;;;;;;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AC;gBACxB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;YACxB,CAAC;iBAAM,IAAI,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;gBACvD,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,0CAA0C;IAC5C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brain-debrief
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user wants to explore the brain's learned PATTERNS — "brain stats", "pattern
|
|
5
|
+
strengths", "what patterns are strongest", "intelligence report", "show brain data". Focused
|
|
6
|
+
on the brain module's accumulated pattern intelligence. For time-bound sprint or weekly
|
|
7
|
+
reflection, use retrospective instead.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Brain Debrief — Intelligence Report
|
|
11
|
+
|
|
12
|
+
Surface what the brain has learned across sessions and projects. Turns raw vault data into actionable intelligence.
|
|
13
|
+
|
|
14
|
+
## Orchestration by Query Type
|
|
15
|
+
|
|
16
|
+
### "What have I learned?" (General debrief)
|
|
17
|
+
|
|
18
|
+
1. `YOUR_AGENT_core op:brain_stats` — total sessions, patterns, quality scores
|
|
19
|
+
2. `YOUR_AGENT_core op:brain_strengths` — patterns ranked by strength (focus >= 70)
|
|
20
|
+
3. `YOUR_AGENT_core op:memory_topics` — knowledge clusters
|
|
21
|
+
4. `YOUR_AGENT_core op:vault_age_report` — stale entries needing refresh
|
|
22
|
+
5. `YOUR_AGENT_core op:curator_health_audit` — vault quality score
|
|
23
|
+
|
|
24
|
+
Present: top 5 patterns, top 3 anti-patterns, stale entries, coverage gaps.
|
|
25
|
+
|
|
26
|
+
### "What's working across projects?" (Cross-project)
|
|
27
|
+
|
|
28
|
+
1. `YOUR_AGENT_core op:brain_global_patterns` — promoted patterns
|
|
29
|
+
2. `YOUR_AGENT_core op:brain_recommend params: { projectName: "<project>" }` — similarity-based recommendations
|
|
30
|
+
3. `YOUR_AGENT_core op:project_linked_projects` — connected projects
|
|
31
|
+
4. `YOUR_AGENT_core op:memory_cross_project_search params: { query: "<topic>", crossProject: true }`
|
|
32
|
+
|
|
33
|
+
### "Am I getting smarter?" (Learning velocity)
|
|
34
|
+
|
|
35
|
+
Compare `brain_stats` for 7-day vs 30-day periods. Check `memory_stats`, `admin_vault_analytics`, `admin_search_insights`. Present: new patterns, strength changes, growing vs stagnant domains.
|
|
36
|
+
|
|
37
|
+
### "Build fresh intelligence" (Rebuild)
|
|
38
|
+
|
|
39
|
+
1. `YOUR_AGENT_core op:brain_build_intelligence` — full pipeline rebuild
|
|
40
|
+
2. `YOUR_AGENT_core op:curator_consolidate` — vault cleanup
|
|
41
|
+
3. Show updated `brain_stats`
|
|
42
|
+
|
|
43
|
+
### "Export what I know" (Portability)
|
|
44
|
+
|
|
45
|
+
Use `brain_export`, `memory_export`, `vault_backup`. Import with corresponding `_import` ops.
|
|
46
|
+
|
|
47
|
+
## Presenting Intelligence
|
|
48
|
+
|
|
49
|
+
Format as a report with: Strengths, Risks (recurring anti-patterns), Gaps, Stale entries, Quality score, Recommendations, Search Misses.
|
|
50
|
+
|
|
51
|
+
## Common Mistakes
|
|
52
|
+
|
|
53
|
+
- Presenting raw tool output instead of synthesized insights
|
|
54
|
+
- Skipping the stale entry check (vault_age_report)
|
|
55
|
+
- Not comparing periods when reporting learning velocity
|
|
56
|
+
|
|
57
|
+
## Quick Reference
|
|
58
|
+
|
|
59
|
+
| Op | When to Use |
|
|
60
|
+
|----|-------------|
|
|
61
|
+
| `brain_stats` | Aggregate metrics |
|
|
62
|
+
| `brain_strengths` | Proven patterns ranked |
|
|
63
|
+
| `brain_global_patterns` | Cross-project patterns |
|
|
64
|
+
| `brain_recommend` | Project-similarity recommendations |
|
|
65
|
+
| `brain_build_intelligence` | Rebuild intelligence pipeline |
|
|
66
|
+
| `memory_topics` / `memory_stats` | Knowledge clusters and health |
|
|
67
|
+
| `vault_age_report` | Stale entries |
|
|
68
|
+
| `curator_health_audit` | Vault quality score |
|
|
69
|
+
| `admin_vault_analytics` | Knowledge quality metrics |
|
|
70
|
+
| `admin_search_insights` | Search miss analysis |
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: >
|
|
4
|
+
Use for open-ended creative exploration when requirements are NOT yet clear — "I want to build
|
|
5
|
+
something", "let's think about", "explore options for", "what if we". Explores intent and
|
|
6
|
+
design before implementation. If the user already has a spec or clear requirements, use
|
|
7
|
+
writing-plans instead.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Brainstorming Ideas Into Designs
|
|
11
|
+
|
|
12
|
+
Turn ideas into fully formed designs through collaborative dialogue. Understand project context, ask questions one at a time, present a design, get approval.
|
|
13
|
+
|
|
14
|
+
<HARD-GATE>
|
|
15
|
+
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
|
|
16
|
+
</HARD-GATE>
|
|
17
|
+
|
|
18
|
+
## Checklist
|
|
19
|
+
|
|
20
|
+
Complete in order:
|
|
21
|
+
|
|
22
|
+
1. **Classify intent** — `YOUR_AGENT_core op:route_intent`
|
|
23
|
+
2. **Search vault for prior art** — `YOUR_AGENT_core op:search_intelligent`
|
|
24
|
+
3. **Search web for existing solutions** — don't build what already exists
|
|
25
|
+
4. **Explore project context** — check files, docs, recent commits
|
|
26
|
+
5. **Ask clarifying questions** — one at a time, purpose/constraints/success criteria
|
|
27
|
+
6. **Propose 2-3 approaches** — with trade-offs and your recommendation
|
|
28
|
+
7. **Present design** — in sections scaled to complexity, get approval after each
|
|
29
|
+
8. **Capture design decision** — persist to vault
|
|
30
|
+
9. **Write design doc** — save to `docs/plans/YYYY-MM-DD-<topic>-design.md` and commit
|
|
31
|
+
10. **Transition** — invoke writing-plans skill (the ONLY next skill)
|
|
32
|
+
|
|
33
|
+
## Search Before Designing
|
|
34
|
+
|
|
35
|
+
### Vault First
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
YOUR_AGENT_core op:search_intelligent
|
|
39
|
+
params: { query: "<the feature or idea>" }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Also check: `op:vault_tags`, `op:vault_domains`, `op:brain_strengths`, `op:memory_cross_project_search` with `crossProject: true`.
|
|
43
|
+
|
|
44
|
+
### Web Search Second
|
|
45
|
+
|
|
46
|
+
If vault has no prior art, search web for existing libraries, reference implementations, best practices, known pitfalls.
|
|
47
|
+
|
|
48
|
+
Present findings: "Before we design this, here's what I found..."
|
|
49
|
+
|
|
50
|
+
## The Process
|
|
51
|
+
|
|
52
|
+
- **Understanding**: Check project state, ask one question per message, prefer multiple choice
|
|
53
|
+
- **Exploring**: Propose 2-3 approaches, lead with recommendation, reference vault patterns and web findings
|
|
54
|
+
- **Presenting**: Scale each section to complexity, ask after each section, cover architecture/components/data flow/error handling/testing
|
|
55
|
+
|
|
56
|
+
## After the Design
|
|
57
|
+
|
|
58
|
+
**Capture the decision:**
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
YOUR_AGENT_core op:capture_knowledge
|
|
62
|
+
params: {
|
|
63
|
+
title: "<feature> — design decision",
|
|
64
|
+
description: "<chosen approach, rationale, rejected alternatives>",
|
|
65
|
+
type: "decision",
|
|
66
|
+
category: "<domain>",
|
|
67
|
+
tags: ["design-decision"]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Write validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md` and commit. Then invoke writing-plans.
|
|
72
|
+
|
|
73
|
+
## Common Mistakes
|
|
74
|
+
|
|
75
|
+
- Skipping vault search and reinventing solved problems
|
|
76
|
+
- Jumping to implementation without design approval
|
|
77
|
+
- Asking multiple questions per message (overwhelming)
|
|
78
|
+
- Treating "simple" projects as too simple to need a design
|
|
79
|
+
|
|
80
|
+
## Quick Reference
|
|
81
|
+
|
|
82
|
+
| Op | When to Use |
|
|
83
|
+
|----|-------------|
|
|
84
|
+
| `route_intent` | Classify work type |
|
|
85
|
+
| `search_intelligent` | Search vault for prior art |
|
|
86
|
+
| `vault_tags` / `vault_domains` | Browse knowledge landscape |
|
|
87
|
+
| `brain_strengths` | Check proven patterns |
|
|
88
|
+
| `memory_cross_project_search` | Check other projects |
|
|
89
|
+
| `capture_knowledge` | Persist design decision |
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-patrol
|
|
3
|
+
description: Use when reviewing code against the project's own captured patterns, anti-patterns, and conventions — not generic lint rules but institutional knowledge.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Patrol — Review Code Against Your Own Knowledge
|
|
7
|
+
|
|
8
|
+
Review code against vault patterns, anti-patterns, and project conventions. Catches violations that no linter knows about.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
### 1. Understand the Code's Domain
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
YOUR_AGENT_core op:route_intent
|
|
16
|
+
params: { prompt: "Code review: <brief description>" }
|
|
17
|
+
YOUR_AGENT_core op:vault_domains
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 2. Load Relevant Patterns
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
YOUR_AGENT_core op:search_intelligent
|
|
24
|
+
params: { query: "<what this code does>" }
|
|
25
|
+
YOUR_AGENT_core op:search
|
|
26
|
+
params: { type: "anti-pattern" }
|
|
27
|
+
YOUR_AGENT_core op:search
|
|
28
|
+
params: { severity: "critical" }
|
|
29
|
+
YOUR_AGENT_core op:project_list_rules
|
|
30
|
+
YOUR_AGENT_core op:brain_strengths
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 3. Review the Code
|
|
34
|
+
|
|
35
|
+
| Check | Source | Severity |
|
|
36
|
+
|-------|--------|----------|
|
|
37
|
+
| Violates critical rule | `search (severity: critical)` | Must fix |
|
|
38
|
+
| Matches known anti-pattern | `search (type: anti-pattern)` | Must fix |
|
|
39
|
+
| Doesn't follow proven pattern | `brain_strengths` | Should fix |
|
|
40
|
+
| Breaks project conventions | `project_list_rules` | Should fix |
|
|
41
|
+
| Misses pattern opportunity | `search_intelligent` | Could improve |
|
|
42
|
+
|
|
43
|
+
### 4. Present the Review
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
## Code Patrol Report
|
|
47
|
+
|
|
48
|
+
### Must Fix (Critical)
|
|
49
|
+
- **[Rule name]**: [What's wrong]
|
|
50
|
+
Vault ref: [entry title] | Fix: [How]
|
|
51
|
+
|
|
52
|
+
### Should Fix (Warning)
|
|
53
|
+
- **[Anti-pattern]**: [What's wrong]
|
|
54
|
+
Better approach: [The pattern to follow]
|
|
55
|
+
|
|
56
|
+
### Could Improve (Suggestion)
|
|
57
|
+
- **[Pattern opportunity]**: [Could benefit from...]
|
|
58
|
+
|
|
59
|
+
### Summary
|
|
60
|
+
X critical, Y warnings, Z suggestions
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 5. Learn From the Review
|
|
64
|
+
|
|
65
|
+
If review reveals new patterns or gaps not in vault, capture with `capture_quick` or `capture_knowledge`.
|
|
66
|
+
|
|
67
|
+
### 6. Verify After Fixes
|
|
68
|
+
|
|
69
|
+
Re-run patrol after user applies fixes. Check `admin_health`.
|
|
70
|
+
|
|
71
|
+
## Common Mistakes
|
|
72
|
+
|
|
73
|
+
- Reviewing only against generic lint rules instead of vault knowledge
|
|
74
|
+
- Not loading anti-patterns before reviewing
|
|
75
|
+
- Skipping the capture step when a new pattern is discovered
|
|
76
|
+
|
|
77
|
+
## Quick Reference
|
|
78
|
+
|
|
79
|
+
| Op | When to Use |
|
|
80
|
+
|----|-------------|
|
|
81
|
+
| `route_intent` | Classify code domain |
|
|
82
|
+
| `search_intelligent` | Find relevant patterns |
|
|
83
|
+
| `search` | Find anti-patterns and critical rules |
|
|
84
|
+
| `project_list_rules` / `get_behavior_rules` | Project conventions |
|
|
85
|
+
| `brain_strengths` | Proven patterns |
|
|
86
|
+
| `capture_quick` / `capture_knowledge` | Capture new discoveries |
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context-resume
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user says "where did I leave off", "what was I working on", "catch me up",
|
|
5
|
+
"resume", "continue where we stopped", or is starting a new session and needs to reconstruct
|
|
6
|
+
working context from memory, plans, and sessions.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Context Resume — Pick Up Where You Left Off
|
|
10
|
+
|
|
11
|
+
Reconstruct full working context in seconds. Chains memory, plans, sessions, and brain to rebuild exactly where you left off — even across session boundaries and context compactions.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
### 1. Load Active Plans
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
YOUR_AGENT_core op:plan_stats
|
|
19
|
+
YOUR_AGENT_core op:get_plan
|
|
20
|
+
YOUR_AGENT_core op:plan_list_tasks
|
|
21
|
+
params: { planId: "<id>" }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Present: plan objective, task status (completed/in-progress/pending), what's next.
|
|
25
|
+
|
|
26
|
+
### 2. Search Recent Memory
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
YOUR_AGENT_core op:memory_search
|
|
30
|
+
params: { query: "session summary" }
|
|
31
|
+
YOUR_AGENT_core op:memory_list
|
|
32
|
+
YOUR_AGENT_core op:vault_recent
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 3. Check Active Loops
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
YOUR_AGENT_core op:loop_is_active
|
|
39
|
+
YOUR_AGENT_core op:loop_status
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 4. Brain Snapshot
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
YOUR_AGENT_core op:brain_strengths
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 5. System Health
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
YOUR_AGENT_core op:admin_health
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Presenting the Resume
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
## Where You Left Off
|
|
58
|
+
|
|
59
|
+
**Active Plans:**
|
|
60
|
+
- [Plan name] — X/Y tasks complete, next: [task]
|
|
61
|
+
|
|
62
|
+
**Last Session:**
|
|
63
|
+
- [Summary — what was done, key decisions]
|
|
64
|
+
|
|
65
|
+
**Recent Captures:**
|
|
66
|
+
- [New patterns/anti-patterns added]
|
|
67
|
+
|
|
68
|
+
**Active Loops:**
|
|
69
|
+
- [Any in-progress validation loops]
|
|
70
|
+
|
|
71
|
+
**Brain Says:**
|
|
72
|
+
- [Top relevant patterns]
|
|
73
|
+
|
|
74
|
+
**Health:** [OK / Issues]
|
|
75
|
+
|
|
76
|
+
## Recommended Next Step
|
|
77
|
+
[Based on active plans and last session context]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Common Mistakes
|
|
81
|
+
|
|
82
|
+
- Not checking for active loops (missing mid-flight TDD or debug cycles)
|
|
83
|
+
- Skipping the health check (stale caches can cause confusing behavior)
|
|
84
|
+
- Not loading recent vault captures (missing context from last session)
|
|
85
|
+
|
|
86
|
+
## Quick Reference
|
|
87
|
+
|
|
88
|
+
| Op | When to Use |
|
|
89
|
+
|----|-------------|
|
|
90
|
+
| `plan_stats` / `get_plan` / `plan_list_tasks` | Active plans |
|
|
91
|
+
| `memory_search` / `memory_list` | Session summaries |
|
|
92
|
+
| `vault_recent` | Recently captured knowledge |
|
|
93
|
+
| `loop_is_active` / `loop_status` | In-flight loops |
|
|
94
|
+
| `brain_strengths` | Relevant proven patterns |
|
|
95
|
+
| `admin_health` | System health check |
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deep-review
|
|
3
|
+
description: >
|
|
4
|
+
Use for in-depth code review beyond linting — architecture fitness, code smells, solution quality,
|
|
5
|
+
optimization opportunities. Triggers on "deep review", "review this code", "is this well architected",
|
|
6
|
+
"code smells", "review this module", "architecture review", "is this the right approach",
|
|
7
|
+
"optimization review". Works on any codebase. For vault-specific knowledge quality, use vault-smells instead.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Deep Review — Architecture, Smells & Solution Quality
|
|
11
|
+
|
|
12
|
+
Multi-pass code review that goes beyond surface lint. Analyzes structural health, code smells, architectural fitness, and solution quality. Works on any codebase — vault context is optional enrichment, not a requirement.
|
|
13
|
+
|
|
14
|
+
## Input
|
|
15
|
+
|
|
16
|
+
The user provides a **target**: file, module, directory, PR diff, or function. If unclear, ask.
|
|
17
|
+
|
|
18
|
+
## The Three Passes
|
|
19
|
+
|
|
20
|
+
### Pass 1: Structural Analysis & Code Smells
|
|
21
|
+
|
|
22
|
+
**Metrics** (gather by reading the code):
|
|
23
|
+
- File length and function count
|
|
24
|
+
- Cyclomatic complexity (nesting depth, branch count)
|
|
25
|
+
- Dependency count — imports from how many modules?
|
|
26
|
+
- Export surface area — how much is public vs. should be internal?
|
|
27
|
+
|
|
28
|
+
**Structural Smells:**
|
|
29
|
+
- **God file/class** — too many responsibilities, >300 lines with mixed concerns
|
|
30
|
+
- **Long parameter lists** — function takes 5+ params (should be an object/config)
|
|
31
|
+
- **Deep nesting** — 4+ levels of if/for/try/catch
|
|
32
|
+
- **Shotgun surgery** — changing this code requires touching 5+ other files
|
|
33
|
+
- **Primitive obsession** — passing raw strings/numbers instead of domain types
|
|
34
|
+
- **Boolean blindness** — functions with multiple boolean params (`fn(true, false, true)`)
|
|
35
|
+
|
|
36
|
+
**Duplication Smells:**
|
|
37
|
+
- Copy-paste with slight variations
|
|
38
|
+
- Repeated conditional logic — same if-chain in 3+ places
|
|
39
|
+
- Parallel structures that always change together
|
|
40
|
+
|
|
41
|
+
**Temporal Smells** (check git history):
|
|
42
|
+
- Files that always change together but live in different modules → missing abstraction
|
|
43
|
+
- Functions that get patched repeatedly → wrong abstraction
|
|
44
|
+
- High churn files → instability signal
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
git log --format=format: --name-only --since="3 months ago" <target-path> | sort | uniq -c | sort -rn | head -20
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Present findings before moving to Pass 2.
|
|
51
|
+
|
|
52
|
+
### Pass 2: Architectural Fitness
|
|
53
|
+
|
|
54
|
+
**Dependency Direction:**
|
|
55
|
+
- Do dependencies flow in the right direction? (Outer layers depend on inner, not reverse)
|
|
56
|
+
- Are there circular dependencies?
|
|
57
|
+
- Does the code reach across module boundaries it shouldn't?
|
|
58
|
+
|
|
59
|
+
**Abstraction Level:**
|
|
60
|
+
- Is this the right level of abstraction for the problem?
|
|
61
|
+
- Over-engineered? (abstraction for one use case, premature generalization)
|
|
62
|
+
- Under-engineered? (inline logic that should be extracted)
|
|
63
|
+
|
|
64
|
+
**Cohesion & Coupling:**
|
|
65
|
+
- Does everything in this module belong together? (high cohesion)
|
|
66
|
+
- Is the module tangled with others? (low coupling desired)
|
|
67
|
+
- Feature envy — does a function touch another module's internals more than its own?
|
|
68
|
+
|
|
69
|
+
**Vault Context** (optional — only if vault is connected):
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
YOUR_AGENT_core op:search_intelligent
|
|
73
|
+
params: { query: "<module name> architecture pattern" }
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If vault has relevant patterns, check alignment. If not, skip — this pass works without vault.
|
|
77
|
+
|
|
78
|
+
### Pass 3: Solution Quality Assessment
|
|
79
|
+
|
|
80
|
+
**Simplification:**
|
|
81
|
+
- Is there a simpler way to achieve the same result?
|
|
82
|
+
- Could any abstraction be removed without loss?
|
|
83
|
+
- Are there standard library/framework features that replace custom code?
|
|
84
|
+
|
|
85
|
+
**Edge Cases:**
|
|
86
|
+
- What inputs would break this?
|
|
87
|
+
- Are error paths handled or just the happy path?
|
|
88
|
+
- What happens with empty/null/undefined inputs?
|
|
89
|
+
- Concurrency: race conditions, shared mutable state?
|
|
90
|
+
|
|
91
|
+
**Performance:**
|
|
92
|
+
- Any O(n²) or worse hidden in loops?
|
|
93
|
+
- Unnecessary allocations, copies, or serialization?
|
|
94
|
+
- N+1 query patterns?
|
|
95
|
+
- Unbounded growth (arrays/maps that grow without limit)?
|
|
96
|
+
|
|
97
|
+
**Evolutionary Fitness:**
|
|
98
|
+
- How does this code age? Easy to modify in 6 months?
|
|
99
|
+
- Does it create "gravity" — attracting more complexity over time?
|
|
100
|
+
- Are extension points in the right places?
|
|
101
|
+
|
|
102
|
+
## Presenting the Report
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
## Deep Review: [target name]
|
|
106
|
+
|
|
107
|
+
### Structural Health
|
|
108
|
+
| Metric | Value | Verdict |
|
|
109
|
+
|--------|-------|---------|
|
|
110
|
+
| Lines | X | OK / ⚠️ Large |
|
|
111
|
+
| Functions | X | OK / ⚠️ Many |
|
|
112
|
+
| Max nesting | X | OK / ⚠️ Deep |
|
|
113
|
+
| Dependencies | X | OK / ⚠️ Heavy |
|
|
114
|
+
| Export surface | X public / Y total | OK / ⚠️ Wide |
|
|
115
|
+
|
|
116
|
+
### Code Smells
|
|
117
|
+
| Smell | Location | Severity | Detail |
|
|
118
|
+
|-------|----------|----------|--------|
|
|
119
|
+
| God file | file.ts | ⚠️ | 450 lines, 3 mixed concerns |
|
|
120
|
+
| Feature envy | fn() → other module | ⚠️ | Reaches into X internals |
|
|
121
|
+
| Deep nesting | line 120-180 | 💡 | 5 levels, consider early returns |
|
|
122
|
+
|
|
123
|
+
### Architecture
|
|
124
|
+
| Aspect | Assessment |
|
|
125
|
+
|--------|------------|
|
|
126
|
+
| Dependency direction | ✅ Clean / ⚠️ Reverse dep on X |
|
|
127
|
+
| Abstraction level | ✅ Right / ⚠️ Over/Under |
|
|
128
|
+
| Cohesion | ✅ High / ⚠️ Mixed concerns |
|
|
129
|
+
| Coupling | ✅ Low / ⚠️ Tight with X |
|
|
130
|
+
|
|
131
|
+
### Solution Quality
|
|
132
|
+
| Area | Finding |
|
|
133
|
+
|------|---------|
|
|
134
|
+
| Simplification | [opportunity or "none found"] |
|
|
135
|
+
| Edge cases | [gaps found or "well covered"] |
|
|
136
|
+
| Performance | [concerns or "no issues"] |
|
|
137
|
+
| Evolutionary fitness | [assessment] |
|
|
138
|
+
|
|
139
|
+
### Recommendations
|
|
140
|
+
| Priority | Action | Impact |
|
|
141
|
+
|----------|--------|--------|
|
|
142
|
+
| 1 | [most impactful] | High |
|
|
143
|
+
| 2 | [second] | Medium |
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Severity Scale
|
|
147
|
+
|
|
148
|
+
| Level | Meaning |
|
|
149
|
+
|-------|---------|
|
|
150
|
+
| ✅ | Clean — no action needed |
|
|
151
|
+
| 💡 | Info — worth knowing, low priority |
|
|
152
|
+
| ⚠️ | Warning — should fix, causes friction |
|
|
153
|
+
| 🔴 | Critical — fix before shipping, causes bugs or blocks scaling |
|
|
154
|
+
|
|
155
|
+
## Capturing Learnings (Optional)
|
|
156
|
+
|
|
157
|
+
If the review uncovers a pattern or anti-pattern worth remembering:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
YOUR_AGENT_core op:capture_knowledge
|
|
161
|
+
params: {
|
|
162
|
+
title: "<pattern name>",
|
|
163
|
+
description: "<what was found, why it matters>",
|
|
164
|
+
type: "pattern" | "anti-pattern",
|
|
165
|
+
category: "architecture",
|
|
166
|
+
tags: ["code-review", "<specific-tag>"]
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Only capture if genuinely reusable — not every review finding is vault-worthy.
|
|
171
|
+
|
|
172
|
+
## Common Mistakes
|
|
173
|
+
|
|
174
|
+
- Reviewing without reading the full file first (missing context)
|
|
175
|
+
- Reporting every minor style issue as a "smell" (noise kills signal)
|
|
176
|
+
- Suggesting rewrites when the code is adequate (perfect is the enemy of good)
|
|
177
|
+
- Skipping git history (temporal smells are the most actionable)
|
|
178
|
+
- Treating all smells as equal severity (prioritize by impact)
|
|
179
|
+
|
|
180
|
+
## Quick Reference
|
|
181
|
+
|
|
182
|
+
| Pass | Focus | Key Activities |
|
|
183
|
+
|------|-------|----------------|
|
|
184
|
+
| 1. Structural | Metrics + Smells | Read code, check complexity, find smells, check git history |
|
|
185
|
+
| 2. Architecture | Fitness | Dependency direction, abstraction level, cohesion/coupling |
|
|
186
|
+
| 3. Solution | Quality | Simplification, edge cases, performance, evolution |
|