learning-agent 0.1.0 → 0.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/CHANGELOG.md +21 -2
- package/README.md +34 -5
- package/dist/cli.js +758 -16
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +10 -19
package/CHANGELOG.md
CHANGED
|
@@ -7,8 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.0] - 2026-01-31
|
|
11
|
+
|
|
10
12
|
### Added
|
|
11
13
|
|
|
14
|
+
- **Claude Code Integration**
|
|
15
|
+
- `learning-agent setup claude` - Install SessionStart hooks into Claude Code settings
|
|
16
|
+
- `--project` flag for project-level hooks (vs global)
|
|
17
|
+
- `--uninstall` to remove hooks
|
|
18
|
+
- `--dry-run` to preview changes
|
|
19
|
+
- Automatic lesson injection at session start, resume, and compact events
|
|
20
|
+
|
|
12
21
|
- **Storage Enhancements**
|
|
13
22
|
- Compaction system for archiving old lessons and removing tombstones
|
|
14
23
|
- Smart sync: rebuild index only when JSONL changes
|
|
@@ -27,14 +36,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
27
36
|
- Simplified model download using node-llama-cpp resolveModelFile
|
|
28
37
|
|
|
29
38
|
- **Testing**
|
|
30
|
-
-
|
|
31
|
-
- Property-based tests with fast-check
|
|
39
|
+
- 501 tests with property-based testing (fast-check)
|
|
32
40
|
- Integration tests for capture workflows
|
|
33
41
|
|
|
34
42
|
### Changed
|
|
35
43
|
|
|
36
44
|
- Unified QuickLesson and FullLesson into single Lesson type
|
|
37
45
|
- Removed deprecated type exports
|
|
46
|
+
- `check-plan` now hard-fails on embedding errors (exit non-zero with actionable message)
|
|
47
|
+
- `capture` and `detect --save` now require `--yes` flag for saves
|
|
48
|
+
- `learn` command always saves with `confirmed: true`
|
|
49
|
+
- Hook installation is non-destructive (appends to existing hooks)
|
|
50
|
+
- Hook installation respects `core.hooksPath` git configuration
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- Embedding errors no longer masked as "no relevant lessons" in check-plan
|
|
55
|
+
- Git hooks no longer overwrite existing pre-commit hooks
|
|
56
|
+
- AGENTS.md template now includes explicit plan-time instructions
|
|
38
57
|
|
|
39
58
|
## [0.1.0] - 2025-01-30
|
|
40
59
|
|
package/README.md
CHANGED
|
@@ -111,13 +111,42 @@ learning-agent compact
|
|
|
111
111
|
|
|
112
112
|
## Claude Code Integration
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
### Automatic Setup (Recommended)
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Install hooks into Claude Code settings (global)
|
|
118
|
+
npx learning-agent setup claude
|
|
119
|
+
|
|
120
|
+
# Install to project only
|
|
121
|
+
npx learning-agent setup claude --project
|
|
122
|
+
|
|
123
|
+
# Preview what would change
|
|
124
|
+
npx learning-agent setup claude --dry-run
|
|
125
|
+
|
|
126
|
+
# Remove hooks
|
|
127
|
+
npx learning-agent setup claude --uninstall
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
This installs a SessionStart hook that automatically loads lessons when Claude starts, resumes, or compacts context.
|
|
131
|
+
|
|
132
|
+
### Manual Setup
|
|
133
|
+
|
|
134
|
+
Add to your `~/.claude/settings.json`:
|
|
115
135
|
|
|
116
136
|
```json
|
|
117
137
|
{
|
|
118
138
|
"hooks": {
|
|
119
|
-
"
|
|
120
|
-
|
|
139
|
+
"SessionStart": [
|
|
140
|
+
{
|
|
141
|
+
"matcher": "startup|resume|compact",
|
|
142
|
+
"hooks": [
|
|
143
|
+
{
|
|
144
|
+
"type": "command",
|
|
145
|
+
"command": "npx learning-agent load-session 2>/dev/null || true"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
]
|
|
121
150
|
}
|
|
122
151
|
}
|
|
123
152
|
```
|
|
@@ -127,7 +156,7 @@ Add to your `.claude/settings.json` to automatically load lessons:
|
|
|
127
156
|
| Command | Purpose |
|
|
128
157
|
|---------|---------|
|
|
129
158
|
| `load-session` | Load high-severity lessons at session start |
|
|
130
|
-
| `check-plan` | Retrieve relevant lessons when planning |
|
|
159
|
+
| `check-plan --plan "..."` | Retrieve relevant lessons when planning |
|
|
131
160
|
|
|
132
161
|
## API Reference
|
|
133
162
|
|
|
@@ -208,7 +237,7 @@ pnpm lint
|
|
|
208
237
|
|
|
209
238
|
## Project Status
|
|
210
239
|
|
|
211
|
-
Version 0.
|
|
240
|
+
Version 0.2.0 - Claude Code hooks integration complete. See [doc/SPEC.md](doc/SPEC.md) for the full specification and [CHANGELOG.md](CHANGELOG.md) for recent changes.
|
|
212
241
|
|
|
213
242
|
## Documentation
|
|
214
243
|
|