backstory-cli 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/PKG-INFO +54 -10
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/README.md +53 -9
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/pyproject.toml +1 -1
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/config.py +0 -7
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/storage.py +0 -3
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory_cli.egg-info/PKG-INFO +54 -10
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_config.py +0 -6
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_storage.py +0 -3
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/setup.cfg +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/__init__.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/__main__.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/attach.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/cli.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/contradiction.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/dump.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/git.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/git_notes.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/hooks.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/init.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/okf.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/redact.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/retrieval.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/search.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/summarize.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/transcript.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory/why.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory_cli.egg-info/SOURCES.txt +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory_cli.egg-info/dependency_links.txt +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory_cli.egg-info/entry_points.txt +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/src/backstory_cli.egg-info/top_level.txt +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_attach.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_cli.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_contradiction.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_dump.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_git_notes.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_hooks.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_init.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_redact.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_retrieval.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_search.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_summarize.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_transcript.py +0 -0
- {backstory_cli-0.2.0 → backstory_cli-0.3.0}/tests/test_why.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: backstory-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Every AI-assisted commit has a backstory. Never lose it again.
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -8,7 +8,7 @@ Description-Content-Type: text/markdown
|
|
|
8
8
|
# Backstory
|
|
9
9
|
|
|
10
10
|
[](https://www.python.org/)
|
|
11
|
-
[](https://cloud.google.com/blog/products/data-analytics)
|
|
11
|
+
[](https://cloud.google.com/blog/products/data-analytics)
|
|
12
12
|
|
|
13
13
|
**Git shows what changed. Backstory shows why.**
|
|
14
14
|
|
|
@@ -25,14 +25,15 @@ markdown, and links it to Git commits so you can retrieve the *why* later.
|
|
|
25
25
|
|
|
26
26
|
- Local-first by default — everything stays in your repo
|
|
27
27
|
- Recovers *why* a decision was made, after the codebase has moved on
|
|
28
|
-
- Stores durable session memory as OKF markdown — human-readable,
|
|
28
|
+
- Stores durable session memory as Google's OKF markdown — human-readable,
|
|
29
29
|
Git-friendly, and agent-friendly
|
|
30
30
|
- Links memory to Git commits so the reasoning stays searchable
|
|
31
31
|
- Detects contradictions when later changes reverse earlier decisions
|
|
32
32
|
- Extracts decisions, risks, and follow-ups — not raw chat logs
|
|
33
33
|
|
|
34
34
|
Backstory is not an AI coding agent. It is the memory layer around
|
|
35
|
-
AI-assisted coding
|
|
35
|
+
AI-assisted coding — useful whether you're building alone or shipping
|
|
36
|
+
across enterprise teams.
|
|
36
37
|
|
|
37
38
|
## Example
|
|
38
39
|
|
|
@@ -155,22 +156,62 @@ The capture and retrieval pipeline has four steps:
|
|
|
155
156
|
|
|
156
157
|
Git stays the linkage layer. Backstory stores the reasoning.
|
|
157
158
|
|
|
158
|
-
##
|
|
159
|
+
## Prerequisites
|
|
159
160
|
|
|
160
|
-
|
|
161
|
+
- **Python 3.11+** — Backstory requires Python 3.11 or newer.
|
|
162
|
+
- **pip or pipx** — Either package manager works. On fresh machines, `pipx` is
|
|
163
|
+
recommended because it installs Backstory in its own isolated environment
|
|
164
|
+
without needing a separate virtual environment.
|
|
165
|
+
- **Git** — Backstory stores session memory inside a Git repository and links
|
|
166
|
+
it to commits.
|
|
167
|
+
|
|
168
|
+
## Install
|
|
169
|
+
|
|
170
|
+
Install directly from the repository:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Using pip (system-wide or in a virtual environment)
|
|
174
|
+
python3 -m pip install git+https://github.com/arpitkath/backstory.git
|
|
175
|
+
|
|
176
|
+
# Using pipx (isolated, recommended for fresh machines)
|
|
177
|
+
pipx install git+https://github.com/arpitkath/backstory.git
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Or install the PyPI package:
|
|
161
181
|
|
|
162
182
|
```bash
|
|
163
183
|
python -m pip install backstory-cli
|
|
164
184
|
```
|
|
165
185
|
|
|
166
|
-
The installed command is
|
|
186
|
+
The installed command is:
|
|
167
187
|
|
|
168
188
|
```bash
|
|
169
189
|
backstory --help
|
|
170
190
|
```
|
|
171
191
|
|
|
192
|
+
## First Run
|
|
193
|
+
|
|
194
|
+
Initialize Backstory in your repository:
|
|
195
|
+
|
|
172
196
|
```bash
|
|
173
197
|
backstory init
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
This creates a `.backstory/` directory in your repo with the necessary
|
|
201
|
+
storage, indexing, and configuration. It also optionally installs Git hooks
|
|
202
|
+
that help keep session memory linked to your commits.
|
|
203
|
+
|
|
204
|
+
## Verify
|
|
205
|
+
|
|
206
|
+
Check that everything is set up correctly:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
backstory status
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
If you have an existing commit with a linked session, view its reasoning:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
174
215
|
backstory why HEAD
|
|
175
216
|
```
|
|
176
217
|
|
|
@@ -189,7 +230,7 @@ backstory dump --agent claude --transcript ./transcript.md
|
|
|
189
230
|
| Command | What it does |
|
|
190
231
|
|---|---|
|
|
191
232
|
| `backstory init` | Set up Backstory in the current repo |
|
|
192
|
-
| `backstory dump` | Ingest an AI session into OKF markdown |
|
|
233
|
+
| `backstory dump` | Ingest an AI session into Google's OKF markdown |
|
|
193
234
|
| `backstory attach HEAD` | Link a session to a commit |
|
|
194
235
|
| `backstory why HEAD` | Explain why a commit happened |
|
|
195
236
|
| `backstory show <session>` | View a stored session |
|
|
@@ -230,7 +271,6 @@ persists.
|
|
|
230
271
|
```text
|
|
231
272
|
.backstory/
|
|
232
273
|
config.json
|
|
233
|
-
index.sqlite
|
|
234
274
|
knowledge/
|
|
235
275
|
index.md
|
|
236
276
|
sessions/
|
|
@@ -241,7 +281,7 @@ persists.
|
|
|
241
281
|
tombstones.log
|
|
242
282
|
```
|
|
243
283
|
|
|
244
|
-
Session memory is stored as OKF-style markdown so it stays human-readable,
|
|
284
|
+
Session memory is stored as Google's OKF-style markdown so it stays human-readable,
|
|
245
285
|
Git-friendly, and agent-friendly.
|
|
246
286
|
|
|
247
287
|
## Privacy
|
|
@@ -264,8 +304,12 @@ The preferred path is a tool-specific hook, callback, or transcript exporter
|
|
|
264
304
|
that hands the session to Backstory automatically. `dump` exists as the
|
|
265
305
|
ingestion step, not the primary workflow.
|
|
266
306
|
|
|
307
|
+
See the [integration guide](docs/integration.md) for step-by-step setup with
|
|
308
|
+
each tool.
|
|
309
|
+
|
|
267
310
|
## Documentation
|
|
268
311
|
|
|
312
|
+
- [Integration guide](docs/integration.md) — Set up Backstory with Claude Code, Codex, Cursor, etc.
|
|
269
313
|
- [Engineering walkthrough](docs/engineering-walkthrough.md)
|
|
270
314
|
- [Product spec](docs/prd.md)
|
|
271
315
|
- [Retrieval model](docs/retrieval.md)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Backstory
|
|
2
2
|
|
|
3
3
|
[](https://www.python.org/)
|
|
4
|
-
[](https://cloud.google.com/blog/products/data-analytics)
|
|
4
|
+
[](https://cloud.google.com/blog/products/data-analytics)
|
|
5
5
|
|
|
6
6
|
**Git shows what changed. Backstory shows why.**
|
|
7
7
|
|
|
@@ -18,14 +18,15 @@ markdown, and links it to Git commits so you can retrieve the *why* later.
|
|
|
18
18
|
|
|
19
19
|
- Local-first by default — everything stays in your repo
|
|
20
20
|
- Recovers *why* a decision was made, after the codebase has moved on
|
|
21
|
-
- Stores durable session memory as OKF markdown — human-readable,
|
|
21
|
+
- Stores durable session memory as Google's OKF markdown — human-readable,
|
|
22
22
|
Git-friendly, and agent-friendly
|
|
23
23
|
- Links memory to Git commits so the reasoning stays searchable
|
|
24
24
|
- Detects contradictions when later changes reverse earlier decisions
|
|
25
25
|
- Extracts decisions, risks, and follow-ups — not raw chat logs
|
|
26
26
|
|
|
27
27
|
Backstory is not an AI coding agent. It is the memory layer around
|
|
28
|
-
AI-assisted coding
|
|
28
|
+
AI-assisted coding — useful whether you're building alone or shipping
|
|
29
|
+
across enterprise teams.
|
|
29
30
|
|
|
30
31
|
## Example
|
|
31
32
|
|
|
@@ -148,22 +149,62 @@ The capture and retrieval pipeline has four steps:
|
|
|
148
149
|
|
|
149
150
|
Git stays the linkage layer. Backstory stores the reasoning.
|
|
150
151
|
|
|
151
|
-
##
|
|
152
|
+
## Prerequisites
|
|
152
153
|
|
|
153
|
-
|
|
154
|
+
- **Python 3.11+** — Backstory requires Python 3.11 or newer.
|
|
155
|
+
- **pip or pipx** — Either package manager works. On fresh machines, `pipx` is
|
|
156
|
+
recommended because it installs Backstory in its own isolated environment
|
|
157
|
+
without needing a separate virtual environment.
|
|
158
|
+
- **Git** — Backstory stores session memory inside a Git repository and links
|
|
159
|
+
it to commits.
|
|
160
|
+
|
|
161
|
+
## Install
|
|
162
|
+
|
|
163
|
+
Install directly from the repository:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Using pip (system-wide or in a virtual environment)
|
|
167
|
+
python3 -m pip install git+https://github.com/arpitkath/backstory.git
|
|
168
|
+
|
|
169
|
+
# Using pipx (isolated, recommended for fresh machines)
|
|
170
|
+
pipx install git+https://github.com/arpitkath/backstory.git
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Or install the PyPI package:
|
|
154
174
|
|
|
155
175
|
```bash
|
|
156
176
|
python -m pip install backstory-cli
|
|
157
177
|
```
|
|
158
178
|
|
|
159
|
-
The installed command is
|
|
179
|
+
The installed command is:
|
|
160
180
|
|
|
161
181
|
```bash
|
|
162
182
|
backstory --help
|
|
163
183
|
```
|
|
164
184
|
|
|
185
|
+
## First Run
|
|
186
|
+
|
|
187
|
+
Initialize Backstory in your repository:
|
|
188
|
+
|
|
165
189
|
```bash
|
|
166
190
|
backstory init
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
This creates a `.backstory/` directory in your repo with the necessary
|
|
194
|
+
storage, indexing, and configuration. It also optionally installs Git hooks
|
|
195
|
+
that help keep session memory linked to your commits.
|
|
196
|
+
|
|
197
|
+
## Verify
|
|
198
|
+
|
|
199
|
+
Check that everything is set up correctly:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
backstory status
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
If you have an existing commit with a linked session, view its reasoning:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
167
208
|
backstory why HEAD
|
|
168
209
|
```
|
|
169
210
|
|
|
@@ -182,7 +223,7 @@ backstory dump --agent claude --transcript ./transcript.md
|
|
|
182
223
|
| Command | What it does |
|
|
183
224
|
|---|---|
|
|
184
225
|
| `backstory init` | Set up Backstory in the current repo |
|
|
185
|
-
| `backstory dump` | Ingest an AI session into OKF markdown |
|
|
226
|
+
| `backstory dump` | Ingest an AI session into Google's OKF markdown |
|
|
186
227
|
| `backstory attach HEAD` | Link a session to a commit |
|
|
187
228
|
| `backstory why HEAD` | Explain why a commit happened |
|
|
188
229
|
| `backstory show <session>` | View a stored session |
|
|
@@ -223,7 +264,6 @@ persists.
|
|
|
223
264
|
```text
|
|
224
265
|
.backstory/
|
|
225
266
|
config.json
|
|
226
|
-
index.sqlite
|
|
227
267
|
knowledge/
|
|
228
268
|
index.md
|
|
229
269
|
sessions/
|
|
@@ -234,7 +274,7 @@ persists.
|
|
|
234
274
|
tombstones.log
|
|
235
275
|
```
|
|
236
276
|
|
|
237
|
-
Session memory is stored as OKF-style markdown so it stays human-readable,
|
|
277
|
+
Session memory is stored as Google's OKF-style markdown so it stays human-readable,
|
|
238
278
|
Git-friendly, and agent-friendly.
|
|
239
279
|
|
|
240
280
|
## Privacy
|
|
@@ -257,8 +297,12 @@ The preferred path is a tool-specific hook, callback, or transcript exporter
|
|
|
257
297
|
that hands the session to Backstory automatically. `dump` exists as the
|
|
258
298
|
ingestion step, not the primary workflow.
|
|
259
299
|
|
|
300
|
+
See the [integration guide](docs/integration.md) for step-by-step setup with
|
|
301
|
+
each tool.
|
|
302
|
+
|
|
260
303
|
## Documentation
|
|
261
304
|
|
|
305
|
+
- [Integration guide](docs/integration.md) — Set up Backstory with Claude Code, Codex, Cursor, etc.
|
|
262
306
|
- [Engineering walkthrough](docs/engineering-walkthrough.md)
|
|
263
307
|
- [Product spec](docs/prd.md)
|
|
264
308
|
- [Retrieval model](docs/retrieval.md)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "backstory-cli"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "Every AI-assisted commit has a backstory. Never lose it again."
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -4,7 +4,6 @@ import json
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
6
|
from backstory.storage import (
|
|
7
|
-
INDEX_DB_NAME,
|
|
8
7
|
KNOWLEDGE_DIR_NAME,
|
|
9
8
|
PENDING_SESSION_NAME,
|
|
10
9
|
REDACTIONS_DIR_NAME,
|
|
@@ -15,18 +14,12 @@ from backstory.storage import (
|
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
DEFAULT_CONFIG = {
|
|
18
|
-
"version": 1,
|
|
19
17
|
"storage": {
|
|
20
18
|
"root": STORAGE_DIR_NAME,
|
|
21
19
|
"knowledge_dir": KNOWLEDGE_DIR_NAME,
|
|
22
20
|
"sessions_dir": SESSIONS_DIR_NAME,
|
|
23
21
|
"pending_file": PENDING_SESSION_NAME,
|
|
24
22
|
"redactions_dir": REDACTIONS_DIR_NAME,
|
|
25
|
-
"index_db": INDEX_DB_NAME,
|
|
26
|
-
},
|
|
27
|
-
"capture": {
|
|
28
|
-
"store_git_diff": True,
|
|
29
|
-
"store_transcripts": True,
|
|
30
23
|
},
|
|
31
24
|
"redaction": {
|
|
32
25
|
"enabled": True,
|
|
@@ -9,7 +9,6 @@ KNOWLEDGE_DIR_NAME = "knowledge"
|
|
|
9
9
|
SESSIONS_DIR_NAME = "sessions"
|
|
10
10
|
PENDING_SESSION_NAME = "latest.md"
|
|
11
11
|
REDACTIONS_DIR_NAME = "redactions"
|
|
12
|
-
INDEX_DB_NAME = "index.sqlite"
|
|
13
12
|
KNOWLEDGE_INDEX_NAME = "index.md"
|
|
14
13
|
SESSIONS_INDEX_NAME = "index.md"
|
|
15
14
|
|
|
@@ -21,7 +20,6 @@ class BackstoryPaths:
|
|
|
21
20
|
sessions: Path
|
|
22
21
|
pending: Path
|
|
23
22
|
redactions: Path
|
|
24
|
-
index_db: Path
|
|
25
23
|
knowledge_index: Path
|
|
26
24
|
sessions_index: Path
|
|
27
25
|
|
|
@@ -36,7 +34,6 @@ def build_storage_paths(repo_root: Path) -> BackstoryPaths:
|
|
|
36
34
|
sessions=sessions_root,
|
|
37
35
|
pending=sessions_root / PENDING_SESSION_NAME,
|
|
38
36
|
redactions=storage_root / REDACTIONS_DIR_NAME,
|
|
39
|
-
index_db=storage_root / INDEX_DB_NAME,
|
|
40
37
|
knowledge_index=knowledge_root / KNOWLEDGE_INDEX_NAME,
|
|
41
38
|
sessions_index=sessions_root / SESSIONS_INDEX_NAME,
|
|
42
39
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: backstory-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Every AI-assisted commit has a backstory. Never lose it again.
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -8,7 +8,7 @@ Description-Content-Type: text/markdown
|
|
|
8
8
|
# Backstory
|
|
9
9
|
|
|
10
10
|
[](https://www.python.org/)
|
|
11
|
-
[](https://cloud.google.com/blog/products/data-analytics)
|
|
11
|
+
[](https://cloud.google.com/blog/products/data-analytics)
|
|
12
12
|
|
|
13
13
|
**Git shows what changed. Backstory shows why.**
|
|
14
14
|
|
|
@@ -25,14 +25,15 @@ markdown, and links it to Git commits so you can retrieve the *why* later.
|
|
|
25
25
|
|
|
26
26
|
- Local-first by default — everything stays in your repo
|
|
27
27
|
- Recovers *why* a decision was made, after the codebase has moved on
|
|
28
|
-
- Stores durable session memory as OKF markdown — human-readable,
|
|
28
|
+
- Stores durable session memory as Google's OKF markdown — human-readable,
|
|
29
29
|
Git-friendly, and agent-friendly
|
|
30
30
|
- Links memory to Git commits so the reasoning stays searchable
|
|
31
31
|
- Detects contradictions when later changes reverse earlier decisions
|
|
32
32
|
- Extracts decisions, risks, and follow-ups — not raw chat logs
|
|
33
33
|
|
|
34
34
|
Backstory is not an AI coding agent. It is the memory layer around
|
|
35
|
-
AI-assisted coding
|
|
35
|
+
AI-assisted coding — useful whether you're building alone or shipping
|
|
36
|
+
across enterprise teams.
|
|
36
37
|
|
|
37
38
|
## Example
|
|
38
39
|
|
|
@@ -155,22 +156,62 @@ The capture and retrieval pipeline has four steps:
|
|
|
155
156
|
|
|
156
157
|
Git stays the linkage layer. Backstory stores the reasoning.
|
|
157
158
|
|
|
158
|
-
##
|
|
159
|
+
## Prerequisites
|
|
159
160
|
|
|
160
|
-
|
|
161
|
+
- **Python 3.11+** — Backstory requires Python 3.11 or newer.
|
|
162
|
+
- **pip or pipx** — Either package manager works. On fresh machines, `pipx` is
|
|
163
|
+
recommended because it installs Backstory in its own isolated environment
|
|
164
|
+
without needing a separate virtual environment.
|
|
165
|
+
- **Git** — Backstory stores session memory inside a Git repository and links
|
|
166
|
+
it to commits.
|
|
167
|
+
|
|
168
|
+
## Install
|
|
169
|
+
|
|
170
|
+
Install directly from the repository:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Using pip (system-wide or in a virtual environment)
|
|
174
|
+
python3 -m pip install git+https://github.com/arpitkath/backstory.git
|
|
175
|
+
|
|
176
|
+
# Using pipx (isolated, recommended for fresh machines)
|
|
177
|
+
pipx install git+https://github.com/arpitkath/backstory.git
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Or install the PyPI package:
|
|
161
181
|
|
|
162
182
|
```bash
|
|
163
183
|
python -m pip install backstory-cli
|
|
164
184
|
```
|
|
165
185
|
|
|
166
|
-
The installed command is
|
|
186
|
+
The installed command is:
|
|
167
187
|
|
|
168
188
|
```bash
|
|
169
189
|
backstory --help
|
|
170
190
|
```
|
|
171
191
|
|
|
192
|
+
## First Run
|
|
193
|
+
|
|
194
|
+
Initialize Backstory in your repository:
|
|
195
|
+
|
|
172
196
|
```bash
|
|
173
197
|
backstory init
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
This creates a `.backstory/` directory in your repo with the necessary
|
|
201
|
+
storage, indexing, and configuration. It also optionally installs Git hooks
|
|
202
|
+
that help keep session memory linked to your commits.
|
|
203
|
+
|
|
204
|
+
## Verify
|
|
205
|
+
|
|
206
|
+
Check that everything is set up correctly:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
backstory status
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
If you have an existing commit with a linked session, view its reasoning:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
174
215
|
backstory why HEAD
|
|
175
216
|
```
|
|
176
217
|
|
|
@@ -189,7 +230,7 @@ backstory dump --agent claude --transcript ./transcript.md
|
|
|
189
230
|
| Command | What it does |
|
|
190
231
|
|---|---|
|
|
191
232
|
| `backstory init` | Set up Backstory in the current repo |
|
|
192
|
-
| `backstory dump` | Ingest an AI session into OKF markdown |
|
|
233
|
+
| `backstory dump` | Ingest an AI session into Google's OKF markdown |
|
|
193
234
|
| `backstory attach HEAD` | Link a session to a commit |
|
|
194
235
|
| `backstory why HEAD` | Explain why a commit happened |
|
|
195
236
|
| `backstory show <session>` | View a stored session |
|
|
@@ -230,7 +271,6 @@ persists.
|
|
|
230
271
|
```text
|
|
231
272
|
.backstory/
|
|
232
273
|
config.json
|
|
233
|
-
index.sqlite
|
|
234
274
|
knowledge/
|
|
235
275
|
index.md
|
|
236
276
|
sessions/
|
|
@@ -241,7 +281,7 @@ persists.
|
|
|
241
281
|
tombstones.log
|
|
242
282
|
```
|
|
243
283
|
|
|
244
|
-
Session memory is stored as OKF-style markdown so it stays human-readable,
|
|
284
|
+
Session memory is stored as Google's OKF-style markdown so it stays human-readable,
|
|
245
285
|
Git-friendly, and agent-friendly.
|
|
246
286
|
|
|
247
287
|
## Privacy
|
|
@@ -264,8 +304,12 @@ The preferred path is a tool-specific hook, callback, or transcript exporter
|
|
|
264
304
|
that hands the session to Backstory automatically. `dump` exists as the
|
|
265
305
|
ingestion step, not the primary workflow.
|
|
266
306
|
|
|
307
|
+
See the [integration guide](docs/integration.md) for step-by-step setup with
|
|
308
|
+
each tool.
|
|
309
|
+
|
|
267
310
|
## Documentation
|
|
268
311
|
|
|
312
|
+
- [Integration guide](docs/integration.md) — Set up Backstory with Claude Code, Codex, Cursor, etc.
|
|
269
313
|
- [Engineering walkthrough](docs/engineering-walkthrough.md)
|
|
270
314
|
- [Product spec](docs/prd.md)
|
|
271
315
|
- [Retrieval model](docs/retrieval.md)
|
|
@@ -11,18 +11,12 @@ class ConfigTestCase(unittest.TestCase):
|
|
|
11
11
|
self.assertEqual(
|
|
12
12
|
DEFAULT_CONFIG,
|
|
13
13
|
{
|
|
14
|
-
"version": 1,
|
|
15
14
|
"storage": {
|
|
16
15
|
"root": ".backstory",
|
|
17
16
|
"knowledge_dir": "knowledge",
|
|
18
17
|
"sessions_dir": "sessions",
|
|
19
18
|
"pending_file": "latest.md",
|
|
20
19
|
"redactions_dir": "redactions",
|
|
21
|
-
"index_db": "index.sqlite",
|
|
22
|
-
},
|
|
23
|
-
"capture": {
|
|
24
|
-
"store_git_diff": True,
|
|
25
|
-
"store_transcripts": True,
|
|
26
20
|
},
|
|
27
21
|
"redaction": {
|
|
28
22
|
"enabled": True,
|
|
@@ -19,7 +19,6 @@ class StorageTestCase(unittest.TestCase):
|
|
|
19
19
|
sessions=repo_root / ".backstory" / "knowledge" / "sessions",
|
|
20
20
|
pending=repo_root / ".backstory" / "knowledge" / "sessions" / "latest.md",
|
|
21
21
|
redactions=repo_root / ".backstory" / "redactions",
|
|
22
|
-
index_db=repo_root / ".backstory" / "index.sqlite",
|
|
23
22
|
knowledge_index=repo_root / ".backstory" / "knowledge" / "index.md",
|
|
24
23
|
sessions_index=repo_root / ".backstory" / "knowledge" / "sessions" / "index.md",
|
|
25
24
|
),
|
|
@@ -35,8 +34,6 @@ class StorageTestCase(unittest.TestCase):
|
|
|
35
34
|
self.assertTrue(paths.knowledge.is_dir())
|
|
36
35
|
self.assertTrue(paths.sessions.is_dir())
|
|
37
36
|
self.assertTrue(paths.redactions.is_dir())
|
|
38
|
-
self.assertEqual(paths.index_db, repo_root / ".backstory" / "index.sqlite")
|
|
39
|
-
self.assertFalse(paths.index_db.exists())
|
|
40
37
|
|
|
41
38
|
|
|
42
39
|
class GitHelpersTestCase(unittest.TestCase):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|