Skip to content

Lucasuiii/modeling-workbench / .agents/skills/cumcm-workflow

cumcm-workflow

Verified

Build or resume mathematical-modeling competition work, including CUMCM, MCM/ICM, graduate and regional contests, data challenges, and open-topic statistical modeling. Guide problem framing, modeling, computation, validation, Chinese or English LaTeX writing, and reviewed PDF/source delivery using current official requirements. Not for ordinary paper polishing.

FileKindSize
SKILL.mdskill md9.0 KB
agents/openai.yamlconfig427 B
assets/latex-template/generic-ctex/macros.texother859 B
assets/latex-template/generic-ctex/main.tex.tmplother2.5 KB
assets/latex-template/generic-ctex/metadata.tex.tmplother272 B
assets/latex-template/generic-ctex/planned-section.tex.tmplother1.0 KB
assets/latex-template/generic-ctex/references.bibother155 B
assets/latex-template/generic-ctex/sections/00_abstract.texother935 B
assets/latex-template/generic-ctex/sections/98_references.texother221 B
assets/latex-template/generic-ctex/sections/99_appendix.texother264 B
assets/latex-template/generic-ctex/template.jsonconfig304 B
assets/latex-template/generic-en/macros.texother868 B
assets/latex-template/generic-en/main.tex.tmplother2.2 KB
assets/latex-template/generic-en/metadata.tex.tmplother278 B
assets/latex-template/generic-en/planned-section.tex.tmplother1013 B
assets/latex-template/generic-en/references.bibother155 B
assets/latex-template/generic-en/sections/00_abstract.texother454 B
assets/latex-template/generic-en/sections/98_references.texother201 B
assets/latex-template/generic-en/sections/99_appendix.texother240 B
assets/latex-template/generic-en/template.jsonconfig249 B
assets/latex-template/huawei-ctex/main.tex.tmplother3.3 KB
assets/latex-template/huawei-ctex/template.jsonconfig276 B
assets/plot-style/cumcm.mplstyleother953 B
references/01-intake.mdmarkdown3.9 KB
references/02-problem-analysis.mdmarkdown2.8 KB
references/03-model-design.mdmarkdown7.6 KB
references/04-computation.mdmarkdown13.4 KB
references/05-validation.mdmarkdown5.9 KB
references/06-paper-writing.mdmarkdown14.3 KB
references/07-compile-delivery.mdmarkdown6.1 KB
references/artifact-contracts.mdmarkdown3.1 KB
references/competition-adaptation.mdmarkdown6.8 KB
references/competition-writing.mdmarkdown5.6 KB
references/diagnostics.mdmarkdown4.5 KB
references/evidence-rules.mdmarkdown1.6 KB
references/handoffs.mdmarkdown3.5 KB
references/huawei-delivery.mdmarkdown10.1 KB
references/latex-template.mdmarkdown6.2 KB
references/mechanism-validation.mdmarkdown11.6 KB
references/open-topic-research.mdmarkdown4.9 KB
references/task-driven-modeling.mdmarkdown7.2 KB
schemas/claim-ledger.schema.jsonconfig5.5 KB
schemas/common.schema.jsonconfig2.5 KB
schemas/compile-receipt.schema.jsonconfig3.7 KB
schemas/cross-question-ledger.schema.jsonconfig1.3 KB
schemas/delivery-manifest.schema.jsonconfig7.9 KB
schemas/figure-manifest.schema.jsonconfig1.9 KB
schemas/handoff.schema.jsonconfig2.1 KB
schemas/independent-review-package.schema.jsonconfig3.4 KB
schemas/independent-review-result.schema.jsonconfig4.0 KB
schemas/latex-template-manifest.schema.jsonconfig2.4 KB
schemas/model-contract.schema.jsonconfig5.0 KB
schemas/paper-plan.schema.jsonconfig3.3 KB
schemas/paper-quality-report.schema.jsonconfig5.7 KB
schemas/paper-revision-log.schema.jsonconfig2.2 KB
schemas/paper-visible-text-report.schema.jsonconfig1.6 KB
schemas/problem-facts.schema.jsonconfig1.7 KB
schemas/results-index.schema.jsonconfig1.4 KB
schemas/run-manifest.schema.jsonconfig7.1 KB
schemas/source-manifest.schema.jsonconfig1.9 KB
schemas/task-capabilities.schema.jsonconfig3.9 KB
schemas/workflow-state.schema.jsonconfig2.4 KB
scripts/backend_selection.pyscript6.3 KB
scripts/build_handoff.pyscript20.4 KB
scripts/build_independent_review_package.pyscript14.9 KB
scripts/canonical_evidence.pyscript8.4 KB
scripts/compile_sources.pyscript2.4 KB
scripts/cumcm_check.pyscript2.9 KB
scripts/delivery_archives.pyscript7.0 KB
scripts/doctor.pyscript7.5 KB
scripts/index_result.pyscript10.9 KB
scripts/init_latex_paper.pyscript17.2 KB
scripts/init_project.pyscript11.1 KB
scripts/inventory_artifacts.pyscript4.1 KB
scripts/json_pointer.pyscript1.0 KB
scripts/official_materials.pyscript3.0 KB
scripts/paper_visible_text_check.pyscript5.4 KB
scripts/plan_redo.pyscript18.8 KB
scripts/project_status.pyscript5.8 KB
scripts/provenance.pyscript2.2 KB
scripts/record_compile.pyscript13.2 KB
scripts/record_decision.pyscript12.0 KB
scripts/record_run.pyscript28.1 KB
scripts/refresh_evidence.pyscript4.7 KB
scripts/set_mode.pyscript2.0 KB
scripts/submission_check.pyscript10.6 KB
scripts/workflow_checks.pyscript146.0 KB

