Skip to content

Commit 4bdc899

Browse files
authored
Merge pull request #2 from iscc/develop
v0.0.1 experimental release
2 parents 2021c8d + 6d29673 commit 4bdc899

File tree

16 files changed

+442
-146
lines changed

16 files changed

+442
-146
lines changed

.claude/agent-memory/define-next/MEMORY.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ iterations.
110110
concrete verifiable gap. Single-file doc modifications are safe, quick steps. Use howto guides
111111
as reference for idiomatic code examples per language. Prefer state→target gap closure over
112112
[low] research issues.
113+
- **Cosmetic doc fixes** (iteration 31): After major doc gaps are closed, the review agent's handoff
114+
often catches small inaccuracies in code examples. These are ideal for batching into a single
115+
step when they're all in the same file. The README.md Quick Start was already correct
116+
(established earlier by the root README step) while docs/index.md had stale patterns — always
117+
cross-check both files when scoping doc fixes. Verification for doc example fixes can use `grep`
118+
for presence/absence of specific patterns (e.g., `grep -c 'json.loads'` returns 0).
119+
- **Interactive session CI breakage** (CID iteration 1 on new loop): Interactive sessions that
120+
modify Python binding stubs/init files can break `ruff format --check` in CI. The handoff from
121+
the previous review cycle may not flag CI status if it was green at that time — always check
122+
state.md's CI section for the latest status. When CI is red, that's always the first priority
123+
regardless of what the handoff "Next" section suggests. Formatting fixes are trivial single-file
124+
steps — don't over-scope them.
113125

114126
## Architecture Decisions
115127

.claude/agent-memory/update-state/MEMORY.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ Codepaths, patterns, and key findings accumulated across CID iterations.
4848

4949
- **Incremental review**: compare `assessed-at` hash vs HEAD `--stat` first, then re-verify only
5050
affected sections. Always carry forward sections where no relevant files changed.
51-
- **Tier 1 symbol count**: target says "22" but implementation has 23 (target.md counting error)
52-
- **CI now has 7 jobs**: Rust, Python, Node.js, WASM, C FFI, Java, Go. All 7 pass at HEAD (run
53-
22376568235, iteration 9). Go job added to ci.yml in iteration 9 (commit eb5085d).
51+
- **Tier 1 symbol count**: target.md and specs/rust-core.md previously said "22" but had uncommitted
52+
edits correcting to "23" (the actual implementation count). Working-tree-only edits visible in
53+
`git diff` (HEAD is clean at 23 in both files as of iteration 30).
54+
- **CI now has 7 jobs**: Rust, Python, Node.js, WASM, C FFI, Java, Go. All 7 pass at HEAD when
55+
Python formatting is clean. Post-interactive-session: Python ruff format check can fail even if
56+
local `mise run check` passes (CI uses global `uv run ruff format --check`, pre-commit may only
57+
check staged files).
5458
- **Registry readme metadata**: `Cargo.toml` `readme = "README.md"` in iscc-lib; `pyproject.toml`
5559
`readme = "README.md"` in iscc-py; npm auto-detects README.md (no explicit field needed in
5660
package.json)
@@ -196,3 +200,17 @@ Codepaths, patterns, and key findings accumulated across CID iterations.
196200
Per-Crate READMEs section status → MET. CI still green (run 22394253866, all 7 jobs pass). No
197201
open issues remain — only the `[low]` TypeScript port evaluation. PR #1 (develop → main) still
198202
open.
203+
- **docs/index.md Quick Start expanded (iteration 30, commits 746b038+0699ea1)**: Quick Start tabs
204+
now include all 6 languages: Rust, Python, Node.js, Java, Go, WASM (was only Rust and Python).
205+
Available Bindings table now includes Java and Go rows (7 total). Documentation target "All code
206+
examples use tabbed multi-language format" now met for landing page. PR #1 MERGED (develop →
207+
main). Latest CI: develop run 22395380785 (7/7 pass), main run 22395922655 (all pass), Docs run
208+
22395922643 (pass). Only 1 `[low]` issue remains. v0.0.1 tag is the logical next step.
209+
- **Interactive session (post-iteration-30, commits 52d1c88+3bed859+5461a65+69bb36c+c4e3657)**:
210+
Pre-push hooks changed to `always_run: true`; Rust style fixes (inline format args); CPython C
211+
API optimisation for video code extraction in `crates/iscc-py/src/lib.rs`; 2 new Python-specific
212+
flat-buffer functions `gen_video_code_v0_flat` + `soft_hash_video_v0_flat`; type signatures
213+
updated to `Sequence[Sequence[int]]`; API symbol count in target.md and specs/rust-core.md
214+
updated 22→23 (correcting a pre-existing under-count). **RESULT: CI FAILING** — Python ruff
215+
format check fails (runs 22401304896 + 22401336439). Fix by running
216+
`uv run ruff format crates/iscc-py/python/` and committing.

