跳到正文
GitHub·· 19 小时前AI 评分67

agentic-coding-practices 汇总 127 条智能体编码实践

inmve/agentic-coding-practices

AI 导读

GitHub 项目 inmve/agentic-coding-practices 整理了 127 条用智能体开发软件的实践,每条附有来源作者的原话引用,共 256 个来源、51 个示例方案。

正文

Agentic software development reference

What agents changed in how software gets built, and what still holds up

In the autumn of 2025 I kept a list of tips and techniques for coding with LLMs, and stopped adding to it that November. A year later I wouldn’t follow a lot of it myself.

That November Opus 4.5 and GPT-5.2 came out, and agents got good enough to write most of the code.[1] This year Fable and Astra went further and stopped needing most of what my list was for: detailed instructions, carefully prepared context, reminders to think hard.[2]

So I started again from what people who ship software with agents write about their own work. Below are 127 of their practices, each with a quote from the post that describes it.

Prompting is the part that got less important. The practices that were around long before LLMs went the other way: I couldn’t find anyone taking back tests, code review or CI, and if anything they carry more weight now.[3] 22 of the practices on this page grew straight out of one of those older ones, like continuous integration (1998) or test-driven development (2002). Teams that already had them had less to change. Even the rubber duck is still here; now it talks back.

127 practices, 256 sources, 256 of them with a verbatim quote stored in the data, 51 example schemes. Preliminary edition: dates are not verified yet.

Inside every section the newest practices come first.

Contents

By SDLC stage

Planning & prototyping

  • Self-contained task with proof. The practice in which each task for the agent is written as a self-contained ticket stating what is wrong, what done looks like and which command proves it. Sources: Addy Osmani, 2026-10-06; Addy Osmani, 2026-10-06. Grew from: Behaviour-driven development (2006).

    Example scheme: Self-contained task with proof
  • Confidence markers on extracted facts. The practice in which every fact the agent extracts from legacy code carries a green, amber or red confidence marker, and ambiguous code is flagged in the output so that a human expert resolves it. Sources: Shashank Mishra, 2026-07-13; Shashank Mishra, 2026-07-13.

    Example scheme: Confidence markers on extracted facts
  • Source traceability. The practice in which every fact the agent extracts from legacy code carries a file:line reference back to that code. Sources: Shashank Mishra, 2026-07-13.

    Example scheme: Source traceability
  • Screenshot iteration. The practice in which the agent is given a screenshot of the result or of a mock-up, and the change and the screenshot are repeated until they match. Sources: kent-tokyo (DEV Community handle), 2026-06-03.

    Example scheme: Screenshot iteration
  • Throwaway editor with export. The practice in which the agent builds a disposable interface for editing something by hand, and the interface ends with an export button that turns the edits into a prompt or a file. Sources: Thariq Shihipar, 2026-05-20.

  • Plan before code. The practice in which the agent first lays out steps, risks and checks, and the developer corrects that outline before any code is written. Sources: Indragie Karunaratne, 2025-07-01; Mitchell Hashimoto, 2025-10-11; Addy Osmani, 2026-10-06.

    Example scheme: Plan before code
  • Generated prototype. The practice in which a project starts with a quickly generated prototype that shows whether the key requirement can be met. Sources: Simon Willison, 2025-03-11; Alex Grebenyuk, 2025-06-23. Grew from: Spike solution.

    Example scheme: Generated prototype
  • Spec walkthrough with the reviewer. The practice in which, before the agent writes code, the author walks the future pull request reviewer through the product and technical specs. Sources: Dex.

  • Vertical slices in agent work plans. The practice in which the agent's work plan for a feature is cut into vertical slices that cross backend and frontend, so that integration is exercised before the end of the work. Sources: shinpr; Dex. Grew from: Tracer bullets (1999).

    Example scheme: Vertical slices in agent work plans

Coding & debugging

Tests

