Skip to main content

ADR-0002: Consumer rails and workspace extensions

  • Status: Accepted
  • Date: 2026-09-26
  • Deciders: Michel Gillet

Context​

Greenfield (eai-supinit) and migration (eai-supmig) workspaces must converge on the same language-agnostic hygiene: pre-commit, gitlint, .gitignore, root CHANGELOG.md, ADR pack + AGENTS.md + README.md, and a basic .esysrepo.manifest.xml. Stack-specific tooling (cmake-format, Ruff, clang-format) must not bloat bootstrap defaults for a multi-repo that is language-independent at the root.

Decision​

  1. eai-supcore.scaffold_consumer_dev_rails owns baseline consumer rails. Both CLIs call it from bootstrap (defaults: hooks + manifest on).
  2. Templates live under method-tree templates/consumer/ (and templates/extensions/<id>/), with identical copies bundled in eai_supcore.data for installs without a tools/ai-rules mount. Resolution prefers the mount.
  3. scripts/setup-dev.py is the single cross-platform setup entry (no .sh/.ps1 pair for consumers). Optional --install-hooks runs it during bootstrap.
  4. Extensions are post-bootstrap and composable. CLI surface:
    • extension list|add|status (docs / beginners)
    • ext list|add|status (short alias; same handlers)
  5. Applied extensions are recorded in shared .tools/esys/eai-supcore/extensions.yaml (eai-supcore tool-state root; visible to both CLIs).
  6. First extensions: cmake (cmake-format + cmake-lint); license (root LICENSE.txt from an indexed SPDX menu — MIT default).

Consequences​

  • Bootstrap stays language-agnostic; operators opt into stack hooks via extension add.
  • Doctor reports rails presence and extension drift.
  • Future ids (python, cpp, …) plug into the same registry without new bootstrap flags.
  • extension add license shows a numbered SPDX menu (or --index / --spdx); extension licenses lists the catalog without applying.

References​