Skip to content

refactor(core): rename state → lifecycle (CLI, module, types, branch) - #154

Merged
lex00 merged 1 commit into
mainfrom
refactor/state-to-lifecycle-core
Jun 2, 2026
Merged

lex00 merged 1 commit into
mainfrom
refactor/state-to-lifecycle-core

Conversation

@lex00

@lex00 lex00 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

First of the lifecycle-rename series (BYOL positioning: "Pluggable lexicons in. Pluggable lifecycles out. Pure synthesis in the middle."). chant has no customers, so this is the clean rename — no back-compat alias for the old command, but a short lc alias for ergonomics.

Source renames

  • CLI: chant state … → chant lifecycle … (snapshot/show/diff/plan/log); chant lc … alias resolved in the registry.
  • Module: packages/core/src/state/ → packages/core/src/lifecycle/.
  • Types/helpers: StateSnapshot→LifecycleSnapshot, StaleStateBranchError→StaleLifecycleBranchError, fetchState/pushState/getRemoteStateBranchSha→fetch/push/getRemoteLifecycleBranchSha.
  • Orphan branch: chant/state → chant/lifecycle.
  • MCP tools: state-snapshot/state-diff → lifecycle-snapshot/lifecycle-diff.
  • Command-string callers: the temporal lexicon activities that shell out to the CLI now call chant lifecycle … (their function names stateSnapshot/stateDiff are renamed in the next PR).

Kept on purpose

The artifact name "state file" — the thing chant declines to host — stays; only the framing noun changes.

Tests

Added lc-alias resolution tests; fixed the MCP tool-name ordering assertion. Full suite green: 6033 passed / 5 skipped, core typecheck clean.

Next: PR2 renames the Op activities (stateSnapshot/stateDiff → lifecycleSnapshot/lifecycleDiff); PR3 the docs; PR4 a "Contributing a Lifecycle" guide.

Plant the "lifecycle" flag in source: chant's framing noun moves from "state"
to "lifecycle" (BYOL positioning). No customers, so a clean rename with no
back-compat alias for the old command — but a short `lc` alias for ergonomics.

- CLI: `chant state …` → `chant lifecycle …` (snapshot/show/diff/plan/log),
  with `chant lc` as an alias resolved in the command registry.
- Module: packages/core/src/state → packages/core/src/lifecycle.
- Types: StateSnapshot → LifecycleSnapshot; StaleStateBranchError →
  StaleLifecycleBranchError; fetchState/pushState/getRemoteStateBranchSha →
  fetch/push/getRemoteLifecycleBranchSha.
- Orphan branch: chant/state → chant/lifecycle.
- MCP tools: state-snapshot/state-diff → lifecycle-snapshot/lifecycle-diff.
- All `chant state …` command strings updated, including the temporal lexicon
  activities that shell out to the CLI (their function names — stateSnapshot/
  stateDiff — are renamed separately).

The artifact name "state file" (the thing chant declines to host) is kept;
only the framing noun changes. Op activity function names land in a follow-up.
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