Repository navigation
[0] Catalog schema, gap inventory, recipe backlog #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
136e4e0
Complete agent assembly Phase 0: catalog schema and recipe backlog.
FlyOverCoderKY 2b95fcc
Address Codex and Copilot review on catalog Phase 0.
FlyOverCoderKY 9b0cb62
Tighten Phase 0 publish gates and structural catalog validation.
FlyOverCoderKY 363f4aa
Support name@version recipe pins and validate catalog dependencies.
FlyOverCoderKY 35fc887
Reject empty package pins and green fixtures still marked pending.
FlyOverCoderKY 49d8494
Use fictional catalog samples and component-scoped recipe adapters.
FlyOverCoderKY File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| # Catalog gap inventory | ||
|
|
||
| Compares the human-facing component registry | ||
| ([`src/data/components.ts`](../../src/data/components.ts)) and related site | ||
| surfaces against the composition catalog schema | ||
| ([`SCHEMA.md`](./SCHEMA.md), [`catalog-schema.ts`](../../src/data/catalog-schema.ts)). | ||
|
|
||
| **Date:** 2026-07-28 · **Schema:** 0.1.0 · **Registry snapshot:** 2026-07-28 (`SNAPSHOT_DATE` in `components.ts`) | ||
|
|
||
| ## Registry fields today (`PegmaComponent`) | ||
|
|
||
| | Field | Present | Catalog destination | Gap | | ||
| | --- | --- | --- | --- | | ||
| | `repo` | yes | `id` + `repo` | No separate stable `id` field (today `repo` is the id) | | ||
| | `title` | yes | `title` | — | | ||
| | `packages` | yes (`string[]`) | `packages[]` with version/published | No per-package version or publish flag | | ||
| | `status` | yes | `status` | Hand-maintained only — **do not trust as sole authority** (see below); also no `publishUsability` aggregate | | ||
| | `summary` | yes | `summary` | — | | ||
| | `owns` | yes | `owns` | — | | ||
| | `refuses` | yes | `refuses` | — | | ||
| | `now` | yes | `now` | Not structured; versions embedded in prose | | ||
| | `plan` | optional path | `links.plan` | No absolute URL; no README/npm link objects | | ||
|
|
||
| ## Fields the schema requires that the registry lacks | ||
|
|
||
| | Schema field | Why agents need it | Suggested Phase 1 source | | ||
| | --- | --- | --- | | ||
| | `status` | Lifecycle without registry drift | Prefer mapping from each repo’s `PROJECT_PLAN.md` stage (same discipline as the compiled roadmap); hand registry is fallback only when the plan is unreachable | | ||
| | `packages[].version` | Exact 0.x pins | npm / release projection / registry snapshot with precedence | | ||
| | `packages[].published` | Skip unpublished packages | npm existence + hand status | | ||
| | `publishUsability` | Fast list filter | Derived from package flags | | ||
| | `dependencies` | Correct composition order | Hand edges + package peer/optional deps where honest | | ||
| | `adapters` | Cloudflare vs Azure vs memory | Hand table per component (storage already known) | | ||
| | `hostMustProvide` | Stop agents from assuming the package owns cookies/DNS/UI | Hand list from READMEs / refuses | | ||
| | `capabilityTags` | Deterministic `plan_composition` | Hand tags on compile inputs | | ||
| | `recipeIds` | Recipe → component index | Recipe backlog + fixtures | | ||
| | `links.githubRepo` / `readme` / `npm` | Progressive disclosure | Convention + npm | | ||
| | `stage` | Drift-resistant status | Existing plan aggregation (`live-status` path) | | ||
| | `recipes[]` | Named intents with fixture citations | Recipe backlog → fixtures (Phase 2) | | ||
|
|
||
| ## Adjacent surfaces (not the catalog) | ||
|
|
||
| | Asset | Role | Gap vs catalog | | ||
| | --- | --- | --- | | ||
| | `public/llms.txt` | Short agent index | No deps, pins, recipes, or refuses detail; Phase 1 should link to catalog URL only | | ||
| | `/stack` | Human component pages | Renders registry + stage; not machine-oriented | | ||
| | `/roadmap` | Compiled stage view | Stage only; not composition | | ||
| | `/examples` | Skeleton snippets from READMEs | Not recipe-index shaped; no fixture status | | ||
| | `worker/src/release-catalog.ts` | Release webhook allowlist / display order | Repo id map only — reuse order, not package facts | | ||
| | Component READMEs + conformance | Canonical package truth | Scattered; catalog must summarize and link, not fork | | ||
|
|
||
| ## Publish / assembly-usable gate (compiled, not hand-copied) | ||
|
|
||
| Do **not** maintain a per-component “usable today?” table in this document. | ||
| That would duplicate lifecycle facts that AGENTS.md requires to be **compiled** | ||
| from component plans (and package-version authority), the same discipline as | ||
| the roadmap. | ||
|
|
||
| Phase 1 must set each catalog component’s `status`, `publishUsability`, and | ||
| `packages[].published` / `packages[].version` from: | ||
|
|
||
| 1. Each repo’s `PROJECT_PLAN.md` stage (status / stage prose) | ||
| 2. Version authority precedence (release-projection Store → npm at compile time) | ||
| 3. Never from parsing `now` prose in `components.ts` | ||
|
|
||
| Until that compile exists, agents should treat only **npm-published** packages | ||
| with exact pins as production-assembly candidates, and treat anything still | ||
| unpublished on npm (including local vendor tarballs) as unusable. | ||
|
|
||
| ## Decisions locked for Phase 1 compile (from open questions) | ||
|
|
||
| These are Phase 0 recommendations so Phase 1 does not re-litigate shape: | ||
|
|
||
| 1. **Compile home:** site build in this repo for the first `catalog.json` | ||
| (static publish). Extract a shared package only if the MCP Worker cannot | ||
| consume the same static URL cleanly. | ||
| 2. **Version authority (precedence):** release-projection Store facts when | ||
| present → else npm at compile time → else registry `now` parse is | ||
| **forbidden**; leave `version: null` and `published: false` rather than | ||
| guess from prose. | ||
| 3. **Recipe layout:** backlog lives in `docs/catalog/`; fixtures decide their | ||
| home in Phase 2 (dedicated examples repo vs in-package). Catalog only | ||
| stores citations. | ||
| 4. **`plan_composition` inputs:** structured `capabilityTags` + host | ||
| constraints — not free-text LLM classification inside Pegma. | ||
|
|
||
| ## What Phase 0 deliberately does not do | ||
|
|
||
| - Emit `catalog.json` or change the site build (Phase 1) | ||
| - Add recipe fixture code (Phase 2) | ||
| - Publish a skill or MCP tools (Phases 3–4) | ||
| - Document commercial host route maps or data models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| # Synthetic recipe backlog | ||
|
|
||
| Prioritized composition intents for the agent catalog. Every intent is | ||
| **synthetic**: a purpose-built product shape for teaching assembly. None | ||
| describe a commercial host’s routes, tenancy, or operations. | ||
|
|
||
| **Fixture rule:** catalog and `/examples` may only quote wiring that exists in | ||
| a public, CI-tested source (`fixture.status === 'green'`). Until then, recipes | ||
| appear as intent metadata only. | ||
|
|
||
| **Publish rule:** recipes whose `requiresPublished` set is not fully usable | ||
| must not be offered for production assembly (they may stay in the backlog as | ||
| deferred). | ||
|
|
||
| ## Priority order (ship fixtures in this order) | ||
|
|
||
| ### P1 — `cf-passkey-accounts` (first end-to-end accounts recipe) | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Intent** | A small Cloudflare Worker host for a fictional community library (“Northshelf Branch”) offers first-party accounts: passkey sign-in, email one-time codes for enrollment and recovery, server-side sessions, and durable rate limits on expensive auth paths. No passwords. | | ||
| | **Packages (published)** | `@pegma/identity`, `@pegma/sessions`, `@pegma/mail`, `@pegma/rate-limit`, `@pegma/authorization-identity`, `@pegma/storage-core`, `@pegma/storage-cloudflare-d1`, `@pegma/spine` | | ||
| | **Adapters** | `storage-core/cloudflare-d1`; mail provider chosen by host (e.g. Resend port on consumer pull) | | ||
| | **Host must provide** | HTTP routes, cookie/session boundary, WebAuthn origin config, email provider + DNS, secrets, any UI | | ||
| | **Non-goals** | Social login, OIDC server for third parties, passwords, multi-tenant orgs | | ||
| | **Anti-patterns** | Password table “just for admin”; durable events on Spine’s in-process bus; mail package owning its own outbox store; inventing sessions without `@pegma/sessions` | | ||
| | **requiresPublished** | identity, sessions, mail, rate-limit, authorization-core, storage-core, spine | | ||
| | **Fixture** | pending — Phase 2 synthetic fixture (not pegma.dev production account routes) | | ||
| | **Phase plan exit** | One of two required Phase 2 recipes (“accounts on Cloudflare-shaped host”) | | ||
|
|
||
| ### P2 — `storage-audit-mail-outbox` (storage + audit/mail pattern) | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Intent** | A fictional equipment checkout service (“Yard Loan”) records inventory mutations in Storage Core and, in the **same** single-partition transaction, appends an audit row and enqueues a transactional mail delivery job. After commit, a worker drains the outbox. | | ||
| | **Packages (published)** | `@pegma/storage-core`, `@pegma/audit`, `@pegma/mail`, `@pegma/spine` | | ||
| | **Adapters** | memory or cloudflare-d1 / azure-tables for demos; pattern is adapter-agnostic | | ||
| | **Host must provide** | Collection declarations, transaction boundary, outbox collection in host storage, mail provider adapter, delivery scheduler | | ||
| | **Non-goals** | Mail package owning storage; audit owning a store; cross-partition transactions | | ||
| | **Anti-patterns** | Separate “send email” after commit without an outbox job; audit write outside the caller’s `transact`; fake global ordering | | ||
| | **requiresPublished** | storage-core, audit, mail, spine | | ||
| | **Fixture** | pending — Phase 2; may cite package README/conformance excerpts until a dedicated fixture app exists | | ||
| | **Phase plan exit** | Second required Phase 2 recipe (“storage + audit/mail outbox pattern”) | | ||
|
|
||
| ### P3 — `durable-auth-rate-limits` | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Intent** | A fictional API for appointment holds (“Chair Queue”) applies durable fixed-window rate limits to expensive verification endpoints and an honest in-memory tier only for cheap abuse dampening — never pretending the memory tier is a global quota. | | ||
| | **Packages** | `@pegma/rate-limit`, `@pegma/storage-core` (durable tier), `@pegma/spine` | | ||
| | **Anti-patterns** | Using only in-memory limits for email-code or passkey verify; calling memory tier a “cluster quota”; expecting rate-limit to stop volumetric DDoS | | ||
| | **requiresPublished** | rate-limit, storage-core, spine | | ||
| | **Fixture** | pending | | ||
|
|
||
| ### P4 — `health-public-liveness` | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Intent** | A fictional brochure site’s Worker exposes a public liveness endpoint composed from `@pegma/health` probes (process + optional store ping), with checks registered at an explicit composition root. | | ||
| | **Packages** | `@pegma/health`, `@pegma/spine`; optional `@pegma/storage-core` for store ping | | ||
| | **Anti-patterns** | Autodiscovery of checks; health package inventing domain collections; treating health as APM | | ||
| | **requiresPublished** | health, spine | | ||
| | **Fixture** | pending (package README may supply early green citations) | | ||
|
|
||
| ### P5 — `logger-tee-composition` | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Intent** | A fictional batch importer (“Ledger Drop”) wires Spine’s Logger once at the composition root through `@pegma/logger-tee` into Cloudflare Workers Logs (and optionally a second sink), without growing Spine or inventing a Pegma observability vocabulary. | | ||
| | **Packages** | `@pegma/spine`, `@pegma/logger-tee`, `@pegma/logger-cloudflare` (optional other logger adapters) | | ||
| | **Anti-patterns** | Putting sink SDKs into Spine; replacing Logger with a custom core; claiming traces/metrics are Pegma’s job | | ||
| | **requiresPublished** | spine, logger-adapters | | ||
| | **Fixture** | pending | | ||
|
|
||
| ### P6 — `static-brochure-minimal` | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Intent** | A fictional static museum site (“Glass Wing”) needs no accounts, no durable storage, and no mail — only honest stack awareness (and optional health if a Worker exists). Teaches agents to **select nothing extra**. | | ||
| | **Packages** | none required; optional `@pegma/health` if a Worker liveness route exists | | ||
| | **Anti-patterns** | Pulling identity/sessions “for later”; inventing a database for a static site | | ||
| | **requiresPublished** | (none) | | ||
| | **Fixture** | pending — may be skill/eval only with empty composition root | | ||
|
|
||
| ## Deferred (unpublished packages) | ||
|
|
||
| Do not offer for production assembly until packages are on npm. | ||
|
|
||
| ### D1 — `inbound-webhook-receipts` (when `@pegma/webhooks` is published) | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Intent** | A fictional donation platform (“Copper Plate”) records inbound provider webhook receipts with idempotent dedup, poison quarantine, and retention — receipts hold ids and counters, never payloads. | | ||
| | **Blocks** | webhooks unpublished | | ||
| | **Anti-patterns** | Exactly-once claims; storing full payloads in the receipt ledger; ordering guarantees | | ||
|
|
||
| ### D2 — `support-queue-slice` (when Support Desk packages are published) | ||
|
|
||
| | | | | ||
| | --- | --- | | ||
| | **Intent** | A fictional maker-space helpdesk (“Bench Ticket”) runs a composable support queue for web and email with permission-checked agents and outbox-backed mail. | | ||
| | **Blocks** | support-desk packages unpublished | | ||
| | **Anti-patterns** | Treating Support Desk as hosted SaaS; AI on ticket bodies before the host documents egress | | ||
|
|
||
| ## Explicitly out of backlog (non-goals) | ||
|
|
||
| - Recipes that copy pegma.dev or retiregolden.org route maps, schemas, or ops topology | ||
| - Password-based auth “compatibility” recipes (Identity refuses passwords) | ||
| - Spine durable-event recipes (Spine refuses durable events on the in-process bus) | ||
| - Multi-package monorepo scaffolds that dictate a UI framework | ||
|
|
||
| ## Mapping to plan Phase 2 exit | ||
|
|
||
| | Plan requirement | Backlog id | | ||
| | --- | --- | | ||
| | End-to-end accounts on Cloudflare-shaped host | P1 `cf-passkey-accounts` | | ||
| | Storage + audit/mail outbox pattern | P2 `storage-audit-mail-outbox` | | ||
|
|
||
| Ship P1 and P2 fixtures before declaring Phase 2 done. P3–P6 improve coverage; | ||
| D1–D2 wait on publication. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
Packages (published)row embeds current lifecycle facts in a hand-maintained document. If any listed package is unpublished or renamed upstream, this backlog will continue advertising it as available until this repository is manually updated, bypassing the required build-time compilation from component plans. Generate this availability label from the catalog’s version authority or remove the publication claim.AGENTS.md reference: AGENTS.md:L28-L30
Useful? React with 👍 / 👎.