Skip to content

feat: Plan and job templates (recipes) #52

@nigel-dev

Description

@nigel-dev

Source

Audit report — Section 9: Phase 3 Roadmap

Description

Common multi-job workflows (e.g., "add feature with DB + API + UI", "refactor with tests") are re-specified from scratch every time. There is no way to save and reuse plan structures as templates.

Proposed Solution

  1. Template format: JSON/YAML files defining plan structure with placeholder variables
  2. Template storage: .mc/templates/ directory in the project root
  3. Template instantiation: mc_plan(template: "full-stack-feature", vars: { feature: "search" })
  4. Built-in templates: Ship a few common patterns (full-stack feature, refactor-with-tests, bug-fix-with-regression-test)
  5. Template discovery: mc_templates tool to list available templates

Example Template

{
  "name": "full-stack-feature",
  "description": "DB schema + API + UI with dependency chain",
  "variables": ["feature", "description"],
  "jobs": [
    { "name": "db-schema", "prompt": "Add database tables for {{feature}}: {{description}}" },
    { "name": "api", "prompt": "Create API endpoints for {{feature}}", "dependsOn": ["db-schema"] },
    { "name": "ui", "prompt": "Build UI components for {{feature}}", "dependsOn": ["api"] },
    { "name": "tests", "prompt": "Add integration tests for {{feature}}", "dependsOn": ["api"] }
  ]
}

Priority

P3 — quality of life improvement. Current workaround is copy-pasting plan definitions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3: lowNice to have — polish, cleanup, or long-termenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions