@lore-ai/cli 0.1.6
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 +178 -0
- package/dist/bin/lore.js +14666 -0
- package/dist/bin/lore.js.map +1 -0
- package/dist/ui/assets/Analytics-W2ANIC2s.js +1 -0
- package/dist/ui/assets/ConversationDetail-Ct-hROwS.js +5 -0
- package/dist/ui/assets/Conversations-iK7E6GEl.js +1 -0
- package/dist/ui/assets/MarkdownPreview-2zDiish4.js +17 -0
- package/dist/ui/assets/MarkdownPreview-ZgkIHsf0.css +1 -0
- package/dist/ui/assets/Mcps-CCT1FQ4H.js +1 -0
- package/dist/ui/assets/Overview-B_jOY8il.js +1 -0
- package/dist/ui/assets/PhaseReview-B_DDY9YB.js +1 -0
- package/dist/ui/assets/RepoScans-FxiMynYO.js +2 -0
- package/dist/ui/assets/RepoSelector-DmPRS8kf.js +1 -0
- package/dist/ui/assets/ResizablePanels-Bbb4S6Ss.js +1 -0
- package/dist/ui/assets/Review-KjvS-DNP.js +3 -0
- package/dist/ui/assets/ScanConversation-BonEB7pv.js +1 -0
- package/dist/ui/assets/Scans-DXf2sNms.js +1 -0
- package/dist/ui/assets/Skills-MvVWWoB2.js +1 -0
- package/dist/ui/assets/ToolUsage-DA5MJNwl.js +33 -0
- package/dist/ui/assets/Vetting-BRGVrtOA.js +1 -0
- package/dist/ui/assets/index-CVSL0ryk.js +12 -0
- package/dist/ui/assets/index-DYKYIfPr.css +1 -0
- package/dist/ui/assets/markdown-CZuQZQX5.js +35 -0
- package/dist/ui/index.html +15 -0
- package/package.json +96 -0
- package/prompts/analyze-feedback.md +67 -0
- package/prompts/apply-refs-update.md +149 -0
- package/prompts/apply-skill-update.md +151 -0
- package/prompts/check-relevance.md +137 -0
- package/prompts/classify-conversations.md +78 -0
- package/prompts/cluster-repo-summaries.md +76 -0
- package/prompts/detect-staleness.md +42 -0
- package/prompts/distill-changes.md +62 -0
- package/prompts/distill-decisions.md +48 -0
- package/prompts/distill-patterns.md +39 -0
- package/prompts/generate-changelog.md +42 -0
- package/prompts/generate-references.md +192 -0
- package/prompts/generate-repo-skill.md +387 -0
- package/prompts/global-summary.md +55 -0
- package/prompts/orchestrate-merge.md +70 -0
- package/prompts/pr-description.md +49 -0
- package/prompts/research-repo.md +121 -0
- package/prompts/summarize-conversation.md +64 -0
- package/prompts/test-mcp.md +62 -0
- package/prompts/test-skill.md +72 -0
package/README.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Lore
|
|
2
|
+
|
|
3
|
+
**Automated project knowledge that writes itself.**
|
|
4
|
+
|
|
5
|
+
Lore is a CLI that runs periodic agentic scans over your development activity -- git history, AI coding conversations (Cursor, Claude Code) -- and distills them into living, always-current project documentation.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
### CLI
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Global install
|
|
13
|
+
npm install -g @lore-ai/cli
|
|
14
|
+
|
|
15
|
+
# Or run directly
|
|
16
|
+
npx @lore-ai/cli
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Editor Extension
|
|
20
|
+
|
|
21
|
+
Search **"Lore"** in the VS Code or Cursor extension marketplace, or install manually from a [GitHub Release](https://github.com/matan1542/lore/releases):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# VS Code
|
|
25
|
+
code --install-extension lore-cursor-extension-<version>.vsix
|
|
26
|
+
|
|
27
|
+
# Cursor
|
|
28
|
+
cursor --install-extension lore-cursor-extension-<version>.vsix
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Prerequisites
|
|
32
|
+
|
|
33
|
+
- **Node.js 18+**
|
|
34
|
+
- **Git** -- for scanning commit history
|
|
35
|
+
- **Claude Code CLI** (`claude`) -- for AI-powered distillation ([install](https://docs.anthropic.com/en/docs/claude-code/overview))
|
|
36
|
+
- **GitHub CLI** (`gh`) -- optional, for PR metadata scanning ([install](https://cli.github.com/))
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Initialize Lore in your project
|
|
42
|
+
lore init
|
|
43
|
+
|
|
44
|
+
# Run your first scan
|
|
45
|
+
lore sync
|
|
46
|
+
|
|
47
|
+
# Check what was captured
|
|
48
|
+
lore status
|
|
49
|
+
|
|
50
|
+
# Review proposed documentation updates
|
|
51
|
+
lore review
|
|
52
|
+
|
|
53
|
+
# Ask questions about your project
|
|
54
|
+
lore recall "why did we choose TypeScript?"
|
|
55
|
+
|
|
56
|
+
# Start automatic periodic scanning
|
|
57
|
+
lore watch
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## How It Works
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Developer writes code
|
|
64
|
+
|
|
|
65
|
+
v
|
|
66
|
+
Git commits + AI conversations accumulate
|
|
67
|
+
|
|
|
68
|
+
v
|
|
69
|
+
[ lore sync ] <-- manual or cron trigger
|
|
70
|
+
|
|
|
71
|
+
+---> Scans git log (commits, diffs)
|
|
72
|
+
+---> Scans GitHub PRs (titles, reviews, comments)
|
|
73
|
+
+---> Scans Claude Code sessions (JSONL transcripts)
|
|
74
|
+
+---> Scans Cursor conversations (workspace storage)
|
|
75
|
+
+---> Reads current documentation state
|
|
76
|
+
|
|
|
77
|
+
v
|
|
78
|
+
[ Alignment Engine ]
|
|
79
|
+
|
|
|
80
|
+
+---> Matches commits to conversations (by file overlap, branch, timing)
|
|
81
|
+
+---> Produces: matched pairs, unmatched commits, unmatched conversations
|
|
82
|
+
|
|
|
83
|
+
v
|
|
84
|
+
[ Agentic Distillation ] (via Claude Code CLI + Octocode MCP)
|
|
85
|
+
|
|
|
86
|
+
+---> Extracts what changed and WHY
|
|
87
|
+
+---> Identifies architectural decisions
|
|
88
|
+
+---> Detects emerging patterns
|
|
89
|
+
+---> Finds stale documentation
|
|
90
|
+
|
|
|
91
|
+
v
|
|
92
|
+
[ Documentation Output ]
|
|
93
|
+
|
|
|
94
|
+
+---> Updates CHANGELOG.md
|
|
95
|
+
+---> Creates Architecture Decision Records (ADRs)
|
|
96
|
+
+---> Updates architecture docs
|
|
97
|
+
+---> Queues items for human review
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Commands
|
|
101
|
+
|
|
102
|
+
| Command | Description |
|
|
103
|
+
|---------|-------------|
|
|
104
|
+
| `lore init` | Set up Lore for a repository. Auto-detects available sources. |
|
|
105
|
+
| `lore sync` | Run a one-off scan, distill, and write cycle. |
|
|
106
|
+
| `lore watch` | Start periodic scanning on a cron schedule. |
|
|
107
|
+
| `lore status` | Show scan history, pending reviews, and source status. |
|
|
108
|
+
| `lore recall <topic>` | Query accumulated knowledge about a topic. |
|
|
109
|
+
| `lore review` | Interactively review and approve proposed doc updates. |
|
|
110
|
+
| `lore config [get\|set] <key> [value]` | View or edit configuration. |
|
|
111
|
+
|
|
112
|
+
## Configuration
|
|
113
|
+
|
|
114
|
+
After `lore init`, configuration lives in `.lore/config.json`:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"sources": {
|
|
119
|
+
"git": { "enabled": true },
|
|
120
|
+
"github": { "enabled": true, "repo": "owner/repo" },
|
|
121
|
+
"cursor": { "enabled": true },
|
|
122
|
+
"claudeCode": { "enabled": true }
|
|
123
|
+
},
|
|
124
|
+
"outputs": {
|
|
125
|
+
"changelog": "CHANGELOG.md",
|
|
126
|
+
"adr": "docs/decisions/",
|
|
127
|
+
"architecture": "docs/architecture.md"
|
|
128
|
+
},
|
|
129
|
+
"schedule": "0 */4 * * *",
|
|
130
|
+
"reviewMode": "propose"
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Review Modes
|
|
135
|
+
|
|
136
|
+
- **`propose`** (default): All doc updates go to `.lore/pending/` for human review via `lore review`.
|
|
137
|
+
- **`auto`**: Changes are applied directly to documentation files.
|
|
138
|
+
|
|
139
|
+
## Data Sources
|
|
140
|
+
|
|
141
|
+
### Git History
|
|
142
|
+
Scans commits, diffs, and changed files since the last sync.
|
|
143
|
+
|
|
144
|
+
### GitHub PRs
|
|
145
|
+
Uses `gh` CLI to fetch merged PRs, review comments, and discussions.
|
|
146
|
+
|
|
147
|
+
### Claude Code Sessions
|
|
148
|
+
Reads JSONL transcripts from `~/.claude/projects/`. Extracts conversation turns, tool usage, and files modified.
|
|
149
|
+
|
|
150
|
+
### Cursor Conversations
|
|
151
|
+
Reads conversation metadata from Cursor's workspace SQLite storage.
|
|
152
|
+
|
|
153
|
+
## Alignment Engine
|
|
154
|
+
|
|
155
|
+
The key insight: **conversations explain the "why" behind commits**. Lore aligns them using:
|
|
156
|
+
|
|
157
|
+
1. **File overlap** (strongest): files edited in conversation match files in commit diff
|
|
158
|
+
2. **Branch + time window**: same branch, commit within session timeframe
|
|
159
|
+
3. **Commit message match**: session contains a git commit command with matching message
|
|
160
|
+
|
|
161
|
+
Unmatched conversations (planning, research, debugging sessions) are also captured -- they contain decisions and knowledge even when no code was committed.
|
|
162
|
+
|
|
163
|
+
## Architecture
|
|
164
|
+
|
|
165
|
+
Built with:
|
|
166
|
+
- **TypeScript** with strict mode
|
|
167
|
+
- **Commander** for CLI framework
|
|
168
|
+
- **Clack** for beautiful interactive prompts
|
|
169
|
+
- **Zod** for runtime validation
|
|
170
|
+
- **Simple-git** for git operations
|
|
171
|
+
- **Execa** for subprocess management
|
|
172
|
+
- **Claude Code CLI** for AI-powered distillation
|
|
173
|
+
- **Octocode MCP** for code research during distillation
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
MIT
|
|
178
|
+
# lore
|