{
  "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": "c502b2f2-cff3-432b-858c-1daa41526fe9",
      "key": "ACDC",
      "title": "Move customer preferences through a durable change feed",
      "field": "Data engineering",
      "summary": "Replicate a bounded preference dataset while preserving deletion and ordering semantics.",
      "context": "A fictional messaging service builds a read model from database changes. Restarts and schema changes can re-enable preferences that customers disabled.",
      "stack": [
        "PostgreSQL",
        "TypeScript",
        "Object storage"
      ],
      "prerequisites": [
        "Create synthetic preference records and a replayable local change log.",
        "Use adapters or fixtures without provisioning a production broker."
      ],
      "developerValue": "Practice change-feed ordering, snapshots and privacy-preserving deletion.",
      "companyValue": "Review whether replicated customer preferences remain correct during recovery.",
      "delivery": "Ten scoped tickets across three phases. Build a synthetic local service or select a ticket after recreating its prerequisites; estimates exclude setup.",
      "phases": [
        {
          "id": "feed",
          "title": "Specify the change contract",
          "goal": "Identify ordering, identities and deletions."
        },
        {
          "id": "replica",
          "title": "Build the projection",
          "goal": "Handle duplicates, schema changes and snapshot handoff."
        },
        {
          "id": "repair",
          "title": "Repair feed gaps",
          "goal": "Detect divergence and recover scoped replicas."
        }
      ],
      "tickets": [
        {
          "id": "81e372c8-d8fc-49f7-ba62-0d0e4fe4332e",
          "key": "ACDC-101",
          "title": "Define the preference change envelope with source position",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 90,
          "phaseId": "feed",
          "dependsOn": [],
          "scenario": "The consumer sees a timestamp and payload but cannot distinguish two changes committed in the same millisecond.",
          "acceptanceCriteria": [
            "Include stable source position, record identity and operation.",
            "Separate source commit time from consumer receipt time.",
            "Validate the envelope version before applying changes."
          ],
          "implementationNotes": [
            "Use fabricated positions from a deterministic local log."
          ],
          "verification": [
            "Parse two same-time changes with distinct positions.",
            "Reject an unknown envelope version without moving the checkpoint."
          ],
          "deliverables": [
            "Change envelope schema"
          ],
          "rollout": "Publish the contract before consumer rollout; quarantine unsupported versions.",
          "skills": [
            "Data contracts",
            "Ordering"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 60
            },
            {
              "field": "API design",
              "percentage": 20
            },
            {
              "field": "Distributed systems",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "51c976e2-0df0-4285-87a0-e8df9dfa3106",
          "key": "ACDC-102",
          "title": "Redact preference change diagnostics without losing traceability",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 75,
          "phaseId": "feed",
          "dependsOn": [
            "ACDC-101"
          ],
          "scenario": "Malformed preference payloads are dumped into generic logs with email addresses and free-text notes.",
          "acceptanceCriteria": [
            "Log source position, safe record token and reason code.",
            "Exclude contact details and raw payload bodies.",
            "Retain restricted diagnostic access only through a scoped fixture store."
          ],
          "implementationNotes": [
            "Use synthetic contact data in disclosure tests."
          ],
          "verification": [
            "Locate a rejected envelope through its safe identifiers.",
            "Inject contact fields and assert they never appear in generic logs."
          ],
          "deliverables": [
            "Sanitized diagnostics and disclosure checks"
          ],
          "rollout": "Deploy redaction before replay; restrict access to older diagnostic output.",
          "skills": [
            "Privacy",
            "Observability"
          ],
          "fieldMix": [
            {
              "field": "Privacy engineering",
              "percentage": 60
            },
            {
              "field": "Data engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "f0c28953-2ab2-4eca-9a51-45343b9863dc",
          "key": "ACDC-103",
          "title": "Represent preference deletion as a durable tombstone",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "feed",
          "dependsOn": [
            "ACDC-101"
          ],
          "scenario": "A deleted record disappears from the source snapshot but remains enabled in a downstream projection indefinitely.",
          "acceptanceCriteria": [
            "Define tombstones with identity and source position.",
            "Retain enough ordering metadata to reject stale recreation.",
            "Separate deletion from a false preference value."
          ],
          "implementationNotes": [
            "Document retention assumptions for replayable tombstones."
          ],
          "verification": [
            "Apply deletion and verify the projected record is absent.",
            "Replay an older enable event and keep the record deleted."
          ],
          "deliverables": [
            "Tombstone contract and ordering cases"
          ],
          "rollout": "Enable tombstone production before cleanup; stop purging if replay coverage is uncertain.",
          "skills": [
            "Deletion semantics",
            "Change data"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 70
            },
            {
              "field": "Database engineering",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "ba4cda6b-197b-4e8f-9aa4-e4f658e3317c",
          "key": "ACDC-104",
          "title": "Advance the feed checkpoint only with the projected transaction",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 210,
          "phaseId": "replica",
          "dependsOn": [
            "ACDC-101",
            "ACDC-103"
          ],
          "scenario": "The consumer acknowledges a change before updating the read model; a crash permanently loses the disabled preference.",
          "acceptanceCriteria": [
            "Apply projection and checkpoint in one durable transaction.",
            "Duplicate delivery is a no-op at the same position.",
            "Failed application leaves the previous checkpoint intact."
          ],
          "implementationNotes": [
            "Scope checkpoints to source partition and consumer generation."
          ],
          "verification": [
            "Replay a committed change and keep one result.",
            "Fail between modeled projection and checkpoint writes and retry successfully."
          ],
          "deliverables": [
            "Transactional consumer and interruption test"
          ],
          "rollout": "Canary one synthetic partition; stop consumption on checkpoint divergence.",
          "skills": [
            "Transactions",
            "Idempotency"
          ],
          "fieldMix": [
            {
              "field": "Database engineering",
              "percentage": 50
            },
            {
              "field": "Data engineering",
              "percentage": 50
            }
          ],
          "patterns": []
        },
        {
          "id": "8f5ef06b-f68e-4104-91e2-1b39a5b070f6",
          "key": "ACDC-105",
          "title": "Reject a stale preference update after a partition retry",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "ADVANCED",
          "estimateMinutes": 210,
          "phaseId": "replica",
          "dependsOn": [
            "ACDC-104"
          ],
          "scenario": "A retry queue delivers an old enable event after a newer disable event has already committed.",
          "acceptanceCriteria": [
            "Compare per-record source ordering before mutation.",
            "Retain stale-delivery counters without changing state.",
            "Treat equal position with different content as a conflict."
          ],
          "implementationNotes": [
            "Do not use consumer wall time to resolve ordering."
          ],
          "verification": [
            "Deliver disable before an older enable and retain disabled.",
            "Send contradictory equal-position data and quarantine the conflict."
          ],
          "deliverables": [
            "Per-record ordering guard"
          ],
          "rollout": "Observe stale counts during canary; pause conflicting partitions instead of guessing order.",
          "skills": [
            "Event ordering",
            "Conflict handling"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 60
            },
            {
              "field": "Distributed systems",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "30271801-6be0-471d-8fa8-532e6216ddfb",
          "key": "ACDC-106",
          "title": "Handoff a preference snapshot to live changes without a gap",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "EXPERT",
          "estimateMinutes": 360,
          "phaseId": "replica",
          "dependsOn": [
            "ACDC-104",
            "ACDC-105"
          ],
          "scenario": "A new replica loads a snapshot while preferences continue changing, leaving a gap between export time and stream start.",
          "acceptanceCriteria": [
            "Record an explicit snapshot boundary position.",
            "Buffer or replay changes after the boundary before activation.",
            "Keep the new generation unavailable until catch-up is complete."
          ],
          "implementationNotes": [
            "Document source guarantees needed for a consistent boundary."
          ],
          "verification": [
            "Change a preference during snapshot loading and reach final source state.",
            "Interrupt catch-up and verify readers still use the previous generation."
          ],
          "deliverables": [
            "Snapshot handoff protocol and executable timeline"
          ],
          "rollout": "Build a shadow generation; restore the previous pointer if catch-up checks fail.",
          "skills": [
            "Snapshot consistency",
            "Recovery"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 50
            },
            {
              "field": "Distributed systems",
              "percentage": 50
            }
          ],
          "patterns": []
        },
        {
          "id": "42019ae5-ec7d-4c68-a4b5-94eeac29eb25",
          "key": "ACDC-107",
          "title": "Evolve a preference value enum without silently coercing unknown values",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "replica",
          "dependsOn": [
            "ACDC-101",
            "ACDC-106"
          ],
          "scenario": "A new source value called paused is mapped to enabled by the old consumer's default branch.",
          "acceptanceCriteria": [
            "Use an explicit compatibility map for each envelope version.",
            "Unknown values enter quarantine without checkpoint loss.",
            "Document how a compatible consumer resumes blocked input."
          ],
          "implementationNotes": [
            "Avoid treating missing values as an affirmative preference."
          ],
          "verification": [
            "Apply known values under both supported versions.",
            "Deliver paused to an incompatible consumer and verify no enable write."
          ],
          "deliverables": [
            "Version compatibility matrix and consumer guard"
          ],
          "rollout": "Deploy compatible readers before writers; retain queued unsupported changes for replay.",
          "skills": [
            "Schema evolution",
            "Fail-closed handling"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 70
            },
            {
              "field": "API design",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "90e815c7-d1c8-4629-8802-a2c5acbbb460",
          "key": "ACDC-108",
          "title": "Compare source and replica preferences without exporting contacts",
          "type": "CHORE",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 180,
          "phaseId": "repair",
          "dependsOn": [
            "ACDC-106",
            "ACDC-107"
          ],
          "scenario": "Operators suspect a gap but a full data export would spread contact information across incident tooling.",
          "acceptanceCriteria": [
            "Compare keyed hashes and safe row counts by bounded scope.",
            "Report missing, extra and mismatched record tokens.",
            "Keep raw preference payloads out of the report."
          ],
          "implementationNotes": [
            "Use stable canonical hashing and documented null handling."
          ],
          "verification": [
            "Compare equal synthetic source and replica states.",
            "Alter one value and delete one row; identify both discrepancy categories."
          ],
          "deliverables": [
            "Scoped reconciliation report"
          ],
          "rollout": "Run read-only reconciliation first; expire generated diagnostic artifacts after review.",
          "skills": [
            "Reconciliation",
            "Privacy"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 60
            },
            {
              "field": "Privacy engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "4bf42677-4979-442a-bc68-edf6bb5e2584",
          "key": "ACDC-109",
          "title": "Repair one preference partition while continuing unrelated reads",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "EXPERT",
          "estimateMinutes": 360,
          "phaseId": "repair",
          "dependsOn": [
            "ACDC-106",
            "ACDC-108"
          ],
          "scenario": "One replica partition is corrupted; rebuilding the entire preference service would unnecessarily interrupt all accounts.",
          "acceptanceCriteria": [
            "Rebuild only the selected source scope into a new generation.",
            "Catch up from the recorded boundary before pointer swap.",
            "Prevent repaired and old generations from mixing in one scoped read."
          ],
          "implementationNotes": [
            "Require a dry-run plan and explicit partition identity."
          ],
          "verification": [
            "Repair a synthetic partition and preserve unrelated output hashes.",
            "Interrupt before swap and retain complete reads from the old generation."
          ],
          "deliverables": [
            "Partition repair command and atomic-read probe"
          ],
          "rollout": "Canary repair on a synthetic scope; switch its pointer back if reconciliation fails.",
          "skills": [
            "Scoped recovery",
            "Consistency"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 50
            },
            {
              "field": "Distributed systems",
              "percentage": 30
            },
            {
              "field": "Database engineering",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "3132975b-e0dd-4d83-b9e1-fbf264c0ad6c",
          "key": "ACDC-110",
          "title": "Expose replica freshness with a trustworthy unknown state",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 90,
          "phaseId": "repair",
          "dependsOn": [
            "ACDC-108",
            "ACDC-109"
          ],
          "scenario": "The dashboard marks a replica healthy when its consumer is running even though no source checkpoint has been observed.",
          "acceptanceCriteria": [
            "Show applied source position and receipt lag separately.",
            "Report unknown when no comparable source watermark exists.",
            "Define stale thresholds in the local operating contract."
          ],
          "implementationNotes": [
            "Never infer source completeness from process liveness."
          ],
          "verification": [
            "Advance source and replica positions and calculate the documented lag.",
            "Remove the source watermark and return unknown health."
          ],
          "deliverables": [
            "Freshness endpoint and unknown-state cases"
          ],
          "rollout": "Add freshness as advisory status first; restore the prior view while preserving unknown semantics.",
          "skills": [
            "Observability",
            "Data semantics"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 60
            },
            {
              "field": "Site reliability",
              "percentage": 40
            }
          ],
          "patterns": []
        }
      ]
    }
  ]
}
