AGENT SKILL

architecture-rules

Check and uphold a project's deterministic architecture rules — who may import whom, and the code shapes that have caused repeat defects. Use before finishing a code change, when adding a module or a cross-package import, and whenever asked to verify the architecture. The project's AGENTS.md names its checks; this skill's project section repeats them.

License 许可
Apache-2.0
最近更新
2026-09-29
Stars
★ 0
Forks
0

01 前言 Front Matter

name
architecture-rules
description
Check and uphold a project's deterministic architecture rules — who may import whom, and the code shapes that have caused repeat defects. Use before finishing a code change, when adding a module or a cross-package import, and whenever asked to verify the architecture. The project's AGENTS.md names its checks; this skill's project section repeats them.

03 SKILL.md 正文

Architecture rules — run the check, do not trust the prose

<!-- agent-sync:start architecture-rules --> Vendor-neutral and machine-wide: canonical in ~/.agents/skills/, copied into each repository by agent-sync, followed by any coding agent or a person.

A project states its architecture in prose in AGENTS.md and, wherever a rule is mechanically decidable, enforces it with a deterministic check. The prose alone does not hold. Measured in Keep: a dataclass was rebuilt field by field directly underneath a comment warning that rebuilding a dataclass field by field drops fields, and by the time anyone looked it had silently dropped two. Several agents work in these trees at once and none of them read the document recently. Run the checks.

Find them, then run them

The project's AGENTS.md names its architecture checks, and the project's section below this block repeats them. They belong to the project's normal checks, so a change that breaks one does not merge — run them before handoff, not after.

A boundary stated in prose with no check behind it is a finding when the rule is decidable — an import direction, a banned call, a required marker. The check belongs in the test suite, and the prose should point at it.

When a check fires

Fix the code. These checks are not style; each one records a defect that reached a repository.

If the violation is genuinely correct, say so in the handoff and why, then change the rule and the AGENTS.md passage that states it, in the same commit, so the document and the check keep saying the same thing. Never silence a check to get green — no --ignore, no per-file exemption, no commented-out assertion. A rule turned off for one file is how a boundary is lost one file at a time.

A new top-level package is an architectural act. A new condition edits a stage; it does not add a peer to one.

What to say at the end

Which architecture checks ran and their result, verbatim; and any rule you changed, with the AGENTS.md passage you changed beside it. <!-- agent-sync:end --> <!-- Everything above is canonical and kept byte-identical across repos by agent-sync; edit it in agent-sync/skills/, not here. Anything BELOW this note is this project's own — drift.sh counts it but never flags it. -->

04 同仓库更多 Skills

maxjbarfuss
maxjbarfuss/max_llm

train

Launch a new max_llm training run on both GPUs (RTX 4090 + RTX 3090 Ti) through torchrun DDP, resolving the TOML config by name or path. Use only when the user explicitly asks to start, launch or begin a run — "resume", "continue" or "keep training" mean the existing run; takes an optional config name or path.

★ 0
maxjbarfuss
maxjbarfuss/max_llm

serve-live

Before a person looks at a running service, make sure what is running IS the code in the checkout. Restart the services your change actually touched — not every service — and verify each is serving the current commit rather than merely answering; check the remaining dependencies are up without bouncing them. Use whenever you finish work a person will view in a browser or client, whenever you say a page or service is ready, after any commit that changes served code, and when asked to 'restart', 'refresh the services', 'is it live', or 'serve the latest'. Also covers waiting for lazy warm-up before calling a service ready.

★ 0
maxjbarfuss
maxjbarfuss/max_llm

review

Review a local change, branch, pull request, or stack for correctness, regressions, security, tests, and unnecessary complexity. Use when asked to review rather than implement.

★ 0
maxjbarfuss
maxjbarfuss/max_llm

regression-coverage

Reshape a slow or brittle test suite around observable user journeys and published contracts. Use when pruning tests, repairing weak smoke coverage, or addressing repeated feature regressions.

★ 0
maxjbarfuss
maxjbarfuss/max_llm

pr-babysit

Monitor selected pull requests and report or safely act on review, CI, mergeability, and stack state.

★ 0
maxjbarfuss
maxjbarfuss/max_llm

keel

Use a project's local keel code graph to assess change impact, find callers and reuse candidates, validate a plan, or check an edit. Applies only in a repository with a .keel/ directory; skip it for prose-only work.

★ 0