Skip to content

feat(framework+cli): fw-4.15.0 / cli-3.13.2 — inject AGENTS.md universal standard#155

Merged
montfort merged 3 commits into
mainfrom
feat/agents-md-injection
May 15, 2026
Merged

feat(framework+cli): fw-4.15.0 / cli-3.13.2 — inject AGENTS.md universal standard#155
montfort merged 3 commits into
mainfrom
feat/agents-md-injection

Conversation

@montfort
Copy link
Copy Markdown
Contributor

@montfort montfort commented May 15, 2026

Summary

Adds AGENTS.md as a first-class injection target. AGENTS.md is the open standard for AI coding agents, donated to the Agentic AI Foundation (Linux Foundation, December 2025) and read by Claude Code, OpenAI Codex CLI, Cursor, Aider, Devin, Sourcegraph Amp, Google Jules, Zed AI, Continue, Roo Code, Factory Droids, GitHub Copilot, Gemini CLI, Windsurf, Amazon Q and others.

Before fw-4.15.0, StrayMark injected directives only into platform-specific files (CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, .cursorrules, .cursor/rules/straymark.md); adopters using any of the other 15+ CLIs that read AGENTS.md had to copy directives by hand. From this release, straymark init and straymark update-framework keep AGENTS.md in sync with STRAYMARK.md automatically.

Why this matters

AGENTS.md consolidates a fragmented configuration surface that emerged during 2024-2026 as each CLI invented its own directive format. By injecting there from day 1 of the adopter's project, StrayMark covers every current and future CLI that adopts the standard without per-CLI bumps.

What changed

Framework (fw-4.15.0)

  • New template dist/dist-templates/directives/AGENTS.md — reference shape (pointer to STRAYMARK.md + minimum-viable body for agents that cannot follow relative links).
  • New injection entry in dist/dist-manifest.yml, placed first as the universal entry point.
  • STRAYMARK.md § Directive Injection Markers documents AGENTS.md coexistence with CLI-specific files.
  • Governance footers bumped to v4.15.0 across EN + i18n/es + i18n/zh-CN (QUICK-REFERENCE, AGENT-RULES, DOCUMENTATION-POLICY, C4-DIAGRAM-GUIDE, FOLLOW-UPS-BACKLOG-PATTERN).
  • README and ADOPTION-GUIDE (EN + ES + zh-CN) list AGENTS.md as the universal entry point with the full reader-CLI inventory.

CLI (cli-3.13.2)

  • AGENTS.md in LEGACY_DIRECTIVE_TARGETS (cli/src/commands/remove.rs:13). The data-driven cleanup path (manifest-aware) already handles the common case; this defensive extension covers the edge case where .straymark/dist-manifest.yml is missing or fails to parse, so remove doesn't leave AGENTS.md orphaned. Follows the existing convention of keeping LEGACY_DIRECTIVE_TARGETS in sync with the manifest's injections:.
  • Cargo.toml + Cargo.lock bumped to 3.13.2. Version tables and example outputs in README + CLI-REFERENCE (EN + ES + zh-CN) follow.

Tests

Three new integration tests in cli/tests/inject_test.rs:

  • test_agents_md_template_has_markers — verifies the shipped template's marker shape and STRAYMARK.md pointer.
  • test_manifest_declares_agents_md_injection — pins the manifest entry so init/update/remove all pick AGENTS.md via the data-driven path.
  • test_agents_md_coexists_with_preexisting_file — append-when-no-markers behavior against the very common case of an adopter who already maintains an AGENTS.md.

Design notes

Reference shape, not embed. Parallel to CLAUDE.md / GEMINI.md: marker block points to STRAYMARK.md, with a minimum-viable body below for readers that cannot follow relative links. Rationale: the AGENTS.md convention emphasizes conciseness; .cursorrules already embeds the full content for the one CLI that needs it.

Position: root of the repo. AGENTS.md has a "nearest in the tree" reading convention, so root coverage is enough.

Coexistence with pre-existing AGENTS.md. Many adopters already maintain a hand-written AGENTS.md. The existing inject_directive flow appends the marker block when no markers are present — pre-existing custom content is preserved. Test test_agents_md_coexists_with_preexisting_file pins this behavior.

Why bump CLI to 3.13.2. The remove.rs change modifies the released binary's behavior in the edge case where the local manifest is missing. Per the project's versioning policy, any behavior change in the binary warrants a matching CLI bump. The framework manifest path covers the common case; the CLI bump covers the legacy fallback. Both framework and CLI tags should be pushed together once merged.

Test plan

  • cargo test --quiet — all suites pass (including the three new AGENTS.md tests)
  • cargo check — Cargo.lock reflects 3.13.2
  • Manifest declares AGENTS.md injection
  • Template marker shape verified
  • Append-when-no-markers behavior pinned
  • After merge: tag both fw-4.15.0 and cli-3.13.2 on main HEAD and push together (git push origin fw-4.15.0 cli-3.13.2).
  • Post-release: run straymark update in a pilot adopter; confirm AGENTS.md lands at root with markers and the new CLI binary is in place.
  • Cross-CLI smoke: open the pilot repo in Claude Code, Cursor, and Codex CLI; confirm each picks up the directives via AGENTS.md.

Risks

# Risk Mitigation
1 AGENTS.md pre-existing with custom content in adopter repos Inject appends when no markers present (test-pinned).
2 .gitignore excluding AGENTS.md (rare but possible) Documented in the CHANGELOG adopter guidance.
3 Confusion: does AGENTS.md replace CLAUDE.md? No — both coexist (same source via STRAYMARK.md, different identity strings). STRAYMARK.md and CHANGELOG both make this explicit.
4 Adopter on cli-3.13.1 with fw-4.15.0 and corrupted manifest runs remove Edge case; cli-3.13.2 fixes it. Common path (manifest present) works on both binaries.

Related

Closes the position raised in the project's "Estado del arte" analysis (R5: "el sitio no reconoce AGENTS.md como estándar dominante"). The website narrative for fw-4.15.0 can now claim multi-CLI coverage as a first-class feature, not an aspiration.

montfort added 2 commits May 15, 2026 12:27
Adds AGENTS.md as a first-class injection target. AGENTS.md is the
open standard for AI coding agents donated to the Agentic AI
Foundation (Linux Foundation, 2025) and read by Claude Code,
OpenAI Codex CLI, Cursor, Aider, Devin, Sourcegraph Amp, Google
Jules, Zed AI, Continue, Roo Code, Factory Droids, GitHub Copilot,
Gemini CLI, Windsurf, Amazon Q and others.

Before fw-4.15.0, StrayMark injected directives only into
platform-specific files (CLAUDE.md, GEMINI.md, copilot-instructions,
.cursorrules, cursor/rules/straymark.md); adopters using any of the
other 15+ CLIs had to copy directives by hand. From this release,
straymark init and update-framework keep AGENTS.md in sync with
STRAYMARK.md automatically.

- New template dist/dist-templates/directives/AGENTS.md (reference
  shape; pointer to STRAYMARK.md plus minimum-viable body for
  agents that cannot follow relative links)
- New injection entry in dist/dist-manifest.yml, placed first as
  the universal entry point
- STRAYMARK.md documents AGENTS.md coexistence with CLI-specific
  files (different identity strings, same source of truth)
- remove.rs legacy fallback updated to clean AGENTS.md for
  installations that lose .straymark/dist-manifest.yml
- Three new integration tests in cli/tests/inject_test.rs:
  template-has-markers, manifest-declares-injection,
  coexists-with-preexisting-file
- Governance footers and version tables bumped to v4.15.0 across
  EN + i18n/es + i18n/zh-CN
- README and ADOPTION-GUIDE list AGENTS.md as the universal entry
  point with the full reader-CLI inventory

CLI version unchanged (cli-3.13.1 remains the matching version).
No behavior change for adopters that already maintain AGENTS.md
manually: the injection appends a marker block, preserves
existing custom content, and is idempotent.
The data-driven cleanup path in remove.rs already handles AGENTS.md
correctly via the manifest read; the previous commit also extended
the LEGACY_DIRECTIVE_TARGETS fallback so `straymark remove` cleans
AGENTS.md even when the local manifest is missing or fails to parse.
That is a behavioral change in the released binary and warrants a
matching CLI bump per project versioning policy.

- cli/Cargo.toml + Cargo.lock: 3.13.1 → 3.13.2
- CHANGELOG: section header retitled `Framework 4.15.0 / CLI 3.13.2`
  with a new `### Added (CLI)` subsection documenting the rationale
- Version tables and example outputs in README + CLI-REFERENCE
  (EN + ES + zh-CN) updated to cli-3.13.2
- Adopter guidance reworked to mention update-cli alongside
  update-framework

No behavior change beyond the LEGACY_DIRECTIVE_TARGETS extension
already shipped in the previous commit.
@montfort montfort changed the title feat(framework): fw-4.15.0 — inject AGENTS.md universal standard feat(framework+cli): fw-4.15.0 / cli-3.13.2 — inject AGENTS.md universal standard May 15, 2026
Crates.io was previously showing a runtime copy of the root README
(approximately 650 lines, badges-heavy, navigation-heavy) made by
release-cli.yml at publish time. That format is tuned for GitHub
visitors landing on the project, not for Rust devs evaluating the
crate from a crates.io search.

This commit ships a dedicated cli/README.md tailored to the
crates.io audience: tagline, what-it-is paragraph, install (cargo
install + prebuilt binaries for 4 platforms), 5-line quickstart,
six bullets of core capabilities, multi-CLI agent support note
with the AGENTS.md context, features table, and links back to the
full docs on GitHub. Length: ~110 lines.

Workflow change: removes the `cp README.md cli/README.md` step
from release-cli.yml so cargo publish uses the file shipped in
the repo instead of overwriting it with the root README at CI
time. cargo package --list confirms the new README is included
in the .crate artifact.

No behavior change to the CLI binary; this affects only what
crates.io renders on the package page for cli-3.13.2 and later.
@montfort montfort merged commit c243eed into main May 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant