Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions BRIEF.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ what it taught. Issue numbers (#43, #45) refer to this repository's history.

**What it is now: the kit, with the judge at its core.** Morphogen maps a system, researches and catalogues the
options for each role, and optimises behind its judge, on files only, on any harness. The map, the options and
(in phase 2) the cells are all Backstage catalog entities, with Morphogen's own fields under one namespaced key,
the cells are all Backstage catalog entities, with Morphogen's own fields under one namespaced key,
`spec.morphogen`; documentation is fetched into markdown files. The judge stays the core and stays independent:
the skills that write the map and the catalog write what the judge reads from the base commit, and no candidate
may touch it. Everything below about the judge, the cell and the optimizers is unchanged. **Coming, phase 2:** the
cell format moves from `morphogen.yaml` onto the entities (draft: `schemas/morphogen-spec.v0.json`); until then
`morphogen.yaml` is what the judge reads.
may touch it. Everything below about the judge, the cell and the optimizers is unchanged. The cell format
is `spec.morphogen` on the entity a cell judges (`schemas/morphogen-spec.v1.json`), read from the project's
`catalog-info.yaml`: there is no other project file.

**Where it sits.** The Knowledge Kernel is an optional layer above the kit: it ingests the same Backstage files when
someone wants indexing, search or graph traversal, and the kit never requires it. Substrate is the default
Expand Down Expand Up @@ -173,8 +173,8 @@ Morphogen needs cells, not a system structure. A mapper helps when there are man
changes cross interfaces, or when intent is missing from the code. Without one, start by
measuring:

1. **One cell by hand.** Name what may change, its existing tests and a measure: one cell in
`morphogen.yaml` and nothing else (rebuild 6 ran this way, with a `target.yaml`).
1. **One cell by hand.** Name what may change, its existing tests and a measure: one cell
(`spec.morphogen` on one catalog entity) and nothing else (rebuild 6 ran this way, with a `target.yaml`).
2. **Or profile first.** Run the system under its tests or workload with outside observation (a
profiler offline, OBI live). The hot spots, by time, cost or errors, become candidate cells.
An agent drafts each cell from what is already there (location, modality, tests it finds);
Expand Down Expand Up @@ -307,7 +307,7 @@ secondary reports; read the paper before quoting them).
Strategy:

1. **Allowed alternatives are a setting's choices.** No new concept: a `change` entry whose
choices are set in `morphogen.yaml` at the base commit, where no candidate can change them.
choices are set in the catalog at the base commit, where no candidate can change them.
Adding a choice is an operator change, with its evidence attached:

```yaml
Expand Down
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ docs/restart/LESSONS.md.
- `morphogen/`: the core. `structure.py` (cells, interfaces, parameters; checks, scopes,
boundaries, intended against observed), `render.py` (Mermaid), `judge.py` and `runner.py` (the
judge), `serve.py` (the env values, services and model gateway a run is given; the meter), `errors.py`, `evidence.py`, `optimize.py` (the optimizer catalog, the selector and `tune`), `observers.py` (`command`,
`otel`), `project.py` (the cell format: morphogen.yaml's cells and interfaces, default deny),
`backstage.py` (catalog-info.yaml files as a source of cells),
`otel`), `project.py` (the cell format: `spec.morphogen` on the catalog's entities, default deny),
`backstage.py` (the catalog: `catalog-info.yaml` and its Location targets, read into cells, interfaces and settings),
`status.py` (where a project stands and the next step),
`documents.py` (morphogen.yaml's settings, and the target spec a cell compiles to), `request.py` (one document in, one verdict out), `intake.py` (the judge held by another user: a candidate arrives as a git bundle), `cli.py`, `mcp_server.py`, `ui.py` and `ui.html` (the read-only web UI).
`documents.py` (the project's settings, from the System's `spec.morphogen`, and the target spec a cell compiles to), `request.py` (one document in, one verdict out), `intake.py` (the judge held by another user: a candidate arrives as a git bundle), `cli.py`, `mcp_server.py`, `ui.py` and `ui.html` (the read-only web UI).
- `.claude-plugin/`, `skills/`, `agents/`: the Claude Code plugin around the MCP server. Skills (the kit):
`morphogen` (improve a cell), `map` (take a system apart into Backstage entity files and draft cells),
`catalog` and `research` (options for a role, as `lifecycle: candidate` Components). `schemas/morphogen-spec.v0.json`
is the draft of the `spec.morphogen` fields; phase 2 loads them, morphogen.yaml still works until then.
`catalog` and `research` (options for a role, as `lifecycle: candidate` Components). `schemas/morphogen-spec.v1.json`
is the schema of the `spec.morphogen` fields the code loads (a test keeps them equal).
- `tests/`: the core's tests and red team; fixture projects in `tests/fixture*.py`, the timed
sample's files in `tests/fixtures`.
- `demos/`: projects Morphogen can build and drive. The core never imports from them.
Expand Down Expand Up @@ -64,7 +64,7 @@ judge callable by any system and tests the value claims before it is published;
into it.

1. Design simplifications left: probe as a mode of the judge. Done: one structure document
(morphogen.yaml, phases 1-2), one kind of "still works" test (`tests`, `same_as_base`).
(the catalog, phases 1-2), one kind of "still works" test (`tests`, `same_as_base`).
2. Optimizers that escape local optima: done (hill-climb restarts, `anneal`, the selector's
stagnation signal). Later: a stepping-stone archive and multi-step candidates.
3. The entity-resolution demo as the first real run: move its F1 into a scorer outside the
Expand Down
20 changes: 11 additions & 9 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
## The kit: the way there

Everything committed becomes a Backstage catalog entity; Morphogen's own fields go under one key,
`spec.morphogen` ([schemas/morphogen-spec.v0.json](schemas/morphogen-spec.v0.json), a draft). An option for a role
`spec.morphogen` ([schemas/morphogen-spec.v1.json](schemas/morphogen-spec.v1.json), a draft). An option for a role
is a `Component` with `spec.lifecycle: candidate`; a cell's rules go on the entity it judges; sub-grain cells are
`Component`s nested with `subcomponentOf`; an interface's tests go on its `API`; settings and shared defaults go on
the `System`. `morphogen.local.yaml` stays as it is.

- **K1, skills and schema (this pull request, #102).** README, BRIEF and the skills say what Morphogen is now; the
`map` skill is merged with Substrate's and writes entity files; new `catalog` and `research` skills; the draft
schema. No code behaviour changes; `morphogen.yaml` still works. Open check before K2: that Backstage's `API` and
schema. No code behaviour changes. Open check before K2: that Backstage's `API` and
`System` kinds leave `spec` open the way `Component` does.
- **K2, cells into entities.** Load `spec.morphogen` from the catalog files; check a cell's settings against its
option's parameter schema; default deny covers every catalog file the judge reads (a red-team test across files
first); `morphogen.yaml` is removed with **no back-compatibility**, since only our own projects use it (Substrate,
the demos), and they are moved by hand. Decide whether `lifecycle: candidate` entities are skipped as cells.
- **K2, cells into entities (the pull request stacked on #102).** Done: `spec.morphogen` is loaded from the project's
catalog (`catalog-info.yaml` at the root and the `Location` targets it names); every catalog file the judge reads
is a rule file (a candidate that changes, adds or removes one is refused; red-team tests across files); settings and
`defaults` are the System's, read from the base; options (`lifecycle: candidate`) and roles (`type: role`) are
never cells; `morphogen.yaml` is removed with **no back-compatibility**, and the demos are moved by hand. Not done:
checking a cell's settings against its option's `parameters` schema (nothing in the judge reads options yet).
- **K3, documentation as files.** A documentation MCP server that turns web documentation into markdown files,
chosen with the `research` skill (a local one first: a hosted one sends what is looked up off the machine). Its
output is a folder of markdown beside the catalog, named in each option's `docs.path`.
Expand Down Expand Up @@ -145,7 +147,7 @@ cell file, and judges the same as before.

Done: the demo is split that way and compiles to the same structure as before (a test). It cannot be
judged until phase 6 makes its data reachable, so "judges the same" is shown on the structured
classifier instead: described half in a catalog, it reaches the same verdicts as in morphogen.yaml
classifier instead: described in a catalog split over files, it reaches the same verdicts as in one file
alone. Red team: a candidate that weakens the catalog (drops an API) for later judgments is refused,
even when `change` is `**`; it passed the judge before catalog files were made the judge's.

Expand Down Expand Up @@ -217,7 +219,7 @@ Each item is one pull request; the ones that change the judge start with their c
and end with the suite passing locally and in Podman, and an A/A check.

- **7a. One request in, one verdict out.** The judge's input, written down as one document: the base
and candidate commits, the cells and interfaces (from `morphogen.yaml`, `catalog-info.yaml`, or a
and candidate commits, the cells and interfaces (from the project's `catalog-info.yaml`, or a
request file a caller writes from its own store), `inputs`, and the local settings. Its output: the
verdict record, with a published, versioned schema (the evidence log's canonical JSON and hash
chain included), so a caller verifies a log without copying Morphogen's code.
Expand Down Expand Up @@ -282,7 +284,7 @@ extras or leave it (7d); where the two demos go (7f); and what 7e's result means
- Domain modules around a shared knowledge base, joined by the resolver.

## Decisions (operator, 2026-11-05)
1. **One file:** the cell format and project settings live in `morphogen.yaml` at the root;
1. **One file:** the cell format and project settings live in the catalog (`catalog-info.yaml` at the root);
held-out paths, budget overrides and the sandbox in an uncommitted `morphogen.local.yaml`.
2. **The old format** (`target.yaml` plus `cells.yaml`) is removed after phase 2.
3. **The field is `change`.**
Expand Down
Loading