Skip to content

feat: populate ARD catalog fields from scaffold description at scaffold_create time #70

@stackbilt-admin

Description

@stackbilt-admin

Context

Tracks Stackbilt-dev/tarotscript#376 — once tarotscript adds ARD skeleton cards, the scaffold pipeline needs to hydrate the {{WORKER_DESCRIPTION}}, representativeQueries, and updatedAt template vars at generation time.

ARD spec: https://blog.stackbilt.dev/post/ard-mcp-agentic-resource-discovery


Problem

The workers-skeleton.deck ARD card (tarotscript#376) will emit a /.well-known/ai-catalog.json route with template placeholders. Without this downstream change, every generated scaffold will ship a stub catalog with empty/placeholder representativeQueries — which defeats the value of ARD for discoverability.


What to do in scaffold_create

When materializing a scaffold:

  1. Inject {{WORKER_NAME}} — already available from the scaffold request
  2. Inject {{WORKER_URL}} — derive from {worker-name}.{account}.workers.dev or let users override post-deploy
  3. Inject {{WORKER_DESCRIPTION}} — use the user's project description verbatim (already passed to scaffold_create)
  4. Generate representativeQueries — 3–5 natural-language queries an agent might ask to discover this worker, derived from the project description via a lightweight LLM call (Workers AI, free tier, llama-3.3-70b-fp8-fast)
  5. Set updatedAt — current ISO timestamp at scaffold generation time

The representativeQueries generation can be a simple zero-shot prompt: "Given this Cloudflare Worker description, generate 4 natural-language queries an AI agent might ask to discover and select this service. Return JSON array of strings."


Dependency

Blocked on: Stackbilt-dev/tarotscript#376 (ARD skeleton cards)

Priority

Follows tarotscript#376 — file now, implement after the deck cards land.

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