cc-warehouse 0.1.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.
- cc_warehouse-0.1.0/.gitignore +10 -0
- cc_warehouse-0.1.0/CHANGELOG.md +139 -0
- cc_warehouse-0.1.0/CLAUDE.md +301 -0
- cc_warehouse-0.1.0/LICENSE +73 -0
- cc_warehouse-0.1.0/PKG-INFO +115 -0
- cc_warehouse-0.1.0/README.md +90 -0
- cc_warehouse-0.1.0/cc-warehouse-architecture/README.md +36 -0
- cc_warehouse-0.1.0/cc-warehouse-architecture/SOURCE.md +291 -0
- cc_warehouse-0.1.0/cc-warehouse-architecture/index.html +292 -0
- cc_warehouse-0.1.0/contract/BRAINSTORM.md +135 -0
- cc_warehouse-0.1.0/contract/DESIGN.md +1039 -0
- cc_warehouse-0.1.0/contract/FINDINGS.md +198 -0
- cc_warehouse-0.1.0/contract/HARNESS.md +851 -0
- cc_warehouse-0.1.0/contract/SPEC.md +362 -0
- cc_warehouse-0.1.0/contract/diagrams/event-store.mermaid.md +39 -0
- cc_warehouse-0.1.0/docs/sharing-and-redaction.md +150 -0
- cc_warehouse-0.1.0/harness/prompts/fixer.md +29 -0
- cc_warehouse-0.1.0/harness/prompts/implementer.md +53 -0
- cc_warehouse-0.1.0/harness/prompts/reviewer-adversary.md +42 -0
- cc_warehouse-0.1.0/harness/prompts/reviewer-conformance.md +45 -0
- cc_warehouse-0.1.0/harness/tickets/01-store.md +46 -0
- cc_warehouse-0.1.0/harness/tickets/02-catalog-registry.md +50 -0
- cc_warehouse-0.1.0/harness/tickets/03-parser.md +51 -0
- cc_warehouse-0.1.0/harness/tickets/04-capture-notify.md +65 -0
- cc_warehouse-0.1.0/harness/tickets/05-sweep.md +67 -0
- cc_warehouse-0.1.0/harness/tickets/06-render-markdown.md +68 -0
- cc_warehouse-0.1.0/harness/tickets/07-render-html.md +75 -0
- cc_warehouse-0.1.0/harness/tickets/08-build-render-orchestration.md +99 -0
- cc_warehouse-0.1.0/harness/tickets/09-status-verify.md +63 -0
- cc_warehouse-0.1.0/harness/tickets/10-migrate.md +62 -0
- cc_warehouse-0.1.0/harness/tickets/11-share.md +113 -0
- cc_warehouse-0.1.0/harness/tickets/12-relocate.md +119 -0
- cc_warehouse-0.1.0/harness/tickets/12a-relocate-containers.md +118 -0
- cc_warehouse-0.1.0/harness/tickets/12b-relocate-content.md +186 -0
- cc_warehouse-0.1.0/harness/tickets/13-config-cli-polish.md +59 -0
- cc_warehouse-0.1.0/harness/tickets/14-variant-matrix.md +212 -0
- cc_warehouse-0.1.0/harness/tickets/15-chrome-date-defaults.md +109 -0
- cc_warehouse-0.1.0/harness/tickets/16-truncation.md +81 -0
- cc_warehouse-0.1.0/harness/tickets/17-share-sweep-window.md +88 -0
- cc_warehouse-0.1.0/harness/tickets/18-real-data-coverage.md +157 -0
- cc_warehouse-0.1.0/harness/tickets/19-archive-first-layout.md +216 -0
- cc_warehouse-0.1.0/harness/tickets/20-thinking-withheld.md +147 -0
- cc_warehouse-0.1.0/harness/tickets/21-subagent-transcripts.md +96 -0
- cc_warehouse-0.1.0/harness/tickets/22-protect-the-unprotected.md +176 -0
- cc_warehouse-0.1.0/harness/tickets/23-doctor-and-dry-run.md +218 -0
- cc_warehouse-0.1.0/harness/tickets/24-make-capture-work.md +252 -0
- cc_warehouse-0.1.0/harness/tickets/25-rescue-the-only-copies.md +307 -0
- cc_warehouse-0.1.0/harness/tickets/26-prove-then-back-up.md +177 -0
- cc_warehouse-0.1.0/harness/tickets/27-collapse-to-one-folder.md +305 -0
- cc_warehouse-0.1.0/harness/tickets/28-backlog.md +217 -0
- cc_warehouse-0.1.0/harness/tickets/29-which-copy-is-the-current-one.md +125 -0
- cc_warehouse-0.1.0/pyproject.toml +91 -0
- cc_warehouse-0.1.0/src/cc_warehouse/__init__.py +8 -0
- cc_warehouse-0.1.0/src/cc_warehouse/__main__.py +9 -0
- cc_warehouse-0.1.0/src/cc_warehouse/archive.py +907 -0
- cc_warehouse-0.1.0/src/cc_warehouse/build.py +520 -0
- cc_warehouse-0.1.0/src/cc_warehouse/capture.py +356 -0
- cc_warehouse-0.1.0/src/cc_warehouse/catalog.py +260 -0
- cc_warehouse-0.1.0/src/cc_warehouse/cli.py +2042 -0
- cc_warehouse-0.1.0/src/cc_warehouse/config.py +607 -0
- cc_warehouse-0.1.0/src/cc_warehouse/doctor.py +374 -0
- cc_warehouse-0.1.0/src/cc_warehouse/import_tree.py +220 -0
- cc_warehouse-0.1.0/src/cc_warehouse/migrate.py +149 -0
- cc_warehouse-0.1.0/src/cc_warehouse/notify.py +206 -0
- cc_warehouse-0.1.0/src/cc_warehouse/parser.py +1124 -0
- cc_warehouse-0.1.0/src/cc_warehouse/py.typed +0 -0
- cc_warehouse-0.1.0/src/cc_warehouse/registry.py +248 -0
- cc_warehouse-0.1.0/src/cc_warehouse/reindex.py +262 -0
- cc_warehouse-0.1.0/src/cc_warehouse/relocate.py +979 -0
- cc_warehouse-0.1.0/src/cc_warehouse/render.py +2284 -0
- cc_warehouse-0.1.0/src/cc_warehouse/reports.py +19 -0
- cc_warehouse-0.1.0/src/cc_warehouse/share.py +622 -0
- cc_warehouse-0.1.0/src/cc_warehouse/status.py +279 -0
- cc_warehouse-0.1.0/src/cc_warehouse/store.py +270 -0
- cc_warehouse-0.1.0/src/cc_warehouse/sweep.py +357 -0
- cc_warehouse-0.1.0/src/cc_warehouse/vendor/README.md +42 -0
- cc_warehouse-0.1.0/src/cc_warehouse/vendor/highlight.js-LICENSE +29 -0
- cc_warehouse-0.1.0/src/cc_warehouse/vendor/highlight.min.js +1213 -0
- cc_warehouse-0.1.0/tests/conftest.py +592 -0
- cc_warehouse-0.1.0/tests/golden/matrix-anchor/conversation.compact.html +304 -0
- cc_warehouse-0.1.0/tests/golden/matrix-anchor/conversation.html +317 -0
- cc_warehouse-0.1.0/tests/golden/matrix-anchor/transcript.compact.md +43 -0
- cc_warehouse-0.1.0/tests/golden/matrix-anchor/transcript.md +121 -0
- cc_warehouse-0.1.0/tests/test_archive_cli.py +303 -0
- cc_warehouse-0.1.0/tests/test_archive_durable.py +239 -0
- cc_warehouse-0.1.0/tests/test_archive_hardening.py +276 -0
- cc_warehouse-0.1.0/tests/test_archive_layout.py +368 -0
- cc_warehouse-0.1.0/tests/test_archive_live.py +311 -0
- cc_warehouse-0.1.0/tests/test_archive_naming.py +232 -0
- cc_warehouse-0.1.0/tests/test_archive_reads.py +268 -0
- cc_warehouse-0.1.0/tests/test_build.py +194 -0
- cc_warehouse-0.1.0/tests/test_build_regressions.py +135 -0
- cc_warehouse-0.1.0/tests/test_capture.py +307 -0
- cc_warehouse-0.1.0/tests/test_capture_regressions.py +106 -0
- cc_warehouse-0.1.0/tests/test_catalog.py +167 -0
- cc_warehouse-0.1.0/tests/test_chrome.py +365 -0
- cc_warehouse-0.1.0/tests/test_cli.py +154 -0
- cc_warehouse-0.1.0/tests/test_cli_flags_regressions.py +143 -0
- cc_warehouse-0.1.0/tests/test_config.py +223 -0
- cc_warehouse-0.1.0/tests/test_doctor.py +316 -0
- cc_warehouse-0.1.0/tests/test_doctor_install_mode.py +84 -0
- cc_warehouse-0.1.0/tests/test_fences.py +287 -0
- cc_warehouse-0.1.0/tests/test_help_is_inert.py +135 -0
- cc_warehouse-0.1.0/tests/test_import.py +452 -0
- cc_warehouse-0.1.0/tests/test_keep_projections.py +202 -0
- cc_warehouse-0.1.0/tests/test_matrix.py +509 -0
- cc_warehouse-0.1.0/tests/test_migrate.py +130 -0
- cc_warehouse-0.1.0/tests/test_migrate_regressions.py +95 -0
- cc_warehouse-0.1.0/tests/test_notify.py +151 -0
- cc_warehouse-0.1.0/tests/test_parser.py +227 -0
- cc_warehouse-0.1.0/tests/test_project_cli.py +295 -0
- cc_warehouse-0.1.0/tests/test_project_json.py +256 -0
- cc_warehouse-0.1.0/tests/test_project_json_on_capture.py +306 -0
- cc_warehouse-0.1.0/tests/test_real_shapes.py +798 -0
- cc_warehouse-0.1.0/tests/test_refused_render.py +180 -0
- cc_warehouse-0.1.0/tests/test_registry.py +148 -0
- cc_warehouse-0.1.0/tests/test_reindex.py +417 -0
- cc_warehouse-0.1.0/tests/test_relocate.py +210 -0
- cc_warehouse-0.1.0/tests/test_relocate_json_matrix.py +228 -0
- cc_warehouse-0.1.0/tests/test_relocate_regressions.py +941 -0
- cc_warehouse-0.1.0/tests/test_relocate_scan_matrix.py +445 -0
- cc_warehouse-0.1.0/tests/test_render_html.py +110 -0
- cc_warehouse-0.1.0/tests/test_render_html_regressions.py +138 -0
- cc_warehouse-0.1.0/tests/test_render_md.py +72 -0
- cc_warehouse-0.1.0/tests/test_render_md_regressions.py +166 -0
- cc_warehouse-0.1.0/tests/test_retire_objects.py +260 -0
- cc_warehouse-0.1.0/tests/test_reveal_target.py +208 -0
- cc_warehouse-0.1.0/tests/test_share.py +159 -0
- cc_warehouse-0.1.0/tests/test_share_archive_layout.py +210 -0
- cc_warehouse-0.1.0/tests/test_share_regressions.py +300 -0
- cc_warehouse-0.1.0/tests/test_status_gap.py +146 -0
- cc_warehouse-0.1.0/tests/test_status_verify.py +114 -0
- cc_warehouse-0.1.0/tests/test_status_verify_regressions.py +85 -0
- cc_warehouse-0.1.0/tests/test_store.py +210 -0
- cc_warehouse-0.1.0/tests/test_store_regressions.py +43 -0
- cc_warehouse-0.1.0/tests/test_subagent_capture.py +270 -0
- cc_warehouse-0.1.0/tests/test_subagent_folders.py +260 -0
- cc_warehouse-0.1.0/tests/test_subagent_identity.py +148 -0
- cc_warehouse-0.1.0/tests/test_surrogates.py +132 -0
- cc_warehouse-0.1.0/tests/test_sweep.py +161 -0
- cc_warehouse-0.1.0/tests/test_sweep_dry_run.py +220 -0
- cc_warehouse-0.1.0/tests/test_sweep_projects.py +140 -0
- cc_warehouse-0.1.0/tests/test_sweep_regressions.py +111 -0
- cc_warehouse-0.1.0/tests/test_thinking_withheld.py +336 -0
- cc_warehouse-0.1.0/tests/test_truncation.py +289 -0
- cc_warehouse-0.1.0/tests/test_unknown_flags.py +157 -0
- cc_warehouse-0.1.0/tests/test_voice.py +276 -0
- cc_warehouse-0.1.0/tests/test_window.py +306 -0
- cc_warehouse-0.1.0/uv.lock +144 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to cc-warehouse.
|
|
4
|
+
|
|
5
|
+
**There have been no releases, and none are planned for now** (principal, 2026-07-24).
|
|
6
|
+
The distribution name is `cc-warehouse`, the version in `pyproject.toml` is `0.1.0`, and
|
|
7
|
+
nothing is on PyPI. The entries below are BUILD MILESTONES, recorded as annotated git tags
|
|
8
|
+
(`slice-01` .. `slice-13`, including `slice-12a` and `slice-12b`), not versions anyone
|
|
9
|
+
could install. A release section will appear here if and when that changes.
|
|
10
|
+
|
|
11
|
+
Each tag's own annotation carries the full record; `git show <tag>` is the primary source.
|
|
12
|
+
The per-slice retros live in `contract/HARNESS.md` section 8, and the decisions in
|
|
13
|
+
`contract/DESIGN.md` section 15.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Unreleased
|
|
18
|
+
|
|
19
|
+
### v1.1 flag groups, closed 2026-08-01
|
|
20
|
+
|
|
21
|
+
The four deferred flag groups, each landing the day it was defined: the per-variant
|
|
22
|
+
content matrix (`slice-14`), the HTML chrome initial states plus date locale
|
|
23
|
+
(`slice-15`), an opt-in truncation cap (`slice-16`), and a `--since`/`--until` window on
|
|
24
|
+
`share` and `sweep` (`slice-17`). Named one by one rather than as a range: the currency
|
|
25
|
+
sweep checks that every real tag is named here, and a range satisfies a reader while
|
|
26
|
+
leaving the probe correct to complain. A byte-for-byte regression
|
|
27
|
+
anchor at `tests/golden/matrix-anchor` pins the four projected files under default
|
|
28
|
+
options, so any slice that moves DEFAULT output breaks it on purpose; it has moved twice,
|
|
29
|
+
both times by a recorded ruling with the delta measured first.
|
|
30
|
+
|
|
31
|
+
### Real-data coverage, 2026-08-02 (`ticket-18`, `ticket-20`)
|
|
32
|
+
|
|
33
|
+
A census of a real 13,836-session corpus found that the suite had been proving the
|
|
34
|
+
product against inputs someone imagined rather than inputs that exist.
|
|
35
|
+
|
|
36
|
+
- **`ticket-18`** Eight entry types and three content-block types rendered nothing and
|
|
37
|
+
incremented no counter: 62,577 entries with `loss: 0` recorded beside them. All of them
|
|
38
|
+
now surface, `result` keeps a sub-agent's returned work in full, `custom-title` outranks
|
|
39
|
+
the model's `ai-title`, and anything the parser does not name renders a marker AND
|
|
40
|
+
increments a new top-level `unrecognised` manifest key. That last part is the durable
|
|
41
|
+
half: the previous census ran once, and Claude Code's format kept moving after it.
|
|
42
|
+
- **`ticket-20`** 41,458 of 43,060 thinking blocks arrive empty, because the text stopped
|
|
43
|
+
reaching the JSONL upstream at Claude Code v2.1.69 and it is a model property, not a
|
|
44
|
+
date one. The count now folds into the phase caption the transcript already prints, a
|
|
45
|
+
top-level `withheld` manifest key records it, and `--thinking-withheld` lets the
|
|
46
|
+
operator overrule the display.
|
|
47
|
+
|
|
48
|
+
### Archive-first layout, 2026-08-02 (`slice-19d`, `slice-19f`)
|
|
49
|
+
|
|
50
|
+
Six of seven slices. One self-contained folder per session holding the raw JSONL beside
|
|
51
|
+
its projections, named `<YYYYMMDD-HHMMSS><offset>_<uuid>` in a config-pinned zone so the
|
|
52
|
+
same session yields the same folder on any machine and the migration is idempotent.
|
|
53
|
+
`ccw archive` builds or `--verify`s it; `project.json` per project makes the catalog a
|
|
54
|
+
genuinely disposable index. Run on the real corpus: 13,829 folders in six minutes, zero
|
|
55
|
+
failures, verified with zero problems. **Nothing has been swapped.**
|
|
56
|
+
|
|
57
|
+
### v1, closed 2026-07-24
|
|
58
|
+
|
|
59
|
+
Every slice in the `contract/DESIGN.md` section 16 build order landed and carries its
|
|
60
|
+
milestone tag. Gates: ruff clean, pyright strict 0 errors, 403 tests, zero stubs.
|
|
61
|
+
|
|
62
|
+
**Capture and storage**
|
|
63
|
+
- Content-addressed immutable object store; identity is sha256 of the payload, never a
|
|
64
|
+
size, a path or a timestamp. Every write is tmp-file plus `os.replace`.
|
|
65
|
+
- SQLite catalog and a registry where projects are stable IDs and paths are time-stamped
|
|
66
|
+
alias claims, so a repo move is a metadata edit rather than lost history.
|
|
67
|
+
- `ccw hook` (SessionEnd capture), `ccw sweep` (anything the hook missed), `ccw migrate`
|
|
68
|
+
(one-shot legacy import, plus a separate consent-gated `--retire`).
|
|
69
|
+
|
|
70
|
+
**Rendering**
|
|
71
|
+
- Four files per session: `transcript.md`, `transcript.compact.md`, `conversation.html`,
|
|
72
|
+
`conversation.compact.html`, plus a `manifest.json` recording the settings and counts
|
|
73
|
+
that produced them.
|
|
74
|
+
- Full exporter-v8.10.1 chrome and complete Claude Code entry-type coverage: ai-title
|
|
75
|
+
titles, sub-agent phases, attachments, slash commands, structured tool output and the
|
|
76
|
+
informational extras, each an independent toggle.
|
|
77
|
+
- The HTML copy-as-markdown payloads are byte-equal to the markdown fragments, so the two
|
|
78
|
+
exports cannot drift apart.
|
|
79
|
+
|
|
80
|
+
**Publishing**
|
|
81
|
+
- `ccw share` builds a sanitized static site from copies. Redaction runs on the decoded
|
|
82
|
+
payload; secret-shaped strings abort the share rather than being silently mangled.
|
|
83
|
+
See `docs/sharing-and-redaction.md`.
|
|
84
|
+
- Shared pages inline highlight.js and make **no third-party requests**; personal
|
|
85
|
+
projections keep the CDN reference for exporter parity.
|
|
86
|
+
- `--EXPOSED` is the one sanctioned unscrubbed publish, gated by a scrubbed-versus-exposed
|
|
87
|
+
comparison, a typed confirmation, and a non-TTY abort.
|
|
88
|
+
|
|
89
|
+
**Repair and inspection**
|
|
90
|
+
- `ccw relocate` repairs the external world after a repo move: plan, backup, apply, verify,
|
|
91
|
+
report, with dry-run as the default.
|
|
92
|
+
- `ccw project` (list / show / rename / move / merge), `ccw status`, `ccw verify`,
|
|
93
|
+
`ccw build`, `ccw render`.
|
|
94
|
+
|
|
95
|
+
**Configuration**
|
|
96
|
+
- Two-file layering (XDG then data-root), per-project sections keyed by registry ID,
|
|
97
|
+
`CCW_*` environment variables, and CLI flags, in that precedence order.
|
|
98
|
+
`--no-config` and `--config PATH` bypass the files.
|
|
99
|
+
|
|
100
|
+
### Build milestones
|
|
101
|
+
|
|
102
|
+
| Tag | Date | What landed |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| `slice-01` | 2026-07-18 | store module (the harness trial run) |
|
|
105
|
+
| `slice-02` | 2026-07-18 | catalog + registry: transactional catalog, claims-based registry |
|
|
106
|
+
| `slice-03` | 2026-07-18 | parser + conversation model |
|
|
107
|
+
| `slice-04` | 2026-07-18 | capture hook + notify |
|
|
108
|
+
| `slice-05` | 2026-07-18 | sweep: capture what the hook missed, orphan adoption |
|
|
109
|
+
| `slice-06` | 2026-07-18 | transcript.md emitters, full and compact |
|
|
110
|
+
| `slice-07` | 2026-07-19 | HTML emitters, full and compact, plus the manifest |
|
|
111
|
+
| `slice-08` | 2026-07-19 | build/render orchestration; un-stubs the render child |
|
|
112
|
+
| `slice-09` | 2026-07-19 | status and `ccw verify` |
|
|
113
|
+
| `slice-10` | 2026-07-19 | migrate and retire |
|
|
114
|
+
| `slice-11` | 2026-07-19 | share and redaction |
|
|
115
|
+
| `slice-12a` | 2026-07-23 | relocate containers and registry claims |
|
|
116
|
+
| `slice-13` | 2026-07-23 | config layering, CLI/help surface, content flags, `--EXPOSED` |
|
|
117
|
+
| `slice-12b` | 2026-07-24 | relocate content rewriting |
|
|
118
|
+
|
|
119
|
+
`slice-12` has no tag by design: it escalated on 2026-07-19 as the build's only
|
|
120
|
+
non-converging loop and was split into 12a and 12b. Its ticket is kept as SUPERSEDED for
|
|
121
|
+
the record.
|
|
122
|
+
|
|
123
|
+
### Notable during v1
|
|
124
|
+
|
|
125
|
+
- **The v1 exit review found two gaps no test could.** It reconciled the contract against
|
|
126
|
+
the code rather than against the tickets: `ccw project` was implemented one subcommand of
|
|
127
|
+
five (which silently broke per-project configuration, since that feature is keyed by an ID
|
|
128
|
+
only `ccw project show` prints), and the dispatcher accepted an undocumented internal
|
|
129
|
+
verb. Both fixed; the internal-verb concept is now sanctioned and documented.
|
|
130
|
+
- **Relocate was the one slice to escalate**, and closing it turned up defects worse than
|
|
131
|
+
their tickets described: a symlinked warehouse or `~/.claude` let it rewrite an immutable
|
|
132
|
+
stored object and a captured transcript, and its backups were produced by a
|
|
133
|
+
locale-dependent, newline-translating read that corrupted a CRLF file and its own backup
|
|
134
|
+
while reporting success. Backups are now proven byte-exact before an original is eligible
|
|
135
|
+
to be touched.
|
|
136
|
+
- **A private config reader in three modules** meant `[relocate] roots` and
|
|
137
|
+
`[share] redact_patterns` declared in the XDG tier were ignored. In share that was a
|
|
138
|
+
publish-path leak: a redaction rule the operator set was silently dropped and the content
|
|
139
|
+
it named was published.
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# cc-warehouse
|
|
2
|
+
|
|
3
|
+
Content-addressed, immutable warehouse for AI conversation sessions (Claude Code,
|
|
4
|
+
claude.ai exports, future sources), projected into uniform markdown/HTML files.
|
|
5
|
+
CLI: `ccw`. Successor to `claude-code-transcripts` (that repo is the frozen SPECIMEN;
|
|
6
|
+
read it, never modify it).
|
|
7
|
+
|
|
8
|
+
## Read these before working (they are the contract)
|
|
9
|
+
|
|
10
|
+
1. `contract/BRAINSTORM.md` - approved scope: version cuts, locked decisions, rejected items.
|
|
11
|
+
2. `contract/SPEC.md` - the specimen's real behavior with keep/change/drop verdicts.
|
|
12
|
+
3. `contract/FINDINGS.md` - failure classes (F1-F10) the design must make impossible.
|
|
13
|
+
4. `contract/DESIGN.md` - the architecture; section 14 rules R1-R14 are enforceable in review.
|
|
14
|
+
5. `contract/HARNESS.md` + `harness/prompts/` - HOW code gets built (roles, gates, loop).
|
|
15
|
+
|
|
16
|
+
Decisions locked in these documents are not relitigated in-session; propose contract
|
|
17
|
+
edits to the principal instead.
|
|
18
|
+
|
|
19
|
+
## Hard rules
|
|
20
|
+
|
|
21
|
+
- Python 3.12+, **stdlib-only runtime**. Tests may import pytest, nothing else
|
|
22
|
+
third-party.
|
|
23
|
+
- **Oracle tests before implementation.** Never port tests from the specimen suite.
|
|
24
|
+
- `uv` for everything (`uv run pytest`, `uv run pyright`, `uv run ruff check`).
|
|
25
|
+
pyright strict + ruff are merge gates from commit one. Strict mode is enforced via
|
|
26
|
+
`typeCheckingMode = "strict"` in pyproject; the pyright CLI has no `--strict` flag,
|
|
27
|
+
so where contract docs say "pyright --strict" read "pyright in strict mode".
|
|
28
|
+
- Every file write is tmp-file + `os.replace` (DESIGN R2). No deletes outside the
|
|
29
|
+
projections/shares rebuild module (R4). Sources and stored objects are read-only.
|
|
30
|
+
- Session/transcript data is NEVER deleted or mutated by anything, ever.
|
|
31
|
+
- **NOTHING IS EVER DELETED FROM `~/.claude` (principal, verbatim, 2026-08-04:
|
|
32
|
+
"I do NOT want you to delete anything from `~/.claude`. You do not have my
|
|
33
|
+
permission to delete anything from `~/.claude`.").** Not deleted, moved,
|
|
34
|
+
emptied, pruned, rotated or "cleaned up", by this project or by anything an
|
|
35
|
+
agent runs on its behalf. Ticket 27.9 used to say "clear `~/.claude`" and is
|
|
36
|
+
WITHDRAWN; every gate it was waiting on went green on 2026-08-04, so a future
|
|
37
|
+
session will find the preconditions satisfied and MUST NOT read that as
|
|
38
|
+
permission. Older notes in this repo say `~/.claude` "is scheduled to be
|
|
39
|
+
wiped" and use it to justify urgency; that is SUPERSEDED. The archive being a
|
|
40
|
+
proven second copy is the win, and a second copy is added, never traded.
|
|
41
|
+
- **DO NOT DELETE `~/CODE/my-claude-code-transcripts` (6.5 GB).** It looks like the
|
|
42
|
+
retired exporter's leftovers and was called "dead weight" in-session on 2026-08-03.
|
|
43
|
+
It is not. Measured that day: of its 7,698 session folders, **4,756 are in NEITHER
|
|
44
|
+
`~/.claude/projects` NOR the archive**, 4,754 of them with a recoverable `.jsonl`
|
|
45
|
+
(392.2 MiB), spanning 2026-02-14 to 2026-07-03, and **4,141 predate the warehouse's
|
|
46
|
+
first capture (2026-05-01)**. Instrument: distinct UUID folder names minus both other
|
|
47
|
+
sets, deduplicated (a `duplicates/` subtree inflates a naive walk from 4,756 to 9,541).
|
|
48
|
+
Ticket 25.4/25.5 imports them; nothing may remove the tree before that lands and is
|
|
49
|
+
verified. `~/CODE/claude-code-transcripts` (224 MB, the 16 legacy per-project hooks)
|
|
50
|
+
was measured the same day and holds ZERO sessions absent from both, so it is genuinely
|
|
51
|
+
redundant; the two names differ by one word, so check which one you are looking at.
|
|
52
|
+
- **`ccw` IS INSTALLED AS A FROZEN SNAPSHOT, so editing this repo does NOT change what
|
|
53
|
+
the capture hook runs.** After any change you want the hook to pick up, from the repo
|
|
54
|
+
root with the venv active: **`uv_tool_reinstall_current_project --no-extras`**.
|
|
55
|
+
No mode flag is needed, and naming one yourself is worse: `pyproject.toml` carries
|
|
56
|
+
`[tool.uv-tool] install-mode = "frozen"`, the function reads it and prints
|
|
57
|
+
`pyproject.toml pins this project to frozen installs`, so the command cannot drift from
|
|
58
|
+
what the project requires.
|
|
59
|
+
WHY FROZEN (principal ruling 2026-08-03): an editable install makes `~/.local/bin/ccw` a
|
|
60
|
+
live view of `src/`, so a half-finished edit or a branch switch becomes the system-wide
|
|
61
|
+
capture path at every session end. Proved by execution: with `doctor.py` deliberately
|
|
62
|
+
corrupted in the checkout, the installed `ccw doctor` still ran.
|
|
63
|
+
THE PIN IS ADVISORY, so VERIFY rather than trust it. uv itself ignores `[tool.uv-tool]`;
|
|
64
|
+
only the principal's shell functions honour it (`--frozen` and the pin were added there
|
|
65
|
+
2026-08-04 by a separate session); it is inert on any other machine; and an explicit
|
|
66
|
+
`--editable` overrides it. Two instruments that cannot both miss:
|
|
67
|
+
- `ccw doctor` prints an `install` line with the mode AND the directory it is running
|
|
68
|
+
from. This reads `cc_warehouse.__file__`, which is where the code actually loaded.
|
|
69
|
+
- PEP 610 records what uv did:
|
|
70
|
+
`find ~/.local/share/uv/tools/cc-warehouse -name direct_url.json -exec cat {} \;`
|
|
71
|
+
-> `"dir_info":{}` frozen, `"dir_info":{"editable":true}` not. Use `find`, NOT a glob:
|
|
72
|
+
the file sits four levels down under a version-stamped `.dist-info`, and a glob that
|
|
73
|
+
misses prints NOTHING, which reads as "no editable flag" and therefore as frozen. That
|
|
74
|
+
is the dangerous wrong answer, silently. I shipped exactly that bug here on 2026-08-03.
|
|
75
|
+
- `~/cc-warehouse-journals/` holds the 7 workflow journals (409,059 bytes), the only
|
|
76
|
+
vault objects with no byte-identical archive copy (they carry no `sessionId`, so
|
|
77
|
+
ruling (a) excludes them). Copied there 2026-08-03 with every sha256 re-verified on
|
|
78
|
+
arrival, originals untouched; see its `PROVENANCE.json`. Ticket 25.7 gives them a
|
|
79
|
+
reserved home inside the archive, after which this folder is the principal's to remove.
|
|
80
|
+
- Public repo: commit as the GitHub noreply
|
|
81
|
+
(`git -c user.name='CaptainCodeAU' -c user.email='69835039+CaptainCodeAU@users.noreply.github.com'`);
|
|
82
|
+
never commit personal data (real username, machine names, personal paths); tests
|
|
83
|
+
and docs use generic placeholders.
|
|
84
|
+
- No em-dashes in any authored text (docs, comments, commit messages). ASCII
|
|
85
|
+
punctuation in code tokens.
|
|
86
|
+
- Never start a Bash command with `cd`; prefer `git -C` / absolute paths. Bash-tool
|
|
87
|
+
`rm`/`cp`/`mv` bypass the shell safety wrappers; deletions are permanent, so get
|
|
88
|
+
explicit confirmation first.
|
|
89
|
+
|
|
90
|
+
## Layout (grows during the build)
|
|
91
|
+
|
|
92
|
+
- `contract/` the five LOCKED contract documents + `contract/diagrams/` | `docs/`
|
|
93
|
+
user-facing guides (TODAY: only `sharing-and-redaction.md`; install, quickstart and
|
|
94
|
+
configuration guides are NAMED HERE BUT DO NOT EXIST, corrected 2026-08-02 after this
|
|
95
|
+
line claimed four for weeks) | `harness/prompts/` role
|
|
96
|
+
prompts | `harness/tickets/` slice tickets (filled in Phase 2) | `temp/` scratch
|
|
97
|
+
(gitignored once git init lands) | `cc-warehouse-architecture/` the code-architecture
|
|
98
|
+
review board (SOURCE.md is canonical, index.html is rendered from it by
|
|
99
|
+
`/architecture`; owned by that command, outside `/refresh`'s sweep scope).
|
|
100
|
+
CLAUDE.md stays at repo root: Claude Code only auto-loads it from here.
|
|
101
|
+
- Warehouse DATA lives outside this repo (default `~/cc-warehouse-data`); code and
|
|
102
|
+
data never share a directory.
|
|
103
|
+
|
|
104
|
+
## Current phase
|
|
105
|
+
|
|
106
|
+
**v1 is CLOSED (2026-07-24).** Every slice in the DESIGN section 16 build order landed and
|
|
107
|
+
carries its milestone tag: slice-01..13, with slice 12 split into 12a (containers) and 12b
|
|
108
|
+
(content), 14 tags in all. Gates green at that point (ruff, pyright strict, 403 tests
|
|
109
|
+
at v1 close; the live count moves with the suite and is not restated here) and
|
|
110
|
+
zero forward-looking "lands in slice N" promises left in `src/`.
|
|
111
|
+
|
|
112
|
+
The DESIGN section 16 **v1 exit review was held and closed** the same day. It found two
|
|
113
|
+
contract-vs-code gaps that no DONE annotation, milestone tag or green test could surface,
|
|
114
|
+
and the principal ruled on both: `ccw project` was implemented 1-of-5 against the section 7
|
|
115
|
+
table (which silently broke the per-project config feature, since DESIGN 8 names
|
|
116
|
+
`ccw project show` as the way to get the registry id it is keyed by), and the dispatcher
|
|
117
|
+
accepted an undocumented internal `notify` verb. Both closed. The two rulings the review
|
|
118
|
+
left open, `--hljs` and `--theme`, were also taken and closed that day.
|
|
119
|
+
|
|
120
|
+
**This section is a STATUS POINTER, not a changelog.** It was compacted on 2026-07-24 from
|
|
121
|
+
158 lines after a census showed its per-slice narrative was a LOSSY duplicate of records
|
|
122
|
+
that own those facts more completely (one slice-03 finding was in HARNESS and the ticket
|
|
123
|
+
but had never made it here at all). Nothing was lost; the detail lives at:
|
|
124
|
+
|
|
125
|
+
- **per-slice records, retros, process lessons** -> `contract/HARNESS.md` section 8 (append-only)
|
|
126
|
+
- **what each slice did, its findings and their outcomes** -> `harness/tickets/<nn>-*.md`
|
|
127
|
+
(each carries a dated DONE annotation; findings keep their original wording with the
|
|
128
|
+
verified outcome appended)
|
|
129
|
+
- **decisions and the reasoning behind them** -> `contract/DESIGN.md` section 15 (append-only)
|
|
130
|
+
- **architecture candidates and their states** -> `cc-warehouse-architecture/SOURCE.md`
|
|
131
|
+
|
|
132
|
+
## OPEN / next (no silent omissions)
|
|
133
|
+
|
|
134
|
+
- **THE ACTIVE TRACK is tickets 22-27, defined 2026-08-03, in that order. 22 through 26
|
|
135
|
+
are CLOSED; 27 is the only one left and it is UNBLOCKED.** 22 protect the unprotected
|
|
136
|
+
(DONE 2026-08-03) -> 23 `ccw doctor` + sweep `--dry-run`/`--quiet` (DONE 2026-08-03) ->
|
|
137
|
+
24 make capture work (DONE 2026-08-04, 24.7 excepted, see below) -> 25 rescue the only
|
|
138
|
+
copies (DONE 2026-08-04) -> 26 prove then back up (DONE 2026-08-04, including 26.4) ->
|
|
139
|
+
27 collapse to one folder (NOT STARTED, 27.1-27.8; 27.9 WITHDRAWN AND STAYS WITHDRAWN).
|
|
140
|
+
28 is the backlog register (nothing dropped silently), including the go-public audit.
|
|
141
|
+
Read the ticket files; they carry the measurements and the blast-radius checks behind
|
|
142
|
+
each step.
|
|
143
|
+
- **TICKET 26 IS COMPLETE (2026-08-04) AND THAT IS WHAT UNBLOCKS 27, so read this before
|
|
144
|
+
touching 27.** 26.1-26.3 closed the integrity and containment gates; **26.4 put the
|
|
145
|
+
archive on the external drive and VERIFIED it independently of the copy tool**, hashing
|
|
146
|
+
both sides in full: 116,433 of 116,433 files, both manifests digesting to
|
|
147
|
+
`ee1996858860...`. The archive exists in two places for the first time, which is the
|
|
148
|
+
property every destructive step in 27 was waiting on. **A SATISFIED GATE IS NOT CONSENT**
|
|
149
|
+
(the whole reason 27.9 exists as a withdrawn ticket): 27's two DESTRUCTIVE slices need
|
|
150
|
+
the principal's word at the moment of running, and 27.9 is not to be done at all.
|
|
151
|
+
Still owed on 26 and it is the principal's to do by hand: a `BACKUP-PROVENANCE.json`
|
|
152
|
+
beside the copy, since this machine's sessions cannot write to that volume (macOS TCC
|
|
153
|
+
refuses even `ls`, re-tested 2026-08-05).
|
|
154
|
+
- **CAPTURE IS LIVE. This list said "capture has never run automatically" and that is now
|
|
155
|
+
FALSE (corrected 2026-08-05).** The plugin wrapper is repointed at `ccw hook` through an
|
|
156
|
+
explicit resolved path (never `uv tool run`, which is what broke it), the operator's
|
|
157
|
+
`/plugin` update has landed, and the evidence is first-hand: `~/.claude/logs/ccw-hook.log`
|
|
158
|
+
holds successful captures, `ccw doctor` reports "capture is working", and
|
|
159
|
+
`ccw archive --verify` grew from 19,224 to 19,230 folders with 0 problems, matching the
|
|
160
|
+
hook's own success count exactly. `com.captaincodeau.ccw-sweep.plist` covers the sessions
|
|
161
|
+
a hook cannot see (24.5). **STILL OPEN inside 24: 24.7**, the session-start capture
|
|
162
|
+
freshness signal. There are 0 `ccw` references in `~/.claude/settings.json` and none of
|
|
163
|
+
the 7 SessionStart commands is a ccw check, so a capture that silently stops would still
|
|
164
|
+
not announce itself at session start; the CI watch is the shape to copy.
|
|
165
|
+
- **TICKET 25 IS COMPLETE (2026-08-04). The only-copies are rescued.** `ccw import
|
|
166
|
+
--from DIR` shipped, and the live run imported **4,756 payloads with 0 failures** in
|
|
167
|
+
10m22s: the archive went 14,472 -> 19,226 folders and `ccw archive --verify` reports
|
|
168
|
+
**19,224 folders, 0 problems**. The 7 workflow journals are in at
|
|
169
|
+
`<archive>/_not-sessions/journals/`, hash-verified, originals untouched. The legacy
|
|
170
|
+
tree has 0 files modified (F9). Ticket 26.2's gate reads **0 payloads whose content is
|
|
171
|
+
not in the archive**; the 7 remaining hash misses are all strict PREFIXES of copies the
|
|
172
|
+
archive holds in full, which is why that gate had to be reformulated (a hash miss is
|
|
173
|
+
not a content miss, and as written it could never have reached 0).
|
|
174
|
+
**The acceptance census reads 8, and all 8 are IN the archive** (6 under their
|
|
175
|
+
payload's `sessionId` rather than their legacy folder name, 2 under `_not-sessions/`).
|
|
176
|
+
Genuinely absent: 0. The census keyed on the directory name, which is path-as-identity;
|
|
177
|
+
F4 is why the product does not. Fix the census, never the import.
|
|
178
|
+
- **Ticket 29 opened and half closed the same day.** Mechanism 2 is DONE (`86394d3`):
|
|
179
|
+
`archive.write_session_folder` used to refuse a smaller payload's JSONL and then render
|
|
180
|
+
that same refused payload over the folder's markdown, HTML and manifest. Found by
|
|
181
|
+
VERIFYING a throwaway import that had reported 7,671 stored / 0 failed / exit 0.
|
|
182
|
+
**Mechanism 1 is OPEN and unscoped, and now PROVED rather than suspected (2026-08-05).**
|
|
183
|
+
A probe inserted a NEWER copy then an OLDER copy of one `session_uuid`: `build._heads`
|
|
184
|
+
returned the OLDER as the single head. `catalog._latest_version` picks the right
|
|
185
|
+
supersedes TARGET, but a head is "a row no other row supersedes", so the newest INSERT
|
|
186
|
+
is the head whatever the payload says. Harmless for the archive folder now; still wrong
|
|
187
|
+
for `ccw status`, `ccw render --session` and any future search. Do not touch
|
|
188
|
+
`catalog.add_session` or `build._heads` without scoping it with the principal first.
|
|
189
|
+
**The docstring beside it USED TO CLAIM THE OPPOSITE** ("a late-imported old export
|
|
190
|
+
therefore never displaces the newer copy"), which would have told the next reader this
|
|
191
|
+
was closed; corrected in `8435aeb`, docstring bytes only.
|
|
192
|
+
- **v1.1 flag groups: COMPLETE 2026-08-01.** All four slices landed the day they were
|
|
193
|
+
defined: 14 per-variant matrix, 15 chrome + date-locale, 16 truncation, 17 the
|
|
194
|
+
`--since`/`--until` window. Tags slice-14..slice-17. The regression anchor at
|
|
195
|
+
`tests/golden/matrix-anchor` outlives the run and future slices reuse it: it pins
|
|
196
|
+
the four projected files, so a slice that moves DEFAULT output breaks it ON PURPOSE.
|
|
197
|
+
Never regenerate it to make a change pass. It moved twice, both times by a recorded
|
|
198
|
+
principal ruling with the delta measured first; the two rulings are written beside
|
|
199
|
+
the anchor in `tests/test_matrix.py`.
|
|
200
|
+
- **ARCHIVE-FIRST LAYOUT decided 2026-08-02** (DESIGN 15 entry; R1 and R4 amended in
|
|
201
|
+
section 14). The product is a READABLE archive: the folder tree is the deliverable,
|
|
202
|
+
each session folder holds its own JSONL beside the projections, `objects/` retires,
|
|
203
|
+
and the catalog becomes a disposable index. Tickets 18 (real-data coverage) then 19
|
|
204
|
+
(the layout itself), in that order - a migration is the worst moment to meet a new
|
|
205
|
+
entry type. This is closer to a version cut than a slice.
|
|
206
|
+
- **Ticket 18 (real-data coverage): DONE 2026-08-02.** Every entry and content-block type
|
|
207
|
+
a payload carries now renders something; anything the parser does not name renders a
|
|
208
|
+
marker AND increments the manifest's new top-level `unrecognised` key (principal ruling,
|
|
209
|
+
option 4: NOT a third `loss` amendment, because a rendered entry is not a lost one).
|
|
210
|
+
Verified read-only over all 13,836 objects: 0 unrecognised, 0 parse failures, anchor
|
|
211
|
+
untouched. **Ticket 19 is NEXT and is not started; it needs scoping with the principal.**
|
|
212
|
+
- **Ticket 20 (thinking withheld): DONE 2026-08-02.** Closed the open ruling ticket 18
|
|
213
|
+
carried. The 41,458 empty `thinking` blocks now fold their count into the phase caption
|
|
214
|
+
(8,709 added lines corpus-wide, not the 41,458 a per-block marker would cost), the
|
|
215
|
+
manifest gains a top-level `withheld` block, and `--thinking-withheld
|
|
216
|
+
{caption|marker|off}` lets the operator overrule the default. The text was never
|
|
217
|
+
delivered to this machine: Claude Code stopped writing it at v2.1.69 (2026-03-05), and
|
|
218
|
+
it is a MODEL property, zero of 25,470 opus-4-8 blocks ever carried text.
|
|
219
|
+
- **CONTRACT NARROWED 2026-08-02 (principal ruling, DESIGN 15 block 1 non-scope).** The
|
|
220
|
+
frozen "no thinking key" decision protects the absence of a toggle for whether thinking
|
|
221
|
+
RENDERS, not the absence of the word in a key name. The oracle fence enforcing it was
|
|
222
|
+
narrowed to the decision and now asserts the protected property directly instead of
|
|
223
|
+
matching a substring. Renaming the key to dodge the check was offered and rejected.
|
|
224
|
+
- **Ticket 19 (archive-first layout): the EXPORT works; the archive is NOT LIVE.**
|
|
225
|
+
Done 2026-08-02: 19a naming, 19b zone config, 19c folder writer, 19d migration, 19e
|
|
226
|
+
integrity check, 19f project.json, 19h the `ccw archive` verb.
|
|
227
|
+
**"6 of 7 slices" was a MISLEADING framing of mine, corrected 2026-08-02.** It was 6 of
|
|
228
|
+
7 slices in MY CUT, and the cut covered BUILDING an archive, not LIVING in one.
|
|
229
|
+
**CORRECTED AGAIN 2026-08-03 (ticket 22.4): the paragraph that stood here was STALE and
|
|
230
|
+
would have had a future session re-implement shipped features.** It claimed "`capture.py`
|
|
231
|
+
still calls `store.put`, so every new session lands in the old store and the archive
|
|
232
|
+
drifts until someone re-runs the verb by hand". That was true before slice 19k. It is
|
|
233
|
+
now FALSE: `capture.py:168-169` calls `_archive_source` and `_archive_subagents_of`
|
|
234
|
+
UNCONDITIONALLY on the fresh-identity path, and `_archive_source` writes the archive
|
|
235
|
+
folder synchronously inside the hook (its docstring explains why the detached render
|
|
236
|
+
child must not be the thing that makes a session safe). `sweep.py` routes through
|
|
237
|
+
`capture.capture_transcript` "exactly as the hook does", so a sweep populates both trees
|
|
238
|
+
and files sub-agents under their parents. THREE things this list called missing are
|
|
239
|
+
already built: dual-write, sub-agent capture (ticket 21), and the read half of an index
|
|
240
|
+
rebuild (`archive.py:647` `read_projects`, which no verb calls; ticket 27.1 adds
|
|
241
|
+
`ccw reindex`). Still genuinely open: 19g `share`, `status`/`relocate`/`project` on
|
|
242
|
+
archive labels, retiring `objects/`, and reconciling `ccw verify` with ruling (b) which
|
|
243
|
+
says it BECOMES archive integrity (today it is `ccw archive --verify` and plain `verify`
|
|
244
|
+
still checks the vault).
|
|
245
|
+
**THE REASON NOTHING WAS CAPTURED WAS THAT NOTHING INVOKED CAPTURE, and ticket 24 FIXED
|
|
246
|
+
IT (corrected 2026-08-05; this paragraph used to be in the present tense).** `ccw hook`
|
|
247
|
+
is still absent from `~/.claude/settings.json`, and that is CORRECT rather than a gap:
|
|
248
|
+
it is registered by the `claude-transcript-exporter` plugin's `hooks.json`, so grepping
|
|
249
|
+
settings.json alone reports a false 0. The plugin wrapper is the instrument to read.
|
|
250
|
+
**RUN AT SCALE:** `~/cc-warehouse-archive` holds 13,829 folders + 57 `project.json`,
|
|
251
|
+
built in 6 minutes with 0 failures and verified with 0 problems, twice (the second run
|
|
252
|
+
proved idempotence). **NOTHING HAS BEEN SWAPPED**: `~/cc-warehouse-data` is untouched
|
|
253
|
+
and still the live warehouse; hook, sweep and build still write there. The swap is an
|
|
254
|
+
open decision for the principal and should come last.
|
|
255
|
+
- **NEXT after those: v1.1 proper**: FTS5 + `ccw search` (session AND message hits) + HTML archive
|
|
256
|
+
search + `ccw import`/inbox; **then v1.2**: `ccw mcp`. `ccw import` adopts slice 17's
|
|
257
|
+
window definition when it lands.
|
|
258
|
+
- **Pre-release, not pre-v1**: DESIGN 15 item 6 (PyPI name re-check before the repo goes
|
|
259
|
+
public) and item 7 (registry backup/export story).
|
|
260
|
+
- **Named v1.1 candidate, recorded not dropped**: honouring the reader's OS setting via
|
|
261
|
+
`prefers-color-scheme` for SHARED pages. Same reader-respect argument that decided
|
|
262
|
+
`--hljs`; needs a light palette designed and the highlight.js token colours re-checked
|
|
263
|
+
for contrast.
|
|
264
|
+
- **Non-blocking**: the architecture review was HELD 2026-07-24 at `1517bba` (commit
|
|
265
|
+
18fa5be) and its decay banner is retired; this line previously said a review was still
|
|
266
|
+
due, which was stale. Since that snapshot `src/` has moved again (slices 14-17), so the
|
|
267
|
+
board's line refs will have drifted and a re-derive is worth doing before its cards are
|
|
268
|
+
acted on. `cc-warehouse-architecture/SOURCE.md` is canonical.
|
|
269
|
+
|
|
270
|
+
## Standing lessons (full form in HARNESS section 8)
|
|
271
|
+
|
|
272
|
+
- **Slice completeness is not contract completeness.** The oracle suite was written from the
|
|
273
|
+
tickets, the tickets from the slice list. A green suite proves the code matches the TESTS;
|
|
274
|
+
only reading the CONTRACT against the CODE proves the tests cover the contract.
|
|
275
|
+
- **A ticket's finding list is evidence, not a specification.** Across 12a and 12b, four of
|
|
276
|
+
ten carried findings were mis-stated: two understated, one mis-classified, one whose
|
|
277
|
+
mechanism was the reverse of the assumption. Re-derive every finding by execution first.
|
|
278
|
+
- **The same defect class recurs across modules.** Fixing one instance of the private-config-
|
|
279
|
+
reader bug would have left a live redaction leak in `ccw share`. Census the class.
|
|
280
|
+
Sharpened 2026-08-01 (slice 14): a census performed on ONE file is still an instance fix.
|
|
281
|
+
The F6 overclaim in the compact note was fixed and written up as a class fix, citing this
|
|
282
|
+
very lesson, while its twin sat live in the HTML emitter of the same module - green,
|
|
283
|
+
because the oracle test called one emitter and not the other. Knowing the lesson does not
|
|
284
|
+
apply it. Test shared behaviour across BOTH emitters by construction.
|
|
285
|
+
- **Non-destructiveness is a precondition, not an intention.** Prove a backup before touching
|
|
286
|
+
its original, so the worst outcome of a future defect is a refusal rather than a loss.
|
|
287
|
+
- **A green suite is a statement about the inputs you imagined.** 639 tests and three
|
|
288
|
+
gates did not contain a payload with a lone surrogate, because nobody invents one; 11 of
|
|
289
|
+
13,836 real sessions had one, and the first `ccw build` at scale failed on 9 (2026-08-01).
|
|
290
|
+
Run the product on real data before believing it works. R10 is why it was diagnosable:
|
|
291
|
+
the batch named each failed item and carried on instead of aborting on the first.
|
|
292
|
+
- **A read-only-looking command must be proved read-only.** `ccw sweep -h` printed no help
|
|
293
|
+
and imported 13,836 sessions into a real warehouse (2026-08-01): eight of ten verbs never
|
|
294
|
+
checked for the flag. Exit 0 plus output is NOT evidence nothing happened; the test that
|
|
295
|
+
catches it asks whether the world changed. Fixed at the dispatcher, because per-verb
|
|
296
|
+
guards are only as complete as whoever remembered to add them.
|
|
297
|
+
|
|
298
|
+
`/refresh` (in `.claude/commands/`) is the currency sweep; `/architecture` owns the review
|
|
299
|
+
board and is outside `/refresh`'s scope. Cross-project context lives in the
|
|
300
|
+
claude-code-transcripts project memory (`cc-warehouse-and-cc-vantage`); sibling project:
|
|
301
|
+
`../cc-vantage`.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
8
|
+
|
|
9
|
+
## Copyright License
|
|
10
|
+
|
|
11
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
12
|
+
|
|
13
|
+
## Distribution License
|
|
14
|
+
|
|
15
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
16
|
+
|
|
17
|
+
## Notices
|
|
18
|
+
|
|
19
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
20
|
+
|
|
21
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
22
|
+
|
|
23
|
+
## Changes and New Works License
|
|
24
|
+
|
|
25
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
26
|
+
|
|
27
|
+
## Patent License
|
|
28
|
+
|
|
29
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
30
|
+
|
|
31
|
+
## Noncommercial Purposes
|
|
32
|
+
|
|
33
|
+
Any noncommercial purpose is a permitted purpose.
|
|
34
|
+
|
|
35
|
+
## Personal Uses
|
|
36
|
+
|
|
37
|
+
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
38
|
+
|
|
39
|
+
## Noncommercial Organizations
|
|
40
|
+
|
|
41
|
+
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
42
|
+
|
|
43
|
+
## Fair Use
|
|
44
|
+
|
|
45
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
46
|
+
|
|
47
|
+
## No Other Rights
|
|
48
|
+
|
|
49
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
50
|
+
|
|
51
|
+
## Patent Defense
|
|
52
|
+
|
|
53
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
54
|
+
|
|
55
|
+
## Violations
|
|
56
|
+
|
|
57
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
58
|
+
|
|
59
|
+
## No Liability
|
|
60
|
+
|
|
61
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
62
|
+
|
|
63
|
+
## Definitions
|
|
64
|
+
|
|
65
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
66
|
+
|
|
67
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
68
|
+
|
|
69
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
70
|
+
|
|
71
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
72
|
+
|
|
73
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cc-warehouse
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Content-addressed, immutable warehouse for AI conversation sessions, projected into uniform markdown/HTML files.
|
|
5
|
+
Project-URL: Homepage, https://github.com/CaptainCodeAU/cc-warehouse
|
|
6
|
+
Project-URL: Repository, https://github.com/CaptainCodeAU/cc-warehouse
|
|
7
|
+
Project-URL: Changelog, https://github.com/CaptainCodeAU/cc-warehouse/blob/master/CHANGELOG.md
|
|
8
|
+
Author: CaptainCodeAU
|
|
9
|
+
License-Expression: PolyForm-Noncommercial-1.0.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: archive,claude,claude-code,markdown,sessions,transcripts
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# cc-warehouse
|
|
27
|
+
|
|
28
|
+
Content-addressed, immutable warehouse for AI conversation sessions (Claude Code,
|
|
29
|
+
claude.ai exports, future sources), projected into uniform markdown/HTML files.
|
|
30
|
+
CLI: `ccw`.
|
|
31
|
+
|
|
32
|
+
Status: **v1 is CLOSED.** Every slice in the DESIGN section 16 build order landed
|
|
33
|
+
and carries its milestone tag, `slice-01..13` including `slice-12a` and
|
|
34
|
+
`slice-12b`, 14 tags in all (store; catalog + registry; parser + conversation
|
|
35
|
+
model; capture hook + notify; sweep; markdown emitters; HTML emitters + manifest;
|
|
36
|
+
build/render orchestration; status + verify; migrate + retire; share + redaction;
|
|
37
|
+
relocate containers; relocate content; config + CLI + flags). The render carries
|
|
38
|
+
the full exporter-v8.10.1 chrome, each content class an independent toggle.
|
|
39
|
+
Gates are green: ruff clean, pyright strict 0 errors, 763 tests passing, zero stubs.
|
|
40
|
+
|
|
41
|
+
**Entry-type coverage was OVERCLAIMED here until 2026-08-02** and the correction is
|
|
42
|
+
worth keeping. This paragraph used to say "complete Claude Code entry-type coverage";
|
|
43
|
+
a census of 13,836 real sessions then found eight entry types and three content-block
|
|
44
|
+
types that rendered nothing and incremented no counter, 62,577 entries carrying
|
|
45
|
+
`loss: 0` beside them. Ticket 18 closed that, and the durable half is that anything
|
|
46
|
+
the parser does not name now renders a marker AND increments a new top-level
|
|
47
|
+
`unrecognised` manifest key, so the next type Claude Code ships announces itself
|
|
48
|
+
instead of vanishing. The word "complete" is not used again on purpose.
|
|
49
|
+
|
|
50
|
+
The v1 exit review has been held and closed. It reconciled the contract against
|
|
51
|
+
the code rather than against the tickets, which is how it found the two gaps no
|
|
52
|
+
milestone tag or green test could surface: `ccw project` was implemented one
|
|
53
|
+
subcommand of five, and the dispatcher accepted an undocumented internal verb.
|
|
54
|
+
Both are fixed, and the two decisions the review left open were also ruled:
|
|
55
|
+
shared pages now inline highlight.js and make **no third-party requests**, while
|
|
56
|
+
personal projections keep the CDN reference for exporter parity; pages stay
|
|
57
|
+
dark-only.
|
|
58
|
+
|
|
59
|
+
**v1.1 flag groups: COMPLETE 2026-08-01** (per-variant matrix, HTML chrome defaults,
|
|
60
|
+
truncation, `--since`/`--until`), tags `slice-14`..`slice-17`.
|
|
61
|
+
|
|
62
|
+
**Archive-first layout: 6 of 7 slices done, 2026-08-02.** The product is a readable
|
|
63
|
+
archive: one self-contained folder per session holding the raw JSONL beside its four
|
|
64
|
+
projections and a manifest, named `<YYYYMMDD-HHMMSS><offset>_<uuid>` in a zone pinned
|
|
65
|
+
in config so the same session yields the same folder on any machine. `ccw archive`
|
|
66
|
+
builds it. It has been run on a real 13,836-session corpus: 13,829 folders in six
|
|
67
|
+
minutes, zero failures, then verified with zero problems. **Nothing has been swapped**:
|
|
68
|
+
the content-addressed store is still the live warehouse and the hook still writes to it.
|
|
69
|
+
|
|
70
|
+
Then FTS5 with `ccw search` and `ccw import`, then `ccw mcp` in v1.2.
|
|
71
|
+
|
|
72
|
+
**Not published, and not planned for publication for now** (principal, 2026-07-24).
|
|
73
|
+
The distribution name is `cc-warehouse` and the console scripts are `ccw` and
|
|
74
|
+
`cc-warehouse`, but nothing is on PyPI. Install from a git checkout with `uv sync`.
|
|
75
|
+
|
|
76
|
+
The contract lives in `contract/` (BRAINSTORM, SPEC, DESIGN, FINDINGS, HARNESS); the
|
|
77
|
+
oracle suite in `tests/` was written before the implementation.
|
|
78
|
+
|
|
79
|
+
## Verbs
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
ccw hook SessionEnd capture from a stdin payload
|
|
83
|
+
ccw sweep import anything the hook missed
|
|
84
|
+
ccw build rebuild projections from the catalog (incremental by default)
|
|
85
|
+
ccw render (re)build one session's four files, or render an ad-hoc file
|
|
86
|
+
ccw project list / show / rename / move OLD NEW / merge A B
|
|
87
|
+
ccw share build a sanitized static site for chosen sessions
|
|
88
|
+
ccw migrate one-shot import of a legacy archive (+ --retire)
|
|
89
|
+
ccw relocate repair the external world after a repo move (dry-run by default)
|
|
90
|
+
ccw status recent captures, counts, store size, last errors
|
|
91
|
+
ccw verify re-hash objects and cross-check them against the catalog
|
|
92
|
+
ccw archive build (or --verify) the archive-first tree at --to DIR
|
|
93
|
+
ccw version print the version (also -v)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Every session is projected into four files: `transcript.md`,
|
|
97
|
+
`transcript.compact.md`, `conversation.html` and `conversation.compact.html`,
|
|
98
|
+
plus a `manifest.json` recording the settings and counts that produced them.
|
|
99
|
+
|
|
100
|
+
`manifest.json` answers three separate questions and keeps them separate on purpose:
|
|
101
|
+
`loss` is what the renderer dropped, `unrecognised` is what Claude Code's format grew
|
|
102
|
+
that this parser does not name yet, and `withheld` is what never arrived (thinking
|
|
103
|
+
text stopped reaching the JSONL upstream at Claude Code v2.1.69). A rendered entry is
|
|
104
|
+
not a lost one, so none of the last two is filed under `loss`.
|
|
105
|
+
|
|
106
|
+
## Development
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
uv sync
|
|
110
|
+
uv run pytest # oracle suite
|
|
111
|
+
uv run pyright # strict mode (configured in pyproject)
|
|
112
|
+
uv run ruff check
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
License: PolyForm Noncommercial 1.0.0 (see LICENSE).
|