{
  "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": "a5cfc10b-ed66-44e0-8a0d-923bc81a4353",
      "key": "CTIMER",
      "title": "A deterministic edge-job scheduler emulator",
      "field": "Embedded and edge",
      "summary": "Schedule noncritical local maintenance jobs across clock changes, cancellation and restart.",
      "context": "Fictional kiosk software schedules cache refresh and display housekeeping. Build a software clock and job adapter; do not control real machinery or purchase hardware.",
      "stack": [
        "TypeScript",
        "Fake clock",
        "Vitest"
      ],
      "prerequisites": [
        "Implement injected wall and monotonic clocks.",
        "Create synthetic jobs with controllable completion and failure."
      ],
      "developerValue": "Practice timer semantics, cancellation and bounded scheduling.",
      "companyValue": "Inspect predictable edge resource use and honest execution status.",
      "delivery": "Use deterministic clock advancement; emulator timing does not qualify physical realtime behavior.",
      "phases": [
        {
          "id": "clock",
          "title": "Define time semantics",
          "goal": "Separate elapsed deadlines from calendar schedules."
        },
        {
          "id": "jobs",
          "title": "Control job execution",
          "goal": "Prevent overlap and stale callbacks."
        },
        {
          "id": "restart",
          "title": "Recover scheduler state",
          "goal": "Handle restart and overload deliberately."
        }
      ],
      "tickets": [
        {
          "id": "90c9ed8c-7b45-4801-a2c6-3fcbd6795296",
          "key": "CTIMER-101",
          "title": "Use monotonic time for edge-job timeout deadlines",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 75,
          "phaseId": "clock",
          "dependsOn": [],
          "scenario": "Moving the emulator wall clock backward extends a running job forever. Measure elapsed timeout against monotonic time.",
          "acceptanceCriteria": [
            "Wall-clock changes do not extend timeout",
            "Deadline fires once",
            "Elapsed duration cannot become negative"
          ],
          "implementationNotes": [
            "Expose both clocks through interfaces."
          ],
          "verification": [
            "Move wall clock during job",
            "Advance monotonic clock past deadline"
          ],
          "deliverables": [
            "Deadline helper and clock cases"
          ],
          "rollout": "Disable timed jobs if monotonic source is unavailable.",
          "skills": [
            "Time",
            "Abstraction"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 100
            }
          ],
          "patterns": []
        },
        {
          "id": "47aaebf0-d1c9-4342-9010-2e2db756e741",
          "key": "CTIMER-102",
          "title": "Validate emulated edge-job intervals before scheduling",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 60,
          "phaseId": "clock",
          "dependsOn": [
            "CTIMER-101"
          ],
          "scenario": "A zero interval creates an immediate callback loop. Enforce a documented supported interval range.",
          "acceptanceCriteria": [
            "Valid intervals register",
            "Zero negative and oversized values fail",
            "Rejected jobs allocate no timer"
          ],
          "implementationNotes": [
            "Do not silently clamp invalid configuration."
          ],
          "verification": [
            "Register valid interval",
            "Reject zero and negative interval"
          ],
          "deliverables": [
            "Interval validator and cases"
          ],
          "rollout": "Reject new registrations if limits cannot be enforced.",
          "skills": [
            "Validation",
            "Scheduling"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 100
            }
          ],
          "patterns": []
        },
        {
          "id": "f83fcb4b-c3b0-463f-a9c1-6d1c61dc039d",
          "key": "CTIMER-103",
          "title": "Specify fixed-delay behavior for periodic kiosk maintenance",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 120,
          "phaseId": "clock",
          "dependsOn": [
            "CTIMER-101",
            "CTIMER-102"
          ],
          "scenario": "Long cache refreshes cause catch-up bursts because scheduling alternates between fixed-rate and fixed-delay behavior. Choose fixed-delay for this job class.",
          "acceptanceCriteria": [
            "Next run starts after completion plus delay",
            "Slow runs do not overlap",
            "Failure still follows documented next-run policy"
          ],
          "implementationNotes": [
            "Limit the change to the declared maintenance class."
          ],
          "verification": [
            "Complete short job",
            "Complete job longer than interval"
          ],
          "deliverables": [
            "Periodic policy and fake-clock cases"
          ],
          "rollout": "Pause periodic jobs while schedule semantics are repaired.",
          "skills": [
            "Scheduling",
            "Time"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 100
            }
          ],
          "patterns": []
        },
        {
          "id": "8975de5b-931f-48ea-bccc-b0ea6458669d",
          "key": "CTIMER-104",
          "title": "Cancel emulated edge jobs without accepting late callbacks",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 165,
          "phaseId": "jobs",
          "dependsOn": [
            "CTIMER-103"
          ],
          "scenario": "A cancelled timer callback runs after a replacement job is registered. Bind callbacks to registration generation.",
          "acceptanceCriteria": [
            "Cancel invalidates current generation",
            "Late callback performs no work",
            "Replacement generation can run"
          ],
          "implementationNotes": [
            "Clearing the runtime timer alone is insufficient."
          ],
          "verification": [
            "Cancel before deadline",
            "Deliver old callback after replacement"
          ],
          "deliverables": [
            "Generation guard and race cases"
          ],
          "rollout": "Recreate scheduler instance if generations become inconsistent.",
          "skills": [
            "Cancellation",
            "Concurrency"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 100
            }
          ],
          "patterns": []
        },
        {
          "id": "ff3bb741-8c0a-4f55-8b39-9f9c1094f134",
          "key": "CTIMER-105",
          "title": "Prevent overlapping edge jobs that share one local resource",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "jobs",
          "dependsOn": [
            "CTIMER-103",
            "CTIMER-104"
          ],
          "scenario": "Cache refresh and cleanup run simultaneously and contend for the same fixture directory. Add scoped single-flight admission.",
          "acceptanceCriteria": [
            "Same resource runs one job",
            "Different resources remain independent",
            "Failure releases admission"
          ],
          "implementationNotes": [
            "Do not introduce an unbounded global waiting queue."
          ],
          "verification": [
            "Run separate resources",
            "Fail holder while another waits"
          ],
          "deliverables": [
            "Resource admission and cases"
          ],
          "rollout": "Serialize all fixture maintenance temporarily if scoped locking fails.",
          "skills": [
            "Concurrency",
            "Resource management"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 70
            },
            {
              "field": "Performance engineering",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "a5511f30-190c-4cc2-807a-5916d2d30109",
          "key": "CTIMER-106",
          "title": "Bound emulated edge-job execution attempts after failure",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 120,
          "phaseId": "jobs",
          "dependsOn": [
            "CTIMER-104",
            "CTIMER-105"
          ],
          "scenario": "A failed maintenance job retries forever and hides the original error. Add attempt limits and a terminal visible outcome.",
          "acceptanceCriteria": [
            "Attempts have an explicit cap",
            "Success clears pending retry",
            "Exhaustion preserves failure category"
          ],
          "implementationNotes": [
            "Retrying must reuse the same logical operation identity."
          ],
          "verification": [
            "Recover before cap",
            "Fail through exhaustion"
          ],
          "deliverables": [
            "Retry policy and deterministic cases"
          ],
          "rollout": "Disable automatic retry while retaining manual restart.",
          "skills": [
            "Backoff",
            "Failure handling"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 70
            },
            {
              "field": "Site reliability",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "8783003f-8413-4206-bf74-90424b3d5560",
          "key": "CTIMER-107",
          "title": "Recover due edge jobs after restart without a catch-up storm",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 240,
          "phaseId": "jobs",
          "dependsOn": [
            "CTIMER-103",
            "CTIMER-106"
          ],
          "scenario": "Restarting after a long pause runs every missed interval at once. Persist minimal schedule state and coalesce missed runs.",
          "acceptanceCriteria": [
            "At most declared catch-up work runs",
            "Future schedule resumes predictably",
            "Unknown persisted version fails safely"
          ],
          "implementationNotes": [
            "Define which jobs may be skipped because they are housekeeping."
          ],
          "verification": [
            "Restart after one missed run",
            "Restart after many missed intervals"
          ],
          "deliverables": [
            "Recovery policy and restart fixtures"
          ],
          "rollout": "Start housekeeping from a fresh delayed schedule if state is unreadable.",
          "skills": [
            "Persistence",
            "Scheduling"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 70
            },
            {
              "field": "Storage systems",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "37ec8df2-0b3b-4e5c-8a53-fd01e0d32637",
          "key": "CTIMER-108",
          "title": "Keep edge-job priority from starving lower-priority maintenance",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "ADVANCED",
          "estimateMinutes": 180,
          "phaseId": "restart",
          "dependsOn": [
            "CTIMER-105",
            "CTIMER-107"
          ],
          "scenario": "Frequent urgent cache checks prevent cleanup from ever running. Add bounded fairness to the ready queue.",
          "acceptanceCriteria": [
            "High priority gets documented preference",
            "Low priority eventually runs under bounded arrivals",
            "Queue size remains capped"
          ],
          "implementationNotes": [
            "State workload assumptions used for fairness checks."
          ],
          "verification": [
            "Run mixed-priority fixture",
            "Continuously enqueue within supported arrival bound"
          ],
          "deliverables": [
            "Fair queue and execution trace"
          ],
          "rollout": "Use simple round-robin while priority fairness is uncertain.",
          "skills": [
            "Scheduling",
            "Fairness"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 60
            },
            {
              "field": "Performance engineering",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "b8e604e0-6103-46d8-87dc-a08391b6f7a1",
          "key": "CTIMER-109",
          "title": "Report emulated edge-job lateness separately from duration",
          "type": "CHORE",
          "priority": "LOW",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 105,
          "phaseId": "restart",
          "dependsOn": [
            "CTIMER-101",
            "CTIMER-108"
          ],
          "scenario": "A slow-started job is blamed on execution time because metrics combine queue delay and work duration. Separate them.",
          "acceptanceCriteria": [
            "Lateness measures due-to-start",
            "Duration measures start-to-finish",
            "Clock corrections do not corrupt elapsed metrics"
          ],
          "implementationNotes": [
            "Report synthetic local observations, not hardware deadlines."
          ],
          "verification": [
            "Queue then execute job",
            "Change wall clock during execution"
          ],
          "deliverables": [
            "Scheduler metric schema and cases"
          ],
          "rollout": "Hide derived latency fields if clock provenance is missing.",
          "skills": [
            "Observability",
            "Measurement"
          ],
          "fieldMix": [
            {
              "field": "Embedded and edge",
              "percentage": 50
            },
            {
              "field": "Performance engineering",
              "percentage": 30
            },
            {
              "field": "Site reliability",
              "percentage": 20
            }
          ],
          "patterns": []
        },
        {
          "id": "10c7a112-109b-4699-8525-01b7d10c7593",
          "key": "CTIMER-110",
          "title": "Provide a read-only edge scheduler timeline for recovery diagnosis",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 120,
          "phaseId": "restart",
          "dependsOn": [
            "CTIMER-107",
            "CTIMER-109"
          ],
          "scenario": "Engineers cannot explain why a job was skipped after restart. Export bounded state transitions without running jobs.",
          "acceptanceCriteria": [
            "Timeline identifies schedule and attempt IDs",
            "Skipped reasons are explicit",
            "Inspection causes no callbacks or writes"
          ],
          "implementationNotes": [
            "Omit payloads and fixture file contents."
          ],
          "verification": [
            "Inspect completed sequence",
            "Inspect exhausted and skipped job"
          ],
          "deliverables": [
            "Timeline inspector and side-effect checks"
          ],
          "rollout": "Disable inspection fields that expose task payloads.",
          "skills": [
            "Diagnostics",
            "State machines"
          ],
          "fieldMix": [
            {
              "field": "Developer tooling",
              "percentage": 50
            },
            {
              "field": "Embedded and edge",
              "percentage": 50
            }
          ],
          "patterns": []
        }
      ]
    }
  ]
}
