Guide · graph
Use when
A workspace holds staged changes, from your own capture or from an extraction, and they are ready to reach the Graph.
Looking for something else?
Creating the staged items (recipes capture-by-hand and extract-files). One change to one entity (card Entity).
Outcome
The workspace has statusapplied, and each entity and relationship it held is
in the Graph. If that is not yet true, the person knows what waits, who must
act, and why.
Before you start
- Name the workspace and read it:
penumbra graph workspace show "<name>". The first line shows its status and revision. It must showopen. If it showssubmitted, go to problem submit-partly-applied (rule workspace.9). If it saysitems: none of 0 here, stage items first. - Know your credential:
penumbra whoami. An API key or a connected agent waits for approval at the submit (rules approval.1 and approval.2). A person’s own session does not. - Plan to use one credential for the whole recipe. Only the credential that submits can resume a partial submit (rule workspace.6).
- Choose a request id for the submit, such as
--request-id submit-<name>-1. You need it to recover a lost reply (problem reply-lost).
Steps
- Read the workspace and note its revision.
- CLI:
penumbra graph workspace show "<name>". - MCP:
review_workwith the workspace id (default catalog), orworkspace_read(full catalog and Kits). - Expect: a list of items with handles, then
submission: not startedandsubmit with --revision <n>.
- CLI:
- Review every item against its source. An item that says
updates existingcame from an extraction. It changes the entity it names, and the submit makes a new revision of that entity. Check that it is the same thing. If it is not, runpenumbra graph workspace keep-new "<name>" <handle>(problem extraction-duplicates-existing-entity). If you must correct an item, edit it withpenumbra graph workspace modify "<name>" <file>. An item for an entity that exists takes a patch, and the patch keeps the properties you leave out (rule entity.2). An item that is new in this workspace has no earlier properties. An edit of itspropertiesreplaces the whole map, so send every property you want to keep. Then read the workspace again, because each edit changes the revision (card workspace). - Check the whole workspace.
- CLI:
penumbra graph workspace validate "<name>". - MCP:
workspace_validate, orpenumbra.workspace(reference).validate()insideexecute. - Expect:
valid: yes, areview:line, a linewould apply:with counts, and anext:line. With no review flags it isnext: penumbra graph workspace submit "<name>" --revision <n>. If items carry review flags, it isnext: penumbra graph workspace show "<name>": read the flagged items, then take the revision fromshow. A lineN extracted items update a record the project already hascan follow. Fix every line that starts witherrorand validate again (rule workspace.3). Tell the person about each warning.
- CLI:
- If the
would apply:line shows deletions, tell the person which entities it deletes before you go on. A delete removes the entity’s relationships too (rule entity.3). - Submit the revision that validate or show printed.
- CLI:
penumbra graph workspace submit "<name>" --revision <n> --request-id <key>. - MCP:
workspace_submitwithexpected_revision(full catalog and Kits at confirm or apply), orpenumbra.workspace(reference).submitReviewedwithexpectedRevisioninsideexecute(default catalog). - Expect:
submission: applied, a counts line, one line for each created, updated or deleted entity (add--detailto list relationships too), and exit code 0. See rules workspace.4 and workspace.5.
- CLI:
- If the CLI exits with code 4 and prints
outcome: pending, the change waits for approval. Give the person the approval URL and tell them that nothing has changed yet. Then follow it:penumbra operations wait <handle>(rules approval.3 and approval.4). In the default catalog, usecheck_statuswith the approval reference. - When the wait ends, read the workspace again with step 1 and go to Check.
Check
- Run
penumbra graph workspace show "<name>". The first line must show[applied <id>], and the linesubmission:must readapplied. - Run
penumbra graph get <id>for two of the ids that the submit printed. Each must show the type you staged and arevision. - If the check fails, do not submit again. Use the table below.
If it goes wrong
Worth offering
- If the submit waits for approval, offer the owner a short list of what it changes, one line for each change.
- Offer to check what else the applied change touches (reference how-penumbra-fits-together).
Report
Tell the person:- The outcome: applied, waiting for approval, partly applied, or rejected.
- How many entities and relationships were created, changed or deleted, by type.
- What still waits, who must approve it, and the approval URL.
- Each warning that validate gave, and what you did about it.
- The request id of the submit.