Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f5c983c
fix(test): settle Pi follow-up pane before the duplicate-captain-answ…
bingb0t5 Aug 24, 2026
fbf0bb8
feat: automatic /stow via session-start re-emit and heartbeat stalene…
bingb0t5 Aug 24, 2026
3ecfc10
no-mistakes(review): gate auto-stow on attempt marker, lock ownership
bingb0t5 Aug 24, 2026
2077b5f
feat(ci): add fail-closed CEO-overview PR communication gate
bingb0t5 Aug 24, 2026
8c6c3d2
fix: document Pi heartbeat auto-stow gap and harden stow-due tests
bingb0t5 Aug 24, 2026
1fa9463
feat(bin): serve the fleet's quota dashboard on the tailnet
bingb0t5 Aug 24, 2026
2f10cde
no-mistakes(review): fix status classification, escaping, and test te…
bingb0t5 Aug 24, 2026
158bfae
no-mistakes(review): fix pace colors, NaN countdown, systemd PATH, pa…
bingb0t5 Aug 24, 2026
647d42a
no-mistakes(review): round percent display and mark stale providers a…
bingb0t5 Aug 24, 2026
469c200
fix(bin): outlive quota-axi's per-provider timeout on the dashboard
bingb0t5 Aug 24, 2026
b96295f
no-mistakes(review): Make quota dashboard tests executable
bingb0t5 Aug 24, 2026
ac401ea
no-mistakes(review): Fix PR template validation and transient drift f…
bingb0t5 Aug 24, 2026
576888d
no-mistakes(review): Cap automatic stow interval safely
bingb0t5 Aug 24, 2026
5f9b98c
no-mistakes(document): Clarify PR communication gate documentation
bingb0t5 Aug 24, 2026
3b8cafc
no-mistakes(document): Document automatic stow triggers and Pi follow-up
bingb0t5 Aug 24, 2026
49fb7f3
no-mistakes(lint): Fix numeric stow interval lint comparison
bingb0t5 Aug 24, 2026
3b03014
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
7f44357
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
39bbea4
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
3de9707
fix(ci): run PR communication on pull_request for the introducing PR
bingb0t5 Aug 24, 2026
500a9af
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
c462b58
Merge pull request #2 from bingb0t5/fm/fm-pi-followup-duplicate-answer
bingb0t5 Aug 24, 2026
0caa2d3
Merge pull request #3 from bingb0t5/fm/fm-quota-dashboard-ship
bingb0t5 Aug 24, 2026
1dde744
no-mistakes(document): Clarify PR communication drift guarantees
bingb0t5 Aug 24, 2026
184018d
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
8c62aa3
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
1867e98
feat(ci): add fail-closed CEO-overview PR communication gate
bingb0t5 Aug 24, 2026
b04ad89
no-mistakes(review): Fix PR template validation and transient drift f…
bingb0t5 Aug 24, 2026
74f6947
no-mistakes(document): Clarify PR communication gate documentation
bingb0t5 Aug 24, 2026
71d638c
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
762d275
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
fc0bb6a
fix(ci): run PR communication on pull_request for the introducing PR
bingb0t5 Aug 24, 2026
89fd01b
no-mistakes(document): Clarify PR communication drift guarantees
bingb0t5 Aug 24, 2026
a3a5b41
no-mistakes: apply CI fixes
bingb0t5 Aug 24, 2026
27ab81d
fix(ci): fail closed on 401/403/404 remote SoT errors
bingb0t5 Aug 24, 2026
3927db5
no-mistakes(review): Harden trusted entrypoint and remote failure ver…
bingb0t5 Aug 24, 2026
7b1a356
Merge pull request #4 from bingb0t5/fm/fm-pr-comms-gate
bingb0t5 Aug 24, 2026
8c74f4e
Merge pull request #5 from bingb0t5/fm/fm-auto-stow-ship
bingb0t5 Aug 24, 2026
ab08a24
no-mistakes(review): Close trusted workflow and fallback pin bypasses
bingb0t5 Aug 24, 2026
11f809b
no-mistakes(review): Allow remote-authorized assessor synchronization
bingb0t5 Aug 24, 2026
4f0bbfc
no-mistakes(document): Document fail-closed PR communication verifica…
bingb0t5 Aug 24, 2026
503b615
Merge fork main preserving PR 5 and PR communication gate
bingb0t5 Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .agents/skills/stow/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,16 @@ Extend the completion receipt with one entry per secondmate alongside the primar
Keep those entries in the same plain captain-facing language the rest of the receipt uses.
The session is reset-safe only when every home is within its own budget with no unresolved exception.

