---
name: sentence_logic_repair
description: Repair sentences that sound confident and say nothing: spot flattened lists where facts with different roles are laid side by side as equals, missing main verbs, dependent clauses left alone, and action buried in nouns, then rebuild each sentence so the relationships between its parts are stated. Ships a 12 point checkable feature list, a relationship word table, graded practice passages with scored repairs, a heuristic audit script, and a 12 question self test a writer can run with no model. Use when a draft reads smoothly but the logic between facts is missing, when AI generated prose stacks facts with commas and and, when editing reports, essays, or articles sentence by sentence, or when teaching sentence repair.
---

# Sentence Logic Repair

## Purpose

Some broken sentences announce themselves. These do not. They are punctuated, they sound assured, and a reader can finish one without being able to say how its facts connect. The usual shapes are a series of facts with different jobs laid side by side as if they were equals, a stack of nouns with no main verb, a dependent clause left standing alone, and a sentence whose action is trapped inside nouns while a weak verb holds the front.

This skill repairs those sentences and teaches the repair. It ships four tools, and a full job uses all four:

- The checkable feature list, gate G1 plus features F1 to F12, in `references/feature-list.md`. Every defect you report carries a feature code and the test that found it.
- The relationship word table in `references/relationships.md`. Every connective makes a claim, and the table says which claim each word makes and where each word traps writers.
- Graded practice passages with repairs in `references/practice-passages.md`. Ten original passages across three levels, including two where the tempting repair invents a cause and fails.
- Two scripts in `scripts/`. `audit_text.py` flags candidate sentences for a human to check. `self_test.py` runs a 12 question test, graded from Level 1 to Level 3, with a pass mark of 9. Both run on the Python standard library alone and need no model and no network.

Audit and rewrite are not separate modes here. The audit produces feature codes, the feature codes choose the repair, and the repair gets checked against the original facts before it ships. If you cannot name the feature, do not rewrite the sentence yet.

## Workflow

1. Gate the text first. Mark headlines, titles, labels, captions, table cells, signs, quoted dialogue, and true bullet lists as exempt, with the reason, before auditing anything. Headlines follow block grammar, where articles and forms of be are omitted by rule, so a noun string with no verb can be correct there. Deliberate fragments in fiction and advertising copy are also exempt. Repairing an exempt form into a body sentence is an error this skill counts against the editor.

2. Split the remaining text into sentences and number them. Run the heuristic script if the passage is long: `python3 scripts/audit_text.py FILE` from this skill folder, or add `--json report.json` for a file report. Exit 0 means no candidates from its patterns, exit 1 means candidates found, exit 2 means the file could not be read. Treat every flag as a candidate for hand checking. The script uses word lists and counts, so it misses real defects and flags clean sentences. No flag is not a pass.

3. Run F1 to F5 on each sentence, in order. Find the finite main verb, then the subject, then run the I think that test for a complete thought, then check for a dependent clause standing alone, then list nominalizations and the action each one hides. A complete sentence needs a subject, a verb, and a complete thought. An -ing form with no helping verb is not a complete verb. A sentence that opens with because, although, if, when, since, while, after, before, unless, or whereas needs its independent clause in the same sentence.

4. Run the list features, F6 to F10, on any sentence with a comma series or an and series. Label the role of every item: actor, action, object, cause, result, condition, example, time, place, or concession. All items sharing one role and one governing verb means a true list, so check only parallel form and stop. Two or more roles presented as equals means a flattened list. That is the central defect: the sentence claims the items are the same kind of thing when they are not.

5. Name the relationship between every pair of non-equal items in one word: cause, result, contrast, concession, condition, time, purpose, example, or true addition. Then check whether the sentence states it. If you can name a relationship the sentence does not state, a connective was dropped. Pick the word for that relationship from `references/relationships.md` and weigh it: coordination joins equal ideas, subordination puts background, cause, concession, and condition under the main point.

6. Rebuild the sentence. Put the character who acts in the subject slot and the action in the verb, turning nominalizations back into verbs where that sharpens the sentence. Give every clause its stated relationship. Subordinate what is background, coordinate what is truly equal, and split the sentence when it carries two main points at full weight. Worked pattern, flattened: "The trial recruited slowly, the funder asked for interim results, the protocol changed twice, and recruitment closed early." Repaired, using confirmed facts that recruitment closed because enrollment stayed slow, the funder request was routine, and the protocol changes were for safety: "The trial recruited slowly, and recruitment closed early for that reason. The funder had already asked for interim results as a routine step, and the protocol changed twice for safety reasons."

7. Run the honesty check, F11, on every repair. List the facts in the original and the facts in the repair, side by side. A repair may state a relationship only when the original text, the surrounding paragraph, or the writer supports it. Events sitting next to each other in time do not prove cause. When the relationship is unknown, do one of three things: state only the time order, split the facts into separate sentences with no connective claim, or send the writer a query that names the exact relationship you need confirmed. Never ship an invented cause to make a sentence read well.

8. Check the repair against F12. State the main point of the repaired sentence in five words or fewer. If you need and twice to finish that line, the sentence still carries two main points. Subordinate one or split again.

9. For teaching or self training, work `references/practice-passages.md` in level order, then run `python3 scripts/self_test.py --answers A,B,C,D,...` with one letter per item, or run it with no flags in a terminal for interactive mode. The pass mark is 9 of 12. Run `python3 scripts/self_test.py --check` first on a new machine or after editing the data file: it validates the test and proves a perfect answer set passes and an empty set fails. A learner who fails Level 3 items 10 and 12 has the cause invention fault, which matters more than the raw score. Send them back to passage 3.2.

## Output Contract

For an audit and repair job, deliver:

- Passage totals: sentences audited, sentences exempt with reasons, sentences defective.
- One entry per defective sentence: sentence number, the original text, feature codes with the test evidence in one short line each, and the role label for every item in any series.
- The repair for each defective sentence, or the writer query where F11 blocks a repair, stating exactly which relationship needs confirming.
- A fact match line per repair: facts in, facts out, relationships added, and the source for each added relationship (original text, surrounding paragraph, or writer confirmation).
- A clean list: sentences you checked and passed, by number only. Naming what passed is part of the contract, since it bounds the claim the audit makes.
- Defect counts by feature code, reconciled with the sentence count. A sentence with two codes counts once as a defective sentence and twice in the feature counts, and the report says so.

For a teaching job, deliver the learner score by level, the missed items with their repairs and reasons from the self test data, and the one practice passage assigned next.

## Operating Rules

- Leave real lists alone. A true list gets a parallel form check and nothing else. Matching form in a true list means matching the grammatical shape of each item, such as all gerunds, as in "She likes swimming, walking, and riding her bicycle."
- Leave headlines and other exempt forms alone, and say you left them alone. The gate is step 1 for a reason.
- Never invent a relationship, an actor, or an outcome to complete a repair. A query to the writer is a successful output. A smooth invented repair is the worst failure this skill has.
- Never downgrade a stated relationship either. If the original states a cause and the evidence in the text supports it, the repair keeps that cause at full strength.
- Diagnosis before rewriting, always. A repair offered without feature codes is an opinion, and this skill does not ship opinions as findings.
- The script never outranks the feature list. When the script flags a sentence the feature list clears, the feature list wins and the report records the false flag if counts are being kept.
- Keep the writer's facts in the writer's order of importance. Repair changes how the logic is stated. It does not promote a minor fact into the main clause because it makes a tidier sentence.
- Where a claim in this skill comes from a writing authority, the authority is a university writing center rule: subject, verb, and complete thought for completeness, subordinators as markers of logical relationship, coordination for equal ideas and subordination for lesser ones, and parallel form as the signal of equal importance. No readability statistics are used anywhere in this skill, because none were verified.
