Skip to content

refactor(lang): make composition the canonical name; deprecate compose#760

Open
kunyuan wants to merge 2 commits into
mainfrom
refactor/composition-canonical
Open

refactor(lang): make composition the canonical name; deprecate compose#760
kunyuan wants to merge 2 commits into
mainfrom
refactor/composition-canonical

Conversation

@kunyuan

@kunyuan kunyuan commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Step 1 of #759.

What

Flips the canonical/alias relationship between compose and composition (the alias already existed; this PR only changes which name is the real one):

  • gaia.engine.lang: composition() is now the real decorator; compose() is a thin delegating wrapper that emits DeprecationWarning. Both stay importable; no package breaks.
  • CLI: gaia author composition is the canonical file-based verb. gaia author compose still works and now carries 'gaia author compose' is deprecated; use 'gaia author composition' in the envelope warnings.
  • SDK cheatsheet: composition shown as canonical; also fixes the previously misleading compose(action_a, action_b) example (that call shape never existed).
  • Docs: docs/reference/cli/author.md, docs/foundations/gaia-lang/knowledge-and-reasoning.md, docs/for-users/language-reference.md flipped to composition-first.
  • Tests: existing composition tests author with @composition; new regression test pins the DeprecationWarning + alias delegation. gaia_help baseline snapshot re-recorded (author verb list wording).

Why

compose reads as the inverse of decompose, which it is not — decompose is a claim-level structural equivalence, while this decorator builds an action-level composition template. gaia lang has genuine dual pairs (land/lor, forall/exists, implies/iff), so the morphological pairing actively teaches a wrong mental model. Full analysis in #759; the noun composition also reads naturally once generalize lands as a blessed composition pattern (step 2).

Gates

  • ruff check . + ruff format --check . clean (tracked files)
  • mypy --strict clean on touched files
  • pytest -n auto -m 'pr_gate and not slow': 1162 passed
  • all 45 help snapshots pass

🤖 Generated with Claude Code

LittleBug and others added 2 commits June 10, 2026 10:28
The verb-form alias compose reads as the inverse of decompose, which it
is not: decompose is a claim-level structural equivalence, while this
decorator builds an action-level composition template. Flip the
canonical/alias relationship so the noun composition is the one true
name (step 1 of #759):

- runtime/composition.py: composition() is now the real decorator;
  compose() is a thin wrapper emitting DeprecationWarning.
- gaia author composition is the canonical CLI verb; the compose verb
  still works but surfaces a deprecation warning in the envelope.
- SDK cheatsheet, author/CLI help text, and docs present composition
  as canonical and fix the misleading compose(action_a, action_b)
  example; gaia_help baseline snapshot re-recorded accordingly.
- Tests author with @composition; a new regression test pins the
  DeprecationWarning and the alias delegation.

Refs #759

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Follow-up review pass on the compose→composition flip:

- author list: the compositions section now reports kind=composition
  (was kind=compose; no test or doc pinned the old value).
- author compose --interactive help no longer claims the verb surfaces
  no warnings — the deprecated alias now carries an envelope notice.
- compose.py module docstring: CLI surface example and verb inventory
  now lead with composition.
- gaia-formalize-fine skill (SKILL.md, pass-2, pass-4): all authoring
  guidance now teaches gaia author composition / @composition; this is
  the surface agents learn the verb from.

Refs #759

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kunyuan kunyuan mentioned this pull request Jun 19, 2026
39 tasks
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.

2 participants