## Automatic /stow markers

Every `/stow` invocation in every home - primary or secondmate - updates the staleness markers below after that home's own pass (and, in a primary home, after the cascade above).
A secondmate home still performs this step even though it never cascades further.

When, and only when, the whole pass for this home - including the cascade above in a primary home - is reset-safe, touch `state/.last-stow` (`touch state/.last-stow`); never touch it when reset-safe cannot be claimed.
Then touch `state/.last-stow-attempt` (`touch state/.last-stow-attempt`) as the pass's true final step, unconditionally, on every `/stow` invocation - reset-safe or not, and whatever exceptions stayed unresolved.
Both are bare-mtime markers mirroring `state/.last-heartbeat` (`bin/fm-watch.sh`): `state/.last-stow` records the last fully reset-safe pass, while `state/.last-stow-attempt` records that a pass ran at all and is the marker the automatic `/stow` triggers in `AGENTS.md` read to decide whether another pass is due.
A home carrying a sticky exception it cannot clear on its own - a `deferred` secondmate, an unresolved over-budget home, a shared preference still routing to the primary - therefore stays throttled to one automatic pass per interval instead of re-running on every heartbeat.

## Scope exclusion: no skill storage by the pass

The stow pass itself must never store, create, or edit a skill as a destination for any finding.
Expand Down
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- Write this for a non-programmer CEO. Be specific, plain spoken, and concise. -->
<!-- Shared template. Canonical copy: lalo-platform/.github/PULL_REQUEST_TEMPLATE.md - edit there first, then sync every repo copy identically. -->

## CEO overview

- **What is changing:**
- **Why it matters:**
- **Customer or business impact:**
- **Risk and rollout:**

## What changed technically

<!-- Concise implementation detail for reviewers. -->

## Validation

- **Checks passed:**
- **Checks not run:**
- **Evidence and limitations:**

<!-- One of:
Module extracted or moved: ...
Current module retained: ...
Extraction deferred: ...
Not applicable: documentation/config-only change.
-->

## Module-boundary decision

## Decision needed

No decision required.
53 changes: 53 additions & 0 deletions .github/workflows/pr-communication-sot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Trusted source-of-truth verification for the vendored PR communication
# assessor. This workflow executes only base-branch code and treats the
# proposed head checkout as untrusted data.

name: pr-communication-sot

on:
pull_request_target:
branches:
- main
types: [opened, edited, synchronize, reopened]

permissions:
contents: read

concurrency:
group: pr-communication-sot-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
verify-source-of-truth:
name: verify-source-of-truth
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out trusted verifier
uses: actions/checkout@v6
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false

- name: Check out proposed files as untrusted data
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
path: .pr-head
persist-credentials: false

- uses: actions/setup-node@v6
with:
node-version: 22

- name: Compare proposed assessor with lalo-admin SoT
env:
PR_COMMUNICATION_CANDIDATE_ROOT: .pr-head
PR_COMMUNICATION_SOT_TOKEN: ${{ secrets.PR_COMMUNICATION_SOT_TOKEN }}
run: node scripts/pr-communication/check-drift.mjs

- name: Assess PR communication with verified code
env:
PR_TITLE: ${{ github.event.pull_request.title }}
PR_BODY: ${{ github.event.pull_request.body }}
run: node --experimental-strip-types .pr-head/scripts/check-pr-communication.ts
49 changes: 49 additions & 0 deletions .github/workflows/pr-communication.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Immediate PR communication gate (CEO overview, Decision needed,
# Module-boundary decision, Validation). Re-runs on description edits.
#
# Assessor is vendored from lalo-admin; the trusted pr-communication-sot
# workflow verifies pull-request copies against the private source of truth.
# Kept separate from CI so body-only edits do not re-run the full matrix.
#
# This repo has no package.json, so Node's built-in type stripping executes the
# assessor without downloading a package from the npm registry.
#
# Use pull_request, not pull_request_target. The introducing PR adds the
# checker; checking out the base branch cannot run it until that lands.
# No private secret is exposed to code from the proposed head.

name: pr-communication

on:
pull_request:
branches:
- main
types: [opened, edited, synchronize, reopened]

permissions:
contents: read
pull-requests: read

concurrency:
group: pr-communication-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
pr-communication:
name: pr-communication
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- uses: actions/setup-node@v6
with:
node-version: 22

- name: Assess PR communication
env:
PR_TITLE: ${{ github.event.pull_request.title }}
PR_BODY: ${{ github.event.pull_request.body }}
run: node --experimental-strip-types scripts/check-pr-communication.ts
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ state/ runtime records and signals; gitignored
.hash-* .count-* .stale-* .stale-since-* .paused-* .wedge-escalations-* .writing-* .seen-* .hb-surfaced-* .last-* .heartbeat-streak watcher internals; never touch
.watch-triage.log watcher's absorbed-wake debug log (size-capped); never relied on, safe to delete
.last-watcher-beat watcher liveness beacon, touched every poll (including while absorbing benign wakes); guard scripts read it
.last-stow bare-mtime marker touched only by the stow skill, only at the end of a reset-safe pass; the durable record of the last clean /stow
.last-stow-attempt bare-mtime marker touched by the stow skill at the end of every /stow pass, reset-safe or not; read by fm-session-start.sh's compact/clear re-emit and by section 8 rule 4's heartbeat check to gate automatic /stow
.subsuper-* .supervise-daemon.* sub-supervisor internals; never touch
.no-mistakes/ local validation state and evidence; gitignored
```
Expand Down Expand Up @@ -257,7 +259,7 @@ Route durable knowledge to its most specific owner:
Firstmate never writes a project's `AGENTS.md` directly.
A crewmate creates or updates it lazily through the project's selected delivery path, using `bin/fm-ensure-agents-md.sh` and preferring pointers to authoritative sources over copied detail.
Keep fleet delivery posture and captain-private strategy out of project memory.
When the captain invokes `/stow`, load the `stow` skill for its memory curation, knowledge routing, and persistence of the open work records this session is holding; it files and corrects only the open work that session is holding, and never reconciles the backlog against repository or PR reality.
When the captain invokes `/stow` or an automatic trigger says it is due, load the `stow` skill for its memory curation, knowledge routing, and persistence of the open work records this session is holding; it files and corrects only the open work that session is holding, and never reconciles the backlog against repository or PR reality.

## 7. Task lifecycle

Expand Down Expand Up @@ -409,6 +411,7 @@ Handle actionable wakes as follows:
2. For `stale:`, inspect the recorded endpoint and load `stuck-crewmate-recovery` for a stopped, looping, confused, or unresponsive worker; a deep-inspection reason also requires current-state and validation-log inspection.
3. For `check:`, act on the named poll result, including merges, Relay events, process-to-event source results, and captain inbox notes; a handled inbox note is also acknowledged with `bin/fm-inbox.sh drain --ack <id>`, or it stays counted as still waiting for firstmate.
4. For `heartbeat:`, review the whole fleet from the structured fleet view, reconcile suspicious tasks and PR state, update the backlog, and never report an unchanged fleet as progress.
When the captain has explicitly enabled automatic stow for this home with `config/auto-stow`, also check `state/.last-stow-attempt`'s age against `FM_AUTO_STOW_INTERVAL_SECS` (default ~24h, a separate and larger clock than the heartbeat's own cadence); when due, run `/stow` first, before the rest of this review, so an automatic pass does not run on every heartbeat. That marker records an attempted pass rather than a reset-safe one, so a home holding an exception `/stow` cannot clear still waits out the full interval before the next automatic pass.

When any wake reports a merged PR for a project cloned in this home, refresh that clone through the guarded fleet-sync path.
When Relay-linked work reaches a milestone or terminal state, load `fmx-respond`; before terminal teardown, use its promised-final reconciliation when a typed public commitment exists, otherwise post the final completion follow-up so the link clears even if earlier follow-ups were spent.
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ A GitHub Actions check (`Require no-mistakes`) runs on PRs targeting `main` and
It evaluates every PR opening and body edit independently, so a later edit cannot replace an earlier pending compliance check.
GitHub Actions and Dependabot are exempt so their automation keeps working, but regular contributor PRs without the signature will not be reviewed or merged.

A second check (`pr-communication`) enforces the pull request communication structure shared with the Lalo repos.
Use [`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md) for the required CEO overview, validation, module-boundary decision, and decision-needed sections.
The assessment rules are vendored from `lalo-admin`; the local pin always guards that copy against unreviewed changes, and the companion `pr-communication-sot` check compares it with that remote source of truth using only `PR_COMMUNICATION_SOT_TOKEN`.
The remote comparison fails closed when the credential is missing or rejected, and only network errors, HTTP 408 or 429, and server-side HTTP 5xx responses may fall back to the trusted local pin.

## Workflow

1. Fork the repo, then clone the parent repo or set your local `origin` back to the parent (`git@github.com:kunchenguid/firstmate.git`).
Expand Down
Loading