[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79H329MZEAQ0TP5KGP0XTAH":3,"skill-same:01M79H329MZEAQ0TP5KGP0XTAH":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M79H329MZEAQ0TP5KGP0XTAH","developing-in-shadow",null,"Shared shadow-development pattern: mode-state ladders, non-blocking telemetry, scoring, gate checks, and isolation audits.","maraxen\u002Fcisternal","maraxen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F67157875?v=4","01M79H1VQ5D3ZK82KNJYXD3HRH","Marielle Russo","01M79H1VQX3KYSD9DVKVWJDN7Z",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal\u002Fblob\u002Fmain\u002F.praxia\u002Fskills\u002Fdeveloping-in-shadow\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: developing-in-shadow\ndescription: \"Shared shadow-development pattern: mode-state ladders, non-blocking telemetry, scoring, gate checks, and isolation audits.\"\ncovers_families: []\ndistinctive_strings:\n  - \"developing-in-shadow\"\n  - \"cisternal shadow check\"\n  - \"cisternal shadow score\"\n  - \"shadow-development\"\n---\n\n# developing-in-shadow\n\nThe shadow-development pattern allows candidate logic or experimental subagents to run alongside production or test workflows, recording what they would have done without actuating or causing side effects, calibrating empirical accuracy against ground truth, and enforcing pre-registered promotion gates before cutover.\n\n## When to Use\n\nUse when a new gate, classifier, mapper or subagent should run beside the live path before it is trusted: authoring a `.praxia\u002Fmode_state\u002F\u003Cfeature>.toml`, emitting shadow verdicts, scoring them against labels with `cisternal shadow score`, or checking a promotion gate with `cisternal shadow check`.\n\n## Stage Ladder\n\nEvery candidate feature progresses through a 4-stage lifecycle:\n1. `off`: Feature is inactive.\n2. `shadow`: Candidate runs alongside live logic. All writes are strictly confined to shadow logs; candidate verdicts never modify actor output or live state.\n3. `advisory`: Candidate verdicts are presented to human actors or higher-level agents for guidance, but not enforced (non-blocking). Promotion to advisory requires passing a pre-registered promotion gate.\n4. `enforce`: Feature acts as an authoritative, blocking gate or live implementation.\n\n## 7-Step Implementation Lifecycle\n\n### Step 1: Pre-register Mode-State TOML\n\nBefore running candidate code, author and version-control a mode-state file under `.praxia\u002Fmode_state\u002F\u003Cfeature>.toml` (or `.cisternal\u002Fmode_state\u002F\u003Cfeature>.toml`):\n\n```toml\n[feature]\nname = \"bearings_charter_mapper\"\ndescription = \"Maps experiment sidecars to research charter purposes\"\nversion = \"0.1.0\"\n\n[ladder]\ncurrent_stage = \"shadow\"\n\n[shadow]\ntraffic_fraction = 1.0\nwrites_isolated = true\nwrites_isolated_enforced_by = \"tests\u002Ftest_isolation.py::test_charter_mapper_isolation\"\n\n[scoring]\npositive_label = true\n\n[promotion]\ntarget_stage = \"advisory\"\nmin_verdicts = 30\nmin_labels = 15\nallowed_label_sources = [\"frozen_gold\", \"owner_confirmed\", \"at_work\"]\nmin_precision = 0.85\nmin_precision_lower_bound = 0.70\nmin_recall = 0.80\nmin_recall_lower_bound = 0.65\nmax_fp_rate = 0.05\nisolation_violations_max = 0\nthreshold_basis = \"pre-registered calibration based on domain requirements\"\n```\n\n### Step 2: Initialize Telemetry Pipeline\n\nAt application or test startup, initialize telemetry once:\n\n```python\nimport cisternal\n\ncisternal.init()\n```\n\nIf uninitialized, shadow emit functions preserve library isolation and return `False` without raising or spawning background threads.\n\n### Step 3: Emit Candidate Verdicts (non-blocking telemetry)\n\nIn the candidate evaluation path, emit non-blocking verdicts:\n\n```python\nimport cisternal.shadow\n\naccepted = cisternal.shadow.emit_verdict(\n    feature=\"bearings_charter_mapper\",\n    subject_key=f\"sidecar:{sidecar_id}\",\n    verdict={\"decision\": \"pass\", \"confidence\": 0.92},\n    stage=\"shadow\",\n    feature_version=\"0.1.0\",\n    inputs_sha256=input_payload_hash,\n)\n```\n\n### Step 4: Capture Ground Truth Labels\n\nAttach verified ground truth using structured provenance sources (`frozen_gold > owner_confirmed > at_work > retrospective`):\n\n```python\ncisternal.shadow.emit_label(\n    feature=\"bearings_charter_mapper\",\n    subject_key=f\"sidecar:{sidecar_id}\",\n    label=True,\n    label_source=\"frozen_gold\",\n    labeller=\"reviewer_id\",\n)\n```\n\n### Step 5: Score Evaluation with Wilson Intervals\n\nCalculate confusion metrics and Wilson confidence intervals:\n\n```bash\ncisternal shadow score bearings_charter_mapper --records-dir \u002Fpath\u002Fto\u002Flogs\n```\n\nThe scorer joins strictly on `subject_key`, resolves multiple verdicts by latest timestamp, prioritizes label provenance, and refuses on zero labels (exit code 2). Confirm that the Wilson CI lower bound strictly exceeds the empirical base rate.\n\n### Step 6: Verify Actor Isolation\n\nVerify that the shadow arm does not alter live outputs or leak side effects outside its log directory:\n\n```python\nfrom cisternal.shadow import prove_isolation\n\ndef test_charter_mapper_isolation(tmp_path):\n    live_dir = tmp_path \u002F \"live\"\n    shadow_log = tmp_path \u002F \"logs\"\n\n    res = prove_isolation(\n        actor_live_fn=run_baseline_mapper,\n        actor_shadow_fn=run_shadow_mapper,\n        live_roots=[live_dir],\n        shadow_log_dir=shadow_log,\n        feature=\"bearings_charter_mapper\",\n        enforced_by=\"tests\u002Ftest_isolation.py::test_charter_mapper_isolation\",\n    )\n    assert res.passed\n```\n\nPass `feature=` so the call emits a `shadow.isolation` event (it emits nothing when `feature` is empty, and also when telemetry is uninitialized). `cisternal shadow check` blocks promotion unless it finds a passing isolation event, `writes_isolated = true` and a named enforcer.\n\n### Step 7: Check Promotion Readiness\n\nRun the read-only gate evaluation:\n\n```bash\ncisternal shadow check bearings_charter_mapper --records-dir \u002Fpath\u002Fto\u002Flogs\n```\n\n- Exit 0: Promotion permitted (`promotion_permitted = true`, `blocking_reasons = []`).\n- Exit 1: Promotion blocked (`blocking_reasons` lists all deficits).\n- Exit 2: Refusal (0 matching telemetry).\n- Exit 3: Configuration error (malformed TOML or unresolvable path).\n\nNote: `cisternal shadow check` is strictly read-only. It never mutates mode-state files or git; advancing stages requires an explicit commit.\n\n## Worked Example: Bearings AC-9 (bathos spec 261104) — illustrative\n\nThe numbers below are illustrative, not results: Bearings AC-9 has not been run through this pattern yet. They are chosen so every gate in the Step 1 mode-state passes.\n\nIn Bathos Bearings (spec 261104), a candidate reader maps experiment sidecars (`.bth.toml`) to research charter purposes:\n1. Mode-state pre-registered at `.praxia\u002Fmode_state\u002Fbearings_charter_mapper.toml` with `target_stage = \"advisory\"`.\n2. Telemetry records are written during batch sidecar evaluation with `emit_verdict`.\n3. Ground truth is labeled across 60 frozen reference sidecars (`frozen_gold`), 30 positive and 30 negative (base rate 0.50).\n4. `cisternal shadow score bearings_charter_mapper` would report TP=27, FP=1, FN=3, TN=29: precision 0.964 [Wilson 95% CI: 0.823 .. 0.994], recall 0.900 [0.744 .. 0.965], false positive rate 0.033. The precision lower bound (0.823) clears both `min_precision_lower_bound = 0.70` and the base rate.\n5. `prove_isolation(..., feature=\"bearings_charter_mapper\")` passes and emits a passing `shadow.isolation` event. The gate requires this evidence: with no passing event, `check` blocks with `no_isolation_evidence`.\n6. Only when all of the above hold does `cisternal shadow check bearings_charter_mapper` exit 0, permitting the owner to promote `current_stage` to `\"advisory\"` by an explicit commit. A smaller sample fails closed: for example 18\u002F20 gives a precision lower bound of 0.699, below the 0.70 gate, and `check` exits 1.\n","# developing-in-shadow\n\nThe shadow-development pattern allows candidate logic or experimental subagents to run alongside production or test workflows, recording what they would have done without actuating or causing side effects, calibrating empirical accuracy against ground truth, and enforcing pre-registered promotion gates before cutover.\n\n## When to Use\n\nUse when a new gate, classifier, mapper or subagent should run beside the live path before it is trusted: authoring a `.praxia\u002Fmode_state\u002F\u003Cfeature>.toml`, emitting shadow verdicts, scoring them against labels with `cisternal shadow score`, or checking a promotion gate with `cisternal shadow check`.\n\n## Stage Ladder\n\nEvery candidate feature progresses through a 4-stage lifecycle:\n1. `off`: Feature is inactive.\n2. `shadow`: Candidate runs alongside live logic. All writes are strictly confined to shadow logs; candidate verdicts never modify actor output or live state.\n3. `advisory`: Candidate verdicts are presented to human actors or higher-level agents for guidance, but not enforced (non-blocking). Promotion to advisory requires passing a pre-registered promotion gate.\n4. `enforce`: Feature acts as an authoritative, blocking gate or live implementation.\n\n## 7-Step Implementation Lifecycle\n\n### Step 1: Pre-register Mode-State TOML\n\nBefore running candidate code, author and version-control a mode-state file under `.praxia\u002Fmode_state\u002F\u003Cfeature>.toml` (or `.cisternal\u002Fmode_state\u002F\u003Cfeature>.toml`):\n\n```toml\n[feature]\nname = \"bearings_charter_mapper\"\ndescription = \"Maps experiment sidecars to research charter purposes\"\nversion = \"0.1.0\"\n\n[ladder]\ncurrent_stage = \"shadow\"\n\n[shadow]\ntraffic_fraction = 1.0\nwrites_isolated = true\nwrites_isolated_enforced_by = \"tests\u002Ftest_isolation.py::test_charter_mapper_isolation\"\n\n[scoring]\npositive_label = true\n\n[promotion]\ntarget_stage = \"advisory\"\nmin_verdicts = 30\nmin_labels = 15\nallowed_label_sources = [\"frozen_gold\", \"owner_confirmed\", \"at_work\"]\nmin_precision = 0.85\nmin_precision_lower_bound = 0.70\nmin_recall = 0.80\nmin_recall_lower_bound = 0.65\nmax_fp_rate = 0.05\nisolation_violations_max = 0\nthreshold_basis = \"pre-registered calibration based on domain requirements\"\n```\n\n### Step 2: Initialize Telemetry Pipeline\n\nAt application or test startup, initialize telemetry once:\n\n```python\nimport cisternal\n\ncisternal.init()\n```\n\nIf uninitialized, shadow emit functions preserve library isolation and return `False` without raising or spawning background threads.\n\n### Step 3: Emit Candidate Verdicts (non-blocking telemetry)\n\nIn the candidate evaluation path, emit non-blocking verdicts:\n\n```python\nimport cisternal.shadow\n\naccepted = cisternal.shadow.emit_verdict(\n    feature=\"bearings_charter_mapper\",\n    subject_key=f\"sidecar:{sidecar_id}\",\n    verdict={\"decision\": \"pass\", \"confidence\": 0.92},\n    stage=\"shadow\",\n    feature_version=\"0.1.0\",\n    inputs_sha256=input_payload_hash,\n)\n```\n\n### Step 4: Capture Ground Truth Labels\n\nAttach verified ground truth using structured provenance sources (`frozen_gold > owner_confirmed > at_work > retrospective`):\n\n```python\ncisternal.shadow.emit_label(\n    feature=\"bearings_charter_mapper\",\n    subject_key=f\"sidecar:{sidecar_id}\",\n    label=True,\n    label_source=\"frozen_gold\",\n    labeller=\"reviewer_id\",\n)\n```\n\n### Step 5: Score Evaluation with Wilson Intervals\n\nCalculate confusion metrics and Wilson confidence intervals:\n\n```bash\ncisternal shadow score bearings_charter_mapper --records-dir \u002Fpath\u002Fto\u002Flogs\n```\n\nThe scorer joins strictly on `subject_key`, resolves multiple verdicts by latest timestamp, prioritizes label provenance, and refuses on zero labels (exit code 2). Confirm that the Wilson CI lower bound strictly exceeds the empirical base rate.\n\n### Step 6: Verify Actor Isolation\n\nVerify that the shadow arm does not alter live outputs or leak side effects outside its log directory:\n\n```python\nfrom cisternal.shadow import prove_isolation\n\ndef test_charter_mapper_isolation(tmp_path):\n    live_dir = tmp_path \u002F \"live\"\n    shadow_log = tmp_path \u002F \"logs\"\n\n    res = prove_isolation(\n        actor_live_fn=run_baseline_mapper,\n        actor_shadow_fn=run_shadow_mapper,\n        live_roots=[live_dir],\n        shadow_log_dir=shadow_log,\n        feature=\"bearings_charter_mapper\",\n        enforced_by=\"tests\u002Ftest_isolation.py::test_charter_mapper_isolation\",\n    )\n    assert res.passed\n```\n\nPass `feature=` so the call emits a `shadow.isolation` event (it emits nothing when `feature` is empty, and also when telemetry is uninitialized). `cisternal shadow check` blocks promotion unless it finds a passing isolation event, `writes_isolated = true` and a named enforcer.\n\n### Step 7: Check Promotion Readiness\n\nRun the read-only gate evaluation:\n\n```bash\ncisternal shadow check bearings_charter_mapper --records-dir \u002Fpath\u002Fto\u002Flogs\n```\n\n- Exit 0: Promotion permitted (`promotion_permitted = true`, `blocking_reasons = []`).\n- Exit 1: Promotion blocked (`blocking_reasons` lists all deficits).\n- Exit 2: Refusal (0 matching telemetry).\n- Exit 3: Configuration error (malformed TOML or unresolvable path).\n\nNote: `cisternal shadow check` is strictly read-only. It never mutates mode-state files or git; advancing stages requires an explicit commit.\n\n## Worked Example: Bearings AC-9 (bathos spec 261104) — illustrative\n\nThe numbers below are illustrative, not results: Bearings AC-9 has not been run through this pattern yet. They are chosen so every gate in the Step 1 mode-state passes.\n\nIn Bathos Bearings (spec 261104), a candidate reader maps experiment sidecars (`.bth.toml`) to research charter purposes:\n1. Mode-state pre-registered at `.praxia\u002Fmode_state\u002Fbearings_charter_mapper.toml` with `target_stage = \"advisory\"`.\n2. Telemetry records are written during batch sidecar evaluation with `emit_verdict`.\n3. Ground truth is labeled across 60 frozen reference sidecars (`frozen_gold`), 30 positive and 30 negative (base rate 0.50).\n4. `cisternal shadow score bearings_charter_mapper` would report TP=27, FP=1, FN=3, TN=29: precision 0.964 [Wilson 95% CI: 0.823 .. 0.994], recall 0.900 [0.744 .. 0.965], false positive rate 0.033. The precision lower bound (0.823) clears both `min_precision_lower_bound = 0.70` and the base rate.\n5. `prove_isolation(..., feature=\"bearings_charter_mapper\")` passes and emits a passing `shadow.isolation` event. The gate requires this evidence: with no passing event, `check` blocks with `no_isolation_evidence`.\n6. Only when all of the above hold does `cisternal shadow check bearings_charter_mapper` exit 0, permitting the owner to promote `current_stage` to `\"advisory\"` by an explicit commit. A smaller sample fails closed: for example 18\u002F20 gives a precision lower bound of 0.699, below the 0.70 gate, and `check` exits 1.\n",{"name":5,"description":7,"covers_families":24,"distinctive_strings":25},[],[5,26,27,28],"cisternal shadow check","cisternal shadow score","shadow-development","main","027e7260c57f93382300e6154cfbe3b9e2db7af7",".praxia\u002Fskills\u002Fdeveloping-in-shadow","https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal","https:\u002F\u002Fgithub.com\u002Fmaraxen","Graduate student at MIT researching evolution using liquid-handling robots","2026-11-14 05:11:32",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add maraxen\u002Fcisternal --skill developing-in-shadow",{"tool":42,"command":43},"bunx","bunx skills add maraxen\u002Fcisternal --skill developing-in-shadow",{"tool":45,"command":46},"pnpm","pnpm dlx skills add maraxen\u002Fcisternal --skill developing-in-shadow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal\u002Fblob\u002Fmain\u002F.praxia\u002Fskills\u002Fdeveloping-in-shadow\u002FSKILL.md",true,[],[51,57,62,68,74,81],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M79H40AS0TPHWKGT8KCN2JPS","demo-skill","https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmanifest_skill_resources\u002Fskills\u002Fdemo-skill\u002FSKILL.md",[],[],{"skillNo":58,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M79H3Z6ZV62V0NZCJQ6KGSAQ","https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmanifest_minimal\u002Fskills\u002Fdemo-skill\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M79H3Y8E6N74BSVNA01H4D5P","orchestration","https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmanifest_dogfood_praxia\u002Fskills\u002Forchestration\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M79H3W4FGSC1CHGPB0Y9TTP9","handoff","https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmanifest_dogfood_praxia\u002Fskills\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M79H3HQP8SDNMPGQAHWV92JE","writing-skill-triggers","Use `writing-skill-triggers` when writing or shortening a skill's description or when_to_use, when a skill fails to fire or fires on the wrong task, or when `cisternal assets validate` warns about listing length.","https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal\u002Fblob\u002Fmain\u002F.praxia\u002Fskills\u002Fwriting-skill-triggers\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79H3E2J63BHKWDHDZ4YSD3J","triage-tool","Use when auditing agent MCP\u002Fskill use or pruning unused tool servers before changing project settings.","https:\u002F\u002Fgithub.com\u002Fmaraxen\u002Fcisternal\u002Fblob\u002Fmain\u002F.praxia\u002Fskills\u002Ftriage-tool\u002FSKILL.md",[],[]]