liteagents 2.4.6 → 2.5.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 +10 -33
- package/README.md +33 -15
- package/docs/LONG_TERM_MEMORY.md +449 -0
- package/installer/cli.js +10 -10
- package/package.json +2 -2
- package/packages/ampcode/AGENT.md +3 -1
- package/packages/ampcode/agents/context-builder.md +14 -12
- package/packages/ampcode/commands/docs-builder/templates.md +29 -0
- package/packages/ampcode/commands/docs-builder.md +261 -58
- package/packages/ampcode/commands/friction/friction.js +2168 -0
- package/packages/ampcode/commands/friction.md +139 -0
- package/packages/ampcode/commands/remember.md +110 -0
- package/packages/claude/CLAUDE.md +3 -1
- package/packages/claude/agents/context-builder.md +7 -4
- package/packages/claude/commands/friction/friction.js +2168 -0
- package/packages/claude/commands/friction.md +139 -0
- package/packages/claude/commands/remember.md +110 -0
- package/packages/claude/skills/docs-builder/SKILL.md +261 -58
- package/packages/claude/skills/docs-builder/references/templates.md +29 -0
- package/packages/droid/AGENTS.md +3 -1
- package/packages/droid/commands/docs-builder/templates.md +29 -0
- package/packages/droid/commands/docs-builder.md +261 -58
- package/packages/droid/commands/friction/friction.js +2168 -0
- package/packages/droid/commands/friction.md +139 -0
- package/packages/droid/commands/remember.md +110 -0
- package/packages/droid/droids/context-builder.md +15 -13
- package/packages/opencode/AGENTS.md +3 -1
- package/packages/opencode/agent/context-builder.md +14 -12
- package/packages/opencode/command/docs-builder/templates.md +29 -0
- package/packages/opencode/command/docs-builder.md +261 -58
- package/packages/opencode/command/friction/friction.js +2168 -0
- package/packages/opencode/command/friction.md +139 -0
- package/packages/opencode/command/remember.md +110 -0
- package/packages/opencode/opencode.jsonc +8 -0
- package/packages/subagentic-manual.md +33 -15
- package/packages/ampcode/README.md +0 -17
- package/packages/claude/README.md +0 -23
- package/packages/droid/README.md +0 -17
- package/packages/opencode/README.md +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -17,40 +17,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
## [2.4.
|
|
20
|
+
## [2.4.7] - 2026-02-02
|
|
21
21
|
|
|
22
|
-
###
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- CLI installer version display: Showed v2.4.4 but package was v2.4.5 (still mismatched)
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
## [2.4.4] - 2026-01-24
|
|
35
|
-
|
|
36
|
-
### Fixed
|
|
37
|
-
- CLI installer version display: Updated to v2.4.3 (still had mismatch with v2.4.4)
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## [2.4.3] - 2026-01-24
|
|
42
|
-
|
|
43
|
-
### Fixed
|
|
44
|
-
- CLI installer version display: Updated from v2.4.1 to v2.4.2 (still had mismatch)
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## [2.4.2] - 2026-01-24
|
|
49
|
-
|
|
50
|
-
### Fixed
|
|
51
|
-
- CLI installer banner: Updated ASCII art from "AGENTIC KIT" to "LITEAGENTS"
|
|
52
|
-
- CLI installer: Updated version display from v2.4.0 to v2.4.1
|
|
53
|
-
- installer/cli.js: Updated file header comment to reference liteagents
|
|
22
|
+
### Changed
|
|
23
|
+
- **docs-builder skill** - Enhanced with reorganization capabilities
|
|
24
|
+
- Added Fresh vs Existing mode detection (auto-detects if `/docs` already has content)
|
|
25
|
+
- New archive tier (`/docs/archive/`) for old/unclear documentation
|
|
26
|
+
- Categorization workflow: KEEP, CONSOLIDATE, or ARCHIVE existing files
|
|
27
|
+
- Heuristics for automatic categorization based on filename patterns and content
|
|
28
|
+
- Consolidation logic for merging duplicate content
|
|
29
|
+
- Updated across all packages (claude, opencode, ampcode, droid)
|
|
54
30
|
|
|
55
31
|
---
|
|
56
32
|
|
|
@@ -500,6 +476,7 @@ npx liteagents
|
|
|
500
476
|
|
|
501
477
|
| Version | Date | Key Features |
|
|
502
478
|
|---------|------|--------------|
|
|
479
|
+
| **2.4.7** | 2026-02-02 | Enhanced docs-builder skill with reorganization capabilities |
|
|
503
480
|
| **2.3.0** | 2026-01-22 | Removed subagent-spawning skill (20 commands) |
|
|
504
481
|
| **1.11.1** | 2026-01-20 | Fixed missing commands in opencode.jsonc |
|
|
505
482
|
| **1.11.0** | 2026-01-20 | Added /stash command (21 total commands) |
|
package/README.md
CHANGED
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
╚══════╝╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
**AI development toolkit with 11 specialized agents and
|
|
13
|
-
|
|
14
|
-
</div>
|
|
12
|
+
**AI development toolkit with 11 specialized agents and 22 commands per tool**
|
|
15
13
|
|
|
16
14
|
[](https://www.npmjs.com/package/liteagents)
|
|
17
15
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -22,6 +20,8 @@
|
|
|
22
20
|
[](https://github.com/amrhas82/ampcode)
|
|
23
21
|
[](https://github.com/amrhas82/droid)
|
|
24
22
|
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
25
|
Specialized AI agents and workflow commands for product management, agile development, and software engineering. Simple installer supports Claude, Opencode, Ampcode, and Droid.
|
|
26
26
|
|
|
27
27
|
---
|
|
@@ -29,22 +29,24 @@ Specialized AI agents and workflow commands for product management, agile develo
|
|
|
29
29
|
## 🚀 Quick Start
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
#
|
|
33
|
-
|
|
32
|
+
# Option 1: NPX (recommended)
|
|
33
|
+
npx liteagents
|
|
34
34
|
|
|
35
|
-
#
|
|
35
|
+
# Option 2: Global install (never use sudo)
|
|
36
|
+
npm install -g liteagents
|
|
36
37
|
liteagents
|
|
37
38
|
|
|
38
|
-
#
|
|
39
|
-
#
|
|
39
|
+
# If permission errors:
|
|
40
|
+
# mkdir -p ~/.npm-global && npm config set prefix '~/.npm-global'
|
|
41
|
+
# echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc && source ~/.bashrc
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
### Supported Tools
|
|
43
45
|
|
|
44
|
-
- **Claude Code** - 11 subagents + 10 skills +
|
|
45
|
-
- **Opencode** - 11 agent references +
|
|
46
|
-
- **Ampcode** - 11 subagents + 10 skills +
|
|
47
|
-
- **Droid** - 11 agent references +
|
|
46
|
+
- **Claude Code** - 11 subagents + 10 skills + 12 commands
|
|
47
|
+
- **Opencode** - 11 agent references + 22 commands
|
|
48
|
+
- **Ampcode** - 11 subagents + 10 skills + 12 commands
|
|
49
|
+
- **Droid** - 11 agent references + 22 commands
|
|
48
50
|
|
|
49
51
|
**Key Difference:**
|
|
50
52
|
- **Claude Code**: Full subagent system with orchestrator + skills (auto-triggering)
|
|
@@ -86,14 +88,14 @@ liteagents
|
|
|
86
88
|
- **system-architect** - System design, technology selection, API design, scalability planning
|
|
87
89
|
- **ui-designer** - UI/UX design, wireframes, prototypes, accessibility, design systems
|
|
88
90
|
|
|
89
|
-
###
|
|
91
|
+
### 22 Commands/Skills
|
|
90
92
|
|
|
91
93
|
**Auto-Triggering Skills (3)** - Claude Code only:
|
|
92
94
|
- **test-driven-development** - Write test first, watch fail, minimal passing code
|
|
93
95
|
- **testing-anti-patterns** - Prevent mocking anti-patterns
|
|
94
96
|
- **verification-before-completion** - Verify before claiming done
|
|
95
97
|
|
|
96
|
-
**Manual Skills/Commands (
|
|
98
|
+
**Manual Skills/Commands (19):**
|
|
97
99
|
- **brainstorming** - Structured brainstorming sessions
|
|
98
100
|
- **code-review** - Implementation review against requirements
|
|
99
101
|
- **condition-based-waiting** - Replace timeouts with condition polling
|
|
@@ -103,15 +105,31 @@ liteagents
|
|
|
103
105
|
- **systematic-debugging** - Four-phase debugging framework
|
|
104
106
|
- **debug** - Systematic issue investigation
|
|
105
107
|
- **explain** - Explain code for newcomers
|
|
108
|
+
- **friction** - Analyze session logs for failure patterns and behavioral signals
|
|
106
109
|
- **git-commit** - Intelligent commit creation
|
|
107
110
|
- **optimize** - Performance analysis
|
|
108
111
|
- **refactor** - Safe refactoring with behavior preservation
|
|
112
|
+
- **remember** - Consolidate stashes + friction into project memory
|
|
109
113
|
- **review** - Comprehensive code review
|
|
110
114
|
- **security** - Vulnerability scanning
|
|
111
115
|
- **ship** - Pre-deployment checklist
|
|
112
116
|
- **stash** - Save session context for compaction recovery or handoffs
|
|
113
117
|
- **test-generate** - Generate test suites
|
|
114
118
|
|
|
119
|
+
### Hot Memory (3-step pipeline)
|
|
120
|
+
|
|
121
|
+
Lightweight session memory that learns from your usage patterns.
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
/stash → /friction → /remember
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
1. **`/stash`** - Snapshot current session context to `.claude/stash/`. Use before compaction, handoffs, or ending complex work.
|
|
128
|
+
2. **`/friction`** - Analyze session logs for failure patterns. Scores sessions, clusters failures, outputs actionable antigens.
|
|
129
|
+
3. **`/remember`** - Consolidate stashes + friction into `.claude/memory/MEMORY.md`. Extracts facts, episodes, and behavioral preferences. Injects into CLAUDE.md via `@MEMORY.md`.
|
|
130
|
+
|
|
131
|
+
**Result:** Project-local memory that accumulates across sessions — no external dependencies, no databases, just markdown.
|
|
132
|
+
|
|
115
133
|
---
|
|
116
134
|
|
|
117
135
|
## 📖 Documentation
|
|
@@ -156,7 +174,7 @@ liteagents
|
|
|
156
174
|
## 📊 Stats
|
|
157
175
|
|
|
158
176
|
- **11** Specialized Agents
|
|
159
|
-
- **
|
|
177
|
+
- **22** Workflow Commands & Skills
|
|
160
178
|
- **4** Supported Tools (Claude, Opencode, Ampcode, Droid)
|
|
161
179
|
- **MIT** License
|
|
162
180
|
|
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
# Long-Term Memory Architecture
|
|
2
|
+
|
|
3
|
+
**Status:** IMPLEMENTING
|
|
4
|
+
**Updated:** 2026-02-11
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Problem
|
|
9
|
+
|
|
10
|
+
AI dev agents forget everything between sessions. Current mitigations (CLAUDE.md, .aurora/config) are manually maintained and project-scoped. Cross-project preferences, past decisions, and learned lessons are lost unless the user re-states them.
|
|
11
|
+
|
|
12
|
+
## Design Principles
|
|
13
|
+
|
|
14
|
+
1. **Three independent actions** — `/stash`, `/friction`, `/remember` — no coupling
|
|
15
|
+
2. **All project-local** — memory lives in `.claude/`, travels with the project
|
|
16
|
+
3. **No session-end hook** — there is no reliable session boundary
|
|
17
|
+
4. **No per-turn extraction** — 90% of dev turns are mechanical noise
|
|
18
|
+
5. **Curation > retrieval** — store less, store better, load everything
|
|
19
|
+
6. **No vector store** — the curated set is small enough to load as a preamble
|
|
20
|
+
7. **Portable** — plain markdown files, works with any agent
|
|
21
|
+
8. **JS runtime** — friction script in Node.js (guaranteed available with Claude Code)
|
|
22
|
+
9. **Single file** — one MEMORY.md with sections, not multiple files
|
|
23
|
+
|
|
24
|
+
## Architecture
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
ACTIONS (independent) STORAGE (project-local) RETRIEVAL
|
|
28
|
+
───────────────────── ──────────────────────── ─────────
|
|
29
|
+
|
|
30
|
+
/stash .claude/stash/*.md
|
|
31
|
+
(capture session, (raw material,
|
|
32
|
+
unchanged from today) accumulates)
|
|
33
|
+
│
|
|
34
|
+
/friction <path> │
|
|
35
|
+
(analyze behavior, .claude/friction/
|
|
36
|
+
JS script, produces antigen_review.md
|
|
37
|
+
antigen_review) │
|
|
38
|
+
│
|
|
39
|
+
/remember ────────────────────────────┤
|
|
40
|
+
(consolidate all sources) │
|
|
41
|
+
▼
|
|
42
|
+
.claude/memory/
|
|
43
|
+
MEMORY.md ──→ CLAUDE.md
|
|
44
|
+
(## Facts (@MEMORY.md ref +
|
|
45
|
+
## Episodes MEMORY:START/END
|
|
46
|
+
## Preferences) markers)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Key Separation
|
|
50
|
+
|
|
51
|
+
| Action | Job | Weight | Frequency |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| `/stash` | Capture session context | Light (haiku, one file) | Multiple times/day |
|
|
54
|
+
| `/friction` | Analyze behavioral signals | Medium (JS script) | Every 1-2 weeks |
|
|
55
|
+
| `/remember` | Consolidate → MEMORY.md → CLAUDE.md | Heavy (reads all, multiple LLM calls) | Weekly or on-demand |
|
|
56
|
+
|
|
57
|
+
Each action is independent. `/stash` and `/friction` produce raw material. `/remember` consumes it.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Decisions Made
|
|
62
|
+
|
|
63
|
+
| Decision | Choice | Rationale |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| Storage format | Single MEMORY.md with 3 sections | Simpler than 3 files, one source of truth |
|
|
66
|
+
| CLAUDE.md loading | @MEMORY.md reference + injected content | Direct loading via @ ref, content between MEMORY:START/END markers |
|
|
67
|
+
| @ exception | @MEMORY.md is the ONLY allowed @ reference | All other file refs remain plain text paths |
|
|
68
|
+
| Friction JS | Single file, embedded config, no deps | Lightweight, vanilla Node.js, portable |
|
|
69
|
+
| Friction JS location | `packages/claude/commands/friction/friction.js` (dev), `.claude/commands/friction/friction.js` (installed) | Package-first development |
|
|
70
|
+
| Principles | Static section in CLAUDE.md, manually maintained | Not auto-managed — stable, rarely changes |
|
|
71
|
+
| Blueprint | New artifact in docs-builder at `docs/00-context/blueprint.md` | Overarching project doc, created by /docs-builder |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## User Types
|
|
76
|
+
|
|
77
|
+
Two paths to the same memory system:
|
|
78
|
+
|
|
79
|
+
| | Liteagents user | Aurora user |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| Capture sessions | `/stash` (skill/command) | `/stash` (same) |
|
|
82
|
+
| Analyze behavior | `/friction` (command, runs `friction.js`) | `aur friction` (CLI, runs `friction.py`) |
|
|
83
|
+
| Consolidate memory | `/remember` (command) | `/remember` (same) |
|
|
84
|
+
| Friction output | `.claude/friction/` | `.aurora/friction/` (legacy) or `.claude/friction/` |
|
|
85
|
+
|
|
86
|
+
Both produce the same output format. `/remember` checks both locations.
|
|
87
|
+
|
|
88
|
+
### Friction Script: JS vs Python
|
|
89
|
+
|
|
90
|
+
| | `friction.js` (liteagents) | `friction.py` (aurora) |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| Runtime | Node.js (guaranteed with Claude Code) | Python (may not be installed) |
|
|
93
|
+
| Invoked by | `/friction` command | `aur friction` CLI |
|
|
94
|
+
| Location | `packages/claude/commands/friction/friction.js` | `scripts/friction.py` |
|
|
95
|
+
| Output format | Same: `.claude/friction/` | Same: `.aurora/friction/` |
|
|
96
|
+
| Logic | Same 14 signals, same weights, same scoring | Original implementation |
|
|
97
|
+
| Structure | Single file, embedded config | 3 files (friction.py + friction_analyze.py + antigen_extract.py) |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Actions
|
|
102
|
+
|
|
103
|
+
### /stash — Capture session (unchanged)
|
|
104
|
+
|
|
105
|
+
What it does today. No changes needed.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
1. User runs /stash at natural breakpoints
|
|
109
|
+
2. Haiku summarizes session context
|
|
110
|
+
3. Writes .claude/stash/<name>.md
|
|
111
|
+
4. Done. No extraction, no consolidation.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Stash files accumulate as raw material for `/remember`.
|
|
115
|
+
|
|
116
|
+
### /friction — Analyze behavior
|
|
117
|
+
|
|
118
|
+
Runs friction analysis via Node.js script. Takes session path as required argument.
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
1. User runs /friction <sessions-path>
|
|
122
|
+
e.g. /friction ~/.claude/projects/-home-hamr-PycharmProjects-aurora/
|
|
123
|
+
|
|
124
|
+
2. Looks for friction.js:
|
|
125
|
+
- packages/claude/commands/friction/friction.js (development)
|
|
126
|
+
- .claude/commands/friction/friction.js (installed)
|
|
127
|
+
- Falls back to manual analysis if neither found
|
|
128
|
+
|
|
129
|
+
3. Script analyzes Claude session JSONL files:
|
|
130
|
+
- Reads session files from <path>
|
|
131
|
+
- Detects 14 signal types (same as friction.py)
|
|
132
|
+
- Scores sessions, identifies BAD/FRICTION/ROUGH/OK
|
|
133
|
+
- Extracts antigen candidates from BAD sessions
|
|
134
|
+
|
|
135
|
+
4. Output writes to .claude/friction/ (project-local):
|
|
136
|
+
- friction_analysis.json per-session breakdown
|
|
137
|
+
- friction_summary.json aggregate stats + verdict
|
|
138
|
+
- friction_raw.jsonl raw signals
|
|
139
|
+
- antigen_candidates.json extracted patterns
|
|
140
|
+
- antigen_review.md human-readable review
|
|
141
|
+
|
|
142
|
+
5. Done. No memory consolidation yet.
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### /remember — Consolidate into MEMORY.md and CLAUDE.md
|
|
146
|
+
|
|
147
|
+
Reads all sources, extracts what matters, writes single MEMORY.md, injects into CLAUDE.md.
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
/remember pseudocode:
|
|
151
|
+
|
|
152
|
+
# 1. Gather sources
|
|
153
|
+
stashes = glob(".claude/stash/*.md")
|
|
154
|
+
|
|
155
|
+
friction = find_first([
|
|
156
|
+
".claude/friction/antigen_review.md", # liteagents output
|
|
157
|
+
".aurora/friction/antigen_review.md" # aurora output (legacy)
|
|
158
|
+
])
|
|
159
|
+
|
|
160
|
+
existing_memory = read(".claude/memory/MEMORY.md") # parse 3 sections
|
|
161
|
+
processed = read(".claude/memory/.processed")
|
|
162
|
+
|
|
163
|
+
# 2. Extract facts + episodes from unprocessed stashes
|
|
164
|
+
unprocessed = filter(stashes, not_in=processed)
|
|
165
|
+
|
|
166
|
+
for stash in unprocessed:
|
|
167
|
+
extraction = haiku.call(
|
|
168
|
+
system = """Extract from this session stash:
|
|
169
|
+
|
|
170
|
+
FACTS (atomic, one-line):
|
|
171
|
+
- Stable preferences (tools, languages, style)
|
|
172
|
+
- Decisions made ("chose X over Y because Z")
|
|
173
|
+
- Corrections ("no, I meant...", "don't do that")
|
|
174
|
+
- Explicit "remember this"
|
|
175
|
+
|
|
176
|
+
EPISODE (3-5 bullet narrative):
|
|
177
|
+
- What was the problem/goal?
|
|
178
|
+
- What approaches were tried?
|
|
179
|
+
- What was the outcome and lesson?
|
|
180
|
+
|
|
181
|
+
SKIP: code details, file paths, errors, mechanical steps,
|
|
182
|
+
LLM responses, one-off details""",
|
|
183
|
+
content = stash.content
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
new_facts += extraction.facts
|
|
187
|
+
new_episodes += extraction.episode
|
|
188
|
+
|
|
189
|
+
# 3. Merge facts (deduplicate)
|
|
190
|
+
facts = haiku.call(
|
|
191
|
+
system = """Merge new facts with existing. Rules:
|
|
192
|
+
- New updates replace old, contradictions keep new
|
|
193
|
+
- Duplicates dropped, keep atomic one-line each""",
|
|
194
|
+
existing = existing_memory.facts,
|
|
195
|
+
new = new_facts
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
# 4. Append episodes (no dedup, append-only)
|
|
199
|
+
episodes = existing_memory.episodes + new_episodes
|
|
200
|
+
|
|
201
|
+
# 5. Distill friction into preferences (if output exists)
|
|
202
|
+
if friction.exists:
|
|
203
|
+
preferences = haiku.call(
|
|
204
|
+
system = """Extract BEHAVIORAL preferences (demonstrated, not stated).
|
|
205
|
+
High Confidence: 5+ observations (loaded into CLAUDE.md)
|
|
206
|
+
Medium Confidence: 3+ observations (observing)
|
|
207
|
+
Low Confidence: <3 observations (needs more data)
|
|
208
|
+
Promote/demote based on new evidence.""",
|
|
209
|
+
friction_review = friction.content,
|
|
210
|
+
existing_prefs = existing_memory.preferences
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
# 6. Write single MEMORY.md
|
|
214
|
+
write(".claude/memory/MEMORY.md", format(facts, episodes, preferences))
|
|
215
|
+
|
|
216
|
+
# 7. Inject into CLAUDE.md between MEMORY:START/END markers
|
|
217
|
+
# Include @MEMORY.md reference for direct loading
|
|
218
|
+
update_section("CLAUDE.md", "MEMORY:START", "MEMORY:END", {
|
|
219
|
+
facts: all,
|
|
220
|
+
preferences: high_confidence_only,
|
|
221
|
+
episodes: last_5
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
# 8. Mark stashes as processed
|
|
225
|
+
append(".claude/memory/.processed", [s.path for s in unprocessed])
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## MEMORY.md — Single Source of Truth
|
|
231
|
+
|
|
232
|
+
One file with three sections. Auto-generated by `/remember`. Do not edit manually.
|
|
233
|
+
|
|
234
|
+
```markdown
|
|
235
|
+
# Project Memory
|
|
236
|
+
> Auto-generated by /remember. Do not edit manually.
|
|
237
|
+
|
|
238
|
+
## Facts
|
|
239
|
+
- timezone: EST
|
|
240
|
+
- python projects: always use hatchling
|
|
241
|
+
- commit style: conventional commits, no co-author line
|
|
242
|
+
- preferred test runner: pytest with -x flag
|
|
243
|
+
- switched from setuptools to hatchling for cli package (2026-01)
|
|
244
|
+
|
|
245
|
+
## Episodes
|
|
246
|
+
### 2026-02-03 aurora/lsp-hook
|
|
247
|
+
- tried text fallback when LSP cold — caused noise from keyword extraction
|
|
248
|
+
- root cause: symbol extraction from arbitrary lines picks up keywords not symbols
|
|
249
|
+
- solution: only show count+risk when LSP works, text fallback only for 0 refs
|
|
250
|
+
- lesson: don't mix search strategies in same code path
|
|
251
|
+
|
|
252
|
+
### 2026-01-28 aurora/friction-pipeline
|
|
253
|
+
- explored 3 approaches to friction scoring: flat weights, decay, tier-based
|
|
254
|
+
- picked tier-based because it maps to confidence levels naturally
|
|
255
|
+
- key insight: gold signals (user_intervention) are 95% predictive alone
|
|
256
|
+
|
|
257
|
+
## Preferences
|
|
258
|
+
### High Confidence
|
|
259
|
+
- never add docstrings unless asked (rejected 12/15 times)
|
|
260
|
+
- prefer editing existing files over creating new (rejected new file 8/10)
|
|
261
|
+
- keep commit messages short, one line (rewrote 4/7 verbose ones)
|
|
262
|
+
|
|
263
|
+
### Medium Confidence
|
|
264
|
+
- may prefer tabs over spaces (2 observations)
|
|
265
|
+
|
|
266
|
+
### Low Confidence
|
|
267
|
+
- possible preference for click over argparse (1 observation)
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**Promotion:** low → medium at 3 obs, medium → high at 5+ obs
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Retrieval: CLAUDE.md + @MEMORY.md
|
|
275
|
+
|
|
276
|
+
Memory is loaded two ways:
|
|
277
|
+
1. **@MEMORY.md** — direct file reference in CLAUDE.md, points to `.claude/memory/MEMORY.md`
|
|
278
|
+
2. **MEMORY:START/END markers** — injected summary (facts + high-confidence prefs + last 5 episodes)
|
|
279
|
+
|
|
280
|
+
This is the ONLY file that uses the @ reference pattern. All other file references remain plain text paths.
|
|
281
|
+
|
|
282
|
+
### What Gets Loaded
|
|
283
|
+
|
|
284
|
+
```markdown
|
|
285
|
+
<!-- MEMORY:START -->
|
|
286
|
+
# Project Memory (auto-generated by /remember)
|
|
287
|
+
@MEMORY.md
|
|
288
|
+
|
|
289
|
+
## Facts
|
|
290
|
+
- timezone: EST
|
|
291
|
+
- python: hatchling, pytest -x, make
|
|
292
|
+
- commit: conventional, no co-author
|
|
293
|
+
|
|
294
|
+
## Preferences
|
|
295
|
+
- never add docstrings unless asked
|
|
296
|
+
- prefer editing existing files over creating new
|
|
297
|
+
- keep commit messages short
|
|
298
|
+
|
|
299
|
+
## Recent Episodes
|
|
300
|
+
### 2026-02-03 aurora/lsp-hook
|
|
301
|
+
- tried text fallback when LSP cold — noise
|
|
302
|
+
- lesson: don't mix search strategies
|
|
303
|
+
<!-- MEMORY:END -->
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Why This Works
|
|
307
|
+
|
|
308
|
+
- **MEMORY.md** — single file, ~100-200 lines, all sections
|
|
309
|
+
- **CLAUDE.md injection** — summary only (facts + high prefs + last 5 episodes), ~100-150 lines
|
|
310
|
+
- **@MEMORY.md** — full file available for deep context when needed
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Why Not Per-Turn Extraction?
|
|
315
|
+
|
|
316
|
+
Dev sessions are different from chatbots:
|
|
317
|
+
- "Edit line 42 of foo.py" — not memorable
|
|
318
|
+
- "Run pytest" — not memorable
|
|
319
|
+
- 90%+ of turns are mechanical tool invocations
|
|
320
|
+
|
|
321
|
+
Per-turn extraction burns an LLM call per turn to store nothing.
|
|
322
|
+
|
|
323
|
+
## Why Not Session-End Hooks?
|
|
324
|
+
|
|
325
|
+
There is no reliable "session end" event in Claude Code:
|
|
326
|
+
- `/clear` — new session, no hook fires
|
|
327
|
+
- Close terminal — process killed, no hook
|
|
328
|
+
- Idle for hours — no timeout event
|
|
329
|
+
|
|
330
|
+
The only reliable triggers are explicit: `/stash`, `/friction`, `/remember`.
|
|
331
|
+
|
|
332
|
+
## Why Not Global Memory?
|
|
333
|
+
|
|
334
|
+
- Project-local memory moves with the project (git, clone, share)
|
|
335
|
+
- Cross-project preferences are rare (~15 lines) and stable
|
|
336
|
+
- Cross-project preferences belong in `~/.claude/MEMORY.md` (manually maintained, tiny)
|
|
337
|
+
- Project-specific context is 90% of what matters
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Workflow
|
|
342
|
+
|
|
343
|
+
```
|
|
344
|
+
Day-to-day:
|
|
345
|
+
/stash, /stash, /stash accumulate raw material
|
|
346
|
+
(natural breakpoints: feature done, bug solved, decision made)
|
|
347
|
+
|
|
348
|
+
Every 1-2 weeks:
|
|
349
|
+
/friction <sessions-path> analyze behavioral patterns
|
|
350
|
+
(or: aur friction for aurora users)
|
|
351
|
+
|
|
352
|
+
When ready:
|
|
353
|
+
/remember consolidate → MEMORY.md → CLAUDE.md
|
|
354
|
+
(reads stashes + friction, extracts, dedupes, writes MEMORY.md, injects into CLAUDE.md)
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Three independent actions. No dependencies between them. One output file.
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## File Locations
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
.claude/ # All project-local
|
|
365
|
+
stash/ # Raw session captures
|
|
366
|
+
lsp-poc-complete.md
|
|
367
|
+
headless-removal.md
|
|
368
|
+
friction/ # Friction analysis output
|
|
369
|
+
friction_analysis.json
|
|
370
|
+
friction_summary.json
|
|
371
|
+
friction_raw.jsonl
|
|
372
|
+
antigen_candidates.json
|
|
373
|
+
antigen_review.md
|
|
374
|
+
memory/ # Consolidated memory
|
|
375
|
+
MEMORY.md # Single source of truth (referenced as @MEMORY.md)
|
|
376
|
+
.processed # Manifest of processed stashes
|
|
377
|
+
|
|
378
|
+
packages/claude/
|
|
379
|
+
commands/
|
|
380
|
+
remember.md # /remember command
|
|
381
|
+
friction.md # /friction command
|
|
382
|
+
scripts/
|
|
383
|
+
friction.js # Friction analysis script (Node.js)
|
|
384
|
+
|
|
385
|
+
CLAUDE.md # Project preamble (has MEMORY section with @MEMORY.md ref)
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## Friction Script: JS Port
|
|
391
|
+
|
|
392
|
+
Single `friction.js` file — Node.js port of the existing Python pipeline (~2000 lines across `friction_analyze.py` + `antigen_extract.py`).
|
|
393
|
+
|
|
394
|
+
### Why JS
|
|
395
|
+
|
|
396
|
+
- Node.js is guaranteed available (Claude Code requires it)
|
|
397
|
+
- Python is NOT guaranteed (Windows, minimal Linux)
|
|
398
|
+
- The script uses only: file I/O, regex, JSON, string matching
|
|
399
|
+
- No ML, no heavy deps — trivial port to Node stdlib
|
|
400
|
+
|
|
401
|
+
### What It Does
|
|
402
|
+
|
|
403
|
+
```
|
|
404
|
+
Input: Session JSONL files from <sessions-path>
|
|
405
|
+
Output: .claude/friction/ (analysis, summary, raw signals, antigens, review)
|
|
406
|
+
|
|
407
|
+
1. Read session JSONL files (fs.readFileSync)
|
|
408
|
+
2. Extract 14 signal types per turn (regex, string match)
|
|
409
|
+
3. Score sessions (weighted accumulation, same config)
|
|
410
|
+
4. Classify quality (BAD/FRICTION/ROUGH/OK)
|
|
411
|
+
5. Aggregate stats (daily trends, best/worst)
|
|
412
|
+
6. Extract antigen candidates from BAD sessions
|
|
413
|
+
7. Write all output files
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Signals (same as Python, same weights)
|
|
417
|
+
|
|
418
|
+
| Signal | Weight | Detection |
|
|
419
|
+
|---|---|---|
|
|
420
|
+
| `user_intervention` | 10 | `/stash` in user message |
|
|
421
|
+
| `session_abandoned` | 10 | High friction at end, no resolution |
|
|
422
|
+
| `false_success` | 8 | LLM claimed success but tool failed |
|
|
423
|
+
| `no_resolution` | 8 | Errors without subsequent success |
|
|
424
|
+
| `tool_loop` | 6 | Same tool called 3+ times identically |
|
|
425
|
+
| `rapid_exit` | 6 | <3 turns, ends with error |
|
|
426
|
+
| `interrupt_cascade` | 5 | Multiple ESC/Ctrl+C within 60s |
|
|
427
|
+
| `user_curse` | 5 | Profanity detected |
|
|
428
|
+
| `request_interrupted` | 2.5 | User hit ESC/Ctrl+C |
|
|
429
|
+
| `exit_error` | 1 | Command failed (non-zero exit) |
|
|
430
|
+
| `repeated_question` | 1 | Same question asked twice |
|
|
431
|
+
| `long_silence` | 0.5 | >10 min gap |
|
|
432
|
+
| `user_negation` | 0.5 | "no", "didn't work" |
|
|
433
|
+
| `compaction` | 0.5 | Context overflow |
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## Open Questions (Remaining)
|
|
438
|
+
|
|
439
|
+
1. **Episode pruning** — last N entries? Age-based? Or keep all and only load recent 5 into CLAUDE.md?
|
|
440
|
+
2. **CLAUDE.md section size** — if memory grows beyond ~150 lines, should `/remember` compress older facts?
|
|
441
|
+
3. **Stash gitignore** — should `.claude/stash/` and `.claude/memory/` be git-tracked or gitignored?
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## Related
|
|
446
|
+
|
|
447
|
+
- [FRICTION_DETECTION.md](../FRICTION_DETECTION.md) — friction pipeline (Python version, aurora users)
|
|
448
|
+
- [MEM_INDEXING.md](MEM_INDEXING.md) — code memory indexing (separate system)
|
|
449
|
+
- [ACTR_ACTIVATION.md](ACTR_ACTIVATION.md) — activation scoring (could inform episode relevance)
|
package/installer/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Interactive CLI Installer for
|
|
5
|
-
*
|
|
4
|
+
* Interactive CLI Installer for Agentic Kit
|
|
5
|
+
*
|
|
6
6
|
* Provides 4-step installation process:
|
|
7
7
|
* 1. Package variant selection (Lite/Standard/Pro)
|
|
8
8
|
* 2. Tool selection (Claude/Opencode/Ampcode/Droid)
|
|
@@ -449,14 +449,14 @@ class InteractiveInstaller {
|
|
|
449
449
|
showWelcome() {
|
|
450
450
|
console.clear();
|
|
451
451
|
console.log(`
|
|
452
|
-
${colors.bright}${colors.cyan}
|
|
453
|
-
${colors.bright}${colors.cyan} ██║
|
|
454
|
-
${colors.bright}${colors.cyan}
|
|
455
|
-
${colors.bright}${colors.cyan}
|
|
456
|
-
${colors.bright}${colors.cyan}
|
|
457
|
-
${colors.bright}${colors.cyan}
|
|
458
|
-
|
|
459
|
-
${colors.bright}v2.4.
|
|
452
|
+
${colors.bright}${colors.cyan} █████╗ ██████╗ ███████╗███╗ ██╗████████╗██╗ ██████╗ ██╗ ██╗██╗████████╗${colors.reset}
|
|
453
|
+
${colors.bright}${colors.cyan}██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝██║██╔════╝ ██║ ██╔╝██║╚══██╔══╝${colors.reset}
|
|
454
|
+
${colors.bright}${colors.cyan}███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║ ██║██║ █████╔╝ ██║ ██║${colors.reset}
|
|
455
|
+
${colors.bright}${colors.cyan}██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ ██║██║ ██╔═██╗ ██║ ██║${colors.reset}
|
|
456
|
+
${colors.bright}${colors.cyan}██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ ██║╚██████╗ ██║ ██╗██║ ██║${colors.reset}
|
|
457
|
+
${colors.bright}${colors.cyan}╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝${colors.reset}
|
|
458
|
+
|
|
459
|
+
${colors.bright}v2.4.0 | 11 agents + 20 commands per tool${colors.reset}
|
|
460
460
|
`);
|
|
461
461
|
}
|
|
462
462
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "liteagents",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "AI development toolkit with 11 specialized agents and
|
|
3
|
+
"version": "2.5.0",
|
|
4
|
+
"description": "AI development toolkit with 11 specialized agents and 22 commands. Simple one-question installer for Claude, Opencode, Ampcode, and Droid.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"liteagents": "./installer/cli.js",
|
|
@@ -37,15 +37,17 @@ These subagents are available when using Ampcode CLI.
|
|
|
37
37
|
| testing-anti-patterns | Prevents testing mock behavior and production pollution with test-only methods | /testing-anti-patterns <testing-scenario> | true |
|
|
38
38
|
| verification-before-completion | Requires running verification commands before making any success claims | /verification-before-completion <work-to-verify> | true |
|
|
39
39
|
|
|
40
|
-
### Commands (
|
|
40
|
+
### Commands (12 total)
|
|
41
41
|
|
|
42
42
|
| ID | Description | Usage |
|
|
43
43
|
|---|---|---|
|
|
44
44
|
| debug | Debug an issue systematically using structured investigation techniques | /debug <issue-description> |
|
|
45
45
|
| explain | Explain code for someone new to the codebase | /explain <code-section> |
|
|
46
|
+
| friction | Analyze session logs for failure patterns and behavioral signals | /friction <sessions-path> |
|
|
46
47
|
| git-commit | Analyze changes and create intelligent git commits | /git-commit |
|
|
47
48
|
| optimize | Analyze and optimize performance issues | /optimize <target-area> |
|
|
48
49
|
| refactor | Refactor code while maintaining behavior and tests | /refactor <code-section> |
|
|
50
|
+
| remember | Consolidate stashes + friction into project memory | /remember |
|
|
49
51
|
| review | Comprehensive code review including quality, tests, and architecture | /review |
|
|
50
52
|
| security | Security vulnerability scan and analysis | /security |
|
|
51
53
|
| ship | Pre-deployment verification checklist | /ship |
|