Verification

  • Read-only database for the agent. The practice in which the agent has access to a read-only copy of the database and validates its query changes there instead of guessing their effect. Sources: Scott Cooper, 2026-11-03.

    Example scheme: Read-only database for the agent
  • Before-and-after recording of a fix. The practice in which, for a bug fix, the agent reproduces the issue, records the broken behavior, implements the fix and repeats the same steps to show the reviewer the before and after; the team keeps the instructions for this in a skill. Sources: Michael Garfinkle, Mauricio de Meirelles, David Cortes, 2026-10-22; Michael Garfinkle, Mauricio de Meirelles, David Cortes, 2026-10-22.

    Example scheme: Before-and-after recording of a fix
  • Browser checks by an agent. The practice in which an agent drives a browser on the running application to check a change against each acceptance criterion and reports what it saw, with screenshots, for each criterion. Sources: Abhishek Ray, 2026-03-10.

    Example scheme: Browser checks by an agent
  • Cap on CI rounds per agent run. The practice in which an unattended agent gets at most a fixed number of CI rounds per task, two in the source, because every round costs tokens, compute and time. Sources: Alistair Gray, 2026-02-09.

    Example scheme: Cap on CI rounds per agent run
  • Manual verification of agent code. The practice in which the developer tests that agent-written code actually works. Sources: Simon Willison, 2025-03-11.

    Example scheme: Manual verification of agent code

Review & release

Cross-stage

Prompts and models

Agent instructions

  • Single source for agent instructions. The practice in which one instruction file is canonical and the files of other agent tools point to it through a pointer line, a symlink or an include. Sources: Przemek, 2026-09-23; FerroxLabs.

  • Smallest-scope agent control. The practice in which a team corrects an agent behavior with the control of the smallest scope that still gives the wanted output: first interface and output contracts, then automated checks, then skills or commands, and root instruction files last. Sources: Addie Beach, Rui Martins Lacerda, 2026-09-09. Grew from: Rules in linters (1978).

  • Gotchas section. The practice in which agent instructions, in a skill or the project instruction file, keep a section of gotchas built from the failure points the agent actually hit, updated over time. Sources: Thariq Shihipar, 2026-06-03; Thariq Shihipar, 2026-07-24.

  • Progressive disclosure. The practice in which agent context is split into a tree of files, and the agent is told which files exist so that it reads each one only when it becomes relevant. Sources: Thariq Shihipar, 2026-07-24; Thariq Shihipar, 2026-06-03.

    Example scheme: Progressive disclosure
  • Repeated prompt as a skill. The practice in which a prompt or workflow that the developer keeps repeating is saved as a skill or command file, checked into git and run by name. Sources: Arpan Patel, 2026-05-26.

  • Instruction file. The practice in which project instructions for the agent (commands, conventions, constraints) are kept in a text document that the agent reads at the start of every session. Sources: agents.md community; Shrivu Shankar, 2025-11-02; Aditya Sharma and Mahesh Kharade, 2026-03-27.

Maintaining the agent setup

Context and memory

  • Shared experiment log. The practice in which agents log every attempted idea and its result, and later agent sessions read the log to see whether an idea was already tried. Sources: sankalp, 2026-07-08.

  • Compaction. The practice in which a long agent session is summarized at a milestone or near the context limit, with instructions on what the summary keeps, and work continues in a new context from the summary. Sources: Arpan Patel, 2026-05-26.

    Example scheme: Compaction
  • Knowledge base from project history. The practice in which agents read the codebase, issues, pull requests and discussion threads and write a knowledge base of unrecorded decisions and conventions, which other agents use when they work on the code. Sources: .txt, 2026-04-29.

  • Repository knowledge as the system of record. The practice in which decisions, plans, conventions and other context are kept as versioned files in the repository instead of chats, documents and people's heads, so that agents can read them. Sources: Ryan Lopopolo, 2026-02-11; shinpr; Shashank Mishra, 2026-07-13. Grew from: Architecture Decision Records (2011).

  • Document & Clear. The practice in which, for a large task, the agent writes its plan and progress to a file, the context is cleared, and a new session reads the file and continues the work. Sources: Shrivu Shankar, 2025-11-02; Nicholas Carlini, 2026-02-05; rberg27.

    Example scheme: Document & Clear
  • Context priming with code. The practice in which a session starts by placing existing code into the context, and changes are made from there. Sources: Simon Willison, 2025-03-11.

  • Documentation for new libraries. The practice in which the agent is given current documentation and examples for a library that is missing from the model's training data. Sources: Simon Willison, 2025-03-11; Jude Gao, 2026-01-27.

