{
  "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": "195595e2-6371-4c85-af47-e5c0e2c9d785",
      "key": "BEXTRACT",
      "title": "Reviewable invoice field extraction",
      "field": "Applied AI",
      "summary": "Extract structured invoice fields while preserving document provenance and correction history.",
      "context": "A fictional procurement team receives inconsistent supplier documents. It wants draft records that staff can review without treating model output as authoritative accounting data.",
      "stack": [
        "TypeScript",
        "JSON Schema",
        "AiEvaluationProvider"
      ],
      "prerequisites": [
        "Author synthetic text invoices with ambiguous dates, currencies, and line items; use a deterministic provider double."
      ],
      "developerValue": "Practice schema constraints, numerical checks, review workflows, and safe model boundaries.",
      "companyValue": "Produce an inspectable extraction prototype that can reduce manual transcription while preserving review control.",
      "delivery": "Deliver draft extraction and correction behavior; no real invoices, payment execution, or accounting advice.",
      "phases": [
        {
          "id": "contract",
          "title": "Define extraction rules",
          "goal": "Represent fields, provenance, and ambiguity explicitly."
        },
        {
          "id": "extract",
          "title": "Validate drafts",
          "goal": "Reject unsupported or inconsistent provider output."
        },
        {
          "id": "review",
          "title": "Support correction",
          "goal": "Preserve human review and evaluate bounded behavior."
        }
      ],
      "tickets": [
        {
          "id": "a1acedee-8ef1-4670-ae4b-e6269210ace2",
          "key": "BEXTRACT-101",
          "title": "Define invoice fields with explicit missing and ambiguous states",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 60,
          "phaseId": "contract",
          "dependsOn": [],
          "scenario": "Empty strings currently mean both absent values and extraction failures.",
          "acceptanceCriteria": [
            "Represent value, missing, and ambiguous states distinctly.",
            "Declare required fields before a draft is reviewable.",
            "Preserve the original textual date and amount references."
          ],
          "implementationNotes": [
            "Do not guess missing tax or currency values."
          ],
          "verification": [
            "Parse a complete synthetic invoice.",
            "Represent missing currency and an ambiguous date without invented values."
          ],
          "deliverables": [
            "Extraction schema."
          ],
          "rollout": "Version the schema before creating drafts; retain raw synthetic source references.",
          "skills": [
            "Schema design"
          ],
          "fieldMix": [
            {
              "field": "Applied AI",
              "percentage": 80
            },
            {
              "field": "Data engineering",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "86b9e3e1-98e5-457a-a2dc-bbb29118bb52",
          "key": "BEXTRACT-102",
          "title": "Bind extraction runs to immutable document digests",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 120,
          "phaseId": "contract",
          "dependsOn": [
            "BEXTRACT-101"
          ],
          "scenario": "A corrected document is uploaded under the same filename and the old result appears current.",
          "acceptanceCriteria": [
            "Identify runs by document digest and extractor version.",
            "Preserve earlier runs when content changes.",
            "Reject a result bound to another document digest."
          ],
          "implementationNotes": [
            "Filenames are display labels, not identity."
          ],
          "verification": [
            "Replay an unchanged document deterministically.",
            "Change one byte and prevent reuse of the old result."
          ],
          "deliverables": [
            "Run identity contract."
          ],
          "rollout": "Append new runs on document changes; never rewrite accepted extraction history.",
          "skills": [
            "Provenance",
            "Idempotency"
          ],
          "fieldMix": [
            {
              "field": "Applied AI",
              "percentage": 50
            },
            {
              "field": "Data engineering",
              "percentage": 30
            },
            {
              "field": "Storage systems",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "3915f650-f409-4bb5-9ff0-d5d90bb5764a",
          "key": "BEXTRACT-103",
          "title": "Validate source spans for every extracted material field",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "extract",
          "dependsOn": [
            "BEXTRACT-102"
          ],
          "scenario": "The provider returns a supplier address that appears nowhere in the document.",
          "acceptanceCriteria": [
            "Require bounded source spans for material values.",
            "Resolve spans against the exact source version.",
            "Flag transformed values with their documented normalization rule."
          ],
          "implementationNotes": [
            "Provider prose cannot substitute for source support."
          ],
          "verification": [
            "Accept a supported normalized date.",
            "Reject out-of-range spans and invented supplier values."
          ],
          "deliverables": [
            "Source-grounding validator."
          ],
          "rollout": "Keep unsupported drafts blocked for review; retain safe failure categories.",
          "skills": [
            "Grounding",
            "Validation"
          ],
          "fieldMix": [
            {
              "field": "Applied AI",
              "percentage": 80
            },
            {
              "field": "Data engineering",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "9f5a47bb-20fb-4647-ae90-38444fe0895c",
          "key": "BEXTRACT-104",
          "title": "Check line-item arithmetic using exact decimal rules",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "extract",
          "dependsOn": [
            "BEXTRACT-101",
            "BEXTRACT-103"
          ],
          "scenario": "Binary floating point produces an apparent mismatch on an otherwise consistent invoice.",
          "acceptanceCriteria": [
            "Use declared currency scale and rounding rules.",
            "Compare quantity, price, subtotal, and total consistently.",
            "Represent unresolved tax or discount differences as discrepancies."
          ],
          "implementationNotes": [
            "Never silently alter document totals to make arithmetic balance."
          ],
          "verification": [
            "Validate a rounding-boundary invoice.",
            "Flag inconsistent totals and unsupported precision."
          ],
          "deliverables": [
            "Arithmetic consistency checks."
          ],
          "rollout": "Show discrepancies to reviewers; do not promote inconsistent drafts automatically.",
          "skills": [
            "Numeric correctness",
            "Data validation"
          ],
          "fieldMix": [
            {
              "field": "Data engineering",
              "percentage": 60
            },
            {
              "field": "Applied AI",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "0cac9927-190b-489b-b060-f28e5adc2b19",
          "key": "BEXTRACT-105",
          "title": "Prevent document text from overriding extraction policy",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "extract",
          "dependsOn": [
            "BEXTRACT-103"
          ],
          "scenario": "An invoice note contains instructions to mark every field verified.",
          "acceptanceCriteria": [
            "Treat document text only as extraction input.",
            "Require the same schema and grounding rules for all responses.",
            "Keep document instructions unable to change review status."
          ],
          "implementationNotes": [
            "No external tools or supplier contact is permitted from model output."
          ],
          "verification": [
            "Extract a normal note field.",
            "Inject policy-changing text and verify review remains required."
          ],
          "deliverables": [
            "Untrusted-document regression cases."
          ],
          "rollout": "Fail closed on invalid output; retain the deterministic provider as a safe development mode.",
          "skills": [
            "Prompt injection",
            "Trust boundaries"
          ],
          "fieldMix": [
            {
              "field": "Applied AI",
              "percentage": 50
            },
            {
              "field": "Security",
              "percentage": 50
            }
          ],
          "patterns": []
        },
        {
          "id": "82f74393-4b44-4dfe-9a50-d08205c89def",
          "key": "BEXTRACT-106",
          "title": "Deduplicate concurrent extraction requests without mixing versions",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 210,
          "phaseId": "extract",
          "dependsOn": [
            "BEXTRACT-102",
            "BEXTRACT-104"
          ],
          "scenario": "Two upload retries consume duplicate provider budget and occasionally attach the older result to the newer run.",
          "acceptanceCriteria": [
            "Deduplicate exact document and extractor identities.",
            "Reject conflicting reuse of an operation key.",
            "Commit one terminal result and preserve failed-attempt metadata."
          ],
          "implementationNotes": [
            "Access providers through AiEvaluationProvider with bounded timeout and retries."
          ],
          "verification": [
            "Race identical requests and observe one accepted result.",
            "Change extractor version and ensure a distinct run."
          ],
          "deliverables": [
            "Extraction operation coordinator."
          ],
          "rollout": "Adopt one document type first; retry terminal failures through a new explicit operation.",
          "skills": [
            "Concurrency",
            "Idempotency"
          ],
          "fieldMix": [
            {
              "field": "Applied AI",
              "percentage": 50
            },
            {
              "field": "Database engineering",
              "percentage": 30
            },
            {
              "field": "Distributed systems",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "10fc3656-32d5-46f7-8f1f-1a8ee4965dff",
          "key": "BEXTRACT-107",
          "title": "Reserve extraction cost before processing a document batch",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "extract",
          "dependsOn": [
            "BEXTRACT-106"
          ],
          "scenario": "A large upload queue can exceed the tenant's configured processing budget.",
          "acceptanceCriteria": [
            "Estimate a conservative per-document reservation.",
            "Enforce tenant and batch ceilings before dispatch.",
            "Settle actual usage and return unused reservation exactly once."
          ],
          "implementationNotes": [
            "Record model, prompt/schema version, timeout, retries, cost, and trace without document text."
          ],
          "verification": [
            "Process a batch within the ceiling.",
            "Retry settlement and verify no double charge or negative reservation."
          ],
          "deliverables": [
            "Budget accounting tests."
          ],
          "rollout": "Start with a small ceiling; pause new dispatch when accounting state is uncertain.",
          "skills": [
            "Cost controls",
            "Transactions"
          ],
          "fieldMix": [
            {
              "field": "Applied AI",
              "percentage": 50
            },
            {
              "field": "Database engineering",
              "percentage": 30
            },
            {
              "field": "Backend",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "bdedb84c-73c9-4317-a8b8-d66205b5b0b1",
          "key": "BEXTRACT-108",
          "title": "Preserve corrections as append-only reviewer decisions",
          "type": "STORY",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 210,
          "phaseId": "review",
          "dependsOn": [
            "BEXTRACT-104",
            "BEXTRACT-106"
          ],
          "scenario": "Staff corrections overwrite the extracted values, making later disagreement impossible to investigate.",
          "acceptanceCriteria": [
            "Record original value, corrected value, reviewer, and reason.",
            "Require optimistic revision control for concurrent review.",
            "Keep source and extractor output immutable."
          ],
          "implementationNotes": [
            "Review actions must be tenant-scoped."
          ],
          "verification": [
            "Correct a draft and inspect both versions.",
            "Reject stale revisions and cross-tenant review attempts."
          ],
          "deliverables": [
            "Correction history workflow."
          ],
          "rollout": "Enable on draft records first; retain prior review state when a correction fails.",
          "skills": [
            "Auditability",
            "Concurrency"
          ],
          "fieldMix": [
            {
              "field": "Backend",
              "percentage": 50
            },
            {
              "field": "Applied AI",
              "percentage": 30
            },
            {
              "field": "Database engineering",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "dc6f0cda-cd70-45ed-81a1-bbda47fbba4c",
          "key": "BEXTRACT-109",
          "title": "Design a field-level extraction evaluation with abstention costs",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 360,
          "phaseId": "review",
          "dependsOn": [
            "BEXTRACT-105",
            "BEXTRACT-107",
            "BEXTRACT-108"
          ],
          "scenario": "Document-level success hides whether the extractor frequently invents totals or simply leaves them for review.",
          "acceptanceCriteria": [
            "Report supported correct, incorrect, missing, and abstained fields separately.",
            "Include layout, date, currency, and injection variations.",
            "Compare manual-review volume against unsupported-field risk under declared assumptions."
          ],
          "implementationNotes": [
            "Deterministic doubles validate plumbing; live model accuracy remains unmeasured."
          ],
          "verification": [
            "Detect a fabricated total in the evaluation.",
            "Show an appropriate abstention separately from an incorrect value."
          ],
          "deliverables": [
            "Evaluation protocol and synthetic results."
          ],
          "rollout": "Expand document coverage only after reviewing failure categories and unresolved assumptions.",
          "skills": [
            "Evaluation design",
            "AI quality"
          ],
          "fieldMix": [
            {
              "field": "Applied AI",
              "percentage": 60
            },
            {
              "field": "Quality engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "6aacf361-eb0a-4019-9186-63846c667400",
          "key": "BEXTRACT-110",
          "title": "Prepare a reviewer checklist for ambiguous supplier documents",
          "type": "CHORE",
          "priority": "LOW",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 60,
          "phaseId": "review",
          "dependsOn": [
            "BEXTRACT-109"
          ],
          "scenario": "Reviewers need a consistent way to handle ambiguous dates and unsupported fields.",
          "acceptanceCriteria": [
            "Explain how to inspect source spans and arithmetic discrepancies.",
            "Show how to request correction without editing source history.",
            "Document when a draft must remain unresolved."
          ],
          "implementationNotes": [
            "Do not treat review completion as proof of invoice authenticity."
          ],
          "verification": [
            "Review one supported synthetic invoice.",
            "Leave an ambiguous supplier document unresolved with a reason."
          ],
          "deliverables": [
            "Reviewer guide."
          ],
          "rollout": "Publish alongside the prototype; revise examples when extraction policy changes.",
          "skills": [
            "Documentation",
            "Workflow design"
          ],
          "fieldMix": [
            {
              "field": "Applied AI",
              "percentage": 100
            }
          ],
          "patterns": []
        }
      ]
    }
  ]
}
