$npx -y skills add yha9806/academic-writing-toolkit --skill thesis-controlUse when AI-assisted thesis edits risk claim drift, scope creep, loss of author control, or repeated revisions that fail to converge; provides spine cards, edit contracts, drift audits, revision escalation, and human gates.
| 1 | # /thesis-control - Thesis Drift Control |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Prevent AI-assisted writing from becoming fluent but distorted. Use this before and after substantive thesis edits when the risk is not spelling or style, but loss of author control: project-level reframing, a primary domain becoming a secondary example, a changed research object or question, widened claims, blurred section purpose, missing caveats, unsynchronised adjacent paragraphs, or local edits that weaken the chapter spine. |
| 6 | |
| 7 | ## Trigger Words |
| 8 | |
| 9 | This skill activates on: `thesis control`, `drift audit`, `edit contract`, `spine card`, `claim drift`, `author control`, `loss of control`, `scope creep`, `rewrite risk`, `/thesis-control`. |
| 10 | |
| 11 | ## Core Rule |
| 12 | |
| 13 | Do not edit thesis prose until the project intent, current manuscript contract, |
| 14 | global thesis audit, section spine, and intended local change form one explicit |
| 15 | and traceable contract chain. |
| 16 | |
| 17 | The contract must answer: |
| 18 | |
| 19 | ```text |
| 20 | This edit is allowed to change [specific local issue] in [specific unit], while preserving [spine sentence], [scope boundary], [core claims], and [do-not-change items]. |
| 21 | ``` |
| 22 | |
| 23 | If this sentence cannot be written, stop and diagnose the section instead of rewriting it. |
| 24 | |
| 25 | The control hierarchy is: |
| 26 | |
| 27 | ```text |
| 28 | Author-approved Project Intent |
| 29 | → Author-approved Manuscript Contract |
| 30 | → Passed Global Thesis Audit |
| 31 | → Section Spine Card |
| 32 | → Edit Contract |
| 33 | → Post-edit Drift Audit |
| 34 | ``` |
| 35 | |
| 36 | A lower layer cannot amend a higher one. If the title, abstract, primary |
| 37 | domain, research object, research question, contribution scope, or manuscript |
| 38 | structure no longer matches the approved intent, stop. Revise or roll back the |
| 39 | manuscript, or create a new explicitly approved intent version that preserves |
| 40 | the earlier row as history. |
| 41 | |
| 42 | ## Control Files |
| 43 | |
| 44 | Use a `thesis_control/` directory when the project needs durable tracking: |
| 45 | |
| 46 | - `project_intent.csv` |
| 47 | - `manuscript_contracts.csv` |
| 48 | - `global_thesis_audits.csv` |
| 49 | - `spine_cards.csv` |
| 50 | - `edit_contracts.csv` |
| 51 | - `drift_audits.csv` |
| 52 | - `revision_escalations.csv` |
| 53 | |
| 54 | Run the optional validator when Python is available: |
| 55 | |
| 56 | ```bash |
| 57 | python {skill_dir}/scripts/check_thesis_control.py <project_root> --strict |
| 58 | ``` |
| 59 | |
| 60 | Strict validation requires the project-intent layer. It blocks approved or |
| 61 | applied edit contracts unless they reference a passed global thesis audit for |
| 62 | the active author-approved intent and manuscript contract. Non-strict mode can |
| 63 | still inspect legacy packets that do not yet have this layer. |
| 64 | |
| 65 | The validator checks packet structure and recorded gate consistency. It does |
| 66 | not infer semantic alignment or judge scholarly truth. The author or reviewer |
| 67 | must compare the manuscript with the intent and record each alignment field |
| 68 | honestly; the validator then prevents an unresolved or drifted audit from being |
| 69 | used as authorisation. |
| 70 | |
| 71 | Strict validation requires revision-tracking schema v3. Upgrade a complete |
| 72 | legacy packet without guessing historical revision families: |
| 73 | |
| 74 | ```bash |
| 75 | python {skill_dir}/scripts/upgrade_thesis_control_revision_tracking.py <project_root> |
| 76 | ``` |
| 77 | |
| 78 | To create a draft packet from a real Markdown unit before editing prose: |
| 79 | |
| 80 | ```bash |
| 81 | python {skill_dir}/scripts/scaffold_thesis_control.py <project_root> \ |
| 82 | --source chapters/ch1_introduction.md \ |
| 83 | --start-line 71 \ |
| 84 | --end-line 104 \ |
| 85 | --revision-issue-id ri-ch1-gap-clarity \ |
| 86 | --attempt-no 1 \ |
| 87 | --copy-source |
| 88 | ``` |
| 89 | |
| 90 | The scaffold writes schema v4 draft project-intent and manuscript contracts, a |
| 91 | pending global thesis audit, `human_approved=false`, `status=draft`, and |
| 92 | `AUTHOR_REVIEW_REQUIRED` fields. Replace those fields with concrete author |
| 93 | judgement before applying a substantive edit. A scaffolded packet may be |
| 94 | structurally valid while remaining non-executable. Its default contract id |
| 95 | includes the attempt number, so attempts 1 and 2 become `ec-<unit>-001` and |
| 96 | `ec-<unit>-002`. Reuse an explicit `revision_issue_id` for retries. |
| 97 | |
| 98 | The migration helper stops without writing when revision metadata is partial or |
| 99 | when a legacy escalation cannot be classified from current contracts and |
| 100 | resolved audits. It preserves named extension columns and converts one- or |
| 101 | two-trigger legacy rows to `early_diagnostic`; a three-trigger row becomes a |
| 102 | `cycle_gate` only when it already matches one completed failure group. |
| 103 | |
| 104 | Upgrade a complete schema-v3 packet into a deliberately blocked schema-v4 |
| 105 | draft without guessing author intent: |
| 106 | |
| 107 | ```bash |
| 108 | python {skill_dir}/scripts/upgrade_thesis_control_project_intent.py \ |
| 109 | <project_root> --json |
| 110 | ``` |
| 111 | |
| 112 | The helper adds `manuscript_id` and `global_audit_id` links, preserves named |
| 113 | extension columns, and creates `AUTHOR_REVIEW_REQUIRED` draft intent, |
| 114 | manuscript, and global-audit rows through one atomic batch. Previously approved |
| 115 | or |