martin-loop
AGENTS.md409 starsChanged 3 months agoApache-2.0View on GitHub
This file is the sole durable operating guide for AI agents and automation working on MartinLoop. Do not treat historical release notes, old audits, old handoff files, previous branches, terminal history, or prior session summaries as current instructions. Development authority: the private MartinLoop development repository Public distribution repository: Keesan12/martin-loop All implementation starts, is reviewed, and is health-proven in the private development authority before public promotion begins. The public repository is a distribution surface, not a development workspace. For current release/version…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
33 rules. About 0 are common, 31 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈31
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Do not treat historical release notes, old audits, old handoff files, previous branches, terminal history, or prior session summaries as …
- Distinctive: line 17
All implementation starts, is reviewed, and is health-proven in the private development authority before public promotion begins.
- Distinctive: line 31
Do not infer current status from dates or claims embedded in old documentation.
- Distinctive: line 37
start from current private main.
- Distinctive: line 38
create a private feature/fix branch.
- Distinctive: line 40
run the required targeted and repo health checks.
- Distinctive: line 44
run the required private-main health proof.
- Distinctive: line 46
only then begin public promotion.
- Distinctive: line 48
Never implement the real fix directly in the public repository.
- Distinctive: line 56
Do not reorder the sequence unless an existing release controller explicitly requires it.
- Distinctive: line 58
Do not create an additional release phase merely because another agent used one previously.
- Distinctive: line 64
Use the canonical release commands instead of manually editing SHA coordinates or divergence hashes:
- Very specific: line 71
Never hand-edit validatedReleaseSha, privateMainShaValidated, privateMergeSha, publicBaseSha, privateSha256, or publicSha256 merely to make …
- Very specific: line 73
Never create version-specific apply-promotion-XYZ scripts.
- Distinctive: line 75
If exact-SHA health evidence is stale, regenerate it by rerunning the canonical health command.
- Distinctive: line 77
If a reviewed content divergence cannot be three-way merged cleanly, stop on that exact path and reconcile the conflict explicitly.
- Distinctive: line 83
When the promotion guard reports a mismatch, resolve only the exact missing, extra, or changed paths it reports.
- Distinctive: line 85
Do not weaken the guard, downgrade its schema, fabricate divergence entries, or hand-select a smaller release surface merely to make the …
- Distinctive: line 91
Never bypass repository-owned public-write controls.
- Distinctive: line 93
If local policy blocks the final authorized public push/PR step after the candidate is fully validated, stop at that boundary and return …
- Distinctive: line 106
Do not place release authority, evidence, manifests, patches, acceptance results, or agent handoff state in:
- Distinctive: line 123
Use the repository's existing scripts and dependency order.
- Distinctive: line 127
When a required gate fails:
- Distinctive: line 134
Do not respond to one failing gate by starting a broad audit.
- Distinctive: line 136
Do not reopen previously closed issues without a new deterministic reproduction.
- Distinctive: line 138
Only a new deterministic P0 or launch-blocking P1 should interrupt a locked final-ship sequence.
- Distinctive: line 142
When a release controller or workflow is intentionally replaced, old tests that assert the retired protocol must be removed or replaced by …
- Distinctive: line 144
Do not keep two executable test suites that assert mutually exclusive release protocols.
- Distinctive: line 154
Do not reintroduce temporary version-pinned push recovery hooks.
- Distinctive: line 158
Do not blindly replace version strings.
- Distinctive: line 160
Before release/version changes, distinguish:
- Distinctive: line 189
Never weaken entitlement, authentication, token, workspace, tenant-isolation, receipt-integrity, or verifier behavior merely to make an …
- Distinctive: line 199
Do not invent additional gates after the defined acceptance matrix is satisfied.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.
Files
MartinLoop Agent Operating Rules
This file is the sole durable operating guide for AI agents and automation working on MartinLoop.
Do not treat historical release notes, old audits, old handoff files, previous branches, terminal history, or prior session summaries as current instructions.
Repository authority
Development authority:
the private MartinLoop development repository
Public distribution repository:
Keesan12/martin-loop
All implementation starts, is reviewed, and is health-proven in the private development authority before public promotion begins.
The public repository is a distribution surface, not a development workspace.
Current-state authority
For current release/version state, use only:
- current Git branch / commit state;
package.json;packages/mcp/package.json;docs/release/VERSION-LEDGER.md;- current required release checks and current open PRs.
Do not infer current status from dates or claims embedded in old documentation.
Required development sequence
For product changes:
- start from current private
main; - create a private feature/fix branch;
- implement privately;
- run the required targeted and repo health checks;
- open a private PR;
- merge only after the change is reviewed and green;
- sync fresh private
main; - run the required private-main health proof;
- record the validated private release SHA;
- only then begin public promotion.
Never implement the real fix directly in the public repository.
Required release sequence
Use this order:
private authority → private health proof → clean public staging → promotion guard → public tests → public PR → public merge → publish → fresh-install proof → production E2E.
Do not reorder the sequence unless an existing release controller explicitly requires it.
Do not create an additional release phase merely because another agent used one previously.
Public promotion
Public promotion must be derived from the validated private release authority and the exact current public base.
Use the canonical release commands instead of manually editing SHA coordinates or divergence hashes:
- on clean private
main, runpnpm release:health:evidence; this executes the canonical health matrix and binds the evidence to the exact currentHEAD; - from the same exact private
HEAD, runpnpm release:promotion:prepare -- --public-repo <public-checkout>; - the preparer fetches current public
main, derives the public base SHA, createspublic-staging/<version>only from that base, copies the complete non-divergent surface, and three-way merges reviewed content divergences using previous-private → current-private changes over the current public base; - review the staged public diff, commit it, and run
pnpm public:promotion-guardfrom the public staging checkout.
Never hand-edit validatedReleaseSha, privateMainShaValidated, privateMergeSha, publicBaseSha, privateSha256, or publicSha256 merely to make a release guard pass.
Never create version-specific apply-promotion-XYZ scripts. The canonical preparer is the reusable promotion path.
If exact-SHA health evidence is stale, regenerate it by rerunning the canonical health command. Do not rewrite its SHA or timestamp.
If a reviewed content divergence cannot be three-way merged cleanly, stop on that exact path and reconcile the conflict explicitly. Do not bless the unchanged public file with a refreshed private hash.
For a true conflict, use a release-local reviewed resolution file and pass it with --resolutions <json>. Each entry must name the path, choose private or public, give a substantive reason, and record reviewedBy. The preparer rejects unused/stale resolution entries and computes the resulting hashes itself.
The promotion manifest and promotion guard are authoritative for the reviewed private/public boundary.
When the promotion guard reports a mismatch, resolve only the exact missing, extra, or changed paths it reports.
Do not weaken the guard, downgrade its schema, fabricate divergence entries, or hand-select a smaller release surface merely to make the guard pass.
Historical private/public differences may remain only when they are explicit reviewed divergences.
Public-write protection
Never bypass repository-owned public-write controls.
If local policy blocks the final authorized public push/PR step after the candidate is fully validated, stop at that boundary and return the exact candidate SHA and validation results for an authorized GitHub write channel.
A public-write block is not permission to redesign the release process.
Persistent workspaces only
MartinLoop release, acceptance, and handoff work must use persistent repo-owned locations.
Preferred locations:
.release/<version>/_worktrees/<purpose>/
Do not place release authority, evidence, manifests, patches, acceptance results, or agent handoff state in:
C:\\tmp- OS temp directories
- disposable scratch directories
- unnamed ad-hoc folders outside the repository
Temporary directories created internally by automated tests are fine; operator/release state is not.
Verification rules
A gate is PASS only when its command completes successfully with an observed exit code of 0.
Timeout, interrupted output, missing exit code, or truncated execution is UNKNOWN, not PASS.
On clean workspaces, build generated workspace dependencies before lint when package type declarations are emitted into dist.
Use the repository's existing scripts and dependency order. Do not edit source merely to compensate for an unbuilt clean checkout.
Failure handling
When a required gate fails:
- identify whether the failure is a product defect, stale test/guard, environment/bootstrap issue, or external infrastructure issue;
- investigate only the exact failure;
- make the smallest coherent correction;
- rerun only invalidated gates plus any mandatory final release matrix.
Do not respond to one failing gate by starting a broad audit.
Do not reopen previously closed issues without a new deterministic reproduction.
Only a new deterministic P0 or launch-blocking P1 should interrupt a locked final-ship sequence.
Stale tests and superseded controls
When a release controller or workflow is intentionally replaced, old tests that assert the retired protocol must be removed or replaced by the current controller's canonical regression suite.
Do not keep two executable test suites that assert mutually exclusive release protocols.
Historical release documentation may remain when clearly historical, but it must never be referenced as current operating guidance.
Trusted publishing identity
The release controller validates current public main and atomically creates the paired root/MCP tags. It does not invoke npm publisher workflows as reusable workflows.
The root publisher (.github/workflows/release.yml) and MCP publisher (.github/workflows/publish-mcp.yml) run as their own workflows after a successful Validate and cut paired release tags controller run. This preserves the npm Trusted Publisher workflow identities and avoids the reusable-workflow caller mismatch that previously required temporary recovery triggers.
Do not reintroduce temporary version-pinned push recovery hooks. Do not change npm trusted-publisher governance merely to recover a normal release. A failed publisher may be rerun idempotently because each publisher checks whether its exact package version already exists before publishing.
Release/version edits
Do not blindly replace version strings.
Before release/version changes, distinguish:
- current package version;
- live public baseline;
- pending release target;
- historical changelog entry;
- example command;
- link target;
- package metadata.
Historical release records must not be rewritten merely to align with the current release.
Public hygiene
Anything promoted publicly must be appropriate for external users and contributors.
Do not promote:
- internal planning notes;
- private incident notes;
- customer-sensitive material;
- secrets or credentials;
- absolute workstation paths;
- internal repository coordination text;
- stale handoff/session files;
- fabricated publication or verification claims.
Security and tenancy
Never weaken entitlement, authentication, token, workspace, tenant-isolation, receipt-integrity, or verifier behavior merely to make an acceptance test pass.
Any reproducible cross-tenant access is a P0.
Any deterministic false-success or broken receipt-integrity path that affects the release contract is launch-blocking until fixed.
Completion rule
Once the locked release acceptance criteria are all green, stop testing and ship.
Do not invent additional gates after the defined acceptance matrix is satisfied.
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
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.

