@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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-driven-development
|
|
3
|
+
description: Use when implementing any feature or bugfix — write failing tests before implementation code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test-Driven Development (TDD)
|
|
7
|
+
|
|
8
|
+
**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
|
|
9
|
+
|
|
10
|
+
## Before You Start — Search First
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
YOUR_AGENT_core op:search_intelligent
|
|
14
|
+
params: { query: "<what you're about to test>" }
|
|
15
|
+
YOUR_AGENT_core op:brain_strengths
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If vault has testing guidance for this domain, follow it.
|
|
19
|
+
|
|
20
|
+
## Start a TDD Loop
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
YOUR_AGENT_core op:loop_start
|
|
24
|
+
params: { prompt: "TDD: <feature>", mode: "custom" }
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## The Iron Law
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Write code before the test? Delete it. Start over. No exceptions.
|
|
34
|
+
|
|
35
|
+
## Red-Green-Refactor
|
|
36
|
+
|
|
37
|
+
### RED — Write Failing Test
|
|
38
|
+
|
|
39
|
+
One behavior, clear name, real code (no mocks unless unavoidable). Run test, confirm it **fails** for the expected reason (feature missing, not typos). Track: `op:loop_iterate`.
|
|
40
|
+
|
|
41
|
+
### GREEN — Minimal Code
|
|
42
|
+
|
|
43
|
+
Simplest code to pass the test. Don't add features beyond the test. Run test, confirm it **passes** and other tests still pass. Track: `op:loop_iterate`.
|
|
44
|
+
|
|
45
|
+
### REFACTOR — Clean Up
|
|
46
|
+
|
|
47
|
+
After green only: remove duplication, improve names, extract helpers. Keep tests green. Don't add behavior.
|
|
48
|
+
|
|
49
|
+
### Repeat
|
|
50
|
+
|
|
51
|
+
Next failing test for next behavior.
|
|
52
|
+
|
|
53
|
+
## Verification Checklist
|
|
54
|
+
|
|
55
|
+
- [ ] Every new function has a test
|
|
56
|
+
- [ ] Watched each test fail before implementing
|
|
57
|
+
- [ ] Failed for expected reason (not typo)
|
|
58
|
+
- [ ] Wrote minimal code to pass
|
|
59
|
+
- [ ] All tests pass, output pristine
|
|
60
|
+
- [ ] Mocks only where unavoidable
|
|
61
|
+
- [ ] Edge cases and errors covered
|
|
62
|
+
|
|
63
|
+
## After TDD
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
YOUR_AGENT_core op:loop_complete
|
|
67
|
+
YOUR_AGENT_core op:capture_quick
|
|
68
|
+
params: { title: "<testing pattern>", description: "<what you learned>" }
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Common Mistakes
|
|
72
|
+
|
|
73
|
+
- Writing implementation before tests ("I'll test after")
|
|
74
|
+
- Keeping pre-test code as "reference" (delete means delete)
|
|
75
|
+
- Test passes immediately (testing existing behavior, not new)
|
|
76
|
+
- Multiple behaviors in one test ("and" in name means split it)
|
|
77
|
+
|
|
78
|
+
| Problem | Solution |
|
|
79
|
+
|---------|----------|
|
|
80
|
+
| Don't know how to test | Write wished-for API first |
|
|
81
|
+
| Must mock everything | Code too coupled — use DI |
|
|
82
|
+
| Test setup huge | Extract helpers or simplify design |
|
|
83
|
+
|
|
84
|
+
## Quick Reference
|
|
85
|
+
|
|
86
|
+
| Op | When to Use |
|
|
87
|
+
|----|-------------|
|
|
88
|
+
| `search_intelligent` | Find testing patterns |
|
|
89
|
+
| `brain_strengths` | Proven testing approaches |
|
|
90
|
+
| `loop_start` / `loop_iterate` / `loop_complete` | TDD cycle tracking |
|
|
91
|
+
| `capture_quick` | Capture new testing patterns |
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vault-capture
|
|
3
|
+
description: >
|
|
4
|
+
Use to capture a SINGLE known pattern, anti-pattern, workflow, decision, or principle to the
|
|
5
|
+
vault. Triggers on "save this", "capture this", "remember this pattern", "add to vault". The
|
|
6
|
+
user already knows what to capture. For bulk extraction from documents, code, or PRs, use
|
|
7
|
+
knowledge-harvest instead.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Vault Capture — Persist Knowledge
|
|
11
|
+
|
|
12
|
+
Capture patterns, anti-patterns, workflows, and principles to the vault. Captured knowledge compounds — it informs future searches, brain recommendations, and team reviews.
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
### 1. Check for Duplicates
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
YOUR_AGENT_core op:search_intelligent
|
|
20
|
+
params: { query: "<knowledge title or description>" }
|
|
21
|
+
YOUR_AGENT_core op:curator_detect_duplicates
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If similar entry exists, update it instead of creating a duplicate.
|
|
25
|
+
|
|
26
|
+
### 2. Classify the Knowledge
|
|
27
|
+
|
|
28
|
+
| Type | Description |
|
|
29
|
+
|------|-------------|
|
|
30
|
+
| **pattern** | Works and should be repeated |
|
|
31
|
+
| **anti-pattern** | Fails and should be avoided |
|
|
32
|
+
| **workflow** | Steps for a specific task |
|
|
33
|
+
| **principle** | Guiding rule or heuristic |
|
|
34
|
+
| **decision** | Architectural choice with rationale |
|
|
35
|
+
|
|
36
|
+
### 3. Capture
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
YOUR_AGENT_core op:capture_knowledge
|
|
40
|
+
params: {
|
|
41
|
+
title: "<clear, searchable name>",
|
|
42
|
+
description: "<what it is and when it applies>",
|
|
43
|
+
type: "<pattern|anti-pattern|workflow|principle|decision>",
|
|
44
|
+
category: "<domain>",
|
|
45
|
+
tags: ["<tag1>", "<tag2>"],
|
|
46
|
+
example: "<code or before/after>",
|
|
47
|
+
why: "<reasoning>"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For quick captures: `YOUR_AGENT_core op:capture_quick params: { title: "<name>", description: "<details>" }`
|
|
52
|
+
|
|
53
|
+
### 4. Post-Capture Quality
|
|
54
|
+
|
|
55
|
+
- `op:curator_groom params: { entryId: "<id>" }` — normalize tags
|
|
56
|
+
- `op:curator_enrich params: { entryId: "<id>" }` — LLM enrichment
|
|
57
|
+
- `op:curator_contradictions` — check for conflicts
|
|
58
|
+
|
|
59
|
+
### 5. Governance (if enabled)
|
|
60
|
+
|
|
61
|
+
If capture returns a `proposalId`, entry is queued: `op:governance_proposals params: { action: "list" }`.
|
|
62
|
+
|
|
63
|
+
### 6. Promote to Global (Optional)
|
|
64
|
+
|
|
65
|
+
For cross-project knowledge: `op:memory_promote_to_global params: { entryId: "<id>" }`.
|
|
66
|
+
|
|
67
|
+
### 7. Verify
|
|
68
|
+
|
|
69
|
+
`op:admin_health` and `op:admin_vault_analytics` to confirm storage and quality.
|
|
70
|
+
|
|
71
|
+
## Common Mistakes
|
|
72
|
+
|
|
73
|
+
- Not checking for duplicates before capturing
|
|
74
|
+
- Missing the `why` field (makes entries not actionable)
|
|
75
|
+
- Skipping post-capture grooming (tags stay unnormalized)
|
|
76
|
+
|
|
77
|
+
## Quick Reference
|
|
78
|
+
|
|
79
|
+
| Op | When to Use |
|
|
80
|
+
|----|-------------|
|
|
81
|
+
| `search_intelligent` | Check for duplicates |
|
|
82
|
+
| `capture_knowledge` / `capture_quick` | Persist to vault |
|
|
83
|
+
| `curator_groom` / `curator_enrich` | Post-capture quality |
|
|
84
|
+
| `curator_contradictions` | Find conflicts |
|
|
85
|
+
| `memory_promote_to_global` | Share cross-project |
|
|
86
|
+
| `admin_health` | Verify health |
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vault-navigator
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user asks "search the vault", "find patterns for", "have we seen this before",
|
|
5
|
+
"what does the vault say about", "best practice for", "check vault", "vault search", or wants
|
|
6
|
+
to query the knowledge base for existing solutions and prior art. For saving a new entry, use
|
|
7
|
+
vault-capture instead.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Vault Navigator — Knowledge Oracle
|
|
11
|
+
|
|
12
|
+
Navigate the vault intelligently. Picks the right search strategy based on what the user needs.
|
|
13
|
+
|
|
14
|
+
## Search Strategy Decision Tree
|
|
15
|
+
|
|
16
|
+
### "Have we seen this?" / "Best practice for X"
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
YOUR_AGENT_core op:search_intelligent
|
|
20
|
+
params: { query: "<question>" }
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If results are weak, fall back to `op:search` with explicit filters (type, category, tags, severity).
|
|
24
|
+
|
|
25
|
+
### "Show me everything about X" (Exploration)
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
YOUR_AGENT_core op:vault_tags
|
|
29
|
+
YOUR_AGENT_core op:vault_domains
|
|
30
|
+
YOUR_AGENT_core op:vault_recent
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### "What's stale?" / "What needs updating?"
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
YOUR_AGENT_core op:vault_age_report
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### "What do other projects do?"
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
YOUR_AGENT_core op:memory_cross_project_search
|
|
43
|
+
params: { query: "<topic>", crossProject: true }
|
|
44
|
+
YOUR_AGENT_core op:project_linked_projects
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### "Has brain learned about X?"
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
YOUR_AGENT_core op:brain_strengths
|
|
51
|
+
YOUR_AGENT_core op:brain_global_patterns
|
|
52
|
+
params: { domain: "<domain>" }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Broad exploration ("What do I know about X?")
|
|
56
|
+
|
|
57
|
+
Chain: `search_intelligent` -> `vault_tags` / `vault_domains` -> `memory_cross_project_search` -> `brain_strengths`. Label each finding with its source.
|
|
58
|
+
|
|
59
|
+
## Presenting Results
|
|
60
|
+
|
|
61
|
+
Always include: **Source** (vault/memory/brain), **Confidence** (score), **Relevance** (why it matches), **Next step** (how to apply).
|
|
62
|
+
|
|
63
|
+
## Fallback: Web Search
|
|
64
|
+
|
|
65
|
+
If all vault strategies return nothing, search the web. If web finds something useful, offer to capture: `op:capture_quick`.
|
|
66
|
+
|
|
67
|
+
## Common Mistakes
|
|
68
|
+
|
|
69
|
+
- Using only one search strategy instead of trying multiple
|
|
70
|
+
- Not labeling result sources (user can't judge confidence)
|
|
71
|
+
- Saying "nothing found" without trying web search fallback
|
|
72
|
+
|
|
73
|
+
## Quick Reference
|
|
74
|
+
|
|
75
|
+
| Op | When to Use |
|
|
76
|
+
|----|-------------|
|
|
77
|
+
| `search_intelligent` | Default semantic search |
|
|
78
|
+
| `search` | Structured search with filters |
|
|
79
|
+
| `vault_tags` / `vault_domains` | Browse knowledge landscape |
|
|
80
|
+
| `vault_recent` | Recently modified entries |
|
|
81
|
+
| `vault_age_report` | Stale entries |
|
|
82
|
+
| `memory_cross_project_search` | Cross-project search |
|
|
83
|
+
| `brain_strengths` / `brain_global_patterns` | Proven patterns |
|
|
84
|
+
| `capture_quick` | Capture web findings |
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vault-smells
|
|
3
|
+
description: >
|
|
4
|
+
Use for deep knowledge quality analysis — finding contradictions, stale patterns, orphaned entries,
|
|
5
|
+
weak links, knowledge decay, and structural issues in the vault. Triggers on "vault smells",
|
|
6
|
+
"knowledge quality", "vault analysis", "find contradictions", "stale patterns", "knowledge debt",
|
|
7
|
+
"vault deep check", "is my vault healthy". Goes deeper than health-check (which is operational).
|
|
8
|
+
For code review, use deep-review instead.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Vault Smells — Knowledge Quality Deep Analysis
|
|
12
|
+
|
|
13
|
+
Detects structural problems in the knowledge base that degrade decision quality over time. Goes beyond operational health (is the DB up?) into knowledge integrity (is the knowledge trustworthy?).
|
|
14
|
+
|
|
15
|
+
## Smell Categories
|
|
16
|
+
|
|
17
|
+
### 1. Contradiction Smells
|
|
18
|
+
|
|
19
|
+
Entries that give conflicting guidance. The most dangerous smell — leads to inconsistent decisions.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
YOUR_AGENT_core op:curator_contradictions
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**What to look for:**
|
|
26
|
+
- Two patterns that recommend opposite approaches for the same situation
|
|
27
|
+
- An anti-pattern that contradicts an active pattern
|
|
28
|
+
- Entries from different time periods with conflicting advice (the older one may be stale)
|
|
29
|
+
|
|
30
|
+
**Resolution:** Present contradictions to user. One must win — archive the loser or scope them to different contexts.
|
|
31
|
+
|
|
32
|
+
### 2. Staleness Smells
|
|
33
|
+
|
|
34
|
+
Knowledge that was true once but may not be anymore.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
YOUR_AGENT_core op:vault_age_report
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Indicators:**
|
|
41
|
+
- Entries >60 days without access or update
|
|
42
|
+
- Patterns referencing APIs, libraries, or versions that have changed
|
|
43
|
+
- Entries tagged with technologies the project no longer uses
|
|
44
|
+
- Confidence scores that haven't been reinforced by brain feedback
|
|
45
|
+
|
|
46
|
+
**Action:** Flag for review. Don't auto-delete — stale doesn't mean wrong.
|
|
47
|
+
|
|
48
|
+
### 3. Orphan Smells
|
|
49
|
+
|
|
50
|
+
Entries with no connections to the rest of the knowledge graph.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
YOUR_AGENT_core op:admin_vault_analytics
|
|
54
|
+
YOUR_AGENT_core op:curator_detect_duplicates
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Indicators:**
|
|
58
|
+
- Entries with zero inbound or outbound links
|
|
59
|
+
- Entries never returned in search results (check search insights)
|
|
60
|
+
- Entries with no tags or only generic tags
|
|
61
|
+
- Entries that were captured but never groomed
|
|
62
|
+
|
|
63
|
+
**Why it matters:** Orphans don't surface when needed. They're knowledge that exists but can't be found. In a Zettelkasten, an unlinked note is a dead note.
|
|
64
|
+
|
|
65
|
+
**Action:** Link, merge, or archive. Every entry should connect to at least one other.
|
|
66
|
+
|
|
67
|
+
### 4. Duplication Smells
|
|
68
|
+
|
|
69
|
+
Multiple entries covering the same ground with slight variations.
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
YOUR_AGENT_core op:curator_detect_duplicates
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Indicators:**
|
|
76
|
+
- High similarity scores between entries
|
|
77
|
+
- Same tags and category but different titles
|
|
78
|
+
- Entries captured in different sessions about the same topic
|
|
79
|
+
- Parallel entries — one as pattern, one as anti-pattern for the same concept
|
|
80
|
+
|
|
81
|
+
**Action:** Merge the best parts into one authoritative entry. Archive the rest.
|
|
82
|
+
|
|
83
|
+
### 5. Shallow Entry Smells
|
|
84
|
+
|
|
85
|
+
Entries that exist but lack substance — captured in a hurry, never enriched.
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
YOUR_AGENT_core op:curator_health_audit
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Indicators:**
|
|
92
|
+
- Description under 50 characters
|
|
93
|
+
- No examples or context
|
|
94
|
+
- Missing "why" — only states "what" without rationale
|
|
95
|
+
- No tags beyond the auto-generated ones
|
|
96
|
+
- Quality score below 40
|
|
97
|
+
|
|
98
|
+
**Action:** Enrich with context, examples, and rationale — or archive if no longer relevant.
|
|
99
|
+
|
|
100
|
+
### 6. Category Drift Smells
|
|
101
|
+
|
|
102
|
+
The taxonomy has grown inconsistent over time.
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
YOUR_AGENT_core op:vault_domains
|
|
106
|
+
YOUR_AGENT_core op:vault_tags
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Indicators:**
|
|
110
|
+
- Near-duplicate categories (e.g., "error-handling" and "errors" and "exception-handling")
|
|
111
|
+
- Categories with only 1-2 entries (too granular)
|
|
112
|
+
- Tags used inconsistently (same concept, different tag names)
|
|
113
|
+
- Entries miscategorized (architecture pattern filed under "testing")
|
|
114
|
+
|
|
115
|
+
**Action:** Normalize with `op:curator_groom_all`. Merge overlapping categories.
|
|
116
|
+
|
|
117
|
+
### 7. Confidence Decay Smells
|
|
118
|
+
|
|
119
|
+
Brain patterns losing strength without reinforcement.
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
YOUR_AGENT_core op:brain_strengths
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Indicators:**
|
|
126
|
+
- Patterns with high initial strength that have decayed below 0.3
|
|
127
|
+
- Patterns that were strong but haven't received positive feedback in >30 days
|
|
128
|
+
- Patterns with mixed feedback (both positive and negative) — unresolved
|
|
129
|
+
|
|
130
|
+
**Action:** Review with user. Reinforce valid patterns, retire invalid ones.
|
|
131
|
+
|
|
132
|
+
### 8. Knowledge Gap Smells
|
|
133
|
+
|
|
134
|
+
Areas where the vault *should* have knowledge but doesn't.
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
YOUR_AGENT_core op:admin_search_insights
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Indicators:**
|
|
141
|
+
- Repeated search queries that return no results
|
|
142
|
+
- Domains the project uses but vault has no entries for
|
|
143
|
+
- Anti-patterns captured without corresponding patterns (what to do instead?)
|
|
144
|
+
- Patterns without linked anti-patterns (what to avoid?)
|
|
145
|
+
|
|
146
|
+
**Action:** Create targeted entries to fill gaps. Use knowledge-harvest skill on relevant docs/code.
|
|
147
|
+
|
|
148
|
+
## Running the Analysis
|
|
149
|
+
|
|
150
|
+
### Step 1: Gather Data
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
YOUR_AGENT_core op:admin_health
|
|
154
|
+
YOUR_AGENT_core op:admin_vault_analytics
|
|
155
|
+
YOUR_AGENT_core op:curator_health_audit
|
|
156
|
+
YOUR_AGENT_core op:curator_contradictions
|
|
157
|
+
YOUR_AGENT_core op:curator_detect_duplicates
|
|
158
|
+
YOUR_AGENT_core op:vault_age_report
|
|
159
|
+
YOUR_AGENT_core op:vault_domains
|
|
160
|
+
YOUR_AGENT_core op:vault_tags
|
|
161
|
+
YOUR_AGENT_core op:brain_strengths
|
|
162
|
+
YOUR_AGENT_core op:admin_search_insights
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Step 2: Classify Smells
|
|
166
|
+
|
|
167
|
+
For each smell category, assess severity:
|
|
168
|
+
|
|
169
|
+
| Severity | Meaning |
|
|
170
|
+
|----------|---------|
|
|
171
|
+
| 🟢 Clean | No issues in this category |
|
|
172
|
+
| 🟡 Minor | 1-3 instances, low impact |
|
|
173
|
+
| 🟠 Moderate | Multiple instances, degrading quality |
|
|
174
|
+
| 🔴 Critical | Widespread, actively causing bad decisions |
|
|
175
|
+
|
|
176
|
+
### Step 3: Present the Report
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
## Vault Smell Report
|
|
180
|
+
|
|
181
|
+
### Overview
|
|
182
|
+
| Metric | Value |
|
|
183
|
+
|--------|-------|
|
|
184
|
+
| Total entries | X |
|
|
185
|
+
| Overall health score | X/100 |
|
|
186
|
+
| Smells found | X across Y categories |
|
|
187
|
+
|
|
188
|
+
### Smell Summary
|
|
189
|
+
| Category | Severity | Count | Impact |
|
|
190
|
+
|----------|----------|-------|--------|
|
|
191
|
+
| Contradictions | 🔴/🟠/🟡/🟢 | X | Inconsistent decisions |
|
|
192
|
+
| Staleness | 🔴/🟠/🟡/🟢 | X | Outdated guidance |
|
|
193
|
+
| Orphans | 🔴/🟠/🟡/🟢 | X | Unfindable knowledge |
|
|
194
|
+
| Duplicates | 🔴/🟠/🟡/🟢 | X | Noise, conflicting versions |
|
|
195
|
+
| Shallow entries | 🔴/🟠/🟡/🟢 | X | Low-value knowledge |
|
|
196
|
+
| Category drift | 🔴/🟠/🟡/🟢 | X | Poor discoverability |
|
|
197
|
+
| Confidence decay | 🔴/🟠/🟡/🟢 | X | Unreliable recommendations |
|
|
198
|
+
| Knowledge gaps | 🔴/🟠/🟡/🟢 | X | Blind spots |
|
|
199
|
+
|
|
200
|
+
### Critical Findings
|
|
201
|
+
[Top 3 most impactful issues with specific entries/examples]
|
|
202
|
+
|
|
203
|
+
### Recommended Actions
|
|
204
|
+
| Priority | Action | Effort | Impact |
|
|
205
|
+
|----------|--------|--------|--------|
|
|
206
|
+
| 1 | [most impactful fix] | Low/Med/High | High |
|
|
207
|
+
| 2 | [second] | Low/Med/High | Med |
|
|
208
|
+
| 3 | [third] | Low/Med/High | Med |
|
|
209
|
+
|
|
210
|
+
### Trend (if prior reports exist)
|
|
211
|
+
| Metric | Last Check | Now | Direction |
|
|
212
|
+
|--------|-----------|-----|-----------|
|
|
213
|
+
| Health score | X | Y | ↑/↓/→ |
|
|
214
|
+
| Smell count | X | Y | ↑/↓/→ |
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Step 4: Fix (with user approval)
|
|
218
|
+
|
|
219
|
+
Do NOT auto-fix. Present findings, get approval, then:
|
|
220
|
+
|
|
221
|
+
- Contradictions → `op:curator_resolve_contradiction`
|
|
222
|
+
- Duplicates → `op:curator_groom` (merge)
|
|
223
|
+
- Orphans → link or archive
|
|
224
|
+
- Shallow entries → enrich or archive
|
|
225
|
+
- Category drift → `op:curator_groom_all` (normalize)
|
|
226
|
+
- Gaps → `op:capture_knowledge` (fill)
|
|
227
|
+
|
|
228
|
+
After fixes: `op:brain_build_intelligence` to rebuild with clean data.
|
|
229
|
+
|
|
230
|
+
## Common Mistakes
|
|
231
|
+
|
|
232
|
+
- Auto-fixing without presenting findings first (user may disagree)
|
|
233
|
+
- Treating all smells as equally urgent (contradictions >> orphans)
|
|
234
|
+
- Deleting stale entries without checking if they're still valid
|
|
235
|
+
- Running this too frequently (monthly is usually enough)
|
|
236
|
+
- Not rebuilding brain intelligence after major cleanup
|
|
237
|
+
|
|
238
|
+
## Quick Reference
|
|
239
|
+
|
|
240
|
+
| Smell | Detection Op | Fix Op |
|
|
241
|
+
|-------|-------------|--------|
|
|
242
|
+
| Contradictions | `curator_contradictions` | `curator_resolve_contradiction` |
|
|
243
|
+
| Staleness | `vault_age_report` | Review + archive/update |
|
|
244
|
+
| Orphans | `admin_vault_analytics` | Link or archive |
|
|
245
|
+
| Duplicates | `curator_detect_duplicates` | `curator_groom` (merge) |
|
|
246
|
+
| Shallow entries | `curator_health_audit` | Enrich or archive |
|
|
247
|
+
| Category drift | `vault_domains` + `vault_tags` | `curator_groom_all` |
|
|
248
|
+
| Confidence decay | `brain_strengths` | Reinforce or retire |
|
|
249
|
+
| Knowledge gaps | `admin_search_insights` | `capture_knowledge` |
|
|
250
|
+
|
|
251
|
+
**Related skills:** health-check (operational status), vault-curate (active cleanup), knowledge-harvest (fill gaps)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-before-completion
|
|
3
|
+
description: >
|
|
4
|
+
Use as an internal quality gate before claiming any task is done — run tests, check output,
|
|
5
|
+
verify behavior. This is a mid-workflow checkpoint, not a shipping gate. For actual deployment
|
|
6
|
+
and release workflows, use deliver-and-ship instead.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Verification Before Completion
|
|
10
|
+
|
|
11
|
+
**Core principle:** Evidence before claims, always.
|
|
12
|
+
|
|
13
|
+
## The Iron Law
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If you haven't run the verification command in this message, you cannot claim it passes.
|
|
20
|
+
|
|
21
|
+
## The Gate Function
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
1. IDENTIFY: What command proves this claim?
|
|
25
|
+
2. RUN: Execute the FULL command (fresh, complete)
|
|
26
|
+
3. READ: Full output, check exit code, count failures
|
|
27
|
+
4. VERIFY: Does output confirm the claim?
|
|
28
|
+
- NO → State actual status with evidence
|
|
29
|
+
- YES → State claim WITH evidence
|
|
30
|
+
5. AGENT CHECK: Run system diagnostics
|
|
31
|
+
6. ONLY THEN: Make the claim
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Agent System Checks
|
|
35
|
+
|
|
36
|
+
After passing verification commands:
|
|
37
|
+
|
|
38
|
+
- `YOUR_AGENT_core op:admin_health` — catches vault corruption, stale caches
|
|
39
|
+
- `YOUR_AGENT_core op:admin_diagnostic` — module status, database integrity, config validity
|
|
40
|
+
- `YOUR_AGENT_core op:admin_vault_analytics` — knowledge quality metrics
|
|
41
|
+
|
|
42
|
+
If any check reports problems, address before claiming completion.
|
|
43
|
+
|
|
44
|
+
## Common Failures
|
|
45
|
+
|
|
46
|
+
| Claim | Requires | Not Sufficient |
|
|
47
|
+
|-------|----------|----------------|
|
|
48
|
+
| Tests pass | Test output: 0 failures | Previous run, "should pass" |
|
|
49
|
+
| Build succeeds | Build command: exit 0 | Linter passing |
|
|
50
|
+
| Bug fixed | Original symptom passes | "Code changed, assumed fixed" |
|
|
51
|
+
| Requirements met | Line-by-line checklist | Tests passing alone |
|
|
52
|
+
|
|
53
|
+
## Red Flags — STOP
|
|
54
|
+
|
|
55
|
+
- Using "should", "probably", "seems to"
|
|
56
|
+
- Expressing satisfaction before verification
|
|
57
|
+
- About to commit/push/PR without verification
|
|
58
|
+
- Relying on partial verification
|
|
59
|
+
|
|
60
|
+
| Excuse | Reality |
|
|
61
|
+
|--------|---------|
|
|
62
|
+
| "Should work now" | RUN the verification |
|
|
63
|
+
| "I'm confident" | Confidence is not evidence |
|
|
64
|
+
| "Just this once" | No exceptions |
|
|
65
|
+
| "Partial check is enough" | Partial proves nothing |
|
|
66
|
+
|
|
67
|
+
## After Verification
|
|
68
|
+
|
|
69
|
+
Capture session summary: `YOUR_AGENT_core op:session_capture params: { summary: "<what was accomplished>" }`
|
|
70
|
+
|
|
71
|
+
## Common Mistakes
|
|
72
|
+
|
|
73
|
+
- Claiming "tests pass" based on a previous run
|
|
74
|
+
- Trusting agent success reports without independent verification
|
|
75
|
+
- Running linter but not build (linter does not check compilation)
|
|
76
|
+
- Skipping the red-green cycle for regression tests
|
|
77
|
+
|
|
78
|
+
## Quick Reference
|
|
79
|
+
|
|
80
|
+
| Op | When to Use |
|
|
81
|
+
|----|-------------|
|
|
82
|
+
| `admin_health` | Quick system health check |
|
|
83
|
+
| `admin_diagnostic` | Comprehensive diagnostic |
|
|
84
|
+
| `admin_vault_analytics` | Knowledge quality metrics |
|
|
85
|
+
| `session_capture` | Persist verified completion context |
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: writing-plans
|
|
3
|
+
description: >
|
|
4
|
+
Use when the user has clear requirements or a spec and needs a structured implementation plan —
|
|
5
|
+
"create a plan", "break this down", "plan the implementation". Requirements are already known.
|
|
6
|
+
For open-ended exploration when requirements are unclear, use brainstorming instead.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Writing Plans
|
|
10
|
+
|
|
11
|
+
Write implementation plans assuming the engineer has zero codebase context. Document everything: which files to touch, code, testing, expected output. Bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
|
|
12
|
+
|
|
13
|
+
**Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
|
|
14
|
+
|
|
15
|
+
**Save plans to:** `docs/plans/YYYY-MM-DD-<feature-name>.md`
|
|
16
|
+
|
|
17
|
+
## Before Writing — Search First
|
|
18
|
+
|
|
19
|
+
### 1. Vault First
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
YOUR_AGENT_core op:search_intelligent
|
|
23
|
+
params: { query: "<feature being planned>" }
|
|
24
|
+
YOUR_AGENT_core op:brain_strengths
|
|
25
|
+
YOUR_AGENT_core op:vault_domains
|
|
26
|
+
YOUR_AGENT_core op:vault_tags
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 2. Web Search Second
|
|
30
|
+
|
|
31
|
+
If vault lacks guidance: libraries, reference implementations, API docs, known pitfalls.
|
|
32
|
+
|
|
33
|
+
### 3. Then Write the Plan
|
|
34
|
+
|
|
35
|
+
Incorporate vault insights and web findings. Reference specific entries.
|
|
36
|
+
|
|
37
|
+
## Create a Tracked Plan
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
YOUR_AGENT_core op:create_plan
|
|
41
|
+
params: {
|
|
42
|
+
objective: "<one-sentence goal>",
|
|
43
|
+
scope: { included: [...], excluded: [...] },
|
|
44
|
+
steps: [{ title: "Step 1", description: "details" }, ...]
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Grade and Improve
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
YOUR_AGENT_core op:plan_grade params: { planId: "<id>" }
|
|
52
|
+
YOUR_AGENT_core op:plan_auto_improve params: { planId: "<id>" }
|
|
53
|
+
YOUR_AGENT_core op:plan_meets_grade params: { planId: "<id>", targetGrade: "A" }
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Iterate with: `op:plan_iterate params: { planId: "<id>", feedback: "<improvement>" }`
|
|
57
|
+
|
|
58
|
+
## Split into Tasks
|
|
59
|
+
|
|
60
|
+
After approval: `YOUR_AGENT_core op:plan_split params: { planId: "<id>" }`
|
|
61
|
+
|
|
62
|
+
## Task Granularity
|
|
63
|
+
|
|
64
|
+
Each step is one action (2-5 minutes): write failing test, run it, implement, run tests, commit.
|
|
65
|
+
|
|
66
|
+
## Plan Document Header
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
# [Feature] Implementation Plan
|
|
70
|
+
|
|
71
|
+
> **For Claude:** REQUIRED SUB-SKILL: Use executing-plans to implement this plan task-by-task.
|
|
72
|
+
|
|
73
|
+
**Goal:** [One sentence]
|
|
74
|
+
**Architecture:** [2-3 sentences]
|
|
75
|
+
**Tech Stack:** [Key technologies]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Task Structure
|
|
79
|
+
|
|
80
|
+
- Files: Create / Modify / Test paths
|
|
81
|
+
- Steps: Write failing test (code) -> verify fail (expected output) -> implement (code) -> verify pass (expected output) -> commit (exact commands)
|
|
82
|
+
|
|
83
|
+
## After Approval
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
YOUR_AGENT_core op:approve_plan params: { planId: "<id>" }
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Offer execution choice: subagent-driven (this session) or parallel session with executing-plans.
|
|
90
|
+
|
|
91
|
+
## Common Mistakes
|
|
92
|
+
|
|
93
|
+
- Writing plans from scratch without searching vault first
|
|
94
|
+
- Vague steps like "add validation" instead of exact code
|
|
95
|
+
- Missing test steps in the plan
|
|
96
|
+
- Not grading the plan before presenting to user
|
|
97
|
+
|
|
98
|
+
## Quick Reference
|
|
99
|
+
|
|
100
|
+
| Op | When to Use |
|
|
101
|
+
|----|-------------|
|
|
102
|
+
| `search_intelligent` | Find patterns before planning |
|
|
103
|
+
| `brain_strengths` | Proven approaches |
|
|
104
|
+
| `create_plan` | Create tracked plan |
|
|
105
|
+
| `plan_grade` / `plan_auto_improve` | Grade and improve |
|
|
106
|
+
| `plan_iterate` | Iterate with feedback |
|
|
107
|
+
| `plan_split` | Split into tasks |
|
|
108
|
+
| `approve_plan` | Lock in approved plan |
|