Parallel work

Unattended runs

Steering the agent

Staying hands-on

  • Explainer for a code slice. The practice in which a person who wants to understand part of a codebase asks the agent to write an explainer for exactly that part. Sources: Addy Osmani, Morgan Westlee Lunt, and Qing Wang, 2026-10-15.
  • Retyping agent code by hand. The practice in which the agent shows its proposed code in the chat and the developer types every edit into the project by hand. Sources: Ankur Sethi, 2026-08-02.
  • Deliberate practice without agents. The practice in which an engineer now and then solves a problem without an agent, even one the agent could solve, to keep their own skills. Sources: Saffron Huang, Bryan Seethor, Esin Durmus, Kunal Handa, Miles McCain, Michael Stern, Deep Ganguli, 2025-12-02.
  • Manual refinement of agent output. The practice in which the developer reworks the agent's implementation by hand after the agent has finished. Sources: Mitchell Hashimoto, 2025-10-11; Conrad Irwin.
  • Critical parts by hand. The practice in which the developer writes the critical and complex parts of the code and hands the rest to the agent. Sources: Anton Zhiyanov, 2025-09-26.
  • Own draft first. The practice in which the developer drafts the solution without an agent and then gives it to an agent to review and improve. Sources: Anton Zhiyanov, 2025-09-26.
  • Agent as a pair partner. The practice in which the developer works with the agent as with a pair partner: thinks a problem through aloud with it, nudges it when needed, then reviews, refactors and tests the result. Sources: Orta Therox, 2025-06-07. Grew from: Pair programming (1998), Rubber duck debugging.
  • Learning with an agent. The practice in which the developer uses an agent to learn a language or a concept and then applies it when writing code. Sources: Alberto Fortin.

Teams and projects

Rules that teams and open-source projects set for work with agents.

Approaches

Review rules

Risk and ownership

  • CI workflow files as high risk. The practice in which the files that define the CI pipeline are treated as high risk, because an agent that can edit the pipeline can weaken the review of its own work. Sources: Jonathan Wage, 2026-10-13.

  • Named owner of an agent thread. A team rule in which every line of agent work has a named person who owns it, and the agent shows user-visible changes to that person with before-and-after screenshots or recordings. Sources: Raymond Wang, Sam Attard, and Issac G., 2026-09-23.

  • Ownership of agent controls. The practice in which shared agent controls used by many teams, such as skills, commands and root-level instruction files, have an owning team or guild. Sources: Addie Beach, Rui Martins Lacerda, 2026-09-09.

  • Risk-based code review. The practice in which the depth of review for a change depends on its risk: a low-risk change gets a light check or merges automatically, everything else gets full review, and some kinds of code are kept out of automated review. Sources: Jonathan Wage, 2026-10-13; Spotify Engineering; Chris Adams et al., 2026-06-12.

    Example scheme: Risk-based code review
  • Track record before landing without review. The practice in which a recurring automated source of code changes, such as a fixed prompt that an agent runs again and again, may land its changes without a person reviewing each one only after a clean record over a set period: no incidents, few reverts, few rejections by people and enough landed changes; a source that caused an incident is blocked. Sources: Chris Adams et al., 2026-06-12; Chris Adams et al., 2026-06-12; Chris Adams et al., 2026-06-12.

    Example scheme: Track record before landing without review
  • Agent questions in incident retrospectives. The practice in which a team's regular incident retrospective adds two questions: whether agent-written code contributed to the incident, and whether the larger volume of change strained review, testing, rollout or observability. Sources: Tyson Singer. Grew from: Retrospective (2001).

Contributions to open-source projects

  • Analyze, not create. The practice in which a project lets contributors use language models to answer questions, analyze, check and review their work, but not to create the content they submit. Sources: Jynn Nelson, 2026-08-05; OpenJDK Governing Board.
  • Agents in project spaces only with approval. The practice in which an agent may comment on or act in shared project spaces only after people approve it or explicitly invoke it. Sources: rnk, 2025-12-17; Wirasm.
  • Contributor review of generated code. The practice in which a project requires contributors to read and review all generated code or text, and to be able to explain it, before they ask maintainers for review. Sources: rnk, 2025-12-17.
  • Disclosure of agent use. The practice in which contributors state in the pull request, commit message or post whether and how a model or agent produced the content. Sources: rnk, 2025-12-17; Jynn Nelson, 2026-08-05.
  • Extractive contribution handling. The practice in which maintainers who judge a generated contribution to cost more review time than it is worth reply with a standard request, label it, and stop engaging or close it. Sources: rnk, 2025-12-17; Jynn Nelson, 2026-08-05.
  • Own words in project communication. The practice in which a project requires issues, pull request descriptions, comments and replies to review to be written in the contributor's own words, not pasted model output. Sources: rnk, 2025-12-17; Jellyfin project.
  • Ban on generated contributions. The practice in which a project does not accept contributions that include content generated, in part or in full, by language models or similar systems. Sources: OpenJDK Governing Board; Daniel P. Berrangé, 2024-05-16.

Hiring

How far the agent is trusted

Rules about what an agent may do without a person checking it: how deep the review goes, what the agent may not touch, where it runs. Every practice here also stands in its own section above.

These practices also stand in their own sections above, with their sources.

  • Approval bound to a commit. A team rule in which a review approval covers one specific commit, and new commits the system cannot vouch for, such as an agent's push or a hand-resolved merge, require approval again.
  • Prompter as a required reviewer. A team rule in which the person who directed the agent counts as one of the required reviewers of its pull request, and an agent's approval never counts as a person's.
  • CI workflow files as high risk. The practice in which the files that define the CI pipeline are treated as high risk, because an agent that can edit the pipeline can weaken the review of its own work.
  • Protected test expectations. The practice in which test files and expected results that a task should not change are protected from the agent: made read-only, checked in CI for changes, or named in the agent's instructions as inputs to keep.
  • Named owner of an agent thread. A team rule in which every line of agent work has a named person who owns it, and the agent shows user-visible changes to that person with before-and-after screenshots or recordings.
  • Risk-based code review. The practice in which the depth of review for a change depends on its risk: a low-risk change gets a light check or merges automatically, everything else gets full review, and some kinds of code are kept out of automated review.
  • Track record before landing without review. The practice in which a recurring automated source of code changes, such as a fixed prompt that an agent runs again and again, may land its changes without a person reviewing each one only after a clean record over a set period: no incidents, few reverts, few rejections by people and enough landed changes; a source that caused an incident is blocked.
  • Quarantine. The practice in which agents that read untrusted content, such as public issues or messages, are barred from high-privilege actions, and those actions are done by separate agents.
  • Unread throwaway code. The practice in which code generated for a one-off task is run and thrown away without being read.
  • Agent review of every pull request. The practice in which a team has an agent review every pull request, and review by a person becomes optional.
  • Disposable machine for the agent. The practice in which the agent runs with broad permissions, up to root, on a throwaway machine or virtual machine that has no access to production systems or secrets beyond what development needs.
  • Extra approval for agent pull requests. The practice in which pull requests started by an agent or generated by a model must clear a higher bar than other pull requests, such as more human approvals or required tests.
  • Critical parts by hand. The practice in which the developer writes the critical and complex parts of the code and hands the rest to the agent.
  • Reading agent-written code. The practice in which the developer reads the code an agent wrote before accepting it.
  • Permission-free mode. The practice in which the agent's permission prompts are switched off, sometimes inside a container.

Contributing

See CONTRIBUTING.md. Changes go into data/entries.json; then run python3 scripts/build_readme.py.

来源:GitHub · github.com