Skip to content

docs(agents): add self-describing rules for headers and test contracts#1103

Merged
christso merged 1 commit intomainfrom
docs/self-describing-rules
Apr 15, 2026
Merged

docs(agents): add self-describing rules for headers and test contracts#1103
christso merged 1 commit intomainfrom
docs/self-describing-rules

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

  • Add rule that file headers must be updated when module behavior changes (stale headers are worse than none)
  • Add rule that tests are executable contracts — when a module's behavioral contract changes, tests must reflect the new promise

Both additions fill gaps in the existing "AI-First Design" section of AGENTS.md, making existing implicit expectations explicit.

Context

These rules were identified as the only meaningful gaps after critically reviewing a recommendation to create a full "self-describing-codebase" skill. The bulk of that recommendation was redundant with existing AGENTS.md content (lines 46-65), and a skill is the wrong mechanism for always-on rules that apply to every code change.

Test plan

  • Docs-only change — no code, no runtime impact
  • Pre-push hooks pass (build, typecheck, lint, test, validate)

🤖 Generated with Claude Code

Add two rules that were missing from existing AI-First Design guidance:
- Stale file headers must be updated when module behavior changes
- Tests are executable contracts that must reflect behavioral changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 97f3f05
Status: ✅  Deploy successful!
Preview URL: https://18ef9d39.agentv.pages.dev
Branch Preview URL: https://docs-self-describing-rules.agentv.pages.dev

View logs

@christso christso merged commit 7766f39 into main Apr 15, 2026
4 checks passed
@christso christso deleted the docs/self-describing-rules branch April 15, 2026 00:34
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