Global Workflow Collaboration Constraints (Long-Conversation Drift Prevention)
- This skill must not be used as an isolated entry point. When the user requests a complete paper, Word generation, workflow continuation, or the stage is uncertain, first return to
paper-workflow-orchestratorto determine the current S0-S8 stage. - Before starting or continuing the formal tasks of this skill, you must run:
python .claude/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --skill problem-doc-model-selector - If the output is
[WORKFLOW FAIL]or the report showsstatus != "PASS", stop this skill and backfill the prerequisite stages according to the failed items inpaper_output/qa/workflow_guard_report.json; do not continue from memory. - This skill only writes the
paper_output/artifacts within its own contract scope; after completion, you must return topaper-workflow-orchestratorto determine the next step, and usecontext-memory-keeperto record completed artifacts, blockers, and the next step. - In a long conversation, if the context grows long, the stage is uncertain, or the user invokes skills separately, first run:
then readpython .claude/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --statuspaper_output/qa/workflow_guard_report.json、paper_output/preflight_report.json、paper_output/input_manifest.json、paper_output/results/run_manifest.jsonand this skill's upstream JSON contract, and continue according to therecommended_skillandnext_actionin the report. - Before continuing the workflow, you must treat
paper_output/context/workflow_memory.jsonas a long-term breakpoint record; if itscurrent_step、next_step、recommended_skillandworkflow_guard.py --statusare inconsistent, the guard report takes precedence. - After completing this skill's artifacts each time, first return to
paper-workflow-orchestratoror runworkflow_guard.py --status, then update workflow memory:
after updating, readpython .claude/skills/context-memory-keeper/scripts/update_workflow_memory.pypaper_output/context/workflow_memory.json/.mdto confirm that the next step and recommended skill have been recorded.
Execution Contract
- Upstream input:
problem_files/the competition problem PDF/Word/TXT and attachment data in . - Required output:
paper_output/step1/problem_analysis.json, as well asA_题意对齐.md、B_论文大纲.md、C_评分点对齐表.md、D_模型路线.json。 - Downstream handoff:
modeling-paper-rubric-and-model-selectorreadsproblem_analysis.jsonto generate the model route; the complete workflow is chained together bypaper-workflow-orchestrator. - Recommended next step: after completing the problem analysis, proceed to
modeling-paper-rubric-and-model-selector; if the user's goal is a complete paper, return topaper-workflow-orchestratorto determine the subsequent stages. - Failure fallback: if
problem_files/is empty, stop and prompt for the competition problem to be provided; if some documents cannot be parsed, retain the parseable content and record the missing field profile in the output.
Goal
- Input the competition problem PDF/Word document or problem statement text, automatically extract the task type, data conditions, and constraints of "each question", and output a problem-specific model selection and validation route.
- Generate a scoring-friendly deliverable: a one-page problem alignment, paper outline, scoring point alignment table, and model route (baseline/improvement/validation/risk).
Stage Transitions
- After parsing is complete, do not stop at a vague "are you satisfied" question; instead, explain the generated problem contract and provide the next recommended stage.
- If the user's intent is a complete paper, after outputting A/B/C/D, return to
paper-workflow-orchestrator, and the main entry point will decide whether to continue generating the model route, data plan, QA, and main text. - Refuse to Cut Corners: you must output all four complete parts A/B/C/D, and must not omit any.
When to Apply
- When the user provides a competition problem PDF/Word or problem statement text and needs to quickly determine the model/method that should be used for each question and formulate an experimental validation plan.
- When you are unsure about the interpretation of the problem statement, uncertain about the modeling approach, or need suggestions for aligning the paper structure with the scoring points.
Input
- Problem statement document path or full problem statement text (supports PDF, DOCX, TXT).
- Optional: attachment data file paths, highlights you want to emphasize, or limitations.
Output
- A One-page problem alignment: for each question, provide input/output, evaluation metrics, key constraints, and verifiable methods.
- B Paper outline: abstract, problem restatement, assumptions, notation, data description, model, solution, results, validation, conclusion, limitations, references.
- C Scoring point alignment table: scoring point → evidence form (figures/tables/experiments/validation) → paper location.
- D Model selection and approach: for each question, task type, minimum viable baseline, improvement path, validation plan, risks, and alternatives.
- E Data requirement configuration (optional): if the problem is found to require external data (such as population, meteorological, or economic data), automatically generate or update the file in the root directory
data_requirements.json, so thatauthoritative-data-harvestercan automatically obtain it. - Machine-readable contract:
paper_output/step1/problem_analysis.json, includingdocuments、data_files、questions、recommended_models、validation_plan、figure_suggestionsand other fields, for the modeling approach, evidence audit, formal writing, and overall orchestrator to continue reading.
Directory conventions (aligned with the project globally)
- Place the problem statement and attachments together in
problem_files/。 - It is recommended to archive the four types of outputs of this skill to
paper_output/step1/(for example,paper_output/step1/A_题意对齐.md, etc.), for reference by subsequent skills. - Also generate
paper_output/step1/D_模型路线.json, used to retain the modeling approach, validation method, and suggested figures for each question.
Script entry point (recommended)
This skill has a built-in structured analysis script:
python .claude/skills/problem-doc-model-selector/scripts/analyze_problem.py
This script will scan problem_files/, read TXT/Markdown/DOCX/PDF problem statement text, and perform lightweight field profiling on CSV/XLSX/XLS attachments. After success, it will write paper_output/step1/problem_analysis.json, and subsequent modeling approaches, evidence gates, and formal outlines will all use it as the upstream contract.
Upstream and downstream connections
- Subsequent work usually starts with:
data-cleaning-and-visualization(data cleaning and visualization). - To continue to the paper draft: return to
paper-workflow-orchestrator。
Constraints (must be followed)
- Memory Interaction (required):
- Before starting, check whether
memoryskill.mdcontains external literature/data indexes (such as references provided by g-sci), and incorporate them into the basis for model selection. - After completing the analysis, you must call
context-memory-keeper, and update the "core task type," "data conditions," and "model selection conclusion" tomemoryskill.md'sShort-term Workbench. This is the key for subsequent paper-generation skills to obtain context.
- Before starting, check whether
- External data check (required):
- If the analysis finds that the problem depends on external public data (such as "collect relevant data" or "insufficient attachment data"), you must generate
data_requirements.jsonand write it to the root directory. - The configuration content should include a clear
url(if known) ormanual_searchprompt, and setactivetotrue。
- If the analysis finds that the problem depends on external public data (such as "collect relevant data" or "insufficient attachment data"), you must generate
- The problem alignment and modeling approach output by this skill must be able to be referenced by subsequent writing positioning; it is recommended to archive them fixedly to
paper_output/step1/。 - If the user's goal is "the final paper is submittable," then after this skill is completed, you must not directly enter the paper-generation stage; you must first ensure the data scope is usable: enter
data-cleaning-and-visualizationor supplementauthoritative-data-harvester。 - If the user does not want to proceed step by step, it is necessary to return to
paper-workflow-orchestratorto execute the complete workflow, avoiding the gap of "parsing completed but no body text generated".
Workflow
- Document Reading
- PDF: prefer PyMuPDF, otherwise pdfplumber; preserve figure and table captions and section numbering.
- Word: python-docx; preserve paragraph and table structure.
- Cleaning: remove headers and footers, merge broken lines, standardize units (cm⁻¹, %, etc.).
- Problem Statement Parsing
- Rule-based extraction of "Problem 1/Problem 2/Problem 3..." and "attachment description/units/key parameters".
- Identify task type: prediction/classification/evaluation/optimization/clustering/simulation/mechanistic modeling.
- Extract constraints and boundaries: incidence angle, hierarchical relationships, unit conventions, feasible region.
- Data Condition Parsing
- Attachment file names and fields: column names, units, sample size, range, missing value ratio.
- Result specifications: requires reflectance, thickness, error, ranking, or resource allocation, etc.
- Model Selection Engine (rules first, combined with prompt-based decision-making)
- Prediction: moving average/exponential smoothing/regression/ARIMA → tree models/LSTM.
- Classification: logistic regression/naive Bayes → random forest/gradient boosting; use cost-sensitive methods for imbalance.
- Evaluation and ranking: normalization + weighted sum → entropy weight/CRITIC/AHP/TOPSIS/VIKOR.
- Optimization and scheduling: linear/integer programming → multi-objective and heuristics (genetic/annealing).
- Clustering: K-means/hierarchical → GMM/DBSCAN (noise and non-convex shapes).
- Mechanistic/simulation: differential/difference/system dynamics; compare with data-driven approaches.
- Physical/engineering modeling: establish equations based on domain knowledge (such as heat conduction, fluid mechanics, circuit analysis, optical propagation), and use least squares or optimization algorithms for parameter inversion and model correction.
- Validation and Robustness
- Metrics: RMSE/MAE/AUC/F1/MAPE/silhouette coefficient/constraint satisfaction rate.
- Cross-validation/rolling backtest/hold-out method; ablation experiments and sensitivity analysis.
- Extreme/boundary scenarios and consistency checks of unit conventions.
Quick Reference for Discrimination Logic
- If "prediction/estimate the future/trend/parameter estimation" appears → prediction category.
- If "classification/whether/risk level/identification" appears → classification category.
- If "comprehensive evaluation/ranking/weight/scoring" appears → evaluation and ranking.
- If "resource allocation/path/site selection/minimum cost/maximum profit" appears → optimization and scheduling.
- If "grouping/profiling/similarity/pattern discovery" appears → clustering.
- If "mechanism/simulation/dynamics/differential equations" appears → mechanistic/simulation.
- If "physical processes/chemical reactions/signal transmission/mechanical structures" appears → physical/engineering modeling.
Output Template
- A Problem Alignment: input, output, metrics, constraints, validation for each question.
- B Outline: list chapters and sections in a scoring-friendly order.
- C Scoring Alignment: mapping table of scoring points and evidence.
- D Model Roadmap: task type/baseline/improvement/validation/risks and alternatives.
Usage Example
- Input: competition problem file path
c:\path\to\赛题.pdfor the full problem statement text. - Behavior: Read the document → extract each question → identify the task type and data conditions → output four categories of results A/B/C/D and the recommended model.
- Automatic suggestions:
- Baseline: Choose the simplest classical model (such as linear regression, K-means, shortest path algorithm).
- Improvement: Higher-order models introduced to address baseline shortcomings (such as nonlinearity, noise, multi-objective) (such as XGBoost, improved genetic algorithms, hybrid models).
- Validation: Metric calculation, residual analysis, cross-validation, sensitivity analysis.
Deviation prevention check
- Each question must provide quantifiable outputs and verifiable metrics.
- Symbols and units are unified, and metric definitions are consistent.
- At least one baseline comparison and improvement evidence (improvement or more reasonable).
- Conclusions and figures correspond question by question, not "doing a lot but not answering the question".
When not to use this skill
- When it is already clear that only a specific algorithm needs to be implemented or a single code snippet needs to be modified (direct implementation is faster).