Templates

Templates are pre-wired workflow configurations you can load onto the canvas with a single click. Each template defines a complete workflow: trigger type, specialist nodes with pre-configured system prompts, edges with look-ahead filters, and per-node LOGIC.md reasoning strategies.

Modular9 ships with 17 built-in templates covering security, data engineering, content production, marketing, DevOps, and more.

Loading a Template

  1. Open any workflow canvas (new or existing)
  2. Click the Templates tab in the right-hand drawer
  3. Browse the template cards — each shows the trigger type badge, a short description, and the plugin packs used
  4. Click any template card to load it

Loading replaces the current canvas

Loading a template replaces all nodes and edges currently on the canvas. If you have unsaved work, save it first with Cmd+S before loading a template.

When a template loads, the canvas automatically fits all nodes into view. All nodes start with status: idle — the workflow is ready to run immediately.

Template Structure

Each template is defined in src/lib/templates/index.ts as a WorkflowTemplate object:

interface WorkflowTemplate {
  id: string            // Unique kebab-case slug
  name: string          // Display name on the card
  description: string   // One-line description
  triggerType: 'chat' | 'cron' | 'webhook'
  pluginIds: string[]   // Used for pack-color badges on the card
  canvas: {
    nodes: Node[]       // Trigger + specialist nodes with positions
    edges: Edge[]       // Connections with optional look-ahead filters
  }
}

Every node in a template ships with:

  • A pre-written systemPrompt tailored to its role in the pipeline
  • A logicConfig (LOGIC.md reasoning spec) with strategy, contracts, and quality gates
  • Optional lookAheadEnabled + lookAheadInstruction on edges for conditional execution

Built-in Templates

DevPack Templates

Code Review Pipeline

Trigger: Webhook (GitHub PR) | Nodes: 6

A full pull request review pipeline: Engineering analysis → Code Review → PR Review → Test Writer → Ship gate → GitHub comment. Includes a look-ahead filter that blocks release if OWASP critical findings are present.

Plugins: engineering, code-review, pr-review, test-writer, ship, github

Use for: Automating code review on every pull request via GitHub webhooks.


API Design & Ship

Trigger: Chat | Nodes: 5

Design an API contract, architect the backend, generate OpenAPI documentation, review for breaking changes, and ship — with a gate that blocks if breaking changes are found.

Plugins: api-designer, backend-architect, documentation-generator, code-review, ship

Use for: Designing new APIs or reviewing existing API contracts for consistency and safety.


SecurityPack Templates

Security Audit Pipeline

Trigger: Webhook | Nodes: 5 + Slack

A comprehensive security pipeline: Security Auditor → Dependency Scanner → Secrets Detector → Threat Modeler → Slack notification. Each node runs with a react reasoning strategy for thorough exploration.

Plugins: security-auditor, dependency-scanner, secrets-detector, threat-modeler, slack

Use for: Continuous security scanning triggered by repository webhooks or scheduled runs.


DataPack Templates

Data Pipeline Builder

Trigger: Chat | Nodes: 4

Design, debug, analyze, and curate a data pipeline: Data Engineer → Pipeline Debugger → Analytics Engineer → Dataset Curator. Each step validates the output of the previous.

Plugins: data-engineer, data-pipeline-debugger, analytics-engineer, dataset-curator

Use for: Designing ETL pipelines, data quality checks, and analytics models.


ML Model Review

Trigger: Chat | Nodes: 4 + Slack

Review an ML model or dataset: ML Engineer analysis → Security Auditor (adversarial risks, data poisoning) → Compliance Checker → Slack notification only if compliance issues are found.

Plugins: ml-engineer, security-auditor, compliance-checker, slack

Use for: Pre-deployment ML model audits, bias checks, and regulatory compliance review.


BuildPack / Infrastructure Templates

Cloud Infrastructure Review

Trigger: Cron (weekly Monday 9am) | Nodes: 5 + Slack

A scheduled infrastructure review: Cloud Architect → fan-out to Database Architect + Security Auditor (parallel) → DevOps Engineer synthesis → Slack alert if issues found.

Plugins: cloud-architect, database-architect, security-auditor, devops-engineer, slack

Use for: Weekly automated cloud cost, reliability, and security reviews without manual effort.


GrowthPack / ContentPack Templates

SEO Content Machine

Trigger: Chat | Nodes: 5

Research keywords, write an SEO-optimized article, run a final SEO pass, then fan-out to LinkedIn and Twitter in parallel. Quality gates enforce SEO score ≥ 70 and tweet length ≤ 280 characters.

Plugins: seo-strategist, blog-writer, seo-writer, linkedin-copy, twitter-copy

Use for: Producing and distributing keyword-targeted content across channels in one run.


Content to Publish Pipeline

Trigger: Chat | Nodes: 4 + social connectors

Write blog content, optimize for SEO, format for social, and distribute to LinkedIn and Twitter connectors.

Plugins: blog-writer, seo-strategist, content-strategist, linkedin-connector, twitter

Use for: Full-funnel content production from brief to publication.


Blog to Social Distribution

Trigger: Chat | Nodes: 3 + social

Repurpose a blog post into platform-native social content for LinkedIn, Twitter, and Instagram simultaneously (fan-out pattern).

Plugins: blog-writer, social-media-manager, linkedin-connector, twitter, instagram

Use for: Maximizing reach from a single piece of content without manual reformatting.


Newsletter Production

