|
| 1 | +# Contributing to agent-instructions-kit |
| 2 | + |
| 3 | +This project exists to keep agent instruction files: |
| 4 | +- consistent |
| 5 | +- useful |
| 6 | +- harder to hijack |
| 7 | +- easy to adopt |
| 8 | + |
| 9 | +If your change makes it more complicated to adopt, it's probably the wrong change. |
| 10 | + |
| 11 | +## Project scope (read this first) |
| 12 | + |
| 13 | +We accept: |
| 14 | +- better templates (minimal/opinionated) |
| 15 | +- clearer required-section rules |
| 16 | +- safety lint rules that are explainable + testable |
| 17 | +- better docs and examples |
| 18 | + |
| 19 | +We do NOT accept (for now): |
| 20 | +- giant rule engines |
| 21 | +- network calls / "phone home" |
| 22 | +- heavy agent-specific integrations that lock us in |
| 23 | +- complex sync logic wars (AGENTS.md is source of truth in v0.x) |
| 24 | + |
| 25 | +## Dev setup |
| 26 | + |
| 27 | +### Requirements |
| 28 | +- Node.js 20+ |
| 29 | +- npm |
| 30 | + |
| 31 | +### Install |
| 32 | +```bash |
| 33 | +npm install |
| 34 | +``` |
| 35 | + |
| 36 | +### Test |
| 37 | + |
| 38 | +```bash |
| 39 | +npm test |
| 40 | +``` |
| 41 | + |
| 42 | +### Lint |
| 43 | + |
| 44 | +```bash |
| 45 | +npm run lint |
| 46 | +``` |
| 47 | + |
| 48 | +### Run locally |
| 49 | + |
| 50 | +```bash |
| 51 | +npm run dev -- init --template minimal |
| 52 | +npm run dev -- check |
| 53 | +npm run dev -- safety |
| 54 | +``` |
| 55 | + |
| 56 | +## Templates |
| 57 | + |
| 58 | +Templates live in `templates/`. |
| 59 | + |
| 60 | +Rules: |
| 61 | + |
| 62 | +* Keep them short |
| 63 | +* Keep them practical |
| 64 | +* No corporate TED Talk language |
| 65 | +* Every section should answer: "What should an agent do here?" |
| 66 | + |
| 67 | +If you add a template section, update: |
| 68 | + |
| 69 | +* README examples |
| 70 | +* required sections list (if it becomes mandatory) |
| 71 | +* tests (yes, templates should be tested) |
| 72 | + |
| 73 | +## Adding a safety lint rule |
| 74 | + |
| 75 | +A safety rule must be: |
| 76 | + |
| 77 | +* understandable in one sentence |
| 78 | +* explainable in output ("why this matters") |
| 79 | +* covered by tests |
| 80 | +* low false-positive risk |
| 81 | + |
| 82 | +Each rule should have: |
| 83 | + |
| 84 | +* `id` (stable) |
| 85 | +* `severity` (warn/fail-capable) |
| 86 | +* `pattern` (regex or simple matcher) |
| 87 | +* `message` (human readable) |
| 88 | + |
| 89 | +If your rule is "clever," it's probably too clever. |
| 90 | + |
| 91 | +## CI behavior |
| 92 | + |
| 93 | +Default is: |
| 94 | + |
| 95 | +* `check` fails on missing required sections |
| 96 | +* `safety` warns (unless `fail_on_safety` is enabled) |
| 97 | + |
| 98 | +If you want to change defaults, expect discussion. |
| 99 | + |
| 100 | +## PR checklist |
| 101 | + |
| 102 | +* [ ] Tests updated/added |
| 103 | +* [ ] README updated if behavior/config changed |
| 104 | +* [ ] Templates still render cleanly |
| 105 | +* [ ] Safety rules include "why it matters" |
| 106 | +* [ ] No new dependencies unless absolutely necessary |
| 107 | + |
| 108 | +## Issues |
| 109 | + |
| 110 | +When filing an issue: |
| 111 | + |
| 112 | +* paste your AGENTS.md (if safe) or a reduced example |
| 113 | +* include exact command used and output |
| 114 | +* propose what "good" looks like |
| 115 | + |
| 116 | +## License |
| 117 | + |
| 118 | +By contributing, you agree your contributions are under the MIT License. |
0 commit comments