Normative authority: docs/SCIPAPER_STANDARD.md. §5.3 (condense, do not
accumulate) is the policy this skill executes; the policy text lives ONLY in
the standard — this skill implements it and never restates a competing
version. §6 rewrite eligibility defines the fidelity invariants every
deletion and compression must preserve.
condense — 精简:one canonical home per fact
0. What this skill does
A whole-document sweep that removes all content which is unnecessary or
already stated elsewhere in the document, then proves the result with the
mechanical length gate. It is the plugin's redundancy/length action surface:
paper-review dimension I detects redundancy as findings; condense
executes the removal. --report-only stops after §1: the removal map is
returned with no deletion applied.
The map is not built by reading. tools/condense_map.py enumerates every
removable entry with the words it would free, and the pass is judged against
that count: a pass that dispositions every entry and meets the map's target
has condensed; a pass that reads the paper and trims a phrase here and there
has not. That failure mode — a sweep that removes a few percent by hand while
the map lists ten — is the reason the tool exists.
Boundary with /sci-paper:de-ai (canonical home: de-ai SKILL.md §0;
mirrored here verbatim):
de-ai removes the authorship fingerprint (L0-L4 signals, structural tells,
voice; its Pass-3 length cap only guards its own rewrites against growth).
condense removes redundancy and length (cross-document deduplication under
one-canonical-home-per-fact). At the overlap (verbose AI-isms such as
rule-of-three padding or connective stacking), de-ai DETECTS the tell; when
the right fix is deletion rather than rewrite, the deletion EXECUTES under
condense's ranked sweep.
0.1 Non-negotiable rules
- Preference order: delete > condense-in-place > same-length rewrite.
Growth is forbidden; the only exceptions are §5.3's own (author-requested
new content, or a source-verified scientific necessity), each with a
recorded justification.
- Fidelity invariants (§6). Every surviving passage preserves claims,
numbers, units, uncertainties, citations, named entities, comparison
direction, negation, causal direction, scope, stance, qualifiers, and
logical dependencies. Never delete a fact's sole support: dedup keeps
exactly one canonical home; the copies are deleted or replaced by a
cross-reference — the fact itself never vanishes.
- One canonical home per fact. A number, definition, or claim stated in
two places is a defect with one exception (rule 4). The canonical home is
where the reader needs it — normally the most detailed, first-consumed
occurrence.
- Genre carve-out. The abstract's summary of key results and the
conclusion's restatement of the take-home message are scholarly
convention, NOT duplication. The map reports these entries with
genre_carve_out: true and leaves them out of the default target.
- Forward narrative. Removal never leaves a scar ("as discussed above,
we omit..."); the text reads as if written short from the start.
- Every map entry is dispositioned. Deleted, merged, or kept — and
kept carries a reason a reader could check (the survivor is the sole
support; the repeat is the carve-out; the "dead" label is consumed by an
include the map cannot see). An entry without a disposition is an entry
the pass skipped.
- Deletions are evidence-backed. A "dead" symbol, figure, table, or
definition is deleted only after a whole-document grep proves nothing
consumes it; the map's
condense-dead:* entries carry that grep, and any
deletion outside the map records its own.
1. Measure — build the removal map
- Read the target file completely. Resolve
--field as in
/sci-paper:de-ai §1 (shared style-profile convention).
- Snapshot the length baseline before any edit:
cp <file> <scratch>/length-baseline.tex (or record the clean git ref).
Without an honest baseline the closing gate is meaningless.
- Build the map:
python tools/condense_map.py <file> --format json --output <scratch>/condense-map.json.
Six scans, each entry with removable_words:
condense-restatement — a sentence whose content words are ≥ 80 %
covered by earlier sentences in union, with one earlier sentence (any
section) covering ≥ 60 % on its own: canonical home named, copy listed.
condense-zero-gain — roadmap sentences ("In this section we..."),
assurance refrains, Note that / It is worth noting openers.
condense-dead:{figure,table,label,macro,acronym} — defined or placed,
never consumed; the grep is the finding.
condense-verbose — in order to, due to the fact that, hedge stacks
(may possibly), each with the words its replacement saves.
condense-regloss — the same symbol glossed twice.
condense-duplicate — a paragraph repeated across sections (Jaccard
≥ 0.60 over ≥ 30 content words).
condense_budget totals them: removable_total, removable_by_rule, and
default_target_words = restatement + zero-gain outside the carve-out.
The map is exhaustive for what it scans and blind to what it does not
(a claim restated in three sentences, a paragraph that only repeats a
figure caption); add those by reading, with the same fields.
- Rank the map by removable mass (largest first). The default shrink
target is
default_target_words; --target overrides it and is recorded.
2. Act — ranked removal, one disposition per entry
For each map entry, in rank order, record deleted / merged / kept:<reason>:
- Restatements and duplicates: choose the canonical location; delete the
copies, or where the distant reader genuinely needs the pointer, replace
with a cross-reference (
Section~\ref{...}); re-read both sites in context.
- Zero-gain text: delete. If a fragment carries one load-bearing clause,
fold that clause into the neighbouring sentence — do not keep the paragraph
for one clause.
- Dead artifacts: delete the artifact and every orphaned mention; re-run
the map afterward to confirm nothing dangles.
- Verbose spans and repeated glosses: rewrite shorter. Gate every
shortened rewrite with
python tools/rewrite_reward.py --field <field> --reference <claim-record> --original <span> --candidates ... — a
candidate that drops a protected invariant is ineligible regardless of its
brevity; among eligible candidates the shorter wins. --field is required
by the tool (it exits 2 without one); resolve it as in §1 step 1.
Apply each change with a minimal Edit and re-read the affected region plus
every cross-reference into it.
3. Verify — prove the shrink
- Length gate against the target:
python tools/length_gate.py <file> --before <scratch>/length-baseline.tex --require-shrink <default_target_words> (a percentage such as 8% or a
fraction is also accepted). Exit 0 requires both no unjustified growth and
a net cut of at least the target; a cut short of it is a strong
length-shrink-short finding with exit 1, and the pass may not close on
it — either remove more, or record which kept entries account for the gap.
- Residue:
python tools/deai_residue.py <file> --before <scratch>/length-baseline.tex. A condensation must not leave a heading or
caption promising what the body no longer says; exit 1 blocks closing.
- No orphans: rebuild/compile the document if it is LaTeX (0 errors,
0 undefined references, no newly-missing labels); re-run the map and grep
every deleted label and symbol to confirm zero remaining consumers.
- Fidelity: re-check the §6 invariants over every edited span against
the snapshot; every number, citation, and claim in the final text traces
to the same source as before.
4. Loop until dry
Repeat §1-§3 over the whole document until two consecutive maps list no
entry outside the carve-out with a disposition other than kept. A single
clean sweep is not convergence; the first removal round exposes restatements
the map could not see while the copies stood.
5. Report
# condense — Report
Target: <file> | Baseline: <snapshot/ref> | Sweeps: K (last 2 dry)
Map: <n entries>, removable <words> (<by rule>); target <words> (<default|--target>)
Net length delta: <words, per section and total>; length_gate --require-shrink: exit <0|1>
## Dispositions (every map entry)
- <rule> L<line>: <excerpt> — deleted | merged into <loc> | kept: <reason>
## Removed outside the map
- <content> : canonical home <loc>; copies removed <locs>; evidence <grep>
## Compressed spans
- <loc>: <before-words> -> <after-words>; eligibility PASS
## Gate findings
- <length-growth / length-shrink-short / residue findings and their recorded justifications>
No number, citation, claim, or sole-support fact was deleted.
6. Anti-patterns
- Appending an explanation instead of deleting the redundancy (the §5.3
explanatory patch — the exact disease this skill exists to cure).
- Removing less than half of the map's restatement mass without a per-entry
kept: reason — the scraping pass that trims phrases and leaves the
repeated claims standing.
- Deleting a fact's only occurrence because it "felt repeated" — dedup
requires proving the survivor exists.
- Gutting the abstract or conclusion under the dedup rule (genre carve-out).
- Trimming hedges, uncertainties, or qualifiers to save words — those are
protected invariants, not padding.
- Declaring convergence after one clean sweep, or closing on a
length-shrink-short finding without naming the entries that account for
the shortfall.
- Leaving removal scars or drafting-history narration in the text.
- Doing de-ai's job: structural-tell rewriting (voice, templates, L0 words)
belongs to
/sci-paper:de-ai; condense only deletes and compresses.
7. Interfaces
docs/SCIPAPER_STANDARD.md — §5.3 (the policy this skill executes), §6
(fidelity invariants), §0 (consequence classes and dispositions).
tools/condense_map.py — the removal map and its budget (exit 0/2).
tools/length_gate.py — the mechanical closing gate; --require-shrink
turns the map's target into an exit code.
tools/deai_residue.py — the residue gate over the before/after pair.
tools/rewrite_reward.py — eligibility + condensation ranking for
shortened rewrites.
/sci-paper:paper-review — dimension I findings are this skill's input
queue.
/sci-paper:de-ai — the authorship-fingerprint surface (boundary in §0).
1---2name: condense3description: > **Normative authority:** `docs/SCIPAPER_STANDARD.md`. §5.3 (condense, do not4---56> **Normative authority:** `docs/SCIPAPER_STANDARD.md`. §5.3 (condense, do not7> accumulate) is the policy this skill executes; the policy text lives ONLY in8> the standard — this skill implements it and never restates a competing9> version. §6 rewrite eligibility defines the fidelity invariants every10> deletion and compression must preserve.1112# condense — 精简:one canonical home per fact1314## 0. What this skill does1516A whole-document sweep that removes **all** content which is unnecessary or17already stated elsewhere in the document, then proves the result with the18mechanical length gate. It is the plugin's redundancy/length action surface:19`paper-review` dimension I *detects* redundancy as findings; condense20*executes* the removal. `--report-only` stops after §1: the removal map is21returned with no deletion applied.2223The map is not built by reading. `tools/condense_map.py` enumerates every24removable entry with the words it would free, and the pass is judged against25that count: a pass that dispositions every entry and meets the map's target26has condensed; a pass that reads the paper and trims a phrase here and there27has not. That failure mode — a sweep that removes a few percent by hand while28the map lists ten — is the reason the tool exists.2930**Boundary with `/sci-paper:de-ai` (canonical home: de-ai SKILL.md §0;31mirrored here verbatim):**32de-ai removes the *authorship fingerprint* (L0-L4 signals, structural tells,33voice; its Pass-3 length cap only guards its own rewrites against growth).34condense removes *redundancy and length* (cross-document deduplication under35one-canonical-home-per-fact). At the overlap (verbose AI-isms such as36rule-of-three padding or connective stacking), de-ai DETECTS the tell; when37the right fix is deletion rather than rewrite, the deletion EXECUTES under38condense's ranked sweep.3940## 0.1 Non-negotiable rules41421. **Preference order: delete > condense-in-place > same-length rewrite.**43 Growth is forbidden; the only exceptions are §5.3's own (author-requested44 new content, or a source-verified scientific necessity), each with a45 recorded justification.462. **Fidelity invariants (§6).** Every surviving passage preserves claims,47 numbers, units, uncertainties, citations, named entities, comparison48 direction, negation, causal direction, scope, stance, qualifiers, and49 logical dependencies. **Never delete a fact's sole support**: dedup keeps50 exactly one canonical home; the copies are deleted or replaced by a51 cross-reference — the fact itself never vanishes.523. **One canonical home per fact.** A number, definition, or claim stated in53 two places is a defect with one exception (rule 4). The canonical home is54 where the reader needs it — normally the most detailed, first-consumed55 occurrence.564. **Genre carve-out.** The abstract's summary of key results and the57 conclusion's restatement of the take-home message are scholarly58 convention, NOT duplication. The map reports these entries with59 `genre_carve_out: true` and leaves them out of the default target.605. **Forward narrative.** Removal never leaves a scar ("as discussed above,61 we omit..."); the text reads as if written short from the start.626. **Every map entry is dispositioned.** Deleted, merged, or kept — and63 `kept` carries a reason a reader could check (the survivor is the sole64 support; the repeat is the carve-out; the "dead" label is consumed by an65 include the map cannot see). An entry without a disposition is an entry66 the pass skipped.677. **Deletions are evidence-backed.** A "dead" symbol, figure, table, or68 definition is deleted only after a whole-document grep proves nothing69 consumes it; the map's `condense-dead:*` entries carry that grep, and any70 deletion outside the map records its own.7172## 1. Measure — build the removal map73741. Read the target file completely. Resolve `--field` as in75 `/sci-paper:de-ai` §1 (shared style-profile convention).762. **Snapshot the length baseline** before any edit:77 `cp <file> <scratch>/length-baseline.tex` (or record the clean git ref).78 Without an honest baseline the closing gate is meaningless.793. Build the map:80 `python tools/condense_map.py <file> --format json --output <scratch>/condense-map.json`.81 Six scans, each entry with `removable_words`:82 - `condense-restatement` — a sentence whose content words are ≥ 80 %83 covered by earlier sentences in union, with one earlier sentence (any84 section) covering ≥ 60 % on its own: canonical home named, copy listed.85 - `condense-zero-gain` — roadmap sentences ("In this section we..."),86 assurance refrains, `Note that` / `It is worth noting` openers.87 - `condense-dead:{figure,table,label,macro,acronym}` — defined or placed,88 never consumed; the grep is the finding.89 - `condense-verbose` — `in order to`, `due to the fact that`, hedge stacks90 (`may possibly`), each with the words its replacement saves.91 - `condense-regloss` — the same symbol glossed twice.92 - `condense-duplicate` — a paragraph repeated across sections (Jaccard93 ≥ 0.60 over ≥ 30 content words).94 `condense_budget` totals them: `removable_total`, `removable_by_rule`, and95 `default_target_words` = restatement + zero-gain outside the carve-out.96 The map is exhaustive for what it scans and blind to what it does not97 (a claim restated in three sentences, a paragraph that only repeats a98 figure caption); add those by reading, with the same fields.994. Rank the map by removable mass (largest first). The default shrink100 target is `default_target_words`; `--target` overrides it and is recorded.101102## 2. Act — ranked removal, one disposition per entry103104For each map entry, in rank order, record `deleted` / `merged` / `kept:<reason>`:1051061. **Restatements and duplicates:** choose the canonical location; delete the107 copies, or where the distant reader genuinely needs the pointer, replace108 with a cross-reference (`Section~\ref{...}`); re-read both sites in context.1092. **Zero-gain text:** delete. If a fragment carries one load-bearing clause,110 fold that clause into the neighbouring sentence — do not keep the paragraph111 for one clause.1123. **Dead artifacts:** delete the artifact and every orphaned mention; re-run113 the map afterward to confirm nothing dangles.1144. **Verbose spans and repeated glosses:** rewrite shorter. Gate every115 shortened rewrite with `python tools/rewrite_reward.py --field <field>116 --reference <claim-record> --original <span> --candidates ...` — a117 candidate that drops a protected invariant is ineligible regardless of its118 brevity; among eligible candidates the shorter wins. `--field` is required119 by the tool (it exits 2 without one); resolve it as in §1 step 1.120121Apply each change with a minimal Edit and re-read the affected region plus122every cross-reference into it.123124## 3. Verify — prove the shrink1251261. **Length gate against the target:**127 `python tools/length_gate.py <file> --before <scratch>/length-baseline.tex128 --require-shrink <default_target_words>` (a percentage such as `8%` or a129 fraction is also accepted). Exit 0 requires both no unjustified growth and130 a net cut of at least the target; a cut short of it is a strong131 `length-shrink-short` finding with exit 1, and the pass may not close on132 it — either remove more, or record which kept entries account for the gap.1332. **Residue:** `python tools/deai_residue.py <file> --before134 <scratch>/length-baseline.tex`. A condensation must not leave a heading or135 caption promising what the body no longer says; exit 1 blocks closing.1363. **No orphans:** rebuild/compile the document if it is LaTeX (0 errors,137 0 undefined references, no newly-missing labels); re-run the map and grep138 every deleted label and symbol to confirm zero remaining consumers.1394. **Fidelity:** re-check the §6 invariants over every edited span against140 the snapshot; every number, citation, and claim in the final text traces141 to the same source as before.142143## 4. Loop until dry144145Repeat §1-§3 over the whole document until **two consecutive maps list no146entry outside the carve-out with a disposition other than `kept`**. A single147clean sweep is not convergence; the first removal round exposes restatements148the map could not see while the copies stood.149150## 5. Report151152```markdown153# condense — Report154Target: <file> | Baseline: <snapshot/ref> | Sweeps: K (last 2 dry)155Map: <n entries>, removable <words> (<by rule>); target <words> (<default|--target>)156Net length delta: <words, per section and total>; length_gate --require-shrink: exit <0|1>157158## Dispositions (every map entry)159- <rule> L<line>: <excerpt> — deleted | merged into <loc> | kept: <reason>160161## Removed outside the map162- <content> : canonical home <loc>; copies removed <locs>; evidence <grep>163164## Compressed spans165- <loc>: <before-words> -> <after-words>; eligibility PASS166167## Gate findings168- <length-growth / length-shrink-short / residue findings and their recorded justifications>169No number, citation, claim, or sole-support fact was deleted.170```171172## 6. Anti-patterns173174- Appending an explanation instead of deleting the redundancy (the §5.3175 explanatory patch — the exact disease this skill exists to cure).176- Removing less than half of the map's restatement mass without a per-entry177 `kept:` reason — the scraping pass that trims phrases and leaves the178 repeated claims standing.179- Deleting a fact's only occurrence because it "felt repeated" — dedup180 requires proving the survivor exists.181- Gutting the abstract or conclusion under the dedup rule (genre carve-out).182- Trimming hedges, uncertainties, or qualifiers to save words — those are183 protected invariants, not padding.184- Declaring convergence after one clean sweep, or closing on a185 `length-shrink-short` finding without naming the entries that account for186 the shortfall.187- Leaving removal scars or drafting-history narration in the text.188- Doing de-ai's job: structural-tell rewriting (voice, templates, L0 words)189 belongs to `/sci-paper:de-ai`; condense only deletes and compresses.190191## 7. Interfaces192193- `docs/SCIPAPER_STANDARD.md` — §5.3 (the policy this skill executes), §6194 (fidelity invariants), §0 (consequence classes and dispositions).195- `tools/condense_map.py` — the removal map and its budget (exit 0/2).196- `tools/length_gate.py` — the mechanical closing gate; `--require-shrink`197 turns the map's target into an exit code.198- `tools/deai_residue.py` — the residue gate over the before/after pair.199- `tools/rewrite_reward.py` — eligibility + condensation ranking for200 shortened rewrites.201- `/sci-paper:paper-review` — dimension I findings are this skill's input202 queue.203- `/sci-paper:de-ai` — the authorship-fingerprint surface (boundary in §0).