Repository navigation
Morphogen as the kit, phase 2: cells into catalog entities, morphogen.yaml removed - #103
Merged
Merged
Conversation
…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
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Phase K2 of the kit (PLAN.md): the cell format is read from the project's Backstage catalog, and
morphogen.yamlis gone (no back-compatibility; the owner chose a clean product).catalog-info.yamlat the repository root; it may be aLocationwhose targets are other files inside the project.spec.morphogenon the entity a cell judges. Norun(and no tests) means structure, not a judged cell. A sub-grain cell is a Component withspec.subcomponentOf(becomesin).spec.morphogen.tests(andexternal) on the API entity.trunk,sandbox,sandbox_image,budget,autonomyanddefaultson the System.defaultsreplace YAML anchors. More than one System carrying settings is an error. Settings on any other kind are an error.spec.lifecycle: candidateandspec.type: roleare never cells.FILE = "morphogen.yaml", thebackstage:key, themorphogen.dev/*annotations, and every mention in code, CLI/MCP help, status messages, docs, skills and schema text.morphogen.local.yamland a request'slocal:are unchanged.schemas/morphogen-spec.v1.jsonand 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.yamlwas. Settings are read from the base commit's System throughgit show, never the working copy.Tests added (tests/test_backstage.py,
CatalogCheats, on a project whose catalog is split over a root,catalog/components.yamlandcatalog/apis.yaml):spec.morphogenin a components file is refused, naming the file;sandbox: noneand a larger budget, checked out and loaded from the working copy,rules_configstill returns the base's values and the judge refuses the root edit;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.pypass with fixtures moved to catalog form (tests/catalog.pykeeps the dict authoring form and commits it as a catalog).How each demo moved
catalog-info.yaml.eris now a System (it is "the resolver as a whole"), so it can carry the F1 workload asdefaults(run, score, better, rounds, timeout), which replaces the YAML anchor.blocking,matcher,backend,clusteringare Components in it with the samechange,keep, bounds and measures.speedis a Component withsubcomponentOf: matcherand its own rules, withscore: nullto opt out of the inherited scorer.resolverAPI carries its tests andexternal: consumes. A test checks the same shape, parameters, metrics and tests as before.rebuild-6-map/to_cells.pynow 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, theirin,provides,consumes, descriptions and interfaces equal the old file's..github/workflows/morphogen.yml: they do not readmorphogen.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 readmorphogen.yamlfrom 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=podmanfull suite: OK (277 run, 5 skipped), Podman ran.claude plugin validate .and.claude-plugin/plugin.json: pass with warnings.Unsure / judgment calls
metadata.name(namespace/nameoutsidedefault), not by full refs; two cell entities of different kinds with one name (a System and a Component bothx) is an error. Verdict subjects staycell:classify.defaultsalso apply to the System itself when it has cell rules of its own (needed forer), but not to a System that only carries settings.defaultsapply only to entities that have aspec.morphogenblock.score: nullas the opt-out from a default is my addition; the JSON schema documents it in the description, not as a nullable type.sources.catalog.{read,found}and lists catalog files the root does not name.parametersschema (nothing in the judge reads options yet). PLAN.md says so.main(the merge commit adds nothing).🤖 Generated with Claude Code