@soleri/cli 1.9.0 → 1.10.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/README.md +4 -0
- package/dist/commands/agent.d.ts +8 -0
- package/dist/commands/agent.js +150 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/create.js +30 -4
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/install-knowledge.js +65 -3
- package/dist/commands/install-knowledge.js.map +1 -1
- package/dist/commands/install.d.ts +2 -0
- package/dist/commands/install.js +80 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/pack.d.ts +10 -0
- package/dist/commands/pack.js +512 -0
- package/dist/commands/pack.js.map +1 -0
- package/dist/commands/skills.d.ts +8 -0
- package/dist/commands/skills.js +167 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/uninstall.d.ts +2 -0
- package/dist/commands/uninstall.js +74 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/hook-packs/installer.d.ts +0 -7
- package/dist/hook-packs/installer.js +1 -14
- package/dist/hook-packs/installer.js.map +1 -1
- package/dist/hook-packs/installer.ts +1 -18
- package/dist/hook-packs/registry.d.ts +2 -1
- package/dist/hook-packs/registry.ts +1 -1
- package/dist/main.js +40 -1
- package/dist/main.js.map +1 -1
- package/dist/prompts/archetypes.d.ts +1 -0
- package/dist/prompts/archetypes.js +177 -62
- package/dist/prompts/archetypes.js.map +1 -1
- package/dist/prompts/create-wizard.js +98 -49
- package/dist/prompts/create-wizard.js.map +1 -1
- package/dist/prompts/playbook.d.ts +8 -7
- package/dist/prompts/playbook.js +201 -15
- package/dist/prompts/playbook.js.map +1 -1
- package/dist/utils/checks.d.ts +0 -1
- package/dist/utils/checks.js +1 -1
- package/dist/utils/checks.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/archetypes.test.ts +84 -0
- package/src/__tests__/doctor.test.ts +2 -2
- package/src/__tests__/wizard-e2e.mjs +508 -0
- package/src/commands/agent.ts +181 -0
- package/src/commands/create.ts +146 -104
- package/src/commands/install-knowledge.ts +75 -4
- package/src/commands/install.ts +101 -0
- package/src/commands/pack.ts +585 -0
- package/src/commands/skills.ts +191 -0
- package/src/commands/uninstall.ts +93 -0
- package/src/hook-packs/installer.ts +1 -18
- package/src/hook-packs/registry.ts +1 -1
- package/src/main.ts +42 -1
- package/src/prompts/archetypes.ts +193 -62
- package/src/prompts/create-wizard.ts +114 -58
- package/src/prompts/playbook.ts +207 -21
- package/src/utils/checks.ts +1 -1
- package/code-reviewer/.claude/hookify.focus-ring-required.local.md +0 -21
- package/code-reviewer/.claude/hookify.no-ai-attribution.local.md +0 -18
- package/code-reviewer/.claude/hookify.no-any-types.local.md +0 -18
- package/code-reviewer/.claude/hookify.no-console-log.local.md +0 -21
- package/code-reviewer/.claude/hookify.no-important.local.md +0 -18
- package/code-reviewer/.claude/hookify.no-inline-styles.local.md +0 -21
- package/code-reviewer/.claude/hookify.semantic-html.local.md +0 -18
- package/code-reviewer/.claude/hookify.ux-touch-targets.local.md +0 -18
- package/code-reviewer/.mcp.json +0 -11
- package/code-reviewer/README.md +0 -346
- package/code-reviewer/package-lock.json +0 -4484
- package/code-reviewer/package.json +0 -45
- package/code-reviewer/scripts/copy-assets.js +0 -15
- package/code-reviewer/scripts/setup.sh +0 -130
- package/code-reviewer/skills/brainstorming/SKILL.md +0 -170
- package/code-reviewer/skills/code-patrol/SKILL.md +0 -176
- package/code-reviewer/skills/context-resume/SKILL.md +0 -143
- package/code-reviewer/skills/executing-plans/SKILL.md +0 -201
- package/code-reviewer/skills/fix-and-learn/SKILL.md +0 -164
- package/code-reviewer/skills/health-check/SKILL.md +0 -225
- package/code-reviewer/skills/second-opinion/SKILL.md +0 -142
- package/code-reviewer/skills/systematic-debugging/SKILL.md +0 -230
- package/code-reviewer/skills/verification-before-completion/SKILL.md +0 -170
- package/code-reviewer/skills/writing-plans/SKILL.md +0 -207
- package/code-reviewer/src/__tests__/facades.test.ts +0 -598
- package/code-reviewer/src/activation/activate.ts +0 -125
- package/code-reviewer/src/activation/claude-md-content.ts +0 -217
- package/code-reviewer/src/activation/inject-claude-md.ts +0 -113
- package/code-reviewer/src/extensions/index.ts +0 -47
- package/code-reviewer/src/extensions/ops/example.ts +0 -28
- package/code-reviewer/src/identity/persona.ts +0 -62
- package/code-reviewer/src/index.ts +0 -278
- package/code-reviewer/src/intelligence/data/architecture.json +0 -5
- package/code-reviewer/src/intelligence/data/code-review.json +0 -5
- package/code-reviewer/tsconfig.json +0 -30
- package/code-reviewer/vitest.config.ts +0 -23
package/code-reviewer/README.md
DELETED
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
# Code Reviewer — Catches bugs, enforces code patterns, and reviews pull requests before merge
|
|
2
|
-
|
|
3
|
-
This agent reviews code for quality issues, anti-patterns, naming conventions, test coverage gaps, and architectural violations. It provides actionable feedback with concrete fix suggestions.
|
|
4
|
-
|
|
5
|
-
## Why Code Reviewer
|
|
6
|
-
|
|
7
|
-
Every team accumulates knowledge — patterns that work, mistakes to avoid, architectural decisions and their reasoning. Without a system, this knowledge lives in people's heads, scattered docs, or buried in Slack threads. When someone leaves or context shifts, it's gone.
|
|
8
|
-
|
|
9
|
-
Code Reviewer is your team's persistent knowledge layer. It:
|
|
10
|
-
- **Remembers** patterns, decisions, and lessons across sessions and projects
|
|
11
|
-
- **Retrieves** the right knowledge at the right time using intelligent search
|
|
12
|
-
- **Learns** from your feedback — accepted suggestions boost similar patterns, dismissed ones fade
|
|
13
|
-
- **Plans** multi-step tasks and tracks execution
|
|
14
|
-
- **Grows** with every interaction — the more you use it, the smarter it gets
|
|
15
|
-
|
|
16
|
-
The agent starts empty. That's intentional. Your expertise is the content; Code Reviewer is the infrastructure that makes it searchable, persistent, and always available.
|
|
17
|
-
|
|
18
|
-
## Quick Start
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# 1. Install and build
|
|
22
|
-
cd code-reviewer
|
|
23
|
-
npm install
|
|
24
|
-
npm run build
|
|
25
|
-
|
|
26
|
-
# 2. Add to Claude Code
|
|
27
|
-
./scripts/setup.sh
|
|
28
|
-
|
|
29
|
-
# 3. Start a new Claude Code session, then say:
|
|
30
|
-
# "Hello, Code Reviewer!"
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
That's it. Code Reviewer will activate, check your setup, and offer to configure itself.
|
|
34
|
-
|
|
35
|
-
## Prerequisites
|
|
36
|
-
|
|
37
|
-
- **Node.js 18+** — `node --version` to check
|
|
38
|
-
- **Claude Code** — Anthropic's CLI for Claude (`claude` command)
|
|
39
|
-
|
|
40
|
-
## What Happens When You Say "Hello, Code Reviewer!"
|
|
41
|
-
|
|
42
|
-
1. Code Reviewer returns its persona, principles, and tool recommendations
|
|
43
|
-
2. Claude adopts the Code Reviewer persona for the rest of the session
|
|
44
|
-
3. Code Reviewer checks if your project has CLAUDE.md integration
|
|
45
|
-
4. If not, it offers to inject its configuration (facades table, intent detection, knowledge protocol)
|
|
46
|
-
|
|
47
|
-
## Manual Setup (if setup.sh doesn't work)
|
|
48
|
-
|
|
49
|
-
Add this to `~/.claude/settings.json` under `mcpServers`:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{
|
|
53
|
-
"mcpServers": {
|
|
54
|
-
"code-reviewer": {
|
|
55
|
-
"command": "node",
|
|
56
|
-
"args": ["dist/index.js"],
|
|
57
|
-
"cwd": "/absolute/path/to/code-reviewer"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Then restart Claude Code.
|
|
64
|
-
|
|
65
|
-
## Domains
|
|
66
|
-
|
|
67
|
-
| Domain | What it covers |
|
|
68
|
-
|--------|---------------|
|
|
69
|
-
| code-review | *Ready for knowledge capture* |
|
|
70
|
-
| architecture | *Ready for knowledge capture* |
|
|
71
|
-
|
|
72
|
-
## Core Principles
|
|
73
|
-
|
|
74
|
-
- Actionable feedback only
|
|
75
|
-
- Respect existing patterns
|
|
76
|
-
- Simplicity over cleverness
|
|
77
|
-
|
|
78
|
-
## Built-in Skills
|
|
79
|
-
|
|
80
|
-
Code Reviewer ships with 17 structured workflow skills, invocable via `/<skill-name>` in Claude Code:
|
|
81
|
-
|
|
82
|
-
**Development Workflows:**
|
|
83
|
-
|
|
84
|
-
| Skill | Description |
|
|
85
|
-
|-------|-------------|
|
|
86
|
-
| `/test-driven-development` | Red-green-refactor TDD workflow with vault-informed test patterns |
|
|
87
|
-
| `/systematic-debugging` | Root cause investigation — vault search, web search, then diagnose |
|
|
88
|
-
| `/verification-before-completion` | Evidence-based completion claims with system diagnostics |
|
|
89
|
-
| `/brainstorming` | Collaborative design exploration with vault + web research first |
|
|
90
|
-
| `/writing-plans` | Implementation plans with quality grading and auto-improvement |
|
|
91
|
-
| `/executing-plans` | Batch execution with loop tracking and plan reconciliation |
|
|
92
|
-
| `/fix-and-learn` | Fix bugs and capture root cause — vault search before any fix |
|
|
93
|
-
| `/code-patrol` | Review code against YOUR vault patterns, not generic lint rules |
|
|
94
|
-
|
|
95
|
-
**Knowledge Management:**
|
|
96
|
-
|
|
97
|
-
| Skill | Description |
|
|
98
|
-
|-------|-------------|
|
|
99
|
-
| `/vault-navigator` | Intelligent vault search — tags, domains, age reports, cross-project |
|
|
100
|
-
| `/vault-capture` | Persist knowledge with curator grooming and governance |
|
|
101
|
-
| `/knowledge-harvest` | Point at any doc/code — auto-extract patterns into vault |
|
|
102
|
-
| `/brain-debrief` | Intelligence report — strengths, gaps, cross-project insights |
|
|
103
|
-
|
|
104
|
-
**Magic UX:**
|
|
105
|
-
|
|
106
|
-
| Skill | Description |
|
|
107
|
-
|-------|-------------|
|
|
108
|
-
| `/context-resume` | "What was I working on?" — full context reconstruction |
|
|
109
|
-
| `/second-opinion` | Decision support from vault + brain + web combined |
|
|
110
|
-
| `/retrospective` | Data-driven sprint/week retro from actual metrics |
|
|
111
|
-
| `/onboard-me` | Instant project knowledge tour for newcomers |
|
|
112
|
-
| `/health-check` | Vault maintenance — duplicates, contradictions, stale entries |
|
|
113
|
-
|
|
114
|
-
Skills are installed to `~/.claude/commands/` during setup. Run `./scripts/setup.sh` to install or reinstall.
|
|
115
|
-
|
|
116
|
-
## Features
|
|
117
|
-
|
|
118
|
-
### Knowledge Vault
|
|
119
|
-
SQLite-backed knowledge storage with FTS5 full-text search. Domains start empty and grow as you capture patterns.
|
|
120
|
-
|
|
121
|
-
### Intelligence Layer (Brain)
|
|
122
|
-
A local, zero-dependency intelligence layer that sits between facades and vault:
|
|
123
|
-
- **TF-IDF + Hybrid Scoring** — Re-ranks search results across 5 dimensions: semantic similarity (40%), severity (15%), recency (15%), tag overlap (15%), domain match (15%)
|
|
124
|
-
- **Auto-Tagging** — Extracts tags from title + description using TF-IDF scoring on capture
|
|
125
|
-
- **Duplicate Detection** — Checks similarity before capture: blocks at >= 0.8, warns at >= 0.6
|
|
126
|
-
- **Adaptive Weights** — Tracks accepted/dismissed results; after 30+ feedback entries, scoring weights auto-tune
|
|
127
|
-
- **Graceful Degradation** — Works immediately on empty vaults; falls back to severity + recency when vocabulary is empty
|
|
128
|
-
|
|
129
|
-
### Memory System
|
|
130
|
-
Captures session summaries, lessons learned, and user preferences. Memories persist across sessions and are searchable.
|
|
131
|
-
|
|
132
|
-
### Session Capture
|
|
133
|
-
A PreCompact hook automatically captures session summaries before context compaction, preserving context across sessions.
|
|
134
|
-
|
|
135
|
-
### Planning
|
|
136
|
-
Multi-step task planning with state machine: draft → approved → executing → completed. Plans are surfaced on activation.
|
|
137
|
-
|
|
138
|
-
### Export
|
|
139
|
-
Export vault knowledge as JSON bundles for version control and sharing.
|
|
140
|
-
|
|
141
|
-
### LLM Client (Optional)
|
|
142
|
-
Unified OpenAI/Anthropic client with multi-key rotation, circuit breakers, and model routing. Works without configuration — capabilities unlock when API keys are provided.
|
|
143
|
-
|
|
144
|
-
**Setup:**
|
|
145
|
-
Create `~/.code-reviewer/keys.json`:
|
|
146
|
-
```json
|
|
147
|
-
{
|
|
148
|
-
"openai": ["sk-..."],
|
|
149
|
-
"anthropic": ["sk-ant-..."]
|
|
150
|
-
}
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Or set environment variables: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`.
|
|
154
|
-
|
|
155
|
-
**Model routing** (optional) — `~/.code-reviewer/model-routing.json`:
|
|
156
|
-
```json
|
|
157
|
-
{
|
|
158
|
-
"routes": [],
|
|
159
|
-
"defaultOpenAIModel": "gpt-4o-mini",
|
|
160
|
-
"defaultAnthropicModel": "claude-sonnet-4-20250514"
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Use `llm_status` to check provider availability and key pool health.
|
|
165
|
-
|
|
166
|
-
## How to Use
|
|
167
|
-
|
|
168
|
-
### Activating and Deactivating
|
|
169
|
-
|
|
170
|
-
- **"Hello, Code Reviewer!"** — Activate the persona. Claude adopts Code Reviewer's identity, principles, and tool access for the session.
|
|
171
|
-
- **"Goodbye, Code Reviewer!"** — Deactivate. Claude returns to its default behavior.
|
|
172
|
-
|
|
173
|
-
### Daily Workflow
|
|
174
|
-
|
|
175
|
-
Once active, Code Reviewer works as your domain advisor. Here's how a typical session looks:
|
|
176
|
-
|
|
177
|
-
**Ask for guidance** — Code Reviewer searches its vault and responds with relevant patterns:
|
|
178
|
-
\`\`\`
|
|
179
|
-
You: How should we handle rate limiting?
|
|
180
|
-
Code Reviewer: [searches vault] Based on my patterns, here's what I recommend...
|
|
181
|
-
\`\`\`
|
|
182
|
-
|
|
183
|
-
**Capture knowledge** — When you discover something worth remembering, tell Code Reviewer to capture it:
|
|
184
|
-
\`\`\`
|
|
185
|
-
You: We decided to use token bucket for rate limiting. Capture this as a pattern.
|
|
186
|
-
Code Reviewer: [captures to vault with auto-tags: rate-limiting, token-bucket, api-design]
|
|
187
|
-
\`\`\`
|
|
188
|
-
|
|
189
|
-
**Plan multi-step work** — For larger tasks, Code Reviewer creates trackable plans:
|
|
190
|
-
\`\`\`
|
|
191
|
-
You: Plan out the caching implementation.
|
|
192
|
-
Code Reviewer: Created plan "Add Caching Layer" with 4 tasks:
|
|
193
|
-
1. Define cache invalidation strategy
|
|
194
|
-
2. Add Redis client configuration
|
|
195
|
-
3. Implement cache middleware
|
|
196
|
-
4. Add cache-related tests
|
|
197
|
-
Approve to start execution?
|
|
198
|
-
\`\`\`
|
|
199
|
-
|
|
200
|
-
**Give feedback** — When Code Reviewer suggests something, your response teaches it:
|
|
201
|
-
\`\`\`
|
|
202
|
-
You: That pattern doesn't apply here — we're using GraphQL, not REST.
|
|
203
|
-
Code Reviewer: [records feedback] Got it. I'll adjust future recommendations.
|
|
204
|
-
\`\`\`
|
|
205
|
-
|
|
206
|
-
**Search across sessions** — Knowledge persists. Next week, next month, different project:
|
|
207
|
-
\`\`\`
|
|
208
|
-
You: What did we decide about rate limiting last month?
|
|
209
|
-
Code Reviewer: [searches vault + memory] You chose token bucket with...
|
|
210
|
-
\`\`\`
|
|
211
|
-
|
|
212
|
-
### Key Operations
|
|
213
|
-
|
|
214
|
-
| What you want | What to say |
|
|
215
|
-
|---------------|-------------|
|
|
216
|
-
| Search knowledge | Ask any domain question |
|
|
217
|
-
| Capture a pattern | "Capture this as a pattern" / "Remember this" |
|
|
218
|
-
| Create a plan | "Plan out [task]" |
|
|
219
|
-
| Check vault health | "What's in your vault?" / "Vault stats" |
|
|
220
|
-
| Export knowledge | "Export your knowledge as JSON" |
|
|
221
|
-
| Check LLM status | "LLM status" (if API keys configured) |
|
|
222
|
-
|
|
223
|
-
## Populating Your Agent
|
|
224
|
-
|
|
225
|
-
Code Reviewer starts with an empty vault. Here's how to fill it with knowledge.
|
|
226
|
-
|
|
227
|
-
### One at a Time (conversational capture)
|
|
228
|
-
|
|
229
|
-
The simplest way — tell Code Reviewer what you've learned and ask it to capture:
|
|
230
|
-
|
|
231
|
-
\`\`\`
|
|
232
|
-
You: We decided to use token bucket for rate limiting with a 100 req/min limit.
|
|
233
|
-
Capture this as a pattern in api-design.
|
|
234
|
-
|
|
235
|
-
Code Reviewer: [captures to vault]
|
|
236
|
-
Captured: api-rate-limiting (pattern, warning)
|
|
237
|
-
Auto-tags: rate-limiting, token-bucket, api-design
|
|
238
|
-
\`\`\`
|
|
239
|
-
|
|
240
|
-
### Bulk Ingestion (document feed)
|
|
241
|
-
|
|
242
|
-
To populate the vault from existing documents (architecture docs, coding standards, RFCs, post-mortems), paste or reference the document and ask Code Reviewer to extract patterns:
|
|
243
|
-
|
|
244
|
-
\`\`\`
|
|
245
|
-
You: Here's our API design guide: [paste content or file path]
|
|
246
|
-
Read through it and capture every pattern, anti-pattern, and rule
|
|
247
|
-
into the api-design domain.
|
|
248
|
-
|
|
249
|
-
Code Reviewer: [reads document, extracts and captures each pattern]
|
|
250
|
-
Captured 12 entries:
|
|
251
|
-
- api-auth-jwt (pattern, critical) — Always use short-lived JWTs
|
|
252
|
-
- api-no-sql-in-controllers (anti-pattern, warning) — Keep SQL in data layer
|
|
253
|
-
- api-pagination-required (rule, warning) — All list endpoints must paginate
|
|
254
|
-
...
|
|
255
|
-
\`\`\`
|
|
256
|
-
|
|
257
|
-
This works with any text: wiki pages, Slack threads, PR review comments, meeting notes. Claude acts as the intake pipeline — it reads, classifies, and calls \`capture\` for each extracted entry.
|
|
258
|
-
|
|
259
|
-
### JSON Bundles (manual or scripted)
|
|
260
|
-
|
|
261
|
-
For programmatic loading, edit the JSON files directly:
|
|
262
|
-
|
|
263
|
-
\`\`\`json
|
|
264
|
-
// src/intelligence/data/api-design.json
|
|
265
|
-
{
|
|
266
|
-
"domain": "api-design",
|
|
267
|
-
"version": "1.0.0",
|
|
268
|
-
"entries": [
|
|
269
|
-
{
|
|
270
|
-
"id": "api-auth-jwt",
|
|
271
|
-
"type": "pattern",
|
|
272
|
-
"domain": "api-design",
|
|
273
|
-
"title": "Use short-lived JWTs for authentication",
|
|
274
|
-
"severity": "critical",
|
|
275
|
-
"description": "Issue JWTs with 15-minute expiry...",
|
|
276
|
-
"tags": ["auth", "jwt", "security"]
|
|
277
|
-
}
|
|
278
|
-
]
|
|
279
|
-
}
|
|
280
|
-
\`\`\`
|
|
281
|
-
|
|
282
|
-
Then rebuild (\`npm run build\`) to pick up the changes. Entries from JSON bundles load on startup.
|
|
283
|
-
|
|
284
|
-
### Tips for Building a Useful Vault
|
|
285
|
-
|
|
286
|
-
- **Start with your team's top 10 decisions** — the ones people keep asking about
|
|
287
|
-
- **Capture anti-patterns from real incidents** — what went wrong and why
|
|
288
|
-
- **Use severity wisely** — \`critical\` for must-follow rules, \`warning\` for strong recommendations, \`suggestion\` for nice-to-haves
|
|
289
|
-
- **Let auto-tagging work** — the Brain extracts tags from titles and descriptions automatically. You can add manual tags too, but you don't have to
|
|
290
|
-
- **Export regularly** — \`export\` dumps your vault to JSON for version control and sharing with teammates
|
|
291
|
-
|
|
292
|
-
## Growing Your Agent
|
|
293
|
-
|
|
294
|
-
Code Reviewer gets smarter through use — no code changes needed:
|
|
295
|
-
|
|
296
|
-
1. **Capture patterns** — Every time you capture a decision, pattern, or lesson, the vault grows. The Brain auto-tags entries and detects duplicates.
|
|
297
|
-
2. **Give feedback** — Accept or dismiss suggestions. After 30+ feedback entries, the Brain auto-tunes its scoring weights to match your preferences.
|
|
298
|
-
3. **Use memory** — Session summaries are captured automatically before context compaction. Lessons and preferences persist across sessions.
|
|
299
|
-
4. **Register projects** — Register Code Reviewer with multiple projects. It builds context about each one and surfaces relevant knowledge on activation.
|
|
300
|
-
5. **Export and share** — Export vault knowledge as JSON. Share bundles with teammates or back them up in version control.
|
|
301
|
-
|
|
302
|
-
The more you interact, the more valuable Code Reviewer becomes. A fresh agent with 50+ captured patterns and a month of feedback is significantly more useful than one on day one.
|
|
303
|
-
|
|
304
|
-
## Roadmap
|
|
305
|
-
|
|
306
|
-
Code Reviewer ships with a solid foundation. Below are optional improvements you can add yourself, ordered by impact.
|
|
307
|
-
|
|
308
|
-
### 1. Curator Pipeline
|
|
309
|
-
**What:** Background vault maintenance — tag normalization, duplicate merging, quality scoring, stale entry detection.
|
|
310
|
-
**Why:** Without grooming, vault quality degrades over time. Tags drift, duplicates accumulate, outdated entries linger.
|
|
311
|
-
**How:** Add a `src/curator/` module with: a job queue (SQLite-backed), a groom pipeline that scans entries on a schedule, a tag normalizer that consolidates synonyms, and a duplicate detector that merges near-identical entries. Wire it as a `curator` facade with ops like `groom`, `scan`, `normalize_tags`, `merge_duplicates`. Can optionally use the LLM client for GPT-powered classification.
|
|
312
|
-
|
|
313
|
-
### 2. Document Intake
|
|
314
|
-
**What:** Ingest documents (PDF, markdown, text) into the vault automatically — extract content, classify it, deduplicate, and write entries.
|
|
315
|
-
**Why:** Manual knowledge entry is the biggest friction point. An intake pipeline lets you point at reference material and populate the vault.
|
|
316
|
-
**How:** Add a `src/intake/` module with: a content extractor (start with markdown/text, add PDF via `pdf-parse`), a chunker that splits long documents into entry-sized pieces, a classifier that assigns domain/type/severity (can use LLM or heuristics), and a dedup gate that checks against existing entries before writing. Expose as an `intake` facade op.
|
|
317
|
-
|
|
318
|
-
### 3. Learning Loop
|
|
319
|
-
**What:** Turn accumulated feedback into measurable improvement — track which suggestions get accepted vs dismissed, extract user preferences, adjust scoring.
|
|
320
|
-
**Why:** The Brain already records feedback and tunes weights after 30+ entries. A full learning loop goes further: it builds a preference profile, identifies which patterns resonate, and deprioritizes ones that get consistently dismissed.
|
|
321
|
-
**How:** Add a `src/learning/` module with: a feedback analyzer that aggregates accept/dismiss rates per tag and per domain, a preference extractor that builds a user profile from feedback patterns, and a scoring adjuster that feeds insights back into the Brain's weight tuner. Run periodically or trigger after N new feedback entries.
|
|
322
|
-
|
|
323
|
-
### 4. Embeddings & Vector Search
|
|
324
|
-
**What:** Supplement TF-IDF with embedding-based semantic search using OpenAI's embedding API.
|
|
325
|
-
**Why:** TF-IDF is keyword-based — it misses semantic similarity (e.g., "auth" vs "authentication"). Embeddings capture meaning, not just words.
|
|
326
|
-
**How:** Add an embedding service that calls OpenAI's `text-embedding-3-small` via the LLM client, stores vectors in a `vault_embeddings` table, and adds a vector similarity search path to the Brain. Use cosine similarity to rank. Falls back to TF-IDF when no API key is configured.
|
|
327
|
-
|
|
328
|
-
### 5. Cross-Project Memory
|
|
329
|
-
**What:** Share knowledge and memories across projects — a global pattern pool, project linking, and unified search.
|
|
330
|
-
**Why:** Lessons learned in one project often apply to others. Without cross-project memory, each project starts from zero.
|
|
331
|
-
**How:** Extend the memory system with: a global pool table that stores entries visible to all projects, project link records that connect related projects, and a cross-project search op that queries across all registered projects. Add `scope` (project/global) to memory entries.
|
|
332
|
-
|
|
333
|
-
### 6. Context Engine
|
|
334
|
-
**What:** Semantic analysis of user messages — intent classification, entity extraction, and context-aware knowledge retrieval.
|
|
335
|
-
**Why:** Currently the agent responds to explicit ops. A context engine lets it understand *what the user means* and proactively retrieve relevant knowledge.
|
|
336
|
-
**How:** Add a `src/context/` module with: an intent classifier (rule-based patterns like "how do I" → PLAN, "this is broken" → FIX), an entity extractor that pulls domain-specific terms from messages, and a knowledge retriever that combines intent + entities to query the vault. Can start rule-based and upgrade to LLM-powered later.
|
|
337
|
-
|
|
338
|
-
### 7. Proactive Agency
|
|
339
|
-
**What:** The agent doesn't just answer — it anticipates, warns, and suggests without being asked.
|
|
340
|
-
**Why:** Moves the agent from reactive (Q&A) to proactive (advisor). Catches issues before they become problems.
|
|
341
|
-
**How:** Add a `src/agency/` module with: a suggestion generator that surfaces relevant patterns based on context, a warning detector that flags potential issues (e.g., anti-patterns in captured code), and a notification system that delivers insights at the right moment. Wire into Claude Code hooks for file-change triggers.
|
|
342
|
-
|
|
343
|
-
### 8. Plugin System
|
|
344
|
-
**What:** Runtime-extensible architecture — load, validate, and hot-reload plugins that add new facades, ops, or intelligence.
|
|
345
|
-
**Why:** Lets users extend the agent without modifying core code. Third parties can publish domain-specific plugins.
|
|
346
|
-
**How:** Add a `src/plugins/` module with: a plugin loader that scans a directory for plugin packages, a validator that checks plugin manifests against a schema, a registry that tracks active plugins and their facades, and a hot-reload watcher. Each plugin exports a `register()` function that receives the vault and brain instances.
|