/distill-style — Turn raw style-feedback entries into rule edits
The companion to /fetch-annotations Step 7. That step harvests coauthor
feedback as raw entries; this skill distills accumulated raw entries into
proposed edits to the writing-style rule files, with user approval.
Arguments
/distill-style — process all Status: raw entries in
research/rules/writing_feedback_log.md.
/distill-style --since YYYY-MM-DD — only entries appended after that date.
/distill-style --tag <tag> — only one tag's cluster.
Targets
The rules live in three places. Decide per cluster:
research-kit/rules/writing_style.md — general baseline (public,
sibling repo). Edit when the rule is general-purpose empirical-econ
writing advice that any project would benefit from.
research/rules/writing_style.md — workspace overlay (banned phrases,
referee carve-out, workspace-specific tics). Edit when the rule is
workspace- or author-specific. Banned-phrase swaps land here.
research-kit/rules/writing_style/<section>.md — per-section files
(intro.md, methods.md, results.md, data.md, discussion.md,
conclusion.md, theory.md, institutions.md, abstract.md,
body.md, appendix.md). Edit only when the entries explicitly
address a section-specific concern.
Default = general. Route to a per-section file only when the coauthor's
note explicitly speaks to a section-level concern (e.g., "the intro
doesn't motivate the outcome", "literature review should be near the end",
"data section needs to define ACIA in table notes"). Source-file path
alone is NOT enough — a jargon complaint in 5Methods.tex is still a
general jargon rule unless the note frames it as a methods-section
concern.
Workflow
1. Read the log and the rule files
- Read
research/rules/writing_feedback_log.md to collect all
Status: raw entries (or filtered by --since / --tag).
- Read the current text of
research-kit/rules/writing_style.md,
research/rules/writing_style.md, and each section file in
research-kit/rules/writing_style/. Knowing the current text lets the
proposals say "amend this paragraph" instead of "add some general
guidance".
2. Cluster and route
Group entries by tag. For each tag's entries:
- Judge target. Default = general. Route to a section file only when
the coauthor's note clearly says so. Route to the workspace overlay
when the lesson is a specific phrase swap or author-specific tic.
- Split if needed. A tag cluster may produce >1 proposal if the
entries split into distinct rules (e.g.,
jargon entries split into
"define acronyms on first use" + "no internal pipeline labels in
prose").
- Singleton clusters are allowed but flagged "n=1" so the user knows
the rule rests on one data point.
- Drop noise. If a cluster is too thin or too scattered to support a
rule, mark its entries
Status: rejected — insufficient signal.
3. Write the proposal report
Produce research/rules/writing_feedback_proposals_YYYY-MM-DD.md with
sections per target file. Each proposal must have:
- A number (
P1, P2, …).
- Target file + the specific paragraph/section it amends (or "new
section").
- A
**Current text:** block (verbatim) if amending, or "new" if adding.
- A
**Proposed text:** block — the exact text to insert/replace. Write
it as if it will be pasted verbatim into the rule file.
- A
**Supporting entries:** list — short quote+note excerpts from the
raw entries that justify the rule, with the source location and
coauthor for each. This is what the user uses to decide whether the
rule generalizes.
- A
**Cluster size:** line (n=X).
- Each supporting entry references the log entry by date+source so
status flipping is unambiguous later.
4. Hand the report to the user
Tell the user the report path and ask them to reply with approvals.
Acceptable approval forms:
- "approve all"
- "approve P1, P3, P5"
- "approve all except P2, P7"
- "approve P3 with edit: "
- "reject P4 — "
- "defer P6"
Don't walk through them one at a time. The user reviews the file
holistically and replies with a list.
5. Apply approved edits
For each approved proposal:
- Edit the target file (use Edit tool).
- Find the supporting raw entries in
research/rules/writing_feedback_log.md and flip
Status: raw → Status: distilled → {target_file}:{section_or_anchor}.
- For rejected proposals, flip supporting entries to
Status: rejected — {reason}.
- For deferred proposals, leave entries as
raw and note the proposal
number in the report file.
6. Final report
Summarise back to the user:
- Number of proposals approved / rejected / deferred.
- Number of log entries flipped to distilled / rejected / left raw.
- The rule files that changed (so they can re-read for coherence).
- Any emerging
other-tag clusters worth promoting to a new tag.
Rules and gotchas
- Never auto-edit. Every rule-file change requires user approval.
- Never delete log entries. Status flip only.
- Banned-phrase swaps go to the workspace overlay's table, not the
baseline — they may be coauthor- or workspace-specific.
- AI-voice patterns typically go to baseline §3 (Sentences) or §2
(Voice), not the workspace overlay.
- n=1 attribution-leak / causal-language are legitimate even at small
n because the principle is sharp. Flag for the user, don't auto-reject.
- Vocab gap detection. If the
other tag has grown ≥3 entries that
share a theme, propose a new tag in writing_feedback_log.md's
## Tags section as a separate P (proposal) — same approval workflow.
- Don't touch existing distilled / rejected entries. They're frozen
history.
- If a proposal contradicts existing text, surface that in the
proposal block explicitly so the user can see the conflict.
- The proposal file is intermediate. After application, the user can
delete it; the durable record is the log's status field + the rule
files.
1---2name: distill-style3description: Read raw entries in research/rules/writing_feedback_log.md, cluster them by tag, propose concrete edits to writing_style.md (general baseline + workspace overlay + per-section files), and let the user approve a batch. Flips status of consumed entries to distilled or rejected. Use when the log has accumulated enough raw entries to be worth turning into rules.4---56# /distill-style — Turn raw style-feedback entries into rule edits78The companion to `/fetch-annotations` Step 7. That step *harvests* coauthor9feedback as raw entries; this skill *distills* accumulated raw entries into10proposed edits to the writing-style rule files, with user approval.1112## Arguments1314- `/distill-style` — process all `Status: raw` entries in15 `research/rules/writing_feedback_log.md`.16- `/distill-style --since YYYY-MM-DD` — only entries appended after that date.17- `/distill-style --tag <tag>` — only one tag's cluster.1819## Targets2021The rules live in three places. Decide per cluster:22231. `research-kit/rules/writing_style.md` — general baseline (public,24 sibling repo). Edit when the rule is general-purpose empirical-econ25 writing advice that any project would benefit from.262. `research/rules/writing_style.md` — workspace overlay (banned phrases,27 referee carve-out, workspace-specific tics). Edit when the rule is28 workspace- or author-specific. Banned-phrase swaps land here.293. `research-kit/rules/writing_style/<section>.md` — per-section files30 (`intro.md`, `methods.md`, `results.md`, `data.md`, `discussion.md`,31 `conclusion.md`, `theory.md`, `institutions.md`, `abstract.md`,32 `body.md`, `appendix.md`). Edit only when the entries explicitly33 address a section-specific concern.3435**Default = general.** Route to a per-section file only when the coauthor's36note explicitly speaks to a section-level concern (e.g., "the intro37doesn't motivate the outcome", "literature review should be near the end",38"data section needs to define ACIA in table notes"). Source-file path39alone is NOT enough — a jargon complaint in `5Methods.tex` is still a40general jargon rule unless the note frames it as a methods-section41concern.4243## Workflow4445### 1. Read the log and the rule files4647- Read `research/rules/writing_feedback_log.md` to collect all48 `Status: raw` entries (or filtered by `--since` / `--tag`).49- Read the current text of `research-kit/rules/writing_style.md`,50 `research/rules/writing_style.md`, and each section file in51 `research-kit/rules/writing_style/`. Knowing the current text lets the52 proposals say "amend this paragraph" instead of "add some general53 guidance".5455### 2. Cluster and route5657Group entries by tag. For each tag's entries:5859- **Judge target.** Default = general. Route to a section file only when60 the coauthor's note clearly says so. Route to the workspace overlay61 when the lesson is a specific phrase swap or author-specific tic.62- **Split if needed.** A tag cluster may produce >1 proposal if the63 entries split into distinct rules (e.g., `jargon` entries split into64 "define acronyms on first use" + "no internal pipeline labels in65 prose").66- **Singleton clusters are allowed** but flagged "n=1" so the user knows67 the rule rests on one data point.68- **Drop noise.** If a cluster is too thin or too scattered to support a69 rule, mark its entries `Status: rejected — insufficient signal`.7071### 3. Write the proposal report7273Produce `research/rules/writing_feedback_proposals_YYYY-MM-DD.md` with74sections per target file. Each proposal must have:7576- A number (`P1`, `P2`, …).77- Target file + the specific paragraph/section it amends (or "new78 section").79- A `**Current text:**` block (verbatim) if amending, or "new" if adding.80- A `**Proposed text:**` block — the exact text to insert/replace. Write81 it as if it will be pasted verbatim into the rule file.82- A `**Supporting entries:**` list — short quote+note excerpts from the83 raw entries that justify the rule, with the source location and84 coauthor for each. This is what the user uses to decide whether the85 rule generalizes.86- A `**Cluster size:**` line (n=X).87- Each supporting entry references the log entry by date+source so88 status flipping is unambiguous later.8990### 4. Hand the report to the user9192Tell the user the report path and ask them to reply with approvals.93Acceptable approval forms:9495- "approve all"96- "approve P1, P3, P5"97- "approve all except P2, P7"98- "approve P3 with edit: <new text>"99- "reject P4 — <reason>"100- "defer P6"101102Don't walk through them one at a time. The user reviews the file103holistically and replies with a list.104105### 5. Apply approved edits106107For each approved proposal:108109- Edit the target file (use Edit tool).110- Find the supporting raw entries in111 `research/rules/writing_feedback_log.md` and flip112 `Status: raw` → `Status: distilled → {target_file}:{section_or_anchor}`.113- For rejected proposals, flip supporting entries to114 `Status: rejected — {reason}`.115- For deferred proposals, leave entries as `raw` and note the proposal116 number in the report file.117118### 6. Final report119120Summarise back to the user:121122- Number of proposals approved / rejected / deferred.123- Number of log entries flipped to distilled / rejected / left raw.124- The rule files that changed (so they can re-read for coherence).125- Any emerging `other`-tag clusters worth promoting to a new tag.126127## Rules and gotchas128129- **Never auto-edit.** Every rule-file change requires user approval.130- **Never delete log entries.** Status flip only.131- **Banned-phrase swaps go to the workspace overlay's table**, not the132 baseline — they may be coauthor- or workspace-specific.133- **AI-voice patterns** typically go to baseline §3 (Sentences) or §2134 (Voice), not the workspace overlay.135- **n=1 attribution-leak / causal-language** are legitimate even at small136 n because the principle is sharp. Flag for the user, don't auto-reject.137- **Vocab gap detection.** If the `other` tag has grown ≥3 entries that138 share a theme, propose a new tag in `writing_feedback_log.md`'s139 `## Tags` section as a separate P (proposal) — same approval workflow.140- **Don't touch existing distilled / rejected entries.** They're frozen141 history.142- **If a proposal contradicts existing text**, surface that in the143 proposal block explicitly so the user can see the conflict.144- **The proposal file is intermediate.** After application, the user can145 delete it; the durable record is the log's status field + the rule146 files.