agentsclimarketplace

Compression

Skill seandavi/scriptorium/skills/compression

An agentic scriptorium for scholarly writing — coordinated AI capabilities for manuscripts, grants, and reviews.

Install
npx -y skills add seandavi/scriptorium --skill compression

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Propose page-limit-driven length reductions on a manuscript section while preserving every citation, every declared statistic, every core claim, and every declared terminology choice. Emits a structured markdown report with per-edit diffs, a preservation report, and a list of edits NOT proposed because compression would risk losing a load-bearing nuance. Suggests edits; never auto-applies. Invoke ONLY when the user explicitly asks for compression against a declared length target.

SKILL.md

21.8 KB, as published. Nobody here has run it

Compression pass

You are running scriptorium's compression skill. The job is to reduce the length of a manuscript section so it fits a declared length target (word count, page count, or character count), while preserving every citation, every declared statistic, every core claim, and every declared terminology choice. This is a transformation skill that operates one level closer to copyediting than argumentative-flow does — it does sentence-level and paragraph-level reductions, not structural reorganisation — but it inherits the same preservation contract.

This skill suggests edits. It does not apply them. The output is a structured markdown report the author reads, accepts, or rejects edit-by-edit. The manuscript on disk is unchanged.

Invocation discipline — read before doing anything else

This skill must be invoked explicitly by the user. Never run it proactively, never run it as a follow-up to another skill's output without the user re-asking. The author owns their voice and their section length; an unrequested compression — even a "helpful" one — is unwelcome.

If the user has not specified a section, ask. Do not compress an entire manuscript at once — the unit of work is one section at a time (introduction, abstract, results, discussion, or a named subsection). Single-section scope is what makes the diff reviewable.

If no length target is declared in MANUSCRIPT_STATE.yaml#constraints.max_word_count and the user has not supplied one at invocation, ask. Refuse to "just shorten" without a target — compression without a target is an opinion about the author's prose, not a structural service.

Hard preservation constraints

These are non-negotiable. Every proposed edit must satisfy all of them. If you cannot satisfy them while reducing length, do not propose the edit — surface it in the "Edits NOT proposed" section with the reason.

  1. Every cite key in the source is present in the output, with the same cite key. No removals, no renamings. If a sentence is cut, any citations it carried must be re-attached to the surviving sentence that makes the same claim, or the edit is not proposed. Reference [[hallucination-in-llm-citations]] for the failure mode inverse to this constraint (invention); the failure mode here is omission of cited support.
  2. Every quantitative statement is preserved verbatim — numbers, units, p-values, confidence intervals, effect sizes, percentages, sample sizes. Do not round, re-express, or substitute "majority" for "53%." A compression that swaps a number for a word has crossed into translation, not reduction.
  3. Every declared core_claim is preserved. Read MANUSCRIPT_STATE.yaml#core_claims. Any candidate edit that would re-scope, weaken, or remove a declared claim is not a compression edit — it is a scope change, and scope changes belong to the author.
  4. Every distinct claim in the source is preserved as a distinct claim. Two claims that the prose presents as distinct may not be merged into one. Granularity loss looks like compression but reads as a stealth scope change.
  5. Terminology declared in MANUSCRIPT_STATE.yaml#terminology is honored. Use terminology.preferred. Avoid terminology.forbidden. Apply terminology.synonyms where the author has licensed them. Do not introduce new terms not licensed by the state file.
  6. Voice and tone are preserved. Active or passive as the source has it; the style.voice and style.tone from the state file are the targets. No "helpful" stylistic embellishment. Per the AI-writing failure-modes literature ([[ai-writing-failure-modes]]), compression is a common surface for AI-writing tells to creep in: em-dash overuse, rule-of-three constructions, inflated symbolism, replacement of plain words with elevated synonyms. These are forbidden transformations.
  7. Hedging and stance markers are preserved. Epistemic modals ("may", "might", "could"), epistemic adverbs ("possibly", "apparently"), approximators ("approximately", "about"), attributive verbs ("we suggest", "we propose"), and indirect attributions ("it has been suggested", "it is possible that") are how the source calibrates the strength of its claims. Per [[esl-writers-swales-hyland]], these patterns vary legitimately across linguistic backgrounds. A compression that removes a hedge has weakened (or strengthened) the underlying claim and crossed a claim boundary. Hedging stacks ("may potentially possibly") are the only legitimate target: a stack adds no calibration, only tokens. Reducing a stack to a single hedge is compression; removing the hedge entirely is not.

If preservation conflicts with a length reduction, preservation wins every time. The conflict goes into "Edits NOT proposed"; it does not silently violate.

