Skip to content

feat: simplify templates to agent-first prompt gallery#101

Merged
thisistonydang merged 6 commits into
mainfrom
pkosiec/remove-human-instructions
May 31, 2026
Merged

feat: simplify templates to agent-first prompt gallery#101
thisistonydang merged 6 commits into
mainfrom
pkosiec/remove-human-instructions

Conversation

@pkosiec
Copy link
Copy Markdown
Member

@pkosiec pkosiec commented May 25, 2026

Summary

Shifts templates from step-by-step human guides to an agent-first prompt gallery. Users copy a prompt; agent skills handle implementation.

  • Remove human step-by-step instructions from all recipes and rag-chat example
  • Replace multi-mode usage banner with a single hero-integrated "Copy prompt for your agent" CTA
  • Switch to single-column centered layout, remove TOC sidebar
  • Deduplicate recipe descriptions (hero vs goal.md) and add service badges
  • Simplify cookbook composition to goal-only mode
  • Update content validation, plugin infrastructure, and tests

Screenshots

image image

Test plan

  • npm run typecheck && npm run build && npm run test all pass
  • Visual verification of recipe, cookbook, and example detail pages
  • Copy-to-clipboard produces valid agent prompts with description in frontmatter

This pull request and its description were written by Isaac.

@pkosiec pkosiec force-pushed the pkosiec/remove-human-instructions branch from ce414b1 to 05b45bc Compare May 25, 2026 20:44
@pkosiec pkosiec changed the title Remove human step-by-step instructions from templates feat: simplify templates to agent-first prompt gallery May 26, 2026
@pkosiec pkosiec force-pushed the pkosiec/remove-human-instructions branch 2 times, most recently from 8022985 to ba1ff06 Compare May 27, 2026 07:21
pkosiec added 6 commits May 29, 2026 19:30
Templates are now an inspirational gallery — not a manual guide.
Agent skills handle implementation; templates provide goals and
prerequisites only.

- Delete all content.md files (22 step-by-step instruction files)
- Deduplicate prerequisites: remove CLI auth boilerplate (handled by
  localBootstrap recipe), keep workspace-specific checks
- Simplify TemplateUsageBanner to agent-only CTA (remove "Read
  step-by-step" split)
- Remove TOC sidebar from recipe/cookbook/example detail pages
- Remove "human" composition mode from cookbook-composition
- Simplify cookbook pages to render only goal.md
- Update content-entries plugin, content-sections, content-markdown
- Update gallery subtitle to agent-first copy
- Update validate-content script and all tests
- Update author-recipes-and-cookbooks skill

Co-authored-by: Isaac
Merge the title, description, and copy-prompt into a centered hero
section on every template detail page. The CTA is now the most
visible element — large, centered, with a rounded pill button.

- Remove TemplateUsageBanner component (inlined into detail pages)
- Update recipe-detail, cookbook-detail, example-detail with hero layout
- Add className and label props to CopyPromptButton for flexible sizing
- Cookbook component list comes from goal.md (no programmatic duplicate)

Co-authored-by: Isaac
- Add explicit type predicates for .filter(Boolean) in example-detail.tsx
- Add null guard for sectionsBySlug access in content-entries plugin
- Remove dead CONTENT_SECTION_FILES const, use direct union type
- Remove ExampleSections identity alias, use ContentSections directly
- Reject whitespace-only goal.md in content validator
- Add test for buildCookbookMarkdownDocument empty-body branch
- Replace raw hex gradient with brand tokens in cookbook-detail

Co-authored-by: Isaac
Remove the first paragraph from each recipe goal.md since it duplicates
the registry description shown in the hero. The agent prompt still
carries the description via the YAML frontmatter summary field.

Add service badges (e.g. "Lakebase Postgres", "Databricks Apps") to the
recipe detail hero for at-a-glance technology context.

Co-authored-by: Isaac
Replace the standalone CTA button with a bordered card that explains the
3-step agent workflow (copy, paste, build). Shared AgentUsageCard
component used across recipe, cookbook, and example detail pages.

Co-authored-by: Isaac
@pkosiec pkosiec force-pushed the pkosiec/remove-human-instructions branch from ba1ff06 to e74a70f Compare May 29, 2026 17:30
@pkosiec
Copy link
Copy Markdown
Member Author

pkosiec commented May 29, 2026

Template Prompt Testing Summary

Methodology

All 32 DevHub template prompts (21 recipes, 5 cookbooks, 6 examples) were tested end-to-end by:

  1. Extracting prompts — A script (scripts/extract-prompts.ts) called the same server-side composeTemplateAgentPrompt() function that powers the browser "Copy prompt" button, producing the exact markdown payload a user would get.

  2. Spawning builder agents — For each of the 32 templates, a dedicated Claude Code agent was launched in an isolated git worktree with:

    • The full extracted prompt (identical to what a user pastes into their coding agent)
    • Pre-supplied answers to skip interactive questions (new project from scratch, DEFAULT Databricks CLI profile, pkosiec-test resource prefix, no deployment)
    • Access to all 8 Databricks agent skills (symlinked from databricks-agent-skills repo)
  3. Verifying builds — Each agent scaffolded the app and ran npm install + npm run build (or equivalent: tsc, databricks bundle validate, etc.).

  4. Reviewing Databricks resource usage — A reviewer agent inspected all 32 generated apps, cross-referencing each template's declared services (e.g., Lakebase Postgres, AI Gateway, Genie) against the actual code to verify the generated app uses the expected Databricks resources.

Results

  • PASS: 30/32 — all declared services found in generated code, build passes
  • PARTIAL: 2/32 — minor service tag mismatch (see notes), build passes
  • FAIL: 0/32

Examples (6/6 PASS)

Template Build Services Validated
agentic-support-console PASS Lakebase, Genie, AI Gateway, UC/Analytics, Jobs
vacation-rentals PASS Lakebase, Analytics, Genie
saas-tracker PASS Lakebase, Analytics, Genie
content-moderator PASS Lakebase, AI Gateway (Claude Sonnet 4), Genie
inventory-intelligence PASS Lakebase, Analytics, Genie, Jobs, Pipelines
rag-chat PASS Lakebase (pgvector), AI Gateway (embeddings + chat)

Cookbooks (5/5 PASS)

Template Build Services Validated
ai-chat-app PASS AI Gateway, Lakebase (chat persistence)
app-with-lakebase PASS Lakebase (CRUD todo app)
genie-analytics-app PASS Genie, Databricks Apps
lakebase-off-platform PASS Lakebase, Drizzle ORM, M2M OAuth
operational-data-analytics PASS UC, Lakebase, Pipelines, Lakehouse Sync

Recipes (21/21 PASS)

Template Build Verdict Services Validated
set-up-your-local-dev-environment PASS PARTIAL CLI auth verification only (no app — expected for a setup recipe)
spin-up-databricks-app PASS PASS Databricks Apps (AppKit scaffold)
onboard-your-coding-agent PASS PARTIAL Skills + MCP + AGENTS.md (no app — expected for an onboarding recipe)
ai-chat-model-serving PASS PASS AI SDK v6, AI Gateway streaming
foundation-models-api PASS PASS AI Gateway, useServingStream
embeddings-generation PASS PASS AI Gateway (databricks-gte-large-en)
model-serving-endpoint-creation PASS PASS Model Serving (Llama 3.3 70B), AI Gateway
lakebase-agent-memory PASS PASS Lakebase (chat sessions/messages)
lakebase-create-instance PASS PASS Lakebase provisioning CLI
lakebase-data-persistence PASS PASS Lakebase CRUD (AppKit + lakebase plugin)
lakebase-pgvector PASS PASS Lakebase pgvector, Model Serving embeddings
lakebase-change-data-feed-autoscaling PASS PASS Lakebase CDC, UC history tables
sync-tables-autoscaling PASS PASS Lakebase synced tables, UC → Postgres
genie-conversational-analytics PASS PASS Genie space, AppKit genie plugin
unity-catalog-setup PASS PASS UC storage creds, external locations, catalogs
genie-multi-space PASS PASS 3 Genie spaces, space selector UI
medallion-architecture-from-cdc PASS PASS Lakeflow Pipelines, silver/gold MVs
lakebase-off-platform-env-management PASS PASS Zod env validation, CLI credential collector
lakebase-token-management PASS PASS M2M OAuth, workspace OIDC token refresh
lakebase-drizzle-off-platform PASS PASS Drizzle ORM + @databricks/lakebase
volume-file-upload PASS PASS UC Volumes, file browser UI

PARTIAL Explanation

The 2 PARTIAL verdicts are not real gaps — they are metadata classification artifacts:

  • set-up-your-local-dev-environment: Declared "Databricks Apps" service, but this recipe only verifies CLI installation and authentication. It is a prerequisite for app recipes, not an app itself.
  • onboard-your-coding-agent: Declared "Databricks Apps" service, but this recipe configures a coding agent environment (skills, MCP, AGENTS.md). It prepares you to build apps, not build one itself.

Conclusion

All 32 template prompts produce working, buildable apps that correctly use their declared Databricks services. The removal of human step-by-step instructions is validated — coding agents can one-shot build every template from the prompt alone using Databricks agent skills.

@pkosiec pkosiec marked this pull request as ready for review May 29, 2026 21:55
@thisistonydang thisistonydang merged commit 642e4d6 into main May 31, 2026
thisistonydang added a commit that referenced this pull request May 31, 2026
…tail pages

PR #101 accidentally dropped the per-template `TemplatePreviewImage` from
recipe-detail.tsx and replaced cookbook-detail.tsx's preview with a generic
placeholder SVG. Restore the original pattern (still used by example-detail.tsx)
so each recipe and cookbook shows its own previewImageLight/DarkUrl, with the
`FallbackCardArt` art as the empty state. Drops the now-orphan
`static/img/template-detail-hero.svg`.
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.

2 participants