scripts/project_status.py

View on GitHub
#!/usr/bin/env python3
"""Summarize current-stage evidence read-only; never advance or approve a stage."""
from __future__ import annotations

import argparse
import json
from pathlib import Path
import sys

# Importing the checker must not create __pycache__ in the tools checkout.
sys.dont_write_bytecode = True


def inspect_project(root: Path) -> dict:
    from workflow_checks import CONTRACT_PATHS, STAGES, check_project, check_schema, require_human_checkpoint

    root = root.resolve()
    state = json.loads((root / CONTRACT_PATHS["state"]).read_text(encoding="utf-8"))
    invalid = check_schema(state, "state", "intake", CONTRACT_PATHS["state"])
    if invalid:
        raise ValueError("invalid/unsupported state: " + "; ".join(f.message for f in invalid))
    stage = state["current_stage"]
    # preflight retains gate-only findings without pretending they prohibit exploration.
    findings, summary = check_project(root, stage, "preflight")
    technical = [f.to_dict() for f in findings if f.severity == "error" and not f.gate_only]
    review = [f.to_dict() for f in findings if f.severity == "error" and f.gate_only]
    warnings = [f.to_dict() for f in findings if f.severity == "warning"]
    checkpoints = []
    for checkpoint, dependent in (("model-design", "official computation"), ("validation", "paper writing"), ("delivery", "final delivery")):
        if STAGES.index(checkpoint) > STAGES.index(stage):
            continue
        try:
            require_human_checkpoint(root, checkpoint)
            checkpoints.append({"stage": checkpoint, "dependent_action": dependent, "status": "accepted_current", "reason": "existing action boundary passed"})
        except ValueError as exc:
            checkpoints.append({"stage": checkpoint, "dependent_action": dependent, "status": "not_ready", "reason": str(exc)})
    blocked_checkpoints = [c for c in checkpoints if c["status"] == "not_ready"]
    if technical:
        action = "先修复列出的证据或结构错误,再重新检查;根据规则位置定位受影响材料。"
    elif blocked_checkpoints:
        action = "先按关卡原因核对候选方案、待审材料及确认记录;没有当前有效确认时,展示材料并等待用户明确答复,依赖该确认的工作不能开始。"
    elif review:
        action = "准备并展示当前待审材料,取得明确确认后记录决定;依赖该确认的工作必须等待,其他探索按阶段指南继续。"
    elif warnings:
        action = "按当前阶段指南继续工作并处理相关警告;preflight 可用不代表阶段已完成。"
    else:
        action = "按当前阶段指南核对剩余工作;确实完成后使用现有记录命令推进,不由状态工具自动推进。"
    return {
        "project": str(root), "current_stage": stage,
        "declared_stage_status": state["stages"][stage],
        "summary": summary, "checkpoints": checkpoints, "technical_errors": technical, "pending_review": review,
        "warnings": warnings, "findings": [f.to_dict() for f in findings],
        "next_action": action,
        "guide": str(Path(__file__).resolve().parents[1] / "references" / {
            "intake": "01-intake.md", "problem-analysis": "02-problem-analysis.md",
            "model-design": "03-model-design.md", "computation": "04-computation.md",
            "validation": "05-validation.md", "paper": "06-paper-writing.md",
            "delivery": "07-compile-delivery.md",
        }[stage]),
        "scope": "Checks through the recorded current stage only; downstream artifacts are not certified. No completion or approval is inferred from file presence.",
    }


def main() -> int:
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--project", type=Path, required=True)
    parser.add_argument("--json", action="store_true")
    args = parser.parse_args()
    # Pipe encodings on Windows may be cp1252 even when project text is UTF-8.
    # This CLI writes UTF-8 JSON and Chinese guidance on every platform.
    if hasattr(sys.stdout, "reconfigure"):
        sys.stdout.reconfigure(encoding="utf-8")
    try:
        report = inspect_project(args.project)
    except (OSError, ValueError, TypeError, KeyError, AttributeError, ImportError) as exc:
        error = {"status": "unavailable", "error": str(exc),
                 "next_action": "检查项目路径、状态/契约文件和工作流依赖;不要重新初始化或推断已完成。"}
        print(json.dumps(error, ensure_ascii=False, indent=2) if args.json else f"无法读取项目状态:{exc}\n{error['next_action']}")
        return 2
    if args.json:
        print(json.dumps(report, ensure_ascii=False, indent=2))
    else:
        print(f"当前阶段:{report['current_stage']}(记录状态:{report['declared_stage_status']})")
        print(f"实时检查:{report['summary']['gate_status']};检查范围截至当前阶段")
        for key, label in (("technical_errors", "需修复"), ("pending_review", "待确认"), ("warnings", "警告")):
            print(f"{label}:{len(report[key])} 项")
            for f in report[key][:5]:
                print(f"  {f['rule_id']} {f['path']}{f['pointer']}: {f['message']}")
                if f["remediation"]:
                    print(f"    {f['remediation']}")
            if len(report[key]) > 5:
                print("  更多详情见 --json 输出。")
        for checkpoint in report["checkpoints"]:
            print(f"行动关卡 {checkpoint['stage']}: {checkpoint['status']} — {checkpoint['reason']}")
        print(f"下一步:{report['next_action']}\n阶段指南:{report['guide']}")
        print(report["summary"]["evidence_boundary"])
    # Pending human review is not an execution failure. Dependent actions keep their own gates.
    return 1 if report["technical_errors"] else 0


if __name__ == "__main__":
    raise SystemExit(main())
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall