CommunityWriting & Editinggithub.com

MCM Gold Master Controller

A phased Codex skill for mathematical modeling competitions, orchestrating T0–T8 expert stages with global constraints, state management, routing, and handoff enforcement.

What is MCM Gold Master Controller?

This skill is a master controller for mathematical modeling competitions (e.g., CUMCM, MCM/ICM). It does not replace the nine expert sub‑skills (T0–T8) but acts as a control plane that enforces global hard constraints (e.g., AI‑usage disclosure, result reproducibility, anonymity), reads and maintains a detailed configuration, and runs a disciplined READ → SCOPE → ROUTE → NATURE → VERIFY → REVIEW → STATUS → SIGNOFF → WRITE → REPORT loop each turn. It enforces that all products are written under `MCM-Result/` following a strict directory layout, that each staged product is independently reviewed with a 30+70 rubric, and that human‑in‑loop decisions (H‑001 to H‑005) are explicitly requested. The skill also implements a multi‑session ledger discipline to prevent silent data loss when parallel sessions write to the same workspace files, and requires reading of mandatory reference documents before any stage gate can pass. It is designed for platforms like Codex, Cursor, or Claude Code and is configurable for different contest rules, team roles, and risk appetite.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add BeforeUgone123/MCM-For-GOLD

Installed? Explore more Writing & Editing skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does MCM Gold Master Controller do?

Treat this skill as the control plane. Do not re‑embed the nine stages into the controller. Stage algorithms, outputs, and gates are the responsibility of T0–T8 experts; this skill only maintains global constraints, status, routing, and handoffs.

Hard Constraints

  1. Comply with contest rules, formatting, and AI‑usage disclosure requirements; stop any action immediately upon detecting a compliance risk and request human arbitration.
  2. All numerical values in the paper must link to an R‑id in RESULTS.md; external facts must link to an S‑id in SOURCES.md; problem statement facts must state the page number or attachment field.
  3. Do not write values, figures, references, or conclusions that were not actually computed, read back, or traceable.
  4. Keep the body, PDF metadata, code, images, and archives anonymous; key results must be reproducible in a clean environment.
  5. Maintain a “shippable as of now” version at all times; frozen content is updated via supersession, never overwritten in place.
  6. AI only organizes candidates, evidence, and checks; humans are responsible for problem interpretation, solution direction, facts, expression, disclosure, and final submission.
  7. Live mode must have human_in_loop=true; dry runs must be marked PROXY_REHEARSAL and never called formally submittable.
  8. All work output must be written uniformly under the current working directory's MCM-Result/, strictly using the seven English subdirectory names defined in the output layout contract; if the directories don't exist, initialize them first; do not scatter products in the root directory.
  9. After each stage freezes its outputs, run the independent review scoring contract; the producer must not give themselves a formal score, and scores must not override hard gates or human signoffs.

Effective Configuration

First read user overrides, then apply defaults, and list the effective configuration in the first briefing. At a minimum, parse the following fields:

contest:
  name: CUMCM
  year: 2026
  group: undergraduate
  problem: null
  start_time: "2026-09-10T18:00+08:00"
  end_time: "2026-09-13T20:00+08:00"
  total_hours: 74
  rules_pack: cumcm_2026
target:
  award: national_first
  rubric_threshold: 88
  risk_appetite: balanced
  innovation_quota: 2
team:
  size: 3
  human_in_loop: true
  final_responsibility: human
  roles: {modeler: modeling, coder: computing, writer: writing}
toolchain:
  primary_lang: python
  figure_backend: python
  paper_format: latex
  seed: 20260910
  compute_budget: "Each experiment at most 20 minutes; if timeout, reduce dimension or sample"
research:
  online: true
  depth: deep
  cite_policy: strict
  frontier_methods: allow
  frontier_cards_quota: 2
  frontier_tier_max: B
nature_profile:
  enabled: true
  mode: embedded
  external_skill_calls: false
  citation_scope: contest_sources
  figure_scope: paper_bound
  data_mode: claim_to_file
  office_mode: format_conditional
  feedback_mode: real_feedback_only
process:
  rigor: gold
  run_mode: live
  rehearsal_clock: compressed
  entry_mode: full_pipeline
  result_root: "./MCM-Result"
  state_dir: "./MCM-Result/Intermediate-Outputs"
  checkpoint_every_hours: 2
  always_shippable: true
  timebox_enforcement: hard
  language: zh
compliance:
  ai_policy: cumcm_ai_2026_trial
  declare_ai: true
  anonymize: true
  similarity_guard: 25
review:
  schema_version: "1.0"
  independent: true
  universal_points: 30
  stage_specific_points: 70
  pass_score: 85
  limited_score: 70
  conservative_merge: itemwise_min
