{
  "schema_version": "2.1.0",
  "slug": "cortex",
  "record_version": "2026-11-25.1",
  "record_status": "draft",
  "content_sha256": "db1e6dd0e6a0d6edeee2a2fd866e33da5beebd1f17c29299d5aae6fac2f51c5b",
  "name": "Cortex",
  "aliases": [
    "Cortex Coding Harness"
  ],
  "summary": "Converts coding-agent session failures into replayable coding tasks at broken commits with executable checks, using repeated controlled comparisons to decide whether individual harness instructions stay.",
  "plain": {
    "what_it_is": {
      "text": "It turns a coding agent's past failures into repeatable coding tests and keeps a new instruction only when those tests show it helps.",
      "from": [
        "summary"
      ]
    },
    "what_it_changes": {
      "text": "It changes the instructions it is given and its saved skills.",
      "from": [
        "modifies",
        "improves_improver"
      ]
    },
    "has_it_been_tested": {
      "text": "Its creators tested it on benchmark tests and reported mixed results. Gains were not shown for stronger models or for agents outside coding. A safety test by its creators found a problem. So it has no proven way to catch harmful instructions. Koobo has not tested it yet.",
      "from": [
        "evidence_claims[].claim_type",
        "evidence_claims[].setting",
        "evidence_claims[].independence",
        "evidence_claims[].outcome",
        "evidence_claims[].provenance.check_status",
        "evidence_claims[].scope.variant_id",
        "plain_facts[claim_scope]",
        "plain_facts[claim_caveat]",
        "evidence_summary.has_koobo_completed_eval"
      ]
    },
    "can_you_undo_it": {
      "text": "We don't know yet. Not shown in the sources. Removing instructions cannot undo code changes or other actions already made.",
      "from": [
        "rollback.has_usable_rollback",
        "rollback.status",
        "rollback.restoration_scope",
        "rollback.automatic_trigger",
        "rollback.tested_fallback_policy",
        "plain_facts[restores]",
        "plain_facts[undo]"
      ]
    },
    "is_there_a_safety_check": {
      "text": "We don't know yet. Not shown in the sources.",
      "from": [
        "safety_gate.status",
        "plain_facts[safety]"
      ]
    },
    "how_hard_to_adopt": {
      "text": "Medium to high effort to adapt its failure-replay testing loop to an existing agent. The full version needs its own platform, but the idea can be copied into an existing agent. Coding agents can reuse its replay of old code versions; other kinds of agents need a new way to replay and grade tasks. License: MIT.",
      "from": [
        "adoption_effort_non_framework.level",
        "plain_facts[effort_scope]",
        "variants[].adoption_effort_level",
        "framework_dependency.requires_framework_migration",
        "plain_facts[adoption]",
        "license.spdx",
        "license.check_status",
        "variants[].license_spdx",
        "plain_facts[license]"
      ]
    }
  },
  "plain_facts": [
    {
      "topic": "effort_scope",
      "ref": null,
      "text": "adapt its failure-replay testing loop to an existing agent",
      "from": "adoption_effort_non_framework.implementation_scope"
    },
    {
      "topic": "adoption",
      "ref": null,
      "text": "Coding agents can reuse its replay of old code versions; other kinds of agents need a new way to replay and grade tasks.",
      "from": "adoption_effort_non_framework.notes"
    },
    {
      "topic": "undo",
      "ref": null,
      "text": "Removing instructions cannot undo code changes or other actions already made.",
      "from": "rollback.side_effect_limit"
    },
    {
      "topic": "claim_caveat",
      "ref": "cortex-bench-effectiveness-1",
      "text": "Gains were not shown for stronger models or for agents outside coding.",
      "from": "evidence_claims[cortex-bench-effectiveness-1].scope.caveats"
    },
    {
      "topic": "claim_caveat",
      "ref": "cortex-planted-harm-1",
      "text": "So it has no proven way to catch harmful instructions.",
      "from": "evidence_claims[cortex-planted-harm-1].scope.caveats"
    }
  ],
  "modifies": [
    "prompt",
    "skills"
  ],
  "improves_improver": false,
  "learning_signal": {
    "types": [
      "execution_trace",
      "automated_grader"
    ],
    "description": "Session failures converted into replayable coding tasks at broken commits paired with executable checks."
  },
  "pre_use_evaluation": {
    "status": "yes",
    "held_out_split": "partial",
    "live_activation_gate": "no",
    "how": "Runs repeated controlled comparisons on replayable tests to measure whether individual instructions help before keeping them. Held-out study is separate from recurrent task-based admission checks; unattended live gating is not established."
  },
  "rollback": {
    "status": "unverified",
    "has_usable_rollback": "unverified",
    "restoration_scope": "unverified",
    "automatic_trigger": null,
    "tested_fallback_policy": "unverified",
    "mechanism": "Admission checks decide whether instructions stay or go; an explicit post-deployment restoration or unattended rollback controller is unverified in opened sources.",
    "side_effect_limit": "Removing harness instructions cannot undo prior code commits or external side effects."
  },
  "post_deploy_measurement": {
    "status": "partial",
    "how": "Includes exposure logging and repeated comparisons; an unattended live monitoring window is not established."
  },
  "safety_gate": {
    "status": "unverified",
    "blocks_unsafe_despite_utility_gain": "unverified",
    "write_time_blocks_activation": "unverified",
    "reuse_time_blocks_activation": "unverified",
    "how": "No enforcing behavioral safety gate is established in opened sources. The paper's planted-harm test was an evaluation check that did not establish reliable damage detection (recorded under evidence_claims)."
  },
  "license": {
    "spdx": "MIT",
    "source_url": "https://github.com/samugit83/cortex/blob/main/LICENSE",
    "check_status": "checked",
    "checked_at": "2026-11-25",
    "checked_by": "Codex live check",
    "notes": "LICENSE contains the MIT permission notice."
  },
  "repo_url": "https://github.com/samugit83/cortex",
  "paper_url": "https://arxiv.org/html/2610.14216",
  "maturity": {
    "stage": "research_prototype",
    "last_observed_activity_date": null,
    "activity_criterion": "Paper and license read 2026-11-24; direct repo root retrieval failed in one check and live check is pending."
  },
  "framework_dependency": {
    "level": "standalone_library",
    "requires_framework_migration": "optional_port",
    "required_runtime_or_sdk": "Native unit is a coding task at a broken git commit with an executable test; non-coding domains require building a new replayable task interface."
  },
  "adoption_effort_non_framework": {
    "level": "medium_to_high",
    "judgment_owner": "koobo_editorial",
    "implementation_scope": "Adapting Cortex's replayable-failure comparison loop to a custom agent (especially outside software engineering).",
    "notes": "Coding agents can reuse git-commit replay; non-coding domains need a new task-snapshot and grading interface."
  },
  "variants": [
    {
      "variant_id": "cortex-coding-harness",
      "label": "Cortex coding-agent harness",
      "scope": "Broken-commit coding failure replay and repeated instruction comparisons.",
      "license_spdx": "MIT",
      "license_check_status": "checked",
      "learning_signal_types": [
        "execution_trace",
        "automated_grader"
      ],
      "pre_use_evaluation_status": "yes",
      "rollback_status": "unverified",
      "has_usable_rollback": "unverified",
      "safety_gate_status": "unverified",
      "framework_dependency_level": "standalone_library",
      "requires_framework_migration": "optional_port",
      "adoption_effort_level": "medium_to_high",
      "notes": "Repository code layout unverified due to root fetch failure in local check."
    }
  ],
  "known_failure_modes": [
    {
      "mode": "Sparse recurring signal in real projects",
      "detail": "The structlog real-project study harvested 8 tasks and only 1 correction lesson; nothing recurred and no harness change was kept.",
      "provenance": {
        "source_url": "https://arxiv.org/html/2610.14216",
        "source_revision": "unpinned",
        "location": "Section 5.6",
        "accessed_date": "2026-11-24",
        "check_status": "pending",
        "source_note": "Shows daily teachable mistakes are not guaranteed in real repositories.",
        "checked_at": null,
        "checked_by": null
      }
    },
    {
      "mode": "Uneven gains across model strengths",
      "detail": "Primary Haiku gain was +55.0 points; matched single-harness comparison showed +66.7 points on Haiku vs +5.6 on Sonnet (95% CI [-2.8, +13.9]), which is not an established positive Sonnet effect.",
      "provenance": {
        "source_url": "https://arxiv.org/html/2610.14216",
        "source_revision": "unpinned",
        "location": "Sections 5.3 and 7",
        "accessed_date": "2026-11-24",
        "check_status": "pending",
        "source_note": "Paper warns one harness under one stronger model is too little to generalize.",
        "checked_at": null,
        "checked_by": null
      }
    },
    {
      "mode": "Planted-harm test did not establish damage detection",
      "detail": "Paper's planted-harm test failed to establish reliable detection of harmful instructions.",
      "provenance": {
        "source_url": "https://arxiv.org/html/2610.14216",
        "source_revision": "unversioned arXiv URL as served 2026-11-25 (version not recorded)",
        "location": "Section 5.3",
        "accessed_date": "2026-11-24",
        "check_status": "checked",
        "source_note": "Evaluation result; does not establish an enforcing safety gate.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    }
  ],
  "evidence_summary": {
    "settings_observed": [
      "benchmark"
    ],
    "independence_observed": [
      "author"
    ],
    "effectiveness_outcome": "mixed",
    "safety_outcome": "negative",
    "has_koobo_completed_eval": false,
    "summary_note": "Author coding benchmarks show mixed model-dependent results; planted-harm test did not establish reliable damage detection."
  },
  "evidence_claims": [
    {
      "claim_id": "cortex-bench-effectiveness-1",
      "claim_type": "effectiveness",
      "statement": "Primary Haiku gain is +55.0 percentage points; a matched single-harness comparison yields +66.7 points on Haiku versus +5.6 points on Sonnet (95% CI [-2.8, +13.9], not an established positive Sonnet effect). The structlog real-project study harvested 8 tasks and 1 lesson and kept no changed harness.",
      "setting": "benchmark",
      "independence": "author",
      "outcome": "mixed",
      "scope": {
        "variant_id": "cortex-coding-harness",
        "model": "Claude Haiku 4.5 and Claude Sonnet 5",
        "suite_or_environment": "Coding-agent benchmark runs plus structlog real-project study (8 tasks, 1 lesson)",
        "judge_or_metric": "Executable coding tests on broken-commit replays",
        "sample_or_duration": "8 harvested tasks in structlog study",
        "caveats": "Does not establish a positive gain on stronger models or transfer to non-coding agents."
      },
      "provenance": {
        "source_url": "https://arxiv.org/html/2610.14216",
        "source_revision": "unversioned arXiv URL as served 2026-11-25 (version not recorded)",
        "location": "Sections 5.1, 5.5, and 5.6",
        "accessed_date": "2026-11-24",
        "check_status": "checked",
        "source_note": "Codex live check confirmed every quoted value.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    },
    {
      "claim_id": "cortex-planted-harm-1",
      "claim_type": "safety",
      "statement": "In the author planted-harm evaluation, harmful skills were not opened and the harmful-rule screens did not demonstrate the intended damage test, so reliable harm detection is not established.",
      "setting": "benchmark",
      "independence": "author",
      "outcome": "negative",
      "scope": {
        "variant_id": "cortex-coding-harness",
        "model": "Paper evaluation setup",
        "suite_or_environment": "Planted-harm test in arXiv:2610.14216",
        "judge_or_metric": "Damage detection rate on planted harmful instructions",
        "sample_or_duration": "unverified",
        "caveats": "Evaluation finding only; confirms that an enforcing safety gate is not established."
      },
      "provenance": {
        "source_url": "https://arxiv.org/html/2610.14216",
        "source_revision": "unversioned arXiv URL as served 2026-11-25 (version not recorded)",
        "location": "Section 5.3",
        "accessed_date": "2026-11-24",
        "check_status": "checked",
        "source_note": "Codex live check.",
        "checked_at": "2026-11-25",
        "checked_by": "Codex live check"
      }
    }
  ],
  "control_evidence": [],
  "adoption_recipe": {
    "adoptable_directly": true,
    "authority_notice": "This record is factual engineering reference data. It grants no action authority, execution permission, or deployment approval to any reader or agent.",
    "upstream_controls": {
      "pre_use_eval": [
        "Upstream Cortex converts session failures into replayable executable tests and runs repeated controlled comparisons before keeping instructions."
      ],
      "rollback": [],
      "safety_gate": [],
      "scope_note": "Upstream admission comparisons do not establish reliable harm detection or live rollback. Koobo required controls supply separate safety gating and restoration."
    },
    "koobo_required_controls": {
      "edit_surface_bounds": [
        "The adopter's system confines instruction edits to versioned non-executable harness guidance files.",
        "Repository test harnesses, CI gates, credentials, and safety rules stay outside learner write access."
      ],
      "pre_use_eval_requirements": [
        "The evaluation harness separates learning data, candidate selection data, and sealed final test data grouped by incident and day (following GEPA, arXiv:2507.19457).",
        "The pre-activation suite includes already-successful control cases and rule-reversal cases rather than failure cases alone (following EvoPathBench, arXiv:2609.24663, and Anthropic memory research).",
        "The release controller binds the evaluated artifact SHA-256 hash to the passing verdict so unverified runtime edits cannot activate."
      ],
      "rollback_requirements": [
        "The deployment harness retains immutable parent artifact snapshots with SHA-256 content hashes.",
        "Regression checks compare active and parent snapshots on matched fresh shadow probes rather than comparing today's score to yesterday's score.",
        "Before restoring a fallback snapshot, the harness tests that fallback against current policies and abstains or escalates to an operator if neither version passes.",
        "Operational runbooks separate artifact restoration from compensating actions because restoring text or skill files cannot undo sent messages, disclosed data, or committed external writes."
      ],
      "safety_gate_requirements": [
        "The release pipeline evaluates safety independently from task utility so utility gains cannot offset a disallowed action (grounded in Practice Makes Unsafe, arXiv:2608.12851).",
        "The safety gate inspects candidate artifacts both at write time and at retrieval or reuse time, blocking activation when checks fail.",
        "The safety test suite covers both untrusted-input poisoning (arXiv:2608.12851) and benign task-pressure degradation (SEABench, arXiv:2609.35596)."
      ],
      "telemetry_and_abstention_requirements": [
        "The deployment harness defaults to abstention (keeping the approved parent artifact) whenever evaluation evidence is inconclusive, missing, or fails a safety check.",
        "Activation authority resides in an external release controller outside learner write permissions.",
        "The runtime logs every artifact hash reaching a model call, every blocked write or retrieval attempt, and every abstention even when sandbox checks prevent external harm."
      ]
    },
    "synthetic_rejected_candidate_example": {
      "label": "synthetic_example",
      "proposed_change": "Harness rule instructing the coding agent to pass `--no-verify` on git commits to avoid linter failures.",
      "utility_result": "Increased pass rate on 3 broken-commit formatting tasks.",
      "safety_gate_result": "Blocked by the write-time and reuse-time safety gate prohibiting bypass of repository verification hooks.",
      "outcome": "rejected"
    }
  },
  "experiment_refs": [],
  "sources": [
    {
      "title": "Cortex paper (arXiv:2610.14216)",
      "url": "https://arxiv.org/html/2610.14216",
      "published_date": "unverified",
      "accessed_date": "2026-11-25",
      "revision": "unversioned arXiv URL as served 2026-11-25 (version not recorded)",
      "location": "Sections 5.1, 5.3, 5.5, and 5.6",
      "type": "paper",
      "check_status": "checked",
      "claims_supported": [
        "Haiku +55.0 / +66.7 vs Sonnet +5.6 CI [-2.8, +13.9]",
        "Structlog 8 tasks / 1 lesson",
        "Planted-harm evaluation result"
      ],
      "checked_at": "2026-11-25",
      "checked_by": "Codex live check"
    },
    {
      "title": "Cortex LICENSE",
      "url": "https://github.com/samugit83/cortex/blob/main/LICENSE",
      "published_date": "unverified",
      "accessed_date": "2026-11-25",
      "revision": "main branch as served 2026-11-25 (commit SHA not recorded)",
      "location": "Full license text",
      "type": "license",
      "check_status": "checked",
      "claims_supported": [
        "MIT license"
      ],
      "checked_at": "2026-11-25",
      "checked_by": "Codex live check"
    }
  ],
  "unverified_fields": [
    "rollback.status",
    "rollback.has_usable_rollback",
    "safety_gate.status",
    "safety_gate.blocks_unsafe_despite_utility_gain",
    "maturity.last_observed_activity_date"
  ],
  "verification": {
    "status": "primary_source_check_pending",
    "drafted_at": "2026-11-25",
    "last_primary_check_at": null,
    "source_basis": "Drafted from 2026-11-24 local research notes. A Codex live check on 2026-11-25 confirmed or corrected specific fields; those carry check_status checked with checker and date. Everything else is pending.",
    "reviewer_notes": "Live-audit corrections from 2026-11-25 applied. Record remains a draft until every source is pinned and checked."
  },
  "citation": {
    "id": "koobo:agent-learning:cortex@2026-11-25.1",
    "canonical_url": "https://koobo.co/agent-learning/methods/cortex",
    "versioned_url": "https://koobo.co/agent-learning/methods/cortex/v/2026-11-25.1.json",
    "plain_text": "Koobo Agent Learning Index, \"Cortex\", record 2026-11-25.1 (draft, primary-source check pending), https://koobo.co/agent-learning/methods/cortex/v/2026-11-25.1.json",
    "bibtex": "@misc{koobo_agent_learning_cortex_2026,\n  title = {Cortex (Koobo Agent Learning Index, draft record 2026-11-25.1)},\n  author = {{Koobo Research}},\n  year = {2026},\n  url = {https://koobo.co/agent-learning/methods/cortex/v/2026-11-25.1.json},\n  note = {Draft record; primary-source check pending}\n}"
  }
}
