Skip to content

docs: document harness-aware skill invocation - #24

Merged
kunchenguid merged 5 commits into
mainfrom
fm/fm-codex-skill-syntax-d2
Jun 18, 2026
Merged

kunchenguid merged 5 commits into
mainfrom
fm/fm-codex-skill-syntax-d2

Conversation

@kunchenguid

@kunchenguid kunchenguid commented Jun 18, 2026 •

Copy link
Copy Markdown
Owner

Intent

Document the firstmate shared AGENTS.md instructions so skill invocation is harness-aware for verified claude and codex crews. The change should record that claude invokes skills with / such as /no-mistakes, while codex invokes skills with $ such as -mistakes and rejects the claude slash form as an unrecognized command. The Validate step should no longer hard-code the slash form; it should tell firstmate to choose the trigger from state/.meta, keeping a concrete claude example and noting that codex uses -mistakes and natural language also works. This is intentionally scoped to AGENTS.md only; no scripts, skill files, generated files, or unrelated wording should change.

What Changed

  • Added verified claude and codex skill invocation syntax to AGENTS.md, including /no-mistakes for claude and $no-mistakes for codex.
  • Updated no-mistakes delivery and validation instructions to refer to the harness-appropriate validation pipeline instead of hard-coding slash command syntax.
  • Clarified that validation should use the harness recorded in state/<id>.meta, while keeping a concrete claude example and noting natural language also works.

Risk Assessment

✅ Low: The final branch diff is limited to AGENTS.md documentation and correctly scopes harness-aware skill invocation guidance for claude and codex without changing executable behavior.

Testing

Reviewed the AGENTS.md diff end-to-end, verified the change is scoped to AGENTS.md, checked the exact harness-aware skill invocation and validation wording, captured reviewer-visible documentation evidence, and confirmed testing left the worktree clean.

Evidence: Harness-aware skill documentation evidence

Changed files between base and target: AGENTS.md Harness-aware skill invocation documentation: 137:| Skill invocation | /&lt;skill&gt; (e.g. /no-mistakes) | 149:| Skill invocation | $&lt;skill&gt; (e.g. $no-mistakes); /&lt;skill&gt; is claude-only and codex rejects it as "Unrecognized command" | 333:For no-mistakes-mode ship tasks, when a crewmate's status says done, trigger validation using the crew's harness from state/&lt;id&gt;.meta. 334:Use /no-mistakes for claude, $no-mistakes for codex; natural language also works. 335:For example, with claude: 338:bin/fm-send.sh fm-<id> '/no-mistakes'

Changed files between base and target:
AGENTS.md

Harness-aware skill invocation documentation:
137:| Skill invocation | `/<skill>` (e.g. `/no-mistakes`) |
149:| Skill invocation | `$<skill>` (e.g. `$no-mistakes`); `/<skill>` is claude-only and codex rejects it as "Unrecognized command" |
333:For `no-mistakes`-mode ship tasks, when a crewmate's status says `done`, trigger validation using the crew's harness from `state/<id>.meta`.
334:Use `/no-mistakes` for claude, `$no-mistakes` for codex; natural language also works.
335:For example, with claude:
338:bin/fm-send.sh fm-<id> '/no-mistakes'

Relevant diff:
diff --git a/AGENTS.md b/AGENTS.md
index dfa2532..3404ecb 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -134,6 +134,7 @@ When you verify a new adapter, record its env marker and command name in that sc
 | Busy-pane signature | `esc to interrupt` |
 | Exit command | `/exit` |
 | Interrupt | single Escape |
+| Skill invocation | `/<skill>` (e.g. `/no-mistakes`) |
 
 First launch in a fresh worktree (or first ever on a machine) may show a trust or bypass-permissions confirmation.
 After every spawn, peek the pane within ~20s; if such a dialog is showing, accept it with `bin/fm-send.sh <window> --key Enter` (or the choice the dialog requires) and verify the brief started processing.
@@ -145,6 +146,7 @@ After every spawn, peek the pane within ~20s; if such a dialog is showing, accep
 | Busy-pane signature | `esc to interrupt` (shown as `• Working (Xs • esc to interrupt)`) |
 | Exit command | `/quit` (slash popup needs ~1s between text and Enter; fm-send handles it) |
 | Interrupt | single Escape |
+| Skill invocation | `$<skill>` (e.g. `$no-mistakes`); `/<skill>` is claude-only and codex rejects it as "Unrecognized command" |
 
 Directory trust dialog on first run per repo root ("Do you trust the contents of this directory?") - accept with Enter; the decision persists for the repo, so later worktrees of the same project skip it.
 Resume after exit: `codex resume <session-id>` (printed on quit).
@@ -328,7 +330,9 @@ Pooled clones keep their local default refs frozen at clone time and can lag `or
 
 ### Validate
 
-For `no-mistakes`-mode ship tasks, when a crewmate's status says `done`:
+For `no-mistakes`-mode ship tasks, when a crewmate's status says `done`, trigger validation using the crew's harness from `state/<id>.meta`.
+Use `/no-mistakes` for claude, `$no-mistakes` for codex; natural language also works.
+For example, with claude:
 
 `` `sh
 bin/fm-send.sh fm-<id> '/no-mistakes'

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • git diff --name-only a11752778de1a1efc89f23df0c065e978cd7f4ef..f08931cf4ca3f4ca011974a8a363bbfa2e9fb7bb
  • git diff --unified=3 a11752778de1a1efc89f23df0c065e978cd7f4ef..f08931cf4ca3f4ca011974a8a363bbfa2e9fb7bb -- AGENTS.md
  • test "$(git diff --name-only a11752778de1a1efc89f23df0c065e978cd7f4ef..f08931cf4ca3f4ca011974a8a363bbfa2e9fb7bb)" = "AGENTS.md" && rg -q ... AGENTS.md
  • git status --short
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@kunchenguid
kunchenguid merged commit 8216d04 into main Jun 18, 2026
3 checks passed
@kunchenguid
kunchenguid deleted the fm/fm-codex-skill-syntax-d2 branch June 18, 2026 21:15
@x45dev

x45dev commented Aug 16, 2026

Copy link
Copy Markdown

Rated High. Held for the author, and it would be held even if nothing above were flagged - this is the first product code in the repository, so the shape it establishes outlives every line in it.

What I verified independently

Not taken from the report above.

  • The owner-vocabulary boundary genuinely holds open. This was the one constraint the author set, so I checked the module rather than the claim: rollup.py contains zero owner literals of any kind, the vocabulary arrives as a Protocol the caller supplies, and the owner component is read positionally as an opaque string. two_groupings.beancount carries a header stating in terms that it asserts nothing about FR25 and exists to show the partition indifferent to the vocabulary's shape. Neither answer is assumed, and neither is made cheaper than the other.
  • 39 files, +4059/-6. All six removed lines are index and prose maintenance: the ADR-0006 annotation discussed above, specs/index.md changing "The three" to "The first three", and small edits in progress.md and pyproject.toml. No decision record file is edited, and knowledge/constitution.md shows no diff at all.
  • No named financial institution and no named hardware wallet in any added line, in any of the five commit messages, or in the pull request body. No em dashes anywhere in the diff or the commits. The committed fixture that exists to fail the guard uses a generic class word and says why.
  • All nine pipeline steps completed with zero findings; three checks pass.

On the ADR-0006 index row

The judgment to leave it is the right one and I am not asking for a revert. The constraint I set was to stop concurrent branches clobbering each other's rows; ADR-0006 is not concurrent work, the annotation is accurate, and a settled record with no forward pointer to the record that corrects it is the exact failure an index exists to prevent. Flagging it rather than quietly keeping it was correct, and so was noting that the pull request body is now stale by that one line.

What the author should know about ordering

Three branches are now waiting on him, and all three touch knowledge/adr/index.md, activeContext.md and progress.md. Whichever lands first will leave the other two needing a rebase. That is ordinary and was expected when they were dispatched in parallel; it is worth knowing only so a rebase is not read as a defect.

The two things I would look at first

  1. ADR-0025, because it corrects a settled record's phrasing from measurement rather than from argument, and the claim is that the old phrasing was wrong in both directions. That is the strongest form of correction and the one most worth confirming.
  2. Slice 2 was not written test-first, and the record says so plainly rather than presenting the result as TDD. The default asked for was test-first; the deviation is disclosed, and whether it is acceptable is the author's call rather than something to absorb silently.

Recommendation: merge, and treat the fifteen-slice plan as the thing that carries forward. The work is careful, its gaps are stated as gaps, and every place it declined to decide is a place the author still can.

NewAiCoder added a commit to NewAiCoder/firstmate that referenced this pull request Sep 26, 2026
kunchenguid#24)

* fix(bin): let a declared pause outrank a run that failed underneath it

A crew's paused: log line (e.g. "no-mistakes run in progress, clears on
its own") gets no reconciliation against a run-step that has since
failed or been cancelled, unlike needs-decision/blocked, which get an
explicit superseded annotation. When the no-mistakes daemon itself dies
mid-run, every affected crew's run-step reads failed even though each
one is still exactly where its own paused: line said it would be, so
both the stale-pane watcher and the inactive-outcome reconciler present
it as a captain-facing terminal outcome for a crew that never stopped.

Add an opt-in config/paused-run-failed-absorb presence flag: within
FM_PAUSED_RUN_FAILED_ABSORB_SECS (default 3600, measured off the
status log's own mtime to keep the crew-state helper read-only), a
fresh declared pause now outranks a failed/cancelled run-step and the
emitted state reads paused instead of failed. An expired pause, or an
invalid bound, still surfaces as failed exactly as before. Off by
default because this changes the emitted state itself, not just its
detail.

Fixes kunchenguid#3285

* no-mistakes(document): docs(agents): add missing config/paused-run-failed-absorb inventory row

---------

Co-authored-by: NewAiCoder <170579485+NewAiCoder@users.noreply.github.com>
Asaki14 added a commit to Asaki14/firstmate that referenced this pull request Oct 14, 2026
* feat(bin): add experimental Tern runtime backend (kunchenguid#24)

* feat(backend): add experimental Tern session backend

Adds bin/backends/tern.sh (one Tern session per home, one fm-<id> tab per
task, target tern:<session>/<block>), runtime detection from TERN_PANE with
TERM_PROGRAM=tern, process-level agent state, plugin-fed busy state, a
window-side Tern plugin that publishes agent state and colors task tabs,
PI_TUI_NATIVE=0 for Tern task panes, bin/fm-tern-autostart.sh, the omp idle
hint in the shared composer placeholder set, tests, and docs.

* test: clear the Tern pane marker in the shared test library

Suites run from a Tern pane otherwise auto-detect the tern backend where they
expect the no-marker tmux fallback.

* no-mistakes(review): Close exited Tern task blocks on kill; test fm-send routing

* no-mistakes(test): Gate Tern agent-state file on writer window pid, not age

* no-mistakes(document): Add Tern to stale backend lists across docs

* no-mistakes(lint): Silence intentional SC2016 warnings in Tern backend tests

* no-mistakes(ci): Lint 1 (ci-2) was caused by this PR, and I fixed it. ShellCheck SC2034 fired on `tests/fm-backend-tern.test.sh:101` because the test reset the Tern state-file cache with the assignment `FM_BACKEND_TERN_STATE_FILE_CACHED=`, a variable that is only read inside the sourced `bin/backends/tern.sh`. The invariant is that the shared lint must pass on every changed shell file, and that assignment was the only site that broke it. I changed the line to `unset FM_BACKEND_TERN_STATE_FILE_CACHED`. The behaviour is the same because tern.sh reads the variable as `${FM_BACKEND_TERN_STATE_FILE_CACHED:-}`, so unset and empty both force a fresh lookup. `bin/fm-lint.sh tests/fm-backend-tern.test.sh` now passes with the pinned ShellCheck 0.11.0, and `tests/fm-backend-tern.test.sh` passes with no failures. Behavior portable serial 2 (ci-1) was not caused by this PR, so I made no code change for it. The only failing test was `tests/fm-calm-pi-extension.test.sh`, with the error "grep disappeared from /export calm.html HTML while calm mode was on". The PR doesn't touch any Calm or Pi extension files. CI installs `@earendil-works/pi-coding-agent` unpinned (`.github/workflows/ci.yml:111,224`), so this run got Pi 1.0.4. The 1.0.x line came out on 2026-10-01 at 19:15, after main's last green run at 02:04 that day, and 1.0.4 was published on 2026-10-05. With Pi 1.0.4 installed locally in temp, the test failed the same way on this branch and on the untouched base commit b95d776. The failure comes from upstream Pi 1.0.4 changing its `/export` HTML, not from the Tern backend. It needs a separate Calm/Pi compatibility fix or a pinned Pi version in CI, both outside this PR's scope

* fix(bin): publish Tern plugin state on a fresh window's first scan (kunchenguid#25)

* tern plugin: publish current-format state as soon as window_pid is known

window.luau's last_signature started equal to the empty string, which is
also the signature of a window with no agent panes and no fm-* task tabs.
A freshly loaded window that resolves window_pid before any pane/tab
activity therefore skipped its first scan's write forever, leaving a stale
or old-format agents.json from an earlier window in place for however long
the window stayed idle - the reader in bin/backends/tern.sh then trusted
that stale file as current.

Fix: start last_signature as nil, a sentinel no real signature (including
the empty one) can ever equal, so the first scan after window_pid is known
always publishes. Writes stay change-driven after that.

Adds a regression test that drives the real window.luau through a stubbed
window-host API via the luau CLI, reproducing the exact empty-signature
race and asserting the first write happens in current format (version,
window_pid, blocks). Skips cleanly without luau on PATH, matching this
suite's existing jq/tern skip convention.

* docs: note window.luau's first-write guarantee and its luau-driven test

* fix(bin): keep omp workers' worktrees clean and read the running-agent hint as an idle composer (kunchenguid#28)

* fix(spawn): opt omp workers out of ONNX Runtime telemetry so no :memory:.ses lands in the worktree

omp's local tiny-model worker runs onnxruntime-node 1.30 with the worktree
as its cwd. Inside the worker sandbox its Microsoft 1DS telemetry cannot
write its database under ~/Library, falls back to an in-memory store, and
writes an untracked ':memory:.ses' stamp into the worktree, which made
fm-teardown.sh refuse cleanup of finished work. Every omp launch now
carries ORT_DISABLE_TELEMETRY=1, ORT's own whole-process opt-out.

* fix(composer): read omp's running-agent hint as an idle composer

While a subagent runs, omp 18.6.1 right-aligns '←← to see N running
agent(s)' on its empty composer row. Its bright keycap survived ghost
stripping, so the row read as pending input and doorbells to a worker
waiting on its subagent were skipped until the subagent finished. The hint
joins the shared idle-placeholder set beside omp's thinking-effort hint;
typed text stays pending. A status row carrying the right-aligned session
title is pinned as furniture too.

* fix(bin): stop Tern tab flicker from omp worker titles and keep firstmate-agents within the timer budget (kunchenguid#30)

* tern: keep firstmate-agents inside the timer budget; stop omp title spinner in Tern workers

* docs: record Tern 0.6.2 title-overlay and plugin timing evidence

* no-mistakes(review): Test Tern omp overlay; stop pid lookup starving scans

* no-mistakes(document): Document why plugin pid lookup skips consecutive ticks

* no-mistakes(document): Show Tern overlay in omp launch shape

* fix(bin): let fm_backend_source load the tern adapter

Main now preflights each backend adapter and its sibling libraries from an
explicit per-backend list and refuses any backend missing from it, so the
ported Tern adapter could not be sourced at all. Add tern with the three
libraries bin/backends/tern.sh sources.

* docs(verification): record the Tern 0.8.3 live run of the ported backend

* docs: add CHANGELOG entry for the Tern runtime backend

---------

Co-authored-by: Daniel Kuykendall IV <danielkuykendall23@gmail.com>
Co-authored-by: wangyao <wangyao@zhuozhuo.io>
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…unchenguid#24)

* fix(spawn): require two stable reads before accepting worktree path

Hand-integrate upstream's two-consecutive-identical non-project path
requirement into our fork's settle loop without losing stable window-id
targeting or PROJ_ABS_REAL physical compares. Keep the loop hard-bounded
(default 60 polls) and add short test overrides so never-settle cases
fail fast instead of hanging CI.

* fix(tests): stub codex and feed two settled reads in worktree-settle

Linux CI has no real harness binaries, so the settle suite's success case
failed preflight before the path loop ran. Stub codex like the other
fm-spawn fixtures, and feed an explicit stale/wt/wt sequence so success
requires two consecutive identical settled reads.
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 18, 2026
…enguid#25)

* feat(onboarding): let the first mate lead a new owner's first conversation

A new home's first conversation is now one skill, first-voyage, that the
first mate follows: the opening and tool consent, four questions asked one
at a time with their reasons (what to call them and how to talk, the one
thing they want off their plate, three house rules to keep or change plus
one of their own, and one repository), then the first project and a first
report chosen from what they said matters. The session-start digest leads
with a FIRST VOYAGE cue while the home has no captain record or no first
project, so the skill loads even from a spilled digest. ONBOARDING.md steps
4 and 5 and the handbook now point at the skill instead of spelling out
lines to type.

* no-mistakes(review): Narrow first-voyage cue and decouple onboarding from PR kunchenguid#24

* no-mistakes(review): Align onboarding check, resume cue and outward-send rule wording

* no-mistakes(review): Make handbook outward-send rule conditional on owner's choice

* no-mistakes(ci): All three checks fail for one reason: the new file `.agents/skills/first-voyage/SKILL.md` is not listed in any capability in `fork-surface.conf`. The rule it breaks: every tracked path that is not in the upstream base snapshot must belong to exactly one capability. Two checks enforce this: - "Declared fork surface" runs `bin/fm-fork-surface.sh check`. - `tests/fm-fork-surface.test.sh`, in portable serial shard 6, runs the same check on the current repo. "Full suite" failed only because those lanes failed. The skill is the only new unowned path in this PR. Fix: one line, `owns = .agents/skills/first-voyage/SKILL.md`, added to the existing `onboarding-guide` capability in `fork-surface.conf`. That capability already owns `ONBOARDING.md` and `docs/handbook.md`. No other files changed. Verification: - Before the fix, `tests/fm-fork-surface.test.sh` failed locally (exit 1) with the same unclaimed-path error as CI. - After the fix, `bin/fm-fork-surface.sh check` prints `FORK_SURFACE OK capabilities=95 owned_paths=339`. - After the fix, `tests/fm-fork-surface.test.sh` exits 0, both on its own and inside a local shard 6 run. - The full local shard 6 run (`bin/fm-test-run.sh --lane portable-serial-6of13`) did not complete: it hit the 20-minute background time limit and was stopped. - Before it was stopped, 11 test scripts finished, all with exit 0 and no "not ok" lines. - `fm-public-followup` and `fm-pi-worker-stream-live-e2e` were gate-skipped locally rather than actually run. - The rest of shard 6 was not run locally
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 18, 2026
…rst reply (kunchenguid#24)

* feat: speak to each person the way their home records

A home's recorded address and tone (what to call them, tone, emoji use,
length) now wins over the default "captain" house style from the first
reply of every session, including short confirmations, the no-news reply,
bad news and technical updates. When nothing is recorded, the first mate
asks once early and records the answer; the person can change it any time
by saying so. The plain-language, outcome-first and safety rules are
unchanged, and address still never goes into non-chat artifacts.

docs/configuration.md "Address and tone" owns the recorded format. The
desk voice reply hook reads it, so the recorded no-news reply stays silent
and its spoken notices use the recorded address.

* no-mistakes(review): Name the address-and-tone record and keep no-news reply verbatim

* no-mistakes(review): Keep verbatim no-news reply silent for lowercase addresses

* no-mistakes(review): Read address and tone only from the home's captain.md

* no-mistakes(review): Drop recorded no-news opener only before a line break

* no-mistakes(review): Match recorded no-news reply against the trimmed first line

* fix(session-start): lead the digest with the recorded address and tone

The address-and-tone section printed only in the CONTEXT stage at the end of
the digest, so a harness that shows a short preview of a large digest let the
first reply fall back to the default house style. The section, or the cue to
ask for one in a primary home, now leads the output on a fresh start and on a
context re-emit.

* no-mistakes(document): Scope address-and-tone digest docs to primary homes

* no-mistakes(review): Read a recorded "keep the defaults" as the default address

* no-mistakes(document): Document that "keep the defaults" bullets count as absent
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.

2 participants