Discussion: standard section for generated-code safety checks

Aperta
#189 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Ambito
documentation

Direzione di ricerca

Start by reviewing the existing AGENTS.md guidance and the project’s main example, advanced guidance, or recipe structure. Resolve the proposal’s open questions with maintainers, including placement, required versus optional checks, and alignment with existing conventions; done means an agreed documentation change is clearly scoped.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Context

AGENTS.md gives repositories a place to tell coding agents how to work safely and effectively in a codebase.

As coding agents become more autonomous, many repositories will need to specify not only style and workflow rules, but also the checks that generated code must pass before a human reviews it.

Problem

Agent-authored changes can fail in predictable ways:

  • tests not run;
  • generated files committed accidentally;
  • secrets or local paths leaked;
  • package artifacts include unintended files;
  • dependency changes are made without justification;
  • security scanners are skipped;
  • docs/examples drift from code;
  • risky commands are run without permission.

Different repositories can describe these expectations manually, but a common recommended section would make AGENTS.md more useful across tools and projects.

Proposal

Would it make sense to document an optional section for generated-code safety checks?

For example:

## Generated-code safety checks

Before submitting changes, agents should:

- run the project test command: `<command>`;
- run lint/type checks: `<command>`;
- inspect generated/package artifacts: `<command>`;
- check for secrets or local-only paths: `<command>`;
- avoid committing files matching: `<patterns>`;
- summarize dependency changes and why they are needed;
- state which checks could not be run.

The section would remain optional and project-specific. The value would be giving maintainers a predictable place to encode safety expectations.

Use cases

  • More reliable agent-generated PRs.
  • Easier human review.
  • Better behavior across multiple coding agents.
  • Standard place to document project-specific safety gates.
  • Reduced accidental commits of generated artifacts, local files, or secrets.

Non-goals

  • Defining one universal safety policy.
  • Requiring every repository to use the section.
  • Replacing CI.
  • Preventing maintainers from using their own structure.

Open questions

  • Is this too prescriptive for the current scope of AGENTS.md?
  • Should this live in the main example, advanced guidance, or a recipe?
  • Should there be separate sections for "must run", "should run", and "state if unable to run"?
  • Are there existing conventions this should align with?
Lingua principale
TypeScript
Stelle
24.8k
Fork
1.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di agentsmd/agents.md

Tutte le issue di agentsmd/agents.md

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.