Skip to content

Docs rewrite 4/5: the developer corner - #188

Merged
EiffL merged 1 commit into
clean_rebuildfrom
docs-dev-corner
Aug 21, 2026
Merged

Docs rewrite 4/5: the developer corner#188
EiffL merged 1 commit into
clean_rebuildfrom
docs-dev-corner

Conversation

@EiffL

@EiffL EiffL commented Aug 21, 2026

Copy link
Copy Markdown
Member

Fourth pass — the maintainer half of the site: maintainer.md, architecture.md, an Engine Internals section replacing the old Python API pages, and the contributing trio.

What's in it

  • architecture.md: the CLI/engine/ASTRA split; the run pipeline as one annotated diagram (guards → converge → plan → fetch → venue → workers → driver loop → crate); identity (two hashes, three states, the one-classify-two-callers discipline); storage (DataLad model, run records, thin commits); the exec boundary (policy → argv rewrite → attestation); the container hatch; venues; the crate. This is CLAUDE.md's invariants translated for humans who didn't live the rebuild.
  • maintainer.md: the welcome page in its old shape — what the corner covers, the three-command dev loop, and the house rules (no dead code/foreshadowing, no escape hatches, literal behavior, one implementation per rule, honest reporting).
  • Engine Internals (docs/api/, 12 pages): an overview map plus one hand-written tour per module — project, dataset, identity, plan, assets, worker, materialize, venue, sandbox, image & container, crate. Each page: responsibility, key-symbols table, "what must stay true", and where its tests live. Hand-written rather than autodoc, deliberately: the engine is not a public API (projects don't depend on lightcone-cli), so contract beats signatures. The 17 old pages documented modules that no longer exist; all deleted.
  • Contributing: setup.md (uv-only loop, the gated-suite table, docs/wheel builds, pre-PR checklist), testing.md (the tools/real_tools seam, a where-does-this-question-belong table, the enforcement suite's four properties, the mutation-check rule and its two traps), and a new extending.md (the change-map table plus the everywhere-rules and conventions).
  • Deleted: docs/hpc/ (site-registry model), contributing/backends.md, contributing/hpc-sites.md. Nav updated (Python API → Engine Internals; Extending added).

Verification

  • zensical build now reports zero issues — the two warnings that survived passes 1–3 lived in pages this one deletes.
  • Module pages were anchored on the modules' own docstrings and CLAUDE.md's invariants; symbol names spot-checked against the source (e.g. runtime_for_run's (Runtime, "built"|"present") return, datalad_run_subject, _SITES).
  • No remaining references to any deleted page anywhere in docs/.

Next and last: (5) final polish — check-docs.yml refresh and CLAUDE.md reconciliation (the docs-frozen rules, the design-doc pointer).

🤖 Generated with Claude Code

https://claude.ai/code/session_01DJzmp2MUhwiNHR94cB91dx

The maintainer half of the site, rebuilt for the rebuilt engine.

Architecture is the keystone: the CLI/engine/ASTRA split, the run
pipeline end to end, the two hashes and three states, the storage
model, the exec boundary, the container hatch, venues, and the crate
— CLAUDE.md's invariants translated into narrative for someone who
didn't live the rebuild.

Engine Internals replaces the 17 pages of deleted modules with eleven
hand-written tours of the modules that exist — each with its role,
key symbols, the invariants a change must keep, and where its tests
live. Hand-written on purpose: the engine is not a public API, so
what matters is responsibility and contract, not signatures.

Contributing gets the honest three-command loop (no justfile), the
gated-suite table, a testing page shaped like the suite itself (the
one seam, where each question belongs, the enforcement suite's four
properties, the mutation-check discipline), and a new Extending page
built from the where-does-this-change-belong map.

docs/hpc/ (the site-registry model) and the stale contributing extras
go entirely; the nav follows. zensical now builds with zero issues —
the two warnings that survived passes 1-3 lived in pages this one
deletes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJzmp2MUhwiNHR94cB91dx
@github-actions

Copy link
Copy Markdown
Contributor

✅ Eval

Metric Value
Outputs check success
Agent run success
Turns 34
Tool calls 32
Cost $0.90
Agent wall time 2m38s
Model claude-sonnet-5
lc status
  mode:    direct
  sandbox: landlock (fs: declared, network: allowed)
  crate:   up to date with the outputs

  · current  baseline/best_fit        8942e05
  · current  baseline/hubble_diagram  8942e05
  · current  baseline/residuals       8942e05

3 current
Confusion & pain points (Claude analysis)

Confusion & pain points

  • Script test run failed with ModuleNotFoundError: No module named 'numpy' when invoking python3 directly instead of uv run python3. The agent's own memory ("run inside the project's venv") isn't reflected in any harness nudge — a first-time agent without that instinct would burn a cycle rediscovering that lc/uv projects require the uv run prefix for anything beyond the CLI itself.
  • No real confusion or backtracking otherwise — the agent used the astra skill up front, read data/README.md for the input-declaration convention, validated with astra-tools before committing, and materialized cleanly on the first lc materialize after fixing the one dependency slip. This is a notably clean run.
  • Minor detour probing dataset semantics: the agent ran an ad hoc Python one-liner to check whether the z_min_001 redshift cut was a no-op on this dataset (n with z<=0.01), which is reasonable data validation but shows the spec/decisions grammar (redshift_cut values) isn't self-documenting enough to know its effect without executing code — a decisions: description or comment in astra.yaml could have made this unnecessary.
  • License/publication step was undocumented at spec time: the agent only added license = "CC-BY-4.0" to pyproject.toml after lc status proactively surfaced "crate: not maintained — declare .license to enable it." This is the system correctly guiding the agent rather than a pain point, but it's worth noting the agent had no way to know about the RO-Crate/license linkage except by reading that status line — nothing in the initial astra.yaml or scaffold docs mentioned it.

Full trace: agent-trace artifact on this run.

@EiffL EiffL left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@EiffL
EiffL merged commit 8099d85 into clean_rebuild Aug 21, 2026
10 of 11 checks passed
@EiffL
EiffL deleted the docs-dev-corner branch August 21, 2026 08:55
EiffL added a commit that referenced this pull request Aug 21, 2026
Final pass of the documentation rewrite — no doc pages this time, just
bringing the two things that *govern* the docs in line with their new
reality.

## CLAUDE.md

- **The freeze rule is replaced** by its successor: docs are live (PRs
#185#188), two tracks, and a change lands with its docs — a verb change
updates its `docs/cli/` page, an engine change its `docs/api/` module
page, user-visible behavior the user guide. The docs inherit the
codebase's own discipline: document only what exists, quote refusals
from real runs, verify command blocks by executing them.
- **The design-doc pointer** now records the decision taken during this
rewrite: the design records stay in the sibling checkout and are
**dropped when the rebuild completes** — never imported into `docs/`
(reverses the paragraph's earlier plan).
- **The workflow inventory** catches up: eval runs on dispatch or the
`run-eval` label (re-trigger by re-adding it), `check-docs.yml` reviews
merged PRs, `docs-deploy.yml` tracks releases; the docs build command is
stated.
- The extending table's "add the next layer" row loses "Docs are
deliberately deferred".

Deliberately **not** done: slimming CLAUDE.md's invariant sections now
that the developer corner overlaps them. CLAUDE.md is still the working
memory for the remaining rebuild (Perlmutter spike, deferred layers),
and gutting it mid-rebuild trades a known-good reference for dedup.
Worth revisiting when the rebuild closes and the design docs drop.

## check-docs.yml

The post-merge doc-drift check was written before the freeze and knew
nothing about the structure. Its prompt now carries:
- a **map from change kind to doc home** (verb → `docs/cli/`, module →
`docs/api/` + architecture, user-visible → user guide + README,
workflow/conventions → contributing);
- the two failure modes that matter most for these docs: **quoted
console output drifting** from what the CLI prints, and **documenting
anything the code no longer delivers** (the no-foreshadowing rule
applied to docs);
- an updated skip list (CLAUDE.md and `evals/` are maintained
separately) replacing the stale `skills/` rule.

## Verification

- `zensical build`: zero issues.
- check-docs.yml validates as YAML.
- Grep for `frozen`/stale workflow descriptions in CLAUDE.md comes back
clean.

This closes the 5-PR docs rewrite. The site deploys with the next
release (or a manual `docs-deploy` dispatch).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DJzmp2MUhwiNHR94cB91dx

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant