You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Patch metadata: a description the agent writes and the owner or admins edit #235
Where does a patch's description live and how does it get there?
Settled in charting: cloud-owned; create seeds it from the repo; ordinary publishes leave it alone; explicit edits in the portal or via the CLI change it; rollback never resurrects an old one; owner and admins edit.
Settle: the config field and how init --purpose fills it, and file mode's equivalent; the manifest and API shape on create and whether an update carrying a changed config description is refused, ignored or applied; the CLI edit command; length and content rules; what the list shows when it is empty; whether other display metadata (an icon, a category) is wanted now or later.
Resolved with Allison over three rounds on 2026-09-14. Astra was consulted twice before round 1; its positions assumed the cloud-owned model and were superseded by round 2. This overturns the charting decision on The destination: the description is local-owned with a sync, not cloud-owned with publishes leaving it alone.
The model
The repo's copy is the truth the agent edits, and publish sends it. It lives in patchy.json as description, beside the instance and patch id: JSON, CLI-owned and CLI-written, committed, agent-editable. init --purpose writes it there (and the purpose into AGENTS.md as before; the two stay independent, no sync, no parsing). The manifest carries it; the cloud row on patches stores it with description_updated_by and description_updated_at.
Portal edits pull down. Whenever the CLI talks to the cloud for this repo (refresh, dev, publish), it compares the cloud's description_updated_at with the one patchy.json recorded at its last pull or publish (descriptionSyncedAt, a timestamp, never old text). If the cloud changed since then, someone edited it in the portal or via describe: the CLI writes the cloud text into patchy.json, prints "The description was changed in the portal to '…'; check it" (quoting the local text it replaced when that differed), and records the new timestamp. From then on local and cloud agree until the agent edits patchy.json, and the next publish overwrites the cloud with it. Publish records the returned timestamp as synced.
Rollback and restore never touch it. The description sits outside version snapshots; edits never create a version. Existing patches backfill empty.
File mode
A single-file patch has no repo, so the flag is the config: patchy publish page.html --description "…" applies the text on every publish where it is given; omitted, the cloud value stands. In repo mode the flag is refused, pointing at patchy.json.
The edit command
For "just update the description" without a publish, following the share/delete target rules (repo id from patchy.json, file mode by file, --patch <id>; conflicting targets refused; never creates a patch; returns the cloud's normalized text):
--clear rather than an empty positional, so an empty shell variable cannot erase metadata; whitespace-only text is refused. In a repo, describe updates the cloud and rewrites patchy.json in the same run, so the two stay in sync. Owners via CLI and portal, admins via the portal, per the admin ticket.
Rules
Bound: 500 Unicode code points after collapsing whitespace runs to one space and trimming; one paragraph; no control characters; markup stored literally and escaped on render. Never truncated: init refuses an over-long --purpose with the count and the bound (interactive: re-prompt); no second init flag.
Required at init, non-empty in patchy.json for a repo, mirroring table(). The cloud value may still be empty: file-mode patches without the flag, or after --clear.
Empty rendering: portal list and patch page show a muted "No description" with the edit affordance for the owner and admins only; patchy list JSON always carries "description": "" (a string, never absent or null), text prints (no description). Never substitute the title, the purpose or anything else.
Attribution:description_updated_by/at populated on create and on real changes (no-op edits leave them alone); one muted "edited by X on date" line under the description on the patch management page, nothing in the list, no history.
No icon, category or tags now. If the list mocks show prose does not scan on a large inventory, it graduates from that ticket as its own decision.
Amendment to the discovery ticket: the primitive-change reminder
At refresh, dev and publish, for every table or store whose definition changed since the last generation (columns, indexes or shared flag, so the schema revision moved) while its description text stayed byte-identical, the CLI prints "Table orders changed since its last generation; check that its description still holds: '…'". A notice only, never a refusal; publish proceeds. Amends Discovery for agents, whose primitive-description rules otherwise stand.
Calls made here
One edit route on the patch, PUT /patches/:patchId/description with { description }, used by the portal form and by describe; publish carries the description in the manifest as today's fields do. Last-write-wins. Live and retired patches editable; deleted-in-window refused with the state; shared access grants no edit right.
Validation failures follow the existing wire shape and ADR-0004 exit codes; the portal form redisplays with the submitted text.
Follow-through surfaces
docs/product.md (patch description, patchy.json's new fields, file mode's flag, the reminder), the patches CONTEXT.md glossary (description, synced-at), docs/API.md, ADR-0004 (describe in the command table), the global patchy skill and its lock hash, the project skills (patchy-loop for the sync notice and the reminder; the starter AGENTS.md says which file holds which text), the CLI README, and the migration adding description, description_updated_by, description_updated_at to patches. The list mocks ticket should also decide whether the <title>-derived title still earns a place beside name and description.
Activity
allisonmahmood commentedon Sep 14, 2026
Resolution
Resolved with Allison over three rounds on 2026-09-14. Astra was consulted twice before round 1; its positions assumed the cloud-owned model and were superseded by round 2. This overturns the charting decision on The destination: the description is local-owned with a sync, not cloud-owned with publishes leaving it alone.
The model
patchy.jsonasdescription, beside the instance and patch id: JSON, CLI-owned and CLI-written, committed, agent-editable.init --purposewrites it there (and the purpose into AGENTS.md as before; the two stay independent, no sync, no parsing). The manifest carries it; the cloud row onpatchesstores it withdescription_updated_byanddescription_updated_at.refresh,dev,publish), it compares the cloud'sdescription_updated_atwith the onepatchy.jsonrecorded at its last pull or publish (descriptionSyncedAt, a timestamp, never old text). If the cloud changed since then, someone edited it in the portal or viadescribe: the CLI writes the cloud text intopatchy.json, prints "The description was changed in the portal to '…'; check it" (quoting the local text it replaced when that differed), and records the new timestamp. From then on local and cloud agree until the agent editspatchy.json, and the next publish overwrites the cloud with it. Publish records the returned timestamp as synced.File mode
A single-file patch has no repo, so the flag is the config:
patchy publish page.html --description "…"applies the text on every publish where it is given; omitted, the cloud value stands. In repo mode the flag is refused, pointing atpatchy.json.The edit command
For "just update the description" without a publish, following the
share/deletetarget rules (repo id frompatchy.json, file mode by file,--patch <id>; conflicting targets refused; never creates a patch; returns the cloud's normalized text):--clearrather than an empty positional, so an empty shell variable cannot erase metadata; whitespace-only text is refused. In a repo,describeupdates the cloud and rewritespatchy.jsonin the same run, so the two stay in sync. Owners via CLI and portal, admins via the portal, per the admin ticket.Rules
initrefuses an over-long--purposewith the count and the bound (interactive: re-prompt); no second init flag.patchy.jsonfor a repo, mirroringtable(). The cloud value may still be empty: file-mode patches without the flag, or after--clear.patchy listJSON always carries"description": ""(a string, never absent or null), text prints(no description). Never substitute the title, the purpose or anything else.description_updated_by/atpopulated on create and on real changes (no-op edits leave them alone); one muted "edited by X on date" line under the description on the patch management page, nothing in the list, no history.Amendment to the discovery ticket: the primitive-change reminder
At
refresh,devandpublish, for every table or store whose definition changed since the last generation (columns, indexes or shared flag, so the schema revision moved) while its description text stayed byte-identical, the CLI prints "Tableorderschanged since its last generation; check that its description still holds: '…'". A notice only, never a refusal; publish proceeds. Amends Discovery for agents, whose primitive-description rules otherwise stand.Calls made here
PUT /patches/:patchId/descriptionwith{ description }, used by the portal form and bydescribe; publish carries the description in the manifest as today's fields do. Last-write-wins. Live and retired patches editable; deleted-in-window refused with the state; shared access grants no edit right.Follow-through surfaces
docs/product.md(patch description,patchy.json's new fields, file mode's flag, the reminder), the patchesCONTEXT.mdglossary (description, synced-at),docs/API.md, ADR-0004 (describein the command table), the globalpatchyskill and its lock hash, the project skills (patchy-loopfor the sync notice and the reminder; the starter AGENTS.md says which file holds which text), the CLI README, and the migration addingdescription,description_updated_by,description_updated_attopatches. The list mocks ticket should also decide whether the<title>-derived title still earns a place beside name and description.allisonmahmood commentedon Sep 14, 2026
Resolved above; the map's Decisions so far carries the pointer.