Skip to content

Detailed Routing Rules (latex-thesis-zh)

The “Routing Rules” section in SKILL.md gives the serial order and pointers; this file preserves the complete criteria.

General Rules

  • Infer modules from the user's problem first; do not default to asking “which module do you want to use?”
  • If one request contains 2-3 compatible goals, execute them serially in the fixed order instead of handling only the first: template -> compile -> format -> structure / consistency -> bibliography / references -> logic / literature -> experiment / title / deai / tables / abstract.
  • When polishing the same passage in several rounds, work from coarse to fine in the order “argument/logic -> sentence structure -> vocabulary/typesetting.” Do not reverse the order; see references/writing/writing-philosophy-zh.md.
  • When a script fails, return the exact command, exit code, and key error before proposing the smallest next step. Do not silently switch modules to hide the failure.

Criteria by Request Type

  • Use references for “reference to a nonexistent figure/table,” “unreferenced figure/table,” “numbering gap,” or “missing figure/table caption” (cross-reference integrity, a frequent blind-review deduction). Problems in bibliography entries themselves still use bibliography.
  • Use format for “equation number pushed to the next line,” “should a long equation be split,” “formula exceeds the text block/margins,” or “should adjacent formulas be split consistently,” and also read references/formatting/formula-guide.md. Problems involving \label / \eqref / undefined references use references, while a heading followed directly by a formula uses logic.
  • When the template is unknown, compilation fails, or university rules are unclear, use template first, then decide whether compile or format follows.
  • logic runs on the full document by default, including lead-ins, mainline, chapter introductions, funnel, three-way alignment, and C3 introduction-conclusion closure. --section focuses on one chapter and accepts an English key or Chinese name such as --section 绪论; only checks relevant to that chapter run, such as A1/A3 for related work or the introduction funnel. --cross-section has been folded into default behavior and remains only for compatibility.
  • For deai full-document analysis, use --analyze, covering every chapter including body chapters that do not match keywords. Use --section for a fast single-chapter check. They are complementary; do not draw a full-document conclusion after running only --section.
  • In an English abstract, deai adds a tense check: present-tense reporting verbs in method/result sentences, such as shows/presents, produce a [Script] LOW trace; Chinese body text is not checked. It recognizes generic \begin{abstract}, thuthesis \begin{abstract*}, and pkuthss \begin{eabstract}, while skipping Chinese abstract environments. See references/writing/tense-guide-zh.md for the judgment-level checklist.
  • Use logic by default for “list/formula immediately after a heading,” “introduction-conclusion closure,” “chapter mainline,” “research-gap derivation,” or “lead-in for a fourth-level heading.” Switch to literature only when the user explicitly asks to restructure the literature-review writing.
  • For incorrect major/minor/chapter/section/TOC titles, too many sections, “at most 5 sections per chapter,” titles that fail to expose object/problem/method, or a subheading that does not connect to its parent, execute structure -> title serially. title uses --headings to diagnose chapter-title object-problem-method content, direct-section count, and subheading alignment. Add logic only if the user also asks about lead-ins, transitions, or the mainline.
  • For “how to write each chapter introduction,” “bridge from the previous chapter,” “Chapter 3/4 introduction,” or an introduction that is too short, does not inherit the preceding chapter, or does not preview the current chapter, use logic. It performs a dedicated bridging-introduction check for every body chapter except the introduction. A two-paragraph form is recommended; missing backward linkage is graded by dependency evidence: retain Major when the chapter reuses a “Chapter X” clue, and reduce a purely parallel chapter to Info. Also read the “Body-Chapter Introduction” section of references/writing/thesis-writing-guide.md and references/writing/method-chapter-guide-zh.md to produce a rewrite plan. For a single-chapter file, pass --first-chapter N to declare its actual number.
  • For “chapter summary,” “end-of-chapter summary,” “how to write a summary,” or a summary split into many paragraphs, use logic and also read the “Body-Chapter Closing Summary” section of references/writing/thesis-writing-guide.md. By default, write one natural paragraph that closes in the order “problem/goal -> chapter work/method -> key process/evidence -> result value -> support for the thesis mainline.” Do not split it into paragraphs or a list unless the university template or user explicitly requires that form.
  • For “rewrite the introduction/method chapter/experiment discussion/conclusion and outlook,” “how to write a chapter mainline,” or “how abstract, innovations, and conclusion close,” continue using the existing modules first and also read references/writing/thesis-writing-guide.md. Do not add an English conference-paper-style section-writing module.
  • For “how to write Chapter 2,” “process-flow analysis,” “overall framework/technical-route figure,” “process -> difficulty -> framework chapter form,” or “process-analysis chapter,” use logic with --process-chapter (Chapter 2 by default, overridable by --section) and read references/writing/process-chapter-guide-zh.md. It checks the P-FLOW/P-DERIVE/P-FRAME/P-ORDER mainline for an industrial/process-background Chapter 2. The script first requires both process and framework signals; a non-process-analysis chapter receives only Info and is not forced into the form. A “Chapter 2 = method + experiment” thesis follows the next method-chapter rule instead.
  • For “how to write method Chapters 3/4/5/6,” “one method plus experiments in each chapter,” “method-chapter skeleton/five-part structure,” “experiments are insufficient or read like project reports in each method chapter,” “paper-stitched feeling/source-paper wording,” or “draft residue/placeholder tables,” use experiment with --per-chapter for E-DATA/E-ATTR/E-REF/E-FIG/E-METRIC/E-PARAM/E-ABL/E-ECHO per method chapter, plus logic for default P-PAPER stitched-expression scanning (--first-chapter N for a single-chapter file), and format for F-NOTE/F-PLACEHOLDER. Also read references/writing/method-chapter-guide-zh.md: five-part skeleton, graded inheritance in chapter introductions (parallel method chapters need not inherit), industrial experiment conventions, and 12 false-positive guardrails. Missing significance tests, expert-experience baselines, and textbook foundation sections are all legitimate and must not be reported.
  • For whether the full motivation mainline/red thread is connected, meaning every promise in the introduction is validated and answered, use logic with --motivation-thread. It appends a read-only promise map plus closure-map heuristic diagnosis and does not change default logic output.
  • For tiered de-AI/AIGC dimensional analysis, use deai with --tier light|medium|heavy. It scales thresholds, adds the D1 sentence-length check, and labels D1-D5 dimensions. Without --tier, preserve the default output.
  • For “experiments read like a project report,” “discussion is shallow,” “conclusion is incomplete,” or “limitations and future work are missing,” use experiment by default. Do not misroute these as pure language polishing.
  • For “check every item against university rules,” “final/submission/graduation format check,” or “standards compliance,” use spec-check. Confirm university and degree first: Yanshan uses --template yanshan; Tsinghua, Peking, and no dedicated template use --template thuthesis|pkuthss|generic. All four snapshots contain itemized checklists. If the template is unknown and no checklist exists, ask for the university name or rules document and organize it as a --spec-file checklist. In the script report, judge NEEDS-LLM items one by one using Step 4 in references/modules/spec-check.md, execute the corresponding command for MODULE items, and deliver MANUAL items unchanged as a “pre-print checklist.” Do not claim that layout complies on the user's behalf.
  • For “blind review,” “external review,” “review copy,” “anonymous/redacted version,” or “remove names/acknowledgments,” use blind-review. --check locates leaks; when names are available, add --author/--supervisor for a full-text scan. Before generating a blind copy, run --generate --dry-run and let the user confirm the plan. Write only _blind copies and leave original bytes unchanged. For TODO-BLIND(R2) achievement entries and name sentences in the copy, follow references/modules/blind-review.md to produce [LLM] rewrite suggestions and apply them to the copy only after user confirmation. Authorship order is a fact and must not be inferred. A request only about format compliance still uses spec-check.

Released under the MIT License.