.claude/context/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# CID Context Pack (`.claude/context/`)
2+
3+
This directory is the **shared working memory** for the CID (Continuous Iterative Development) loop.
4+
It exists to keep agent prompts small, stable, and unambiguous.
5+
6+
## Design goals
7+
8+
- **Small**: keep each file concise; move deep details into `specs/` (or the codebase) and link.
9+
- **Self-describing**: every file should make it clear *who updates it* and *how*.
10+
- **Mechanically checkable**: prefer checklists, counts, and commands over prose.
11+
- **Stable anchors**: avoid renaming headings that other files link to.
12+
13+
## Files (ownership + update policy)
14+
15+
| File | Primary owner | Update style | Purpose |
16+
| ------------------ | ------------------------------------------------------------------ | ------------------------------------------------- | ---------------------------------------------------------------------- |
17+
| `target.md` | human + review (when `issues.md` says `Source: [human]` + `Spec:`) | curated | Long-lived desired end-state + verification criteria |
18+
| `state.md` | `update-state` | overwrite | Factual snapshot of what exists at `HEAD` (records `assessed-at` hash) |
19+
| `next.md` | `define-next` | overwrite | Exactly one small, verifiable work package |
20+
| `handoff.md` | `advance` then `review` | overwrite | Inter-role communication; latest review verdict is authoritative |
21+
| `learnings.md` | `review` | append-only (occasionally prune/merge for signal) | High-signal pitfalls, patterns, and verified conventions |
22+
| `issues.md` | humans + agents | append-only; review deletes resolved | Lightweight backlog that define-next can prioritize |
23+
| `iterations.jsonl` | CID tooling/agents | append-only | Execution log (turns/cost/duration/status) for iteration accounting |
24+
| `specs/` | human + review (when authorized via `issues.md`) | curated | Deeper specs referenced by `target.md` |
25+
26+
## Hygiene rules (recommended)
27+
28+
- **No duplication**: if a fact is stable and belongs in a spec, put it in `specs/*` and link from
29+
`target.md`/`state.md` rather than repeating it.
30+
- **State is not a spec**: `state.md` should be mostly *evidence + gaps*, not long descriptions of
31+
already-met targets.
32+
- **Leavings pruning**: if `learnings.md` grows, merge duplicates and delete obsolete entries (git
33+
history keeps it). Keep the top of each section “high-signal”.
34+
- **Issues triage**: keep issues actionable; prefer “what is wrong + where + how to verify” over
35+
open-ended discussion.
36+
- **Log rotation** (optional): when `iterations.jsonl` becomes large, split by month into an
37+
`archive/` directory and keep only the recent window here.

.claude/context/handoff.md

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,27 @@
1-
## 2026-02-25 — Review of: Expand docs landing page to all 6 languages
1+
## 2026-02-25 — Review of: Fix Python ruff format CI failure
22

33
**Verdict:** PASS
44

5-
**Summary:** Clean implementation — added Node.js, Java, Go, and WASM tabs to the Quick Start
6-
section and Java/Go rows to the Available Bindings table. All 6 tabs consistently demonstrate
7-
`gen_text_code_v0("Hello World")`. Code examples match the howto guides. Scope discipline is
8-
excellent — explicitly excluded items were left untouched.
5+
**Summary:** Single mechanical formatting fix to `_lowlevel.pyi` — split the `gen_video_code_v0`
6+
signature across multiple lines to satisfy ruff's line-length limit. Exactly what next.md asked for,
7+
nothing more. All quality gates pass.
98

109
**Verification:**
1110

12-
- [x] `uv run zensical build` exits 0 — docs site builds without errors
13-
- [x] `grep -c '=== "' docs/index.md` returns 6 — one tab per language
14-
- [x] `grep 'Node.js' docs/index.md` matches — Node.js tab and binding table row present
15-
- [x] `grep 'Java' docs/index.md` matches — Java tab and binding table row present
16-
- [x] `grep 'Go' docs/index.md` matches — Go tab and binding table row present
17-
- [x] `grep 'WASM' docs/index.md` matches — WASM tab present
18-
- [x] `grep 'go get' docs/index.md` matches — Go install command in tab and table
19-
- [x] Available Bindings table has 7 rows (Rust, Python, Node.js, Java, Go, WebAssembly, C/C++)
20-
- [x] `mise run check` — all 14 pre-commit hooks pass
11+
- [x] `uv run ruff format --check crates/iscc-py/python/iscc_lib/` exits 0 — "2 files already
12+
formatted"
13+
- [x] `uv run ruff check crates/iscc-py/python/iscc_lib/` exits 0 — "All checks passed!"
14+
- [x] `mise run check` passes — all 14 pre-commit hooks clean
2115
- [x] No quality gate circumvention — no suppressions, no test skipping, no threshold changes
2216

2317
**Issues found:**
2418

2519
- (none)
2620

27-
**Next:** The "All code examples use tabbed multi-language format" target gap is now closed. Two
28-
minor documentation polish items remain (noted as "Not In Scope" in this iteration): (1) Rust Quick
29-
Start shows `println!("{result}"); // JSON string` but result is a struct, not a JSON string; (2)
30-
Python Quick Start uses `json.loads` unnecessarily since the binding returns a dict-like object
31-
directly. Also, Key Features bullet says "Rust, Python, Node.js, WebAssembly, or C" — doesn't
32-
mention Java or Go. These are cosmetic fixes suitable for a polish step before the v0.0.1 release PR
33-
from `develop` to `main`.
21+
**Next:** The ruff format CI blocker is resolved. The natural next step is a final state assessment
22+
to confirm CI is fully green on develop, then create the PR from `develop``main` for the v0.0.1
23+
release.
3424

35-
**Notes:** mdformat auto-reformats JS `import` statements in markdown code blocks to multi-line
36-
style — this is standard formatter behavior and the code renders correctly on the docs site.
25+
**Notes:** Trivial fix — no learnings, no technical debt, no architecture concerns. The interactive
26+
session commit `5461a65` (CPython C API optimizations) introduced the formatting violation; this
27+
iteration cleaned it up.

.claude/context/iterations.jsonl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,3 +332,12 @@
332332
{"ts":"2026-02-25T11:37:58.656768+00:00","iteration":29,"role":"define-next","status":"OK","turns":24,"cost_usd":1.06929,"duration_s":296.4}
333333
{"ts":"2026-02-25T11:41:50.250967+00:00","iteration":29,"role":"advance","status":"OK","turns":37,"cost_usd":1.373836,"duration_s":231.6}
334334
{"iteration":29,"timestamp":"2026-02-25T11:50:00Z","step":"Expand docs landing page to all 6 languages","verdict":"PASS","files_changed":["docs/index.md"],"notes":"6 Quick Start tabs + 7 binding table rows. Code examples match howto guides. All 14 hooks pass."}
335+
{"ts":"2026-02-25T11:44:23.523844+00:00","iteration":29,"role":"review","status":"OK","turns":29,"cost_usd":0.872514,"duration_s":153.3}
336+
{"ts":"2026-02-25T12:08:12.357123+00:00","iteration":30,"role":"update-state","status":"OK","turns":2,"cost_usd":0.995104,"duration_s":373.2}
337+
{"ts":"2026-02-25T12:10:25.270708+00:00","iteration":30,"role":"define-next","status":"OK","turns":19,"cost_usd":0.754156,"duration_s":132.9}
338+
{"ts":"2026-02-25T12:12:41.104448+00:00","iteration":30,"role":"advance","status":"OK","turns":21,"cost_usd":0.552226,"duration_s":135.8}
339+
{"iteration":30,"timestamp":"2026-02-25T12:15:00Z","step":"Polish docs landing page code examples and Key Features","verdict":"PASS","files_changed":["docs/index.md"],"notes":"Three cosmetic doc fixes: Key Features bullet adds Java/Go, Rust Quick Start uses result.iscc, Python Quick Start drops json.loads. All 7 criteria pass, 14 hooks clean."}
340+
{"ts":"2026-02-25T12:15:34.926676+00:00","iteration":30,"role":"review","status":"OK","turns":28,"cost_usd":0.939532,"duration_s":173.8}
341+
{"ts":"2026-02-25T14:37:57.717998+00:00","iteration":1,"role":"update-state","status":"OK","turns":40,"cost_usd":1.262325,"duration_s":343.1}
342+
{"ts":"2026-02-25T14:39:56.062140+00:00","iteration":1,"role":"define-next","status":"OK","turns":19,"cost_usd":0.643321,"duration_s":118.3}
343+
{"ts":"2026-02-25T14:42:27.239156+00:00","iteration":1,"role":"advance","status":"OK","turns":20,"cost_usd":0.540541,"duration_s":151.2}

