{
  "policy": {
    "version": 5,
    "patterns": {
      "version": 1,
      "method": "CURATED_PRACTICE_TOPIC",
      "notice": "Pattern topics identify design choices to practice. Read the ticket's acceptance criteria and justify the simplest suitable approach. Tags are not capability or ownership evidence; an untagged ticket has no curated pattern topic assigned."
    },
    "fieldMix": {
      "version": 1,
      "method": "CURATED_ESTIMATE",
      "notice": "Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence."
    },
    "contentStatus": "PRACTICE_BRIEF",
    "assessmentStatus": "NOT_QUALIFIED",
    "evidenceUse": "NONE",
    "aiPolicy": "AI tools are welcome during implementation. Record assumptions, review the result, and verify its behavior.",
    "notice": "Fictional engineering practice briefs. Starter repositories, fixtures, automated grading, and verified ownership are not included.",
    "outcomeEvidence": "Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.",
    "ownershipEvidence": "Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence."
  },
  "patternTopics": [
    {
      "id": "factory-method",
      "label": "Factory Method",
      "group": "Creational"
    },
    {
      "id": "abstract-factory",
      "label": "Abstract Factory",
      "group": "Creational"
    },
    {
      "id": "builder",
      "label": "Builder",
      "group": "Creational"
    },
    {
      "id": "prototype",
      "label": "Prototype",
      "group": "Creational"
    },
    {
      "id": "singleton",
      "label": "Singleton",
      "group": "Creational"
    },
    {
      "id": "adapter",
      "label": "Adapter",
      "group": "Structural"
    },
    {
      "id": "bridge",
      "label": "Bridge",
      "group": "Structural"
    },
    {
      "id": "composite",
      "label": "Composite",
      "group": "Structural"
    },
    {
      "id": "decorator",
      "label": "Decorator",
      "group": "Structural"
    },
    {
      "id": "facade",
      "label": "Facade",
      "group": "Structural"
    },
    {
      "id": "flyweight",
      "label": "Flyweight",
      "group": "Structural"
    },
    {
      "id": "proxy",
      "label": "Proxy",
      "group": "Structural"
    },
    {
      "id": "chain-of-responsibility",
      "label": "Chain of Responsibility",
      "group": "Behavioral"
    },
    {
      "id": "command",
      "label": "Command",
      "group": "Behavioral"
    },
    {
      "id": "interpreter",
      "label": "Interpreter",
      "group": "Behavioral"
    },
    {
      "id": "iterator",
      "label": "Iterator",
      "group": "Behavioral"
    },
    {
      "id": "mediator",
      "label": "Mediator",
      "group": "Behavioral"
    },
    {
      "id": "memento",
      "label": "Memento",
      "group": "Behavioral"
    },
    {
      "id": "observer",
      "label": "Observer",
      "group": "Behavioral"
    },
    {
      "id": "state",
      "label": "State",
      "group": "Behavioral"
    },
    {
      "id": "strategy",
      "label": "Strategy",
      "group": "Behavioral"
    },
    {
      "id": "template-method",
      "label": "Template Method",
      "group": "Behavioral"
    },
    {
      "id": "visitor",
      "label": "Visitor",
      "group": "Behavioral"
    },
    {
      "id": "ports-and-adapters",
      "label": "Ports and Adapters",
      "group": "Architectural"
    },
    {
      "id": "cqrs",
      "label": "CQRS",
      "group": "Architectural"
    },
    {
      "id": "strangler-fig",
      "label": "Strangler Fig",
      "group": "Architectural"
    },
    {
      "id": "saga",
      "label": "Saga",
      "group": "Distributed and reliability"
    },
    {
      "id": "transactional-outbox",
      "label": "Transactional Outbox",
      "group": "Distributed and reliability"
    },
    {
      "id": "circuit-breaker",
      "label": "Circuit Breaker",
      "group": "Distributed and reliability"
    },
    {
      "id": "bulkhead",
      "label": "Bulkhead",
      "group": "Distributed and reliability"
    }
  ],
  "projects": [
    {
      "id": "a344edd4-0f2f-4cdb-af59-b7bd3bbc5c06",
      "key": "BENV",
      "title": "Ephemeral review-environment lifecycle",
      "field": "Cloud infrastructure",
      "summary": "Manage short-lived review environments with bounded resources and safe cleanup.",
      "context": "A fictional product team creates preview environments for pull requests. Forgotten environments accumulate cost, and shared test data leaks between reviews.",
      "stack": [
        "TypeScript",
        "PostgreSQL",
        "Infrastructure plan fixtures"
      ],
      "prerequisites": [
        "Author a local environment-provider double and synthetic pull-request events; provision no external resources."
      ],
      "developerValue": "Practice resource lifecycle state machines, isolation, and reconciliation.",
      "companyValue": "Make review environments predictable, isolated, and accountable to a budget.",
      "delivery": "Deliver a local lifecycle controller and cleanup rehearsal using simulated resource records.",
      "phases": [
        {
          "id": "model",
          "title": "Model environment ownership",
          "goal": "Define identity, scope, and resource limits."
        },
        {
          "id": "manage",
          "title": "Manage lifecycle",
          "goal": "Create, update, expire, and reconcile environments."
        },
        {
          "id": "operate",
          "title": "Operate within bounds",
          "goal": "Verify cleanup safety and cost controls."
        }
      ],
      "tickets": [
        {
          "id": "8f4a4b8a-7701-4a3c-a570-e20723f5b5c7",
          "key": "BENV-101",
          "title": "Define review-environment identity independently of branch names",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 60,
          "phaseId": "model",
          "dependsOn": [],
          "scenario": "Renamed branches orphan their original preview resources.",
          "acceptanceCriteria": [
            "Use stable repository and change identities.",
            "Keep branch names as mutable labels.",
            "Record owner and expiry explicitly."
          ],
          "implementationNotes": [
            "Use fictional repositories and no real webhook subscription."
          ],
          "verification": [
            "Rename a synthetic branch without creating another environment.",
            "Reject conflicting repository identity reuse."
          ],
          "deliverables": [
            "Environment identity model."
          ],
          "rollout": "Adopt identity recording before resource creation.",
          "skills": [
            "Lifecycle modeling"
          ],
          "fieldMix": [
            {
              "field": "Cloud infrastructure",
              "percentage": 60
            },
            {
              "field": "Platform engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "05af66d5-b1f7-4b0d-a54b-5ad2e8bb5360",
          "key": "BENV-102",
          "title": "Set per-environment and per-team resource ceilings",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 120,
          "phaseId": "model",
          "dependsOn": [
            "BENV-101"
          ],
          "scenario": "One team opens enough previews to exhaust the shared database quota.",
          "acceptanceCriteria": [
            "Declare resource units and budget limits.",
            "Reserve capacity before creation.",
            "Reject requests exceeding either ceiling."
          ],
          "implementationNotes": [
            "Provider resources are simulated records."
          ],
          "verification": [
            "Reserve an allowed preview.",
            "Race requests at the limit and prevent over-allocation."
          ],
          "deliverables": [
            "Quota reservation logic."
          ],
          "rollout": "Start with low fixture quotas; release reservations only through terminal lifecycle actions.",
          "skills": [
            "Quota management"
          ],
          "fieldMix": [
            {
              "field": "Cloud infrastructure",
              "percentage": 70
            },
            {
              "field": "Platform engineering",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "9ef38c04-c504-49da-8fb2-6d3697fd9c89",
          "key": "BENV-103",
          "title": "Create environments through idempotent provider operations",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "manage",
          "dependsOn": [
            "BENV-102"
          ],
          "scenario": "A create timeout produces two environments for the same review.",
          "acceptanceCriteria": [
            "Persist a stable operation identity before dispatch.",
            "Adopt matching provider resources after retry.",
            "Reject conflicting provider ownership metadata."
          ],
          "implementationNotes": [
            "Use explicit provider interfaces and local doubles."
          ],
          "verification": [
            "Recover after an accepted create loses its response.",
            "Detect an existing resource owned by another review."
          ],
          "deliverables": [
            "Idempotent provision coordinator."
          ],
          "rollout": "Keep uncertain creates pending until reconciliation.",
          "skills": [
            "Provider design",
            "Idempotency"
          ],
          "fieldMix": [
            {
              "field": "Cloud infrastructure",
              "percentage": 50
            },
            {
              "field": "Distributed systems",
              "percentage": 50
            }
          ],
          "patterns": []
        },
        {
          "id": "f3d0b347-fc66-43fc-8fac-c9c79615a4c9",
          "key": "BENV-104",
          "title": "Seed synthetic review data in isolated namespaces",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "manage",
          "dependsOn": [
            "BENV-103"
          ],
          "scenario": "Two previews share account records and interfere with each other's review.",
          "acceptanceCriteria": [
            "Assign a unique data namespace per environment.",
            "Seed only synthetic records.",
            "Deny reads across environment namespaces."
          ],
          "implementationNotes": [
            "Never copy production user data into previews."
          ],
          "verification": [
            "Run two previews with identical synthetic usernames.",
            "Verify cross-environment reads and cleanup are denied."
          ],
          "deliverables": [
            "Isolated seed workflow."
          ],
          "rollout": "Validate isolation before marking environments ready.",
          "skills": [
            "Data isolation"
          ],
          "fieldMix": [
            {
              "field": "Security",
              "percentage": 50
            },
            {
              "field": "Cloud infrastructure",
              "percentage": 30
            },
            {
              "field": "Database engineering",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "8c93b4a3-553b-4f62-bbd5-e9db303976f6",
          "key": "BENV-105",
          "title": "Bind preview URLs and callbacks to the environment origin",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "manage",
          "dependsOn": [
            "BENV-104"
          ],
          "scenario": "A preview callback redirects to an unrelated origin supplied in change metadata.",
          "acceptanceCriteria": [
            "Derive allowed origins from trusted environment state.",
            "Reject arbitrary redirect and callback destinations.",
            "Expire origin authority when the environment closes."
          ],
          "implementationNotes": [
            "Use local URLs and do not contact external hosts."
          ],
          "verification": [
            "Accept the environment's declared local callback.",
            "Reject a substituted external origin and stale environment."
          ],
          "deliverables": [
            "Origin binding guard."
          ],
          "rollout": "Expose preview links only after origin validation.",
          "skills": [
            "Origin security"
          ],
          "fieldMix": [
            {
              "field": "Security",
              "percentage": 70
            },
            {
              "field": "Cloud infrastructure",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "df0fb766-4b33-4217-923a-3bba77eb0adc",
          "key": "BENV-106",
          "title": "Expire environments using leases rather than event delivery alone",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "manage",
          "dependsOn": [
            "BENV-103",
            "BENV-105"
          ],
          "scenario": "A missed close event leaves a preview running indefinitely.",
          "acceptanceCriteria": [
            "Persist expiry and extension revisions.",
            "Reclaim expired environments through a periodic scan.",
            "Reject stale extensions after cleanup starts."
          ],
          "implementationNotes": [
            "Lifecycle state changes use explicit transitions."
          ],
          "verification": [
            "Expire an environment with no close event.",
            "Race extension and cleanup without resurrecting deleted state."
          ],
          "deliverables": [
            "Lease-based expiry."
          ],
          "rollout": "Start with dry-run expiry reports; enable cleanup after ownership checks.",
          "skills": [
            "Leases",
            "State machines"
          ],
          "fieldMix": [
            {
              "field": "Cloud infrastructure",
              "percentage": 50
            },
            {
              "field": "Distributed systems",
              "percentage": 30
            },
            {
              "field": "Platform engineering",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "ed58fe64-6b0b-46c8-8743-c89b46d984fe",
          "key": "BENV-107",
          "title": "Reconcile partially created environments after provider failure",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 210,
          "phaseId": "manage",
          "dependsOn": [
            "BENV-103",
            "BENV-106"
          ],
          "scenario": "The database resource exists but the web resource failed, leaving an unusable partial preview.",
          "acceptanceCriteria": [
            "Record each provider resource identity.",
            "Resume or compensate according to lifecycle policy.",
            "Release quota only after owned resources are accounted for."
          ],
          "implementationNotes": [
            "Never delete resources without matching ownership metadata."
          ],
          "verification": [
            "Recover a partially created preview.",
            "Encounter a foreign resource and stop compensation safely."
          ],
          "deliverables": [
            "Partial-creation reconciler."
          ],
          "rollout": "Keep the environment unavailable until complete; retain reconciliation history.",
          "skills": [
            "Reconciliation",
            "Recovery"
          ],
          "fieldMix": [
            {
              "field": "Cloud infrastructure",
              "percentage": 50
            },
            {
              "field": "Distributed systems",
              "percentage": 30
            },
            {
              "field": "Site reliability",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "f59f1c83-434d-4969-8aa3-02964b604ad1",
          "key": "BENV-108",
          "title": "Produce a cleanup plan that proves exact resource ownership",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "operate",
          "dependsOn": [
            "BENV-107"
          ],
          "scenario": "A broad name-prefix cleanup could delete another team's preview.",
          "acceptanceCriteria": [
            "List exact resource IDs and ownership bindings.",
            "Bind deletion intent to lifecycle revision.",
            "Reject changed ownership or active lease."
          ],
          "implementationNotes": [
            "Cleanup applies only to the local provider double."
          ],
          "verification": [
            "Delete an expired owned environment.",
            "Reject a foreign or newly extended resource."
          ],
          "deliverables": [
            "Reviewed cleanup plan."
          ],
          "rollout": "Use dry-run output first; stop on any ownership mismatch.",
          "skills": [
            "Resource safety"
          ],
          "fieldMix": [
            {
              "field": "Security",
              "percentage": 50
            },
            {
              "field": "Cloud infrastructure",
              "percentage": 50
            }
          ],
          "patterns": []
        },
        {
          "id": "858dae45-ee39-471e-bc3f-36446294374e",
          "key": "BENV-109",
          "title": "Compare pooled and dedicated preview dependencies",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 300,
          "phaseId": "operate",
          "dependsOn": [
            "BENV-104",
            "BENV-108"
          ],
          "scenario": "Dedicated databases simplify isolation but cost more than a shared instance with namespaces.",
          "acceptanceCriteria": [
            "Compare isolation, startup time, cleanup, and quota assumptions.",
            "Rehearse cross-environment denial for the pooled option.",
            "Document failure domains and untested provider behavior."
          ],
          "implementationNotes": [
            "No speculative infrastructure is required beyond the local model."
          ],
          "verification": [
            "Evaluate both options against the same synthetic review workload.",
            "Reject a cheaper option that fails isolation requirements."
          ],
          "deliverables": [
            "Preview architecture decision record."
          ],
          "rollout": "Choose the smallest option satisfying isolation; keep migration and cleanup steps explicit.",
          "skills": [
            "Cloud architecture",
            "Tradeoff analysis"
          ],
          "fieldMix": [
            {
              "field": "System design",
              "percentage": 40
            },
            {
              "field": "Cloud infrastructure",
              "percentage": 40
            },
            {
              "field": "Security",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "309e2052-80cb-4951-babd-6ae160a1eccd",
          "key": "BENV-110",
          "title": "Write a stale-preview support checklist",
          "type": "CHORE",
          "priority": "LOW",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 60,
          "phaseId": "operate",
          "dependsOn": [
            "BENV-109"
          ],
          "scenario": "Reviewers need to know whether a broken preview is creating, expired, or awaiting cleanup.",
          "acceptanceCriteria": [
            "Expose lifecycle state and last safe failure category.",
            "Show owner, expiry, and review identity.",
            "Document scoped retry and extension behavior."
          ],
          "implementationNotes": [
            "Status contains no credentials or seed data."
          ],
          "verification": [
            "Diagnose an expired synthetic preview.",
            "Reject extension after irreversible cleanup begins."
          ],
          "deliverables": [
            "Preview support guide."
          ],
          "rollout": "Ship with lifecycle controls and update after state changes.",
          "skills": [
            "Operational UX"
          ],
          "fieldMix": [
            {
              "field": "Frontend",
              "percentage": 40
            },
            {
              "field": "Cloud infrastructure",
              "percentage": 30
            },
            {
              "field": "Site reliability",
              "percentage": 30
            }
          ],
          "patterns": []
        }
      ]
    }
  ]
}
