Skip to content

feat: template packs for post-setup additive team expansion #727

@Aureliolo

Description

@Aureliolo

Note: the web dashboard has been rebuilt in React 19 + shadcn/ui as part of #762. Vue/PrimeVue references in this issue are outdated.

Problem

Templates are a one-shot choice during setup. After that, users manually add agents one by one. There's no way to add a pre-configured team (e.g. "add a security team") to an existing organization. Additionally, full templates duplicate team definitions inline -- there's no way to compose a template from reusable building blocks.

Proposed Changes

Template packs

Small, focused template fragments that can be applied additively to an existing org:

  • "Add Security Team" -- Security Engineer + Security Operations + security department (budget 8%)
  • "Add Data Team" -- Data Analyst + Data Engineer + ML Engineer + data_analytics department (budget 10%)
  • "Add QA Pipeline" -- QA Lead + QA Engineer + Automation Engineer + quality_assurance department (budget 10%)
  • "Add Creative/Marketing" -- Content Writer + Brand Strategist + creative_marketing department (budget 8%)
  • "Add Design" -- UX Designer + UX Researcher + design department (budget 8%)

Pack composition in templates (optional)

Full templates can optionally compose from packs via a uses_packs field:

template:
  name: "Full Company"
  extends: "startup"
  uses_packs:
    - "security-team"
    - "qa-pipeline"
    - "data-team"
  # ... rest of template config
  • uses_packs is optional -- existing templates work unchanged (backward-compatible)
  • Resolution order: extends parent is merged first, then each pack in uses_packs order, then the template's own fields override last
  • Packs are resolved by name from the same discovery paths (built-in + user packs)
  • merge_template_configs() handles the merge -- packs use the same schema and merge semantics as inheritance
  • A template with uses_packs gets all agents, departments, and config from those packs composed in, then its own definitions override/extend

This means packs serve dual purpose:

  1. Post-setup additive -- "Add a security team to my running org"
  2. Template composition -- "Build a new template from reusable team blocks"

Implementation

  • Packs are small YAML templates using the same schema as full templates
  • Apply via existing merge_template_configs() engine (same merge semantics as inheritance)
  • Add uses_packs resolution step in template loading: resolve after extends, before own fields
  • New API endpoint: POST /api/v1/company/apply-template-pack with pack name + optional variables
  • UI: "Add Team" button on org chart page, opens pack selection modal
  • Packs include reporting lines connecting to existing department heads

Pack storage

  • Built-in packs in src/synthorg/templates/packs/ (separate from builtins/)
  • User packs in ~/.synthorg/template-packs/

Acceptance Criteria

  • Pack YAML schema defined and validated (same as template schema, subset of fields)
  • Built-in packs created (security, data, QA, creative, design)
  • uses_packs field added to template schema (optional list of pack names)
  • Template loader resolves uses_packs after extends, before own fields
  • Existing templates without uses_packs work unchanged
  • POST /api/v1/company/apply-template-pack endpoint
  • Pack discovery service (built-in + user paths)
  • UI: pack selection modal on org chart page
  • Tests: pack merge, composition ordering, conflict resolution, backward compatibility

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowNice to have, can deferscope:large3+ days of workspec:human-interactionDESIGN_SPEC Section 13 - Human Interaction Layerspec:templatesDESIGN_SPEC Section 14 - Templates & Buildertype:featureNew feature implementationv0.5Minor version v0.5v0.5.8Patch release v0.5.8

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions