{
  "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": [
    {
      "key": "SRUNTIME",
      "title": "Evolve a bounded bytecode runtime without executing host code",
      "field": "Systems programming",
      "summary": "Implement decoding, stack safety, resource budgets and compatible bytecode revisions.",
      "context": "A fictional rules engine executes a tiny arithmetic bytecode over synthetic integers. Its interpreter trusts jump offsets and can run forever. Build a local Rust runtime; it has no filesystem, network, dynamic loading, host calls, or candidate-source execution.",
      "stack": [
        "Rust",
        "Bytecode fixtures",
        "Property tests",
        "Fuzzing"
      ],
      "prerequisites": [
        "Stacks",
        "Instruction decoding",
        "Control flow"
      ],
      "developerValue": "Practice runtime invariants, validation, resource accounting and compatibility.",
      "companyValue": "Review a constrained execution component whose malformed programs fail deterministically without gaining host capabilities.",
      "delivery": "Ten linked tickets across three phases. Use synthetic inputs and a local harness; provide source, focused tests, measurements where requested, and a recovery note.",
      "phases": [
        {
          "id": "model",
          "title": "Establish the machine contract",
          "goal": "Make representation, ownership and failure boundaries explicit."
        },
        {
          "id": "control",
          "title": "Control resources and concurrency",
          "goal": "Implement bounded behavior under realistic interleavings."
        },
        {
          "id": "operate",
          "title": "Prove recovery and handoff",
          "goal": "Measure, diagnose and safely replace the component."
        }
      ],
      "tickets": [
        {
          "id": "dded49ac-11a5-4f77-980b-98a1e72fe2ca",
          "key": "SRUNTIME-101",
          "title": "Decode instructions without reading past the bytecode buffer",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 90,
          "phaseId": "model",
          "dependsOn": [],
          "scenario": "A truncated PUSH instruction reads its operand from bytes beyond the supplied program.",
          "acceptanceCriteria": [
            "Decoder checks opcode and operand length before advancing",
            "Unknown opcodes return a stable offset and code",
            "Failure exposes no partially decoded instruction"
          ],
          "implementationNotes": [
            "Keep bytecode length bounded before parsing."
          ],
          "verification": [
            "Decode a program containing every documented instruction.",
            "Truncate at every byte and confirm deterministic errors without panic."
          ],
          "deliverables": [
            "Checked decoder and truncation matrix"
          ],
          "rollout": "Reject programs not validated by the new decoder.",
          "skills": [
            "Binary parsing",
            "Bounds checking"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Compiler and language tooling",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "417fa830-641c-4a0f-83e3-a022f5fda1ee",
          "key": "SRUNTIME-102",
          "title": "Validate stack depth across both sides of a branch",
          "type": "BUG",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 90,
          "phaseId": "model",
          "dependsOn": [
            "SRUNTIME-101"
          ],
          "scenario": "One branch pushes a value and the other does not, so the merge point underflows only for certain inputs.",
          "acceptanceCriteria": [
            "Validator computes required and resulting depth per instruction",
            "Control-flow merges require compatible stack shape",
            "Maximum stack depth is bounded before execution"
          ],
          "implementationNotes": [
            "Validation must terminate on loops through a visited-state worklist."
          ],
          "verification": [
            "Validate a diamond control flow with matching stack shapes.",
            "Change one branch to omit a push and reject the merge."
          ],
          "deliverables": [
            "Stack-shape validator and branch fixtures"
          ],
          "rollout": "Keep runtime stack checks even after static validation.",
          "skills": [
            "Data-flow analysis",
            "Stacks"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 60
            },
            {
              "field": "Compiler and language tooling",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "5a6d05ea-d97f-4080-acf8-e772edc2d9c2",
          "key": "SRUNTIME-103",
          "title": "Reject jumps that land inside instruction operands",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "model",
          "dependsOn": [
            "SRUNTIME-101",
            "SRUNTIME-102"
          ],
          "scenario": "A crafted jump targets the second byte of a literal and reinterprets it as an opcode.",
          "acceptanceCriteria": [
            "Decoder records every legal instruction boundary",
            "Jump targets must reference a boundary in the same program",
            "Backward jumps remain permitted within the execution budget"
          ],
          "implementationNotes": [
            "Do not normalize invalid offsets to the nearest instruction."
          ],
          "verification": [
            "Execute forward and backward jumps to valid boundaries.",
            "Target each byte inside a multi-byte operand and reject validation."
          ],
          "deliverables": [
            "Boundary-indexed control-flow validation"
          ],
          "rollout": "Invalidate cached programs when the instruction format version changes.",
          "skills": [
            "Control flow",
            "Validation"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Security",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "a1bcff17-ab03-4369-b58f-034b0f88cdd2",
          "key": "SRUNTIME-104",
          "title": "Report integer overflow instead of changing arithmetic by build mode",
          "type": "CHORE",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "control",
          "dependsOn": [
            "SRUNTIME-101"
          ],
          "scenario": "Debug builds trap on addition overflow while optimized builds wrap, producing different rule outcomes.",
          "acceptanceCriteria": [
            "Arithmetic semantics are identical across build profiles",
            "Overflow returns a typed runtime fault with instruction offset",
            "Division defines zero and minimum-value edge cases"
          ],
          "implementationNotes": [
            "Use checked operations; do not expose floating-point values in this bytecode revision."
          ],
          "verification": [
            "Evaluate boundary-safe addition, subtraction, multiplication, and division.",
            "Exercise every overflow boundary and division by zero in both profiles."
          ],
          "deliverables": [
            "Arithmetic contract and profile-parity tests"
          ],
          "rollout": "Version any intentional arithmetic semantic change.",
          "skills": [
            "Integer arithmetic",
            "Compatibility"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Quality engineering",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "0507f331-7700-462c-a48c-7390b8ce2a95",
          "key": "SRUNTIME-105",
          "title": "Stop infinite programs with a deterministic instruction budget",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 240,
          "phaseId": "control",
          "dependsOn": [
            "SRUNTIME-103",
            "SRUNTIME-104"
          ],
          "scenario": "A backward jump with an always-true condition consumes a worker indefinitely.",
          "acceptanceCriteria": [
            "Caller supplies a positive maximum instruction count",
            "Every executed instruction consumes budget",
            "Exhaustion returns current offset and no successful result"
          ],
          "implementationNotes": [
            "Wall-clock timeout can be defense in depth but is not the deterministic oracle."
          ],
          "verification": [
            "Run a terminating loop at exactly the declared budget.",
            "Run an infinite loop and verify failure at the same step in repeated executions."
          ],
          "deliverables": [
            "Instruction metering and loop-bound tests"
          ],
          "rollout": "Begin with a conservative budget and expose exhaustion separately from invalid bytecode.",
          "skills": [
            "Resource metering",
            "Determinism"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 60
            },
            {
              "field": "Security",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "b11d5fb5-74e6-402b-96df-7ea4b373ed91",
          "key": "SRUNTIME-106",
          "title": "Bound heap-like values without adding a garbage collector",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 240,
          "phaseId": "control",
          "dependsOn": [
            "SRUNTIME-102",
            "SRUNTIME-105"
          ],
          "scenario": "A proposed LIST instruction allocates on every loop iteration and the prototype retains all intermediate values.",
          "acceptanceCriteria": [
            "Compare arena reset, reference counting, and no-list alternatives for the bounded language",
            "Chosen design defines maximum live bytes and value count",
            "Budget failure releases all runtime-owned allocations"
          ],
          "implementationNotes": [
            "Do not introduce tracing collection without a workload and cycle requirement that needs it."
          ],
          "verification": [
            "Evaluate a bounded list program and reconcile peak live bytes.",
            "Allocate until the value budget and confirm clean failure without leaks."
          ],
          "deliverables": [
            "Memory strategy decision and bounded-value prototype"
          ],
          "rollout": "Keep LIST disabled until the memory contract is accepted.",
          "skills": [
            "Runtime memory",
            "Tradeoff analysis",
            "Leak testing"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 60
            },
            {
              "field": "Performance engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "52c9e232-7a46-4068-a102-65e8ab8ffc84",
          "key": "SRUNTIME-107",
          "title": "Cache validated programs without confusing bytecode revisions",
          "type": "STORY",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 360,
          "phaseId": "control",
          "dependsOn": [
            "SRUNTIME-103",
            "SRUNTIME-105"
          ],
          "scenario": "A cached validation result for version one is reused after an opcode gains a wider operand in version two.",
          "acceptanceCriteria": [
            "Cache identity binds exact bytes, bytecode version, validator version, and limits",
            "Validation failure is not cached across a newer validator",
            "Hash collision handling cannot return another program"
          ],
          "implementationNotes": [
            "Cache entries contain immutable validated metadata and bounded program bytes only."
          ],
          "verification": [
            "Reuse one validated program under identical authority.",
            "Change each identity dimension and require a miss; inject a key collision and compare bytes."
          ],
          "deliverables": [
            "Versioned validation cache and collision tests"
          ],
          "rollout": "Enable read-through caching after hit/miss telemetry reconciles with validation calls.",
          "skills": [
            "Cache correctness",
            "Versioning",
            "Hashing"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 60
            },
            {
              "field": "Compiler and language tooling",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "505583a3-2b61-4b78-a236-88d876b31589",
          "key": "SRUNTIME-108",
          "title": "Make runtime faults useful without leaking input values",
          "type": "CHORE",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 240,
          "phaseId": "operate",
          "dependsOn": [
            "SRUNTIME-104",
            "SRUNTIME-105"
          ],
          "scenario": "Fault logs dump the full operand stack, which may later contain customer-derived values, while omitting the bytecode revision needed for diagnosis.",
          "acceptanceCriteria": [
            "Fault records contain code, instruction offset, runtime version, and bounded trace identity",
            "Operand values and full program bytes are excluded",
            "Repeated identical faults aggregate under bounded dimensions"
          ],
          "implementationNotes": [
            "Use synthetic values in the exercise and keep generic analytics content-free."
          ],
          "verification": [
            "Produce each fault class and reconcile its diagnostic fields.",
            "Push a sentinel value and confirm it appears in no log or metric."
          ],
          "deliverables": [
            "Redacted runtime fault schema and tests"
          ],
          "rollout": "Replace verbose stack dumps before adding any non-synthetic inputs.",
          "skills": [
            "Observability",
            "Data minimization"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Privacy engineering",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "7f50584a-5d7c-4655-8029-7d694831deee",
          "key": "SRUNTIME-109",
          "title": "Load a new runtime revision without changing in-flight programs",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 360,
          "phaseId": "operate",
          "dependsOn": [
            "SRUNTIME-107",
            "SRUNTIME-108"
          ],
          "scenario": "Reloading the opcode table mutates a global registry while workers execute programs validated under the old table.",
          "acceptanceCriteria": [
            "Each execution binds one immutable runtime revision",
            "New programs select only fully initialized revisions",
            "Retirement waits for in-flight references without blocking unrelated execution"
          ],
          "implementationNotes": [
            "Avoid a mutable Singleton registry; publish immutable snapshots through explicit ownership."
          ],
          "verification": [
            "Run old and new program revisions concurrently and verify their semantics.",
            "Attempt a partial revision load and confirm no execution can select it."
          ],
          "deliverables": [
            "Revision registry, concurrent load test, and retirement protocol"
          ],
          "rollout": "Publish one synthetic revision behind an explicit selector and retain rollback to the prior snapshot.",
          "skills": [
            "Versioned runtime",
            "Concurrency",
            "Immutability"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Platform engineering",
              "percentage": 30
            }
          ],
          "patterns": [
            {
              "pattern": "singleton",
              "activity": "REMOVE",
              "focus": "Replace the mutable process-wide opcode registry with immutable runtime revision snapshots bound explicitly to each execution."
            }
          ]
        },
        {
          "id": "47a65cd7-89ea-4bd4-993e-3dcbfa293738",
          "key": "SRUNTIME-110",
          "title": "Fuzz the runtime under fixed memory and step limits",
          "type": "BUG",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "operate",
          "dependsOn": [
            "SRUNTIME-105",
            "SRUNTIME-106",
            "SRUNTIME-108"
          ],
          "scenario": "Random bytecode tests occasionally hang or consume the test host, so the suite is disabled in continuous integration.",
          "acceptanceCriteria": [
            "Harness caps input bytes, instructions, value memory, and wall-clock defense",
            "Every failure records a minimized reproducible seed",
            "Crash, panic, timeout, and semantic disagreement are distinct outcomes"
          ],
          "implementationNotes": [
            "Run only the capability-free local runtime; never execute generated host code."
          ],
          "verification": [
            "Replay the checked-in seed corpus with deterministic results.",
            "Seed malformed loops and oversized allocations and confirm bounded termination."
          ],
          "deliverables": [
            "Bounded fuzz harness and minimized regression corpus"
          ],
          "rollout": "Start with a short deterministic CI corpus and schedule longer local runs separately.",
          "skills": [
            "Fuzzing",
            "Resource limits",
            "Reproducibility"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Quality engineering",
              "percentage": 30
            }
          ],
          "patterns": []
        }
      ],
      "id": "fcf41c09-df30-436e-b87a-6fd8bb78ab02"
    }
  ]
}
