Skip to content

feat: Redesign automation examples as card-based marketplace linked to use cases#454

Open
xingyaoww wants to merge 8 commits intomainfrom
automation-marketplace-cards
Open

feat: Redesign automation examples as card-based marketplace linked to use cases#454
xingyaoww wants to merge 8 commits intomainfrom
automation-marketplace-cards

Conversation

@xingyaoww
Copy link
Copy Markdown
Contributor

@xingyaoww xingyaoww commented Apr 14, 2026

Summary

Adds a card-based "Use Case Automations" section to the automations overview page, auto-generated from use-case frontmatter.

Architecture

Use-case pages are the single source of truth:

  • Minimal automation: frontmatter (icon, summary) — card title comes from the page title (no duplication)
  • Full "Automate This" body section with prompts, instructions, and plugin links

Automations overview page (merged with examples):

  • Auto-generated card grid linking to each use-case page's #automate-this section
  • General automation templates with copyable prompts
  • Prompt writing tips

Sync script (.github/scripts/sync_use_case_automations.py):

  • Reads automation: frontmatter from use-case pages
  • Generates the card grid in overview.mdx between marker comments
  • Validates required fields with clear error messages
  • Fails loudly on missing/misordered markers
  • CI check on PRs via .github/workflows/sync-use-case-automations.yml

Changes

  • Merged automations/examples.mdx into automations/overview.mdx (single page)
  • Deleted automations/examples.mdx
  • Updated docs.json navigation (removed examples entry)
  • Fixed all internal links across the site
  • Added 13 tests for the sync script
  • Simplified frontmatter: removed card_title (uses page title), renamed card_descriptionsummary

This PR was created by an AI assistant (OpenHands) on behalf of Xingyao.

…o use cases

- Redesign automation examples page with card-based UI organized into
  'Use Case Automations' and 'General Automations' sections
- Each use-case automation card links to the full guide, relevant plugin,
  and includes a copyable prompt with Prompt/Plugin tabs
- General automations displayed as a 3-column card grid for discoverability
- Tips section collapsed into AccordionGroup to reduce visual noise
- Add 'Automate This' sections to 4 use case pages (vulnerability
  remediation, code review, incident triage, dependency upgrades) with
  ready-to-use automation prompts and link to the examples page
- Update use-cases overview with new 'Automate Any Use Case' section
  showing cards for Automation Templates, Plugins, and SDK
- Cross-link use cases ↔ automations ↔ plugins bidirectionally

Co-authored-by: openhands <openhands@all-hands.dev>
@mintlify
Copy link
Copy Markdown

mintlify bot commented Apr 14, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
all-hands-ai 🟢 Ready View Preview Apr 14, 2026, 2:46 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

…L data

- Add _data/use-case-automations.yaml as single source of truth for
  use-case → automation mappings (title, icon, prompt, plugin link, etc.)
- Add .github/scripts/sync_use_case_automations.py to generate/validate
  the auto-generated MDX sections between marker comments
- Add .github/workflows/sync-use-case-automations.yml CI check that
  runs on PRs touching the data file, examples page, or use-case pages
- Add {/* BEGIN/END */} marker comments to examples.mdx and 4 use-case
  pages so the script knows which sections to regenerate

Workflow:
  1. Edit _data/use-case-automations.yaml (add/modify use cases)
  2. Run: python .github/scripts/sync_use_case_automations.py
  3. Commit the YAML + regenerated MDX files
  4. CI validates everything stays in sync

Co-authored-by: openhands <openhands@all-hands.dev>
… file

The automation content for each use case is now defined in the use-case
page's own frontmatter (automation: block). The sync script reads those
pages directly — no separate _data/ file to maintain.

- Remove _data/use-case-automations.yaml
- Add automation: frontmatter to 4 use-case pages (vulnerability-
  remediation, code-review, incident-triage, dependency-upgrades)
- Rewrite sync script to parse MDX frontmatter and generate the
  examples page cards + Automate This sections from it
- Simplify workflow triggers (no more YAML data path)