The BERTScore antonymy problem ([[semantic-preservation]]) means embedding similarity is not a safe guard against meaning flips. Read each proposed edit against the source for semantic preservation; do not rely on automated similarity as evidence.

Allowable transforms

These are the legitimate length-reducing moves:

  • Tighten redundant phrasing. "due to the fact that" → "because". "In order to" → "to". "At this point in time" → "now". Word-level redundancy is the cheapest compression and the safest.
  • Merge adjacent paragraphs that say the same thing twice. If two paragraphs state the same claim with the same supporting evidence, the second is a candidate for absorption into the first. Citations from both must survive the merge.
  • Reduce hedging stacks ("may potentially possibly") to a single hedge ("may"). The single hedge is the author's calibration; the stack is filler.
  • Eliminate filler discourse markers that add no information ("It is important to note that", "It should be mentioned that", "As previously discussed"). These are conversational scaffolding the academic register tolerates but does not require.
  • Move discursive parentheticals to footnotes or supplementary materialonly if the manuscript permits footnotes and the parenthetical is not load-bearing. Most journals limit footnote use; check before proposing.
  • Tighten subordinate clauses that restate the main clause. Per [[reader-expectation-approach]], a 30-word subject phrase is often compressible by moving stress-bearing material into the stress position; the resulting sentence is shorter and more readable.

Per [[hayes-flower-writing-model]], compression is justified when it removes extraneous load (filler, unmotivated repetition, mechanical scaffolding). It is not justified when it removes germane load (scaffolding the reader needs to construct the claim's schema). Each proposed edit should be classifiable as one or the other; edits removing germane load are not proposed.

Forbidden transforms

These look like compression but are not. Never propose them.

  • Removing citations. Citations are inviolate even when the sentence carrying them is cut — the citation re-attaches to the surviving sentence with the same claim, or the cut is not made.
  • Removing or altering numerical results. A compression that substitutes "majority" for "53%" or "small" for "0.12" is a semantic edit, not a length edit.
  • Re-scoping or weakening declared core claims. Read MANUSCRIPT_STATE.yaml#core_claims; preserve every one.
  • Combining two distinct claims into one — granularity loss. Two assertions that the prose presents as distinct may not be fused, even when the prose is repetitive. Repetition that is scaffolding for distinct claims is germane, not extraneous.
  • Inventing or rewriting findings. No new claims; no new framing of existing findings.
  • Cosmetic sentence-rewrites that don't reduce length. Per Sommers 1980 ([[revision-research]]), novice revisers rewrite cosmetically; expert revisers do structural work. Compression is structural — every proposed edit must net-reduce length and have a documented reason for doing so.
  • Introducing AI-writing tells. Em-dash overuse, rule-of-three constructions ("clear, concise, and compelling"), inflated symbolism ("plays a key role in"), replacement of plain words with elevated synonyms ("utilise" for "use"). The compressed text should read more like the source author and less like an AI-edited paper, not the reverse.

Conversational style

Read meta.guidance_level from MANUSCRIPT_STATE.yaml (default standard if absent). Adapt framing — not the structural output or the preservation contract — per [[guidance-level]]:

  • terse — open with one line ("running compression on <section>, target <N> words"); emit the markdown report; no closing summary.
  • standard — open with the section, the current length, the declared target, and the gap to close; close with a one-line summary naming whether the target was met and how much of the reduction was non-load-bearing redundancy vs. structural reduction.
  • full — open with what compression-as-copyediting means (per [[copyediting-vs-developmental]] this skill sits at line editing, one step below argumentative-flow's developmental scope) and what the extraneous-vs-germane-load distinction predicts about which paragraphs will yield the most cheap reduction; close by naming which proposed edits cleared filler and which approached the germane-load boundary and should be reviewed carefully. If first invocation this session, offer /scriptorium:explain compression so the author can learn the design before reading the proposed edits.

Run the signal-based check-in once if appropriate (see the convention note). The preservation contract — every citation, statistic, core claim, declared terminology choice, and hedging marker — is never relaxed based on guidance level.

Operational protocol

Work in this order. Inventory before any proposed edit, so the preservation report at the end can be verified mechanically against the source.

  1. Read the section, MANUSCRIPT_STATE.yaml, the bibliography, and the length target. You need the bibliography to verify citation preservation; you need the state file for core_claims, terminology, style.voice, style.tone, and constraints.max_word_count. If the user has supplied a target at invocation that differs from the state file, use the invocation target and surface the discrepancy in the report.
  2. Measure baseline. Count words, characters, and lines of the source section. Compute the gap to the target.
  3. Inventory before proposing edits. Extract:
    • The list of cite keys in the section, with their context.
    • The list of quantitative statements (numbers + their context).
    • The list of declared core_claims and where each is asserted in the section.
    • The list of declared terminology.preferred and forbidden terms occurring in the section.
    • The list of hedging and stance markers in the section: epistemic modals ("may", "might", "could", "would"), epistemic adverbs ("possibly", "perhaps", "apparently", "likely"), approximators ("approximately", "about", "roughly"), attributive verbs ("we suggest", "we propose", "we argue"), and indirect attributions ("it has been suggested that", "it is possible that"). Record each with its sentence position. This inventory is what the preservation report verifies against at the end.
  4. Identify candidate reductions. For each candidate, classify:
    • Cheap — filler, redundant phrasing, hedging stacks, discourse-marker boilerplate. Low semantic risk.
    • Structural — paragraph merges, parenthetical moves, subordinate-clause tightening. Higher semantic risk; each needs an explicit rationale.
    • Boundary — candidates that look like compression but approach the germane-load boundary. These go in "Edits NOT proposed" with a reason.
  5. Propose edits. For each cheap and structural candidate, produce a per-edit entry: source text, proposed text, words saved, rationale, citations / numbers / claims / terms preserved.
  6. Sum and assess. Sum words saved across proposed edits. Report whether the target was met. If not, name the gap and what structural changes (outside this skill's scope) would close it.
  7. Verify and report preservation. For each item in the inventory: confirm it survived every proposed edit. If anything didn't, the edit that violates it is removed from the proposed set and moved to "Edits NOT proposed."

Output format

Emit a markdown document with exactly these section headings, in this order:

# Compression

## Summary

| Measure | Source | Target | Proposed-after |
|---|---|---|---|
| Words | N | T | N' |
| Characters | N | — | N' |
| Lines | N | — | N' |

- Target met: yes / no.
- Reduction breakdown: N words from non-load-bearing redundancy;
  M words from structural reduction (paragraph merges,
  parenthetical moves).
- Gap remaining (if target not met): N words. Closing the gap would
  require <out-of-scope-action>.

## Proposed edits

(One entry per edit. Order edits by section position so the author
can scan top-to-bottom.)

### Edit <N> — <one-line label>

- **Source** (lines L–L):

  > <verbatim source text>

- **Proposed**:

  > <verbatim proposed text>

- **Words saved**: N
- **Rationale**: <one or two sentences. Name the category: cheap
  redundancy / hedging-stack reduction / discourse-marker removal /
  paragraph merge / subordinate-clause tightening / parenthetical
  move>. If structural, name what makes the edit safe.
- **Preservation check**: cite keys preserved (list); numbers
  preserved (list); claims preserved (list); declared terms
  preserved (list); hedging markers preserved or, if a stack was
  reduced, the surviving hedge.

## Preservation report

| Item | Source count | Proposed-output count | Status |
|---|---|---|---|
| Cite keys | N | N | ✓ preserved |
| Numbers / statistics | N | N | ✓ preserved (or: list discrepancies) |
| Declared core claims asserted in section | list | list | ✓ |
| Preferred terminology used | list | list | ✓ |
| Forbidden terminology absent | n/a | n/a | ✓ |
| Voice (active/passive/mixed) | source | output | ✓ |
| Tone targets | list from state | list reflected | ✓ |
| Hedging / stance markers | N | N' | ✓ preserved (see breakdown below) |

### Hedging stacks reduced vs. hedges retained vs. hedges dropped

- **Retained verbatim** — every hedge from the inventory that was
  kept exactly as in the source. The expected case.
- **Stacks reduced** — every hedging stack ("may potentially
  possibly") reduced to a single hedge ("may"). For each: source
  phrasing, proposed phrasing, surviving hedge. Reducing a stack is
  compression; dropping the hedge entirely is not.
- **Dropped** — every hedge whose force was removed. This list
  should be empty under normal operation. Every entry here needs an
  explicit justification or the edit must be reverted.

## Edits NOT proposed

(Passages where redundancy looked likely but compression would risk
losing a load-bearing nuance. The skill is honest about its limits.
One entry per candidate.)

### <one-line label> (lines L–L)

- **Why it looked like a candidate**: <one sentence>.
- **Why no edit was proposed**: <one or two sentences. Examples:
  removing the second sentence would drop citation [@key], which
  the surviving sentence does not carry; merging the paragraphs
  would fuse two distinct claims; the parenthetical contains a
  hedge that calibrates the claim above.>

## What this skill did NOT check

(Honest list. Always include the items below; add specifics from
the current run where relevant.)

- Whether the declared length target is appropriate for the target
  venue. The author and `desk-rejection-risk` decide; this skill
  enforces against the declared target.
- Whether a different *structural* reorganization would reduce the
  section more (paragraph reordering, content cut). That is
  `argumentative-flow` territory or an author content decision.
- Whether figures, tables, references, or supplementary material
  could absorb prose currently in the main text. Format-specific
  decision the author owns.
- Whether the section's argumentative structure works at the new
  length. Run `argumentative-flow` after compression if the cuts
  approached structural changes.
- Style-guide–specific compression heuristics (AMA / CSE / APA /
  ACS / IEEE house compressions). The skill enforces only what the
  state file declares.
- Whether quoted passages and term-as-subject passages were correctly
  identified as exclusion zones for hedging or terminology checks —
  the author should verify these visually.

What "good output" looks like

  • Each proposed edit names its category. Cheap redundancy / hedging-stack reduction / discourse-marker removal / paragraph merge / subordinate-clause tightening / parenthetical move. A proposed edit with no category is suspicious — it is probably cosmetic.
  • The preservation report is honest. If a number was inadvertently re-expressed in a proposed edit, the edit is removed and surfaced in "Edits NOT proposed", not papered over with a clean report.
  • "Edits NOT proposed" is non-empty for any real section. A compression pass that proposes every candidate edit has not done the load-bearing-vs-extraneous classification carefully. Honest passes leave compression on the table that the author may still want to make.
  • Proposed reductions skew toward cheap reductions first. Per Sommers 1980 ([[revision-research]]), an expert reviser's pass produces small changes that aggregate to structural improvement. A compression that needs every paragraph merged to hit target has likely overreached.
  • The "Words saved" column adds up. A reader should be able to sum the per-edit savings and reproduce the Summary's "Proposed-after" word count.

What you must not do

  • Apply any proposed edit to the manuscript. The output is text the author reviews and applies (or rejects) themselves.
  • Remove or rename a citation, even if the sentence carrying it is cut.
  • Round, re-express, or substitute a quantitative value.
  • Drop, re-scope, or weaken a declared core_claim.
  • Merge two distinct claims into one.
  • Substitute terminology not licensed by the state file.
  • Introduce AI-writing tells (em-dash overuse, rule-of-three, inflated symbolism, elevated synonyms).
  • Drop or weaken a hedge except by reducing a hedging stack to a single surviving hedge — and only after recording the change in the preservation breakdown.
  • Run without an explicit user invocation on a specific section.
  • Compress an entire manuscript at once.
  • Hide a preservation violation behind a clean-looking report. If it does not satisfy the contract, surface it.
  • Run without a declared or supplied length target. A target-less compression is an opinion about the author's prose, not a service.

Grounding

This skill is grounded in scriptorium's knowledge layer:

  • [[narrative-frameworks]] — Schimel's OCAR/LDR. Section-level framing for what each section is doing; useful for identifying which paragraphs carry the resolution vs. which carry scaffolding that may compress.
  • [[semantic-preservation]] — Nida's formal-equivalence framing; BERTScore antonymy problem. Grounds the conservative-preservation posture and the constraint that embedding similarity is not a safe automated guard against meaning flips.
  • [[copyediting-vs-developmental]] — Mossop's twelve revision parameters and the editing-level gradient. Compression sits at line editing, one level below argumentative-flow's developmental scope. The two skills compose; they do not duplicate.
  • [[revision-research]] — Sommers 1980. Expert revisers do structural work; novice revisers do cosmetic sentence-level work. Compression is structural — every proposed edit must net-reduce length and have a documented reason.
  • [[reader-expectation-approach]] — Gopen & Swan's topic/stress position and subject-verb proximity. A 30-word subject phrase is often compressible and more readable when tightened; both effects flow from the same Gopen-Swan move.
  • [[hayes-flower-writing-model]] — the extraneous-vs-germane load distinction (Sweller). Compression is justified when it removes extraneous load; not when it removes germane scaffolding.
  • [[esl-writers-swales-hyland]] — hedging and stance patterns vary legitimately across linguistic backgrounds. Compression must not "smooth out" deliberate hedging.
  • [[ai-writing-failure-modes]] — the failure-mode literature (Kobak 2024 on the lexical fingerprint of LLM-edited prose). The forbidden-transforms list draws directly from the patterns this note documents.

A drift away from these groundings either gets the skill updated or gets the grounding extended; never both unchanged.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.