{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "version": "2.0.0",
  "description": "Template Registry for MORPH-SPEC Framework - Technology-based organization for multi-stack reusability",
  "lastUpdated": "2026-02-27",
  "migration": "v1 → v2: Migrated all templates to framework/, organized by technology (code/dotnet/, infrastructure/azure/, etc.) instead of by stack. This enables future stacks (vue-firebase, angular-mongodb) to reuse existing technology templates.",
  "kinds": {
    "template": "Rendered to an output file. Rich shape: id, name, path, category, phase, outputName (+ engine, placeholders).",
    "fragment": "A reference snippet read as an example, never rendered. Minimal shape: id, path, category, stack, description.",
    "project": "A whole compilable project registered as ONE unit — its files are not consumable one by one. Minimal shape: id, path, category, stack, description; `path` ends in \"/\" because it is a DIRECTORY. Every tracked file under it counts as registered (validate-framework.js Check 12), and a project directory with no tracked file is an error."
  },
  "categories": [
    "documentation",
    "code",
    "infrastructure",
    "context",
    "examples",
    "integration",
    "saas",
    "ui"
  ],
  "technologies": [
    "dotnet",
    "typescript",
    "sql",
    "github-actions",
    "docker",
    "handlebars"
  ],
  "templates": [
    {
      "id": "proposal",
      "kind": "template",
      "name": "Feature Proposal",
      "path": "docs/proposal.md",
      "location": "framework",
      "category": "documentation",
      "phase": "proposal",
      "required": true,
      "description": "Feature proposal with overview, problem statement, solution approach, and cost estimates",
      "outputName": "proposal.md",
      "placeholders": [
        "AUTHOR",
        "DATE",
        "STACK"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "spec",
      "kind": "template",
      "name": "Technical Specification",
      "path": "docs/spec.md",
      "location": "framework",
      "category": "documentation",
      "phase": "plan",
      "required": true,
      "description": "Detailed technical spec with architecture, data model, API contracts",
      "outputName": "spec.md",
      "placeholders": [
        "DATE",
        "FEATURE_NAME",
        "STACK"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "decisions",
      "kind": "template",
      "name": "Architecture Decision Records",
      "path": "feature/decisions.md",
      "location": "framework",
      "category": "documentation",
      "phase": "plan",
      "required": true,
      "description": "ADR format for documenting architectural decisions with context, alternatives, consequences",
      "outputName": "decisions.md",
      "placeholders": [
        "DATE"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "recap",
      "kind": "template",
      "name": "Feature Recap",
      "path": "feature/recap.md",
      "location": "framework",
      "category": "documentation",
      "phase": "implement",
      "required": true,
      "description": "Post-implementation summary with deliverables, metrics, lessons learned",
      "outputName": "recap.md",
      "placeholders": [
        "DATE",
        "FEATURE_NAME",
        "STACK"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "architecture",
      "kind": "template",
      "name": "Architecture Context",
      "path": "context/ARCHITECTURE.md",
      "location": "framework",
      "category": "context",
      "phase": "proposal",
      "required": false,
      "description": "Auto-scanned architecture context with entities, endpoints, pages, components, integrations, database tables, and package versions",
      "outputName": "ARCHITECTURE.md",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "spec-examples",
      "kind": "template",
      "name": "Spec Examples",
      "path": "examples/spec-examples.md",
      "location": "framework",
      "category": "examples",
      "phase": null,
      "required": false,
      "description": "Example technical specs for reference",
      "outputName": null,
      "placeholders": [],
      "stackSpecific": false,
      "engine": null,
      "deprecated": false,
      "technology": null,
      "validatePlaceholders": true
    },
    {
      "id": "design-system-examples",
      "kind": "template",
      "name": "Design System Examples",
      "path": "examples/design-system-examples.md",
      "location": "framework",
      "category": "examples",
      "phase": null,
      "required": false,
      "description": "Example design system definitions",
      "outputName": null,
      "placeholders": [],
      "stackSpecific": false,
      "engine": null,
      "deprecated": false,
      "technology": null,
      "validatePlaceholders": true
    },
    {
      "id": "dotnet-backend-test",
      "kind": "template",
      "name": ".NET Unit Test",
      "path": "code/dotnet/test.cs",
      "location": "framework",
      "category": "code",
      "phase": "implement",
      "required": false,
      "description": "xUnit test template with AAA pattern",
      "outputName": "{FeatureName}Tests.cs",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "dotnet-database-migration",
      "kind": "template",
      "name": "EF Core Migration",
      "path": "code/dotnet/database/migration.cs",
      "location": "framework",
      "category": "code",
      "phase": "implement",
      "required": false,
      "description": "EF Core migration template with Up/Down methods",
      "outputName": "{Timestamp}_{FeatureName}.cs",
      "placeholders": [
        "NAMESPACE"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "dotnet-jobs-hangfire",
      "kind": "template",
      "name": "Hangfire Background Job",
      "path": "code/dotnet/jobs/job.cs",
      "location": "framework",
      "category": "code",
      "phase": "implement",
      "required": false,
      "description": "Hangfire background job template with retry logic",
      "outputName": "{FeatureName}Job.cs",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "dotnet-jobs-agent",
      "kind": "template",
      "name": "MS Agent Framework Agent",
      "path": "code/dotnet/jobs/agent.cs",
      "location": "framework",
      "category": "code",
      "phase": "implement",
      "required": false,
      "description": "Microsoft Agent Framework agent template with prompt engineering",
      "outputName": "{FeatureName}Agent.cs",
      "placeholders": [
        "NAMESPACE"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "dotnet-contracts-readme",
      "kind": "template",
      "name": "Contracts README",
      "path": "code/dotnet/contracts/README.md",
      "location": "framework",
      "category": "documentation",
      "phase": "design",
      "required": false,
      "description": "Documentation for contract patterns and usage",
      "outputName": "README.md",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "dotnet-contracts-vsa",
      "kind": "template",
      "name": "Vertical Slice Architecture Contracts",
      "path": "code/dotnet/contracts/contracts-vsa.cs",
      "location": "framework",
      "category": "code",
      "phase": "design",
      "required": false,
      "description": "Feature slice completo: Abstractions, Entity, Errors, e um slice de operação (Request, Response, Validator, Handler, Endpoint). Padrão KanaiyaKatarmal (.NET 10, Minimal APIs, EF Core 10, FluentValidation 12, Scrutor 7).",
      "outputName": "contracts.cs",
      "placeholders": [
        "DATE",
        "NAMESPACE",
        "ROUTE"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "validatePlaceholders": true
    },
    {
      "id": "typescript-contracts",
      "kind": "template",
      "name": "TypeScript Contracts",
      "path": "code/typescript/contracts.ts",
      "location": "framework",
      "category": "code",
      "phase": "design",
      "required": false,
      "description": "TypeScript type definitions and interfaces",
      "outputName": "contracts.ts",
      "placeholders": [
        "DATE",
        "FEATURE_NAME"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "typescript",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "sql-postgresql-migration",
      "kind": "template",
      "name": "PostgreSQL Migration",
      "path": "code/sql/postgresql-migration.sql",
      "location": "framework",
      "category": "code",
      "phase": "implement",
      "required": false,
      "description": "PostgreSQL migration template (basic)",
      "outputName": "{timestamp}_{feature_name}.sql",
      "placeholders": [
        "DATE",
        "TABLE_NAME"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "sql",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "sql-postgresql-migration-enhanced",
      "kind": "template",
      "name": "PostgreSQL Migration (Enhanced)",
      "path": "code/sql/postgresql-migration.template.sql",
      "location": "framework",
      "category": "code",
      "phase": "implement",
      "required": false,
      "description": "Enhanced PostgreSQL migration with RLS and indexes",
      "outputName": "{timestamp}_{feature_name}_enhanced.sql",
      "placeholders": [
        "DATE",
        "DESCRIPTION",
        "FEATURE_NAME_HUMAN",
        "TABLE_NAME"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "sql",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "sql-rls-policy",
      "kind": "template",
      "name": "Row-Level Security Policy",
      "path": "code/sql/postgresql-rls-policy.sql",
      "location": "framework",
      "category": "code",
      "phase": "implement",
      "required": false,
      "description": "Row-level security policy template for PostgreSQL (Neon)",
      "outputName": "{table_name}_rls_policies.sql",
      "placeholders": [
        "DATE",
        "OPERATION",
        "POLICY_NAME",
        "TABLE_NAME",
        "USING_EXPRESSION",
        "WITH_CHECK_EXPRESSION"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "sql",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "docker-dockerfile-api",
      "kind": "template",
      "name": "Dockerfile (.NET API)",
      "path": "infrastructure/docker/dockerfile-api.dockerfile",
      "location": "framework",
      "category": "infrastructure",
      "phase": "implement",
      "required": false,
      "description": ".NET API Dockerfile for Coolify/Docker",
      "outputName": "Dockerfile.api",
      "placeholders": [],
      "stackSpecific": false,
      "engine": null,
      "deprecated": false,
      "technology": "docker",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "docker-dockerfile-web",
      "kind": "template",
      "name": "Dockerfile (Next.js Web)",
      "path": "infrastructure/docker/dockerfile-web.dockerfile",
      "location": "framework",
      "category": "infrastructure",
      "phase": "implement",
      "required": false,
      "description": "Next.js web Dockerfile for Coolify/Docker",
      "outputName": "Dockerfile.web",
      "placeholders": [],
      "stackSpecific": false,
      "engine": null,
      "deprecated": false,
      "technology": "docker",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "docker-dockerfile-generic",
      "kind": "template",
      "name": "Dockerfile (Generic)",
      "path": "infrastructure/docker/Dockerfile.template",
      "location": "framework",
      "category": "infrastructure",
      "phase": "implement",
      "required": false,
      "description": "Generic multi-stage Dockerfile template",
      "outputName": "Dockerfile",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "docker",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "docker-compose",
      "kind": "template",
      "name": "Docker Compose",
      "path": "infrastructure/docker/docker-compose.template.yml",
      "location": "framework",
      "category": "infrastructure",
      "phase": "implement",
      "required": false,
      "description": "Docker Compose for local development — one isolated stack per worktree (ports from the block, no container_name)",
      "outputName": "docker-compose.yml",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "docker",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "coolify-config",
      "kind": "template",
      "name": "Coolify Configuration",
      "path": "infrastructure/docker/coolify.template.json",
      "location": "framework",
      "category": "infrastructure",
      "phase": "implement",
      "required": false,
      "description": "Coolify deployment configuration — accessed via SSH + API, no MCP/CLI",
      "outputName": "coolify.json",
      "placeholders": [
        "GITHUB_OWNER",
        "GITHUB_REPO"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "docker",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "integration-asaas-client",
      "kind": "template",
      "name": "Asaas Financial Client",
      "path": "integrations/asaas-client.cs",
      "location": "framework",
      "category": "integration",
      "phase": "implement",
      "required": false,
      "description": "Asaas financial API client implementation",
      "outputName": "AsaasClient.cs",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "integration-asaas-webhook",
      "kind": "template",
      "name": "Asaas Webhook Handler",
      "path": "integrations/asaas-webhook.cs",
      "location": "framework",
      "category": "integration",
      "phase": "implement",
      "required": false,
      "description": "Asaas webhook handler for payment events",
      "outputName": "AsaasWebhookHandler.cs",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "integration-neon-auth",
      "kind": "template",
      "name": "Neon Auth Configuration",
      "path": "integrations/neon-auth-config.cs",
      "location": "framework",
      "category": "integration",
      "phase": "implement",
      "required": false,
      "description": "Neon Auth (Better Auth) EdDSA/Ed25519 JWT validation for .NET via BouncyCastle — cached JWKS provider + manual SignatureValidator (no OIDC discovery available)",
      "outputName": "NeonAuthConfig.cs",
      "placeholders": ["Namespace"],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "dotnet",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "ui-design-system-css",
      "kind": "template",
      "name": "Design System CSS",
      "path": "ui/design-system.css",
      "location": "framework",
      "category": "ui",
      "phase": "uiux",
      "required": false,
      "description": "CSS design tokens and variables (colors, spacing, typography)",
      "outputName": "design-system.css",
      "placeholders": [],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "css",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "ui-mockups",
      "kind": "template",
      "name": "UI Mockups",
      "path": "docs/ui-mockups.md",
      "location": "framework",
      "category": "documentation",
      "phase": "uiux",
      "required": false,
      "description": "Wireframes and layout specifications with ASCII mockups and responsive breakpoints",
      "outputName": "mockups.md",
      "placeholders": [
        "DATE",
        "FEATURE_NAME"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "ui-flows",
      "kind": "template",
      "name": "UI Flows",
      "path": "docs/ui-flows.md",
      "location": "framework",
      "category": "documentation",
      "phase": "uiux",
      "required": false,
      "description": "User flows and interaction patterns with state diagrams and edge cases",
      "outputName": "flows.md",
      "placeholders": [
        "DATE",
        "FEATURE_NAME"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "ui-components",
      "kind": "template",
      "name": "UI Components",
      "path": "docs/ui-components.md",
      "location": "framework",
      "category": "documentation",
      "phase": "uiux",
      "required": false,
      "description": "Component specifications mapping UI elements to shadcn/ui components with props and events",
      "outputName": "components.md",
      "placeholders": [
        "DATE",
        "FEATURE_NAME",
        "STACK"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "ui-design-system",
      "kind": "template",
      "name": "UI Design System",
      "path": "docs/ui-design-system.md",
      "location": "framework",
      "category": "documentation",
      "phase": "uiux",
      "required": false,
      "description": "Design system documentation with color palette, typography, spacing, and semantic tokens",
      "outputName": "design-system.md",
      "placeholders": [
        "DATE",
        "FEATURE_NAME",
        "PROJECT_NAME"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "technology": "handlebars",
      "validatePlaceholders": true
    },
    {
      "id": "github-workflow-dotnet-build",
      "kind": "template",
      "name": "GitHub Actions - .NET Build Workflow",
      "path": "infrastructure/github/workflows/dotnet-build.yml.hbs",
      "location": "framework",
      "category": "infrastructure",
      "technology": "github-actions",
      "phase": "build",
      "required": false,
      "description": "Reusable workflow for building .NET applications with restore, build, test, coverage",
      "outputName": "dotnet-build.yml",
      "placeholders": [
        "DOTNET_VERSION"
      ],
      "stackSpecific": false,
      "applicableStacks": [
        "nextjs-neon"
      ],
      "engine": "handlebars",
      "deprecated": false,
      "isFragment": true,
      "validatePlaceholders": true
    },
    {
      "id": "github-workflow-docker-build-push",
      "kind": "template",
      "name": "GitHub Actions - Docker Build & Push",
      "path": "infrastructure/github/workflows/docker-build-push.yml.hbs",
      "location": "framework",
      "category": "infrastructure",
      "technology": "github-actions",
      "phase": "build",
      "required": false,
      "description": "Reusable workflow for building and pushing Docker images to registry",
      "outputName": "docker-build-push.yml",
      "placeholders": [],
      "stackSpecific": false,
      "applicableStacks": [
        "nextjs-neon"
      ],
      "engine": "handlebars",
      "deprecated": false,
      "isFragment": true,
      "validatePlaceholders": true
    },
    {
      "id": "github-workflow-deploy-coolify",
      "kind": "template",
      "name": "GitHub Actions - Deploy to Coolify",
      "path": "infrastructure/github/workflows/deploy-coolify.yml.hbs",
      "location": "framework",
      "category": "infrastructure",
      "technology": "github-actions",
      "phase": "deploy",
      "required": false,
      "description": "Reusable workflow for deploying to Coolify via SSH (API is not publicly exposed)",
      "outputName": "deploy-coolify.yml",
      "placeholders": [],
      "stackSpecific": false,
      "applicableStacks": [
        "nextjs-neon"
      ],
      "engine": "handlebars",
      "deprecated": false,
      "isFragment": true,
      "validatePlaceholders": true
    },
    {
      "id": "github-action-docker-build-push",
      "kind": "template",
      "name": "GitHub Composite Action - Docker Build & Push",
      "path": "infrastructure/github/actions/docker-build-push/action.yml.hbs",
      "location": "framework",
      "category": "infrastructure",
      "technology": "github-actions",
      "phase": "build",
      "required": false,
      "description": "Composite action for building and pushing Docker images",
      "outputName": "action.yml",
      "placeholders": [],
      "stackSpecific": false,
      "applicableStacks": [
        "nextjs-neon"
      ],
      "engine": "handlebars",
      "deprecated": false,
      "isFragment": true,
      "validatePlaceholders": true
    },
    {
      "id": "github-action-health-check",
      "kind": "template",
      "name": "GitHub Composite Action - Health Check",
      "path": "infrastructure/github/actions/health-check/action.yml.hbs",
      "location": "framework",
      "category": "infrastructure",
      "technology": "github-actions",
      "phase": "deploy",
      "required": false,
      "description": "Composite action for polling health endpoint until ready",
      "outputName": "action.yml",
      "placeholders": [],
      "stackSpecific": false,
      "applicableStacks": [
        "nextjs-neon"
      ],
      "engine": "handlebars",
      "deprecated": false,
      "isFragment": true,
      "validatePlaceholders": true
    },
    {
      "id": "hop-squad-leader",
      "kind": "template",
      "name": "Squad Leader HOP",
      "path": "meta-prompts/squad-leaders/squad-leader.md",
      "location": "framework",
      "category": "meta-prompts",
      "technology": "handlebars",
      "phase": "implement",
      "required": false,
      "description": "Generic squad leader higher-order prompt with mission, domain-leaders, standards, tasks, deliverables, constraints",
      "outputName": "squad-leader-prompt.md",
      "placeholders": [
        "AGENT_ID",
        "CONSTRAINTS",
        "DELIVERABLES",
        "DOMAIN",
        "DOMAIN_LEADERS",
        "FEATURE_NAME",
        "MISSION",
        "SPEC_SUMMARY",
        "STANDARDS",
        "TASKS"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "hopType": "squad-leader",
      "validatePlaceholders": true
    },
    {
      "id": "hop-backend-squad",
      "kind": "template",
      "name": "Backend Squad Leader HOP",
      "path": "meta-prompts/squad-leaders/backend-squad.md",
      "location": "framework",
      "category": "meta-prompts",
      "technology": "handlebars",
      "phase": "implement",
      "required": false,
      "description": "Backend squad leader HOP for dotnet-senior with backend domain leaders, .NET 10 standards, architecture and security guidelines",
      "outputName": "backend-squad-prompt.md",
      "placeholders": [
        "ADDITIONAL_LEADERS",
        "AGENT_ID",
        "CONSTRAINTS",
        "DELIVERABLES",
        "FEATURE_NAME",
        "MISSION",
        "SPEC_SUMMARY",
        "TASKS"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "hopType": "squad-leader",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "hop-frontend-squad",
      "kind": "template",
      "name": "Frontend Squad Leader HOP",
      "path": "meta-prompts/squad-leaders/frontend-squad.md",
      "location": "framework",
      "category": "meta-prompts",
      "technology": "handlebars",
      "phase": "implement",
      "required": false,
      "description": "Frontend squad leader HOP for ui-designer with Next.js domain leaders and design system standards",
      "outputName": "frontend-squad-prompt.md",
      "placeholders": [
        "ADDITIONAL_LEADERS",
        "AGENT_ID",
        "CONSTRAINTS",
        "DELIVERABLES",
        "DOMAIN",
        "FEATURE_NAME",
        "MISSION",
        "SPEC_SUMMARY",
        "TASKS"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "hopType": "squad-leader",
      "applicableStacks": [
        "nextjs-neon"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "hop-checkpoint-validator",
      "kind": "template",
      "name": "Checkpoint Validator HOP",
      "path": "meta-prompts/validators/checkpoint-validator.md",
      "location": "framework",
      "category": "meta-prompts",
      "technology": "handlebars",
      "phase": "implement",
      "required": false,
      "description": "Checkpoint validator HOP running architecture, security, design-system, and packages validators with pass/fail decision logic",
      "outputName": "checkpoint-validator-prompt.md",
      "placeholders": [
        "CHECKPOINT_FREQUENCY",
        "CHECKPOINT_NUM",
        "FEATURE_NAME",
        "FILES_CHANGED",
        "RECENT_TASKS",
        "TASKS_COMPLETED",
        "TASKS_SINCE_LAST",
        "TASKS_TOTAL"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "hopType": "validator",
      "validatePlaceholders": true
    },
    {
      "id": "hop-pre-commit-validator",
      "kind": "template",
      "name": "Pre-Commit Validator HOP",
      "path": "meta-prompts/validators/pre-commit-validator.md",
      "location": "framework",
      "category": "meta-prompts",
      "technology": "handlebars",
      "phase": "implement",
      "required": false,
      "description": "Pre-commit hook validator HOP checking conventional commits, secrets, agent spec validity, and stack-specific rules",
      "outputName": "pre-commit-validator-prompt.md",
      "placeholders": [
        "BRANCH_NAME",
        "FEATURE_NAME",
        "STAGED_FILES",
        "STAGED_FILE_COUNT",
        "TODO"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "hopType": "validator",
      "validatePlaceholders": false
    },
    {
      "id": "hop-fusion-agent",
      "kind": "template",
      "name": "Fusion Agent HOP",
      "path": "meta-prompts/fusion/fusion-agent.md",
      "location": "framework",
      "category": "meta-prompts",
      "technology": "handlebars",
      "phase": "implement",
      "required": false,
      "description": "F-Thread fusion participant HOP with approach hints per thread index (standard, alternative, optimized) and self-assessment scoring",
      "outputName": "fusion-agent-prompt.md",
      "placeholders": [
        "AGENT_ID",
        "DELIVERABLES",
        "FUSION_STRATEGY",
        "SPEC_SUMMARY",
        "STANDARDS",
        "TASK_DESCRIPTION",
        "THREAD_COUNT",
        "THREAD_COUNT_MINUS_ONE",
        "THREAD_ID",
        "THREAD_INDEX"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "hopType": "fusion",
      "validatePlaceholders": true
    },
    {
      "id": "hop-fusion-aggregator",
      "kind": "template",
      "name": "Fusion Aggregator HOP",
      "path": "meta-prompts/fusion/fusion-aggregator.md",
      "location": "framework",
      "category": "meta-prompts",
      "technology": "handlebars",
      "phase": "implement",
      "required": false,
      "description": "F-Thread aggregator HOP that scores and selects the winning implementation using best-of-n, consensus, or manual-select strategies",
      "outputName": "fusion-aggregator-prompt.md",
      "placeholders": [
        "AGENT_1",
        "AGENT_2",
        "AGENT_3",
        "FEATURE_NAME",
        "FUSION_RESULTS",
        "FUSION_STRATEGY",
        "SESSION_ID",
        "THREAD_COUNT",
        "WINNING_AGENT",
        "WINNING_SCORE",
        "WINNING_THREAD"
      ],
      "stackSpecific": false,
      "engine": "handlebars",
      "deprecated": false,
      "hopType": "fusion",
      "validatePlaceholders": true
    },
    {
      "id": "dotnet-abstractions-handler",
      "kind": "fragment",
      "path": "code/dotnet/abstractions/handler.cs",
      "category": "abstractions",
      "stack": "dotnet",
      "description": "IHandler<TRequest, TResponse> interface",
      "consumption": "reference"
    },
    {
      "id": "dotnet-abstractions-result",
      "kind": "fragment",
      "path": "code/dotnet/abstractions/result.cs",
      "category": "abstractions",
      "stack": "dotnet",
      "description": "Result<T> railway-oriented pattern",
      "consumption": "reference"
    },
    {
      "id": "dotnet-abstractions-error",
      "kind": "fragment",
      "path": "code/dotnet/abstractions/error.cs",
      "category": "abstractions",
      "stack": "dotnet",
      "description": "Error record + ErrorType enum + ValidationError",
      "consumption": "reference"
    },
    {
      "id": "dotnet-abstractions-api-endpoint",
      "kind": "fragment",
      "path": "code/dotnet/abstractions/api-endpoint.cs",
      "category": "abstractions",
      "stack": "dotnet",
      "description": "IApiEndpoint interface for minimal APIs",
      "consumption": "reference"
    },
    {
      "id": "dotnet-extensions-handler-registration",
      "kind": "fragment",
      "path": "code/dotnet/extensions/handler-registration.cs",
      "category": "extensions",
      "stack": "dotnet",
      "description": "Scrutor handler auto-discovery + decorators",
      "consumption": "reference"
    },
    {
      "id": "dotnet-extensions-map-endpoints",
      "kind": "fragment",
      "path": "code/dotnet/extensions/map-endpoints.cs",
      "category": "extensions",
      "stack": "dotnet",
      "description": "IApiEndpoint auto-discovery + mapping",
      "consumption": "reference"
    },
    {
      "id": "dotnet-extensions-result-extensions",
      "kind": "fragment",
      "path": "code/dotnet/extensions/result-extensions.cs",
      "category": "extensions",
      "stack": "dotnet",
      "description": "Match() pattern matching for Result<T>",
      "consumption": "reference"
    },
    {
      "id": "dotnet-extensions-database",
      "kind": "fragment",
      "path": "code/dotnet/extensions/database-extensions.cs",
      "category": "extensions",
      "stack": "dotnet",
      "description": "EF Core + Npgsql database configuration",
      "consumption": "reference"
    },
    {
      "id": "dotnet-extensions-health-checks",
      "kind": "fragment",
      "path": "code/dotnet/extensions/health-checks.cs",
      "category": "extensions",
      "stack": "dotnet",
      "description": "Health check configuration",
      "consumption": "reference"
    },
    {
      "id": "dotnet-pipelines-validation-decorator",
      "kind": "fragment",
      "path": "code/dotnet/pipelines/validation-decorator.cs",
      "category": "pipelines",
      "stack": "dotnet",
      "description": "FluentValidation decorator for handlers",
      "consumption": "reference"
    },
    {
      "id": "dotnet-pipelines-logging-decorator",
      "kind": "fragment",
      "path": "code/dotnet/pipelines/logging-decorator.cs",
      "category": "pipelines",
      "stack": "dotnet",
      "description": "Logging decorator with duration tracking",
      "consumption": "reference"
    },
    {
      "id": "dotnet-exceptions-handler",
      "kind": "fragment",
      "path": "code/dotnet/exceptions/exception-handler.cs",
      "category": "exceptions",
      "stack": "dotnet",
      "description": "IExceptionHandler with ProblemDetails",
      "consumption": "reference"
    },
    {
      "id": "dotnet-constants-api-tags",
      "kind": "fragment",
      "path": "code/dotnet/constants/api-tags.cs",
      "category": "constants",
      "stack": "dotnet",
      "description": "ApiTags constants for endpoint grouping",
      "consumption": "reference"
    },
    {
      "id": "dotnet-feature-endpoint",
      "kind": "fragment",
      "path": "code/dotnet/feature/endpoint.cs.hbs",
      "category": "feature",
      "stack": "dotnet",
      "description": "VSA feature endpoint (IApiEndpoint)",
      "consumption": "reference"
    },
    {
      "id": "dotnet-feature-handler",
      "kind": "fragment",
      "path": "code/dotnet/feature/handler.cs.hbs",
      "category": "feature",
      "stack": "dotnet",
      "description": "VSA feature handler (IHandler)",
      "consumption": "reference"
    },
    {
      "id": "dotnet-feature-validator",
      "kind": "fragment",
      "path": "code/dotnet/feature/validator.cs.hbs",
      "category": "feature",
      "stack": "dotnet",
      "description": "VSA feature validator (AbstractValidator)",
      "consumption": "reference"
    },
    {
      "id": "dotnet-feature-request",
      "kind": "fragment",
      "path": "code/dotnet/feature/request.cs.hbs",
      "category": "feature",
      "stack": "dotnet",
      "description": "VSA feature request (sealed record)",
      "consumption": "reference"
    },
    {
      "id": "dotnet-feature-response",
      "kind": "fragment",
      "path": "code/dotnet/feature/response.cs.hbs",
      "category": "feature",
      "stack": "dotnet",
      "description": "VSA feature response (sealed record)",
      "consumption": "reference"
    },
    {
      "id": "dotnet-feature-errors",
      "kind": "fragment",
      "path": "code/dotnet/feature/errors.cs.hbs",
      "category": "feature",
      "stack": "dotnet",
      "description": "VSA feature error factory",
      "consumption": "reference"
    },
    {
      "id": "dotnet-feature-entity",
      "kind": "fragment",
      "path": "code/dotnet/feature/entity.cs.hbs",
      "category": "feature",
      "stack": "dotnet",
      "description": "VSA feature entity",
      "consumption": "reference"
    },
    {
      "id": "gsap-scroll-section",
      "kind": "template",
      "path": "frontend/nextjs/gsap-scroll-section.tsx.hbs",
      "category": "ui",
      "stack": "nextjs",
      "description": "Scroll-animated section using GSAP ScrollTrigger with useGSAP hook and reduced-motion check",
      "consumption": "reference",
      "name": "GSAP Scroll Section",
      "engine": "handlebars",
      "deprecated": false,
      "phase": null,
      "outputName": null,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "maf-agent-bootstrap",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/dotnet/ai-agents/AgentBootstrap.cs.template",
      "category": "ai-agents",
      "stack": "dotnet",
      "description": "DI extension method to register ModelRegistry + a default MAF agent"
    },
    {
      "id": "maf-embedding-service",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/dotnet/ai-agents/EmbeddingService.cs.template",
      "category": "ai-agents",
      "stack": "dotnet",
      "description": "Generates embeddings for RAG indexing and query via IEmbeddingGenerator"
    },
    {
      "id": "maf-model-registry",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/dotnet/ai-agents/ModelRegistry.cs.template",
      "category": "ai-agents",
      "stack": "dotnet",
      "description": "Reads config/model-registry.json at startup, exposes IChatClient by alias"
    },
    {
      "id": "maf-prompt-repository",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/dotnet/ai-agents/PromptRepository.cs.template",
      "category": "ai-agents",
      "stack": "dotnet",
      "description": "Loads agent system prompts from the agent_prompts table, with caching"
    },
    {
      "id": "maf-resilient-tool-middleware",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/dotnet/ai-agents/ResilientToolMiddleware.cs.template",
      "category": "ai-agents",
      "stack": "dotnet",
      "description": "Function-calling middleware: retry/rate-limit resilience + arg validation"
    },
    {
      "id": "maf-vector-search-tool",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/dotnet/ai-agents/VectorSearchTool.cs.template",
      "category": "ai-agents",
      "stack": "dotnet",
      "description": "Typed MAF tool retrieving relevant chunks from the pgvector knowledge base"
    },
    {
      "id": "ai-kit",
      "kind": "project",
      "path": "dotnet/ai-kit/",
      "category": "ai-agents",
      "stack": "dotnet",
      "description": "Morph.AiKit — solucao .NET compilavel que prova os standards ai-agents contra framework/ai-pin.json"
    },
    {
      "id": "maf-model-registry-config",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/dotnet/ai-agents/model-registry.json.template",
      "category": "ai-agents",
      "stack": "dotnet",
      "description": "config/model-registry.json — single source of truth for model selection"
    },
    {
      "id": "maf-agent-prompts-migration",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/sql/ai-agents/agent-prompts-migration.sql.template",
      "category": "code",
      "stack": "dotnet",
      "description": "SQL migration: agent_prompts table for versioned, runtime-editable prompts"
    },
    {
      "id": "maf-pgvector-embeddings-migration",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/sql/ai-agents/pgvector-embeddings-migration.sql.template",
      "category": "code",
      "stack": "dotnet",
      "description": "SQL migration: kb_embeddings table for custom RAG chunk storage with pgvector"
    },
    {
      "id": "dotnet-database-vector-entity",
      "kind": "fragment",
      "consumption": "reference",
      "path": "code/dotnet/database/vector-entity.cs",
      "category": "code",
      "stack": "dotnet",
      "description": "pgvector entity + EF Core configuration template"
    },
    {
      "id": "nextjs-page",
      "kind": "template",
      "consumption": "generated",
      "name": "Next.js Feature Page",
      "path": "frontend/nextjs/page.tsx.hbs",
      "category": "ui",
      "phase": null,
      "outputName": null,
      "description": "Server component page for a dashboard feature route",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "nextjs-client-component",
      "kind": "template",
      "consumption": "generated",
      "name": "Next.js Client Component",
      "path": "frontend/nextjs/client-component.tsx.hbs",
      "category": "ui",
      "phase": null,
      "outputName": null,
      "description": "Client component listing feature records",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "nextjs-feature-form",
      "kind": "template",
      "consumption": "generated",
      "name": "Next.js Feature Form",
      "path": "frontend/nextjs/feature-form.tsx.hbs",
      "category": "ui",
      "phase": null,
      "outputName": null,
      "description": "Client form component for creating a feature record",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "nextjs-use-feature",
      "kind": "template",
      "consumption": "generated",
      "name": "Next.js Feature Hook",
      "path": "frontend/nextjs/use-feature.ts.hbs",
      "category": "ui",
      "phase": null,
      "outputName": null,
      "description": "Data-fetching hook for a feature",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "nextjs-dockerfile",
      "kind": "template",
      "consumption": "reference",
      "name": "Next.js Dockerfile",
      "path": "frontend/nextjs/Dockerfile.nextjs.hbs",
      "category": "infrastructure",
      "phase": null,
      "outputName": null,
      "description": "Multi-stage Dockerfile for a Next.js standalone build",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "nextjs-env-mjs",
      "kind": "template",
      "consumption": "reference",
      "name": "Next.js Env Schema",
      "path": "frontend/nextjs/env.mjs.hbs",
      "category": "ui",
      "phase": null,
      "outputName": null,
      "description": "Type-safe environment variable schema (env.mjs)",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "nextjs-tsconfig",
      "kind": "template",
      "consumption": "reference",
      "name": "Next.js tsconfig",
      "path": "frontend/nextjs/tsconfig.json.hbs",
      "category": "ui",
      "phase": null,
      "outputName": null,
      "description": "TypeScript configuration for a Next.js project",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "clarifications",
      "kind": "template",
      "consumption": "generated",
      "name": "Clarifications",
      "path": "docs/clarifications.md",
      "category": "documentation",
      "phase": null,
      "outputName": null,
      "description": "Clarification questions and answers captured during the proposal phase",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [
        "DATE",
        "FEATURE_NAME",
        "FEATURE_NAME_TITLE",
        "FRAMEWORK_VERSION"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "onboarding",
      "kind": "template",
      "consumption": "generated",
      "name": "Onboarding Guide",
      "path": "docs/onboarding.md",
      "category": "documentation",
      "phase": null,
      "outputName": null,
      "description": "Generated onboarding guide for a project",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [
        "AGENTS_LIST",
        "ARCHITECTURE",
        "AVAILABLE_MCPS",
        "DATE",
        "PROJECT_NAME",
        "STACK",
        "STANDARDS_SUMMARY",
        "VERSION",
        "WORKFLOW_SUMMARY"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "schema-analysis",
      "kind": "template",
      "consumption": "generated",
      "name": "Schema Analysis",
      "path": "docs/schema-analysis.md",
      "category": "documentation",
      "phase": null,
      "outputName": null,
      "description": "Database schema analysis for a feature",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [
        "AUTHOR",
        "DATE",
        "FEATURE_NAME",
        "FEATURE_NAME_TITLE",
        "FRAMEWORK_VERSION"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "user-stories",
      "kind": "template",
      "consumption": "generated",
      "name": "User Stories",
      "path": "docs/user-stories.md",
      "category": "documentation",
      "phase": null,
      "outputName": null,
      "description": "User stories captured for a feature",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "context-design-system",
      "kind": "template",
      "consumption": "reference",
      "name": "Design System Context",
      "path": "context/design-system.md",
      "category": "context",
      "phase": null,
      "outputName": null,
      "description": "Design system context document — copy to .morph/context/design-system.md",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "claude-md-core",
      "kind": "template",
      "consumption": "reference",
      "name": "CLAUDE.md (core)",
      "path": "CLAUDE.md.core.template",
      "category": "documentation",
      "phase": null,
      "outputName": null,
      "description": "CLAUDE.md project-instructions template for a new morph-spec project",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "claude-md-core-guide",
      "kind": "template",
      "consumption": "reference",
      "name": "CLAUDE.md Authoring Guide",
      "path": "CLAUDE.md.core.guide.md",
      "category": "documentation",
      "phase": null,
      "outputName": null,
      "description": "Authoring guide explaining how to fill in the CLAUDE.md core template",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    },
    {
      "id": "state-template",
      "kind": "template",
      "consumption": "reference",
      "name": "state.json",
      "path": "state.template.json",
      "category": "context",
      "phase": null,
      "outputName": null,
      "description": "Initial .morph/state.json scaffold for a new project",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [
        "PROJECT_NAME",
        "PROJECT_TYPE",
        "TIMESTAMP"
      ],
      "validatePlaceholders": true
    },
    {
      "id": "tasks-template",
      "kind": "template",
      "consumption": "reference",
      "name": "tasks.json",
      "path": "tasks.template.json",
      "category": "context",
      "phase": null,
      "outputName": null,
      "description": "Initial tasks.json scaffold",
      "engine": "handlebars",
      "deprecated": false,
      "placeholders": [],
      "validatePlaceholders": true
    }
  ]
}
