Concept · shapes
Use when
You start, edit, check, compare, publish or discard a change to a Shape.
For
A draft holds one change to a Shape until you publish it. You pull the definition into a file, edit the file, and push it back. Penumbra turns the difference into edits of the draft. Each push makes a new draft revision. A publish turns one revision into a new version of the Shape.Use when
- A person wants a type, a property or a relationship added, changed or removed.
- You want to see what a change would do before it is public.
- You want your own copy of a public Shape and its types.
Not this
- Looking at the types of a published Shape, or adopting one: use card Shape.
- Giving an entity a new value: use card Entity.
- Abandoning a published version: no command does this (rule shape.1).
Rules
shape-draft.1Start from the right source.penumbra shapes edit <shape>opens an edit draft that publishes as the next version of that Shape.penumbra shapes newstarts a new Shape:--blank --name <name>to start empty, or--brief <text>to generate one.penumbra shapes fork <shape>copies a Shape into a new one. For a public Shape, give<publisher>/<shape>. A brief can add Files with--from <file>and Shapes with--like <shape>for the draft to fit. Your job: use an edit for the same Shape. A fork is a new Shape, and the entities of the original stay with the original.shape-draft.2Push a file with the revision it was pulled at. Enforced when you ask: a pulled file carries a source field with the draft and its revision. If the draft moved on, the push is refused withrevision_conflict(exit code 3). Pull again and reapply your edits. With--draft <other-draft-id>, nothing checks the revision.shape-draft.3After a push, the file follows its draft. A file that you pulled from a published Shape starts a new edit draft at the first push. Your job: push the same file again to keep editing that draft, and keep the draft id that the push printed. Enforced: the Shape can already have an open draft. Then a push of a file that still names the published version is refused withdraft_already_open, and nothing is sent. Runpenumbra shapes pull <draft-id>to see that draft, or push again with--into-open-draftto replace it with your file.shape-draft.4Check the revision that you plan to publish.penumbra shapes check <draft-id>validates the draft at its current revision. It exits with code 3 and lists diagnostics when the draft is not valid. Enforced: a draft is not valid when the Shape states no purpose (telos.purpose). It is not valid when a type’s name or description field holds a list or an object. Extraction reads every File through the purpose, and the Graph shows the name and description fields as one value each. Your job: write the purpose intelos, not only indescription. Check again after each push, because a push makes a new revision.shape-draft.5Read the diff before you publish.penumbra shapes diff <draft-id>compares the draft with the version it started from. It lists each change with its impact and a recommended bump, and the tools agents would get. It deploys nothing and changes no entity. Your job: for a change marked losing or breaking, or any rename, entities stay on their old version (rule shape.4).shape-draft.6A publish needs a message. Enforced:penumbra shapes publishwithout-mis refused withinvalid_option. The message is up to 2000 characters, andpenumbra shapes logshows it. Your job: say what changes in the version.shape-draft.7A publish does not wait for approval under the default policy. Enforced: an owner or admin can addshape_changeto the policy. Then a publish by an API key or a connected agent returnspending(exit code 4) with an approval URL. Do not publish again. A person’s own session never waits. The key also needs the scopeshapes.draft.publish.shape-draft.8A publish can end in a state other than published. Your job: if the output sayspreparedorreconciling, the server finishes it. Read the draft withpenumbra shapes show <draft-id>until it says published. Do not push to it meanwhile: a publishing draft refuses edits withdraft_locked. If the output says the publication was rejected, nothing was published.shape-draft.9A published draft is finished. For later work, open a new edit draft from the new version. Your job: start the next change withpenumbra shapes edit <shape>.shape-draft.10penumbra shapes drop <draft-id>discards a draft and keeps its history. It changes no published version. Enforced: a drop does not wait for approval under the default policy (rule shape-draft.7).
Failure signs
- A push exits with code 3 and
revision_conflict: rule shape-draft.2. - A push is refused with
invalid_draftand says that a ref was removed earlier: card rule shape.2. penumbra shapes diffshows a change marked losing or breaking: problem breaking-shape-change.- A publish exits with code 4: problem change-waits-for-approval.
- A push says
draft_locked: rule shape-draft.8.
Doors
No MCP door writes a definition file.
shape.define takes a complete
definition into a draft, and shape.modify changes a draft by named
operations.