Skip to content

Morphogen as the kit, phase 2: cells into catalog entities, morphogen.yaml removed - #103

Merged
OpenReplicant merged 6 commits into
mainfrom
claude/kit-cells
Nov 25, 2026
Merged

OpenReplicant merged 6 commits into
mainfrom
claude/kit-cells

Conversation

@OpenReplicant

Copy link
Copy Markdown
Owner

What changed

Phase K2 of the kit (PLAN.md): the cell format is read from the project's Backstage catalog, and morphogen.yaml is gone (no back-compatibility; the owner chose a clean product).

  • Root: catalog-info.yaml at the repository root; it may be a Location whose targets are other files inside the project.
  • Cell rules: spec.morphogen on the entity a cell judges. No run (and no tests) means structure, not a judged cell. A sub-grain cell is a Component with spec.subcomponentOf (becomes in).
  • Interface tests: spec.morphogen.tests (and external) on the API entity.
  • Settings and defaults: trunk, sandbox, sandbox_image, budget, autonomy and defaults on the System. defaults replace YAML anchors. More than one System carrying settings is an error. Settings on any other kind are an error.
  • Options and roles: spec.lifecycle: candidate and spec.type: role are never cells.
  • Removed: the overlay merge, FILE = "morphogen.yaml", the backstage: key, the morphogen.dev/* annotations, and every mention in code, CLI/MCP help, status messages, docs, skills and schema text. morphogen.local.yaml and a request's local: are unchanged.
  • Schema renamed to schemas/morphogen-spec.v1.json and brought to what the code accepts. The parity test now covers cell, API, System settings and option fields, and the union.

Integrity (the judge reads rules from the base commit only)

Every catalog file read (the root and each Location target) is a rule file: a candidate that changes, adds or removes one is refused, as morphogen.yaml was. Settings are read from the base commit's System through git show, never the working copy.

Tests added (tests/test_backstage.py, CatalogCheats, on a project whose catalog is split over a root, catalog/components.yaml and catalog/apis.yaml):

  • editing a cell's spec.morphogen in a components file is refused, naming the file;
  • editing the root's System settings is refused;
  • dropping the interface from the catalog, and removing an API's tests, are refused;
  • adding a Location target (with the new file), adding a catalog file the root does not yet name, removing a target, and renaming one away are refused;
  • settings come from the base: a candidate's System says sandbox: none and a larger budget, checked out and loaded from the working copy, rules_config still returns the base's values and the judge refuses the root edit;
  • a catalog file the root does not name, which a cell may change, is judged normally (and is not in rule_files); the same file with no cell allowing it is default-denied;
  • change: ** still cannot reach the catalog files; a broken catalog on the base is refused by file name.

Also: options and roles skipped, two Systems with settings refused, settings on non-Systems refused, defaults inheritance (through subcomponentOf, null opts out, the System itself when it has rules of its own), sub-grain cells, API tests, name collisions.

All existing protection tests in test_redteam.py, test_judge.py, test_change.py pass with fixtures moved to catalog form (tests/catalog.py keeps the dict authoring form and commits it as a catalog).

How each demo moved

  • entity-resolution: one catalog-info.yaml. er is now a System (it is "the resolver as a whole"), so it can carry the F1 workload as defaults (run, score, better, rounds, timeout), which replaces the YAML anchor. blocking, matcher, backend, clustering are Components in it with the same change, keep, bounds and measures. speed is a Component with subcomponentOf: matcher and its own rules, with score: null to opt out of the inherited scorer. resolver API carries its tests and external: consumes. A test checks the same shape, parameters, metrics and tests as before.
  • cognitive-model: structure only (no runs). rebuild-6-map/to_cells.py now writes the catalog; names with a slash (wm/buffer-goal) are Backstage namespaces, so the cell names are unchanged. I checked that all 112 cells, their in, provides, consumes, descriptions and interfaces equal the old file's.
  • demos/catalog: only a BRIEF; nothing to move.
  • dogfood and .github/workflows/morphogen.yml: they do not read morphogen.yaml (the workflow calls the pinned rebuild-8 judge with .morphogen/policy.json), so nothing needed to move. If a judge workflow on this PR does read morphogen.yaml from main, the first run judges against main's old format, as expected.

Tests

  • uv run --extra optuna --extra gepa python -m unittest discover -s tests -t .: 283 tests, OK (12 skipped: the container-only cases).
  • MORPHOGEN_TEST_SANDBOX=podman full suite: OK (277 run, 5 skipped), Podman ran.
  • claude plugin validate . and .claude-plugin/plugin.json: pass with warnings.
  • No A/A check was run: the judge's statistics did not change.

Unsure / judgment calls

  • Cells are named by metadata.name (namespace/name outside default), not by full refs; two cell entities of different kinds with one name (a System and a Component both x) is an error. Verdict subjects stay cell:classify.
  • defaults also apply to the System itself when it has cell rules of its own (needed for er), but not to a System that only carries settings. defaults apply only to entities that have a spec.morphogen block.
  • score: null as the opt-out from a default is my addition; the JSON schema documents it in the description, not as a nullable type.
  • Status no longer says "backstage: named"; it reports sources.catalog.{read,found} and lists catalog files the root does not name.
  • Not done from the K2 list: checking a cell's settings against an option's parameters schema (nothing in the judge reads options yet). PLAN.md says so.
  • Stacked on Morphogen as the kit, phase 1: skills, docs and the spec.morphogen schema #102 as asked; Morphogen as the kit, phase 1: skills, docs and the spec.morphogen schema #102 has since merged, so this is based on main (the merge commit adds nothing).

🤖 Generated with Claude Code

…ckstage entities, morphogen.yaml removed (K2)

The root is catalog-info.yaml; Location targets are followed. A cell's rules are spec.morphogen on its entity, an API's tests on the API, the project's settings and shared defaults on the one System that carries them. Options (lifecycle: candidate) and roles (type: role) are never cells. Cells are named by metadata.name (namespace/name outside default). The settings the judge uses are read from the base commit's catalog through git.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Khsqyv3JB21BJ91MipHNhp
… to catalog form

The root and each Location target are rule files. Tests (red team first): a candidate editing a cell's spec.morphogen in any catalog file, adding a Location target or a catalog file the root will read, or removing a target is refused; a catalog file the root does not name is judged normally; settings come from the base's System. Fixtures keep a dict authoring form (tests/catalog.py) and commit it as a catalog. The spec-schema parity test now covers the System settings, the API and the option fields.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Khsqyv3JB21BJ91MipHNhp
…a project with no catalog

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Khsqyv3JB21BJ91MipHNhp
… defaults carry the F1 workload) and cognitive-model (generated)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Khsqyv3JB21BJ91MipHNhp
… renamed to v1, map and morphogen skills write cells into the catalog

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Khsqyv3JB21BJ91MipHNhp
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Khsqyv3JB21BJ91MipHNhp
@OpenReplicant
OpenReplicant deployed to morphogen-judge November 25, 2026 00:24 — with GitHub Actions Active
@OpenReplicant
OpenReplicant deployed to morphogen-judge November 25, 2026 00:24 — with GitHub Actions Active
@OpenReplicant
OpenReplicant merged commit 63648ca into main Nov 25, 2026
4 of 5 checks passed

This branch was successfully deployed

1 active deployment
morphogen-judge — 00f2ca8e Deployed Nov 25, 2026 by OpenReplicant via judge / score #28
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