Skip to main content

scripts/worktree-feature/: MDX Prompt Templates

Ghost doc. Source MDX prompt files live in .worktrees/12-feature-flag-gate-all-non-mvp/scripts/worktree-feature/components/ (a worktree branch, not main); the excerpts below reflect that source.

Usage

Each .mdx file imports as a JSX component and renders as children of <Task>; props interpolate via {props.xxx}:

Discover.mdx

Implement.mdx

The “all commits on main” rule is specific to the worktree-feature pipeline: Git worktrees isolate each ticket in its own filesystem sandbox. Standard Smithers workflows don’t restrict branching strategy.

Review.mdx

Validate.mdx

ReviewFix.mdx

Report.mdx

System Prompt: system-prompt.mdx

The top-level system prompt uses custom MDX components to inject context:
Components are injected at render time via renderMdx():

Key Patterns

  • MDX as prompt templates — structured prompts, JSX-interpolated for dynamic content.
  • Props-driven — ticket data, previous results, and feedback pass as props.
  • Conditional sections{props.previousImplementation ? ... : ""} adds context only when iterating.
  • renderMdx() — composes system prompts from multiple sources via custom MDX components.