Skip to content

feat: add worker output conventions and advisory prose lint - #22

Merged
ryannmicua merged 2 commits into
mainfrom
fm/llm-output-guidance-adopt
Oct 16, 2026
Merged

ryannmicua merged 2 commits into
mainfrom
fm/llm-output-guidance-adopt

Conversation

@ryannmicua

Copy link
Copy Markdown
Owner

Intent

"Alright, let's go with Option A."

Context: a research report recommended replacing a custom STE-based writing subset with an existing-framework profile for LLM output. The decision was option A: adopt all of it. That means the section 3.5 writing profile (8 rules built on ISO 24495-1, BLUF/Minto, Federal Plain Language Guidelines and ICD 203, with one custom rule: do not drop facts when shortening), the section 4.5 notation map (pick the diagram notation by content shape; C4 only for architecture; UML sequence/state, BPMN-descriptive swimlanes, ER, Now-Next-Later, IBIS/ADR elsewhere), the section 7 checklist (text, diagrams, pages, animation), and the Appendix A Vale config as an advisory, warn-only lint.
Stated preferences that bear on this: visuals should not introduce ambiguity (draw every hop); answer first.

Substance of the referenced report sections (Option A adopts these into Firstmate's worker guidance):

Section 3.5 writing profile, for status lines, reports, explanations and summaries (not code, formatted commit messages or quoted text); "plain" means the reader can find what they need, understand it, and use it (ISO 24495-1):

  1. Answer first: the first sentence gives the state, the result or the decision needed (BLUF).
  2. One point on top, grouped support below: each section and paragraph opens with its point, one topic per paragraph, a list for three or more parallel items (Minto; Federal Plain Language Guidelines).
  3. Short, tight sentences: 25 words or fewer, subject/verb/object close, a condition that decides action first, keep link words when splitting.
  4. Name the actor: active voice ("I", "firstmate", "CI", "the captain"); passive only when the actor is unknown.
  5. One term per thing across chat, report and page; copy names, IDs, paths, commands, error text, numbers and URLs exactly.
  6. Remove ambiguity the reader cannot ask about: replace an ambiguous pronoun with its noun, no noun stack over three words, rule before exceptions in positive form, no idioms or filler.
  7. Say how you know: mark each claim checked (with evidence) or inferred, use a fixed likelihood word for predictions, say what changed in a repeated report (ICD 203 standards 2, 3, 7).
  8. Do not shorten by dropping facts: list the facts before rewriting and check each one after (custom).
    Domain terms, contractions, -ing and perfect tenses, and I/you/we are allowed; newcomer help goes behind a link or disclosure.

Section 4.5 notation map, pick by content shape: systems and who calls whom -> C4 landscape/context/container; what runs where -> C4 deployment; messages and relays in order -> UML sequence subset; life of one thing -> UML state machine subset; work crossing people with handoffs -> swimlanes with BPMN Descriptive semantics; branching checks inside one actor -> flowchart; entities and relations -> ER (crow's foot); plan without committed dates -> Now-Next-Later; plan with real dates -> timeline or Gantt to scale; open decision -> IBIS map or options x criteria table; decision made -> ADR; options on two axes -> 2x2; amounts -> a chart, not a diagram. Apply the C4 notation checklist (title, type and scope, key; every element named and typed; every arrow labelled and one-way) to every box-and-arrow diagram.

Section 7 checklist, each item naming its source: Text (answer first; point-first paragraphs and lists; 25-word ceiling with conditions first; active voice; one term per thing and exact strings; no ambiguous pronoun, long noun stack, idiom or exception-first; claims marked checked or inferred with likelihood words and what changed; fact list checked after shortening). Diagrams (notation matches content shape; passes the C4 review checklist; title states the finding with a one-sentence takeaway; every hop drawn, each relay its own element or lifeline; only what the evidence states, unknowns as questions, time to scale only when dates are real). Pages (overview first, at most two levels, nothing most readers need hidden; claims link to evidence, charts compare by position or length; page and report agree and link; colour never the only signal, reflows at phone width, motion pausable). Animation (motion only when change over time is the content, every frame a valid diagram; viewer controls pace, narration over captions, transcript and reduced-motion fallback).

Appendix A Vale config, advisory and warn-only: a .vale.ini with StylesPath = styles, MinAlertLevel = suggestion, Packages = Google, Microsoft, and for [*.md] BasedOnStyles = Status plus only the named rules Google.Passive, Microsoft.Adverbs and Microsoft.Wordiness; a Status.SentenceLength occurrence rule (warning, max 25 words per sentence) and a Status.Idioms existence rule (warning, seed list: quick update, go(ne) ahead and, kick(ed) off, circle back, chugging, blow(s) up, worth flagging, it's worth, assuming nothing, touch base, basically). The report notes the lead-sentence (answer-first) check needs a small separate script, since Vale does not do it.

What Changed

  • Give ship and scout workers an answer-first writing profile, diagram notation map, and checklists for text, diagrams, pages, and animation.
  • Add advisory prose lint with a 25-word lead-sentence check and optional Vale checks for sentence length, idioms, passive voice, adverbs, and wordiness.
  • Cover brief integration and lint behavior with tests, and route Vale asset changes to the lint test suite.

Risk Assessment

✅ Low: The advisory lint and worker guidance are bounded, conform to the adopted intent and subsequent decisions, and introduce no substantiated material defects.

Testing

Focused CLI tests and live checks with real Vale passed, including generated instructions and advisory failure paths. Evidence contains CLI transcripts and generated Markdown; no rendered UI changed. Guidance review confirms adoption, without claiming future model compliance.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Generate ship and scout instructions containing the guidance and advisory lint command; secondmate charters omit the worker section ✅ pass live brief-generation.txt
Submit 25-word and 26-word leads: only the over-limit lead warns, with exit zero ✅ pass live real-vale-transcript.txt
Sync real Vale packages and receive all five configured style findings while plain prose remains clear ✅ pass live real-vale-transcript.txt
Lint files and stdin while handling Markdown headings, status prefixes, inline code, and diagnostic locations ✅ pass live status-file-transcript.txt; bash tests/fm-prose-lint.test.sh
Remove Vale, omit packages, or damage a cached rule: diagnostics explain degradation and lead checking continues without blocking ✅ pass live advisory-failure-transcript.txt
Invoke missing input, an unknown option, or an unreadable path and receive usage exit code two ✅ pass live advisory-failure-transcript.txt
Evidence: Real Vale rules and word boundaries

Source: Real Vale rules and word boundaries

Vale 3.24.0; real Google and Microsoft packages synced to an isolated workspace cache.
Fixture correction: Clearly is not a Microsoft.Adverbs token; used Carefully from the package rule instead.
CASE: 25-word lead
$ printf <input> | bin/fm-prose-lint.sh -
INPUT:
CI passed every required check for the release after I fixed the reported failure and reran the affected tests on the final branch this morning.
STDOUT:
STDERR:
exit=0

CASE: 26-word lead
$ printf <input> | bin/fm-prose-lint.sh -
INPUT:
CI passed every required check for the release after I fixed the reported failure and successfully reran the affected tests on the final branch this morning.
STDOUT:
stdin:1:1:Status.LeadSentence:Lead sentence has 26 words, more than 25. Put the answer first.
stdin:1:1:Status.SentenceLength:Sentence has more than 25 words. Split it.
STDERR:
exit=0

CASE: named package rules
$ printf <input> | bin/fm-prose-lint.sh -
INPUT:
The report was reviewed.

Carefully, I can help in order to finish.

Basically, we should circle back.
STDOUT:
stdin:1:12:Google.Passive:In general, use active voice instead of passive voice ('was reviewed').
stdin:3:1:Microsoft.Adverbs:Remove 'Carefully' if it's not important to the meaning of the statement.
stdin:3:23:Microsoft.Wordiness:Consider using 'to' instead of 'in order to'.
stdin:5:1:Status.Idioms:Replace the idiom or filler 'Basically' with the plain fact.
stdin:5:22:Status.Idioms:Replace the idiom or filler 'circle back' with the plain fact.
STDERR:
exit=0

CASE: plain result
$ printf <input> | bin/fm-prose-lint.sh -
INPUT:
CI passed. I fixed two conflicts. Merge requires one human approval.
STDOUT:
STDERR:
exit=0
Evidence: Advisory failures and usage errors

Source: Advisory failures and usage errors

CASE: Vale absent
INPUT: CI passed every required check for the release after I fixed the reported failure and successfully reran the affected tests on the final branch this morning.
STDOUT:
stdin:1:1:Status.LeadSentence:Lead sentence has 26 words, more than 25. Put the answer first.
STDERR:
fm-prose-lint: vale is not installed, so the Vale style checks were skipped; the lead-sentence check still ran (install vale from https://vale.sh to enable them)
exit=0

CASE: Packages not synced
INPUT: CI passed every required check for the release after I fixed the reported failure and successfully reran the affected tests on the final branch this morning.
STDOUT:
stdin:1:1:Status.LeadSentence:Lead sentence has 26 words, more than 25. Put the answer first.
stdin:1:1:Status.SentenceLength:Sentence has more than 25 words. Split it.
STDERR:
fm-prose-lint: Vale package(s) Google Microsoft not synced, so only the Status rules ran; run 'bin/fm-prose-lint.sh --sync' once to enable Google.Passive, Microsoft.Adverbs and Microsoft.Wordiness
exit=0

CASE: real Vale rejects damaged cached rule
STDOUT:
stdin:1:1:Status.LeadSentence:Lead sentence has 26 words, more than 25. Put the answer first.
STDERR:
fm-prose-lint: vale failed on stdin (exit 2); its style findings are missing:
~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.test-output-guidance/tmp/fm-prose-lint.b95gaZ/styles/Google/Passive.yml:1:E201:'extends' key must be one of [capitalization conditional consistency existence occurrence repetition substitution readability spelling sequence metric script].
exit=0

$ bin/fm-prose-lint.sh 
fm-prose-lint: no input given
fm-prose-lint: run with --help for usage
exit=2

$ bin/fm-prose-lint.sh --bogus
fm-prose-lint: unknown option: --bogus
fm-prose-lint: run with --help for usage
exit=2

$ bin/fm-prose-lint.sh ~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.test-output-guidance/missing.md
fm-prose-lint: cannot read ~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.test-output-guidance/missing.md
fm-prose-lint: run with --help for usage
exit=2
Evidence: Generated worker instructions

Source: Generated worker instructions

$ bin/fm-brief.sh prose-ship sample --mode no-mistakes
scaffolded: ~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.test-output-guidance/home/data/prose-ship/brief.md (ship, mode=no-mistakes; replace {TASK} and {FIRSTMATE_SPEC})
exit=0

Generated public instructions:
Write status lines, reports, and summaries in plain language: the first sentence carries the answer, and shortening never drops a fact.
Before you write a report, a report summary, a diagram, a review page, or an animation, read and follow `~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.agents/skills/output-conventions/SKILL.md`; it owns the full writing profile, the diagram notation map, and the output checklist.
`~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/bin/fm-prose-lint.sh <file|->` checks that prose and only warns; it never blocks.


$ bin/fm-brief.sh prose-scout sample --scout
scaffolded: ~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.test-output-guidance/home/data/prose-scout/brief.md (scout; replace {TASK} and {FIRSTMATE_SPEC})
exit=0

Generated public instructions:
Write status lines, reports, and summaries in plain language: the first sentence carries the answer, and shortening never drops a fact.
Before you write a report, a report summary, a diagram, a review page, or an animation, read and follow `~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.agents/skills/output-conventions/SKILL.md`; it owns the full writing profile, the diagram notation map, and the output checklist.
`~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/bin/fm-prose-lint.sh <file|->` checks that prose and only warns; it never blocks.


$ bin/fm-brief.sh prose-mate --secondmate --no-projects
scaffolded: ~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.test-output-guidance/home/data/prose-mate/brief.md (secondmate charter)
exit=0
Evidence: Markdown status file diagnostics

Source: Markdown status file diagnostics

$ bin/fm-prose-lint.sh status.txt
INPUT:
# Report heading

---

done [at=1792118584]: I merged the fix, rebased the branch onto main, reran the suite, and pushed the result to the remote today after checking every reported failure again.
STDOUT:
~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.test-output-guidance/status.txt:5:23:Status.LeadSentence:Lead sentence has 26 words, more than 25. Put the answer first.
~/.no-mistakes/worktrees/ff5e17b6f5de/01M51ARB0Z3K8CHPXHJN7KPVM2/.test-output-guidance/status.txt:5:1:Status.SentenceLength:Sentence has more than 25 words. Split it.
STDERR:
exit=0
Evidence: Repeatable validation procedure

Source: Repeatable validation procedure

# Output-guidance live validation

Last tested: 2026-10-16.

Run the targeted CLI behavior checks with `bash tests/fm-prose-lint.test.sh`.
For real consumer coverage, put a workspace-local Vale binary on PATH, set FM_PROSE_LINT_CACHE and TMPDIR to disposable workspace directories, then run `bin/fm-prose-lint.sh --sync`.
Vale 3.24.0 was used here; no global installation or configuration changed.

1. Generate ship and scout briefs with `bin/fm-brief.sh <id> sample --mode no-mistakes` and `bin/fm-brief.sh <id> sample --scout`, using FM_HOME inside the workspace and clearing inherited FM_* path overrides.
2. Inspect the generated public instructions for the conventions section and runnable paths. Generate a secondmate charter with `--secondmate --no-projects` and verify the worker section is absent.
3. Submit the inputs in real-vale-transcript.txt through stdin. Verify the 25-word lead is accepted, the 26-word lead warns, and each of the five configured rules produces a finding. All style findings must exit zero.
4. Submit the Markdown/status input in status-file-transcript.txt as a .txt file. Verify heading/prefix handling, original file label, and line/column reporting.
5. Remove Vale from PATH, use an empty package cache, and damage a copied cached rule in turn. Verify the distinct diagnostics in advisory-failure-transcript.txt and continued lead checking with exit zero. Restore the disposable rule after this test.
6. Invoke no arguments, an unknown option, and a missing path. These usage errors must exit two.

All writes stay in a disposable workspace subtree except published evidence. No fleet lifecycle, model login, production data, or shared service is needed.
Remove the disposable home, binary, download, package cache, and temporary files afterward.

The static worker guidance was read against the supplied writing profile, notation map, checklist, and advisory configuration. This validates instruction adoption, not model compliance in future generated reports. No rendered UI changed, so CLI transcripts and generated Markdown are the product evidence.

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 3 issues found → auto-fixed ✅
  • ⚠️ bin/fm-prose-lint.sh:47 - Remove the unrequired 15-word lead limit. Option A requires “25 words or fewer” and defines answer-first by whether the sentence gives the state, result, or decision. The added LEAD_MAX_WORDS=15 instead flags valid 16–25-word answers while accepting short introductory filler. The same extra rule appears at bin/fm-prose-lint.sh:13 and :82–83 and tests/fm-prose-lint.test.sh:43–44, :59–60, and :83–84. Removing this additional constraint is the smallest remedy; retaining it needs approval.
  • ⚠️ .agents/skills/output-conventions/SKILL.md:71 - The notation map recommends Mermaid swimlanes, which is not its diagram keyword. A worker following this instruction produces an unrenderable diagram. Use swimlane-beta, the keyword specified by the Mermaid documentation, and note its required version.
  • ⚠️ tests/fm-prose-lint.test.sh:114 - The fake Vale asserts the literal config line Google.Passive = YES and then emits a canned finding without consuming that configuration semantically. This newly added source-content assertion violates the test-quality rule and can pass with otherwise invalid configuration. Remove the grep assertion or parse the copied INI into a normalized configuration and assert its meaning; retain the separate output-relabeling checks.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Generate ship and scout instructions containing the guidance and advisory lint command; secondmate charters omit the worker section ✅ pass live brief-generation.txt
Submit 25-word and 26-word leads: only the over-limit lead warns, with exit zero ✅ pass live real-vale-transcript.txt
Sync real Vale packages and receive all five configured style findings while plain prose remains clear ✅ pass live real-vale-transcript.txt
Lint files and stdin while handling Markdown headings, status prefixes, inline code, and diagnostic locations ✅ pass live status-file-transcript.txt; bash tests/fm-prose-lint.test.sh
Remove Vale, omit packages, or damage a cached rule: diagnostics explain degradation and lead checking continues without blocking ✅ pass live advisory-failure-transcript.txt
Invoke missing input, an unknown option, or an unreadable path and receive usage exit code two ✅ pass live advisory-failure-transcript.txt
  • PATH="$PWD/.test-output-guidance/tools:$PATH" TMPDIR="$PWD/.test-output-guidance/tmp" bash tests/fm-prose-lint.test.sh
  • Downloaded and ran workspace-local Vale 3.24.0; executed bin/fm-prose-lint.sh --sync against an isolated cache.
  • Drove bin/fm-brief.sh for ship, scout, and secondmate variants with an isolated FM_HOME; inspected generated public instructions.
  • Executed real lint CLI checks for word boundaries, all configured rules, plain prose, file/stdin labels, and Markdown/status handling.
  • Exercised missing Vale, unsynced packages, real Vale configuration failure, and invalid invocations.
  • Read adopted guidance against the supplied acceptance criteria; saved repeatable verification instructions and product transcripts.
  • Removed disposable setup and confirmed git status --short was empty.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Add the output-conventions agent skill: an 8-rule writing profile built on
ISO 24495-1, BLUF/Minto, the Federal Plain Language Guidelines and ICD 203
(one custom rule: do not drop facts when shortening), a notation map that
picks the diagram notation by content shape (C4 for architecture only), and
a sourced checklist for text, diagrams, pages and animation.

Ship and scout briefs gain a short Output conventions section that points
at the skill and at bin/fm-prose-lint.sh, a warn-only lint that runs a
lead-sentence check plus the named-rule Vale config, and skips Vale cleanly
when it is not installed.
@ryannmicua
ryannmicua merged commit 4ba105e into main Oct 16, 2026
19 checks passed
@ryannmicua
ryannmicua deleted the fm/llm-output-guidance-adopt branch October 16, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant