Skip to content

Commit 24ac535

Browse files
committed
feat: enforce revision escalation gates
1 parent 3ae4329 commit 24ac535

33 files changed

Lines changed: 1316 additions & 50 deletions

.claude/skills/thesis-control/SKILL.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Use a `thesis_control/` directory when the project needs durable tracking:
3333
- `spine_cards.csv`
3434
- `edit_contracts.csv`
3535
- `drift_audits.csv`
36+
- `revision_escalations.csv`
3637

3738
Run the optional validator when Python is available:
3839

@@ -42,13 +43,21 @@ python {skill_dir}/scripts/check_thesis_control.py <project_root> --strict
4243

4344
The validator checks packet structure and gate consistency. It does not judge scholarly truth.
4445

46+
Strict validation requires revision-tracking schema v2. Upgrade a legacy packet without guessing historical revision families:
47+
48+
```bash
49+
python {skill_dir}/scripts/upgrade_thesis_control_revision_tracking.py <project_root>
50+
```
51+
4552
To create a draft packet from a real Markdown unit before editing prose:
4653

4754
```bash
4855
python {skill_dir}/scripts/scaffold_thesis_control.py <project_root> \
4956
--source chapters/ch1_introduction.md \
5057
--start-line 71 \
5158
--end-line 104 \
59+
--revision-issue-id ri-ch1-gap-clarity \
60+
--attempt-no 1 \
5261
--copy-source
5362
```
5463

@@ -129,9 +138,11 @@ The author decides whether to accept, partially accept, revise, or rollback. Do
129138

130139
## Revision Escalation Rule
131140

132-
Treat three unsuccessful attempts on the same edit contract as an operational escalation threshold, not as evidence that every task fails after three turns. Only count an attempt when its drift decision is `revise` or `rollback`, or when the author rejects the result against the same contract. Clarifying discussion and unexecuted proposals do not count.
141+
Treat three unsuccessful attempts on the same revision issue as an operational escalation threshold, not as evidence that every task fails after three turns. Use `revision_issue_id` to keep successive contract versions attached to that issue. Only count an attempt when its drift decision is `revise` or `rollback`. Record author rejection as one of those decisions. Multiple audits of one contract still count as one attempt. Clarifying discussion and unexecuted proposals do not count.
142+
143+
After three unsuccessful attempts, stop. Do not apply a fourth prose patch. Record a row in `revision_escalations.csv`; a later contract may become `approved` or `applied` only after the matching escalation has `human_approved=true` and `status=approved`.
133144

134-
After three unsuccessful attempts, stop. Do not apply a fourth prose patch.
145+
An approved escalation closes only that group of three unsuccessful contracts. If three later contracts also receive `revise` or `rollback`, require a new escalation before another contract can proceed.
135146

136147
Escalate earlier than three attempts when any of these signals is already visible:
137148

@@ -148,7 +159,7 @@ Before editing again:
148159
1. Consolidate the currently valid requirements into one brief.
149160
2. Compare that brief with the spine card, evidence boundaries, current contract, and latest author-approved version.
150161
3. Classify the failure as one primary category:
151-
- **underspecified or conflicting intent** — the target, audience, venue, constraint, or acceptance condition is missing or inconsistent
162+
- **underspecified or conflicting intent** — the target, audience, venue, constraint, or acceptance condition is missing or inconsistent, or the feedback is evaluative but not operational, such as “weak”, “unclear”, or “still not right” without a concrete change target
152163
- **local execution failure** — the contract is clear, but the edit did not implement it correctly
153164
- **structural mismatch** — the problem affects the section purpose, research question, gap, contribution, evidence chain, or manuscript structure
154165
- **evidence gap** — the requested claim is not supported by the available sources, data, experiments, or files
@@ -167,13 +178,17 @@ Use these default actions:
167178
- For an evidence gap, narrow, qualify, or remove the unsupported claim unless the author supplies more evidence.
168179
- For version contamination, restore or copy the latest author-approved version, then apply a consolidated contract. Create a separate branch or manuscript version only when the approved scope requires structural work.
169180

181+
For full reframing, hand off a brief that states the target venue, research question, gap, core claim, available evidence, claims that must not be made, and proposed new structure. Do not rewrite the manuscript until the author approves that brief.
182+
170183
Return the escalation check in this form:
171184

172185
```text
173186
## Revision Escalation Check
174187
188+
Revision issue:
175189
Contract:
176190
Unsuccessful attempts:
191+
Trigger contracts:
177192
Primary category:
178193
Writing scope:
179194
Why the revisions did not converge:

0 commit comments

Comments
 (0)