{
  "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": "SIPC",
      "title": "Supervise local worker processes without losing their output",
      "field": "Systems programming",
      "summary": "Build framed IPC, bounded buffering, process lifecycle control and restart-safe request identity.",
      "context": "A fictional document converter launches local sandbox substitutes as child processes. Its prototype parses newline-delimited output, leaks descriptors, and retries requests after ambiguous worker exits. Create a Rust supervisor and deterministic worker fixtures; no document content or production sandbox is supplied.",
      "stack": [
        "Rust",
        "Child processes",
        "Unix sockets or named pipes",
        "Vitest or cargo test"
      ],
      "prerequisites": [
        "File descriptors",
        "Framing",
        "Process signals"
      ],
      "developerValue": "Practice IPC contracts, resource inheritance, process supervision and ambiguous completion.",
      "companyValue": "Review a local worker boundary that contains crashes and preserves request outcomes before connecting an isolated execution provider.",
      "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": "36749fbb-c8fc-48cd-a96a-b504b7b7c0ed",
          "key": "SIPC-101",
          "title": "Frame worker messages without treating newlines as boundaries",
          "type": "TASK",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 90,
          "phaseId": "model",
          "dependsOn": [],
          "scenario": "A diagnostic string contains a newline and splits one response into two apparent messages.",
          "acceptanceCriteria": [
            "Frame declares version, type, request identity, and bounded payload length",
            "Reader handles partial headers and payloads",
            "Unknown versions fail without consuming the next frame"
          ],
          "implementationNotes": [
            "Cap frame size before allocating its payload buffer."
          ],
          "verification": [
            "Read several frames split across every header boundary.",
            "Advertise an oversized or truncated payload and verify bounded rejection."
          ],
          "deliverables": [
            "Versioned frame codec and fragmentation tests"
          ],
          "rollout": "Keep the line protocol available only for old local fixtures during migration.",
          "skills": [
            "Binary protocols",
            "Input validation"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "API design",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "64ff2e43-105b-4cd5-9cd2-881d56087400",
          "key": "SIPC-102",
          "title": "Close inherited descriptors before executing the worker",
          "type": "BUG",
          "priority": "MEDIUM",
          "difficulty": "FOUNDATIONAL",
          "estimateMinutes": 90,
          "phaseId": "model",
          "dependsOn": [],
          "scenario": "A child inherits the supervisor listener and keeps it open after the parent exits, preventing clean restart.",
          "acceptanceCriteria": [
            "Child receives only declared stdin, stdout, stderr, and control handles",
            "Supervisor closes duplicate ends after spawn",
            "Restart can bind the same local endpoint"
          ],
          "implementationNotes": [
            "Do not depend on a global close-all scan that races other threads opening handles."
          ],
          "verification": [
            "Spawn, complete, and restart a worker while checking descriptor counts.",
            "Add an undeclared inheritable handle and confirm the fixture detects it."
          ],
          "deliverables": [
            "Spawn handle policy and leak regression"
          ],
          "rollout": "Audit handle inheritance before enabling multiple workers.",
          "skills": [
            "Process spawning",
            "Resource cleanup"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Security",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "9c0d3081-a6bd-4512-a3cf-a68db6b9567f",
          "key": "SIPC-103",
          "title": "Correlate out-of-order worker replies to the right caller",
          "type": "STORY",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "model",
          "dependsOn": [
            "SIPC-101"
          ],
          "scenario": "Two conversions finish in reverse order and the supervisor resolves the first waiter with the second result.",
          "acceptanceCriteria": [
            "Every accepted request has a unique operation identity",
            "Replies resolve only the matching pending request",
            "Duplicate and unknown replies are recorded without completing another caller"
          ],
          "implementationNotes": [
            "Keep the pending map bounded by admission capacity and deadlines."
          ],
          "verification": [
            "Complete three requests in reverse order and verify each result.",
            "Send a duplicate and an unknown identity and confirm pending callers remain unchanged."
          ],
          "deliverables": [
            "Correlation table and ordering tests"
          ],
          "rollout": "Enable concurrent requests only after correlation checks pass.",
          "skills": [
            "Correlation IDs",
            "Concurrency"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Distributed systems",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "4fb92f59-13b2-463f-ba7f-7a5feb290b0d",
          "key": "SIPC-104",
          "title": "Separate protocol output from worker diagnostics",
          "type": "CHORE",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "control",
          "dependsOn": [
            "SIPC-101",
            "SIPC-102"
          ],
          "scenario": "A library warning written to stdout is parsed as a reply and closes the worker connection.",
          "acceptanceCriteria": [
            "Protocol frames use one declared channel",
            "Diagnostics use stderr with bounded capture",
            "Malformed protocol bytes fail the request without hiding diagnostics"
          ],
          "implementationNotes": [
            "Sanitize diagnostics and cap retained bytes per worker."
          ],
          "verification": [
            "Return a valid response while writing warnings to stderr.",
            "Write nonprotocol bytes on the protocol channel and verify isolated failure."
          ],
          "deliverables": [
            "Channel contract and mixed-output fixtures"
          ],
          "rollout": "Treat unexpected stdout as a worker defect during local migration.",
          "skills": [
            "Process I/O",
            "Diagnostics"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Developer tooling",
              "percentage": 30
            }
          ],
          "patterns": []
        },
        {
          "id": "22ae357c-b779-4cb2-af5d-b885dc64e6b6",
          "key": "SIPC-105",
          "title": "Apply backpressure when a worker stops reading",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 240,
          "phaseId": "control",
          "dependsOn": [
            "SIPC-103",
            "SIPC-104"
          ],
          "scenario": "A stalled child leaves the supervisor buffering every request body until memory is exhausted.",
          "acceptanceCriteria": [
            "Per-worker and global pending byte limits are enforced",
            "Admission reports overload before consuming the body",
            "Healthy workers can continue within their own capacity"
          ],
          "implementationNotes": [
            "Do not solve the stall with an unbounded retry queue."
          ],
          "verification": [
            "Drive balanced workers to their declared capacity.",
            "Pause one reader and prove buffers remain bounded while another worker progresses."
          ],
          "deliverables": [
            "IPC admission controller and stalled-reader test"
          ],
          "rollout": "Start with small limits and expose overload to callers.",
          "skills": [
            "Backpressure",
            "Resource isolation"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 60
            },
            {
              "field": "Performance engineering",
              "percentage": 40
            }
          ],
          "patterns": [
            {
              "pattern": "bulkhead",
              "activity": "APPLY",
              "focus": "Isolate each child process buffer and preserve global capacity so one stopped reader cannot consume every supervisor resource."
            }
          ]
        },
        {
          "id": "6995a556-fce5-42e4-b007-06bed5fd4f4a",
          "key": "SIPC-106",
          "title": "Classify worker exit before deciding whether to retry",
          "type": "BUG",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 240,
          "phaseId": "control",
          "dependsOn": [
            "SIPC-103"
          ],
          "scenario": "The worker exits after writing its output but before the acknowledgement frame; automatic retry may produce a second external artifact.",
          "acceptanceCriteria": [
            "Outcome distinguishes not-started, running, acknowledged, failed, and unknown",
            "Unknown completion requires status lookup or explicit review",
            "Retry reuses the stable operation identity"
          ],
          "implementationNotes": [
            "Do not infer failure solely from pipe closure or process exit code."
          ],
          "verification": [
            "Exercise exits before start and after acknowledged completion.",
            "Exit after effect but before acknowledgement and preserve UNKNOWN without blind retry."
          ],
          "deliverables": [
            "Exit classification state machine and ambiguity fixtures"
          ],
          "rollout": "Disable automatic retry for unknown outcomes until the worker supports reconciliation.",
          "skills": [
            "Distributed failure",
            "Idempotency",
            "State machines"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 60
            },
            {
              "field": "Distributed systems",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "99f143fa-585f-47c0-af09-c74cc2255eb8",
          "key": "SIPC-107",
          "title": "Terminate a process tree without signaling unrelated work",
          "type": "STORY",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 360,
          "phaseId": "control",
          "dependsOn": [
            "SIPC-102",
            "SIPC-106"
          ],
          "scenario": "A timed-out worker launches a helper. Killing only the parent leaks the helper; reusing a process-group identifier risks signaling a newer process.",
          "acceptanceCriteria": [
            "Each operation owns a fresh supervised process group or platform job object",
            "Termination verifies the group identity before signaling",
            "Cleanup observes all declared descendants or reports unresolved members"
          ],
          "implementationNotes": [
            "Tests use inert local helpers and never enumerate or signal arbitrary host processes."
          ],
          "verification": [
            "Terminate a fixture parent and its two waiting children.",
            "Reuse a synthetic numeric identifier and prove identity validation blocks the stale cleanup."
          ],
          "deliverables": [
            "Process-tree lifecycle adapter and safe termination tests"
          ],
          "rollout": "Keep worker concurrency at one until descendant cleanup is reliable.",
          "skills": [
            "Process groups",
            "Identity fencing",
            "Cleanup"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 60
            },
            {
              "field": "Security",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "c7702989-e5a3-4afa-b275-bf5af95f87a9",
          "key": "SIPC-108",
          "title": "Restart crashed workers without retry storms",
          "type": "CHORE",
          "priority": "HIGH",
          "difficulty": "ADVANCED",
          "estimateMinutes": 240,
          "phaseId": "operate",
          "dependsOn": [
            "SIPC-105",
            "SIPC-106"
          ],
          "scenario": "A corrupt fixture crashes every replacement worker, and immediate restart loops consume the supervisor CPU.",
          "acceptanceCriteria": [
            "Restart budget uses bounded attempts and backoff",
            "Stable runtime resets the failure window",
            "Exhaustion opens a visible unavailable state"
          ],
          "implementationNotes": [
            "Use injected time and deterministic jitter; do not sleep in tests."
          ],
          "verification": [
            "Crash twice, recover, and verify the budget clears after stability.",
            "Crash every replacement and confirm restart attempts stop at the bound."
          ],
          "deliverables": [
            "Restart policy and crash-loop test"
          ],
          "rollout": "Fail new requests fast while a worker class is unavailable.",
          "skills": [
            "Supervision",
            "Backoff",
            "Failure isolation"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Site reliability",
              "percentage": 30
            }
          ],
          "patterns": [
            {
              "pattern": "circuit-breaker",
              "activity": "APPLY",
              "focus": "Open a bounded unavailable state after repeated worker crashes so replacement attempts stop until the declared recovery probe."
            }
          ]
        },
        {
          "id": "2b2c45a8-78da-429f-b580-cbe94eac9a12",
          "key": "SIPC-109",
          "title": "Reconcile pending operations after supervisor restart",
          "type": "TASK",
          "priority": "HIGH",
          "difficulty": "EXPERT",
          "estimateMinutes": 360,
          "phaseId": "operate",
          "dependsOn": [
            "SIPC-103",
            "SIPC-106",
            "SIPC-108"
          ],
          "scenario": "The supervisor restarts with requests marked running but no in-memory correlation table and no proof whether workers completed them.",
          "acceptanceCriteria": [
            "Persist stable operation identity and last acknowledged state before dispatch",
            "Recovery queries a deterministic worker ledger when supported",
            "Unresolved operations remain visible and are never silently marked failed"
          ],
          "implementationNotes": [
            "The local ledger contains synthetic identities and bounded metadata, not document bodies."
          ],
          "verification": [
            "Restart after acknowledgement and restore the completed result.",
            "Restart during an unqueryable effect and retain UNKNOWN for review."
          ],
          "deliverables": [
            "Pending-operation journal and restart drill"
          ],
          "rollout": "Require reconciliation support before enabling autonomous retry.",
          "skills": [
            "Crash recovery",
            "Journaling",
            "Idempotency"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 60
            },
            {
              "field": "Storage systems",
              "percentage": 40
            }
          ],
          "patterns": []
        },
        {
          "id": "2a7e116d-a6c6-4d14-913d-61b6b8ea8dad",
          "key": "SIPC-110",
          "title": "Document the IPC boundary for a future isolated provider",
          "type": "BUG",
          "priority": "MEDIUM",
          "difficulty": "INTERMEDIATE",
          "estimateMinutes": 150,
          "phaseId": "operate",
          "dependsOn": [
            "SIPC-107",
            "SIPC-108",
            "SIPC-109"
          ],
          "scenario": "The local child-process harness is about to be mistaken for a production candidate-code sandbox.",
          "acceptanceCriteria": [
            "Document framing, resource limits, process identity, shutdown, and unresolved outcomes",
            "State which isolation guarantees the local supervisor does not provide",
            "Define the provider contract a hardened external executor must satisfy"
          ],
          "implementationNotes": [
            "Do not claim namespace, secret, network, or host isolation from ordinary child processes."
          ],
          "verification": [
            "Reproduce the local crash and restart drill from the guide.",
            "Attempt to select the local adapter under a production configuration and require fail-closed behavior."
          ],
          "deliverables": [
            "IPC contract and explicit production boundary note"
          ],
          "rollout": "Keep the local supervisor restricted to synthetic development fixtures.",
          "skills": [
            "Provider interfaces",
            "Security boundaries",
            "Documentation"
          ],
          "fieldMix": [
            {
              "field": "Systems programming",
              "percentage": 70
            },
            {
              "field": "Platform engineering",
              "percentage": 30
            }
          ],
          "patterns": []
        }
      ],
      "id": "a40a56f5-00da-4afb-b1fb-38fe8499c4be"
    }
  ]
}
