Skip to content

feat(skills): add writing levers and a named-command reproduction rule - #25

Merged
demy00 merged 2 commits into
mainfrom
feature/fm-skills-adopt-r2
Nov 10, 2026
Merged

demy00 merged 2 commits into
mainfrom
feature/fm-skills-adopt-r2

Conversation

@demy00

@demy00 demy00 commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Intent

The captain reviewed a scout report on Matt Pocock's public skills repository and on 2026-09-07 authorised exactly two of its seven proposed items. The report is at data/fm-mattpocock-skills-r5/report.md in the firstmate home; section 6 is the numbered list and section 7 records the calls.

Item 1, authorised: add the three missing writing levers to .agents/skills/firstmate-coding-guidelines/SKILL.md - a no-op test with a safety-line scoping rule, negation as a failure mode, and completion criteria including premature completion. The report estimates twenty-five to thirty-five lines.

Item 7, authorised: add the named-command reproduction criterion and the [DEBUG-] tagging convention to .agents/skills/diagnostic-reasoning/SKILL.md. The report estimates about eight lines.

Items 2 through 6 are explicitly NOT authorised. Item 2 in particular, the no-op sweep of the always-loaded contract and the section 9 ban-list rewrite, is described in the report itself as an experiment on a safety surface and the captain did not approve it.

Captain 2026-11-09, releasing the held firstmate fixes: "5 yup" (start them, two at a time).

Substance of the referenced report items, as the report proposed them:

Item 1 (report section 3.1, adapted from mattpocock/skills writing-for-agents): one new section in firstmate-coding-guidelines, roughly 25 to 35 lines, with no new skill, no new always-loaded pointer, and no AGENTS.md change.

  • The no-op test: hunt no-ops sentence by sentence; an instruction the model already obeys by default pays load to say nothing. The test (does it change behaviour versus the default?) is model-relative, not reader-relative, and is settled by running the document, not by debate. When a sentence fails, delete the whole sentence rather than trim words. The report says this lever needs a scoping rule: on a contract carrying safety boundaries, "the model already does this by default" is a claim that needs evidence before a line is deleted, because defaults can drift between model versions; and the sweep it authorises over an always-loaded contract should be its own task with its own review, not a side effect of adding the guidance.
  • Negation is a failure mode: steering by prohibition drags the forbidden behaviour into context and makes it more available; the negation is a weak modifier the strongly activated concept overruns. Prompt the positive. A prohibition earns its place only as a hard guardrail you cannot phrase positively; even then, pair it with the positive target. Hard guardrails such as "never write to a project" stay. Rewriting the AGENTS.md section 9 ban list is a hypothesis to be tested separately (item 2), not part of this change.
  • Completion criteria and premature completion: every step ends on a completion criterion. Clarity - can the agent tell done from not-done? A vague bound ("understanding reached") invites premature completion, ending the step before it is genuinely done as attention slips to being done. The visible later steps supply the pull; the criterion's clarity is the resistance. Defend in order: sharpen the bound first; only if it is irreducibly fuzzy and you observe the rush, hide the later steps by splitting the sequence, which only works across a real context boundary (a hand-off or a subagent dispatch; an inline call clears nothing). Demand - how much it requires: "every modified model accounted for" forces thorough work where "produce a change list" does not.

Item 7 (report section 3.6, adapted from mattpocock/skills diagnosing-bugs): two edits to diagnostic-reasoning, about 8 lines. Sharpen the soft reproduction bound ("Require an end-to-end reproduction aligned with the real user path whenever it is feasible and safe") into a named-command criterion: one command (a script path, a test invocation, a curl) already run at least once with its invocation and output shown, that is red-capable, deterministic, fast, and agent-runnable - reading code to build a theory before that command exists is the exact failure the procedure prevents. And add to the scope-and-act section the convention of tagging every debug log with a unique prefix such as [DEBUG-a4f2], so cleanup is a single grep and untagged logs survive while tagged ones die.

What Changed

  • firstmate-coding-guidelines: Adds a new "Lines that earn their load" section with three writing levers:
    • The no-op test. Includes a scoping rule: a safety line stays until there is evidence it is a no-op, and any sweep of an always-loaded contract is its own task with its own review.
    • Negation as a failure mode. Says to state the positive target behavior. Hard guardrails like "never write to a project" stay, paired with their positive target.
    • Completion criteria. Judged on clarity and demand, with defenses against premature completion: sharpen the bound first, and split steps only across a real context boundary.
  • diagnostic-reasoning:
    • Replaces the soft "end-to-end reproduction whenever feasible" bound with a named reproduction command. It must already have been run once with its invocation and output shown, and be red-capable, deterministic, fast, and agent-runnable. It must exist before any code is read to build a theory.
    • Requires diagnosis briefs to tag every added debug log with a unique prefix such as [DEBUG-a4f2] and grep that prefix to delete them all before reporting.
  • CHANGELOG: Adds both changes under "Changed".

🤖 Generated with Claude Code

Risk Assessment

✅ Low: The change only edits documentation and skill text, and it stays within the two authorised items. The round-1 fix now makes the named reproduction command a requirement before any code is read to build a theory, and keeps the not-feasible fallback.

Testing

This is a markdown-only change to the skills, so there is no UI to screenshot. I ran the skill-selection and DoD worker-role tests (both pass) and ran the real skill-candidate listing, which still picks up both edited skills. I saved the delivered skill sections as evidence and checked them by hand against the authorised items 1 and 7 and the user's review decision. Everything matches, and AGENTS.md is unchanged. The worktree has no leftover artifacts.

Evidence: Delivered text of the changed skill sections

Source: Delivered text of the changed skill sections

## diagnostic-reasoning (as delivered)
## Establish the observed behavior

Start from the end user's experience rather than an internal error string or an implementation hypothesis.
Before reading code to build a theory, have a named reproduction command aligned with the real user path: one command - a script path, a test invocation, a curl - already run at least once with its invocation and output shown, and red-capable, deterministic, fast, and agent-runnable.
Reading code to build a theory before that command exists is the exact failure this procedure prevents.
If a faithful reproduction is not feasible or not safe, record the exact limitation and use the closest representative path without presenting it as equivalent evidence.
Capture the expected behavior, observed behavior, setup, inputs, and repeatability before assigning a cause.

Separate these three facts explicitly:
## Scope and act on the result

A diagnosis brief should ask for the reproduction, trigger/mask/symptom separation, divergent and proven path comparison, relevant history, smallest counterfactual, and disconfirming evidence in the report.
It should also require the investigation to tag every debug log it adds with a unique prefix such as `[DEBUG-a4f2]` and to grep that prefix to delete all of them before reporting, so cleanup is a single pass and pre-existing untagged logging survives it.
A diagnostic report should distinguish observed facts from hypotheses and state any unresolved uncertainty that could change the recommended scope.
Before acting on the report, verify that its claimed cause explains the end-user reproduction and the proven path without relying on an untested masking condition.
If a load-bearing element is missing, route a focused follow-up investigation instead of treating confidence or implementation detail as proof.
A diagnosis or implementation-ready recommendation is evidence, not authorization to change code.

## firstmate-coding-guidelines new section
## Lines that earn their load

Size discipline governs where a fact goes; these three levers govern whether a line should exist at all and how it should be phrased.
They apply to every document an agent consumes: `AGENTS.md`, a skill, a brief scaffold, or a doc one of those points at.

**The no-op test.**
Hunt no-ops sentence by sentence: an instruction the model already obeys by default pays load to say nothing.
The test - does this sentence change behavior versus the default? - is model-relative, not reader-relative, so two people disagreeing about a no-op disagree about the default and settle it by running the document rather than by debate.
When a sentence fails the test, delete the whole sentence rather than trim words from it.
Scoping rule for safety lines: on a surface carrying a safety boundary, "the model already does this by default" is a claim that needs evidence before the line goes, because a default can drift between model versions and some prohibitions are load-bearing for exactly that reason.
Keep such a line until that evidence exists, and run a sweep of an always-loaded contract as its own task with its own review rather than as a side effect of another change.

**Negation is a failure mode.**
Steering by prohibition drags the forbidden behavior into context and makes it more available, not less: the negation is a weak modifier that the strongly activated concept overruns, so the ban half-reads as an instruction to do the thing.
Prompt the positive, stating the target behavior rather than its opposite.
A prohibition earns its place only as a hard guardrail you cannot phrase positively, such as `AGENTS.md`'s "never write to a project"; even then, pair it with the positive target.
In material you are drafting, read a long enumerated ban list as a signal that the positive statement is missing, or that it is already there and doing the real work.
On a surface carrying a safety boundary, this lever is a reading, not a license: rewriting its prohibitions into positives is its own task with its own review, never a side effect of another change.

