Style Rewrite Workflow
Scope
This workflow rewrites the prose of an existing article to conform to a selected Elements of Style guide. It is strictly limited to:
- Style changes β sentence construction, voice, word choice, concision, emphasis, parallelism, positive form. Applied without confirmation.
- Structural changes β moving sections, merging paragraphs, splitting paragraphs, reordering content within a section. Proposed and applied only with user approval.
Hard constraints:
- All information in the original must be retained in the rewrite. No facts, claims, citations, atoms, quotes, footnotes, callouts, or tag content may be removed or altered in meaning.
- Tag markup (
{% atom %},{% cite %},{% citation %}, etc.) must be preserved exactly. The workflow rewrites prose around tags, not the tags themselves. - Frontmatter must not be modified (except
statusif the user requests it).
Phase 1 β Load & Select Style
- Read the article file:
content/articles/{id}/{id}.article.mdoc - Determine the style type from the userβs directive. Valid types:
| Type | Style guide | Voice |
|---|---|---|
prose | starspec/agents/starticle/elements-of-style.prose | Clear, direct, literary English per Strunk |
scientific | starspec/agents/starticle/elements-of-style.scientific | Precise, evidence-first, active voice per Strunk/scientific adaptation |
- Fetch the selected style guide
- Parse the article: count sections, paragraphs, sentences, and tags
Present a load summary:
STYLE REWRITE β LOADEDββββββββββββββββββββββββββββββββββββββββββββββarticle: {id}title: {title}style: {prose | scientific}sections: {count}paragraphs: {count}tags: {atom: N, cite: N, citation: N, quote: N, callout: N, footnote: N}Phase 2 β Style Audit
Analyze the article against the selected style guide, rule by rule. Classify every finding into one of two categories:
Style findings (applied without confirmation)
These are sentence-level rewrites that do not move, merge, or split content:
| Rule | What to look for |
|---|---|
| Active voice (R10) | Passive constructions, especially stacked passives |
| Positive form (R11) | Negation used for evasion, double negatives, hedging |
| Concrete language (R12) | Vague adjectives (significant, interesting, various), placeholder nouns |
| Omit needless words (R13) | the fact that, in order to, at this point in time, redundant which is/who was |
| Loose sentences (R14) | Sequences of and/but/so-joined clauses |
| Parallel construction (R15) | Coordinate ideas in unlike grammatical forms |
| Related words (R16) | Subject-verb separation, misplaced modifiers, distant antecedents |
| Emphasis at end (R18) | Emphatic word buried mid-sentence, weak sentence endings |
| Evidence before claim (R17, scientific only) | Claim stated before supporting evidence |
| Reporting vs interpretation (R19, scientific only) | Opinion words embedded in factual statements |
| Data speaks (R20, scientific only) | Adjectives of magnitude doing the work of facts |
Structural findings (require user approval)
These change the shape of the document:
| Change type | Example |
|---|---|
| Move section | βMove Background before Analysis for better flowβ |
| Merge paragraphs | βParagraphs 3 and 4 in section 2 cover the same topicβ |
| Split paragraph | βParagraph 2 in section 1 covers two distinct topicsβ |
| Reorder within section | βLead with the finding, move methodology afterβ |
| Add transition paragraph | βSections 2 and 3 need a bridging paragraphβ |
Present the audit as a structured report:
STYLE AUDIT β {title}ββββββββββββββββββββββββββββββββββββββββββββββStyle guide: {prose | scientific}
STYLE FINDINGS ({count}) β will be applied automatically S1. [R{n}] {location} β {description} Before: "{original sentence}" After: "{rewritten sentence}" S2. ...
STRUCTURAL FINDINGS ({count}) β require your approval T1. {change type} β {description} Reason: {why this improves the article per the style guide} T2. ...
Apply structural changes? [approve all / approve selectively / skip]
PRESERVATION CHECK Information retained: yes Tags intact: yes Frontmatter unchanged: yesWait for user response on structural findings before proceeding.
Phase 3 β Rewrite
Apply changes in this order:
- Style changes β rewrite sentences according to all style findings. These are applied without further confirmation.
- Approved structural changes β apply only the structural changes the user approved. If the user skipped all structural changes, proceed with style-only rewrite.
- Preservation verification β after rewriting, verify:
- Every fact, claim, and piece of information from the original is present in the rewrite
- All tag markup is preserved and correctly nested
- No citations, atoms, quotes, footnotes, callouts, or carousels were removed
- Frontmatter is unchanged
Present the complete rewritten article. Do not write to disk yet.
REWRITE COMPLETEββββββββββββββββββββββββββββββββββββββββββββββStyle changes applied: {count}Structural changes applied: {count}Information retained: yesTags intact: yes
{full rewritten article}Phase 4 β Diff & Confirm
Present a summary of what changed:
CHANGE SUMMARYββββββββββββββββββββββββββββββββββββββββββββββSentences rewritten: {count}Paragraphs merged: {count}Paragraphs split: {count}Sections moved: {count}Words before: {count}Words after: {count}Net change: {+/- count}Wait for user confirmation before writing to disk.
After the user confirms:
- Write to
content/articles/{id}/{id}.article.mdoc - Report the file path
Doβs and Donβts
Do:
- Preserve every piece of information β facts, claims, data, names, dates, figures
- Preserve all tag markup exactly as authored
- Classify every finding as style (auto-apply) or structural (needs approval)
- Show before/after for style changes in the audit
- Verify preservation after rewriting
- Respect the selected style guide β do not mix prose and scientific rules
Donβt:
- Remove, rephrase, or weaken any factual claim
- Alter the content inside
{% atom %},{% quote %},{% callout %}, or{% tldr %}tags unless the change is purely stylistic (voice, concision) and meaning is preserved - Modify frontmatter
- Apply structural changes without user approval
- Rewrite tag attributes or parameters
- Add new content, opinions, or claims not in the original
- Write to disk before explicit user confirmation
Definition of Done
- Article rewritten to conform to the selected style guide
- All style changes applied (sentence-level rewrites)
- Structural changes applied only with user approval
- Every fact and piece of information from the original is retained
- All tag markup preserved and correctly nested
- Frontmatter unchanged
- Rewritten draft confirmed by user before writing to disk