{
  "name": "Model-agnostic Node capability admission",
  "description": "Make a Node prove its selected Model Artifact, Shard, and execution recipe work before it becomes routable. Qwen3.6 is only an opt-in development fixture; the implementation and protocol are model-agnostic.",
  "branchName": "ralph/node-capability-admission",
  "userStories": [
    {
      "id": "NCA-001",
      "title": "Generic capability and recipe report",
      "description": "Create a model-agnostic versioned capability report and local recipe-manifest contract without model or vendor code branches.",
      "acceptanceCriteria": [
        "Stable JSON-serializable report includes generic model identity/fingerprint, shard range, recipe ID/version, backend/device identity, status, timing, and sanitized diagnostics",
        "Arbitrary model IDs are preserved without Qwen or optional-kernel code paths",
        "Local recipe manifest has explicit schema/catalogue version",
        "Malformed input fails with actionable, secret-safe diagnostics",
        "Targeted pytest passes",
        "Full pytest passes or an exact unrelated blocker is recorded"
      ],
      "priority": 1,
      "passes": true,
      "notes": "Source issue: .scratch/node-capability-admission/issues/01-generic-capability-report.md",
      "dependsOn": [],
      "completionNotes": "Completed by agent"
    },
    {
      "id": "NCA-002",
      "title": "Doctor selected model/shard with a bounded real forward",
      "description": "Add model-agnostic doctor validation using the same backend execution path as startup.",
      "acceptanceCriteria": [
        "meshnet-node doctor resolves the same selected model/shard/config as startup",
        "Default doctor performs one bounded real selected-shard forward before success",
        "All-recipes mode is explicit",
        "Failure exits non-zero and writes actionable, non-traceback diagnostics by default",
        "Unit tests have no GPU/download requirement; integration doctor smoke test is marker- and model-config-gated",
        "Targeted pytest passes",
        "Full pytest passes or an exact unrelated blocker is recorded"
      ],
      "priority": 2,
      "passes": true,
      "notes": "Source issue: .scratch/node-capability-admission/issues/02-doctor-real-forward.md",
      "dependsOn": [
        "NCA-001"
      ],
      "completionNotes": "Completed by agent"
    },
    {
      "id": "NCA-003",
      "title": "Fail-closed startup admission lifecycle",
      "description": "Prevent a selected model/shard from registering as routable unless its matching capability report passed.",
      "acceptanceCriteria": [
        "Failed selected-recipe validation makes startup exit before tracker registration",
        "Only a fresh matching model/shard/recipe/backend report can accompany registration",
        "Stub tests use an explicit test-safe capability path rather than production bypass",
        "Tests prove tracker registration is not called after validation failure",
        "Targeted pytest passes",
        "Full pytest passes or an exact unrelated blocker is recorded"
      ],
      "priority": 3,
      "passes": true,
      "notes": "Source issue: .scratch/node-capability-admission/issues/03-fail-closed-startup-admission.md",
      "dependsOn": [
        "NCA-001",
        "NCA-002"
      ],
      "completionNotes": "Completed by agent"
    },
    {
      "id": "NCA-004",
      "title": "Tracker validated-capability routing gate",
      "description": "Persist and expose validated generic capability data, then route only matching admitted candidates.",
      "acceptanceCriteria": [
        "Tracker validates/records sanitized generic report data",
        "Route selection excludes invalid, absent, failed, stale, or mismatched capabilities",
        "Valid candidates retain coverage-first and throughput routing behavior",
        "Network map exposes safe admission state",
        "Older-node compatibility policy is documented and tested",
        "Deterministic tests use arbitrary model IDs",
        "Targeted pytest passes",
        "Full pytest passes or an exact unrelated blocker is recorded"
      ],
      "priority": 4,
      "passes": true,
      "notes": "Source issue: .scratch/node-capability-admission/issues/04-tracker-validated-capability-routing.md",
      "dependsOn": [
        "NCA-001",
        "NCA-003"
      ],
      "completionNotes": "Completed by agent"
    },
    {
      "id": "NCA-005",
      "title": "Model-agnostic docs and hardware-lane contract",
      "description": "Document doctor/admission behavior and the opt-in real-model CI lane without promising model-specific support.",
      "acceptanceCriteria": [
        "Docs distinguish detected hardware, validated recipe, and routable Node",
        "Docs make no universal optional-backend/model/vendor claim",
        "Certified-lane CI contract includes environment-configured integration doctor test",
        "Signed updater is explicitly deferred; P0 has no dynamic executable dependency installation",
        "Targeted pytest passes",
        "Full pytest passes or an exact unrelated blocker is recorded"
      ],
      "priority": 5,
      "passes": true,
      "notes": "Source issue: .scratch/node-capability-admission/issues/05-docs-hardware-lane-contract.md",
      "dependsOn": [
        "NCA-002",
        "NCA-004"
      ],
      "completionNotes": "Completed by agent"
    }
  ],
  "metadata": {
    "updatedAt": "2026-07-12T01:54:03.030Z"
  }
}