devagent-ai 0.3.1__tar.gz → 0.3.2__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 (58) hide show
  1. {devagent_ai-0.3.1/devagent_ai.egg-info → devagent_ai-0.3.2}/PKG-INFO +175 -42
  2. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/README.md +174 -41
  3. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/__init__.py +1 -1
  4. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/cli.py +143 -11
  5. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/models.py +118 -1
  6. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/orchestrator.py +20 -3
  7. devagent_ai-0.3.2/devagent/report.py +350 -0
  8. devagent_ai-0.3.2/devagent/source_control.py +305 -0
  9. devagent_ai-0.3.2/devagent/technical_review.py +230 -0
  10. {devagent_ai-0.3.1 → devagent_ai-0.3.2/devagent_ai.egg-info}/PKG-INFO +175 -42
  11. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent_ai.egg-info/SOURCES.txt +5 -0
  12. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/pyproject.toml +1 -1
  13. devagent_ai-0.3.2/tests/test_cli.py +321 -0
  14. devagent_ai-0.3.2/tests/test_developer_review_report.py +191 -0
  15. devagent_ai-0.3.2/tests/test_preservation_contradiction.py +113 -0
  16. devagent_ai-0.3.2/tests/test_source_control_publish.py +268 -0
  17. devagent_ai-0.3.1/devagent/report.py +0 -52
  18. devagent_ai-0.3.1/tests/test_cli.py +0 -29
  19. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/LICENSE +0 -0
  20. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/NOTICE +0 -0
  21. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/agent/__init__.py +0 -0
  22. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/agent/llm.py +0 -0
  23. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/agent/loop.py +0 -0
  24. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/agent/memory.py +0 -0
  25. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/agent/prompts.py +0 -0
  26. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/agent/tools.py +0 -0
  27. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/__main__.py +0 -0
  28. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/artifacts.py +0 -0
  29. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/config.py +0 -0
  30. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/discovery.py +0 -0
  31. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/evaluation.py +0 -0
  32. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/memory.py +0 -0
  33. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/providers.py +0 -0
  34. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/retrieval.py +0 -0
  35. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/safety.py +0 -0
  36. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/state_machine.py +0 -0
  37. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/tasking.py +0 -0
  38. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/workspace.py +0 -0
  39. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent/worktree.py +0 -0
  40. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent_ai.egg-info/dependency_links.txt +0 -0
  41. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent_ai.egg-info/entry_points.txt +0 -0
  42. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent_ai.egg-info/requires.txt +0 -0
  43. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/devagent_ai.egg-info/top_level.txt +0 -0
  44. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/setup.cfg +0 -0
  45. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_benchmark_catalog.py +0 -0
  46. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_capability_discovery.py +0 -0
  47. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_discovery_memory.py +0 -0
  48. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_e2e_fake_provider.py +0 -0
  49. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_evaluation_harness.py +0 -0
  50. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_evaluation_matrix.py +0 -0
  51. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_evaluation_regression_evidence.py +0 -0
  52. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_packaging_metadata.py +0 -0
  53. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_production_hardening.py +0 -0
  54. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_retrieval.py +0 -0
  55. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_safety_workspace.py +0 -0
  56. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_structured_provider_contract.py +0 -0
  57. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_tasking_state.py +0 -0
  58. {devagent_ai-0.3.1 → devagent_ai-0.3.2}/tests/test_worktree.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: devagent-ai
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Evidence-driven local autonomous software engineering agent
5
5
  Author: Tom Ha
6
6
  Maintainer: Tom Ha
@@ -36,13 +36,13 @@ Dynamic: license-file
36
36
  [![Status: Alpha](https://img.shields.io/badge/status-alpha-orange.svg)](#project-status)
37
37
  [![Production CI](https://github.com/tomha85/devagent/actions/workflows/ci.yml/badge.svg)](https://github.com/tomha85/devagent/actions/workflows/ci.yml)
38
38
 
39
- **A local, evidence-driven software engineering agent that turns a requirement into a tested, reviewed patch — while leaving commit, push, merge, and deploy decisions to the developer.**
39
+ **A local, evidence-driven software engineering agent that turns a requirement into a tested, independently reviewed patch, prints a developer-grade engineering report, then automatically commits and fast-forward pushes a `VERIFIED` result to the developer's current local branch — creating a new safe branch only when starting from `main`, `master`, or `trunk` — without creating a PR or merging code.**
40
40
 
41
- DevAgent runs against a local repository. It discovers the application, gathers source evidence, compiles acceptance criteria, plans a bounded change, creates backups, implements the minimum necessary patch, runs repository-supported verification, reviews the final diff, and returns one final engineering report.
41
+ DevAgent runs against a local repository. It discovers the application, gathers source evidence, compiles acceptance criteria, plans a bounded change, creates backups, implements the minimum necessary patch, runs repository-supported verification, reviews the final diff, prints a detailed engineering review report, and only then performs bounded source-control publication when the result is `VERIFIED`.
42
42
 
43
- > **From requirement to verified local branch.**
43
+ > **From requirement to evidence-backed verified branch.**
44
44
  >
45
- > DevAgent can modify software. It does not publish software.
45
+ > Normal flow: **implement → verify → report → commit → push branch → stop**. DevAgent never creates a pull request or merges code. Use `--no-publish` for a local review-only run.
46
46
 
47
47
  ## Why DevAgent?
48
48
 
@@ -58,8 +58,11 @@ Core principles:
58
58
  - **Backups before edits** — existing files are backed up before first modification.
59
59
  - **Repository-native verification** — use commands supported by manifests, package scripts, tests, and CI evidence.
60
60
  - **Independent review** — the final diff is reviewed separately from implementation.
61
+ - **Developer-grade reporting** — the report begins with implementation logic, then lists exact changed symbols, tests, acceptance evidence, failures, gaps, and completeness.
61
62
  - **Provider choice** — OpenAI, Anthropic/Claude, xAI/Grok, and OpenAI-compatible local endpoints.
62
- - **No automatic publishing** — DevAgent does not commit, push, merge, rebase, or deploy.
63
+ - **Bounded automatic publishing** — after the report, only a `VERIFIED` result may be committed and fast-forward pushed from the isolated worktree; normal development branches continue in place, while protected branches cause DevAgent to create a new safe branch.
64
+ - **Review-only escape hatch** — `--no-publish` disables commit/push when the developer wants to inspect locally first.
65
+ - **No PR or merge automation** — DevAgent never creates PRs, merges, rebases, force-pushes, or deploys.
63
66
  - **Evidence-backed outcomes** — final status is `VERIFIED`, `PARTIALLY_VERIFIED`, or `BLOCKED`.
64
67
 
65
68
  ## Quick start
@@ -128,6 +131,61 @@ From the application repository you want DevAgent to work on:
128
131
  devagent "Fix websocket reconnect bug and add regression tests"
129
132
  ```
130
133
 
134
+ For a normal `VERIFIED` run, DevAgent will:
135
+
136
+ ```text
137
+ implement and verify
138
+ ↓
139
+ print the full engineering review report
140
+ ↓
141
+ continue the current local development branch
142
+ (or create a new DevAgent branch from main/master/trunk)
143
+ ↓
144
+ commit only reviewed changed paths
145
+ ↓
146
+ fast-forward push that branch to origin
147
+ ↓
148
+ print a source-control publication receipt
149
+ ↓
150
+ STOP — no PR, no merge
151
+ ```
152
+
153
+ By default, DevAgent treats the developer's current local Git branch as the working branch. Repeated prompts continue that same non-protected branch. If the developer is on `main`, `master`, or `trunk`, DevAgent creates a unique safe branch such as:
154
+
155
+ ```text
156
+ devagent/20260825T020000Z-ab12cd
157
+ ```
158
+
159
+ To explicitly start a new branch instead of continuing the current development branch:
160
+
161
+ ```bash
162
+ devagent \
163
+ --publish-branch feature/devagent-csv-export \
164
+ "Add CSV export to reports"
165
+ ```
166
+
167
+ To run DevAgent without any commit/push:
168
+
169
+ ```bash
170
+ devagent --no-publish \
171
+ "Add CSV export to reports"
172
+ ```
173
+
174
+ `--publish` remains accepted as an explicit expression of the default publishing behavior, but is not required.
175
+
176
+ Automatic publication is intentionally narrow:
177
+
178
+ - the engineering report is emitted before any commit or push,
179
+ - the run must finish `VERIFIED`,
180
+ - the default isolated worktree must be active,
181
+ - `main`, `master`, and `trunk` are never publication targets; DevAgent creates a new safe branch when started there,
182
+ - an existing branch may be continued only when it is the developer's current local non-protected branch and its remote history is compatible,
183
+ - remote branch state is captured before model execution and checked again before publication,
184
+ - only reviewed changed paths are staged,
185
+ - one commit is created and pushed with normal fast-forward Git semantics; no force push is used,
186
+ - no pull request is created,
187
+ - no merge, rebase, force push, or deployment is performed.
188
+
131
189
  Other inputs:
132
190
 
133
191
  ```bash
@@ -147,7 +205,7 @@ devagent doctor
147
205
  devagent status
148
206
  ```
149
207
 
150
- Normal mode stays quiet apart from state updates and the final engineering report. `--verbose` exposes operational diagnostics, not hidden chain-of-thought.
208
+ Normal mode stays quiet apart from state updates, the engineering report, and the post-report publication receipt. `--verbose` exposes operational diagnostics, not hidden chain-of-thought.
151
209
 
152
210
  ## What DevAgent does
153
211
 
@@ -187,9 +245,13 @@ FINAL_VERIFY
187
245
  LEARN
188
246
  ↓
189
247
  REPORT
248
+ ↓
249
+ IF VERIFIED: COMMIT + FAST-FORWARD PUSH WORKING BRANCH
250
+ ↓
251
+ STOP
190
252
  ```
191
253
 
192
- Python owns deterministic state transitions, safety gates, filesystem operations, verification validity, retry bounds, and final status. The model reasons inside bounded roles.
254
+ Python owns deterministic state transitions, safety gates, filesystem operations, verification validity, retry bounds, final status, report generation, and verified-branch publication. The model reasons inside bounded roles and never receives a general-purpose Git publishing tool.
193
255
 
194
256
  ## Evidence gate
195
257
 
@@ -223,6 +285,24 @@ Depending on the repository, DevAgent can run:
223
285
 
224
286
  Each verification result records the command, exit code, duration, output, failure classification, phase, and workspace revision.
225
287
 
288
+ The final engineering report includes:
289
+
290
+ - an **implementation logic summary first**,
291
+ - requirement, task type, and risk,
292
+ - root cause / design gap,
293
+ - implementation decisions,
294
+ - exact changed Python functions/classes/methods when deterministically extractable,
295
+ - exact changed Python test case names when deterministically extractable,
296
+ - acceptance criteria and concrete evidence,
297
+ - verification matrix with phase/revision/test counts,
298
+ - failed-check stdout/stderr and failure classification,
299
+ - independent-review result,
300
+ - completeness assessment,
301
+ - known gaps / not-run checks,
302
+ - recommendations,
303
+ - source-control plan/status,
304
+ - developer review checklist.
305
+
226
306
  A code modification invalidates prior successful verification for the old revision.
227
307
 
228
308
  ## Outcome contract
@@ -231,31 +311,40 @@ A code modification invalidates prior successful verification for the old revisi
231
311
 
232
312
  Used only when the current implementation has sufficient acceptance evidence, applicable verification passes, no known new regression remains, scope is acceptable, and independent review approves the final diff.
233
313
 
314
+ After the `VERIFIED` engineering report is emitted, DevAgent automatically attempts bounded commit/push to a new branch unless `--no-publish` was supplied.
315
+
234
316
  ### `PARTIALLY_VERIFIED`
235
317
 
236
318
  Used when implementation evidence exists but meaningful verification cannot be completed, commonly because of environmental, hardware, VPN, credential, or external-service limitations.
237
319
 
320
+ `PARTIALLY_VERIFIED` is never committed/pushed by the automatic publisher.
321
+
238
322
  ### `BLOCKED`
239
323
 
240
324
  Used when DevAgent cannot safely understand, implement, or verify the task.
241
325
 
326
+ `BLOCKED` is never committed/pushed by the automatic publisher.
327
+
242
328
  DevAgent is intentionally conservative: a truthful `BLOCKED` is better than a false `VERIFIED`.
243
329
 
244
330
  ## Safety boundary
245
331
 
246
- DevAgent uses defense-in-depth controls around repository modification and command execution.
332
+ DevAgent uses defense-in-depth controls around repository modification, command execution, and branch publishing.
247
333
 
248
334
  - Clean Git repositories use a retained detached worktree by default.
249
335
  - Pre-existing dirty developer files are protected.
250
336
  - Existing files are backed up before their first modification.
251
337
  - Workspace paths are confined and checked against symlink escape.
252
338
  - Secret-like paths such as `.env*`, private keys, SSH/AWS credentials, and generated dependency trees are excluded from automatic reads.
253
- - Commands run as argv without a shell.
339
+ - Engineering commands run as argv without a shell.
254
340
  - Credential environment variables are scrubbed from verification subprocesses where appropriate.
255
- - Publishing and destructive operations are blocked.
256
- - DevAgent never automatically commits, pushes, merges, rebases, or deploys.
341
+ - The model-facing command policy continues to block Git write operations.
342
+ - Automatic publication is a separate deterministic post-report step and requires a `VERIFIED` result.
343
+ - Publication requires the isolated worktree, refuses protected/existing target branches, and stages only reviewed changed paths.
344
+ - `--no-publish` disables the publication step.
345
+ - DevAgent never creates PRs, merges, rebases, force-pushes, or deploys.
257
346
 
258
- DevAgent is **not** an operating-system sandbox. Always review the final report and diff before publishing changes.
347
+ DevAgent is **not** an operating-system sandbox. Always review the engineering report and pushed branch before integrating changes.
259
348
 
260
349
  ## Repository intelligence
261
350
 
@@ -290,45 +379,87 @@ Currently supported:
290
379
 
291
380
  The goal is to let developers choose the model that fits their accuracy, privacy, latency, and cost requirements without changing the core engineering workflow.
292
381
 
293
- ## Example final report
382
+ ## Example engineering report and publication receipt
294
383
 
295
384
  ```text
296
- DEVAGENT REPORT
385
+ DEVAGENT ENGINEERING REVIEW REPORT
297
386
 
298
387
  STATUS
299
388
  VERIFIED
300
389
 
301
- TASK
302
- Handle division by zero safely and add a regression test.
303
-
304
- ROOT CAUSE
305
- The divide path did not explicitly handle a zero divisor.
306
-
307
- IMPLEMENTATION
308
- - Added bounded zero-divisor handling
309
- - Added regression coverage
310
-
311
- FILES CHANGED
312
- calculator.py
313
- test_calculator.py
390
+ IMPLEMENTATION LOGIC SUMMARY
391
+ Requirement: Add multiplication support while preserving divide behavior.
392
+ Problem / design gap: The calculator has no multiplication API.
393
+ Chosen implementation logic:
394
+ - Add multiply(a, b) as a separate function.
395
+ - Preserve divide(a, b) behavior.
396
+ - Add positive, negative, and zero multiplication tests.
397
+ Code-level effect:
398
+ - ADDED function multiply at calculator.py:6
399
+ Test / verification logic:
400
+ - ADDED test test_multiply_positive at test_calculator.py:10
401
+ - ADDED test test_multiply_negative at test_calculator.py:14
402
+ - ADDED test test_multiply_zero at test_calculator.py:18
403
+ - Final/current revision checks: python -m pytest -q; git diff --check
404
+ Preserved behavior / scope constraints:
405
+ - Existing divide behavior remains covered.
406
+ Why this result is considered sufficient / insufficient:
407
+ - Required acceptance evidence: 4/4
408
+ - Final/current verification: 2 passed, 0 failed
409
+ - Independent review: approved
410
+ - Outcome decision: VERIFIED
411
+
412
+ FUNCTIONS / CLASSES / SYMBOLS CHANGED
413
+ - ADDED | function | calculator.py:6 | multiply
414
+
415
+ TEST CASES / UNIT TESTS
416
+ - UNCHANGED | function | test_calculator.py:4 | test_divide
417
+ - ADDED | function | test_calculator.py:10 | test_multiply_positive
418
+ - ADDED | function | test_calculator.py:14 | test_multiply_negative
419
+ - ADDED | function | test_calculator.py:18 | test_multiply_zero
420
+
421
+ ACCEPTANCE CRITERIA + EVIDENCE
422
+ ✓ AC-1 [REQUIRED] multiply(a, b) returns the product
423
+ ✓ AC-2 [REQUIRED] negative multiplication works
424
+ ✓ AC-3 [REQUIRED] multiplication by zero works
425
+ ✓ AC-4 [REQUIRED] existing divide behavior remains covered
426
+
427
+ VERIFICATION MATRIX
428
+ ✓ python -m pytest -q | phase=final | revision=1 | exit=0 | tests=5/5
429
+ ✓ git diff --check | phase=final | revision=1 | exit=0
314
430
 
315
- VERIFICATION
316
- PASS targeted tests
317
- PASS broader tests
318
- PASS git diff --check
431
+ INDEPENDENT REVIEW
432
+ APPROVED
319
433
 
320
- NEW REGRESSIONS
321
- None detected
434
+ COMPLETENESS ASSESSMENT
435
+ Outcome: VERIFIED
436
+ Required acceptance criteria evidenced: 4/4
437
+ Independent review: APPROVED
438
+ COMPLETE FOR DEVELOPER REVIEW
322
439
 
323
440
  SOURCE CONTROL
324
- No commit
325
- No push
326
- No merge
327
-
328
- DEVELOPER ACTION
329
- Review the diff before publishing.
441
+ Remote: origin
442
+ Branch: devagent/<run-id>
443
+ Commit: NOT CREATED
444
+ Committed: NO
445
+ Pushed: NO
446
+ Pull request: NOT CREATED
447
+ Merge: NOT PERFORMED
448
+
449
+ Engineering report complete. Starting deterministic branch publication...
450
+ SOURCE CONTROL PUBLICATION RECEIPT
451
+ Status: PUSHED
452
+ Remote: origin
453
+ Branch: devagent/<run-id>
454
+ Commit: <sha>
455
+ Committed: YES
456
+ Pushed: YES
457
+ Pull request: NOT CREATED
458
+ Merge: NOT PERFORMED
330
459
  ```
331
460
 
461
+ The report appears before the commit/push. The receipt proves exactly what happened afterward.
462
+
332
463
  ## Local run data
333
464
 
334
465
  DevAgent keeps run artifacts under the target repository's `.devagent/` state:
@@ -347,6 +478,8 @@ DevAgent keeps run artifacts under the target repository's `.devagent/` state:
347
478
  └── strategies.json
348
479
  ```
349
480
 
481
+ After publication completes, the machine-readable `report.json` records the requested remote/branch, exact commit SHA, commit status, push status, and any publication error.
482
+
350
483
  Repository facts are tied to evidence fingerprints and can be invalidated when their source changes.
351
484
 
352
485
  ## Development
@@ -365,7 +498,7 @@ Install the current checkout in editable mode:
365
498
  pip install -e ".[dev]"
366
499
  ```
367
500
 
368
- Automated tests use a deterministic fake provider and do not consume cloud-model credits.
501
+ Automated tests use a deterministic fake provider and do not consume cloud-model credits. Source-control publication tests use a local bare Git repository rather than a network remote.
369
502
 
370
503
  ## Project status
371
504
 
@@ -386,7 +519,7 @@ The project intentionally prioritizes trustworthy outcomes over feature count.
386
519
 
387
520
  Contributions are welcome.
388
521
 
389
- Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. In particular, changes to DevAgent's safety or verification behavior should include regression tests and must not weaken the no-publish boundary.
522
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. In particular, changes to DevAgent's safety, verification, reporting, or bounded publication behavior should include regression tests and must not give model-generated actions unrestricted Git publishing authority.
390
523
 
391
524
  For bugs and feature requests, use the [GitHub issue tracker](https://github.com/tomha85/devagent/issues).
392
525
 
@@ -5,13 +5,13 @@
5
5
  [![Status: Alpha](https://img.shields.io/badge/status-alpha-orange.svg)](#project-status)
6
6
  [![Production CI](https://github.com/tomha85/devagent/actions/workflows/ci.yml/badge.svg)](https://github.com/tomha85/devagent/actions/workflows/ci.yml)
7
7
 
8
- **A local, evidence-driven software engineering agent that turns a requirement into a tested, reviewed patch — while leaving commit, push, merge, and deploy decisions to the developer.**
8
+ **A local, evidence-driven software engineering agent that turns a requirement into a tested, independently reviewed patch, prints a developer-grade engineering report, then automatically commits and fast-forward pushes a `VERIFIED` result to the developer's current local branch — creating a new safe branch only when starting from `main`, `master`, or `trunk` — without creating a PR or merging code.**
9
9
 
10
- DevAgent runs against a local repository. It discovers the application, gathers source evidence, compiles acceptance criteria, plans a bounded change, creates backups, implements the minimum necessary patch, runs repository-supported verification, reviews the final diff, and returns one final engineering report.
10
+ DevAgent runs against a local repository. It discovers the application, gathers source evidence, compiles acceptance criteria, plans a bounded change, creates backups, implements the minimum necessary patch, runs repository-supported verification, reviews the final diff, prints a detailed engineering review report, and only then performs bounded source-control publication when the result is `VERIFIED`.
11
11
 
12
- > **From requirement to verified local branch.**
12
+ > **From requirement to evidence-backed verified branch.**
13
13
  >
14
- > DevAgent can modify software. It does not publish software.
14
+ > Normal flow: **implement → verify → report → commit → push branch → stop**. DevAgent never creates a pull request or merges code. Use `--no-publish` for a local review-only run.
15
15
 
16
16
  ## Why DevAgent?
17
17
 
@@ -27,8 +27,11 @@ Core principles:
27
27
  - **Backups before edits** — existing files are backed up before first modification.
28
28
  - **Repository-native verification** — use commands supported by manifests, package scripts, tests, and CI evidence.
29
29
  - **Independent review** — the final diff is reviewed separately from implementation.
30
+ - **Developer-grade reporting** — the report begins with implementation logic, then lists exact changed symbols, tests, acceptance evidence, failures, gaps, and completeness.
30
31
  - **Provider choice** — OpenAI, Anthropic/Claude, xAI/Grok, and OpenAI-compatible local endpoints.
31
- - **No automatic publishing** — DevAgent does not commit, push, merge, rebase, or deploy.
32
+ - **Bounded automatic publishing** — after the report, only a `VERIFIED` result may be committed and fast-forward pushed from the isolated worktree; normal development branches continue in place, while protected branches cause DevAgent to create a new safe branch.
33
+ - **Review-only escape hatch** — `--no-publish` disables commit/push when the developer wants to inspect locally first.
34
+ - **No PR or merge automation** — DevAgent never creates PRs, merges, rebases, force-pushes, or deploys.
32
35
  - **Evidence-backed outcomes** — final status is `VERIFIED`, `PARTIALLY_VERIFIED`, or `BLOCKED`.
33
36
 
34
37
  ## Quick start
@@ -97,6 +100,61 @@ From the application repository you want DevAgent to work on:
97
100
  devagent "Fix websocket reconnect bug and add regression tests"
98
101
  ```
99
102
 
103
+ For a normal `VERIFIED` run, DevAgent will:
104
+
105
+ ```text
106
+ implement and verify
107
+ ↓
108
+ print the full engineering review report
109
+ ↓
110
+ continue the current local development branch
111
+ (or create a new DevAgent branch from main/master/trunk)
112
+ ↓
113
+ commit only reviewed changed paths
114
+ ↓
115
+ fast-forward push that branch to origin
116
+ ↓
117
+ print a source-control publication receipt
118
+ ↓
119
+ STOP — no PR, no merge
120
+ ```
121
+
122
+ By default, DevAgent treats the developer's current local Git branch as the working branch. Repeated prompts continue that same non-protected branch. If the developer is on `main`, `master`, or `trunk`, DevAgent creates a unique safe branch such as:
123
+
124
+ ```text
125
+ devagent/20260825T020000Z-ab12cd
126
+ ```
127
+
128
+ To explicitly start a new branch instead of continuing the current development branch:
129
+
130
+ ```bash
131
+ devagent \
132
+ --publish-branch feature/devagent-csv-export \
133
+ "Add CSV export to reports"
134
+ ```
135
+
136
+ To run DevAgent without any commit/push:
137
+
138
+ ```bash
139
+ devagent --no-publish \
140
+ "Add CSV export to reports"
141
+ ```
142
+
143
+ `--publish` remains accepted as an explicit expression of the default publishing behavior, but is not required.
144
+
145
+ Automatic publication is intentionally narrow:
146
+
147
+ - the engineering report is emitted before any commit or push,
148
+ - the run must finish `VERIFIED`,
149
+ - the default isolated worktree must be active,
150
+ - `main`, `master`, and `trunk` are never publication targets; DevAgent creates a new safe branch when started there,
151
+ - an existing branch may be continued only when it is the developer's current local non-protected branch and its remote history is compatible,
152
+ - remote branch state is captured before model execution and checked again before publication,
153
+ - only reviewed changed paths are staged,
154
+ - one commit is created and pushed with normal fast-forward Git semantics; no force push is used,
155
+ - no pull request is created,
156
+ - no merge, rebase, force push, or deployment is performed.
157
+
100
158
  Other inputs:
101
159
 
102
160
  ```bash
@@ -116,7 +174,7 @@ devagent doctor
116
174
  devagent status
117
175
  ```
118
176
 
119
- Normal mode stays quiet apart from state updates and the final engineering report. `--verbose` exposes operational diagnostics, not hidden chain-of-thought.
177
+ Normal mode stays quiet apart from state updates, the engineering report, and the post-report publication receipt. `--verbose` exposes operational diagnostics, not hidden chain-of-thought.
120
178
 
121
179
  ## What DevAgent does
122
180
 
@@ -156,9 +214,13 @@ FINAL_VERIFY
156
214
  LEARN
157
215
  ↓
158
216
  REPORT
217
+ ↓
218
+ IF VERIFIED: COMMIT + FAST-FORWARD PUSH WORKING BRANCH
219
+ ↓
220
+ STOP
159
221
  ```
160
222
 
161
- Python owns deterministic state transitions, safety gates, filesystem operations, verification validity, retry bounds, and final status. The model reasons inside bounded roles.
223
+ Python owns deterministic state transitions, safety gates, filesystem operations, verification validity, retry bounds, final status, report generation, and verified-branch publication. The model reasons inside bounded roles and never receives a general-purpose Git publishing tool.
162
224
 
163
225
  ## Evidence gate
164
226
 
@@ -192,6 +254,24 @@ Depending on the repository, DevAgent can run:
192
254
 
193
255
  Each verification result records the command, exit code, duration, output, failure classification, phase, and workspace revision.
194
256
 
257
+ The final engineering report includes:
258
+
259
+ - an **implementation logic summary first**,
260
+ - requirement, task type, and risk,
261
+ - root cause / design gap,
262
+ - implementation decisions,
263
+ - exact changed Python functions/classes/methods when deterministically extractable,
264
+ - exact changed Python test case names when deterministically extractable,
265
+ - acceptance criteria and concrete evidence,
266
+ - verification matrix with phase/revision/test counts,
267
+ - failed-check stdout/stderr and failure classification,
268
+ - independent-review result,
269
+ - completeness assessment,
270
+ - known gaps / not-run checks,
271
+ - recommendations,
272
+ - source-control plan/status,
273
+ - developer review checklist.
274
+
195
275
  A code modification invalidates prior successful verification for the old revision.
196
276
 
197
277
  ## Outcome contract
@@ -200,31 +280,40 @@ A code modification invalidates prior successful verification for the old revisi
200
280
 
201
281
  Used only when the current implementation has sufficient acceptance evidence, applicable verification passes, no known new regression remains, scope is acceptable, and independent review approves the final diff.
202
282
 
283
+ After the `VERIFIED` engineering report is emitted, DevAgent automatically attempts bounded commit/push to a new branch unless `--no-publish` was supplied.
284
+
203
285
  ### `PARTIALLY_VERIFIED`
204
286
 
205
287
  Used when implementation evidence exists but meaningful verification cannot be completed, commonly because of environmental, hardware, VPN, credential, or external-service limitations.
206
288
 
289
+ `PARTIALLY_VERIFIED` is never committed/pushed by the automatic publisher.
290
+
207
291
  ### `BLOCKED`
208
292
 
209
293
  Used when DevAgent cannot safely understand, implement, or verify the task.
210
294
 
295
+ `BLOCKED` is never committed/pushed by the automatic publisher.
296
+
211
297
  DevAgent is intentionally conservative: a truthful `BLOCKED` is better than a false `VERIFIED`.
212
298
 
213
299
  ## Safety boundary
214
300
 
215
- DevAgent uses defense-in-depth controls around repository modification and command execution.
301
+ DevAgent uses defense-in-depth controls around repository modification, command execution, and branch publishing.
216
302
 
217
303
  - Clean Git repositories use a retained detached worktree by default.
218
304
  - Pre-existing dirty developer files are protected.
219
305
  - Existing files are backed up before their first modification.
220
306
  - Workspace paths are confined and checked against symlink escape.
221
307
  - Secret-like paths such as `.env*`, private keys, SSH/AWS credentials, and generated dependency trees are excluded from automatic reads.
222
- - Commands run as argv without a shell.
308
+ - Engineering commands run as argv without a shell.
223
309
  - Credential environment variables are scrubbed from verification subprocesses where appropriate.
224
- - Publishing and destructive operations are blocked.
225
- - DevAgent never automatically commits, pushes, merges, rebases, or deploys.
310
+ - The model-facing command policy continues to block Git write operations.
311
+ - Automatic publication is a separate deterministic post-report step and requires a `VERIFIED` result.
312
+ - Publication requires the isolated worktree, refuses protected/existing target branches, and stages only reviewed changed paths.
313
+ - `--no-publish` disables the publication step.
314
+ - DevAgent never creates PRs, merges, rebases, force-pushes, or deploys.
226
315
 
227
- DevAgent is **not** an operating-system sandbox. Always review the final report and diff before publishing changes.
316
+ DevAgent is **not** an operating-system sandbox. Always review the engineering report and pushed branch before integrating changes.
228
317
 
229
318
  ## Repository intelligence
230
319
 
@@ -259,45 +348,87 @@ Currently supported:
259
348
 
260
349
  The goal is to let developers choose the model that fits their accuracy, privacy, latency, and cost requirements without changing the core engineering workflow.
261
350
 
262
- ## Example final report
351
+ ## Example engineering report and publication receipt
263
352
 
264
353
  ```text
265
- DEVAGENT REPORT
354
+ DEVAGENT ENGINEERING REVIEW REPORT
266
355
 
267
356
  STATUS
268
357
  VERIFIED
269
358
 
270
- TASK
271
- Handle division by zero safely and add a regression test.
272
-
273
- ROOT CAUSE
274
- The divide path did not explicitly handle a zero divisor.
275
-
276
- IMPLEMENTATION
277
- - Added bounded zero-divisor handling
278
- - Added regression coverage
279
-
280
- FILES CHANGED
281
- calculator.py
282
- test_calculator.py
359
+ IMPLEMENTATION LOGIC SUMMARY
360
+ Requirement: Add multiplication support while preserving divide behavior.
361
+ Problem / design gap: The calculator has no multiplication API.
362
+ Chosen implementation logic:
363
+ - Add multiply(a, b) as a separate function.
364
+ - Preserve divide(a, b) behavior.
365
+ - Add positive, negative, and zero multiplication tests.
366
+ Code-level effect:
367
+ - ADDED function multiply at calculator.py:6
368
+ Test / verification logic:
369
+ - ADDED test test_multiply_positive at test_calculator.py:10
370
+ - ADDED test test_multiply_negative at test_calculator.py:14
371
+ - ADDED test test_multiply_zero at test_calculator.py:18
372
+ - Final/current revision checks: python -m pytest -q; git diff --check
373
+ Preserved behavior / scope constraints:
374
+ - Existing divide behavior remains covered.
375
+ Why this result is considered sufficient / insufficient:
376
+ - Required acceptance evidence: 4/4
377
+ - Final/current verification: 2 passed, 0 failed
378
+ - Independent review: approved
379
+ - Outcome decision: VERIFIED
380
+
381
+ FUNCTIONS / CLASSES / SYMBOLS CHANGED
382
+ - ADDED | function | calculator.py:6 | multiply
383
+
384
+ TEST CASES / UNIT TESTS
385
+ - UNCHANGED | function | test_calculator.py:4 | test_divide
386
+ - ADDED | function | test_calculator.py:10 | test_multiply_positive
387
+ - ADDED | function | test_calculator.py:14 | test_multiply_negative
388
+ - ADDED | function | test_calculator.py:18 | test_multiply_zero
389
+
390
+ ACCEPTANCE CRITERIA + EVIDENCE
391
+ ✓ AC-1 [REQUIRED] multiply(a, b) returns the product
392
+ ✓ AC-2 [REQUIRED] negative multiplication works
393
+ ✓ AC-3 [REQUIRED] multiplication by zero works
394
+ ✓ AC-4 [REQUIRED] existing divide behavior remains covered
395
+
396
+ VERIFICATION MATRIX
397
+ ✓ python -m pytest -q | phase=final | revision=1 | exit=0 | tests=5/5
398
+ ✓ git diff --check | phase=final | revision=1 | exit=0
283
399
 
284
- VERIFICATION
285
- PASS targeted tests
286
- PASS broader tests
287
- PASS git diff --check
400
+ INDEPENDENT REVIEW
401
+ APPROVED
288
402
 
289
- NEW REGRESSIONS
290
- None detected
403
+ COMPLETENESS ASSESSMENT
404
+ Outcome: VERIFIED
405
+ Required acceptance criteria evidenced: 4/4
406
+ Independent review: APPROVED
407
+ COMPLETE FOR DEVELOPER REVIEW
291
408
 
292
409
  SOURCE CONTROL
293
- No commit
294
- No push
295
- No merge
296
-
297
- DEVELOPER ACTION
298
- Review the diff before publishing.
410
+ Remote: origin
411
+ Branch: devagent/<run-id>
412
+ Commit: NOT CREATED
413
+ Committed: NO
414
+ Pushed: NO
415
+ Pull request: NOT CREATED
416
+ Merge: NOT PERFORMED
417
+
418
+ Engineering report complete. Starting deterministic branch publication...
419
+ SOURCE CONTROL PUBLICATION RECEIPT
420
+ Status: PUSHED
421
+ Remote: origin
422
+ Branch: devagent/<run-id>
423
+ Commit: <sha>
424
+ Committed: YES
425
+ Pushed: YES
426
+ Pull request: NOT CREATED
427
+ Merge: NOT PERFORMED
299
428
  ```
300
429
 
430
+ The report appears before the commit/push. The receipt proves exactly what happened afterward.
431
+
301
432
  ## Local run data
302
433
 
303
434
  DevAgent keeps run artifacts under the target repository's `.devagent/` state:
@@ -316,6 +447,8 @@ DevAgent keeps run artifacts under the target repository's `.devagent/` state:
316
447
  └── strategies.json
317
448
  ```
318
449
 
450
+ After publication completes, the machine-readable `report.json` records the requested remote/branch, exact commit SHA, commit status, push status, and any publication error.
451
+
319
452
  Repository facts are tied to evidence fingerprints and can be invalidated when their source changes.
320
453
 
321
454
  ## Development
@@ -334,7 +467,7 @@ Install the current checkout in editable mode:
334
467
  pip install -e ".[dev]"
335
468
  ```
336
469
 
337
- Automated tests use a deterministic fake provider and do not consume cloud-model credits.
470
+ Automated tests use a deterministic fake provider and do not consume cloud-model credits. Source-control publication tests use a local bare Git repository rather than a network remote.
338
471
 
339
472
  ## Project status
340
473
 
@@ -355,7 +488,7 @@ The project intentionally prioritizes trustworthy outcomes over feature count.
355
488
 
356
489
  Contributions are welcome.
357
490
 
358
- Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. In particular, changes to DevAgent's safety or verification behavior should include regression tests and must not weaken the no-publish boundary.
491
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. In particular, changes to DevAgent's safety, verification, reporting, or bounded publication behavior should include regression tests and must not give model-generated actions unrestricted Git publishing authority.
359
492
 
360
493
  For bugs and feature requests, use the [GitHub issue tracker](https://github.com/tomha85/devagent/issues).
361
494
 
@@ -1,3 +1,3 @@
1
1
  """DevAgent: evidence-driven local software engineering automation."""
2
2
 
3
- __version__ = "0.3.1"
3
+ __version__ = "0.3.2"