Trigger: Cron | Nodes: 4 + Mailchimp

Research topics, write newsletter content, run editorial review, and push to Mailchimp automatically on a schedule.

Plugins: content-strategist, blog-writer, editor, mailchimp

Use for: Automating weekly or monthly newsletter production and delivery.


Press Release Pipeline

Trigger: Chat | Nodes: 4

Write a press release, review for legal language, optimize for PR distribution, then format for publication.

Plugins: pr-specialist, legal, seo-writer, content-strategist

Use for: Producing press releases with legal review baked into the pipeline.


GrowthPack / Sales Templates

Sales Intelligence Daily

Trigger: Cron (daily) | Nodes: 3 + Slack

Research target accounts, identify signals and opportunities, generate outreach recommendations, and post to a Slack sales channel.

Plugins: sales-specialist, growth-hacker, slack

Use for: Daily sales intelligence briefings for your team without manual research.


Ad Campaign Pipeline

Trigger: Chat | Nodes: 4

Research audience, write ad copy variants, review for compliance, and output a structured campaign brief.

Plugins: ads-optimizer, marketing-specialist, legal, content-strategist

Use for: Producing paid ad campaigns with compliant copy across channels.


OpsPack Templates

Support Triage & Responder

Trigger: Webhook (support ticket) | Nodes: 5 + Slack

Triage incoming tickets by severity (CRITICAL/HIGH/MEDIUM/LOW), check for legal exposure, draft a response, prepare a resolution summary, and notify Slack.

Plugins: customer-support (x3), legal, slack

Use for: Automated first-response for support tickets with legal risk flagging.


Contract Intake & Review

Trigger: Webhook | Nodes: 4

Review an incoming contract for risk clauses, compliance issues, and negotiation points. Outputs a structured legal memo.

Plugins: legal (x2), compliance-checker, hr-specialist

Use for: First-pass contract review before lawyer review — flags obvious risks quickly.


Ecommerce Email Flows

Trigger: Webhook | Nodes: 3 + email connectors

Generate triggered email content (abandoned cart, welcome, post-purchase) and route to SendGrid or Mailchimp.

Plugins: email-copywriter, content-strategist, sendgrid

Use for: Behavioral email automation with AI-generated, personalized content.


Product Launch Readiness

Trigger: Chat | Nodes: 4

Assess a product for launch readiness: product positioning → competitive analysis → launch checklist → go/no-go recommendation with quality gate.

Plugins: product-manager, marketing-specialist, growth-hacker, content-strategist

Use for: Structured pre-launch review across product, marketing, and go-to-market dimensions.


Customizing Templates After Loading

Templates are starting points, not locked configurations. After loading, every node and edge is editable:

Changing Node Configuration

  1. Click any specialist node
  2. Click the gear icon → Advanced Settings
  3. Modify:
    • System Prompt — override or extend the pre-written prompt
    • Model — select a different LLM for this node
    • Temperature — adjust creativity level
    • Max Tokens — set output length ceiling
    • Logic Configuration — adjust reasoning strategy, contracts, quality gates

Modifying Edges and Filters

  1. Click any edge to select it
  2. Open its settings to enable or disable the look-ahead filter
  3. Edit the filter instruction — plain English, e.g.:
    Only continue if severity is HIGH or CRITICAL
    

Adding and Removing Nodes

After loading a template, you can add nodes from the sidebar, remove existing nodes, and reconnect edges freely. The template is fully editable canvas state — there is no "locked" mode.

Save immediately after customizing

After loading a template and making your changes, press Cmd+S to save. Name the workflow something descriptive — template names are generic by design. Your customized version will appear in the workflow list.

Replacing a Plugin in a Template

To swap one specialist for another:

  1. Delete the existing node (select it, press Delete)
  2. Drag the replacement plugin from the sidebar
  3. Reconnect the incoming and outgoing edges to the new node
  4. Configure the new node's system prompt and settings

Creating Your Own Templates

Custom templates are not yet available through the UI. Currently, you can share workflows by:

  1. Building and saving your workflow
  2. Exporting the workflow JSON directly from the database (or via the API)
  3. Sharing the JSON — recipients can import it by restoring canvas state

A template sharing UI (community templates, export/import, personal template library) is on the roadmap.

Contributing a Template to the Built-in Set

To add a template to the built-in set in src/lib/templates/index.ts:

const myTemplate: WorkflowTemplate = {
  id: 'my-workflow-template',
  name: 'My Workflow Template',
  description: 'One-line description of what this workflow does',
  triggerType: 'chat',
  pluginIds: ['plugin-a', 'plugin-b', 'plugin-c'],
  canvas: {
    nodes: [
      trigger('t1', 'chat', 60, 200),
      specialist('n1', 'plugin-a', 'Plugin A', '#6366f1', 'brain', 380, 200),
      specialist('n2', 'plugin-b', 'Plugin B', '#22c55e', 'code', 700, 200),
    ],
    edges: [
      edge('t1', 'n1'),
      edge('n1', 'n2', 'Only continue if analysis is complete'),
    ],
  },
}

// Add to the registry array at the bottom of the file
export const WORKFLOW_TEMPLATES: WorkflowTemplate[] = [
  // ... existing templates
  myTemplate,
]

Node positions use the standard spacing constants:

  • Trigger at x=60
  • First specialist at x=380
  • Subsequent specialists at x+320 each
  • All at y=200 for linear chains; offset vertically for fan-out

Next Steps