Skip to content

docs: COMPONENTS.md — intent-map catalog for AI agents - #11

Merged
A-PachecoT merged 1 commit into
mainfrom
feat/components-md-catalog
May 21, 2026
Merged

A-PachecoT merged 1 commit into
mainfrom
feat/components-md-catalog

Conversation

@A-PachecoT

Copy link
Copy Markdown
Member

Summary

Adds packages/ui/COMPONENTS.md as the primary discovery surface for @cofoundy/ui consumers (humans + AI agents).

Why now: AGENTS.md (auto-gen from atelier-registry) only catalogs 9 docs-MDX components. The other ~74 exports (ChatWidget, StreamingMarkdown, Analytics, Messaging primitives, UI primitives, Hero, Email) were not discoverable except by reading 15KB of CLAUDE.md prose — which itself referenced a stale "44 stories" (actually 95). When an agent gets the prompt "use the UI package", it had no efficient path from intent → component name.

What's in the catalog

  1. Intent Map (top) — "Need X → Component" table covering the most common needs. Maps streaming → StreamingMarkdown, charts → BarChart/DonutChart/etc., booking → CalBookingButton, sidebar → Sidebar*, etc.
  2. Hooks section — useChatStore, useStreamingDrip, useAGUI, useChatTransport, ...
  3. Section tables — alphabetical by area (Chat, Messaging, Analytics, UI, Foundation, Hero, Navigation, Email, Docs).
  4. Drift note — file is hand-curated; TODO scaffolded for scripts/audit-components-md.ts to detect missing exports.

Companion changes (outside this repo)

  • cofoundy-toolkit (pushed to main as v1.22.63): workspace CLAUDE.md template + branding skill ref both point to this catalog.
  • Workspace ~/cofoundy/CLAUDE.md: dual-edited inline.

What's NOT in this PR

  • No version bump (docs-only, doesn't affect the npm package or IIFE bundle).
  • No /use-ui skill yet (deferred per /options analysis — measure first; build skill only if catalog file alone proves insufficient).
  • No full atelier-registry expansion (over-engineering — that registry is for MDX-allowlist validation, not general inventory).

Test plan

  • All section tables backed by actual exports in src/index.ts (no inventions).
  • All story URL slugs match real entries in https://ui.cofoundy.dev/index.json.
  • CLAUDE.md top-of-file pointer added.
  • Manual: spawn a fresh agent with prompt "build me a chat in Next.js using @cofoundy/ui" and verify it finds the right components from the catalog.

Adds packages/ui/COMPONENTS.md as the primary discovery surface for
@cofoundy/ui. Intent map maps "I need X" → component name, import,
story URL; section tables enumerate all ~83 exports across Chat,
Messaging, Analytics, UI, Foundation, Hero, Navigation, Email, Docs.

Updates packages/ui/CLAUDE.md with a top-of-file pointer to the
catalog. Workspace CLAUDE.md and toolkit template are updated in
sibling commits (different repos).

Motivation: AGENTS.md auto-gen only covers 9 atelier components;
the other ~74 exports were undiscoverable except by reading CLAUDE.md
prose (which referenced a stale "44 stories" — actually 95).
@A-PachecoT
A-PachecoT merged commit 47285af into main May 21, 2026
1 check failed
@A-PachecoT
A-PachecoT deleted the feat/components-md-catalog branch May 21, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant