Status: procedure. Read by every genre writer and both revisers
when a draft's dossier holds a style.md, the style measured and
observed from example papers. The writing standards always win over
anything learnt here.
A dossier has a style.md when dossier init was given
--style-from, or dossier style --from was run on it. scope.md
then carries a - style: line naming the papers' source. With no
style.md there is nothing to do and this file does not apply.
style.md holdspapers: (citekeys) the style comes from.## Measured is a table the code writes: per feature a low and
high range, the values measured, and a repair column. A - in
low or high means fewer than three papers gave a value, so the
feature is not targeted. The skill never edits this table.## Observed is written by the skill: patterns that two or more
papers share, each with a seen-in: line of citekeys and no quoted
wording.## Conflicts with the writing standards lists what the standards
forbid or leave unchecked. The code writes the found-by: table
entries; the skill adds found-by: skill ones.Steps 1 and 2 happen before drafting, step 3 while drafting, and steps 4 and 5 at the end.
Read a note for every listed paper. For each citekey in
papers:, run:
python -m chitragupta.draft style-notes show <citekey>
A paper whose note is missing or stale needs a new one. Read
that paper's parsed text, content/parsed/<citekey>.txt, then write
the note in your own words, on stdin:
echo "<note>" | python -m chitragupta.draft style-notes write <citekey>
A note says what the paper's prose does: how it opens, how it
orders a section, how it addresses the reader. It holds no sentence
or phrase from the paper, and write refuses a note that copies a
run of eight words. Measured numbers do not go in a note. This step
is not done until every listed paper has a fresh note.
Fill ## Observed. Keep a pattern only when the seen-in: line
can name two or more papers whose notes show it, and quote nothing.
Edit only this section of style.md, with a file tool. Keep each
entry, here and under Conflicts, to one line per field (key: value),
and never wrap a line: a wrapped line makes style.md unparsable, and
then every profile check is skipped. When a
pattern clashes with a standard in
WRITING-STANDARDS.md, add an entry
under ## Conflicts with the writing standards:
- pattern: <the pattern, in your words>
standard: <the standard it clashes with, by section number>
found-by: skill
Never edit the ## Measured table, and never remove a
found-by: table entry. An edit there cannot be told apart from
the author moving a range by hand.
Draft towards the style. Follow every pattern under
## Observed that is not listed under Conflicts. Aim each
## Measured range whose low and high are set, unless the
feature is listed under Conflicts. A feature listed there is not aimed at: the
standards say why. When a learnt pattern and a standard disagree,
follow the standard.
Check the file and the draft. Run:
python -m chitragupta.draft dossier style <draft> --check
python -m chitragupta.draft style <draft>
dossier style --check reports wording in style.md copied from a
listed paper (rewrite that line in your own words) and each paper's
note as fresh, stale or missing (go back to step 1 for the
last two). draft style reports each heading in the wrong case as
edit and each paragraph with more "we" than high as review.
Repair the edit findings; the review ones are a judgement.
This step is not done until both have run.
List the open conflicts in the summary. Name each entry under
## Conflicts with the writing standards and say that the draft
followed the standard. A learnt feature that was left out is
reported, not hidden.
To measure again after the corpus or the example papers change, run
python -m chitragupta.draft dossier style <draft> --from <spec>,
where <spec> is collection "<name>" or a comma-separated list of
citekeys. It rewrites ## Measured and the found-by: table
conflicts, and keeps ## Observed, the skill's conflicts and any
low or high the author edited.