Skip to content

Add Claude Code hooks and an AGENTS.md contract #58

Description

@mfw78

The repository has no AGENTS.md and no shared Claude Code configuration. Every agent session re-derives the same facts from README.md, the justfile, and the CI workflow, and the house rules (no em-dashes, Conventional Commits, honest AI-assistance disclosure) live only in reviewers' heads.

Add a small, shared, checked-in set of tooling:

  • .claude/settings.json plus three hooks under .claude/hooks/: rustfmt on each edited .rs file (edition 2024, matching the workspace), an em-dash content lint on .rs and .md edits, and cargo nextest run for the crates with uncommitted .rs changes at the end of a turn. Each hook is a no-op when its tool is absent, so nothing changes outside the Nix dev shell.
  • AGENTS.md as the agent contract, with CLAUDE.md as a symlink to it. Written in ASD-STE100 Simplified Technical English, one sentence per line, and grounded only in what this repository already states: the L1 venue-agnostic runtime, the extension seam in nexum-world, the crate layout, the pinned Rust 1.94.0 toolchain, and the real justfile recipes.
  • ripgrep and ast-grep in the flake devShell. cargo-nextest is already present.
  • .config/nextest.toml with a slow-timeout, so a hung test fails by name after five minutes instead of consuming the whole CI job timeout.
  • A .gitignore change so .claude/settings.json and .claude/hooks/ are tracked while settings.local.json and worktrees/ stay out.

Out of scope: the justfile and .github/workflows/ci.yml are unchanged. Both already run cargo nextest run and a separate cargo test --doc, which is correct.

AI Assistance: Claude Opus used for drafting this issue and the accompanying change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions