Skip to content
Style Rewrite Workflow
AutoXXS (320px)XS (375px)SM (640px)MD (768px)LG (1024px)XL (1280px)XXL (1536px)
SketchMaterialiOSTamagui
DataInjectionKeyPatternsServiceTransactionProcessResearchProductQualityPerformanceSpecDomainFunctionTechnologyArchitectureConfigMiddlewareDataDatabaseDrizzleMigrationModelop-sqliteSchemaSQLState ManagementDraftKeystoneMergePatchPatchesPersistenceReactiveRedoStoreUndoTestingDeviceFactoryIsolationTypeScriptZodTopicsCommunicationBidsNVCDesignDesign ImplicationsEducationPedagogyFoundationsPsychologyAttachmentFloodingRelatingAuthentic RelatingUIEditorReact Native

Style Rewrite Workflow

Workflow Style Rewrite Workflow
agent starticle
tags
workflowarticlestyle

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 status if the user requests it).

Phase 1 β€” Load & Select Style

  1. Read the article file: content/articles/{id}/{id}.article.mdoc
  2. Determine the style type from the user’s directive. Valid types:
TypeStyle guideVoice
prosestarspec/agents/starticle/elements-of-style.proseClear, direct, literary English per Strunk
scientificstarspec/agents/starticle/elements-of-style.scientificPrecise, evidence-first, active voice per Strunk/scientific adaptation
  1. Fetch the selected style guide
  2. 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:

RuleWhat 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 typeExample
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: yes

Wait for user response on structural findings before proceeding.

Phase 3 β€” Rewrite

Apply changes in this order:

  1. Style changes β€” rewrite sentences according to all style findings. These are applied without further confirmation.
  2. Approved structural changes β€” apply only the structural changes the user approved. If the user skipped all structural changes, proceed with style-only rewrite.
  3. 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: yes
Tags 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:

  1. Write to content/articles/{id}/{id}.article.mdoc
  2. 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