output:
  max_body_pages: 30
  paper_file_mb: 20
  support_file_mb: 20

When only overriding process.rigor, the frontier method quota is derived as follows: lite=0/A, standard=1/A, gold=2/B, paranoid=2/C; if the user explicitly overrides, use the user's value. result_root is always resolved to MCM-Result/ under the current working directory and must not be overridden to another location; after running templates/init_result_workspace.py, immediately resolve result_root and state_dir to absolute paths.

State and Evidence

Initialize and maintain continuously. Unless otherwise noted, all state ledgers reside in MCM-Result/Intermediate-Outputs/:

  • STATE.md: clock, stage, blockers, current shippable version, next action.
  • DECISIONS.md: directional decisions, rejected alternatives with reasons.
  • ASSUMPTIONS.md: assumptions, basis, impact, tests, and conclusions.
  • RESULTS.md: numeric values, commands, scripts, seeds, timestamps, and figures.
  • Reference-Papers/SOURCES.md: sources, level, usage, excerpts, and retrieval time.
  • AI_USAGE.md, RISKS.md, HUMAN_SIGNOFFS.md.
  • CLAIM_LEDGER.csv, SOURCE_DATA_MAP.csv: claim ledger and mapping from claims to data files.
  • SKILL_USAGE.md, FREEZE_CHANGE_LOG.md.
  • FIGURE_EVIDENCE.csv, NATURE_QA.csv, PAPER_COVERAGE_LEDGER.csv, T7_RUBRIC_REVIEW.csv, REVIEW_PASS_ITEMS.csv, Tn_REVIEW_* triple files, and stage contract files are written to MCM-Result/Review-Results/ (figure evidence and Nature QA are review results, not process logs).

The owning directory of each CSV ledger is determined by the ‘Owning Directory’ annotation in each section of templates/workspace-templates.md; verify_ledgers.py parses those annotations directly and only recognizes declared directories; identical copies elsewhere are flagged LEDGER_STRAY_COPY. Previously, this section and the stage skills had inconsistent expectations for FIGURE_EVIDENCE.csv/NATURE_QA.csv, and because the checker picks the first directory it finds, ledgers forked across two directories and the machine check missed them.

Use the templates from templates/workspace-templates.md and obey the archive mapping in references/output-layout.md. Do not leave critical conclusions only in dialog. See references/stage-contract.md for complete handoff rules.

Dispatch Loop

Execute strictly every turn:

  1. READ: Run date "+%F %T %z", compute real remaining time against the contest start and end times; read STATE.md, configuration, blockers, and current stage evidence.
  2. SCOPE: Distinguish between full_pipeline and stage_module. Partial entry points may lack upstream stages, but must explicitly record UPSTREAM_MISSING and must not fabricate completed stages.
  3. ROUTE: Invoke only one stage expert for the current primary gap. T2/T3 and T5/T7 may proceed in parallel, but they must hand off independently and obey the multi‑session ledger discipline below.
  4. NATURE: Execute built-in evidence, figure, writing, or delivery norms for this stage according to references/nature-integrated-playbook.md; do not call an external Nature skill.
  5. VERIFY: Read the actual files and command outputs produced by the stage expert and built-in Nature.
  6. REVIEW: Freeze the stage artifacts, route to a reviewer in a different context from the producer, generate an R1 according to the 30+70 rubric; if T6–T8 or R1 total is 80–90, trigger a blind R2, produce FINAL by taking the minimum item‑wise, and run templates/verify_stage_review.py (this script also checks that mandatory documents for this stage were registered; missing items yield a FAIL directly).
  7. STATUS: Read scores, hard gates, and human pending items simultaneously; accept only four stage states: PASS, PASS_WITH_LIMITATIONS, NEEDS_HUMAN, BLOCKED; in case of conflict, take the stricter conclusion.
  8. SIGNOFF: Generate a single arbitration briefing when crossing H‑001 to H‑005; in live mode, wait for human confirmation.
  9. WRITE: Write back status, Nature QA, review triple bundle, ledgers, and the current shippable version; then decide whether to proceed to the next stage.
  10. REPORT: Output a stage briefing of no more than 10 lines; never write “planned” as “completed”.

Multi‑Session Ledger Discipline

Parallel work means multiple sessions are often writing to the same workspace files at the same time, and only RESULTS.jsonl has a file lock; RESULTS.md is written atomically. All other files—STATE.md [HANDOFF] blocks, CLAIM_LEDGER.csv, NATURE_QA.csv, REVIEW_PASS_ITEMS.csv—are ordinary read‑modify‑write operations; the last writer will overwrite the entire file, silently erasing handoff blocks or ledger rows, and it will be impossible to tell afterward that it happened. There is no file‑locking mechanism—during a competition, the risk of altering a shared write path is higher than the problem it would prevent—so discipline is used instead:

  • Read before write: Before modifying any shared ledger, re‑read its current content; do not use a version from several turns ago as a baseline. If a stage expert has been called since the last read, consider the previous read stale.
  • One block at a time, append‑first: For CSVs, only append your own rows; do not reorder or rewrite the whole table. For STATE.md, only change the [HANDOFF Tn] block belonging to your session’s stage; do not reformat the entire file.
  • Separate files before merging: When two parallel stages write to the same table, each first writes to Review-Results/Tn_*.json/.csv, and merges into the shared ledger at the stage closing step—this merge is an auditable action, making it easier to detect lost rows than when two sessions append alternately.
  • Read back immediately after write: After writing, re‑read the file to confirm your rows are still there and other sessions’ rows are also present. If rows are missing, do not simply rewrite; first log the event in RISKS.md, then restore from both sides’ stage artifacts.
  • Always use date -Iseconds for timestamps; do not type them manually: the fastest way to detect concurrent loss is a mismatch between timestamp order and file mtime.

Stage Routing

StageExpert SkillMain Exit Gate
T0 Pre‑contest$mcm-gold-t0-prepareMinimal closed loop from data to PDF within 30 minutes
T1 Problem reading & selection$mcm-gold-t1-selectProblem breakdown, selection evidence, and H‑001
T2 Formalization$mcm-gold-t2-formalizeMathematical definition per sub‑question, source chain, primary and backup routes, and H‑002/H‑003
T3 Data audit$mcm-gold-t3-audit-dataData dictionary, cleaning chain, coverage audit, and frozen hash
T4 Baseline$mcm-gold-t4-baselineReproducible numeric results for the first sub‑question, result figures, and baseline comparison
T5 Main model$mcm-gold-t5-solveArtifacts for all sub‑questions, solution evidence, cross‑question traceability, and innovation comparison
T6 Validation$mcm-gold-t6-validateSix types of validation with R‑id or reasonable N/A, summary conclusions survive
T7 Writing$mcm-gold-t7-writeCoverage ledger per sub‑question (six items), seven‑dimensional rubric, two paper versions, and H‑004 closure
T8 Submission$mcm-gold-t8-submitFinal paper contract check, clean‑environment reproduction, H‑005, and submission receipt

Do not let the controller write stage results. If a stage skill is not loaded or missing, report the absence clearly; do not improvise an invisible process as a substitute.

Clock and Stoploss

Baseline 74 hours: T1 0–4h, T2 4–12h, T3 8–16h, T4 12–26h, T5 26–46h, T6 46–58h, T7 36–66h, T8 66–74h. Scale proportionally for other contest formats.

  • Finalize problem selection and solution direction before 12h.
  • First sub‑question results before 26h.
  • After 48h, the work must be shippable at any moment.
  • No new models may be introduced in the last 8h.
  • If a single route shows no substantial progress for 3h: switch to a registered alternative; do not change the problem frequently.
  • Solver timeout: reduce dimension, relax, discretize, or use heuristics, and disclose the impact of the approximation.
  • If fewer than 12h remain with unanswered sub‑questions: deliver a simplified model, clear conclusions, and limitations; leave no blank sections.
  • If fewer than 4h remain: freeze content; the entire team shifts to layout, compliance, and final checks.

In live mode, only use real wall time. In rehearsal mode, record both wall_used and logical_used; never report compressed logical clock as real elapsed time.

Human Arbitration

Request one decision at a time, and provide a recommendation, evidence, risks, and the consequences of not deciding:

  • H‑001: Problem selection.
  • H‑002: Primary route, simplification, and exploration artifact boundaries.
  • H‑003: Key facts, sources, units, and scope.
  • H‑004: Result interpretation, summary conclusions, and main figures.
  • H‑005: AI disclosure, final files, remaining risks, and submission authorization.

See references/human-ai-charter.md for details. While waiting for a decision, you may continue evidence organization, PoC, and verification that does not change direction; do not quietly upgrade candidates to final conclusions.

User Command Routing

CommandRoute
statusController outputs clock, cold‑start five questions, current shippable version, and the single next action
change route <description>Controller logs a D‑log, then routes to T2 or T5 for impact assessment
downgrade <problem ID>Current stage expert executes the registered downgrade route and updates risks
Can I submit now?Controller summarizes actual gaps from T7/T8; no oral optimistic judgment
red teamRoute to $mcm-gold-t6-validate
final check, exportRoute to $mcm-gold-t8-submit

