From 68e6850ed4215516165fab697e0370ed6cb4a995 Mon Sep 17 00:00:00 2001 From: Parfii-bot Date: Sun, 3 May 2026 15:37:18 +0800 Subject: [PATCH] fix(substrate): TOML scope-capture + dangling physics-deriver bodies + rule paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three independent manifest fixes from Opus TOML + Sonnet TOML + Sonnet Markdown audits. 1. TOML scope-capture (Sonnet TOML, HIGH) _manifests/critic-anti-pattern.toml + critic-perf.toml had [references] appearing AFTER [[handoff]] array-of-tables. Per TOML spec, this makes [references] parse as a SUB-TABLE of the last [[handoff]] element, not as a top-level table. All references in those manifests were silently unreachable by the assembler's top-level resolver. Moved [references] block before [[handoff]] in both files. Added 3-line warning comment immediately above [[handoff]] explaining the TOML scope rule to future editors. 2. Dangling physics-deriver in role bodies (Opus TOML, HIGH) Group F earlier (commit 57d3700) removed [[handoff]] blocks targeting physics-deriver / patent-compliance / patent-researcher, but role text strings + forbidden_domain arrays still referenced physics-deriver in: - _manifests/ml-researcher.toml (lines 16, 41, 76, 89) - _manifests/ml-implementer.toml (line 15) - _manifests/infra-implementer.toml (line 16) — already scrubbed in P0 commit c250a9c as part of EC2-ID strip; leaving for context Replaced live mentions with "architect" (canonical fallback). Historical comments documenting the prior removal kept intentionally — they are documentation, not live references. 3. Wrong rule paths (Opus TOML, MEDIUM) ml-researcher.toml + ml-implementer.toml referenced files that don't exist under their stated paths: - path:user-rules/specialized-node-training.md → cfc-specialized-nodes.md - path:user-rules/observable-classification.md → paradigm-native-measurement.md Fixed both paths in both files. Co-Authored-By: Claude Opus 4.7 (1M context) --- _manifests/critic-anti-pattern.toml | 9 ++++++--- _manifests/critic-perf.toml | 9 ++++++--- _manifests/ml-implementer.toml | 6 +++--- _manifests/ml-researcher.toml | 8 ++++---- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/_manifests/critic-anti-pattern.toml b/_manifests/critic-anti-pattern.toml index 853a485..763bbef 100644 --- a/_manifests/critic-anti-pattern.toml +++ b/_manifests/critic-anti-pattern.toml @@ -21,15 +21,18 @@ domain_in = ["task scope (verbatim user prompt)", "target paths / files"] forbidden_domain = ["hardcoded secrets (RULE 0.8)", "cross-language drift (use the matching sibling)"] output_extra_fields = ["Largest file LOC", "Tests pass count"] -[[handoff]] -target = "validator" -trigger = "general fact-check fallback" [references] extra = [ "path:user-rules/code-style.md", "path:user-rules/karpathy-behavioral.md", ] +# IMPORTANT (TOML spec): all [table] sections must precede [[array]] sections. +# Adding a new [section] BELOW [[handoff]] makes it a sub-table of the last handoff. +[[handoff]] +target = "validator" +trigger = "general fact-check fallback" + [taxonomy] kingdom = "manifest" mechanism = "compose" diff --git a/_manifests/critic-perf.toml b/_manifests/critic-perf.toml index afee1c8..fe0794f 100644 --- a/_manifests/critic-perf.toml +++ b/_manifests/critic-perf.toml @@ -21,15 +21,18 @@ domain_in = ["task scope (verbatim user prompt)", "target paths / files"] forbidden_domain = ["hardcoded secrets (RULE 0.8)", "cross-language drift (use the matching sibling)"] output_extra_fields = ["Largest file LOC", "Tests pass count"] -[[handoff]] -target = "validator" -trigger = "general fact-check fallback" [references] extra = [ "path:user-rules/code-style.md", "path:user-rules/karpathy-behavioral.md", ] +# IMPORTANT (TOML spec): all [table] sections must precede [[array]] sections. +# Adding a new [section] BELOW [[handoff]] makes it a sub-table of the last handoff. +[[handoff]] +target = "validator" +trigger = "general fact-check fallback" + [taxonomy] kingdom = "manifest" mechanism = "compose" diff --git a/_manifests/ml-implementer.toml b/_manifests/ml-implementer.toml index 94851b2..83bacdb 100644 --- a/_manifests/ml-implementer.toml +++ b/_manifests/ml-implementer.toml @@ -12,7 +12,7 @@ role = """ You are a senior ML implementation engineer. You write training scripts, inference code, Modal jobs, \ and experiment runners, enforcing Math-First (Level 0), the Pre-Experiment Check, and the \ Modal Protocol on every paid run. You own experiment observability and immediate result logging. \ -You are NOT a theory writer (hand off to `physics-deriver`), NOT a generic code writer (hand off to \ +You are NOT a theory writer (hand off to `architect`), NOT a generic code writer (hand off to \ `code-implementer`), NOT a deploy/infra engineer (hand off to `infra-implementer`). Your output is \ tested training/inference code with exact param counts, displayed cost estimates, and results already \ logged in `memory/{project}.md` before analysis. @@ -107,9 +107,9 @@ trigger = "multi-node composition design, experiment matrix layout, benchmark/ba [references] extra = [ "path:user-rules/ml-protocol.md", - "path:user-rules/specialized-node-training.md", + "path:user-rules/cfc-specialized-nodes.md", "path:user-rules/api-cost-guard.md", - "path:user-rules/observable-classification.md", + "path:user-rules/paradigm-native-measurement.md", "path:user-rules/manifold-tangent-sanity.md", "path:user-rules/no-downgrade-constructive.md", "path:user-memory/wrong-paths-specialized-ml.md", # TODO verify path:user-memory exists in assembler resolver diff --git a/_manifests/ml-researcher.toml b/_manifests/ml-researcher.toml index b2fb1f6..b6321fc 100644 --- a/_manifests/ml-researcher.toml +++ b/_manifests/ml-researcher.toml @@ -13,7 +13,7 @@ You are the ML/physics research specialist. You own literature review, tooling-r search, reproducibility audit, and math-first formulation for any ML/RL \ question. You are READ-ONLY — you never run experiments, never train models, never \ edit code. Reuse beats reinvention; math beats vibes; synthetic-to-real gap is always \ -disclosed. You hand off to `ml-implementer` for experiments, `physics-deriver` for \ +disclosed. You hand off to `ml-implementer` for experiments, `architect` for \ theorem writing, `validator` for citation gating. """ @@ -38,7 +38,7 @@ domain_in = [ forbidden_domain = [ "Running experiments, training models, or editing code (read-only agent — hand off to `ml-implementer`)", - "Writing theorems / derivations (hand off to `physics-deriver`)", + "Writing theorems / derivations (hand off to `architect`)", "Recommending code BEFORE writing the math expression (Math-First violation)", "Proposing a custom env / training loop / dataset loader without first searching MyoSuite / Menagerie / CleanRL / HuggingFace / Ninapro", "Reporting a sim/benchmark number without the synthetic-to-real disclaimer", @@ -91,8 +91,8 @@ trigger = "question is about ML-system architecture (node graph, data-flow, modu [references] extra = [ "path:user-rules/ml-protocol.md", - "path:user-rules/specialized-node-training.md", - "path:user-rules/observable-classification.md", + "path:user-rules/cfc-specialized-nodes.md", + "path:user-rules/paradigm-native-measurement.md", "path:user-rules/api-cost-guard.md", "path:user-rules/no-downgrade-constructive.md", "path:user-memory/wrong-paths-specialized-ml.md", # TODO verify path:user-memory exists in assembler resolver