Skip to content

feat(capabilities): PR-8 — capability standard export + draft_capability generator#684

Merged
seanhanca merged 2 commits into
mainfrom
feat/cap-standard-generator
Jul 20, 2026
Merged

feat(capabilities): PR-8 — capability standard export + draft_capability generator#684
seanhanca merged 2 commits into
mainfrom
feat/cap-standard-generator

Conversation

@seanhanca

Copy link
Copy Markdown
Contributor

PR-8 of zero-code onboarding (plan §3.5 author-by-derivation, gap G1-authoring). The anti-error layer: a provider gives irreducible facts; storyboard generates the derivable identity + refuses non-compliant input.

  • lib/capabilities/standard.ts — machine-readable standard (kinds, output-kinds, modality vocabulary + live-registry modalities, agent-param names, transforms, naming grammar) + isKnownModality/suggestModalities.
  • GET /api/capabilities/standard — public cached endpoint; provider/agent authors against the same standard the sync + validator use.
  • draft_capability MCP verb — pure buildDraft (derives semantic_key + canonical name + output_kind, assembles, validates) + dedupVerdict (NEW/ADD-CAPACITY/SYNONYM) + modality-vocabulary check; returns a ready-to-publish descriptor.

Additive; reuses PR-1 schema + PR-3 canonicalName/dedup. 9 tests + golden green. CLI cap init wrapper over the same buildDraft is a thin follow-up.

🤖 Generated with Claude Code

…ity generator (G1 authoring)

Author-by-derivation (plan §3.5): a provider supplies only irreducible facts;
storyboard generates every derivable field + refuses non-compliant input.

- lib/capabilities/standard.ts (browser-safe): the machine-readable standard —
  kinds, output-kinds, modality vocabulary + live-registry modalities, agent-param
  names, input transforms, naming grammar. + isKnownModality / suggestModalities.
- app/api/capabilities/standard/route.ts: public cached GET so a provider / their
  agent authors against the current standard (same one the sync + validator use).
- lib/mcp-server/tools/draft-capability.ts: draft_capability verb — pure buildDraft
  (derive semantic_key + canonical name + output_kind, assemble, validate) +
  dedupVerdict (NEW / ADD-CAPACITY / SYNONYM) + a modality-vocabulary check.
  Returns a ready-to-publish descriptor.
- server.ts: register draft_capability.

Additive; reuses PR-1 schema + PR-3 canonicalName/dedup. 9 tests + golden green.
(CLI `cap init` wrapper over the same buildDraft is a thin follow-up.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
storyboard Ready Ready Preview, Comment Jul 20, 2026 3:19am
storyboard-a3 Ready Ready Preview, Comment Jul 20, 2026 3:19am
storyboard-creative-stage Ready Ready Preview, Comment Jul 20, 2026 3:19am

Request Review

… next build)

describe_capability's defaultInvokeVia(entry?.output_kind) passes
OutputKind | null | undefined, but the param was typed string | undefined —
`null` isn't assignable, so `next build`'s type-check failed (vitest/esbuild
doesn't typecheck, so it slipped through PR-4's #683 gate; main is red on Vercel
as a result). Widen the param to string | null | undefined (the `?? "image"`
already handles null at runtime). tsc clean on all touched files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@seanhanca
seanhanca merged commit 75c48a6 into main Jul 20, 2026
14 of 15 checks passed
@seanhanca
seanhanca deleted the feat/cap-standard-generator branch July 20, 2026 03:30
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