**Completion criteria, and premature completion.**
Every step you write for an agent ends on a completion criterion, judged on two axes.
Clarity is whether the agent can tell done from not-done: a vague bound ("understanding reached") invites premature completion, where the step ends before it is genuinely done because attention has slipped to being done.
Demand is how much the criterion requires: "every modified model accounted for" forces thorough work where "produce a change list" does not.
The visible steps still ahead supply the pull toward premature completion, and the criterion's clarity is the resistance.
Defend in that order: sharpen the bound first, and only if it is irreducibly fuzzy and you observe the rush, hide the later steps by splitting the sequence.
Splitting only works across a real context boundary such as a hand-off or a subagent dispatch, because an inline call leaves the later steps in context and clears nothing.

## Trigger hygiene
Evidence: Worker skill candidates still include both changed skills

Source: Worker skill candidates still include both changed skills

diagnostic-reasoning [project] .agents/skills/diagnostic-reasoning/SKILL.md firstmate-coding-guidelines [project] .agents/skills/firstmate-coding-guidelines/SKILL.md

  diagnostic-reasoning [project] .agents/skills/diagnostic-reasoning/SKILL.md
  firstmate-coding-guidelines [project] .agents/skills/firstmate-coding-guidelines/SKILL.md

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ⚠️ .agents/skills/diagnostic-reasoning/SKILL.md:20 - The reproduction rule is weaker than the intent asks for. The intent says to "Sharpen the soft reproduction bound ... into a named-command criterion" and says "reading code to build a theory before that command exists is the exact failure the procedure prevents". The diff keeps the soft bound on line 19 and adds the command only as "Its strongest form ... produce one whenever you can, because reading code to build a theory in place of a reproduction is the exact failure". Two things change: (1) the named command becomes an optional ideal instead of the completion criterion, and (2) "before that command exists" becomes "in place of a reproduction". Under (2), an agent may read code and form a theory first, as long as it reproduces at some point later. That is exactly the ordering failure the report wanted to block, and the vague bound is what this change's own completion-criteria lever warns about. Suggested remedy: state the named command as the criterion that must be met before code-reading for a theory starts, and keep the 'not feasible' fallback on the next line for cases with no faithful repro. This reverses a deliberate wording choice, so the author should confirm.

🔧 Fix: Require named reproduction command before theory-building code reads
1 info still open:

  • ℹ️ CHANGELOG.md:16 - This entry doesn't read correctly. "requires a named ... reproduction command before reading code ..., unless ..., and for tagged debug logs that are removed before reporting" has no verb for the second clause. It also drops the "or not safe" fallback that the skill states. Suggested wording: "Bug diagnosis now requires a named, already-run reproduction command before reading code to build a theory (unless a faithful reproduction is not feasible or not safe), and requires every added debug log to be tagged and removed before reporting."
✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-skill-select.test.sh - checks how skill frontmatter is discovered and parsed when choosing worker skills (all pass)
  • bash tests/fm-dod-lib.test.sh - covers the worker role that names firstmate-coding-guidelines and gives its fallback SKILL.md path (all pass)
  • bash bin/fm-skill-select.sh --candidates --project firstmate --harness devin --project-dir $PWD - real consumer; both changed skills are still listed as valid candidates
  • Manual check of the delivered text against the intent: the named, already-run reproduction command (red-capable, deterministic, fast, agent-runnable) must exist before code-reading for a theory starts, and the not-feasible fallback is on the next line; the [DEBUG-a4f2] tagging and grep cleanup is in the scope-and-act section; the new 28-line section covers the no-op test with its safety-line scoping rule, negation as a failure mode, and completion criteria including premature completion
  • git diff --name-only 4123a5eb 23538cb5 - confirms AGENTS.md is untouched, so none of the unauthorised items 2-6 (including the section 9 ban-list rewrite) are present
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Adopt the two authorised items from the mattpocock/skills scout report.

firstmate-coding-guidelines gains a "Lines that earn their load" section
covering the three levers it lacked: the no-op test, with a scoping rule
that keeps a safety-boundary line until evidence shows it is a no-op and
requires an always-loaded sweep to be its own reviewed task; negation as
a failure mode, with prompt-the-positive, the hard-guardrail carve-out,
and a guard that keeps prohibition rewrites on a safety surface out of
unrelated changes; and completion criteria judged on clarity and demand,
with premature completion and the context-boundary limit on splitting.

diagnostic-reasoning names the strongest reproduction form - one
already-run command, output shown, red-capable, deterministic, fast, and
agent-runnable - and has diagnosis briefs require [DEBUG-<hash>] tagged
debug logs that are grepped out before reporting.

Items 2 through 6 of the report are not authorised and are untouched;
no no-op sweep was run on AGENTS.md or any other file.
@demy00
demy00 merged commit d62787f into main Nov 10, 2026
23 checks passed
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