Skip to content

Patch metadata: a description the agent writes and the owner or admins edit #235

Closed

Description

@allisonmahmood

Part of #230

Question

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.

Activity

  1. added
    wayfinder:grilling
    on Sep 12, 2026
  2. allisonmahmood commented on Sep 14, 2026

    @allisonmahmood
    OwnerAuthor

    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

    • 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):

    patchy describe "<text>"
    patchy describe <file> "<text>"
    patchy describe "<text>" --patch <id>
    patchy describe [<file>] --clear [--patch <id>]
    

    --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.

  3. allisonmahmood commented on Sep 14, 2026

    @allisonmahmood
    OwnerAuthor

    Resolved above; the map's Decisions so far carries the pointer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions