coding-agents 0.0.1.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. coding_agents-0.0.1.dev0/PKG-INFO +267 -0
  2. coding_agents-0.0.1.dev0/README.md +239 -0
  3. coding_agents-0.0.1.dev0/pyproject.toml +62 -0
  4. coding_agents-0.0.1.dev0/setup.cfg +4 -0
  5. coding_agents-0.0.1.dev0/src/coding_agents/__init__.py +37 -0
  6. coding_agents-0.0.1.dev0/src/coding_agents/cli.py +87 -0
  7. coding_agents-0.0.1.dev0/src/coding_agents/core/__init__.py +26 -0
  8. coding_agents-0.0.1.dev0/src/coding_agents/core/agent.py +164 -0
  9. coding_agents-0.0.1.dev0/src/coding_agents/core/budget.py +75 -0
  10. coding_agents-0.0.1.dev0/src/coding_agents/core/loop.py +76 -0
  11. coding_agents-0.0.1.dev0/src/coding_agents/core/models.py +55 -0
  12. coding_agents-0.0.1.dev0/src/coding_agents/evolution/__init__.py +0 -0
  13. coding_agents-0.0.1.dev0/src/coding_agents/evolution/parallel_planner.py +67 -0
  14. coding_agents-0.0.1.dev0/src/coding_agents/evolution/skill_miner.py +106 -0
  15. coding_agents-0.0.1.dev0/src/coding_agents/py.typed +2 -0
  16. coding_agents-0.0.1.dev0/src/coding_agents/sandbox/__init__.py +7 -0
  17. coding_agents-0.0.1.dev0/src/coding_agents/sandbox/policy.py +61 -0
  18. coding_agents-0.0.1.dev0/src/coding_agents/sandbox/worktree.py +61 -0
  19. coding_agents-0.0.1.dev0/src/coding_agents/tools/__init__.py +8 -0
  20. coding_agents-0.0.1.dev0/src/coding_agents/tools/base.py +55 -0
  21. coding_agents-0.0.1.dev0/src/coding_agents/tools/bash_tool.py +103 -0
  22. coding_agents-0.0.1.dev0/src/coding_agents/tools/patch_editor.py +111 -0
  23. coding_agents-0.0.1.dev0/src/coding_agents/verification/__init__.py +15 -0
  24. coding_agents-0.0.1.dev0/src/coding_agents/verification/fault_localizer.py +51 -0
  25. coding_agents-0.0.1.dev0/src/coding_agents/verification/oscillation.py +46 -0
  26. coding_agents-0.0.1.dev0/src/coding_agents/verification/pipeline.py +96 -0
  27. coding_agents-0.0.1.dev0/src/coding_agents.egg-info/PKG-INFO +267 -0
  28. coding_agents-0.0.1.dev0/src/coding_agents.egg-info/SOURCES.txt +35 -0
  29. coding_agents-0.0.1.dev0/src/coding_agents.egg-info/dependency_links.txt +1 -0
  30. coding_agents-0.0.1.dev0/src/coding_agents.egg-info/entry_points.txt +2 -0
  31. coding_agents-0.0.1.dev0/src/coding_agents.egg-info/requires.txt +10 -0
  32. coding_agents-0.0.1.dev0/src/coding_agents.egg-info/top_level.txt +1 -0
  33. coding_agents-0.0.1.dev0/tests/test_cli.py +19 -0
  34. coding_agents-0.0.1.dev0/tests/test_core.py +49 -0
  35. coding_agents-0.0.1.dev0/tests/test_patch_editor.py +46 -0
  36. coding_agents-0.0.1.dev0/tests/test_skill_miner.py +43 -0
  37. coding_agents-0.0.1.dev0/tests/test_verification.py +46 -0
@@ -0,0 +1,267 @@
1
+ Metadata-Version: 2.4
2
+ Name: coding-agents
3
+ Version: 0.0.1.dev0
4
+ Summary: The reference software engineering harness and runtime for autonomous coding agents.
5
+ Author-email: Coding Agents Authors <authors@example.com>
6
+ License: MIT
7
+ Keywords: coding-agents,llm-agents,software-engineering,harness,autonomous-coding,swe-bench
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Topic :: Software Development :: Code Generators
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Operating System :: MacOS
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: pydantic>=2.0.0
21
+ Requires-Dist: rich>=13.0.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
24
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
25
+ Provides-Extra: llm
26
+ Requires-Dist: anthropic>=0.20.0; extra == "llm"
27
+ Requires-Dist: openai>=1.0.0; extra == "llm"
28
+
29
+ # Coding Agents: Foundations, Architecture, Harnesses, and Enterprise Practice
30
+
31
+ *Building, Orchestrating, Evaluating, and Scaling AI Software Engineers*
32
+
33
+ A Peanutbook manuscript. Build it with `bubble-build`; read the source in
34
+ `chapter*/`.
35
+
36
+ ---
37
+
38
+ ## What this book argues
39
+
40
+ One claim, stated in Chapter 1 and earned over the following eleven:
41
+
42
+ > **A coding agent is not a language model with a code prompt. It is a software
43
+ > engineering system built around a model.**
44
+
45
+ The question it answers is not whether AI can write code. That is settled, and
46
+ settling it mattered less than everyone expected. The question is:
47
+
48
+ > **How do we engineer software-development systems in which humans and coding
49
+ > agents work together reliably on large production codebases?**
50
+
51
+ Roughly seventy percent of the text is architecture, large-codebase practice,
52
+ verification, evaluation, security, and multi-agent engineering. The other
53
+ thirty percent uses specific systems as concrete implementations, because
54
+ abstract discussion of agents is unfalsifiable and boring. That ratio is
55
+ deliberate: the named products will be replaced, some of them before this is in
56
+ print. The questions in the other seventy percent will not.
57
+
58
+ ---
59
+
60
+ ## Register
61
+
62
+ The voice is already set by the first three chapters. Match it. These are
63
+ descriptions of what the existing prose does, not aspirations.
64
+
65
+ **Address the reader as "you." Never "we."** Across the written chapters: 89
66
+ instances of *you*, one of *we*. The reader is an engineer doing this work, not
67
+ a co-author being carried along.
68
+
69
+ **First person singular is rationed, and only ever for first-hand experience.**
70
+ Four instances in fifteen thousand words, all of the form *"in notes I wrote in
71
+ March 2024."* Use it to introduce evidence you personally hold. Never for
72
+ opinion — the argument should stand without the byline.
73
+
74
+ **State the claim, then earn it.** The paragraph shape is: assertion,
75
+ mechanism, consequence. Not: build-up, build-up, reveal.
76
+
77
+ **Prefer the corrective construction.** *X is not Y. It is Z.* — "The context
78
+ window is not storage. It is a working set." "File context is not repository
79
+ context." This is the book's most characteristic sentence, because most of what
80
+ it has to teach is a correction to a reasonable-sounding wrong model.
81
+
82
+ **End on the consequence, not the hedge.** A sentence that trails off into
83
+ *"...but of course this depends on your situation"* has wasted the reader's
84
+ attention. If it depends, say what it depends on.
85
+
86
+ **No hype vocabulary.** No *revolutionary*, *seamless*, *game-changing*,
87
+ *paradigm shift*, *cutting-edge*. The existing chapters contain none. Enthusiasm
88
+ is conveyed by precision, not adjectives.
89
+
90
+ **Concrete over abstract, always.** A number with a date beats a
91
+ characterization. A named failure beats "challenges." A worked example beats a
92
+ principle.
93
+
94
+ **Date every number, or state only the shape.** The field moves fast enough that
95
+ an undated figure is worse than none, and a book that quotes a leaderboard
96
+ without saying when looks careless within a year. Where a figure carries an
97
+ argument, cite the paper and the date. Where only the trend matters, describe
98
+ the trend.
99
+
100
+ **Name few products, and never rank them.** A book that ranks models has a shelf
101
+ life measured in months.
102
+
103
+ **Say what did not work.** Anyone can write "here are the best practices." The
104
+ material worth reading is *"we thought the bottleneck was X and it was Y."* The
105
+ author's own failed work is the strongest evidence in the book; use it.
106
+
107
+ **Admit uncertainty in the text, not in a hedge.** "This is model-specific and
108
+ worth measuring on your own workload" is honest. "This may or may not apply" is
109
+ noise.
110
+
111
+ ### Structural habits
112
+
113
+ | Element | Convention |
114
+ | :--- | :--- |
115
+ | `>IMPORS:` box | One claim, stated once. About six per chapter. |
116
+ | `>NOTES:` box | An aside the reader can skip. About two per chapter. |
117
+ | Cross-references | Constant — roughly one per 230 words. Every chapter says which chapter takes a thread further. |
118
+ | Figure captions | 20 words maximum, stating the claim. Longer explanation goes in the paragraph that introduces the figure. |
119
+ | `<!-- -->` comments | Author notes, verification lists, publication gates. Dropped from the PDF. |
120
+ | Chapter ending | A named handoff to the next chapter. |
121
+
122
+ ### Two things that are not register, but read like it
123
+
124
+ **`>NOTES:` blocks print.** They are for the reader. Notes to yourself go in
125
+ HTML comments, which pandoc drops.
126
+
127
+ **Every chapter opens with a real, attributed epigraph.** Brooks (Ch 1), Parnas
128
+ (Ch 2), Pike (Ch 3). Do not invent quotes, and do not attribute the book's own
129
+ theses to anyone — those belong in `>IMPORS:` boxes.
130
+
131
+ ---
132
+
133
+ ## Shelf life
134
+
135
+ The book is written for a **5–10 year spine and a 2–3 year surface**, and the
136
+ two need to stay physically separable.
137
+
138
+ What is being bet on lasting: the verification principle, context as a working
139
+ set with an allocator, file context against repository context, benchmarks
140
+ scoring a harness rather than a model, paired evaluation, the prefill/decode
141
+ asymmetry, and the seven-component decomposition — which survives on Parnas's
142
+ test, not on fashion, because each component is a decision that changes
143
+ independently of the others.
144
+
145
+ What will rot on schedule: model names, context sizes, prices, benchmark
146
+ numbers, API shapes, and the current claim that frontier general models beat
147
+ code-only models. All of it is real and all of it belongs in the book.
148
+
149
+ This ships on KDP, where a revised interior is a re-upload rather than a print
150
+ run, so the cost of carrying perishable material is low and the book can afford
151
+ more of it than a traditionally published one. But **the thing that does not get
152
+ revised is the reviews.** A one-star "already out of date" from the first
153
+ edition sits on the same product page as the fourth, and no amount of iteration
154
+ removes it. So perishable content is still quarantined into clearly dated
155
+ sections — not to make revision cheap, but because a reader forgives datedness
156
+ they were warned about and punishes datedness that presented itself as current.
157
+
158
+ Handled that way the perishable sections invert from liability to asset: a
159
+ section titled *The Frontier, as of <month year>* is a reason to buy the new
160
+ edition. Put the edition and its date on the title page, and keep a short
161
+ revision record in the back matter.
162
+
163
+ The genuine risk is not that details age. It is that the **harness framing
164
+ itself** gets absorbed — models that do multi-hour repository work with no
165
+ scaffold would turn Part II into a historical chapter. The hedge is to write the
166
+ harness chapters around *why* a harness exists — verification, budget, policy,
167
+ accountability — rather than *how to build one*. Those four survive the
168
+ absorption, because someone still has to verify the diff, pay for it, constrain
169
+ it, and answer for it.
170
+
171
+ The lifespan is therefore mostly decided by whether the book's own concepts get
172
+ adopted: the Coding Agent Stack, the Evolution Ladder, the Agent-Ready
173
+ Repository, Harness Engineering. A book that is cited for its framework outlives
174
+ its examples. A book that only summarizes today's tools does not, however well
175
+ written.
176
+
177
+ ---
178
+
179
+ ## Structure
180
+
181
+ Four parts, twelve chapters, following one line of development:
182
+
183
+ ```text
184
+ Static Agent -> Stateful -> Persistent -> Multi-Agent -> Self-Evolving
185
+ ```
186
+
187
+ | # | Chapter | Words | State |
188
+ | ---: | :--- | ---: | :--- |
189
+ | | **Part I — Foundations** | | |
190
+ | 1 | Code Language Models | 4,300 | drafted |
191
+ | 2 | Anatomy of a Coding Agent | 6,200 | drafted |
192
+ | 3 | Context and Repository Understanding | 4,100 | drafted |
193
+ | | **Part II — The Agent Harness** | | |
194
+ | 4 | Tools, Skills, and Agent Harnesses | 4,700 | drafted |
195
+ | 5 | Planning and Spec-Driven Development | 4,600 | drafted |
196
+ | 6 | Coding, Debugging, and Refactoring | 4,500 | drafted |
197
+ | 7 | Verification and Repair | | outline |
198
+ | | **Part III — Coding Agents in Production** | | |
199
+ | 8 | Coding Agents at Scale | | outline |
200
+ | 9 | Long-Running and Multi-Agent Systems | | outline |
201
+ | 10 | Evaluation, Observability, and Economics | | outline |
202
+ | 11 | Security and Enterprise Deployment | | outline |
203
+ | | **Part IV — The Next Generation** | | |
204
+ | 12 | Self-Evolving Coding Agents | | outline |
205
+
206
+ Front matter is in `chapterx/` — the preface is outlined, not written, and it
207
+ owns the author-credibility argument and the book-structure walkthrough.
208
+ `chapter2/_draft-from-ch1.md` is the original Chapter 1, kept because its
209
+ forty-line agent and enterprise retrospective still have somewhere to go.
210
+
211
+ The concepts the book has to deliver, not merely name: the **Coding Agent
212
+ Stack**, the **Agentic Software Engineering Loop**, the **Agent-Ready
213
+ Repository** and its readiness score, **Harness Engineering**, and the **Coding
214
+ Agent Evolution Ladder**.
215
+
216
+ ---
217
+
218
+ ## Building
219
+
220
+ ```bash
221
+ conda activate usao
222
+
223
+ bubble-convert 3 # one chapter, while drafting
224
+ bubble-build --style square # the whole book -> book_square.pdf
225
+ bubble-single-star # style lint
226
+ ```
227
+
228
+ `bubble-convert` does **not** run figure scripts; only `bubble-build` does. When
229
+ you change a figure while drafting, run it yourself first:
230
+
231
+ ```bash
232
+ cd chapter3-*/img && python myfig.py && cd ../..
233
+ ```
234
+
235
+ Check captions before building:
236
+
237
+ ```bash
238
+ grep -rn '^!\[' chapter*/*.md | sed 's/^\(.*\):!\[\(.*\)\](.*/\1|\2/' \
239
+ | awk -F'|' '{n=split($2,a," "); if (n>20) printf "%d words: %s\n", n, $1}'
240
+ ```
241
+
242
+ Figures are generated by Python scripts in each chapter's `img/`, never
243
+ committed as hand-made images. The conventions are in
244
+ `.claude/skills/peanutbook-figures/`; mindmaps need `mathicon`.
245
+
246
+ ---
247
+
248
+ ## Source material, and the gate on it
249
+
250
+ `raw/` holds the author's Oracle talk and design notes from 2023–2024. Read
251
+ `raw/README.md` before using any of it.
252
+
253
+ The short version: the model rankings in those notes are dead, and the methods
254
+ are not. The recitation probe, paired evaluation, and the generate–verify–repair
255
+ loop all come from there and all still hold. Cite the papers with dates, never
256
+ the slides. Abstract employer-internal specifics into general lessons, strip
257
+ colleague names and email addresses, and confirm publication clearance.
258
+
259
+ ---
260
+
261
+ ## Before this ships
262
+
263
+ - [ ] Preface written — it owns the author's position and the book's structure
264
+ - [ ] Every date, benchmark size, and figure verified against its source
265
+ - [ ] The frontier claims in Chapter 1 re-checked and stamped
266
+ - [ ] `author` set in `peanut.config`; covers replaced
267
+ - [ ] Every `@fig:` resolves, no caption over 20 words, `bubble-single-star` clean
@@ -0,0 +1,239 @@
1
+ # Coding Agents: Foundations, Architecture, Harnesses, and Enterprise Practice
2
+
3
+ *Building, Orchestrating, Evaluating, and Scaling AI Software Engineers*
4
+
5
+ A Peanutbook manuscript. Build it with `bubble-build`; read the source in
6
+ `chapter*/`.
7
+
8
+ ---
9
+
10
+ ## What this book argues
11
+
12
+ One claim, stated in Chapter 1 and earned over the following eleven:
13
+
14
+ > **A coding agent is not a language model with a code prompt. It is a software
15
+ > engineering system built around a model.**
16
+
17
+ The question it answers is not whether AI can write code. That is settled, and
18
+ settling it mattered less than everyone expected. The question is:
19
+
20
+ > **How do we engineer software-development systems in which humans and coding
21
+ > agents work together reliably on large production codebases?**
22
+
23
+ Roughly seventy percent of the text is architecture, large-codebase practice,
24
+ verification, evaluation, security, and multi-agent engineering. The other
25
+ thirty percent uses specific systems as concrete implementations, because
26
+ abstract discussion of agents is unfalsifiable and boring. That ratio is
27
+ deliberate: the named products will be replaced, some of them before this is in
28
+ print. The questions in the other seventy percent will not.
29
+
30
+ ---
31
+
32
+ ## Register
33
+
34
+ The voice is already set by the first three chapters. Match it. These are
35
+ descriptions of what the existing prose does, not aspirations.
36
+
37
+ **Address the reader as "you." Never "we."** Across the written chapters: 89
38
+ instances of *you*, one of *we*. The reader is an engineer doing this work, not
39
+ a co-author being carried along.
40
+
41
+ **First person singular is rationed, and only ever for first-hand experience.**
42
+ Four instances in fifteen thousand words, all of the form *"in notes I wrote in
43
+ March 2024."* Use it to introduce evidence you personally hold. Never for
44
+ opinion — the argument should stand without the byline.
45
+
46
+ **State the claim, then earn it.** The paragraph shape is: assertion,
47
+ mechanism, consequence. Not: build-up, build-up, reveal.
48
+
49
+ **Prefer the corrective construction.** *X is not Y. It is Z.* — "The context
50
+ window is not storage. It is a working set." "File context is not repository
51
+ context." This is the book's most characteristic sentence, because most of what
52
+ it has to teach is a correction to a reasonable-sounding wrong model.
53
+
54
+ **End on the consequence, not the hedge.** A sentence that trails off into
55
+ *"...but of course this depends on your situation"* has wasted the reader's
56
+ attention. If it depends, say what it depends on.
57
+
58
+ **No hype vocabulary.** No *revolutionary*, *seamless*, *game-changing*,
59
+ *paradigm shift*, *cutting-edge*. The existing chapters contain none. Enthusiasm
60
+ is conveyed by precision, not adjectives.
61
+
62
+ **Concrete over abstract, always.** A number with a date beats a
63
+ characterization. A named failure beats "challenges." A worked example beats a
64
+ principle.
65
+
66
+ **Date every number, or state only the shape.** The field moves fast enough that
67
+ an undated figure is worse than none, and a book that quotes a leaderboard
68
+ without saying when looks careless within a year. Where a figure carries an
69
+ argument, cite the paper and the date. Where only the trend matters, describe
70
+ the trend.
71
+
72
+ **Name few products, and never rank them.** A book that ranks models has a shelf
73
+ life measured in months.
74
+
75
+ **Say what did not work.** Anyone can write "here are the best practices." The
76
+ material worth reading is *"we thought the bottleneck was X and it was Y."* The
77
+ author's own failed work is the strongest evidence in the book; use it.
78
+
79
+ **Admit uncertainty in the text, not in a hedge.** "This is model-specific and
80
+ worth measuring on your own workload" is honest. "This may or may not apply" is
81
+ noise.
82
+
83
+ ### Structural habits
84
+
85
+ | Element | Convention |
86
+ | :--- | :--- |
87
+ | `>IMPORS:` box | One claim, stated once. About six per chapter. |
88
+ | `>NOTES:` box | An aside the reader can skip. About two per chapter. |
89
+ | Cross-references | Constant — roughly one per 230 words. Every chapter says which chapter takes a thread further. |
90
+ | Figure captions | 20 words maximum, stating the claim. Longer explanation goes in the paragraph that introduces the figure. |
91
+ | `<!-- -->` comments | Author notes, verification lists, publication gates. Dropped from the PDF. |
92
+ | Chapter ending | A named handoff to the next chapter. |
93
+
94
+ ### Two things that are not register, but read like it
95
+
96
+ **`>NOTES:` blocks print.** They are for the reader. Notes to yourself go in
97
+ HTML comments, which pandoc drops.
98
+
99
+ **Every chapter opens with a real, attributed epigraph.** Brooks (Ch 1), Parnas
100
+ (Ch 2), Pike (Ch 3). Do not invent quotes, and do not attribute the book's own
101
+ theses to anyone — those belong in `>IMPORS:` boxes.
102
+
103
+ ---
104
+
105
+ ## Shelf life
106
+
107
+ The book is written for a **5–10 year spine and a 2–3 year surface**, and the
108
+ two need to stay physically separable.
109
+
110
+ What is being bet on lasting: the verification principle, context as a working
111
+ set with an allocator, file context against repository context, benchmarks
112
+ scoring a harness rather than a model, paired evaluation, the prefill/decode
113
+ asymmetry, and the seven-component decomposition — which survives on Parnas's
114
+ test, not on fashion, because each component is a decision that changes
115
+ independently of the others.
116
+
117
+ What will rot on schedule: model names, context sizes, prices, benchmark
118
+ numbers, API shapes, and the current claim that frontier general models beat
119
+ code-only models. All of it is real and all of it belongs in the book.
120
+
121
+ This ships on KDP, where a revised interior is a re-upload rather than a print
122
+ run, so the cost of carrying perishable material is low and the book can afford
123
+ more of it than a traditionally published one. But **the thing that does not get
124
+ revised is the reviews.** A one-star "already out of date" from the first
125
+ edition sits on the same product page as the fourth, and no amount of iteration
126
+ removes it. So perishable content is still quarantined into clearly dated
127
+ sections — not to make revision cheap, but because a reader forgives datedness
128
+ they were warned about and punishes datedness that presented itself as current.
129
+
130
+ Handled that way the perishable sections invert from liability to asset: a
131
+ section titled *The Frontier, as of <month year>* is a reason to buy the new
132
+ edition. Put the edition and its date on the title page, and keep a short
133
+ revision record in the back matter.
134
+
135
+ The genuine risk is not that details age. It is that the **harness framing
136
+ itself** gets absorbed — models that do multi-hour repository work with no
137
+ scaffold would turn Part II into a historical chapter. The hedge is to write the
138
+ harness chapters around *why* a harness exists — verification, budget, policy,
139
+ accountability — rather than *how to build one*. Those four survive the
140
+ absorption, because someone still has to verify the diff, pay for it, constrain
141
+ it, and answer for it.
142
+
143
+ The lifespan is therefore mostly decided by whether the book's own concepts get
144
+ adopted: the Coding Agent Stack, the Evolution Ladder, the Agent-Ready
145
+ Repository, Harness Engineering. A book that is cited for its framework outlives
146
+ its examples. A book that only summarizes today's tools does not, however well
147
+ written.
148
+
149
+ ---
150
+
151
+ ## Structure
152
+
153
+ Four parts, twelve chapters, following one line of development:
154
+
155
+ ```text
156
+ Static Agent -> Stateful -> Persistent -> Multi-Agent -> Self-Evolving
157
+ ```
158
+
159
+ | # | Chapter | Words | State |
160
+ | ---: | :--- | ---: | :--- |
161
+ | | **Part I — Foundations** | | |
162
+ | 1 | Code Language Models | 4,300 | drafted |
163
+ | 2 | Anatomy of a Coding Agent | 6,200 | drafted |
164
+ | 3 | Context and Repository Understanding | 4,100 | drafted |
165
+ | | **Part II — The Agent Harness** | | |
166
+ | 4 | Tools, Skills, and Agent Harnesses | 4,700 | drafted |
167
+ | 5 | Planning and Spec-Driven Development | 4,600 | drafted |
168
+ | 6 | Coding, Debugging, and Refactoring | 4,500 | drafted |
169
+ | 7 | Verification and Repair | | outline |
170
+ | | **Part III — Coding Agents in Production** | | |
171
+ | 8 | Coding Agents at Scale | | outline |
172
+ | 9 | Long-Running and Multi-Agent Systems | | outline |
173
+ | 10 | Evaluation, Observability, and Economics | | outline |
174
+ | 11 | Security and Enterprise Deployment | | outline |
175
+ | | **Part IV — The Next Generation** | | |
176
+ | 12 | Self-Evolving Coding Agents | | outline |
177
+
178
+ Front matter is in `chapterx/` — the preface is outlined, not written, and it
179
+ owns the author-credibility argument and the book-structure walkthrough.
180
+ `chapter2/_draft-from-ch1.md` is the original Chapter 1, kept because its
181
+ forty-line agent and enterprise retrospective still have somewhere to go.
182
+
183
+ The concepts the book has to deliver, not merely name: the **Coding Agent
184
+ Stack**, the **Agentic Software Engineering Loop**, the **Agent-Ready
185
+ Repository** and its readiness score, **Harness Engineering**, and the **Coding
186
+ Agent Evolution Ladder**.
187
+
188
+ ---
189
+
190
+ ## Building
191
+
192
+ ```bash
193
+ conda activate usao
194
+
195
+ bubble-convert 3 # one chapter, while drafting
196
+ bubble-build --style square # the whole book -> book_square.pdf
197
+ bubble-single-star # style lint
198
+ ```
199
+
200
+ `bubble-convert` does **not** run figure scripts; only `bubble-build` does. When
201
+ you change a figure while drafting, run it yourself first:
202
+
203
+ ```bash
204
+ cd chapter3-*/img && python myfig.py && cd ../..
205
+ ```
206
+
207
+ Check captions before building:
208
+
209
+ ```bash
210
+ grep -rn '^!\[' chapter*/*.md | sed 's/^\(.*\):!\[\(.*\)\](.*/\1|\2/' \
211
+ | awk -F'|' '{n=split($2,a," "); if (n>20) printf "%d words: %s\n", n, $1}'
212
+ ```
213
+
214
+ Figures are generated by Python scripts in each chapter's `img/`, never
215
+ committed as hand-made images. The conventions are in
216
+ `.claude/skills/peanutbook-figures/`; mindmaps need `mathicon`.
217
+
218
+ ---
219
+
220
+ ## Source material, and the gate on it
221
+
222
+ `raw/` holds the author's Oracle talk and design notes from 2023–2024. Read
223
+ `raw/README.md` before using any of it.
224
+
225
+ The short version: the model rankings in those notes are dead, and the methods
226
+ are not. The recitation probe, paired evaluation, and the generate–verify–repair
227
+ loop all come from there and all still hold. Cite the papers with dates, never
228
+ the slides. Abstract employer-internal specifics into general lessons, strip
229
+ colleague names and email addresses, and confirm publication clearance.
230
+
231
+ ---
232
+
233
+ ## Before this ships
234
+
235
+ - [ ] Preface written — it owns the author's position and the book's structure
236
+ - [ ] Every date, benchmark size, and figure verified against its source
237
+ - [ ] The frontier claims in Chapter 1 re-checked and stamped
238
+ - [ ] `author` set in `peanut.config`; covers replaced
239
+ - [ ] Every `@fig:` resolves, no caption over 20 words, `bubble-single-star` clean
@@ -0,0 +1,62 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "coding-agents"
7
+ version = "0.0.1.dev0"
8
+ description = "The reference software engineering harness and runtime for autonomous coding agents."
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Coding Agents Authors", email = "authors@example.com" }
14
+ ]
15
+ keywords = [
16
+ "coding-agents",
17
+ "llm-agents",
18
+ "software-engineering",
19
+ "harness",
20
+ "autonomous-coding",
21
+ "swe-bench"
22
+ ]
23
+ classifiers = [
24
+ "Development Status :: 4 - Beta",
25
+ "Intended Audience :: Developers",
26
+ "Topic :: Software Development :: Code Generators",
27
+ "Programming Language :: Python :: 3",
28
+ "Programming Language :: Python :: 3.10",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
31
+ "License :: OSI Approved :: MIT License",
32
+ "Operating System :: POSIX :: Linux",
33
+ "Operating System :: MacOS",
34
+ ]
35
+ dependencies = [
36
+ "pydantic>=2.0.0",
37
+ "rich>=13.0.0",
38
+ ]
39
+
40
+ [project.optional-dependencies]
41
+ dev = [
42
+ "pytest>=7.0.0",
43
+ "pytest-asyncio>=0.21.0",
44
+ ]
45
+ llm = [
46
+ "anthropic>=0.20.0",
47
+ "openai>=1.0.0",
48
+ ]
49
+
50
+ [project.scripts]
51
+ coding-agent = "coding_agents.cli:main"
52
+
53
+ [tool.setuptools.packages.find]
54
+ where = ["src"]
55
+
56
+ [tool.setuptools.package-data]
57
+ coding_agents = ["py.typed"]
58
+
59
+ [tool.pytest.ini_options]
60
+ testpaths = ["tests"]
61
+ python_files = ["test_*.py"]
62
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,37 @@
1
+ """Coding Agents: The reference harness and runtime for autonomous coding systems."""
2
+
3
+ from coding_agents.core.agent import CodingAgent
4
+ from coding_agents.core.budget import Budget
5
+ from coding_agents.core.models import StopCondition, Trajectory, TurnRecord, ToolCall, ToolResult
6
+ from coding_agents.tools.patch_editor import PatchEditor
7
+ from coding_agents.tools.bash_tool import BashTool
8
+ from coding_agents.sandbox.policy import PolicyGate
9
+ from coding_agents.sandbox.worktree import WorktreeSandbox
10
+ from coding_agents.verification.pipeline import VerificationPipeline, VerificationManifest
11
+ from coding_agents.verification.fault_localizer import FaultLocalizer
12
+ from coding_agents.verification.oscillation import OscillationDetector
13
+ from coding_agents.evolution.skill_miner import SkillMiner
14
+ from coding_agents.evolution.parallel_planner import ParallelPlanningEngine
15
+
16
+ __version__ = "0.0.1.dev0"
17
+
18
+ __all__ = [
19
+ "CodingAgent",
20
+ "Budget",
21
+ "StopCondition",
22
+ "Trajectory",
23
+ "TurnRecord",
24
+ "ToolCall",
25
+ "ToolResult",
26
+ "PatchEditor",
27
+ "BashTool",
28
+ "PolicyGate",
29
+ "WorktreeSandbox",
30
+ "VerificationPipeline",
31
+ "VerificationManifest",
32
+ "FaultLocalizer",
33
+ "OscillationDetector",
34
+ "SkillMiner",
35
+ "ParallelPlanningEngine",
36
+ ]
37
+