agentleFS
kontouraikontourai/station/AGENTS.md

station

AGENTS.md2 starsChanged 59 days agoApache-2.0View on GitHub

main is governed by the main requires green checks ruleset, and a merge queue is part of it. What that means in practice: - Arm auto-merge; do not merge by hand. gh pr merge <n> --repo kontourai/station --auto. Auto-merge is opt-in PER PR — a PR whose checks are green but which nobody armed simply sits forever. That, not a broken gate, is the usual reason a ready PR has not landed. - Pass no merge-method flag. The queue owns…

  • Commits and pushes

The file

We split this AGENTS.md into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use an isolated Station home, instance name, and non-default ports.

    line 7
  2. Very specific:

    Run npm run dependencies:ci to arm hooks.

    line 8
  3. Very specific:

    Never git push --no-verify.

    line 10
  4. Distinctive:

    If an explicit submission handoff is active, freeze the worktree.

    line 15
  5. Distinctive:

    Arm, confirm once with the query above, then stop: Never poll the queue; a red or conflicted dequeue shows only on the PR itself.

    line 51
  6. Distinctive:

    Commit and confirm a clean tree before mutation.

    line 75
  7. Distinctive:

    Read docs/glossary.md, the affected canonical guide, and docs/architecture/module-map.md only when their topic is in scope.

    line 100
  8. Very specific:

    After changes, run veritas readiness and address any FAIL lines before finishing.

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Station agent instructions

Start here

  • GitHub owns live work state. Check git status -sb and its relationship to origin/main.
  • Work only in a sibling worktree (../station-worktrees/<lane>), never the primary checkout or a nested worktree. Preserve intentional changes: never use git stash; after review begins, integrate upstream with git merge origin/main, not rebase.
  • Use an isolated Station home, instance name, and non-default ports. Ports 3141 and 3000 belong to the user.
  • Run npm run dependencies:ci to arm hooks. Before editing, use npm run gate:for -- <paths...>; it routes to focused evidence. Run selected tests with npm run test:focused -- <file...>, not ad-hoc npx vitest.
  • Managed installs use pinned pnpm; npm run is the script interface. Never run raw npm installs in this workspace.
  • Never git push --no-verify; no required CI check re-runs the pre-push gates. The transfer gate reads STATION_TRANSFER_BASELINE_ROOT; slow hardware raises STATION_TRANSFER_CAPTURE_TIMEOUT_MS (see docs/guides/testing.md).
  • npm run test:changed -- --base=origin/main --explain selects a diagnostic lane; exit 3 is provisional/deferred, not completion. For ordinary pull requests, run focused evidence and npm run ci:fast; GitHub's merge queue verifies the synthesized latest-main candidate. Do not run npm run full:regression locally merely because main moved.
  • Pre-push and PR CI own the full typecheck; locally use gate:for evidence or one typecheck:<lane>, and never background a full typecheck or ci:fast to poll its sentinel. Every lane shares host-wide tsc slots (testing guide).
  • The reusable hosted full-regression workflow owns canonical completion receipts for Nightly and tagged preview/stable promotions. CI workflow_dispatch is the explicit diagnostic escape hatch. Builder tests-evidence uses that exact-SHA promotion receipt; focused test evidence remains diagnostic.
  • Diagnose the failure rather than rerun-to-green: a red lane is a signal to diagnose, not a request to rerun until green. For a redundant same-digest run, join or reuse the existing lease.
  • If an explicit submission handoff is active, freeze the worktree. Never use shell background or relaunch loops, and do not edit or remove a worktree with a live handoff.

Landing a pull request

main is governed by the main requires green checks ruleset, and a merge queue is part of it. What that means in practice:

  • Arm auto-merge; do not merge by hand. gh pr merge <n> --repo kontourai/station --auto. Auto-merge is opt-in PER PR — a PR whose checks are green but which nobody armed simply sits forever. That, not a broken gate, is the usual reason a ready PR has not landed.
  • Pass no merge-method flag. The queue owns the strategy, and gh pr merge --squash is refused with The merge strategy for main is set by the merge queue. Do not reach for allowed_merge_methods to settle this: the pull_request rule lists ["squash","merge"], which reads as permission to pass --squash and is the wrong conclusion. The binding value is merge_method: "SQUASH" on the merge_queue rule (gh api repos/kontourai/station/rulesets/<id>). The queue squashes; you just do not get to say so.
  • gh pr merge warns on success — read the queue, not the exit text. A refused method flag prints a ! line that looks like a failure while the PR is queued anyway, and a second attempt then reports already queued to merge. autoMergeRequest is also null for an entry that is already IN the queue, so the obvious check says "not armed" when it is. Confirm against the queue itself:

    gh api graphql -f query='{ repository(owner:"kontourai", name:"station") {
      mergeQueue { entries(first:20) { nodes {
        position state pullRequest { number } } } } } }'
  • The queue batches (3 builds, 3 merges, ALLGREEN); a red entry is removed and those behind it rebuild.
  • Automate with the app token, not your quota (setup); read PR and check status over REST (gh api repos/...).
  • Arm, confirm once with the query above, then stop. Never poll the queue; a red or conflicted dequeue shows only on the PR itself.
  • Required checks: fast-checks, CodeQL JavaScript and TypeScript, Dependency review, Windows PR portable floor, build-ios-verification, Merge-queue regression (the ruleset is the authority: gh api repos/kontourai/station/rules/branches/main). Branches are NOT required to be up to date (strict: false), so you do not have to rebase onto every intervening commit — but two independently green PRs can still break main in combination. main-health.yml files a P1 when that happens.
  • Attribution matters. The ruleset sets require_extra_approval_for_unattributed_changes, so a commit whose author GitHub cannot attribute needs an extra approval. Keep authorship real and put delegate credit in a Co-authored-by: trailer.
  • Do not arm another lane's in-flight PR. Coordinate with the owning session first (ListAgents / SendMessage); a merge is not yours to make because the checks happen to be green.

Test and performance evidence

Tests must reach the behavior their names claim and fail when it breaks. Structural scans prove structural rules; helper tests do not prove caller integration. Missing prerequisites and caught errors must not become success.

For fixture repair, cleanup, or performance work, follow the test-effectiveness route. npm run gate:for -- <paths> prints the executable checks. Use typed fixtures and real user actions; profile before adding performance abstractions.

Commit and confirm a clean tree before mutation. Preserve intervening edits and report baseline, injected failure, and restored outcomes. Review the delta of a fix, and bind measurements to their revision and environment.

Issue references

archive#NNNN is kontourai/station-archive, the pre-2026-08-28 history. Here, #27–#601 re-file archive issues under new numbers (most carry a "Migrated from the pre-public backlog" line), so low numbers exist in both repos.

A bare #NNNN means this repo, except pre-reset text in areas the sweep skipped (notably packages/cli, packages/sdk, packages/connect, scripts). When unsure, check both repos. Write #NNNN for this repo, archive#NNNN for the archive.

Read only the route you need

For behavior or public-contract changes, use documentation-audit.

Codex loads only this root automatically; read the routed scope explicitly. Claude's nested CLAUDE.md imports its paired AGENTS.md.

Touched pathRead
Documentationdocs/guides/documentation.md
src-server/**src-server/AGENTS.md
src-ui/**src-ui/AGENTS.md
scripts/**, .github/**, root configuration, package scriptsscripts/AGENTS.md
src-desktop/**src-desktop/AGENTS.md
packages/contracts/**packages/contracts/AGENTS.md
packages/sdk/**packages/sdk/AGENTS.md
tests/**tests/AGENTS.md

Read docs/glossary.md, the affected canonical guide, and docs/architecture/module-map.md only when their topic is in scope. Station consumes sibling Kontour products through published contracts, never their internals.

<!-- veritas:governance-block:start -->

This repo uses Veritas for AI governance. Read .veritas/GOVERNANCE.md before making changes. After changes, run veritas readiness and address any FAIL lines before finishing.

<!-- veritas:governance-block:end -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.