Guide · files
Use when
A person gives you a newer or amended copy of a document the project has, or entities must change because their source document changed.
Looking for something else?
A different document with a similar name (recipe Bring a set of documents into the project).
Outcome
The File has the new edition as its current version, with its source date. Every entity that cited the File holds the new values, or a person decides about it.Before you start
- Find the File and compare its text with the new copy. Confirm it is the
same document.
- CLI:
penumbra files find "<name>", thenpenumbra files text <file>. - MCP:
omnisearchwith the document’s name, thenread_documentwith its path.
- CLI:
- Note the current version ID (CLI:
penumbra files show <file>). - Read the new edition’s own date. That is its source date.
Steps
- Make the new edition the File’s current version. Never upload a second
File (card rules file.1 and file.3).
- CLI:
penumbra files replace <file> <path> --expect <version-id> --source-date <date> --wait(card rule file.4). - MCP:
edit_documentchanges a Markdown File in place, afterread_document. It returns the new version ID. Penumbra has no MCP door that replaces other kinds of File; use the CLI. - Program:
penumbra.files.edit_document(...), afterpenumbra.files.read_document(...).
- CLI:
- Set the new version’s source date, if step 1 did not.
- CLI:
penumbra files source-date <file> <date>. - MCP:
update_filewith the File’spathandsource_date. It sets the current version. - Program:
penumbra.files.organize_file({ref, source_date})with the version ref frompenumbra.files.list_versions(...).
- CLI:
- Penumbra does not update entities for you. Find every entity that cites the
File (card rules file.7 and passage.7).
- CLI:
penumbra context explore --file-id <file-id> --json. - MCP: no tool lists the entities that cite a File. Search for the
document’s subjects with
omnisearch, thenreadeachentity:ref. Its citations name the File and the version they cite.
- CLI:
- Compare each entity’s properties with the new text.
- CLI:
penumbra context entity <entity-id>. - MCP:
readwithentity:<entity-id>.
- CLI:
- For each entity with a changed value, open one workspace for the edition
and check the entity out.
- CLI:
penumbra graph workspace open "<edition name>", thenpenumbra graph workspace hydrate "<edition name>" --node <entity-id>. - Program:
penumbra.workspaces.open({name}), thenw.hydrate({nodes: ["<entity-id>"]}).
- CLI:
- Give the new values in a patch, with a citation of the new version (card
rules entity.2 and citations-to-confirm.11). A patch keeps the
properties you leave out.
-
CLI: write the patch to a file and run
penumbra graph workspace modify "<edition name>" <file.json>. Take the handle frompenumbra graph workspace show "<edition name>". The citation’s digest is the new version’scontent_digestfrompenumbra files versions <file>. To cite the passage that holds the new value, add its passage ID aschunk_id. Take the passage ID from a search of the new version or frompenumbra files chunks(card passage). -
MCP and Program: get a citation token with
readon the new version andquoteset to the exact new text. Thenw.modify({edit: [{handle, changes: {patch: {properties}, evidence: [{citation}]}}]}).
-
CLI: write the patch to a file and run
- Validate, then submit the revision you reviewed (card rules workspace.3
and workspace.4). A submit by an API key or a connected agent can wait for
approval (card rule workspace.10).
- CLI:
penumbra graph workspace submit "<edition name>" --revision <n>. - Program:
w.validate(), thenw.submitReviewed({expectedRevision}). An outcomependingwaits for approval.
- CLI:
- Do not delete an entity because its old passage left search. Ask the person first.
Check
penumbra files versions <file>shows the new version as current, with its source date.- Each entity from this File holds the new values, or waits in your submitted workspace, or you named it to the person.
If it goes wrong
Worth offering
- Offer a list of what changed between the editions, term by term.
- Other entities can state an old value and cite a different File. Offer to search the Graph for the old values and check them.
- If the old edition stated something that the new one drops, say so, and offer to mark the entity for the person to decide.