.claude/context/next.md

Lines changed: 27 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,50 @@
11
# Next Work Package
22

3-
## Step: Expand docs landing page to all 6 languages
3+
## Step: Fix Python ruff format CI failure
44

55
## Goal
66

7-
Add Node.js, Java, Go, and WASM tabs to the Quick Start section in `docs/index.md` and add Java and
8-
Go rows to the Available Bindings table. This closes the target gap "All code examples use tabbed
9-
multi-language format" before the v0.0.1 release.
7+
Fix the `ruff format --check` failure in CI that is blocking the Python job (and thus pytest) from
8+
passing. The `_lowlevel.pyi` file has a single line-length formatting violation introduced by the
9+
interactive session commit `5461a65` (CPython C API optimizations for video functions).
1010

1111
## Scope
1212

1313
- **Create**: (none)
14-
- **Modify**: `docs/index.md`
15-
- **Reference**: `docs/howto/nodejs.md`, `docs/howto/java.md`, `docs/howto/go.md`,
16-
`docs/howto/wasm.md` (for idiomatic code patterns in each language)
14+
- **Modify**: `crates/iscc-py/python/iscc_lib/_lowlevel.pyi`
15+
- **Reference**: (none — the fix is mechanical formatting)
1716

1817
## Not In Scope
1918

20-
- Fixing the existing Rust and Python Quick Start examples (they have minor inaccuracies — Rust
21-
shows `println!("{result}")` as "JSON string" when it's a struct; Python uses `json.loads` when
22-
the binding returns a dict-like object directly). These should be fixed but in a separate step
23-
- Adding the `Key Features` bullet to mention Java and Go (currently says "Rust, Python, Node.js,
24-
WebAssembly, or C") — cosmetic, defer
25-
- Fixing the WASM howto guide package name (`@iscc/iscc-wasm``@iscc/wasm`) — pre-existing issue
26-
in a different file
27-
- Restructuring the page layout or adding new sections beyond Quick Start tabs and binding table
28-
rows
19+
- Modifying any Rust code (`lib.rs`, `src/*.rs`)
20+
- Modifying `__init__.py` (already passes `ruff format --check`)
21+
- Investigating or changing the CPython C API logic in `crates/iscc-py/src/lib.rs`
22+
- Any other Python source changes beyond formatting
23+
- Tagging v0.0.1 or creating PRs (separate future step)
2924

3025
## Implementation Notes
3126

32-
Add 4 new tabs to the `=== "Language"` tabbed block under Quick Start. Follow
33-
[pymdownx.tabbed](https://facelessuser.github.io/pymdown-extensions/extensions/tabbed/) syntax
34-
(already used by the existing Rust/Python tabs). Each tab shows install command + minimal code
35-
example.
27+
Run `uv run ruff format crates/iscc-py/python/iscc_lib/_lowlevel.pyi` to apply canonical formatting.
28+
The only change is splitting the `gen_video_code_v0` function signature across multiple lines to
29+
satisfy the line-length limit:
3630

37-
**Tab order**: Rust, Python, Node.js, Java, Go, WASM (matches target.md ordering and Available
38-
Bindings table).
31+
```diff
32+
-def gen_video_code_v0(frame_sigs: Sequence[Sequence[int]], bits: int = 64) -> dict[str, Any]:
33+
+def gen_video_code_v0(
34+
+ frame_sigs: Sequence[Sequence[int]], bits: int = 64
35+
+) -> dict[str, Any]:
36+
```
3937

40-
**Code patterns per language** (derived from howto guides and agent memory):
41-
42-
- **Node.js** (`=== "Node.js"`): `npm install @iscc/lib`, then
43-
`import { gen_text_code_v0 } from "@iscc/lib"` — returns a string directly (not structured
44-
object)
45-
- **Java** (`=== "Java"`): Maven dependency XML block or `System.loadLibrary` note, then
46-
`IsccLib.genTextCodeV0("Hello World", 64)` — returns a String. Note that Maven Central is not
47-
yet available (build from source). Use `import io.iscc.iscc_lib.IsccLib;`
48-
- **Go** (`=== "Go"`): `go get github.com/iscc/iscc-lib/packages/go`, then show Runtime creation +
49-
`rt.GenTextCodeV0(ctx, "Hello World", 64)` — returns `(string, error)`. Go requires more
50-
boilerplate (runtime setup) so keep the example minimal but correct
51-
- **WASM** (`=== "WASM"`): `npm install @iscc/wasm`, then
52-
`import init, { gen_text_code_v0 } from "@iscc/wasm"` + `await init()` — returns a string. Note
53-
the async init requirement
54-
55-
**Available Bindings table**: Add rows for Java (Maven Central, `io.iscc:iscc-lib`, note not yet
56-
published) and Go (Go module, `go get github.com/iscc/iscc-lib/packages/go`).
57-
58-
**Consistency**: All 6 tabs should demonstrate the same function (`gen_text_code_v0` with "Hello
59-
World") to make cross-language comparison easy.
38+
After applying, run `mise run format` to ensure all pre-commit auto-fix hooks are satisfied, then
39+
stage and commit.
6040

6141
## Verification
6242

63-
- `uv run zensical build` exits 0 (docs site builds without errors)
64-
- `grep -c '=== "' docs/index.md` returns 6 (one tab per language)
65-
- `grep 'Node.js' docs/index.md` matches (Node.js tab present)
66-
- `grep 'Java' docs/index.md` matches (Java tab and binding table row present)
67-
- `grep 'Go' docs/index.md` matches (Go tab and binding table row present)
68-
- `grep 'WASM' docs/index.md` matches (WASM tab present)
69-
- `grep 'go get' docs/index.md` matches (Go install command in table or tab)
70-
- Available Bindings table has 7 rows (Rust, Python, Node.js, WASM, C/C++, Java, Go)
71-
- `mise run check` passes (formatting, linting)
43+
- `uv run ruff format --check crates/iscc-py/python/iscc_lib/` exits 0
44+
- `uv run ruff check crates/iscc-py/python/iscc_lib/` exits 0 (still passes)
45+
- `mise run check` passes — all pre-commit hooks clean
7246

7347
## Done When
7448

75-
All verification criteria pass — docs/index.md has 6 language tabs in Quick Start and 7 binding rows
76-
in the table, and the docs site builds cleanly.
49+
All three verification criteria pass, confirming the formatting fix restores CI-green status for the
50+
Python job.

.claude/context/specs/rust-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ The full public API surface bound in all languages:
192192

193193
Total: 9 gen functions + 4 text utils + 4 algorithm primitives + 1 soft hash + 1 encoding + 1 codec
194194

195-
- 2 streaming types + 1 diagnostic = **22 public symbols** (+ the `codec` module remains Tier 2
195+
- 2 streaming types + 1 diagnostic = **23 public symbols** (+ the `codec` module remains Tier 2
196196
Rust-only).
197197

198198
## Quality Gates

0 commit comments

Comments
 (0)