{
  "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": "9fa17936-5981-4507-8ee8-cf91ce14aaca",
      "key": "CBLOB",
      "title": "Reference-aware blob retention and deletion",
      "field": "Storage systems",
      "summary": "Manage shared synthetic attachments through references, tombstones and recoverable cleanup.",
      "context": "Fictional archive Moss deduplicates generated attachments across documents within each organization. Use local files and transactional metadata stubs.",
      "stack": [
        "TypeScript",
        "SQLite",
        "Filesystem adapter",
        "Vitest"
      ],
      "prerequisites": [
        "Generate duplicate and unique local byte fixtures.",
        "Create synthetic document references across two organizations."
      ],
      "developerValue": "Practice reclamation races and explicit data-lifecycle guarantees.",
      "companyValue": "Inspect whether storage cleanup avoids broken references and hidden retention.",
      "delivery": "Operate only on a dedicated local fixture directory; no user folders are targeted.",
      "phases": [
        {
          "id": "references",
          "title": "Model blob references",
          "goal": "Separate logical use from physical bytes."
        },
        {
          "id": "deletion",
          "title": "Guard reclamation",
          "goal": "Handle races and failures safely."
        },
        {
          "id": "maintenance",
          "title": "Operate retention",
          "goal": "Bound scanning and verify recovery."
        }
      ],
      "tickets": [
        {
          "id": "35a5e942-c9bf-407a-a42c-175159d478e2",
          "key": "CBLOB-101",
          "title": "Separate attachment display names from blob identities",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 60,
          "phaseId": "references",
          "dependsOn": [],
          "scenario": "Renaming an attachment currently moves its physical file and breaks another reference. Store display names on references.",
          "acceptanceCriteria": [
            "Rename changes only reference metadata",
            "Blob identity stays stable",
            "Other references keep their names"
          ],
          "implementationNotes": [
            "Content identity cannot depend on a user-facing filename."
          ],
          "verification": [
            "Rename shared attachment",
            "Fail metadata write and inspect file identity"
          ],
          "deliverables": [
            "Reference schema and rename cases"
          ],
          "rollout": "Disable rename if it touches physical blobs.",
          "skills": [
            "Data modeling",
            "Storage"
          ],
          "fieldMix": [
            {
              "field": "Storage systems",
              "percentage": 60
            },
            {
              "field": "Database engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "5ff3d4ae-b730-4efa-834c-cd257258ef2d",
          "key": "CBLOB-102",
          "title": "Scope blob deduplication to the owning organization",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 120,
          "phaseId": "references",
          "dependsOn": [
            "CBLOB-101"
          ],
          "scenario": "Equal bytes across organizations share observable lookup results. Restrict deduplication to the tenant boundary.",
          "acceptanceCriteria": [
            "Same-tenant duplicates reuse safely",
            "Foreign existence is not disclosed",
            "All reference reads include tenant scope"
          ],
          "implementationNotes": [
            "Digest equality is not authorization."
          ],
          "verification": [
            "Deduplicate own fixtures",
            "Probe matching foreign digest"
          ],
          "deliverables": [
            "Scoped blob lookup and denial cases"
          ],
          "rollout": "Disable deduplication if scope isolation fails.",
          "skills": [
            "Tenancy",
            "Privacy"
          ],
          "fieldMix": [
            {
              "field": "Privacy engineering",
              "percentage": 40
            },
            {
              "field": "Security",
              "percentage": 40
            },
            {
              "field": "Storage systems",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "6358a006-70f6-488a-b719-e25a6b1d6683",
          "key": "CBLOB-103",
          "title": "Reject references to incomplete synthetic blobs",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 75,
          "phaseId": "references",
          "dependsOn": [
            "CBLOB-101",
            "CBLOB-102"
          ],
          "scenario": "Documents can attach blobs before upload verification ends. Require available status before creating a reference.",
          "acceptanceCriteria": [
            "Available blob can attach",
            "Incomplete blob cannot attach",
            "Denied attachment creates no reference"
          ],
          "implementationNotes": [
            "Status check and reference insertion share a transaction boundary."
          ],
          "verification": [
            "Attach verified fixture",
            "Race verification failure with attach"
          ],
          "deliverables": [
            "Attachment admission and cases"
          ],
          "rollout": "Pause attachments when availability cannot be established.",
          "skills": [
            "State transitions",
            "Transactions"
          ],
          "fieldMix": [
            {
              "field": "Storage systems",
              "percentage": 50
            },
            {
              "field": "Database engineering",
              "percentage": 50
            }
          ],
          "patterns": []
        },
        {
          "id": "9c919f54-dbc4-484f-b5c9-b8ff89d0ae0a",
          "key": "CBLOB-104",
          "title": "Tombstone unreferenced blobs before physical deletion",
          "type": "STORY",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "deletion",
          "dependsOn": [
            "CBLOB-103"
          ],
          "scenario": "Cleanup deletes bytes immediately when count reaches zero, leaving no recoverable decision record. Add a pending-deletion state.",
          "acceptanceCriteria": [
            "Zero references create tombstone",
            "Referenced blobs remain available",
            "Tombstone records eligibility time"
          ],
          "implementationNotes": [
            "Tombstones describe metadata, not proof of physical erasure."
          ],
          "verification": [
            "Remove final reference",
            "Remove one of two references"
          ],
          "deliverables": [
            "Tombstone transition and cases"
          ],
          "rollout": "Pause physical deletion while retaining tombstones.",
          "skills": [
            "Lifecycle",
            "Data integrity"
          ],
          "fieldMix": [
            {
              "field": "Storage systems",
              "percentage": 60
            },
            {
              "field": "Database engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "c008546d-a70a-46cd-80d8-347c79ca4060",
          "key": "CBLOB-105",
          "title": "Prevent a new blob reference racing with reclamation",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 240,
          "phaseId": "deletion",
          "dependsOn": [
            "CBLOB-104"
          ],
          "scenario": "A document attaches a blob while cleanup deletes its file. Coordinate reference admission and deletion eligibility.",
          "acceptanceCriteria": [
            "New reference either cancels eligibility or fails explicitly",
            "Deletion cannot remove newly referenced bytes",
            "Retried admission is safe"
          ],
          "implementationNotes": [
            "Choose and document one atomic state protocol."
          ],
          "verification": [
            "Attach before claim",
            "Race attachment against deletion claim"
          ],
          "deliverables": [
            "Reclamation protocol and interleaving tests"
          ],
          "rollout": "Disable reclamation if the mutual-exclusion invariant fails.",
          "skills": [
            "Concurrency",
            "Transactions"
          ],
          "fieldMix": [
            {
              "field": "Database engineering",
              "percentage": 60
            },
            {
              "field": "Storage systems",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "f5bb3d7e-28d8-4601-94b4-5fd443b6cddf",
          "key": "CBLOB-106",
          "title": "Record physical blob deletion failures without claiming completion",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 135,
          "phaseId": "deletion",
          "dependsOn": [
            "CBLOB-104",
            "CBLOB-105"
          ],
          "scenario": "Permission errors are swallowed and metadata says Deleted while bytes remain. Persist retryable failure state.",
          "acceptanceCriteria": [
            "Successful deletion records acknowledgement",
            "Failure remains pending",
            "Already absent file is idempotent success"
          ],
          "implementationNotes": [
            "Do not log attachment contents or paths outside fixture scope."
          ],
          "verification": [
            "Delete fixture",
            "Inject permission failure"
          ],
          "deliverables": [
            "Deletion result handling and cases"
          ],
          "rollout": "Pause retries on repeated provider faults.",
          "skills": [
            "Error handling",
            "Recovery"
          ],
          "fieldMix": [
            {
              "field": "Storage systems",
              "percentage": 70
            },
            {
              "field": "Site reliability",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "290b4e6e-c948-4fcc-8e78-a9f576ef4d24",
          "key": "CBLOB-107",
          "title": "Reconcile blob metadata after a crash during deletion",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "deletion",
          "dependsOn": [
            "CBLOB-106"
          ],
          "scenario": "A process dies after file removal but before metadata commit. Recovery must distinguish absent bytes from an untouched blob.",
          "acceptanceCriteria": [
            "Missing claimed blob completes metadata",
            "Existing claimed blob retries safely",
            "Unclaimed blob is never deleted"
          ],
          "implementationNotes": [
            "Recovery requires durable deletion claim identity."
          ],
          "verification": [
            "Crash after file removal",
            "Restart with stale unrelated claim"
          ],
          "deliverables": [
            "Deletion reconciliation and restart cases"
          ],
          "rollout": "Stop automatic recovery if claims cannot be verified.",
          "skills": [
            "Crash consistency",
            "Reconciliation"
          ],
          "fieldMix": [
            {
              "field": "Storage systems",
              "percentage": 60
            },
            {
              "field": "Database engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "ae654a4f-4354-495d-b44a-0103923a22d6",
          "key": "CBLOB-108",
          "title": "Bound blob reclamation scans by eligibility cursor",
          "type": "CHORE",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 120,
          "phaseId": "maintenance",
          "dependsOn": [
            "CBLOB-107"
          ],
          "scenario": "The sweeper repeatedly scans the full blob table. Add indexed bounded batches without skipping concurrent tombstones.",
          "acceptanceCriteria": [
            "Batch size is capped",
            "Cursor order is stable",
            "New eligible rows appear on a subsequent pass"
          ],
          "implementationNotes": [
            "Document cursor reset at end of pass."
          ],
          "verification": [
            "Sweep multiple pages",
            "Insert eligible row during scan"
          ],
          "deliverables": [
            "Sweep pagination and concurrency cases"
          ],
          "rollout": "Reduce to explicit small batches while cursor logic is repaired.",
          "skills": [
            "Pagination",
            "Resource limits"
          ],
          "fieldMix": [
            {
              "field": "Database engineering",
              "percentage": 50
            },
            {
              "field": "Performance engineering",
              "percentage": 30
            },
            {
              "field": "Storage systems",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "b1d2e445-0bc4-44a7-9f1c-b686ca1b81ab",
          "key": "CBLOB-109",
          "title": "Protect retained document versions from blob cleanup",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "maintenance",
          "dependsOn": [
            "CBLOB-105",
            "CBLOB-108"
          ],
          "scenario": "Cleanup counts only current document references and breaks retained versions. Include every retained reference authority.",
          "acceptanceCriteria": [
            "Retained versions preserve blobs",
            "Expired versions release references",
            "Cross-tenant records cannot affect counts"
          ],
          "implementationNotes": [
            "Retention policy is a fixture contract, not a legal claim."
          ],
          "verification": [
            "Retain old version",
            "Expire it and inspect eligibility"
          ],
          "deliverables": [
            "Version-aware reference accounting"
          ],
          "rollout": "Pause cleanup until all reference sources reconcile.",
          "skills": [
            "Retention",
            "Data modeling"
          ],
          "fieldMix": [
            {
              "field": "Storage systems",
              "percentage": 60
            },
            {
              "field": "Database engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "b299c6a9-7dbd-4de1-b8e5-336cdc50f6f0",
          "key": "CBLOB-110",
          "title": "Produce a blob-reclamation report that distinguishes planned and removed bytes",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 105,
          "phaseId": "maintenance",
          "dependsOn": [
            "CBLOB-106",
            "CBLOB-109"
          ],
          "scenario": "Operators report savings from tombstoned bytes that still exist. Separate eligible, attempted and acknowledged removal totals.",
          "acceptanceCriteria": [
            "Planned bytes are labeled",
            "Failures remain outstanding",
            "Only acknowledged removals count as reclaimed"
          ],
          "implementationNotes": [
            "State measurements are local fixture observations."
          ],
          "verification": [
            "Sweep successful fixture batch",
            "Fail half the deletions"
          ],
          "deliverables": [
            "Reclamation report projection"
          ],
          "rollout": "Hide savings totals if acknowledgements cannot be reconciled.",
          "skills": [
            "Observability",
            "Reporting"
          ],
          "fieldMix": [
            {
              "field": "Storage systems",
              "percentage": 60
            },
            {
              "field": "Site reliability",
              "percentage": 40
            }
          ],
          "patterns": []
        }
      ]
    }
  ]
}
