원클릭으로
workflow-orchestrator
Manage the full mathematical modeling contest workflow and decide which skill should be used next.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Manage the full mathematical modeling contest workflow and decide which skill should be used next.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
At a judgment point, emit the 2-3 questions only the human modeler can answer — framed as trade-offs, not answers — and refuse to answer them. The inverse of "AI answers, human confirms": here the AI asks, the human answers, then the AI assists with the consequences.
Verify every skill that claims "completed" produced a substantive audit/review artifact on disk with ≥ 5 explicit pass items. Runs as part of the independent audit layer that does not trust any single skill's self-declaration of done.
Plan figures and tables that support the modeling logic, results, and paper narrative.
Generate publication-quality mathematical modeling figures with matplotlib, covering evaluation charts, prediction plots, optimization diagrams, mechanism schematics, heatmaps, and multi-panel layouts. Use when creating or revising figures for contest papers.
Extract, organize, and document unified model assumptions from the problem parse and candidate method pools, distinguishing necessary from simplifying assumptions.
Write mathematical modeling paper sections based only on available problem analysis, model plans, results, figures, and robustness reports.
| name | workflow-orchestrator |
| description | Manage the full mathematical modeling contest workflow and decide which skill should be used next. |
| license | MIT |
Coordinate the full mathematical modeling contest workflow from problem intake to final QA.
This skill is a gate-driven scheduler, not a stage-sequential scheduler. The difference matters: a stage scheduler answers "what stage are we in, what's the next stage?" — which lets work advance even when the current stage's outputs are unreliable. A gate-driven scheduler answers "does the current stage's gate pass — and if not, what's the fallback?" — which prevents drift from propagating downstream.
This skill does not solve models, write code, generate figures, or draft paper sections directly. Its role is to inspect the current project state across ALL subquestions, track per-question progress through a defined state machine, identify missing or blocked artifacts, evaluate each workflow gate against its enter_condition / pass_criteria / fail_fallback contract, route to the independent audit layer (consistency-auditor + completeness-auditor + quality-assurance-auditor) before final assembly, and decide the next appropriate skill to use.
This skill is the single source of truth for "what should we do next?"
Before doing any orchestration work in a fresh session, ping the environment so downstream skills don't fail with surprises:
git status --short. If dirty (uncommitted changes, untracked files), surface the dirty files to the user before proceeding. Dirty working tree from a collaborator's in-progress work is the most common "git status looks weird" cause — flag it; do not silently work around it.python --version (or python3 --version). Flag if missing or wrong version.which matlab or command -v matlab; if missing, report "MATLAB not in PATH — confirm 北太天元 will be used or switch implementation target to Python".python -c "import numpy, pandas, matplotlib" — flag missing packages.planning/, methods/, code/, results/, robustness/, paper/, workspace/data_raw/ exist (or create them with a single mkdir -p if the user just initialized the project).Report the environment ping result in the very first response of a new session. Do not start state-machine work until the user has seen this report, since downstream skills will silently fail if the environment isn't there. A two-line summary is enough: "Env OK: Python 3.11, MATLAB found, working tree clean" or "Env WARN: MATLAB missing, working tree has 3 uncommitted files in code/Q2/".
Use this skill:
This skill can run with minimal context. At least one of the following should be available:
If none of these exists, ask the user to provide the problem statement, workspace tree, or current progress summary.
Inspect or request the following, depending on availability:
planning/ — global plan, problem parse, classification, symbol table, model assumptions, question dependency.methods/Q1/, methods/Q2/, methods/Q3/, methods/Q4/ — method candidates, iteration logs, final method explanations.code/Q1/, code/Q2/, code/Q3/, code/Q4/ — generated scripts.results/Q1/, results/Q2/, results/Q3/, results/Q4/ — experiment outputs, reports, final result analyses, solution packages.robustness/Q1/, robustness/Q2/, robustness/Q3/, robustness/Q4/ — robustness reports.paper/sections/ — drafted paper sections.paper/figures/ — final paper figures.planning/progress_dashboard.md (update if present).Inspect the current task state ACROSS ALL SUBQUESTIONS.
Determine each subquestion's status using the per-question state machine (see below).
Enforce workflow gates (see "Workflow Gates" section below for the enter_condition / pass_criteria / fail_fallback contract of each gate).
methods/Qx/qx_final_method_explanation.md exists.results/Qx/reports/qx_final_result_analysis.md exists.results/Qx/reports/qx_solution_package_for_writer.md as primary source; if missing, Qx is NOT Ready for Writer.Identify missing or blocked artifacts.
Select the next skill.
Update or produce the progress dashboard.
planning/progress_dashboard.md.Return a workflow state report.
Each gate is a hard checkpoint with three explicit parts. Do not skip a gate; do not advance on partial satisfaction. The state machine and the gates run together — the state machine says "what stage am I in", the gates say "can I leave this stage".
planning/parse/ exists (goals / objects / constraints / data / outputs / subquestions filled); planning/classification/ exists with an ai_suggested_type per Qx.[MODELER INPUT NEEDED / [AI-DRAFT sentinel in the load-bearing judgment fields — per Qx the evaluation_criteria (the success rubric, problem-parser), the modeler_chosen_type + framing_rationale (problem-classifier), and any proposed causal/conservation relationships. A surviving sentinel means the human hasn't confirmed the framing → G1 not passed.problem-parser / problem-classifier. Surviving sentinels → route back to the modeler (not a skill) to supply the rubric / confirm the type. Do not advance to G2; the orchestrator never fills these fields itself.This is the method→code boundary. Most "漂亮方案到代码阶段才崩" issues happen because G2 was treated as soft.
data-auditor-cleaner ran; planning/symbol_table.md and planning/model_assumptions.md exist.methods/Qx/qx_method_candidates.md exists with 2-4 candidates.methods/Qx/poc/ AND a small-scale feasibility result (a number, a runtime, or a "fails on this data" verdict). A candidate without a PoC counts as "not yet validated".method-selector to add the missing PoC. If PoC feasibility fails for a candidate, mark it [REJECTED], move the PoC script to workspace/archived/, and route back to method-selector for an alternative.PoC proves a method is feasible; it does not prove it is the right choice. "Which method, and why, over the alternatives" is the single most graded modeling judgment — the AI must not make it. This is the pilot of the Human Decision Artifact Convention (see CLAUDE.md). It is a two-layer gate: the mechanical layer is G2 (above); this is its human layer.
[CANDIDATE — PoC PASS], no [CHOSEN] yet; PoC failures already archived.methods/Qx/decisions/method-selector_modeler_decision.md exists with status: DECIDED and decided_by: human.choice names a real [CANDIDATE] id from the pool.rejected_alternatives[*].reason and the ## Modeler's rationale body are non-empty, over the char floor, and contain no sentinel (<<<, TODO, 待补充, ..., empty).ai_suggestion (normalized-whitespace equality / tiny edit distance; fuzzy similarity is a ledger WARN, not a gate FAIL — see CLAUDE.md).evidence_refs (a number, a candidate id, a symbol).code_generation_allowed_Qx = false. Route back to the modeler (NOT to a skill) with the exact missing/under-floor field. The orchestrator must never set this gate's pass itself, never auto-fill the decision artifact, and never infer the choice from method-selector's ai_suggestion.code_generation_allowed_Qx = G2_mechanical_pass ∧ G2.5_human_pass. model-code-analyzer and the code generators stay blocked until both are true. While blocked, the AI MAY run non-judgment prep (data cleaning, staging) — it just cannot generate the model code.code/Qx/ (Python) or code/matlab/Qx/ (MATLAB) has scripts; experiments ran.code/Qx/reviews/qx_python_review.md or code/matlab/Qx/reviews/qx_matlab_review.md with ≥ 5 explicit pass items.results/Qx/experiments/roundN/ with run_summary.json and at least one figures/tables/metrics file.<lang>-code-reviewer. If the review is insufficient (< 5 pass items), route back to the same reviewer with completeness-auditor's gap report attached.The result verdict ([CHOSEN]/[REJECTED], "is the result good", confidence) and the stability verdict are graded modeling judgments. Freezing them makes an AI judgment permanently canonical — so the human verdict must land BEFORE the freeze, not after. This is the second human-decision gate (the second ★); its mechanical layer is G3 + the experiment loop above.
results/Qx/experiments/roundN/ reports exist with per-method evidence; experiment-report verdict tags are [PENDING-MODELER] (the AI may annotate [AI-SUGGESTED], visibly non-binding).methods/Qx/decisions/result-report-generator_modeler_decision.md is DECIDED (decision_id: qx_result_verdict): per-method choice ∈ {CHOSEN,BACKUP,REJECTED} + rationale tied to a criterion; round_decision ∈ {proceed,iterate,return}; confidence per top-line claim with a rationale that cites a specific computed number.methods/Qx/decisions/robustness-checker_modeler_decision.md is DECIDED (decision_id: qx_stability_verdict): stability confidence + rationale citing a number from the robustness report.methods/Qx/decisions/final-method-explainer_modeler_decision.md is DECIDED (decision_id: qx_method_explanation): per-assumption necessity ∈ {necessary,simplifying}; the why-this-method narrative is transcribed from the decision log, not re-authored.ai_suggestion + evidence-citation).freeze_allowed_Qx = false; solution-package-builder refuses to emit frozen_numbers.json. [REJECTED] archival fires only for human-tagged rejections, never an AI label. Route back to the modeler (not a skill) with the missing/under-floor field. The orchestrator must never fill these artifacts or infer a verdict from an ai_suggestion.freeze_allowed_Qx = G3_mechanical_pass ∧ G4.5_human_pass. The freeze (G4 below) cannot fire until both are true.This is the results→paper boundary. Most "论文里数字与最新 results 错位" issues happen because G4 was treated as soft. G4 now requires G4.5 to have passed (the human verdicts must exist before the freeze) plus the package sign-off.
freeze_allowed_Qx = true); results/Qx/reports/qx_final_result_analysis.md exists.methods/Qx/decisions/solution-package-builder_modeler_decision.md is DECIDED (decision_id: qx_package_signoff): per-flagged-claim approve ∈ {keep,downgrade,drop} + package confidence confirmed/overridden by the human.results/Qx/reports/frozen_numbers.json exists with a frozen_at timestamp.frozen_numbers.json is newer than the last modification time of every code/Qx/ file it references (no stale freeze).results/Qx/reports/qx_solution_package_for_writer.md exists; every numerical claim in it is sourced from frozen_numbers.json; every "why we chose X" sentence traces to a decision_id in methods/Qx/qx_decision_log.md.frozen_numbers.json — route back to the modeler for sign-off. After freeze, if consistency-auditor later detects drift, route to the 解冻 → 修改 → 重冻结 three-step:
solution-package-builder to re-freeze. Do not edit frozen_numbers.json by hand.paper/sections/qx.tex exists.math-figure-generator's render-check.[MODELER INPUT NEEDED] sentinel has been replaced; a surviving sentinel means that dimension does NOT count toward the ≥3 floor. The three paper seeds (key_result_claim, contribution_claim, why_this_method) are filled (no surviving sentinel), and why_this_method carries a <!-- from Qx-D0n --> provenance marker tracing to the decision log. Every Type 3 figure's core_claim is human-confirmed (no surviving sentinel).paper-section-writer. Surviving sentinel in physical-meaning or a paper seed → route back to the modeler. Figures failing render-check or with an unconfirmed core_claim → math-figure-generator (render) / figure-table-planner (claim).This is the independent-audit gate. No single skill's "完成" claim can bypass it.
paper/audits/cross_media_consistency_audit.md — verdict PASSED.paper/audits/completeness_audit.md — verdict PASSED.paper/qa_report.md — verdict PASSED.final_assembly_allowed=true on partial audit. The three auditors are orthogonal — passing one does not imply the others.G1 → G2 → G2.5★ → G3 → [experiments] → G4.5★ → G4 → G5 → G6 → final assembly
(human) (human) ↑
consistency-auditor ┐
completeness-auditor├─ all must PASS
quality-assurance-auditor ┘
★ = human-decision gate. Two of them sit at the two load-bearing boundaries: G2.5 (method→code) blocks code_generation_allowed_Qx until the modeler commits the method choice; G4.5 (experiments→freeze) blocks freeze_allowed_Qx until the modeler renders the result + stability verdicts — so the freeze never fossilizes an AI judgment. The mechanical gates (G1–G6) stay AI-owned; each human gate adds a separate file-existence-and-content check, enforced the same way as ≥5-pass-item checks.
The orchestrator never sets a human-gate pass itself. It never fills a decision artifact, never infers a human verdict from an AI suggestion, and treats a missing/PENDING/under-floor decision artifact exactly like a missing mechanical artifact: the downstream *_allowed flag stays false.
A failure at any gate marks all downstream stages DIRTY. Re-passing a gate after repair requires re-running the gate's pass_criteria check from scratch, not trusting cached "✅" marks. After a human-gate FAIL, recovery is: the modeler edits the decision artifact → status flips to DECIDED → next orchestrator run re-checks the file → on pass, the human sub-flag flips true; downstream DIRTY clears only after consistency-auditor re-runs incrementally (Change-propagation rule P1).
Each subquestion Qx moves through these states in order. The state is determined by which artifacts exist.
[01] Method Candidates Drafted
→ methods/Qx/qx_method_candidates.md exists
↓
[02] Code Implementation In Progress
→ code/Qx/ has scripts, experiment not yet run or running
↓
[03] Experiment Report Ready (Round N)
→ results/Qx/experiments/roundN/qx_experiment_report_roundN.md exists
↓ (may loop back to [01] or [02] if method revision needed)
[04] Needs Method Revision
→ experiment report indicates issues; loop back to modeler
↓ (after revision, return to [02] or [03])
[05] Final Method Selected
→ modeler has confirmed final method choice
↓
[06] Final Method Explained
→ methods/Qx/qx_final_method_explanation.md exists
↓
[07] Final Result Analyzed
→ results/Qx/reports/qx_final_result_analysis.md exists
↓
[08] Solution Package Built
→ results/Qx/reports/qx_solution_package_for_writer.md exists
↓
[09] Ready for Writer
→ all [06], [07], [08] exist; writer can start
↓
[10] Writer Draft Ready
→ paper/sections/qx.tex or equivalent exists
↓
[11] Reviewed by Modeler
→ modeler confirms paper's model description matches final method
↓
[12] Reviewed by Programmer
→ programmer confirms paper's results and figures match outputs
↓
[13] Finalized
→ all reviews passed; ready for final assembly
The orchestrator determines which state each subquestion is in by checking which files exist and reading the latest experiment report verdicts.
Maintain this dashboard at planning/progress_dashboard.md.
The dashboard MUST be a Markdown table tracking all subquestions:
# Project Progress Dashboard
> Last updated: [timestamp]
## Overall Status
| Stage | Q1 | Q2 | Q3 | Q4 |
|-------|----|----|----|-----|
| Method Candidates Drafted | ✅ | ✅ | ✅ | ❌ |
| Experiment Report Ready | ✅ (R2) | ✅ (R1) | ❌ | ❌ |
| Final Method Selected | ✅ | ❌ | ❌ | ❌ |
| Final Method Explained | ✅ | ❌ | ❌ | ❌ |
| Final Result Analyzed | ✅ | ❌ | ❌ | ❌ |
| Solution Package Built | ⏳ | ❌ | ❌ | ❌ |
| Ready for Writer | ⏳ | ❌ | ❌ | ❌ |
| Writer Draft Ready | ❌ | ❌ | ❌ | ❌ |
| Reviewed by Modeler | ❌ | ❌ | ❌ | ❌ |
| Reviewed by Programmer | ❌ | ❌ | ❌ | ❌ |
| **Finalized** | ❌ | ❌ | ❌ | ❌ |
## Current Status Summary
| Subquestion | Status | Blocked By | Next Action |
|-------------|--------|------------|-------------|
| Q1 | Solution Package in Progress | — | Run solution-package-builder |
| Q2 | Needs Method Revision | M2 constraint violation in R1 | Modeler to fix constraints, then re-run |
| Q3 | Not Started | Waiting on Q1 results (input dependency) | — |
| Q4 | Not Started | Global planning incomplete | Run problem-parser and classifier first |
## Blockers
| Blocker | Affects | Severity | Resolution |
|---------|---------|----------|------------|
| Q2 M2 infeasible | Q2 finalization | High | Modeler revises constraint formulation |
| Q4 not parsed | Q4 start | High | Run problem-parser for all subquestions |
## Global Artifact Status
| Artifact | Status | Path |
|----------|--------|------|
| Problem Parse | ✅ | planning/parse/ |
| Problem Classification | ✅ | planning/classification/ |
| Global Symbol Table | ✅ | planning/symbol_table.md |
| Model Assumptions (Global) | ⏳ | planning/model_assumptions.md |
| Question Dependency Map | ✅ | planning/question_dependency.md |
| Related Paper Analysis | ✅ | workspace/papers/related_paper_analysis.md |
| Data Report | ✅ | workspace/data/data_report.md |
## Three Critical Rules Check
| Rule | Q1 | Q2 | Q3 | Q4 |
|------|----|----|----|-----|
| 1: Final method explanation exists before paper writing | ✅ | ❌ | ❌ | ❌ |
| 2: Final result analysis exists before writer handoff | ✅ | ❌ | ❌ | ❌ |
| 3: Solution package exists as writer's primary source | ⏳ | ❌ | ❌ | ❌ |
## Recommended Next Skill
- **Skill**: `solution-package-builder` for Q1
- **Reason**: Q1 has both final method explanation and final result analysis; solution package is the next prerequisite for writer handoff.
- **Runners-up** (if Q1 is already assigned):
- `method-selector` for Q2 revision (after modeler fixes M2)
- `problem-parser` for Q4
The full global workflow now includes per-subquestion iteration loops:
【0】全题启动阶段 (Global Setup)
problem-parser → problem-classifier → related-paper-analyzer
→ global symbol table → global model assumptions → question dependency map
↓
【1】候选方法池阶段 (Per-Question Start)
method-selector → methods/Qx/qx_method_candidates.md
↓
【2】编程实验阶段 (Per-Question, Multi-Round)
model-code-analyzer → python/matlab-model-code-generator → code-reviewer
→ results/Qx/experiments/roundN/
↓
【3】实验报告阶段 (Per-Question, Per-Round)
result-report-generator → results/Qx/experiments/roundN/qx_experiment_report_roundN.md
↓
【4】方法迭代循环 (Per-Question Loop)
← modeler reviews report → revises methods → back to 【2】
OR → proceed to 【5】
↓
【5】最终方法锁定
final-method-explainer → methods/Qx/qx_final_method_explanation.md
↓
【6】最终结果分析
result-report-generator (final mode) → results/Qx/reports/qx_final_result_analysis.md
↓
【7】稳健性分析
robustness-checker → robustness/Qx/qx_robustness_report.md
↓
【8】论文材料包
solution-package-builder → results/Qx/reports/qx_solution_package_for_writer.md
↓
【9】图表规划
figure-table-planner → paper/figures/ planning
↓
【10】论文写作 (Per-Question)
paper-section-writer → paper/sections/qx.tex
↓
【11】建模手审核 → 【12】编程手审核
↓
【13】独立审计层 (NEW — three orthogonal audits, all must PASS to advance)
├─ consistency-auditor → paper/audits/cross_media_consistency_audit.md
├─ completeness-auditor → paper/audits/completeness_audit.md
└─ quality-assurance-auditor → paper/qa_report.md
↓ (only if all three PASS — Gate G6)
【14】终稿组装
Final assembly of main.tex + sections + figures → paper/final.pdf
If any of the three audits FAIL:
→ route to the failed auditor's recommended repair skill
→ re-run the failed audit after repair
→ never advance to 【14】 on partial audit
These rules are the orchestrator's primary enforcement responsibility:
paper-section-writer MUST NOT write final paper sections for Qx based only on qx_method_candidates.md or early method plans. The orchestrator checks that methods/Qx/qx_final_method_explanation.md exists before routing Qx to the paper writer.
If a user asks to write Qx paper but this file is missing, the orchestrator blocks and routes to final-method-explainer instead.
Program execution outputs alone are NOT sufficient for writer handoff. The orchestrator checks that results/Qx/reports/qx_final_result_analysis.md exists before marking Qx as Ready for Writer.
If a user says "Qx is done, write the paper" but only raw results exist (no analysis report), the orchestrator blocks and routes to result-report-generator instead.
The paper writer's primary source for Qx is results/Qx/reports/qx_solution_package_for_writer.md. The orchestrator checks that this file exists before routing Qx to the paper writer.
If it is missing, the orchestrator blocks and routes to solution-package-builder.
The orchestrator should be able to answer these questions precisely:
Produce a workflow state report containing:
current_global_stageprogress_dashboard (link to or contents of planning/progress_dashboard.md)per_question_status (state machine state for each Qx)completed_artifactsmissing_artifactsblocked_items (global and per-question)workflow_gates (global and per-question)three_critical_rules_checknext_skillnext_actionshandoff_contextrunners_up (alternative next skills if the primary is already in progress)Prefer this JSON-compatible structure:
{
"current_global_stage": "per_question_iteration",
"progress_dashboard_path": "planning/progress_dashboard.md",
"per_question_status": {
"Q1": {
"state": "08_solution_package_built",
"state_label": "Solution Package Built",
"ready_for_writer": false,
"blocked": false,
"blocked_reason": null,
"missing_for_next_state": [
"paper/sections/q1.tex"
]
},
"Q2": {
"state": "04_needs_method_revision",
"state_label": "Needs Method Revision",
"ready_for_writer": false,
"blocked": true,
"blocked_reason": "Round 1 experiment shows M2 constraint violation. Modeler must revise constraint formulation.",
"missing_for_next_state": [
"Revised method from modeler"
]
},
"Q4": {
"state": "00_not_started",
"state_label": "Not Started",
"ready_for_writer": false,
"blocked": false,
"blocked_reason": null,
"missing_for_next_state": [
"Problem parse (all subquestions)",
"Problem classification (all subquestions)",
"methods/Q4/q4_method_candidates.md"
]
}
},
"global_completed_artifacts": {
"problem_parse": true,
"problem_classification": true,
"related_paper_analysis": true,
"global_symbol_table": true,
"global_model_assumptions": false,
"question_dependency_map": true,
"data_report": true,
"cleaned_data": true
},
"per_question_completed_artifacts": {
"Q1": {
"method_candidates": true,
"method_iteration_log": true,
"experiment_report_round1": true,
"experiment_report_round2": true,
"final_method_explanation": true,
"final_result_analysis": true,
"solution_package": true,
"robustness_report": true,
"paper_draft": false,
"figure_table_plan": true
}
},
"blocked_items": [
{
"scope": "Q2",
"item": "final_method_explanation",
"reason": "Modeler has not confirmed final method. Round 1 experiment showed M2 constraint violation.",
"resolution": "Modeler revises constraint formulation, then re-run code for M2."
}
],
"three_critical_rules_check": {
"Q1": {
"rule1_method_explanation_exists": true,
"rule2_result_analysis_exists": true,
"rule3_solution_package_exists": true,
"ready_for_writer": true
},
"Q2": {
"rule1_method_explanation_exists": false,
"rule2_result_analysis_exists": false,
"rule3_solution_package_exists": false,
"ready_for_writer": false
}
},
"workflow_gates": {
"global": {
"method_selection_allowed": true,
"code_generation_allowed_Q1": true,
"code_generation_allowed_Q2": true,
"paper_writing_allowed_Q1": true,
"paper_writing_allowed_Q2": false,
"final_assembly_allowed": false
}
},
"next_skill": "paper-section-writer",
"next_actions": [
"Write paper/sections/q1.tex using results/Q1/reports/q1_solution_package_for_writer.md as primary source.",
"Reference figures from results/Q1/experiments/final/figures/."
],
"runners_up": [
{
"skill": "workflow-orchestrator",
"action": "Return Q2 to modeler for constraint revision."
}
],
"handoff_context": {
"reason": "Q1 is Ready for Writer (all three critical rules satisfied).",
"required_inputs_for_next_skill": [
"results/Q1/reports/q1_solution_package_for_writer.md",
"results/Q1/experiments/final/figures/",
"robustness/Q1/q1_robustness_report.md"
]
}
}
If a JSON block is too rigid for the situation, use a concise Markdown report with the same fields.
method-selector.*_modeler_decision.md artifact; never infer a human's verdict from the AI's ai_suggestion. A PENDING or under-floor decision artifact (or a surviving B-layer sentinel) blocks the downstream *_allowed flag exactly like a missing mechanical artifact.decision-prompt-builder first — it emits the 2-3 questions only the human can answer, before the judgment skill shows its suggestion. Read mode from planning/session_config.json (default learning) and pass it in the handoff context: in learning mode the judgment skill must withhold its ai_suggestion until the human has answered (anti-anchoring); in speed mode it may show the suggestion alongside. The mode changes scaffolding only — it never relaxes a floor or a gate.Before handing off, verify:
next_skill matches the earliest incomplete required stage for the highest-priority subquestion.Stop and report a blocker if:
qx_final_method_explanation.md is missing (Rule 1).qx_final_result_analysis.md is missing (Rule 2).qx_solution_package_for_writer.md is missing and the package cannot be assembled from available artifacts (Rule 3).This skill must stop instead of guessing when:
When stopping, output:
Typical handoff order (global, then per-question):
problem-parserproblem-classifierrelated-paper-analyzermethod-selector (per Qx — can run in parallel for independent subquestions)model-code-analyzerpython-model-code-generator or matlab-model-code-generatorcode-reviewerresult-report-generator (round N experiment report)result-report-generator (final result analysis, when method is locked)final-method-explainerrobustness-checkerfigure-table-plannersolution-package-builderpaper-section-writerreference-manager (verify citations are real)paper-polisher (style / hedging / formula consistency within paper)consistency-auditor (cross-media numbers / files / symbols / parameters)completeness-auditor (every claimed completion has a substantive artifact on disk)quality-assurance-auditor (workflow completeness + three critical rules + anti-fabrication + paper quality)workflow-orchestrator for final assembly (only when Gate G6 passes)If the workflow is complete and all three audits pass, hand off to final assembly or user review. A single auditor "✅" is NOT sufficient — the three are orthogonal and must converge.
Input state:
Output:
{
"current_global_stage": "global_setup",
"next_skill": "problem-parser",
"next_actions": [
"Extract goals, objects, constraints, data, outputs, and subquestions.",
"Save parsed result under planning/parse/."
]
}
Input state:
Output:
{
"current_global_stage": "global_setup",
"blocked_items": [
"Code generation is blocked because no validated method plan exists."
],
"next_skill": "problem-classifier",
"next_actions": [
"Classify each subquestion before literature analysis and method selection.",
"Then hand off to related-paper-analyzer, then method-selector."
]
}
Input state:
methods/Q1/q1_final_method_explanation.md exists.results/Q1/reports/q1_final_result_analysis.md exists.results/Q1/reports/q1_solution_package_for_writer.md exists.Output:
{
"per_question_status": {
"Q1": {
"state": "09_ready_for_writer",
"state_label": "Ready for Writer",
"ready_for_writer": true
}
},
"three_critical_rules_check": {
"Q1": {
"rule1_method_explanation_exists": true,
"rule2_result_analysis_exists": true,
"rule3_solution_package_exists": true,
"ready_for_writer": true
}
},
"next_skill": "paper-section-writer",
"next_actions": [
"Write paper/sections/q1.tex using results/Q1/reports/q1_solution_package_for_writer.md as primary source."
],
"handoff_context": {
"reason": "Q1 satisfies all three critical rules. Writer can proceed with the solution package.",
"required_inputs_for_next_skill": [
"results/Q1/reports/q1_solution_package_for_writer.md"
]
}
}
Input state:
Output:
{
"blocked_items": [
"CRITICAL RULE 1 VIOLATION: Q2 paper writing is blocked because methods/Q2/q2_final_method_explanation.md does not exist. The experiment report indicates M2 is infeasible — the modeler must revise the method before a final method can be explained."
],
"per_question_status": {
"Q2": {
"state": "04_needs_method_revision",
"state_label": "Needs Method Revision",
"ready_for_writer": false,
"blocked_reason": "M2 constraint violation in round 1. Modeler must fix constraint formulation or select a different candidate method."
}
},
"next_skill": "method-selector",
"next_actions": [
"Modeler: revise Q2 constraint formulation for M2, or select a different candidate method from the pool.",
"After revision: regenerate code and run round 2 experiments.",
"Do NOT start paper writing until final method is confirmed and explained."
]
}
Input state:
Output:
{
"query_response": "Q1 is ready for the paper writer. Q2, Q3, Q4 are not ready.",
"ready_for_writer": ["Q1"],
"almost_ready": [],
"not_ready": {
"Q2": "Missing final result analysis (Rule 2). Programmer must run final experiments and produce results/Q2/reports/q2_final_result_analysis.md.",
"Q3": "Only at candidate method stage. Need experiments, method selection, method explanation, result analysis, and solution package.",
"Q4": "Not started — needs problem parsing and classification first."
},
"next_skill": "paper-section-writer",
"next_actions": [
"Write paper/sections/q1.tex for Q1 (only subquestion Ready for Writer).",
"Meanwhile: Q2 programmer should produce final result analysis."
]
}
Input state:
Output:
{
"current_global_stage": "quality_assurance",
"blocked_items": [
"Final assembly is blocked because QA has not passed."
],
"next_skill": "quality-assurance-auditor",
"next_actions": [
"Audit problem coverage, model-result consistency, figure references, robustness checks, unsupported claims, and workflow completeness."
]
}
Input state:
Output:
planning/progress_dashboard.md with:
paper-section-writer for Q1.