Skip to content

feat(patchy): patchy list replaces catalog; the skills teach the discovery chain #252

Closed

Description

@allisonmahmood

Part of #247. Implements spec §7 and §8's list (after tickets 3 and 4 put both routes on the wire); decisions Discovery for agents and the prototype (--state at the patch level, list <retired-name>'s refusal, no local days-left).

What to build

  • patchy list with the positional path: list, list patches, list <patch>, list <patch> <primitive>, list connections [--all], list connections <handle>; --state live|retired|all governs the top level's filter and how <patch> resolves at the patch and primitive levels (a deleted id needs --state all at both); --mine is top level only and --all connections only, a local error elsewhere; --json prints the wire response of that level, and the top level's is { patches, connections } merged from GET /api/patches and GET /api/connections. Text: top level leads with the id, then name, state (deleted · gone in 18 days from purgeAt), owner with · deactivated, v7, the first line of the description or (no description), grouped Yours / Company, then Connections; the patch level prints the row, the description, Tables, Stores (or Tables: unavailable when the inventory is null) and Reads with hints or reasons; the primitive level prints columns (kind, optional, explicit default, ref target), indexes with unique, the shared flag and the schema revision. A retired patch by name without --state is the API's wrong_state 409, printed as "retired; pass --state retired" (exit 2). list runs anywhere under the saved login; it is not a repo command and never reads patchy.json.
  • catalog removed: the command, its README rows, tests, and every mention in the global patchy skill and the five project skills. The skills teach the chain instead: find candidate patches by description, list <patch> for its primitives and reads, list <patch> <table> for keys and types, then add by the canonical id; "no match" means "none you can use"; pass --state retired before concluding a tool does not exist; a pasted address resolves by its last segment. patchy add postgres with several connections lists them from list connections.
  • ADR-0004: list replaces catalog in the command table with its --json documents; the global skill's lock hash refreshed by hand.

Admitted at merge

Discovery is complete for agents; the portal (ticket 8) reads the same query.

Done when

  • The CLI suite covers every level's text and --json, the wrong-level flag errors, the retired-without-state refusal and a deleted patch reached by id with --state all and refused without it; pnpm -r exec grep -ri catalog finds only the wire's connection snapshot vocabulary, never the command; the packed e2e runs list, list <patch> and list <patch> <table> against two seeded patches.

Surfaces

The CLI (packages/patchy/README.md, ADR-0004, the global skill and skills-lock.json, the project skills served by generation), the Publishing glossary (Catalog removed, Discovery built), docs/product.md § Sharing and finding (agents discover) from decided to built, docs/DEVELOPMENT.md if the packed e2e's steps are listed there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions