Skip to content

Establish prompt.md + schema.json as single source of truth with generator-based CI #13

@nate-layman

Description

@nate-layman

Problem

Each component currently has multiple hand-authored manifestations (today: prompt.md and skill/SKILL.md; tomorrow: possibly agent/AGENT.md, Gemini extensions, OpenAI Assistants, etc.). Keeping those files consistent by hand drifts — version numbers, descriptions, and prompt bodies all diverge over time. Adding support for a new LLM platform today requires touching N files per component.

Proposal

Declare components/<name>/prompt.md (frontmatter + body) and components/<name>/schema.json the single source of truth for every component. All platform-specific wrappers are derived artifacts produced by a generator script and validated in CI.

Canonical (hand-authored)

  • components/<name>/prompt.md — frontmatter (name, version, description, category, domain, status, tags, audience) + prompt body
  • components/<name>/schema.json
  • components/<name>/README.md, CHANGELOG.md, evals/

Generated (committed, never hand-edited)

  • .claude-plugin/marketplace.json at repo root
  • components/<name>/.claude-plugin/plugin.json
  • components/<name>/skills/<name>/SKILL.md (frontmatter and body both derived from prompt.md)
  • future: components/<name>/gemini/gemini-extension.json, components/<name>/openai/assistant.json, etc.

Generator

.github/scripts/generate_wrappers.py scans components/, parses each prompt.md, and writes every derived artifact. Idempotent. Each new platform target is a new render function following the same pattern; canonical sources do not change.

CI

.github/workflows/generate-wrappers.yml runs the generator and fails on git diff --exit-code. Contributors run the script locally before committing — a failure signals that the committed wrappers are stale relative to the canonical sources.

Acceptance criteria

  • description: has been migrated from every existing skill/SKILL.md into the corresponding prompt.md frontmatter.
  • Legacy components/*/skill/ directories removed.
  • Generator script produces marketplace.json, per-component plugin.json, and SKILL.md deterministically.
  • CI workflow runs the generator and fails on stale wrappers.
  • README documents: canonical vs. generated files, the invariant that wrappers are never hand-edited, and the contributor flow (edit prompt.md → run generator → commit).
  • templates/new-component/ reflects the canonical-only layout (no hand-authored skill/ folder).
  • Existing .github/scripts/lint_components.py updated to reference the new skills/<name>/SKILL.md path.

Out of scope (tracked separately)

Relationship to other issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions