Skip to content

Split AGENTS.md into .agent/#4882

Merged
janniklasrose merged 19 commits intomainfrom
janniklasrose/agents
Apr 8, 2026
Merged

Split AGENTS.md into .agent/#4882
janniklasrose merged 19 commits intomainfrom
janniklasrose/agents

Conversation

@janniklasrose
Copy link
Copy Markdown
Contributor

@janniklasrose janniklasrose commented Apr 1, 2026

Changes

Split AGENTS.md into .agent/rules/*.md and .agent/skills/*.

This is just a cut-paste - follow-up PR to slim down the rules are coming, for now it just helps with intelligent context management.

Why

Allow agents to intelligently manage context. AGENTS.md is always kept in context, whereas .agent/ files can be loaded on demand.

Tests

Claude: Python rule does not pollute context

/memory before a task related to Python files:
Screenshot 2026-04-07 at 15 31 48

Auto-loaded rule during task & /memory after:
Screenshot 2026-04-07 at 15 33 02

Cursor: auto-application of rules

Screenshot 2026-04-07 at 15 42 39

Skills auto-loading

Cursor:
Screenshot 2026-04-07 at 16 46 12

Claude:
Screenshot 2026-04-07 at 16 46 29

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Suggested reviewers

Based on git history of the changed files, these people are best suited to review:

Confidence: low

Eligible reviewers

Based on CODEOWNERS, these people or teams could also review:

@andrewnester, @anton-107, @denik, @shreyas-goenka, @simonfaltum

Suggestions based on git history of 7 changed files (1 scored). See CODEOWNERS for path-specific ownership rules.

- `make docs`
- Validation generated code:
- `make generate-validation`
- Mock files:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which mock files?

Comment on lines +66 to +68
- `make test-update`
- `make test-update-templates` (templates only)
- `make generate-out-test-toml` (only `out.test.toml`)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • make test-update
  • make test-update-templates (templates only)
  • make generate-out-test-toml (only out.test.toml)

It looks like additive, but 1st one actually includes two other.

And we need generate-out-test-toml less now as running the tests (even without -update) updates out files automatically.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update Makefile and agent guidance in follow-up

```go
package mutator_test

func TestApplySomeChangeReturnsDiagnostics(t *testing.T) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we can drop or significantly reduce this section this with current models. I don't think models will get it wrong, this is how unit tests are written in go in general.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. follow-up PR - now it's just a cut-paste


Use table-driven tests when testing multiple similar cases (e.g., different inputs producing different outputs). Reviewers prefer this pattern over repeating near-identical test functions.

## Acceptance Tests
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the relationship between this file and acceptance/README.md? Are they complementary or duplicative? Should we reference README.md there and keep only agent-specific things here while general manual in README?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for mostly maintaining READMEs and referring to them in agent instructions

description: Checklist to run before submitting a PR
---

Before submitting a PR, run these commands to match what CI checks. CI uses the **full** variants (not the diff-only wrappers), so `make lint` alone is insufficient.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make lint is intended to work 99% of the time though, have you seen where it's not?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cut-paste from the old AGENTS.md. But I can take this opportunity to tidy this up

# 3. Tests (CI runs with both deployment engines)
make test

# 4. If you changed bundle config structs or schema-related code:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema-related sounds to general, this is only about jsonschema. (We should probably rename the make target to reflect it).

description: Checklist to run before submitting a PR
---

Before submitting a PR, run these commands to match what CI checks. CI uses the **full** variants (not the diff-only wrappers), so `make lint` alone is insufficient.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cut-paste from the old AGENTS.md. But I can take this opportunity to tidy this up

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just dropping it here for now for one that works manually (copy-pasted this into Claude and it corrected missing symlinks and paths), but we can look into automating this on PRs

Comment on lines +66 to +68
- `make test-update`
- `make test-update-templates` (templates only)
- `make generate-out-test-toml` (only `out.test.toml`)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update Makefile and agent guidance in follow-up

```go
package mutator_test

func TestApplySomeChangeReturnsDiagnostics(t *testing.T) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. follow-up PR - now it's just a cut-paste


Use table-driven tests when testing multiple similar cases (e.g., different inputs producing different outputs). Reviewers prefer this pattern over repeating near-identical test functions.

## Acceptance Tests
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for mostly maintaining READMEs and referring to them in agent instructions

Copy link
Copy Markdown
Contributor

@parthban-db parthban-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @janniklasrose!

@janniklasrose janniklasrose added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit b6c6a56 Apr 8, 2026
20 checks passed
@janniklasrose janniklasrose deleted the janniklasrose/agents branch April 8, 2026 12:58
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.

4 participants