[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DC5MYNRJH44QVTRT09RHXE":3,"skill-same:01M6DC5MYNRJH44QVTRT09RHXE":71},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":13,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M6DC5MYNRJH44QVTRT09RHXE","workflow-foundry",null,"Prekzursil\u002Fagent-skills-toolchain","Prekzursil","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54636077?v=4","01M6DACZ1PCQHD99SCR1YXG28B","Andrei Mihai Visalon","01M6DACZ670WZF535V3WYYSS4Z",0,"MIT","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-foundry\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25],"workflow","foundry","workflow foundry","2026-11-10 10:12:30",false,"---\nname: workflow-foundry\ndescription: Use when RUNNING a multi-agent fan-out on this estate — dispatching N parallel work units, deciding barrier-vs-pipeline, gating fan-in, or judging whether a unit is actually done. The operating contract distilled from measured runs here, not generic advice: freeze the SHA and the spawn preamble before the first unit launches; fan in on RECEIPTS (Test-Path every contracted output BEFORE reading any digest — 3\u002F3 agents once returned plausible digests for files that did not exist); UNIT-COMPLETE is a string the unit writes about itself, not proof; pipeline by default and use a barrier only when stage N genuinely needs ALL of stage N-1; write-as-you-go (a 70-minute unit produced 691 KB and wrote nothing, unrecoverable); both-states controls (a probe silent in the broken state measures nothing); never fan a MECHANICAL comparison out to LLM judgement (measured 86% accuracy with 100% of errors in the dangerous direction against an exact 40-line differ); per-needle deferral is the wrong LAYER and recurses, only a role-aware discriminator terminates; adversarial verifiers get siblings FULL text not digests; and most refutations are OVERCLAIMS where the code was right and the sentence was too wide — fix the sentence. Ships a runnable receipt gate with a built-in both-states self-test. Triggers include fan out N agents, gate the fan-in, is this unit done, my parallel phase deadlocked, an agent returned a digest for a missing file, design the work-unit decomposition, review the siblings adversarially. NOT for writing the workflow .mjs runtime code (use workflow-authoring), NOT for the cross-vendor Codex dispatch transport (use cross-vendor-dispatch and multi-ai-mingle), NOT for remote compute placement (use codex-databricks-fanout).\n---\n\n# workflow-foundry\n\nThe **run-time operating contract** for a fan-out on this estate. Ten laws, each one paid\nfor by a measured failure here. Every number below is MEASURED; do not re-derive it from\nfirst principles and do not soften it because a run \"looks fine\".\n\n**Where this sits.** `workflow-authoring` tells you how to WRITE the `.mjs` (the injected\n`agent`\u002F`parallel`\u002F`phase` globals, the args-as-string gotcha, the `Date.now()` ban).\n`cross-vendor-dispatch` owns the Claude→Codex transport. `codex-databricks-fanout` owns\nremote compute placement. **This skill owns what happens between \"launch\" and \"done\".**\n\n**The card catalogue is elsewhere.** 108 named blueprint cards live in\n`~\u002F.claude\u002Fharness-restore-20260806\u002F09-WORKFLOW-BLUEPRINT-LIBRARY.md` (464 KB). This skill\nis the contract those cards must satisfy, not a copy of them. Pick a card there; obey the\nlaws here.\n\nEvidence anchors with access methods: `references\u002Fevidence-index.md`. Read it before citing\nany rule path — the live `~\u002F.claude\u002Frules\u002Fcommon\u002F` tree was measured EMPTY on 2026-08-08\nwhile its content was still being injected into sessions, so the durable citation is the\nrepo copy, not the live path.\n\n---\n\n## L1 — Freeze before you fan out\n\nFreeze **three** things the moment the first unit launches, and change none of them until\nthe cohort is dead:\n\n1. the **commit SHA** every unit reads (record it in the preamble, so all N sets of\n   `file:line` citations resolve against one tree),\n2. the **spawn preamble**,\n3. the **launcher**.\n\nMEASURED: editing mid-run left contradictory instructions live in one run — `PLAN.md:26`\nsaid \"UNDER ~30 tool calls\" while a revised launcher said \"there is NO tool-call cap\".\nUnits obeyed different contracts and their outputs were not comparable\n(`fan-out-contract.md:54`, §A10).\n\nTo revise: **kill cleanly, delete partials, restart.** A hot-patched cohort is not a cohort.\n\nCorollary — **freeze also means the units must not race each other.** Give every mutating\nunit a **file-disjoint scope** and state it in the preamble. Parallel agents share one git\nindex; a broad `git add` has swept siblings' in-flight work here before.\n\n## L2 — Fan in on RECEIPTS, never on digests\n\n**`Test-Path` (or `os.path.exists`) every contracted output BEFORE reading any digest.**\n\nMEASURED: **3\u002F3** Codex agents returned plausible, well-formed digests for files that **do\nnot exist** (`fan-out-contract.md:70-71`). A digest is a *claim*. Only the artifact is a\n*receipt*.\n\nTwo cheap regex rejects that kill an entire failure class outright\n(`fan-out-contract.md:72`, `cross-vendor-dispatch.md:12`):\n\n- reject any result containing `started in the background`\n- reject any result containing `Check \u002Fcodex:status`\n\nA backgrounded unit's result is unreachable in practice, so a job-id receipt is a silently\nlost work unit, not a pending one.\n\n**Run the gate, do not eyeball it:** `scripts\u002Freceipt_gate.py` (stdlib only, no deps).\n\n```\npython scripts\u002Freceipt_gate.py --manifest units.json\npython scripts\u002Freceipt_gate.py --manifest units.json --strict     # exit 1 if not all DELIVERED\npython scripts\u002Freceipt_gate.py --self-test                        # both-states control (L6)\n```\n\nIt emits exactly one typed verdict per unit —\n`DELIVERED | MISSING | UNDERSIZE | NO-TRAILER | NOT-CHECKED` — and **`NOT-CHECKED` is a\nfirst-class outcome**, never folded into DELIVERED and never silently dropped. A unit whose\nartifact could not be read (permission, decode error, path that is a directory) must say\n\"I could not tell\". Details and the manifest schema: `references\u002Freceipt-gate.md`.\n\n**Prior art exists — read it before writing a third gate.**\n`~\u002Fscratch\u002Fcodex-auth-research-fanout\u002Fcompletion_predicate.py` (144 lines, with tests) is\nthe estate's C1 predicate and is **complementary**: it folds process liveness (pid, CPU\ndelta, log staleness, husk detection) in with the artifact AND-gate to answer *\"should I\nkeep waiting?\"*. `receipt_gate.py` answers only *\"is the artifact really there?\"*. Use\nboth. The measured differences — and one executable-proven hole — are in\n`references\u002Freceipt-gate.md`.\n\n## L3 — `UNIT-COMPLETE` is text, not proof\n\nThe estate's own reference fan-out declares\n(`~\u002F.claude\u002Fworkflows\u002Fcodex-auth-research-fanout.mjs:27-28`):\n\n```\nDONE   = artifact >= 1024 B AND ends with UNIT-COMPLETE: \u003Cid>\nIGNORE = CODEX THREADS idle \u002F rollout mtime \u002F process exit alone\n```\n\nand repeats at `:63` that *\"CODEX THREADS IDLE is NOT done — only disk UNIT-COMPLETE is\ndone\"*.\n\nThat AND-gate is **correct and much stronger than process exit** — it defeats the whole\nfire-and-forget class. But be precise about what it proves: **the trailer is a string the\nunit writes about itself.** It proves the unit reached its own writer. It does **not**\nprove the content is right, and a unit that writes 1 KB of skeleton plus the trailer\npasses.\n\nEscalation ladder — climb only as far as the decision needs, and say where you stopped:\n\n| rung | signal | what it actually proves |\n|---|---|---|\n| 0 | process exit 0 \u002F thread idle \u002F mtime | **nothing.** Explicitly ignored here. |\n| 1 | artifact exists | the unit got as far as opening a file |\n| 2 | + byte floor | it wrote something, not an empty stub |\n| 3 | + `UNIT-COMPLETE: \u003Cid>` trailer | it reached its own end-of-work marker |\n| 4 | + parses against the fan-in schema | the shape is right |\n| 5 | + an **independent postcondition probe** | the content is right |\n\nRungs 1-4 are self-declared. Only rung 5 is external. Never report a rung-3 result in\nrung-5 language.\n\n**Bind the trailer to the declared unit id, never to the filename.** MEASURED 2026-08-08\nover the 55 real artifacts in `~\u002Fscratch\u002Fcodex-auth-research-fanout\u002Fartifacts\u002F`: **1 of 55**\nhas a filename stem that differs from its trailer id (`auth-infra\u002Fauth-source-map.md`\ncarries `UNIT-COMPLETE: auth-src-map`). A gate keyed on the stem reports that unit\nnot-done forever — a false negative indistinguishable from a dead agent. Carry the id in\nthe manifest.\n\n## L4 — Pipeline by default; a barrier only when stage N needs ALL of stage N-1\n\n`parallel()` waits for every thunk and has **no per-agent timeout**, so one hung unit\nstalls the entire phase; a *throwing* thunk resolves to `null` rather than rejecting, so\n**`.filter(Boolean)` after every barrier** or you dereference a null.\n\nDefault to **per-work-unit pipelines** (unit U runs implement→validate→review→commit on its\nown thread) and reach for a barrier only where stage N genuinely consumes ALL of stage N-1\n— a synthesis, a cross-unit ranking, a stacking-order decision. Most \"phases\" are barriers\nby habit, not by need.\n\nMEASURED caveat that is easy to miss: **`pipeline()` is NOT a cacheable unit — resuming a\nstopped pipeline RE-RUNS its first stage**\n(`09-WORKFLOW-BLUEPRINT-LIBRARY.md:1767`). Budget the re-run, or make stage 1 idempotent\nand cheap.\n\n### L4b — When you genuinely need a barrier, BOUND it (design item H6, now shipped)\n\nThe sentence above — \"`parallel()` … has **no per-agent timeout**\" — was true and had no\nremedy until 2026-08-12. It has one now:\n**`skills\u002Fworkflow-authoring\u002Ftemplates\u002Fh6-timeout-heartbeat.md`**, a paste-in block giving\n`withTimeout(thunk, ms, label)` and `settle(thunks, ms, labels)`. It is a *template*, not a\nlibrary, because the workflow sandbox has no module loader — `require` is undefined and\n`import()` throws, so a helper physically cannot be imported.\n\n`settle()` is a drop-in for `parallel()` that returns an index-aligned array with **no nulls\nand no holes**: each slot is a real result or a typed drop-receipt\n`{ __h6: true, __endReason: 'timeout' | 'threw' | 'null', label, ms }`. Type the drop rather\nthan `.filter(Boolean)`-ing it away — the runtime produces `null` for at least three\ndifferent causes (user skipped the agent · the subagent died on a terminal error · our own\ntimeout), and collapsing them is exactly what makes \"12 of 15 lenses returned\" unauditable.\n\n**Scope it honestly. It unblocks the BARRIER; it does NOT kill the agent.** The dropped agent\nkeeps running, keeps one of the **14** concurrency slots (`min(16, cores-2)` on this box —\nso one hung agent is ~7% of the fan-out's throughput for as long as it lives), and keeps\nspending `budget` until it dies on its own. The design doc's word \"killed\"\n(`docs\u002Faudit-design-2026-07-13\u002FB3-migration-verification.md:262`) is an overclaim against\nthis mechanism; do not reuse it. Settling experiment: read `budget.spent()` at the timeout\nreceipt and again at workflow end — a rise proves the agent lived on.\n\nBoth-states proof, per L6: `tools\u002Fwf-timeout\u002Ftest_h6_timeout.py` (20 tests) extracts the\nblock from the template and executes it in a Node `vm` context built like the real sandbox.\nThe **known-broken control** — a bare `parallel()` over five thunks, one never resolving —\nis *required* to report `hung: true` (measured 1507.9 ms, watchdog-bounded); `settle()` over\nthe identical thunks returns in **175.0 ms** with exactly one `timeout` receipt and four\nintact survivors. Static enforcement: `workflow_lint`'s `barrier-without-timeout`, which\nfires on **15 of 15** barrier calls across all 10 saved workflows today.\n\n### L4c — A spec that binds nothing is not a control\n\nStanding example, measured 2026-08-12: `platform\u002Fworkflows\u002F` declares **911\n`timeout_seconds` fields and 35 `on_timeout` handlers** across 115 blueprints (97 of 115\nfiles), and `platform\u002Fworkflows\u002Fshared-prod-shard-fanout-build.json` records the incident\nthose declarations exist to prevent — *\"chain 9's job was submitted with no job-level\ntimeout and ran for 11 hours against a hung unit.\"* But `platform\u002Flib\u002Fwfdsl\u002F` has\nvalidate\u002Fsemantics\u002Fexpr\u002Fresolve\u002Fcapabilities\u002Fmutations and **no compiler or executor**, so\nall 911 bind nothing, and the substrate that actually runs (`~\u002F.claude\u002Fworkflows\u002F*.js`) had\n**zero**. Before citing a declared timeout\u002Fretry\u002Ffailure policy as a control, find the code\nthat enforces it. Do **not** answer this by building a second orchestration runtime — lift\nthe semantics onto the native globals instead\n(`docs\u002Faxis-c-design-2026-07-13\u002Fresearch-sota-cross-vendor-orchestration.md:9`).\n\n## L5 — Write as you go\n\nMEASURED: one review unit ran **70 minutes**, produced **691 KB** of transcript, completed a\nfull mutation harness — then froze and wrote **nothing**. Unrecoverable. A relaunched unit\nunder a write-as-you-go mandate produced a truthful artifact in **3 minutes** and survived\nevery later check (`fan-out-contract.md:91-95`, §C1).\n\nMandate for any unit expected to run >10 minutes:\n\n1. Write the artifact **immediately** as a skeleton with every claim enumerated and marked\n   `UNKNOWN - not yet measured`, plus a COVERAGE line naming the unmeasured sections.\n2. **Rewrite** it at each milestone (per lane \u002F per phase).\n3. What is on disk must **always** be truthful. A partial file with honest UNKNOWNs is a\n   SUCCESS; a perfect file that never gets written is a total loss.\n\nPut this sentence in the artifact: *\"If it still reads this way, the unit died before\nmeasuring anything and no verdict here may be cited.\"*\n\nThe freeze cause was **not** an unbounded external probe (measured: 0 hung git processes).\nBounding probes is good hygiene but did not address it. Write-as-you-go makes the cause\nirrelevant.\n\n## L6 — Both-states, or it does not count\n\nBefore a probe's silence counts as \"clean\", run it against the **known-BROKEN** state and\nconfirm it **FIRES** there (`single-signal-verification.md:40`, rule 3b).\n\n**A control that cannot fail is not a control.** A \"control\" that printed a reassuring\nmessage while both its numbers were 0 shipped on this estate.\n\n- Applied to a test suite, this is **mutation testing** — revert the real bug and require\n  the suite to go red. A suite that stays green is not protecting that behaviour.\n- Applied to a fan-in gate, it means: delete an artifact, truncate one below the floor,\n  strip one trailer — and confirm the gate reports `MISSING` \u002F `UNDERSIZE` \u002F `NO-TRAILER`\n  **before** you trust it reporting `DELIVERED`.\n\n`scripts\u002Freceipt_gate.py --self-test` does exactly that on throwaway fixtures and reports\n`CONTROL-OK` only when the gate fires on all six broken shapes **and** is silent on the\ngood one. If either half fails it prints `CONTROL-BROKEN` and exits non-zero — the gate's\nverdicts are then uncitable.\n\n### Independence must hold across TIME, not just mechanism\n\nMEASURED 2026-08-08, by this skill's own lane, against itself: two mechanically\nindependent probes — Git Bash `ls -la` and PowerShell `Get-ChildItem -Force -Recurse` —\nboth reported `~\u002F.claude\u002Frules\u002Fcommon\u002F` **empty**, and that was written up as a finding.\nIt was wrong. A concurrent lane was mid-write; the gate's own `INV-6-rules-common`\n(`check_no_regression.py:445`, globbing that exact path) reported `n=20 missing=[]` minutes\nlater, and a re-probe listed all 20 files.\n\nBoth probes were run at the **same instant**. For a **mutating** resource that is **one\nobservation, not two.** Different shell + different API buys you independence of\n*mechanism*; it buys nothing against a transient. When the subject can change under you —\na directory a sibling lane is writing, a process table, a lock file, a queue depth — the\nsecond signal must be **separated in time**, and the claim must be scoped to the instant\nit was taken: not *\"the directory is empty\"* but *\"the directory was empty at 02:17\"*.\n\nA standing property inferred from a single time point is an overclaim even when the\ninstrument is perfect. That is L10 reproduced by the lane documenting L10.\n\n**And: read the instrument you are already running.** The refutation came from a gate this\nlane was required to run anyway. It cost nothing and had been available the whole time.\n\n## L7 — Never fan a MECHANICAL comparison out to LLM judgement\n\nMEASURED, six Opus agents classifying 338 files as repo-ahead \u002F live-ahead \u002F diverged \u002F\nnoise, given the work-list, an enumerated verdict vocabulary, a worked counter-example, and\nan explicit instruction to classify by CONTENT (`fan-out-contract.md:140-165`, §C4):\n\n| | |\n|---|---|\n| agent accuracy | **86%** (291\u002F338) |\n| disagreements with a 40-line differ | 47 |\n| errors in the DANGEROUS direction (said safe, was DIVERGED) | **31** |\n| errors in the safe \u002F over-cautious direction | **0** |\n\nEvery disagreement was the two-sided DIVERGED case read as one-sided. Deploying on those\nverdicts would have destroyed content in 31 files.\n\n**86% accuracy is the wrong metric. Error DIRECTION is the metric** — 100% of the errors\npointed at data loss. The differ had no such bias, ran in seconds, and was exact.\n\nRULE: if a question is answerable by an exact algorithm — byte\u002Fline comparison, set\nmembership, counting, hashing, existence — **write the algorithm.** Reserve agents for what\ncode cannot do: judging whether the divergent content MATTERS, summarising what a change\nmeans, weighing a trade-off. The right split in that task was: differ classifies all 338,\nagents describe the 10 behaviour-bearing DIVERGED files.\n\nThis law binds this skill too — which is why L2 ships a script and not a checklist.\n\n## L8 — Per-needle deferral is the wrong LAYER; only a role-aware discriminator terminates\n\nWhen a guard must decide whether a matched string is a real occurrence or merely\n*mentioned* (a doc quoting a banned command, a hook matching its own name), the tempting\nfix is to defer each ambiguous needle to a smarter check. **That recurses** — the deferral\nrecord itself contains the needle, so the next pass matches it again.\n\nThe layer that terminates is a **role-aware discriminator** that judges the match by its\nsyntactic role. On this estate that is\n`~\u002F.claude\u002Fhooks\u002F_shared\u002Fuse_vs_mention.py` (41,045 B, 59 tests):\n\n- `classify(text, span, context, kind) -> Judgement` at `:602`, verdict `USE | MENTION |\n  UNKNOWN`\n- `is_real_occurrence(...) -> bool` at `:788` (the bool projection)\n- `audit_subject_rule(path)` at `:571`\n- `Judgement` at `:164`\n- an `ast`-exact string-literal rule **structurally** terminates the recursion\n\n`UNKNOWN` is the point: the discriminator is allowed to say \"I could not tell\", and that\nstate surfaces rather than defaulting either way.\n\nMEASURED: **16** use-vs-mention false fires in a single day here; three of them were a hook\nmatching the substring `todo` inside its own name `todo-surfacer` (the hyphen is a word\nboundary). Wire the discriminator; do not hand-roll a per-needle exception list.\n\n**This class reaches inside the completion gate itself.** MEASURED 2026-08-08 by executing\n`completion_predicate.py:45`, which tests `f\"UNIT-COMPLETE: {unit_id}\" not in tail` — a\nsubstring. Fed an artifact whose tail literally reads *\"This unit did NOT finish and wrote\nno trailer\"* but which quotes the token in prose, it returns `ok=True,\nreason=\"and-gate-pass\"`. The same module's anchored extractor at `:141` returns `None` for\nthat same text: **the module disagrees with itself about whether the unit is done.**\nCorrectly scoped (L10) — over the 55 real artifacts the two forms agree 55\u002F55, divergence\n**0**, so the hole is executable-proven but LATENT in that corpus. The realistic trigger is\nan L5 write-as-you-go skeleton echoing its own contract text into the tail (*likely*,\n55-80%, INFERRED from the two measured facts; UNVERIFIED against a live run — settling\nexperiment: run both forms over in-flight skeletons rather than finished artifacts).\n`receipt_gate.py` uses line-equality and keeps a `substring` fixture in its self-test so a\nregression fails the control.\n\n## L9 — Adversarial verifiers get siblings' FULL text, not digests\n\nGiving reviewers the siblings' complete output was **the single highest-value structural\nchoice** in the measured corpus — the only mechanism that caught a false \"double-fire\nconfirmed\" premise and duplicate-skill bloat (`fan-out-contract.md:80`, §B6).\n\n- **Digest silence is not absence of caveats**: 127 UNVERIFIED tags in the documents; only\n  **18** survived into 30 digests (§B5). Open the document before treating a claim as\n  unqualified.\n- Give reviewers a **durable artifact contract**. 540,583 tokens of adversarial review in\n  one program left **zero** on-disk artifact.\n- **On a split verdict about a briefed fact, the specific probe wins over the agent count**\n  (§B4). Read the probes; do not vote. Two agents once \"CONFIRMED\" a false fact by re-running\n  the orchestrator's own broken detector.\n- **Never score agents on output volume** (§B7). The best verification agent in the corpus\n  is near the bottom on KB\u002Ftoken; a volume gate selects against exactly the behaviour you\n  need.\n\n## L10 — Most refutations are OVERCLAIMS — fix the SENTENCE\n\nMEASURED: across three lanes and four adversarial reviews, **5 of 8** refuted claims were\ncases where **the code was correct and the sentence was wider than the evidence** —\n`recall = 1.0`, `FP=0 \u002F FN=0`, \"three holes closed\", \"asserted by a test\". Only 3 of 8 were\ngenuine defects, and each closed in one round (`fan-out-contract.md:110`, §C2).\n\nConsequences:\n\n- A \"round N until fully green\" stopping rule is **tractable, not unbounded** — convergence\n  comes from scoping claims to their evidence, not from closing every conceivable gap.\n- On a refuted overclaim, **fix the sentence**: state the scope actually measured, disclose\n  the residual **inline**, and name the settling experiment.\n- A residual gap that is honestly scoped and disclosed is **not** a refuted item and must\n  not block.\n- **Record** that the earlier wording was REFUTED. Do not silently delete it — a deleted\n  overclaim gets re-made.\n- Reviewers: an overclaim is a **REFUTED** verdict *even when the underlying code is fine*.\n  Say so, and supply the correctly-scoped version.\n\n---\n\n## The spawn preamble is not inherited — restate it every time\n\nNothing spills over from the global contract into a subagent. MEASURED: 8 lens documents\n(~190 KB) whose prompt omitted the honesty instrumentation scored **0** UNVERIFIED tags and\n**0** URLs; prompts that named the fields scored 26-62 hits each (`fan-out-contract.md:8`,\n§A1). Zero inheritance was measured.\n\nThe copy-paste preamble carrying every mandatory element is\n`references\u002Fspawn-preamble.md`. The elements it must never drop:\n\n- **Enumerate the vocabulary; never ship a bare tag name.** Sherman-Kent bands listed inline\n  → **20\u002F21 (95%)** adoption; a bare `NATIVE-vs-BUILD` tag with no value set → **7\u002F21 (33%)**,\n  the most-dropped field in the corpus (§A2). Enumerate the values or delete the field.\n- **UNVERIFIED inline, adjacent to the claim.** 127 real flags, but **40% (51)** sat in the\n  final 15% of their document. A trailing limitations section does not satisfy this; if a\n  recommendation's premise is UNVERIFIED, the recommendation inherits the tag in its heading\n  (§A3).\n- **A briefed fact needs a probe tag, a timestamp, and a MECHANICALLY DIFFERENT re-probe\n  rule.** 4 agents correctly refuted \"mon is not on PATH\"; **2 \"CONFIRMED\" it by re-running\n  the orchestrator's own broken Git-Bash `which`** — evidence-tag theatre. Re-running the\n  tagged probe does not count and must not be reported as CONFIRMED (§A4).\n- **Every path carries its access method** when it is not readable by `Read` at that literal\n  path. A main-only path cost **7 agents** independent rediscovery; one line fixes it (§A5).\n- **Pin the artifact root and `ls` it in the prompt** — 10 `Read` failures were pure cwd\n  confusion (§A12).\n- **Split the evidence standard by lens type.** GROUNDED lenses cite `file:line`; IDEATION\n  lenses cite an external source and are told explicitly NOT to ground in the repo (§A9).\n- **Keep the ≤350\u002F400-word digest cap** — measured NOT lossy (median 340 words, 4\u002F40 over,\n  worst +12%), and 4\u002F4 correcting agents led with the correction (§A7). Require an\n  `EVIDENCE:` block of 3-5 anchors **exempt** from the cap (§B3) — 87% of `file:line` refs\n  and 100% of URLs otherwise die at the digest boundary.\n- **Inject a shared grounding pack** (§A11). Build once with\n  `python \u003Ccheckout>\u002Ftools\u002Frepomap\u002Frepo_map.py --root \u003Ccheckout> --budget 900 --out \u003Cartifact-root>\u002FGROUNDING-PACK.md`\n  — pass the ABSOLUTE path or it dies with `[Errno 2]` from any other cwd. Cap intra-agent\n  re-reads of one path at ~4.\n\n## Windows transport (this box)\n\n- **Prompt by FILE, never inline.** `CreateProcess` caps the command line at 32,767 chars;\n  an inline prompt produced `payload_len=34472` → `os error 206` and killed two runs.\n- **An apostrophe in a Bash-tool command body breaks the tool's own quoting** — 6+ killed\n  calls in one session. Write the script with the Write tool and run `python \u003Cpath>`; never\n  inline `python -c '…'`, never a heredoc carrying backslashes.\n- **Use forward slashes in git revisions** and the `--` separator.\n- **A here-string PAYLOAD is scanned as if it were a command** — a markdown body quoting a\n  destructive command gets blocked. Use the Write tool (measured 0\u002F40 failures vs 8\u002F59 for\n  here-strings).\n\n## Checklist before you call a fan-out done\n\n1. Preamble + launcher + SHA frozen since unit 1 launched, unchanged. — L1\n2. `receipt_gate.py` run; every unit typed; `NOT-CHECKED` surfaced, not folded. — L2\n3. `--self-test` printed `CONTROL-OK` in this session. — L6\n4. No result contains `started in the background` \u002F `Check \u002Fcodex:status`. — L2\n5. Every claim reported at the rung it was actually measured at. — L3\n6. Every mechanical question answered by an algorithm, not a vote. — L7\n7. Reviewers received FULL sibling text and produced a durable artifact. — L9\n8. Every refutation triaged overclaim-vs-defect; overclaims fixed as sentences and recorded. — L10\n","# workflow-foundry\n\nThe **run-time operating contract** for a fan-out on this estate. Ten laws, each one paid\nfor by a measured failure here. Every number below is MEASURED; do not re-derive it from\nfirst principles and do not soften it because a run \"looks fine\".\n\n**Where this sits.** `workflow-authoring` tells you how to WRITE the `.mjs` (the injected\n`agent`\u002F`parallel`\u002F`phase` globals, the args-as-string gotcha, the `Date.now()` ban).\n`cross-vendor-dispatch` owns the Claude→Codex transport. `codex-databricks-fanout` owns\nremote compute placement. **This skill owns what happens between \"launch\" and \"done\".**\n\n**The card catalogue is elsewhere.** 108 named blueprint cards live in\n`~\u002F.claude\u002Fharness-restore-20260806\u002F09-WORKFLOW-BLUEPRINT-LIBRARY.md` (464 KB). This skill\nis the contract those cards must satisfy, not a copy of them. Pick a card there; obey the\nlaws here.\n\nEvidence anchors with access methods: `references\u002Fevidence-index.md`. Read it before citing\nany rule path — the live `~\u002F.claude\u002Frules\u002Fcommon\u002F` tree was measured EMPTY on 2026-08-08\nwhile its content was still being injected into sessions, so the durable citation is the\nrepo copy, not the live path.\n\n---\n\n## L1 — Freeze before you fan out\n\nFreeze **three** things the moment the first unit launches, and change none of them until\nthe cohort is dead:\n\n1. the **commit SHA** every unit reads (record it in the preamble, so all N sets of\n   `file:line` citations resolve against one tree),\n2. the **spawn preamble**,\n3. the **launcher**.\n\nMEASURED: editing mid-run left contradictory instructions live in one run — `PLAN.md:26`\nsaid \"UNDER ~30 tool calls\" while a revised launcher said \"there is NO tool-call cap\".\nUnits obeyed different contracts and their outputs were not comparable\n(`fan-out-contract.md:54`, §A10).\n\nTo revise: **kill cleanly, delete partials, restart.** A hot-patched cohort is not a cohort.\n\nCorollary — **freeze also means the units must not race each other.** Give every mutating\nunit a **file-disjoint scope** and state it in the preamble. Parallel agents share one git\nindex; a broad `git add` has swept siblings' in-flight work here before.\n\n## L2 — Fan in on RECEIPTS, never on digests\n\n**`Test-Path` (or `os.path.exists`) every contracted output BEFORE reading any digest.**\n\nMEASURED: **3\u002F3** Codex agents returned plausible, well-formed digests for files that **do\nnot exist** (`fan-out-contract.md:70-71`). A digest is a *claim*. Only the artifact is a\n*receipt*.\n\nTwo cheap regex rejects that kill an entire failure class outright\n(`fan-out-contract.md:72`, `cross-vendor-dispatch.md:12`):\n\n- reject any result containing `started in the background`\n- reject any result containing `Check \u002Fcodex:status`\n\nA backgrounded unit's result is unreachable in practice, so a job-id receipt is a silently\nlost work unit, not a pending one.\n\n**Run the gate, do not eyeball it:** `scripts\u002Freceipt_gate.py` (stdlib only, no deps).\n\n```\npython scripts\u002Freceipt_gate.py --manifest units.json\npython scripts\u002Freceipt_gate.py --manifest units.json --strict     # exit 1 if not all DELIVERED\npython scripts\u002Freceipt_gate.py --self-test                        # both-states control (L6)\n```\n\nIt emits exactly one typed verdict per unit —\n`DELIVERED | MISSING | UNDERSIZE | NO-TRAILER | NOT-CHECKED` — and **`NOT-CHECKED` is a\nfirst-class outcome**, never folded into DELIVERED and never silently dropped. A unit whose\nartifact could not be read (permission, decode error, path that is a directory) must say\n\"I could not tell\". Details and the manifest schema: `references\u002Freceipt-gate.md`.\n\n**Prior art exists — read it before writing a third gate.**\n`~\u002Fscratch\u002Fcodex-auth-research-fanout\u002Fcompletion_predicate.py` (144 lines, with tests) is\nthe estate's C1 predicate and is **complementary**: it folds process liveness (pid, CPU\ndelta, log staleness, husk detection) in with the artifact AND-gate to answer *\"should I\nkeep waiting?\"*. `receipt_gate.py` answers only *\"is the artifact really there?\"*. Use\nboth. The measured differences — and one executable-proven hole — are in\n`references\u002Freceipt-gate.md`.\n\n## L3 — `UNIT-COMPLETE` is text, not proof\n\nThe estate's own reference fan-out declares\n(`~\u002F.claude\u002Fworkflows\u002Fcodex-auth-research-fanout.mjs:27-28`):\n\n```\nDONE   = artifact >= 1024 B AND ends with UNIT-COMPLETE: \u003Cid>\nIGNORE = CODEX THREADS idle \u002F rollout mtime \u002F process exit alone\n```\n\nand repeats at `:63` that *\"CODEX THREADS IDLE is NOT done — only disk UNIT-COMPLETE is\ndone\"*.\n\nThat AND-gate is **correct and much stronger than process exit** — it defeats the whole\nfire-and-forget class. But be precise about what it proves: **the trailer is a string the\nunit writes about itself.** It proves the unit reached its own writer. It does **not**\nprove the content is right, and a unit that writes 1 KB of skeleton plus the trailer\npasses.\n\nEscalation ladder — climb only as far as the decision needs, and say where you stopped:\n\n| rung | signal | what it actually proves |\n|---|---|---|\n| 0 | process exit 0 \u002F thread idle \u002F mtime | **nothing.** Explicitly ignored here. |\n| 1 | artifact exists | the unit got as far as opening a file |\n| 2 | + byte floor | it wrote something, not an empty stub |\n| 3 | + `UNIT-COMPLETE: \u003Cid>` trailer | it reached its own end-of-work marker |\n| 4 | + parses against the fan-in schema | the shape is right |\n| 5 | + an **independent postcondition probe** | the content is right |\n\nRungs 1-4 are self-declared. Only rung 5 is external. Never report a rung-3 result in\nrung-5 language.\n\n**Bind the trailer to the declared unit id, never to the filename.** MEASURED 2026-08-08\nover the 55 real artifacts in `~\u002Fscratch\u002Fcodex-auth-research-fanout\u002Fartifacts\u002F`: **1 of 55**\nhas a filename stem that differs from its trailer id (`auth-infra\u002Fauth-source-map.md`\ncarries `UNIT-COMPLETE: auth-src-map`). A gate keyed on the stem reports that unit\nnot-done forever — a false negative indistinguishable from a dead agent. Carry the id in\nthe manifest.\n\n## L4 — Pipeline by default; a barrier only when stage N needs ALL of stage N-1\n\n`parallel()` waits for every thunk and has **no per-agent timeout**, so one hung unit\nstalls the entire phase; a *throwing* thunk resolves to `null` rather than rejecting, so\n**`.filter(Boolean)` after every barrier** or you dereference a null.\n\nDefault to **per-work-unit pipelines** (unit U runs implement→validate→review→commit on its\nown thread) and reach for a barrier only where stage N genuinely consumes ALL of stage N-1\n— a synthesis, a cross-unit ranking, a stacking-order decision. Most \"phases\" are barriers\nby habit, not by need.\n\nMEASURED caveat that is easy to miss: **`pipeline()` is NOT a cacheable unit — resuming a\nstopped pipeline RE-RUNS its first stage**\n(`09-WORKFLOW-BLUEPRINT-LIBRARY.md:1767`). Budget the re-run, or make stage 1 idempotent\nand cheap.\n\n### L4b — When you genuinely need a barrier, BOUND it (design item H6, now shipped)\n\nThe sentence above — \"`parallel()` … has **no per-agent timeout**\" — was true and had no\nremedy until 2026-08-12. It has one now:\n**`skills\u002Fworkflow-authoring\u002Ftemplates\u002Fh6-timeout-heartbeat.md`**, a paste-in block giving\n`withTimeout(thunk, ms, label)` and `settle(thunks, ms, labels)`. It is a *template*, not a\nlibrary, because the workflow sandbox has no module loader — `require` is undefined and\n`import()` throws, so a helper physically cannot be imported.\n\n`settle()` is a drop-in for `parallel()` that returns an index-aligned array with **no nulls\nand no holes**: each slot is a real result or a typed drop-receipt\n`{ __h6: true, __endReason: 'timeout' | 'threw' | 'null', label, ms }`. Type the drop rather\nthan `.filter(Boolean)`-ing it away — the runtime produces `null` for at least three\ndifferent causes (user skipped the agent · the subagent died on a terminal error · our own\ntimeout), and collapsing them is exactly what makes \"12 of 15 lenses returned\" unauditable.\n\n**Scope it honestly. It unblocks the BARRIER; it does NOT kill the agent.** The dropped agent\nkeeps running, keeps one of the **14** concurrency slots (`min(16, cores-2)` on this box —\nso one hung agent is ~7% of the fan-out's throughput for as long as it lives), and keeps\nspending `budget` until it dies on its own. The design doc's word \"killed\"\n(`docs\u002Faudit-design-2026-07-13\u002FB3-migration-verification.md:262`) is an overclaim against\nthis mechanism; do not reuse it. Settling experiment: read `budget.spent()` at the timeout\nreceipt and again at workflow end — a rise proves the agent lived on.\n\nBoth-states proof, per L6: `tools\u002Fwf-timeout\u002Ftest_h6_timeout.py` (20 tests) extracts the\nblock from the template and executes it in a Node `vm` context built like the real sandbox.\nThe **known-broken control** — a bare `parallel()` over five thunks, one never resolving —\nis *required* to report `hung: true` (measured 1507.9 ms, watchdog-bounded); `settle()` over\nthe identical thunks returns in **175.0 ms** with exactly one `timeout` receipt and four\nintact survivors. Static enforcement: `workflow_lint`'s `barrier-without-timeout`, which\nfires on **15 of 15** barrier calls across all 10 saved workflows today.\n\n### L4c — A spec that binds nothing is not a control\n\nStanding example, measured 2026-08-12: `platform\u002Fworkflows\u002F` declares **911\n`timeout_seconds` fields and 35 `on_timeout` handlers** across 115 blueprints (97 of 115\nfiles), and `platform\u002Fworkflows\u002Fshared-prod-shard-fanout-build.json` records the incident\nthose declarations exist to prevent — *\"chain 9's job was submitted with no job-level\ntimeout and ran for 11 hours against a hung unit.\"* But `platform\u002Flib\u002Fwfdsl\u002F` has\nvalidate\u002Fsemantics\u002Fexpr\u002Fresolve\u002Fcapabilities\u002Fmutations and **no compiler or executor**, so\nall 911 bind nothing, and the substrate that actually runs (`~\u002F.claude\u002Fworkflows\u002F*.js`) had\n**zero**. Before citing a declared timeout\u002Fretry\u002Ffailure policy as a control, find the code\nthat enforces it. Do **not** answer this by building a second orchestration runtime — lift\nthe semantics onto the native globals instead\n(`docs\u002Faxis-c-design-2026-07-13\u002Fresearch-sota-cross-vendor-orchestration.md:9`).\n\n## L5 — Write as you go\n\nMEASURED: one review unit ran **70 minutes**, produced **691 KB** of transcript, completed a\nfull mutation harness — then froze and wrote **nothing**. Unrecoverable. A relaunched unit\nunder a write-as-you-go mandate produced a truthful artifact in **3 minutes** and survived\nevery later check (`fan-out-contract.md:91-95`, §C1).\n\nMandate for any unit expected to run >10 minutes:\n\n1. Write the artifact **immediately** as a skeleton with every claim enumerated and marked\n   `UNKNOWN - not yet measured`, plus a COVERAGE line naming the unmeasured sections.\n2. **Rewrite** it at each milestone (per lane \u002F per phase).\n3. What is on disk must **always** be truthful. A partial file with honest UNKNOWNs is a\n   SUCCESS; a perfect file that never gets written is a total loss.\n\nPut this sentence in the artifact: *\"If it still reads this way, the unit died before\nmeasuring anything and no verdict here may be cited.\"*\n\nThe freeze cause was **not** an unbounded external probe (measured: 0 hung git processes).\nBounding probes is good hygiene but did not address it. Write-as-you-go makes the cause\nirrelevant.\n\n## L6 — Both-states, or it does not count\n\nBefore a probe's silence counts as \"clean\", run it against the **known-BROKEN** state and\nconfirm it **FIRES** there (`single-signal-verification.md:40`, rule 3b).\n\n**A control that cannot fail is not a control.** A \"control\" that printed a reassuring\nmessage while both its numbers were 0 shipped on this estate.\n\n- Applied to a test suite, this is **mutation testing** — revert the real bug and require\n  the suite to go red. A suite that stays green is not protecting that behaviour.\n- Applied to a fan-in gate, it means: delete an artifact, truncate one below the floor,\n  strip one trailer — and confirm the gate reports `MISSING` \u002F `UNDERSIZE` \u002F `NO-TRAILER`\n  **before** you trust it reporting `DELIVERED`.\n\n`scripts\u002Freceipt_gate.py --self-test` does exactly that on throwaway fixtures and reports\n`CONTROL-OK` only when the gate fires on all six broken shapes **and** is silent on the\ngood one. If either half fails it prints `CONTROL-BROKEN` and exits non-zero — the gate's\nverdicts are then uncitable.\n\n### Independence must hold across TIME, not just mechanism\n\nMEASURED 2026-08-08, by this skill's own lane, against itself: two mechanically\nindependent probes — Git Bash `ls -la` and PowerShell `Get-ChildItem -Force -Recurse` —\nboth reported `~\u002F.claude\u002Frules\u002Fcommon\u002F` **empty**, and that was written up as a finding.\nIt was wrong. A concurrent lane was mid-write; the gate's own `INV-6-rules-common`\n(`check_no_regression.py:445`, globbing that exact path) reported `n=20 missing=[]` minutes\nlater, and a re-probe listed all 20 files.\n\nBoth probes were run at the **same instant**. For a **mutating** resource that is **one\nobservation, not two.** Different shell + different API buys you independence of\n*mechanism*; it buys nothing against a transient. When the subject can change under you —\na directory a sibling lane is writing, a process table, a lock file, a queue depth — the\nsecond signal must be **separated in time**, and the claim must be scoped to the instant\nit was taken: not *\"the directory is empty\"* but *\"the directory was empty at 02:17\"*.\n\nA standing property inferred from a single time point is an overclaim even when the\ninstrument is perfect. That is L10 reproduced by the lane documenting L10.\n\n**And: read the instrument you are already running.** The refutation came from a gate this\nlane was required to run anyway. It cost nothing and had been available the whole time.\n\n## L7 — Never fan a MECHANICAL comparison out to LLM judgement\n\nMEASURED, six Opus agents classifying 338 files as repo-ahead \u002F live-ahead \u002F diverged \u002F\nnoise, given the work-list, an enumerated verdict vocabulary, a worked counter-example, and\nan explicit instruction to classify by CONTENT (`fan-out-contract.md:140-165`, §C4):\n\n| | |\n|---|---|\n| agent accuracy | **86%** (291\u002F338) |\n| disagreements with a 40-line differ | 47 |\n| errors in the DANGEROUS direction (said safe, was DIVERGED) | **31** |\n| errors in the safe \u002F over-cautious direction | **0** |\n\nEvery disagreement was the two-sided DIVERGED case read as one-sided. Deploying on those\nverdicts would have destroyed content in 31 files.\n\n**86% accuracy is the wrong metric. Error DIRECTION is the metric** — 100% of the errors\npointed at data loss. The differ had no such bias, ran in seconds, and was exact.\n\nRULE: if a question is answerable by an exact algorithm — byte\u002Fline comparison, set\nmembership, counting, hashing, existence — **write the algorithm.** Reserve agents for what\ncode cannot do: judging whether the divergent content MATTERS, summarising what a change\nmeans, weighing a trade-off. The right split in that task was: differ classifies all 338,\nagents describe the 10 behaviour-bearing DIVERGED files.\n\nThis law binds this skill too — which is why L2 ships a script and not a checklist.\n\n## L8 — Per-needle deferral is the wrong LAYER; only a role-aware discriminator terminates\n\nWhen a guard must decide whether a matched string is a real occurrence or merely\n*mentioned* (a doc quoting a banned command, a hook matching its own name), the tempting\nfix is to defer each ambiguous needle to a smarter check. **That recurses** — the deferral\nrecord itself contains the needle, so the next pass matches it again.\n\nThe layer that terminates is a **role-aware discriminator** that judges the match by its\nsyntactic role. On this estate that is\n`~\u002F.claude\u002Fhooks\u002F_shared\u002Fuse_vs_mention.py` (41,045 B, 59 tests):\n\n- `classify(text, span, context, kind) -> Judgement` at `:602`, verdict `USE | MENTION |\n  UNKNOWN`\n- `is_real_occurrence(...) -> bool` at `:788` (the bool projection)\n- `audit_subject_rule(path)` at `:571`\n- `Judgement` at `:164`\n- an `ast`-exact string-literal rule **structurally** terminates the recursion\n\n`UNKNOWN` is the point: the discriminator is allowed to say \"I could not tell\", and that\nstate surfaces rather than defaulting either way.\n\nMEASURED: **16** use-vs-mention false fires in a single day here; three of them were a hook\nmatching the substring `todo` inside its own name `todo-surfacer` (the hyphen is a word\nboundary). Wire the discriminator; do not hand-roll a per-needle exception list.\n\n**This class reaches inside the completion gate itself.** MEASURED 2026-08-08 by executing\n`completion_predicate.py:45`, which tests `f\"UNIT-COMPLETE: {unit_id}\" not in tail` — a\nsubstring. Fed an artifact whose tail literally reads *\"This unit did NOT finish and wrote\nno trailer\"* but which quotes the token in prose, it returns `ok=True,\nreason=\"and-gate-pass\"`. The same module's anchored extractor at `:141` returns `None` for\nthat same text: **the module disagrees with itself about whether the unit is done.**\nCorrectly scoped (L10) — over the 55 real artifacts the two forms agree 55\u002F55, divergence\n**0**, so the hole is executable-proven but LATENT in that corpus. The realistic trigger is\nan L5 write-as-you-go skeleton echoing its own contract text into the tail (*likely*,\n55-80%, INFERRED from the two measured facts; UNVERIFIED against a live run — settling\nexperiment: run both forms over in-flight skeletons rather than finished artifacts).\n`receipt_gate.py` uses line-equality and keeps a `substring` fixture in its self-test so a\nregression fails the control.\n\n## L9 — Adversarial verifiers get siblings' FULL text, not digests\n\nGiving reviewers the siblings' complete output was **the single highest-value structural\nchoice** in the measured corpus — the only mechanism that caught a false \"double-fire\nconfirmed\" premise and duplicate-skill bloat (`fan-out-contract.md:80`, §B6).\n\n- **Digest silence is not absence of caveats**: 127 UNVERIFIED tags in the documents; only\n  **18** survived into 30 digests (§B5). Open the document before treating a claim as\n  unqualified.\n- Give reviewers a **durable artifact contract**. 540,583 tokens of adversarial review in\n  one program left **zero** on-disk artifact.\n- **On a split verdict about a briefed fact, the specific probe wins over the agent count**\n  (§B4). Read the probes; do not vote. Two agents once \"CONFIRMED\" a false fact by re-running\n  the orchestrator's own broken detector.\n- **Never score agents on output volume** (§B7). The best verification agent in the corpus\n  is near the bottom on KB\u002Ftoken; a volume gate selects against exactly the behaviour you\n  need.\n\n## L10 — Most refutations are OVERCLAIMS — fix the SENTENCE\n\nMEASURED: across three lanes and four adversarial reviews, **5 of 8** refuted claims were\ncases where **the code was correct and the sentence was wider than the evidence** —\n`recall = 1.0`, `FP=0 \u002F FN=0`, \"three holes closed\", \"asserted by a test\". Only 3 of 8 were\ngenuine defects, and each closed in one round (`fan-out-contract.md:110`, §C2).\n\nConsequences:\n\n- A \"round N until fully green\" stopping rule is **tractable, not unbounded** — convergence\n  comes from scoping claims to their evidence, not from closing every conceivable gap.\n- On a refuted overclaim, **fix the sentence**: state the scope actually measured, disclose\n  the residual **inline**, and name the settling experiment.\n- A residual gap that is honestly scoped and disclosed is **not** a refuted item and must\n  not block.\n- **Record** that the earlier wording was REFUTED. Do not silently delete it — a deleted\n  overclaim gets re-made.\n- Reviewers: an overclaim is a **REFUTED** verdict *even when the underlying code is fine*.\n  Say so, and supply the correctly-scoped version.\n\n---\n\n## The spawn preamble is not inherited — restate it every time\n\nNothing spills over from the global contract into a subagent. MEASURED: 8 lens documents\n(~190 KB) whose prompt omitted the honesty instrumentation scored **0** UNVERIFIED tags and\n**0** URLs; prompts that named the fields scored 26-62 hits each (`fan-out-contract.md:8`,\n§A1). Zero inheritance was measured.\n\nThe copy-paste preamble carrying every mandatory element is\n`references\u002Fspawn-preamble.md`. The elements it must never drop:\n\n- **Enumerate the vocabulary; never ship a bare tag name.** Sherman-Kent bands listed inline\n  → **20\u002F21 (95%)** adoption; a bare `NATIVE-vs-BUILD` tag with no value set → **7\u002F21 (33%)**,\n  the most-dropped field in the corpus (§A2). Enumerate the values or delete the field.\n- **UNVERIFIED inline, adjacent to the claim.** 127 real flags, but **40% (51)** sat in the\n  final 15% of their document. A trailing limitations section does not satisfy this; if a\n  recommendation's premise is UNVERIFIED, the recommendation inherits the tag in its heading\n  (§A3).\n- **A briefed fact needs a probe tag, a timestamp, and a MECHANICALLY DIFFERENT re-probe\n  rule.** 4 agents correctly refuted \"mon is not on PATH\"; **2 \"CONFIRMED\" it by re-running\n  the orchestrator's own broken Git-Bash `which`** — evidence-tag theatre. Re-running the\n  tagged probe does not count and must not be reported as CONFIRMED (§A4).\n- **Every path carries its access method** when it is not readable by `Read` at that literal\n  path. A main-only path cost **7 agents** independent rediscovery; one line fixes it (§A5).\n- **Pin the artifact root and `ls` it in the prompt** — 10 `Read` failures were pure cwd\n  confusion (§A12).\n- **Split the evidence standard by lens type.** GROUNDED lenses cite `file:line`; IDEATION\n  lenses cite an external source and are told explicitly NOT to ground in the repo (§A9).\n- **Keep the ≤350\u002F400-word digest cap** — measured NOT lossy (median 340 words, 4\u002F40 over,\n  worst +12%), and 4\u002F4 correcting agents led with the correction (§A7). Require an\n  `EVIDENCE:` block of 3-5 anchors **exempt** from the cap (§B3) — 87% of `file:line` refs\n  and 100% of URLs otherwise die at the digest boundary.\n- **Inject a shared grounding pack** (§A11). Build once with\n  `python \u003Ccheckout>\u002Ftools\u002Frepomap\u002Frepo_map.py --root \u003Ccheckout> --budget 900 --out \u003Cartifact-root>\u002FGROUNDING-PACK.md`\n  — pass the ABSOLUTE path or it dies with `[Errno 2]` from any other cwd. Cap intra-agent\n  re-reads of one path at ~4.\n\n## Windows transport (this box)\n\n- **Prompt by FILE, never inline.** `CreateProcess` caps the command line at 32,767 chars;\n  an inline prompt produced `payload_len=34472` → `os error 206` and killed two runs.\n- **An apostrophe in a Bash-tool command body breaks the tool's own quoting** — 6+ killed\n  calls in one session. Write the script with the Write tool and run `python \u003Cpath>`; never\n  inline `python -c '…'`, never a heredoc carrying backslashes.\n- **Use forward slashes in git revisions** and the `--` separator.\n- **A here-string PAYLOAD is scanned as if it were a command** — a markdown body quoting a\n  destructive command gets blocked. Use the Write tool (measured 0\u002F40 failures vs 8\u002F59 for\n  here-strings).\n\n## Checklist before you call a fan-out done\n\n1. Preamble + launcher + SHA frozen since unit 1 launched, unchanged. — L1\n2. `receipt_gate.py` run; every unit typed; `NOT-CHECKED` surfaced, not folded. — L2\n3. `--self-test` printed `CONTROL-OK` in this session. — L6\n4. No result contains `started in the background` \u002F `Check \u002Fcodex:status`. — L2\n5. Every claim reported at the rung it was actually measured at. — L3\n6. Every mechanical question answered by an algorithm, not a vote. — L7\n7. Reviewers received FULL sibling text and produced a durable artifact. — L9\n8. Every refutation triaged overclaim-vs-defect; overclaims fixed as sentences and recorded. — L10\n",{},"main","a298c929b6cbd662e1fce54302ce520d5ceea1a5",".agents\u002Fskills\u002Fworkflow-foundry","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain","https:\u002F\u002Fgithub.com\u002FPrekzursil","2026-11-02 14:30:57",{"source":7,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Prekzursil\u002Fagent-skills-toolchain --skill workflow-foundry",{"tool":43,"command":44},"bunx","bunx skills add Prekzursil\u002Fagent-skills-toolchain --skill workflow-foundry",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Prekzursil\u002Fagent-skills-toolchain --skill workflow-foundry","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-foundry\u002FSKILL.md",true,[51,57,61,65],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fevidence-index.md","REFERENCE","参考文档",7388,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-foundry\u002Freferences\u002Fevidence-index.md",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Freceipt-gate.md",6388,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-foundry\u002Freferences\u002Freceipt-gate.md",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fspawn-preamble.md",5984,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-foundry\u002Freferences\u002Fspawn-preamble.md",{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"scripts\u002Freceipt_gate.py","SCRIPT","脚本",14527,"https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-foundry\u002Fscripts\u002Freceipt_gate.py",[72,94,120,147,161,177],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":26},"01M6DF7D7478R55P46REYH4QAC","clarify-requirements","Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fworkspace-hooks\u002Fskills\u002Fclarify-requirements\u002FSKILL.md",[],[79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],"clarify requirements","clarify","requirements","risk","options","task","prompts","goal","scanning","use","context","repo","injection","execution","file",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":101,"publishedAt":26},"01M6DF79CA4BHJS66J8EZDBPWJ","openmm-md","Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein \u002F protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fmcp\u002Fopenmm-md-mcp\u002Fskill\u002Fopenmm-md\u002FSKILL.md",[100],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[102,103,104,105,106,107,108,109,110,111,112,113,23,114,88,115,116,117,118,119],"openmm md","how","decision","pick","linux","analyze","tool","stack","open","NVIDIA","gpu","license","windows","free","molecular dynamics","local","do","MCP",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":132,"publishedAt":26},"01M6DF76C1MG85VEWP8VZCBNMN","visual-review","Take screenshots of web pages and UI using Playwright for visual review and iteration","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fvisual-review\u002FSKILL.md",[126,129],{"categoryNo":127,"categoryName":128,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":130,"categoryName":131,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",[133,134,135,136,137,138,139,140,141,142,103,143,144,145,146],"review","visual","visual review","pages","web","false","iteration","take","check","slides","ui","screenshot","playwright","screenshots",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":26},"01M6DF73AQVCBZKEN0YXEX9FXP","status","Diagnostic status report — shows metaswarm installation state, project setup, and potential issues","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstatus\u002FSKILL.md",[],[149,154,155,156,157,158,159,160],"setup","report","project","installation","project setup","issues","state",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":168,"publishedAt":26},"01M6DF6X6C2XB0P6GX76P7TTYV","start","Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstart\u002FSKILL.md",[167],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},[163,169,84,170,171,172,88,173,174,175,176],"start issue","issue","ready","work on issue","user","work","work on","development",{"skillNo":178,"name":154,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":26},"01M6DF6QMJ9AJKFKHHKRT005PQ","Interactive project setup — detects your project, configures metaswarm, writes project-local files","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fsetup\u002FSKILL.md",[],[154,156,117,183,158,184],"files","interactive"]