agentleFS
Keesan12Keesan12/martin-loop/AGENTS.md

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.

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
  1. Distinctive:

    Do not treat historical release notes, old audits, old handoff files, previous branches, terminal history, or prior session summaries as …

    line 5
  2. Distinctive:

    All implementation starts, is reviewed, and is health-proven in the private development authority before public promotion begins.

    line 17
  3. Distinctive:

    Do not infer current status from dates or claims embedded in old documentation.

    line 31
  4. Distinctive:

    start from current private main.

    line 37
  5. Distinctive:

    create a private feature/fix branch.

    line 38
  6. Distinctive:

    run the required targeted and repo health checks.

    line 40
  7. Distinctive:

    run the required private-main health proof.

    line 44
  8. Distinctive:

    only then begin public promotion.

    line 46
  9. Distinctive:

    Never implement the real fix directly in the public repository.

    line 48
  10. Distinctive:

    Do not reorder the sequence unless an existing release controller explicitly requires it.

    line 56
  11. Distinctive:

    Do not create an additional release phase merely because another agent used one previously.

    line 58
  12. Distinctive:

    Use the canonical release commands instead of manually editing SHA coordinates or divergence hashes:

    line 64
  13. Very specific:

    Never hand-edit validatedReleaseSha, privateMainShaValidated, privateMergeSha, publicBaseSha, privateSha256, or publicSha256 merely to make …

    line 71
  14. Very specific:

    Never create version-specific apply-promotion-XYZ scripts.

    line 73
  15. Distinctive:

    If exact-SHA health evidence is stale, regenerate it by rerunning the canonical health command.

    line 75
  16. Distinctive:

    If a reviewed content divergence cannot be three-way merged cleanly, stop on that exact path and reconcile the conflict explicitly.

    line 77
  17. Distinctive:

    When the promotion guard reports a mismatch, resolve only the exact missing, extra, or changed paths it reports.

    line 83
  18. Distinctive:

    Do not weaken the guard, downgrade its schema, fabricate divergence entries, or hand-select a smaller release surface merely to make the …

    line 85
  19. Distinctive:

    Never bypass repository-owned public-write controls.

    line 91
  20. Distinctive:

    If local policy blocks the final authorized public push/PR step after the candidate is fully validated, stop at that boundary and return …

    line 93
  21. Distinctive:

    Do not place release authority, evidence, manifests, patches, acceptance results, or agent handoff state in:

    line 106
  22. Distinctive:

    Use the repository's existing scripts and dependency order.

    line 123
  23. Distinctive:

    When a required gate fails:

    line 127
  24. Distinctive:

    Do not respond to one failing gate by starting a broad audit.

    line 134
  25. Distinctive:

    Do not reopen previously closed issues without a new deterministic reproduction.

    line 136
  26. Distinctive:

    Only a new deterministic P0 or launch-blocking P1 should interrupt a locked final-ship sequence.

    line 138
  27. Distinctive:

    When a release controller or workflow is intentionally replaced, old tests that assert the retired protocol must be removed or replaced by …

    line 142
  28. Distinctive:

    Do not keep two executable test suites that assert mutually exclusive release protocols.

    line 144
  29. Distinctive:

    Do not reintroduce temporary version-pinned push recovery hooks.

    line 154
  30. Distinctive:

    Do not blindly replace version strings.

    line 158
  31. Distinctive:

    Before release/version changes, distinguish:

    line 160
  32. Distinctive:

    Never weaken entitlement, authentication, token, workspace, tenant-isolation, receipt-integrity, or verifier behavior merely to make an …

    line 189
  33. Distinctive:

    Do not invent additional gates after the defined acceptance matrix is satisfied.

    line 199

≈ “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.

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

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:

  1. current Git branch / commit state;
  2. package.json;
  3. packages/mcp/package.json;
  4. docs/release/VERSION-LEDGER.md;
  5. 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:

  1. start from current private main;
  2. create a private feature/fix branch;
  3. implement privately;
  4. run the required targeted and repo health checks;
  5. open a private PR;
  6. merge only after the change is reviewed and green;
  7. sync fresh private main;
  8. run the required private-main health proof;
  9. record the validated private release SHA;
  10. 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:

  1. on clean private main, run pnpm release:health:evidence; this executes the canonical health matrix and binds the evidence to the exact current HEAD;
  2. from the same exact private HEAD, run pnpm release:promotion:prepare -- --public-repo <public-checkout>;
  3. the preparer fetches current public main, derives the public base SHA, creates public-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;
  4. review the staged public diff, commit it, and run pnpm public:promotion-guard from 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:

  1. identify whether the failure is a product defect, stale test/guard, environment/bootstrap issue, or external infrastructure issue;
  2. investigate only the exact failure;
  3. make the smallest coherent correction;
  4. 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.

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.