Skip to content

feat: add IR tooling — gen eject codegen and the crucible CLI#158

Merged
joshua-temple merged 6 commits into
mainfrom
feat/crucible-cli
Jun 14, 2026
Merged

feat: add IR tooling — gen eject codegen and the crucible CLI#158
joshua-temple merged 6 commits into
mainfrom
feat/crucible-cli

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

What this change does

Adds the headless IR tooling — the backbone a visual editor will eventually sit on — as two new, independently-versioned modules:

  • gen — an "eject" codegen. gen.Eject turns a machine's IR into typed Go stub source: a context type derived from the IR's ContextSchema, a panic("TODO")-bodied stub for every behavior the IR references (typed to the engine's exact guard/action/assign/service signatures), and a Provide(reg) that registers each stub by name so the IR binds. Output is gofmt'd and deterministic. A test writes the generated source into a temp module and go builds it against state, proving the stubs compile and wire.
  • cmd/crucible — an IR command-line tool with lint (analysis), render (Mermaid/DOT), diff (evolution semver classification), validate, and eject (via gen). Structural commands work without real behaviors by binding deterministic no-op stubs for every referenced name, so a definition can be inspected, rendered, and analyzed straight from its IR.

Why

This is the contract-consuming half of crucible's IR story: it exercises the IR, palette, analysis, and evolution surfaces, which is what proves those contracts are sufficient before the 1.0 freeze. Both modules version independently and are not part of the state v1 frozen surface.

Relates to: 1.0 IR tooling

Checklist

  • Commits are signed off (git commit -s) per the DCO
  • Conventional commit messages (type: subject)
  • mage check equivalent passes locally — both new modules pass go build, go test, and golangci-lint; the workspace builds.
  • Tests added/updated for the change
  • Public API documented (godoc + module READMEs/changelogs)

@joshua-temple joshua-temple force-pushed the feat/palette-completeness branch from 9a26432 to 0567672 Compare June 14, 2026 02:13
Base automatically changed from feat/palette-completeness to main June 14, 2026 02:13
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple merged commit 58e529c into main Jun 14, 2026
@joshua-temple joshua-temple deleted the feat/crucible-cli branch June 14, 2026 02:14
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