Repository navigation
docs: document harness-aware skill invocation - #24
Conversation
|
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 independentlyNot taken from the report above.
On the
|
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>
* 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>
…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.
…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
…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
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
AGENTS.md, including/no-mistakesfor claude and$no-mistakesfor codex.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 |/<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:Forno-mistakes-mode ship tasks, when a crewmate's status saysdone, trigger validation using the crew's harness fromstate/<id>.meta. 334:Use/no-mistakesfor claude,$no-mistakesfor codex; natural language also works. 335:For example, with claude: 338: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..f08931cf4ca3f4ca011974a8a363bbfa2e9fb7bbgit diff --unified=3 a11752778de1a1efc89f23df0c065e978cd7f4ef..f08931cf4ca3f4ca011974a8a363bbfa2e9fb7bb -- AGENTS.mdtest "$(git diff --name-only a11752778de1a1efc89f23df0c065e978cd7f4ef..f08931cf4ca3f4ca011974a8a363bbfa2e9fb7bb)" = "AGENTS.md" && rg -q ... AGENTS.mdgit status --short✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.