Stage Mandatory Documents (Hard Gate)

The vast majority of this skill's norms exist as plain documents; not reading them is equivalent to their non‑existence: directory contracts, scoring rubrics, and machine‑check scripts can self‑expose, but methodology, writing, validation, literature, and figure norms cannot. A failure mode that has been observed in practice is “machine checks all pass, but all document norms are missed”. Therefore, “having read” is made into a verifiable gate.

Before entering a stage, MUST open each document listed in the table below AND register the actual reading (including file, number of lines, and key constraint items that will be enforced in this stage) in the Mandatory Document Registration Table of SKILL_USAGE.md. Unregistered documents are considered unread; the stage Gate must not be set to PASS or PASS_WITH_LIMITATIONS.

StageMandatory references (in addition to stage-review-scoring.md and stage-contract.md for every stage)
T0 (including startup)rules-2026.md, output-layout.md, nature-evidence-data.md, human-ai-charter.md
T1rules-2026.md, methods-atlas.md
T2methods-atlas.md, frontier-cards.md, literature-library.md, nature-evidence-data.md
T3nature-evidence-data.md, evidence-contract.md
T4nature-figures.md, evidence-contract.md
T5methods-atlas.md, frontier-cards.md, nature-figures.md
T6adversarial-gates.md, nature-evidence-data.md
T7rubric-and-writing.md, nature-writing-office.md, nature-figures.md, literature-library.md
T8rules-2026.md, adversarial-gates.md, nature-writing-office.md

Training/promotion scenarios also require training-protocol.md, but it is not attached to any stage and therefore is not on the machine‑check list—that one is enforced by humans. This table and the REQUIRED_DOCS / DOC_GATE_UNIVERSAL lists in templates/verify_stage_review.py are from the same source; if one is changed, the other must be synchronized. They were once inconsistent: the three documents in the “startup” row did not exist in the machine check because there was no corresponding stage.

Bold items are documents that, if accidentally not read, cannot be detected by machine checks: nature-figures.md determines whether figures can serve as evidence; rubric-and-writing.md’s target and format requirements determine whether the paper is passable or national‑first‑prize; literature-library.md determines whether references are cited or fabricated; adversarial-gates.md carries anti‑hallucination iron laws.

Registration only records documents that have actually been opened. Filling in the table from memory is equivalent to not reading, and is worse—it makes the gap invisible.

Shared References

  • Rules and disclosure: references/rules-2026.md
  • Output layout: references/output-layout.md
  • Stage scoring: references/stage-review-scoring.md
  • Stage handoff: references/stage-contract.md
  • Evidence freeze: references/evidence-contract.md
  • Methods and frontier cards: references/methods-atlas.md, references/frontier-cards.md
  • Citable literature: references/literature-library.md (classic method sources + local full text; look here when writing references, do not fabricate)
  • Validation and final checks: references/adversarial-gates.md
  • Writing and rubric: references/rubric-and-writing.md
  • Research and local skill routing: references/research-and-skill-routing.md
  • Built-in Nature playbook: references/nature-integrated-playbook.md
  • Built-in evidence/data, figures, writing/Office, and feedback: references/nature-evidence-data.md, references/nature-figures.md, references/nature-writing-office.md, references/nature-feedback.md
  • Training and promotion: references/training-protocol.md

Startup Self‑Check

  1. Read configuration and output the effective configuration.
  2. Run templates/init_result_workspace.py --workdir <current working directory>, read back the absolute result_root and the seven fixed subdirectories; forbid creating work outputs outside MCM-Result/.
  3. Run templates/env_check.sh and save its actual output to MCM-Result/Intermediate-Outputs/logs/; if offline, set research.online=false and do not fabricate sources.
  4. Verify the rules pack expiry, absolute result_root/state_dir, real clock, and AI disclosure obligation.
  5. Initialize state files, determine the current stage and a primary gap.
  6. Initialize NATURE_QA.csv in MCM-Result/Review-Results/ and SOURCE_DATA_MAP.csv in MCM-Result/Intermediate-Outputs/, confirming that Nature is built‑in and does not rely on an external Nature skill.
  7. Confirm that formal reviews can be performed by a different reviewer_context_id; if an independent reviewer cannot be obtained, record INDEPENDENT_REVIEW_UNAVAILABLE; the stage must not generate FINAL or auto‑advance.
  8. Open all mandatory reference documents for the current stage according to the “Stage Mandatory Documents” table, register each in the mandatory document registration table of SKILL_USAGE.md; any missed registration is considered unread, and the Gate must not be set to PASS.
  9. Route to the corresponding stage expert and record the routing in SKILL_USAGE.md.
  10. Output the first stage briefing.

Related Skills