Adding a new use-case automation:
  1. Add automation: block to the use-case page's frontmatter
  2. Add BEGIN/END:automate-this markers where the section should go
  3. Run: python .github/scripts/sync_use_case_automations.py
  4. Commit the updated files — CI validates on every PR

Co-authored-by: openhands <openhands@all-hands.dev>
The Automate This sections were duplicating the prompt already defined
in frontmatter. Now use-case pages just have a simple card linking back
to the automation examples page (with an anchor to the specific use
case). The prompt content lives in one place only — the frontmatter —
and the sync script copies it to examples.mdx.

- Remove generated Automate This blocks and markers from use-case pages
- Replace with a static Card linking to examples page anchor
- Remove unused intro field from frontmatter
- Simplify sync script to only generate the examples page

Co-authored-by: openhands <openhands@all-hands.dev>
… a card index

Use-case pages are now the single source of truth:
- Frontmatter has only card metadata (title, icon, short description)
- Page body has the full 'Automate This' section with prompts, context,
  and plugin links — this is what users actually read and copy

The automation examples page is just a card grid that links to each
use-case page's #automate-this section. The sync script generates
those cards from the frontmatter metadata.

Co-authored-by: openhands <openhands@all-hands.dev>
Each prompt now ends with 'Learn more at <url>' pointing back to the
use-case documentation page, so users (and agents) always have context
on where the prompt came from.

Co-authored-by: openhands <openhands@all-hands.dev>
@xingyaoww xingyaoww marked this pull request as ready for review April 14, 2026 15:24
@xingyaoww xingyaoww requested a review from mamoodi as a code owner April 14, 2026 15:24
Copy link
Copy Markdown
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core idea is solid—using use-case frontmatter as the source of truth for automation cards is the right approach. But the implementation is incomplete and doesn't match what the PR description promises. See inline comments for specifics.

Review fixes:
- Remove card_title duplication — use page title instead
- Rename card_description to summary (simpler frontmatter)
- Add field validation with clear error messages for missing fields
- Add marker validation (fail loudly on missing/misordered markers)
- Add 13 tests covering parsing, generation, and error cases

Page merge:
- Merge automations/examples.mdx into automations/overview.mdx
  (single page with overview + use-case cards + general templates)
- Delete the separate examples page
- Update docs.json navigation
- Fix all internal links across the site

Co-authored-by: openhands <openhands@all-hands.dev>
Copy link
Copy Markdown
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taste Rating: 🟡 Acceptable - Solid implementation with comprehensive tests, but the error handling logic is more convoluted than necessary.

Verdict: ✅ Worth merging - Core logic is sound, test coverage is excellent, minor improvement suggested.

Key Insight: The sync script correctly validates frontmatter and generates cards, but the error collection pattern forces you to think harder than you should about whether data gets appended when other files have errors.

- Replace confusing 'all(f"  {rel}" not in e ...)' with simple
  'file_has_errors' boolean flag per reviewer suggestion
- Add redirect from /automations/examples to /automations/overview
  so external links don't 404

Co-authored-by: openhands <openhands@all-hands.dev>
Copy link
Copy Markdown
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taste Rating: 🟡 Acceptable - Solid, pragmatic implementation.

Verdict: ✅ Worth merging - Clean data flow, comprehensive tests, addresses real problem.

Key Insight: Using frontmatter as the single source of truth with automated sync eliminates the manual drift problem elegantly—this is good engineering that solves a real maintenance pain point.


What's Right:

  • Data structure: Frontmatter-as-source-of-truth is the correct choice—one authoritative location, no duplication
  • Testing: 13 tests covering all error paths and happy cases; tests verify real behavior, not mocks
  • Backward compatibility: Redirect in place prevents breaking external links
  • Error handling: Clean validation with clear messages (fixed from previous review)
  • No complexity sins: Simple functions, no deep nesting, single responsibilities

Minor Suggestion (non-blocking):
PR description could include visual evidence—e.g., a screenshot of the rendered card grid or command output showing the sync script running successfully. The test coverage makes this acceptable without it, but future PRs with UI changes benefit from visual proof.

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.

3 participants