| name | rf-cite-format |
| description | Reformat an existing reference list to a different or corrected citation style (APA, IEEE, Chicago, Vancouver, Harvard). Also cleans up inconsistently formatted references. Accepts a pasted reference list or reads from the project's references file. Trigger phrases: "reformat my references", "convert citations to APA", "fix my reference list", "change citation style to IEEE", "/rf-cite-format". |
Citation Reformatter
Convert or clean up a reference list to a target citation style. Takes whatever the user has — messy, mixed-style, or another format — and outputs a clean, consistently formatted list.
Before You Begin
Load _rf/research-context.md for the default citation style.
Check _rf-output/citations/references.md for the existing reference list.
Step 1 — Input
Ask: "Where is the reference list?"
Options:
- Project references file — use
_rf-output/citations/references.md
- Paste it here — user pastes a raw reference list
- Both — combine and deduplicate
Also ask: "What is the target citation style?"
- If different from the project default, note it (and ask if they want to update the project default)
Step 2 — Parse Incoming References
For each reference in the input, extract the raw metadata:
- Authors, year, title, journal/venue, volume, issue, pages, DOI, URL
- If metadata is incomplete, flag the entry and ask the user to provide the missing fields
- Identify duplicates (same DOI, same title) and flag them
If the input is very messy (inconsistent formats, Google Scholar copy-paste artifacts, mixed styles), do a cleanup pass first:
- Remove extra whitespace, stray HTML, odd characters
- Standardize author name format
- Identify and separate individual references (sometimes they run together)
Step 3 — Reformat
Apply the target citation style rules exactly (same rules as in rf-cite-generate).
Common reformatting scenarios:
- APA → IEEE: switch from author-date to numbered, abbreviate journal names, reorder fields
- Numbered → Author-date: replace
[N] tags with (Author, Year), reorder alphabetically
- Mixed/unknown → target style: infer existing metadata, apply target format
- Capitalization fix: APA title case → sentence case for article titles; vice versa for Chicago
Step 4 — Sort and Number
Sort the formatted list:
- Author-date styles (APA, Chicago, Harvard): alphabetically by first author's last name; for same author, by year ascending
- Numbered styles (IEEE, Vancouver): by order of first appearance in the text (if the user provides the document, scan for citation order; otherwise number alphabetically)
Step 5 — Quality Check
After formatting, run a quick quality pass:
- All required fields present for each reference type?
- DOIs formatted correctly (as
https://doi.org/ URLs for APA; as doi: for Vancouver)?
- Journal names fully spelled out (APA, Chicago) or abbreviated (IEEE)?
- Author name format consistent throughout?
- No orphan
et al. without enough preceding authors?
Flag any entries that still have missing or uncertain data.
Output
Save _rf-output/citations/{date}_{run}_references-formatted.md:
# Formatted Reference List
**Style:** [target style]
**Count:** [N]
**Reformatted from:** [original style or "mixed"]
**Date:** [date]
---
[Full formatted reference list]
---
## Flagged Entries
[References with missing data or formatting uncertainty]
## Duplicates Removed
[Any duplicates found and removed]
After saving: "Your reference list is formatted. Run /rf-cite-check to validate that your document draft doesn't have missing or broken citations."