{
  "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": "dedbc308-dfea-443f-bdbd-4490bed97c3f",
      "key": "ASAGA",
      "title": "Coordinate equipment returns with explicit compensations",
      "field": "Distributed systems",
      "summary": "Recover a multi-step return workflow across inspection, shipping and refund providers.",
      "context": "A fictional equipment-rental service approves returns through several provider calls. Partial failures leave labels issued without inspections or refunds reported before provider confirmation.",
      "stack": [
        "TypeScript",
        "PostgreSQL",
        "Provider interfaces"
      ],
      "prerequisites": [
        "Create synthetic return records and fake inspection, shipping and refund adapters.",
        "Use integer money values and no real payments or messages."
      ],
      "developerValue": "Practice durable workflow state, compensation and uncertain outcomes.",
      "companyValue": "Review recoverable business operations without assuming distributed transactions.",
      "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": "steps",
          "title": "Define workflow facts",
          "goal": "Separate requested actions from observed outcomes."
        },
        {
          "id": "orchestrate",
          "title": "Persist multi-step progress",
          "goal": "Make effects idempotent and compensation explicit."
        },
        {
          "id": "recover",
          "title": "Reconcile uncertain work",
          "goal": "Exercise crashes and publish accurate operational status."
        }
      ],
      "tickets": [
        {
          "id": "64eaa48b-00e3-4ffd-9ed5-c9d991c7563a",
          "key": "ASAGA-101",
          "title": "Model return workflow steps as durable facts with explicit pending states",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 90,
          "phaseId": "steps",
          "dependsOn": [],
          "scenario": "The return row has one status called processing, hiding whether inspection, label issuance or refund is outstanding.",
          "acceptanceCriteria": [
            "Represent each step's request and observed outcome separately.",
            "Define legal workflow transitions and terminal conditions.",
            "Keep unknown provider outcomes distinct from failure."
          ],
          "implementationNotes": [
            "Use synthetic provider receipts only."
          ],
          "verification": [
            "Trace a successful return through all declared facts.",
            "Timeout shipping after acceptance and retain an unknown label outcome."
          ],
          "deliverables": [
            "Return state model"
          ],
          "rollout": "Review the state table before adding adapters; preserve ambiguous existing cases as unresolved.",
          "skills": [
            "Workflow modeling",
            "Uncertainty"
          ],
          "fieldMix": [
            {
              "field": "Distributed systems",
              "percentage": 60
            },
            {
              "field": "Backend",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "ca4c504a-2d42-4679-b1db-ebfb315a05be",
          "key": "ASAGA-102",
          "title": "Define stable provider command keys for each return step",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "steps",
          "dependsOn": [
            "ASAGA-101"
          ],
          "scenario": "A retry after a lost response creates a second shipping label because each request receives a new key.",
          "acceptanceCriteria": [
            "Bind keys to return identity, step and generation.",
            "Reuse keys for equivalent retries.",
            "Reject changed canonical input under an existing key."
          ],
          "implementationNotes": [
            "Do not reuse one key across unrelated provider actions."
          ],
          "verification": [
            "Repeat a label request and resolve one fake provider result.",
            "Change shipping destination under the same key and return conflict."
          ],
          "deliverables": [
            "Step identity contract and provider-key tests"
          ],
          "rollout": "Use stable keys before enabling retries; reconcile legacy ambiguous effects separately.",
          "skills": [
            "Idempotency",
            "Provider contracts"
          ],
          "fieldMix": [
            {
              "field": "Distributed systems",
              "percentage": 60
            },
            {
              "field": "Integrations",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "a4ec0118-e6d8-4ce5-b111-ae349ac45068",
          "key": "ASAGA-103",
          "title": "Write the compensation table for return side effects",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 120,
          "phaseId": "steps",
          "dependsOn": [
            "ASAGA-101",
            "ASAGA-102"
          ],
          "scenario": "The team calls every reverse action rollback, although an issued label can be voided and a completed inspection cannot be undone.",
          "acceptanceCriteria": [
            "Classify compensatable, irreversible and unresolved effects.",
            "State preconditions and outcomes for each compensation.",
            "Separate corrective actions from deletion of historical facts."
          ],
          "implementationNotes": [
            "Use fake providers and document their exact capabilities."
          ],
          "verification": [
            "Map a voidable unused label to its compensation.",
            "Map completed inspection to retained history rather than pretending it can be erased."
          ],
          "deliverables": [
            "Compensation decision table"
          ],
          "rollout": "Review provider capabilities before orchestrator work; block unsupported automatic reversals.",
          "skills": [
            "Compensation design",
            "Tradeoff analysis"
          ],
          "fieldMix": [
            {
              "field": "Distributed systems",
              "percentage": 60
            },
            {
              "field": "System design",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "0dbad981-19df-4620-b9d4-a67ede59b486",
          "key": "ASAGA-104",
          "title": "Persist return progress and next-step dispatch atomically",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "ADVANCED",
          "estimateMinutes": 240,
          "phaseId": "orchestrate",
          "dependsOn": [
            "ASAGA-101",
            "ASAGA-102",
            "ASAGA-103"
          ],
          "scenario": "Inspection completion commits but the shipping step is never scheduled after a process crash.",
          "acceptanceCriteria": [
            "Commit the observed step fact and outbox dispatch together.",
            "Derive next-step identity from the durable workflow generation.",
            "Make repeated step completion a no-op or explicit conflict."
          ],
          "implementationNotes": [
            "Keep remote provider calls outside database transactions."
          ],
          "verification": [
            "Crash after inspection fact commit and recover label dispatch.",
            "Repeat the same completion and create no duplicate next step."
          ],
          "deliverables": [
            "Workflow/outbox transaction and crash probe"
          ],
          "rollout": "Canary synthetic returns; pause advancement if durable dispatch cannot be recorded.",
          "skills": [
            "Transactional outbox",
            "Workflow durability"
          ],
          "fieldMix": [
            {
              "field": "Distributed systems",
              "percentage": 50
            },
            {
              "field": "Database engineering",
              "percentage": 30
            },
            {
              "field": "Backend",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "8350b00a-257c-4d14-afea-bdcd318c916e",
          "key": "ASAGA-105",
          "title": "Reconcile shipping acceptance before issuing a replacement label",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 300,
          "phaseId": "orchestrate",
          "dependsOn": [
            "ASAGA-102",
            "ASAGA-104"
          ],
          "scenario": "The shipping adapter loses its response after accepting a label, and the workflow currently creates a replacement immediately.",
          "acceptanceCriteria": [
            "Query the original provider command identity before replacement.",
            "Record accepted, rejected and unresolved outcomes explicitly.",
            "Create a new generation only under a declared replacement rule."
          ],
          "implementationNotes": [
            "The fake adapter must model accepted-but-unacknowledged requests."
          ],
          "verification": [
            "Recover the original accepted label after a response loss.",
            "Make status unavailable and retain unresolved shipping without a second label."
          ],
          "deliverables": [
            "Shipping reconciliation and uncertainty probe"
          ],
          "rollout": "Enable reconciled retries first; stop automatic replacement when provider identity lookup is unavailable.",
          "skills": [
            "Distributed failure",
            "Reconciliation"
          ],
          "fieldMix": [
            {
              "field": "Integrations",
              "percentage": 50
            },
            {
              "field": "Distributed systems",
              "percentage": 50
            }
          ],
          "patterns": []
        },
        {
          "id": "c238aa03-6598-46a7-b5fb-371056db39b5",
          "key": "ASAGA-106",
          "title": "Run label compensation only when its original effect is confirmed",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "ADVANCED",
          "estimateMinutes": 210,
          "phaseId": "orchestrate",
          "dependsOn": [
            "ASAGA-103",
            "ASAGA-104",
            "ASAGA-105"
          ],
          "scenario": "A cancellation request races label issuance and attempts to void a label that may not exist yet.",
          "acceptanceCriteria": [
            "Persist cancellation intent independently of provider completion.",
            "Compensate only the confirmed current label generation.",
            "Keep failed or unknown compensation visible for retry."
          ],
          "implementationNotes": [
            "Never mark a return fully cancelled solely because a compensation request was sent."
          ],
          "verification": [
            "Cancel after confirmed issuance and record confirmed voiding.",
            "Cancel during unknown issuance and wait for reconciliation before compensation."
          ],
          "deliverables": [
            "Cancellation/compensation state transitions"
          ],
          "rollout": "Canary cancellation on fake providers; retain unresolved operations for bounded reconciliation.",
          "skills": [
            "Compensation",
            "Concurrency"
          ],
          "fieldMix": [
            {
              "field": "Distributed systems",
              "percentage": 60
            },
            {
              "field": "Integrations",
              "percentage": 40
            }
          ],
          "patterns": [
            {
              "pattern": "saga",
              "activity": "APPLY",
              "focus": "Compensate only the confirmed label generation when cancellation races issuance; preserve uncertainty instead of treating a lost response as a failed effect."
            }
          ]
        },
        {
          "id": "edf84f78-38ee-4418-b96c-25efa79fc8e6",
          "key": "ASAGA-107",
          "title": "Authorize refund progression from verified return facts",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 240,
          "phaseId": "orchestrate",
          "dependsOn": [
            "ASAGA-101",
            "ASAGA-104",
            "ASAGA-106"
          ],
          "scenario": "An administrator can set the aggregate status to inspected and trigger a refund without an actual inspection result.",
          "acceptanceCriteria": [
            "Require a verified inspection fact and matching return generation.",
            "Guard refund requests at the service boundary.",
            "Reject direct status edits that bypass prerequisites."
          ],
          "implementationNotes": [
            "This exercise uses synthetic money and a fake refund provider."
          ],
          "verification": [
            "Advance a return with a valid inspection receipt.",
            "Attempt refund with a forged status change and verify no provider call."
          ],
          "deliverables": [
            "Refund precondition guard and bypass regression"
          ],
          "rollout": "Deploy guarded transitions before exposing administrative actions; stop refund dispatch on missing provenance.",
          "skills": [
            "State authority",
            "Authorization"
          ],
          "fieldMix": [
            {
              "field": "Security",
              "percentage": 50
            },
            {
              "field": "Distributed systems",
              "percentage": 30
            },
            {
              "field": "Backend",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "4f50c7d6-085e-4ac6-b217-59d0aa1853f5",
          "key": "ASAGA-108",
          "title": "Show return workflow progress without hiding unresolved compensation",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 90,
          "phaseId": "recover",
          "dependsOn": [
            "ASAGA-105",
            "ASAGA-106",
            "ASAGA-107"
          ],
          "scenario": "The support console shows cancelled even when the label-void request timed out and the customer might still use it.",
          "acceptanceCriteria": [
            "Display business intent separately from confirmed provider outcomes.",
            "Highlight pending reconciliation and compensation states.",
            "Exclude provider credentials and raw customer payloads."
          ],
          "implementationNotes": [
            "Use a dedicated support projection with tenant authorization."
          ],
          "verification": [
            "Display a fully compensated synthetic return.",
            "Display unknown voiding as unresolved and deny another tenant's workflow."
          ],
          "deliverables": [
            "Scoped support workflow projection"
          ],
          "rollout": "Enable read-only status first; keep uncertainty visible when adapters are unavailable.",
          "skills": [
            "Operational UX",
            "Privacy"
          ],
          "fieldMix": [
            {
              "field": "Frontend",
              "percentage": 40
            },
            {
              "field": "Distributed systems",
              "percentage": 30
            },
            {
              "field": "Privacy engineering",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "7bf43cb5-51c1-4558-8d47-25f535b13fde",
          "key": "ASAGA-109",
          "title": "Replay a return workflow from its durable history after an orchestrator crash",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "EXPERT",
          "estimateMinutes": 360,
          "phaseId": "recover",
          "dependsOn": [
            "ASAGA-104",
            "ASAGA-105",
            "ASAGA-106",
            "ASAGA-107"
          ],
          "scenario": "A worker restarts halfway through a return and must decide which steps can resume without repeating side effects.",
          "acceptanceCriteria": [
            "Reconstruct the current state from durable facts and generations.",
            "Reconcile outstanding provider commands before redispatch.",
            "Preserve completed facts and compensation history."
          ],
          "implementationNotes": [
            "Inject crashes between every modeled commit and provider response boundary."
          ],
          "verification": [
            "Replay a completed and a partially compensated synthetic return.",
            "Crash after refund acceptance and verify recovery does not issue a second refund."
          ],
          "deliverables": [
            "Workflow recovery harness and interruption matrix"
          ],
          "rollout": "Run before enabling automatic recovery; pause ambiguous workflows while continuing unaffected ones.",
          "skills": [
            "Recovery",
            "Fault injection"
          ],
          "fieldMix": [
            {
              "field": "Distributed systems",
              "percentage": 70
            },
            {
              "field": "Site reliability",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "c89403c7-8a29-4458-9503-cbb8dce01170",
          "key": "ASAGA-110",
          "title": "Write the operator handoff for a return that cannot be fully compensated",
          "type": "CHORE",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "recover",
          "dependsOn": [
            "ASAGA-103",
            "ASAGA-108",
            "ASAGA-109"
          ],
          "scenario": "A provider confirms an effect that cannot be reversed, and support needs to close the technical incident without fabricating a clean rollback.",
          "acceptanceCriteria": [
            "List confirmed effects, attempted corrections and unresolved consequences.",
            "Define authorized manual decisions separately from automated transitions.",
            "Preserve original receipts and incident provenance."
          ],
          "implementationNotes": [
            "Use a fabricated return and no actual financial advice or transfer."
          ],
          "verification": [
            "Document a successful full compensation case.",
            "Document an irreversible fake-provider outcome without marking it rolled back."
          ],
          "deliverables": [
            "Return exception runbook and worked incident"
          ],
          "rollout": "Review exceptions before manual action; append resolutions instead of rewriting workflow history.",
          "skills": [
            "Operational recovery",
            "Auditability"
          ],
          "fieldMix": [
            {
              "field": "Distributed systems",
              "percentage": 60
            },
            {
              "field": "Site reliability",
              "percentage": 40
            }
          ],
          "patterns": []
        }
      ]
    }
  ]
}
