Skip to content

docs: branch-naming convention and the ergoExo contract in CLAUDE.md - #331

Merged
joglekara merged 1 commit into
mainfrom
claude/adept-claude-md-docs-5d74c7
Aug 10, 2026
Merged

docs: branch-naming convention and the ergoExo contract in CLAUDE.md#331
joglekara merged 1 commit into
mainfrom
claude/adept-claude-md-docs-5d74c7

Conversation

@joglekara

@joglekara joglekara commented Aug 10, 2026

Copy link
Copy Markdown
Member

Writes down two rules that were tribal knowledge, so agents and new contributors pick them up without being told.

Branch names

Branches and commit scopes are named after the solver being touched — the convention already visible in the log (feat/vlasov1d-dougherty-nodrag, fix/vlasov1d-v0-units, feat(vlasov1d): ...). Repo-wide work with no solver uses the area instead: ci/, docs/, chore/.

Everything is built on ergoExo

Solvers are never invoked directly, so the section records the contract rather than just naming it: the ADEPTModule lifecycle calls in the order ergoExo#_setup_() and ergoExo#__call__() make them, plus the constraints that follow from that order.

  • a later step can only read what an earlier step built — a term needing a coefficient array can't first appear in init_state_and_args() if nothing put it in cfg during get_solver_quantities()
  • the scalar/array split between get_derived_quantities() and get_solver_quantities() is load-bearing: the former's cfg goes to MLflow param logging, which arrays break
  • gradients go through vg(), which raises unless the module implements a metric
  • _get_adept_module_ is a hand-written registry with no autodiscovery, keyed per runnable module rather than per directory — vlasov-1d and vlasov-1d-iaw both live in _vlasov1d

Relationship to dev_guide.md

#330 rewrote docs/source/dev_guide.md around this same lifecycle, so CLAUDE.md deliberately does not carry a second copy of the "adding a solver" list — it points at dev_guide.md as canonical. Two doc sources drifting apart is the trap #330 called out about Read the Docs, and it applies here too.

What CLAUDE.md keeps in its own words is the lifecycle order and the failure modes above, because CLAUDE.md is always in an agent's context and dev_guide.md is not.

The one step dev_guide.md was missing is added to it directly: a paths filter and a test job in .github/workflows/cpu-tests.yaml. CI only runs suites for solvers it detects as changed (#302), so a new tests/test_<solver>/ without them silently never runs.

Docs only, no code changes.

One thing to settle: this branch is claude/adept-claude-md-docs-5d74c7, which the new rule would have as docs/.... The claude/* names are harness-generated — worth an explicit exemption in the convention if that's fine as-is.

🤖 Generated with Claude Code

@joglekara
joglekara force-pushed the claude/adept-claude-md-docs-5d74c7 branch from fa032b3 to 7300e36 Compare August 10, 2026 15:37
Two rules that were tribal knowledge:

- branches and commit scopes are named after the solver being touched
  (`feat/vlasov1d-...`, `feat(vlasov1d): ...`), with `ci/`/`docs/`/`chore/`
  for repo-wide work
- solvers run only through ergoExo, so record the lifecycle order and the
  constraints it implies: later steps read only what earlier ones built, the
  scalar/array split between get_derived_quantities and get_solver_quantities
  exists because the former is logged to MLflow, vg() raises without a metric,
  and _get_adept_module_ is a hand-written registry keyed per runnable module
  rather than per directory (vlasov-1d and vlasov-1d-iaw share a directory)

dev_guide.md, rewritten around the same lifecycle in #330, stays the canonical
step-by-step for adding a solver; CLAUDE.md points at it instead of keeping a
second copy of the list to drift against. Adds the one step it was missing:
the paths filter and job in cpu-tests.yaml, without which a new solver's tests
silently never run in CI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@joglekara
joglekara force-pushed the claude/adept-claude-md-docs-5d74c7 branch from 7300e36 to af63b26 Compare August 10, 2026 15:43
@joglekara
joglekara merged commit 4bbec92 into main Aug 10, 2026
11 checks passed
@joglekara
joglekara deleted the claude/adept-claude-md-docs-5d74c7 branch August 10, 2026 15:49
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