agentic-dev-loop 0.10.3__tar.gz → 0.10.5__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 (129) hide show
  1. {agentic_dev_loop-0.10.3/src/agentic_dev_loop.egg-info → agentic_dev_loop-0.10.5}/PKG-INFO +5 -3
  2. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/README.md +4 -2
  3. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/pyproject.toml +1 -1
  4. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/core/profiles/__init__.py +4 -6
  5. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/cli.py +3 -0
  6. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/extensions/aidlc.py +10 -4
  7. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/checks.py +4 -3
  8. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/templates/trigger-agentic-dev-loop.sh +6 -14
  9. agentic_dev_loop-0.10.5/src/agentic_dev_loop/engine/onboarding/upgrade.py +76 -0
  10. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5/src/agentic_dev_loop.egg-info}/PKG-INFO +5 -3
  11. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop.egg-info/SOURCES.txt +2 -0
  12. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_055_cli.py +8 -1
  13. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_055_doctor.py +1 -1
  14. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_055_profiles.py +1 -1
  15. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_055_templates.py +2 -2
  16. agentic_dev_loop-0.10.5/tests/test_055_upgrade.py +125 -0
  17. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_aidlc.py +15 -0
  18. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_publish.py +170 -61
  19. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_trigger_script.py +32 -41
  20. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/LICENSE +0 -0
  21. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/setup.cfg +0 -0
  22. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/__init__.py +0 -0
  23. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/core/__init__.py +0 -0
  24. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/core/config.py +0 -0
  25. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/core/paths.py +0 -0
  26. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/core/profiles/data/dotnet-node.yaml +0 -0
  27. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/core/profiles/data/python.yaml +0 -0
  28. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/core/results.py +0 -0
  29. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/core/verdict.py +0 -0
  30. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/__init__.py +0 -0
  31. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/actions.py +0 -0
  32. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/agent_error_guide.md +0 -0
  33. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/agent_error_guide.py +0 -0
  34. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/agents.py +0 -0
  35. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/allowlist.py +0 -0
  36. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/brief_coverage.py +0 -0
  37. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/brief_prompt.md +0 -0
  38. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/brief_prompt.py +0 -0
  39. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/containers.py +0 -0
  40. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/deps.py +0 -0
  41. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/dryrun.py +0 -0
  42. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/egress_policy.py +0 -0
  43. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/egress_proxy.py +0 -0
  44. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/extensions/__init__.py +0 -0
  45. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/forbidden.py +0 -0
  46. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/graph.py +0 -0
  47. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/hostboundary.py +0 -0
  48. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/isolation.py +0 -0
  49. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/llm.py +0 -0
  50. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/loaders.py +0 -0
  51. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/mounts.py +0 -0
  52. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/__init__.py +0 -0
  53. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/doctor.py +0 -0
  54. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/init.py +0 -0
  55. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/recipes/dotnet-node.yaml +0 -0
  56. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/recipes/python.yaml +0 -0
  57. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/recipes.py +0 -0
  58. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/templates/dev.agent.md +0 -0
  59. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/templates/env.example +0 -0
  60. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/templates/qa.agent.md +0 -0
  61. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/templates/review.agent.md +0 -0
  62. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/onboarding/templates.py +0 -0
  63. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/outputs.py +0 -0
  64. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/presets.py +0 -0
  65. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/proc.py +0 -0
  66. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/registry.py +0 -0
  67. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/seccomp/__init__.py +0 -0
  68. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/seccomp/chromium-userns.json +0 -0
  69. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/secrets.py +0 -0
  70. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/stages.py +0 -0
  71. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/step_workspace.py +0 -0
  72. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/engine/sync_back.py +0 -0
  73. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/py.typed +0 -0
  74. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/viz/__init__.py +0 -0
  75. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/viz/__main__.py +0 -0
  76. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop/viz/server.py +0 -0
  77. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop.egg-info/dependency_links.txt +0 -0
  78. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop.egg-info/entry_points.txt +0 -0
  79. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop.egg-info/requires.txt +0 -0
  80. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/src/agentic_dev_loop.egg-info/top_level.txt +0 -0
  81. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_029_merge_on_conflict.py +0 -0
  82. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_033_brief_step.py +0 -0
  83. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_035_finalize_nudge.py +0 -0
  84. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_036_banned_commands_and_lane_boundary.py +0 -0
  85. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_041_brief_coverage.py +0 -0
  86. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_046_brief_prompt.py +0 -0
  87. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_055_init.py +0 -0
  88. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_055_profile_loading.py +0 -0
  89. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_055_recipes.py +0 -0
  90. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_055_schema_lock.py +0 -0
  91. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_actions.py +0 -0
  92. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_agent_error_guide.py +0 -0
  93. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_agents.py +0 -0
  94. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_cli.py +0 -0
  95. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_config.py +0 -0
  96. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_containers.py +0 -0
  97. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_deps.py +0 -0
  98. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_dry_run.py +0 -0
  99. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_e2e_fixtures.py +0 -0
  100. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_egress_proxy.py +0 -0
  101. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_graph.py +0 -0
  102. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_hostboundary.py +0 -0
  103. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_hostboundary_integration.py +0 -0
  104. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_isolation.py +0 -0
  105. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_isolation_integration.py +0 -0
  106. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_isolation_pbt.py +0 -0
  107. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_llm.py +0 -0
  108. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_loaders.py +0 -0
  109. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_module_contract.py +0 -0
  110. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_outputs.py +0 -0
  111. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_outputs_pbt.py +0 -0
  112. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_proc.py +0 -0
  113. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_qa_prompt.py +0 -0
  114. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_registry.py +0 -0
  115. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_repo_ascii.py +0 -0
  116. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_results.py +0 -0
  117. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_sdk_compat.py +0 -0
  118. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_secrets.py +0 -0
  119. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_secrets_integration.py +0 -0
  120. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_secrets_pipeline.py +0 -0
  121. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_source_resolution.py +0 -0
  122. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_stages.py +0 -0
  123. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_step_workspace.py +0 -0
  124. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_sync_back.py +0 -0
  125. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_unit5_config.py +0 -0
  126. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_unit5_pbt.py +0 -0
  127. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_unit5_pure.py +0 -0
  128. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_verdict.py +0 -0
  129. {agentic_dev_loop-0.10.3 → agentic_dev_loop-0.10.5}/tests/test_viz.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentic-dev-loop
3
- Version: 0.10.3
3
+ Version: 0.10.5
4
4
  Summary: Turn an LLM into a gated, sandboxed, resumable construction loop over your codebase.
5
5
  Author: Luke Wilson
6
6
  License-Expression: Apache-2.0
@@ -492,8 +492,10 @@ before.
492
492
  `agentic-dev-loop doctor --fast` is the per-run gate the trigger runs first.
493
493
  Hard failures abort the run (engine pin mismatch, engine runtime availability,
494
494
  API version, git repo, `.env*` files); warnings print and continue. `doctor
495
- --json` emits the same results mechanically. The trigger repairs a pin/install
496
- mismatch exactly once, then fails hard.
495
+ --json` emits the same results mechanically. On a hard failure the trigger
496
+ runs `agentic-dev-loop upgrade` exactly once: it installs the latest release
497
+ with pipx and rewrites `.engine-version` to match, then the run fails hard if
498
+ doctor still fails.
497
499
 
498
500
  A consumer repo needs a pipeline file and the agent files it names, both
499
501
  committed before the first run (the host-boundary check refuses dirty tooling,
@@ -448,8 +448,10 @@ before.
448
448
  `agentic-dev-loop doctor --fast` is the per-run gate the trigger runs first.
449
449
  Hard failures abort the run (engine pin mismatch, engine runtime availability,
450
450
  API version, git repo, `.env*` files); warnings print and continue. `doctor
451
- --json` emits the same results mechanically. The trigger repairs a pin/install
452
- mismatch exactly once, then fails hard.
451
+ --json` emits the same results mechanically. On a hard failure the trigger
452
+ runs `agentic-dev-loop upgrade` exactly once: it installs the latest release
453
+ with pipx and rewrites `.engine-version` to match, then the run fails hard if
454
+ doctor still fails.
453
455
 
454
456
  A consumer repo needs a pipeline file and the agent files it names, both
455
457
  committed before the first run (the host-boundary check refuses dirty tooling,
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentic-dev-loop"
7
- version = "0.10.3"
7
+ version = "0.10.5"
8
8
  description = "Turn an LLM into a gated, sandboxed, resumable construction loop over your codebase."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -81,18 +81,16 @@ def parse_version(text: str) -> tuple[int, int, int, int, int]:
81
81
  return (int(major), int(minor), int(patch), _RANK[pre], int(num))
82
82
 
83
83
 
84
- def check_engine_min(engine_min: str, installed: str,
85
- latest: str | None = None) -> None:
84
+ def check_engine_min(engine_min: str, installed: str) -> None:
86
85
  """Raise unless ``installed`` satisfies ``engine_min``.
87
86
 
88
- ``latest`` is substituted into the fix line by the caller (doctor); when
89
- omitted the floor itself is used.
87
+ The fix line names the upgrade command: it installs the latest release,
88
+ which always satisfies the floor.
90
89
  """
91
90
  if parse_version(installed) < parse_version(engine_min):
92
- target = latest or engine_min
93
91
  raise ProfileError(
94
92
  f"profile requires engine >= {engine_min}; installed {installed}. "
95
- f'Upgrade: pipx install --force "agentic-dev-loop=={target}"')
93
+ "Upgrade: run agentic-dev-loop upgrade")
96
94
 
97
95
 
98
96
  def _data_dir():
@@ -171,6 +171,9 @@ def main(argv: list[str] | None = None) -> int:
171
171
  if argv and argv[0] == "doctor":
172
172
  from .onboarding.doctor import run_doctor
173
173
  return run_doctor(argv[1:])
174
+ if argv and argv[0] == "upgrade":
175
+ from .onboarding.upgrade import run_upgrade
176
+ return run_upgrade(argv[1:])
174
177
  probe = argparse.ArgumentParser(add_help=False)
175
178
  probe.add_argument("pipeline", type=Path, nargs="?")
176
179
  _add_version_flag(probe)
@@ -74,12 +74,18 @@ def resolve_unit_docs_with_sources(
74
74
  sources[f"inception/{file.name}"] = file
75
75
 
76
76
  # The unit's code-generation plans are the build spec - absent is fine,
77
- # present is how the spec reaches agents.
77
+ # present is how the spec reaches agents. Two shapes are in the wild:
78
+ # bare (`unit-3-code-generation-plan.md`) and infixed
79
+ # (`unit-3-scan-core-types-code-generation-plan.md`); the bare shape must
80
+ # not be lost, and neither pattern may leak into a slug that merely
81
+ # extends this one (unit-3 must not match a unit-30 plan).
78
82
  plans_dir = docs_dir / "construction" / "plans"
79
83
  if plans_dir.is_dir():
80
- for file in sorted(plans_dir.glob(f"{unit_slug}-*-code-generation-plan.md")):
81
- docs[f"plans/{file.name}"] = file.read_text(encoding="utf-8")
82
- sources[f"plans/{file.name}"] = file
84
+ for pattern in (f"{unit_slug}-code-generation-plan.md",
85
+ f"{unit_slug}-*-code-generation-plan.md"):
86
+ for file in sorted(plans_dir.glob(pattern)):
87
+ docs[f"plans/{file.name}"] = file.read_text(encoding="utf-8")
88
+ sources[f"plans/{file.name}"] = file
83
89
 
84
90
  return docs, sources
85
91
 
@@ -25,6 +25,7 @@ __all__ = ["Check", "HostProbes", "collect_checks"]
25
25
  ENV_WHITELIST = frozenset({".env.example", ".env.template", ".env.sample"})
26
26
  MIN_API = (1, 43)
27
27
  PYPI_URL = "https://pypi.org/pypi/agentic-dev-loop/json"
28
+ FIX_UPGRADE = "run agentic-dev-loop upgrade"
28
29
 
29
30
 
30
31
  @dataclass(frozen=True)
@@ -171,12 +172,12 @@ def collect_checks(profile: Profile | None, pipeline, installed: str,
171
172
  if pin is None:
172
173
  checks.append(_hard(
173
174
  "pin", False, f"no engine pin file at {pin_path}",
174
- "run agentic-dev-loop init (or write agentic-dev-loop/.engine-version)"))
175
+ FIX_UPGRADE))
175
176
  else:
176
177
  checks.append(_hard(
177
178
  "pin", pin == installed,
178
179
  f"installed {installed}, pin {pin}",
179
- f'pipx install --force "agentic-dev-loop=={pin}"'))
180
+ FIX_UPGRADE))
180
181
  latest = probes.latest_release()
181
182
  if latest is None:
182
183
  checks.append(_hard("pin-latest", True,
@@ -189,7 +190,7 @@ def collect_checks(profile: Profile | None, pipeline, installed: str,
189
190
  checks.append(_hard(
190
191
  "pin-latest", not behind,
191
192
  f"pin {pin} is behind latest release {latest}",
192
- f'pipx install --force "agentic-dev-loop=={latest}"'))
193
+ FIX_UPGRADE))
193
194
 
194
195
  present = probes.docker_present()
195
196
  checks.append(_hard(
@@ -5,7 +5,6 @@ ROOT="$(cd "$(dirname "$0")" && pwd)"
5
5
  cd "$ROOT"
6
6
 
7
7
  PIPELINE="$ROOT/agentic-dev-loop/pipeline.yaml"
8
- PIN_FILE="$ROOT/agentic-dev-loop/.engine-version"
9
8
 
10
9
  # Optional host environment file. The default lives outside the workspace so
11
10
  # secrets never enter the repo; set AGENTIC_DEV_LOOP_ENV_FILE to override.
@@ -25,24 +24,17 @@ if ! command -v agentic-dev-loop >/dev/null 2>&1; then
25
24
  exit 1
26
25
  fi
27
26
 
28
- if [[ ! -f "$PIN_FILE" ]]; then
29
- echo "error: missing engine pin file: $PIN_FILE" >&2
30
- echo " run 'agentic-dev-loop init' in this repo to write it" >&2
31
- exit 1
32
- fi
33
- PIN="$(cat "$PIN_FILE")"
34
-
35
27
  # doctor --fast is the per-run gate: hard failures abort, warnings continue.
36
- # A pin/install mismatch is repaired exactly once, then the run fails hard.
28
+ # A failing gate is repaired exactly once by upgrading to the latest engine
29
+ # release (which also rewrites the project pin), then the run fails hard.
37
30
  if ! agentic-dev-loop doctor --fast; then
38
- echo "error: doctor --fast failed - repairing the engine pin $PIN once" >&2
39
- if ! pipx install --force "agentic-dev-loop==$PIN"; then
40
- echo "error: could not install agentic-dev-loop==$PIN" >&2
41
- echo " the install may not be pipx-managed, or the index is unreachable" >&2
31
+ echo "doctor --fast failed - upgrading to the latest engine release" >&2
32
+ if ! agentic-dev-loop upgrade; then
33
+ echo "error: agentic-dev-loop upgrade failed" >&2
42
34
  exit 1
43
35
  fi
44
36
  if ! agentic-dev-loop doctor --fast; then
45
- echo "error: doctor --fast still fails after repairing the engine pin" >&2
37
+ echo "error: doctor --fast still fails after upgrading the engine" >&2
46
38
  exit 1
47
39
  fi
48
40
  fi
@@ -0,0 +1,76 @@
1
+ """``agentic-dev-loop upgrade``: install the latest engine and sync the pin.
2
+
3
+ Installs the latest release with pipx and rewrites
4
+ ``agentic-dev-loop/.engine-version`` to the installed version, so the host
5
+ install and the committed pin converge in one action.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import argparse
11
+ import shutil
12
+ import subprocess
13
+ import sys
14
+ from pathlib import Path
15
+
16
+ from agentic_dev_loop.core.profiles import ProfileError, parse_version
17
+
18
+ __all__ = ["run_upgrade"]
19
+
20
+
21
+ def _resolve(name: str, env: dict | None) -> str | None:
22
+ if env is not None:
23
+ return shutil.which(name, path=env.get("PATH", ""))
24
+ return shutil.which(name)
25
+
26
+
27
+ def run_upgrade(argv: list[str], *, workspace: Path | None = None,
28
+ env: dict | None = None) -> int:
29
+ parser = argparse.ArgumentParser(
30
+ prog="agentic-dev-loop upgrade",
31
+ description="Install the latest engine release and rewrite the "
32
+ "project pin file to match.")
33
+ parser.parse_args(argv)
34
+
35
+ root = Path(workspace or Path.cwd()).resolve()
36
+ pipx = _resolve("pipx", env)
37
+ if pipx is None:
38
+ print("error: pipx is not on PATH; the engine install must be "
39
+ "pipx-managed", file=sys.stderr)
40
+ return 1
41
+
42
+ result = subprocess.run(
43
+ [pipx, "install", "--force", "agentic-dev-loop"],
44
+ capture_output=True, text=True, check=False, env=env)
45
+ if result.returncode != 0:
46
+ detail = (result.stderr or "unknown error").strip()
47
+ print(f"error: pipx install failed: {detail}", file=sys.stderr)
48
+ return 1
49
+
50
+ cli = _resolve("agentic-dev-loop", env)
51
+ if cli is None:
52
+ print("error: agentic-dev-loop is not on PATH", file=sys.stderr)
53
+ return 1
54
+ version_result = subprocess.run(
55
+ [cli, "--version"], capture_output=True, text=True,
56
+ check=False, env=env)
57
+ if version_result.returncode != 0:
58
+ detail = (version_result.stderr or "unknown error").strip()
59
+ print(f"error: could not read the installed version: {detail}",
60
+ file=sys.stderr)
61
+ return 1
62
+
63
+ tokens = version_result.stdout.split()
64
+ version = tokens[-1] if tokens else ""
65
+ try:
66
+ parse_version(version)
67
+ except ProfileError:
68
+ print("error: unreadable version from --version output: "
69
+ f"{version_result.stdout.strip()!r}", file=sys.stderr)
70
+ return 1
71
+
72
+ out = root / "agentic-dev-loop"
73
+ out.mkdir(parents=True, exist_ok=True)
74
+ (out / ".engine-version").write_text(version + "\n", encoding="utf-8")
75
+ print(f"upgraded agentic-dev-loop to {version}; .engine-version updated")
76
+ return 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentic-dev-loop
3
- Version: 0.10.3
3
+ Version: 0.10.5
4
4
  Summary: Turn an LLM into a gated, sandboxed, resumable construction loop over your codebase.
5
5
  Author: Luke Wilson
6
6
  License-Expression: Apache-2.0
@@ -492,8 +492,10 @@ before.
492
492
  `agentic-dev-loop doctor --fast` is the per-run gate the trigger runs first.
493
493
  Hard failures abort the run (engine pin mismatch, engine runtime availability,
494
494
  API version, git repo, `.env*` files); warnings print and continue. `doctor
495
- --json` emits the same results mechanically. The trigger repairs a pin/install
496
- mismatch exactly once, then fails hard.
495
+ --json` emits the same results mechanically. On a hard failure the trigger
496
+ runs `agentic-dev-loop upgrade` exactly once: it installs the latest release
497
+ with pipx and rewrites `.engine-version` to match, then the run fails hard if
498
+ doctor still fails.
497
499
 
498
500
  A consumer repo needs a pipeline file and the agent files it names, both
499
501
  committed before the first run (the host-boundary check refuses dirty tooling,
@@ -55,6 +55,7 @@ src/agentic_dev_loop/engine/onboarding/doctor.py
55
55
  src/agentic_dev_loop/engine/onboarding/init.py
56
56
  src/agentic_dev_loop/engine/onboarding/recipes.py
57
57
  src/agentic_dev_loop/engine/onboarding/templates.py
58
+ src/agentic_dev_loop/engine/onboarding/upgrade.py
58
59
  src/agentic_dev_loop/engine/onboarding/recipes/dotnet-node.yaml
59
60
  src/agentic_dev_loop/engine/onboarding/recipes/python.yaml
60
61
  src/agentic_dev_loop/engine/onboarding/templates/dev.agent.md
@@ -81,6 +82,7 @@ tests/test_055_profiles.py
81
82
  tests/test_055_recipes.py
82
83
  tests/test_055_schema_lock.py
83
84
  tests/test_055_templates.py
85
+ tests/test_055_upgrade.py
84
86
  tests/test_actions.py
85
87
  tests/test_agent_error_guide.py
86
88
  tests/test_agents.py
@@ -1,4 +1,4 @@
1
- """055 Task 8: CLI dispatch for init and doctor."""
1
+ """055 Task 8: CLI dispatch for init, doctor, and upgrade."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -24,6 +24,13 @@ def test_init_help_exits_zero(capsys):
24
24
  assert "usage" in capsys.readouterr().out.lower()
25
25
 
26
26
 
27
+ def test_upgrade_help_exits_zero(capsys):
28
+ with pytest.raises(SystemExit) as exc:
29
+ main(["upgrade", "--help"])
30
+ assert exc.value.code == 0
31
+ assert "usage" in capsys.readouterr().out.lower()
32
+
33
+
27
34
  def test_doctor_json_fast_returns_int(monkeypatch, capsys):
28
35
  from agentic_dev_loop.engine.onboarding import checks
29
36
 
@@ -95,7 +95,7 @@ def test_installed_pin_mismatch_is_hard_with_fix_text(tmp_path: Path, capsys):
95
95
  out = capsys.readouterr().out
96
96
  assert code == 1
97
97
  assert "HARD" in out
98
- assert 'pipx install --force "agentic-dev-loop==0.9.2"' in out
98
+ assert "run agentic-dev-loop upgrade" in out
99
99
 
100
100
 
101
101
  def test_missing_placeholder_on_path_is_hard(tmp_path: Path, capsys):
@@ -41,7 +41,7 @@ def test_check_engine_min_blocks_with_exact_message():
41
41
  check_engine_min("0.10.0", "0.9.2")
42
42
  assert str(exc.value) == (
43
43
  'profile requires engine >= 0.10.0; installed 0.9.2. '
44
- 'Upgrade: pipx install --force "agentic-dev-loop==0.10.0"'
44
+ 'Upgrade: run agentic-dev-loop upgrade'
45
45
  )
46
46
 
47
47
 
@@ -63,9 +63,9 @@ def test_dev_template_missing_heading_reports_actual_headings():
63
63
 
64
64
  def test_trigger_template_contract():
65
65
  text = load_template("trigger-agentic-dev-loop.sh")
66
- assert ".engine-version" in text
67
66
  assert "doctor --fast" in text
68
- assert "pipx install --force" in text
67
+ assert "agentic-dev-loop upgrade" in text
68
+ assert "pipx install --force" not in text
69
69
  assert "pipx upgrade" not in text
70
70
  assert "AGENTIC_DEV_LOOP_ENV_FILE" in text
71
71
  assert "exec agentic-dev-loop" in text
@@ -0,0 +1,125 @@
1
+ """055 follow-up: the ``upgrade`` command.
2
+
3
+ ``agentic-dev-loop upgrade`` installs the latest engine release with pipx and
4
+ rewrites ``agentic-dev-loop/.engine-version`` to the installed version, so
5
+ the host install and the committed pin converge in one action. Tests drive
6
+ the real function with stub executables on PATH - no network, no mocks of
7
+ the upgrade logic.
8
+ """
9
+
10
+ import os
11
+ from pathlib import Path
12
+
13
+ import pytest
14
+
15
+ from agentic_dev_loop.engine.onboarding.upgrade import run_upgrade
16
+
17
+
18
+ def _make_stub(bin_dir: Path, name: str, body: str) -> None:
19
+ path = bin_dir / name
20
+ path.write_text(f"#!/bin/bash\n{body}\n")
21
+ path.chmod(0o755)
22
+ if not os.access(path, os.X_OK):
23
+ pytest.skip("tmp filesystem is mounted noexec; stub executables cannot run")
24
+
25
+
26
+ def _env_with(bin_dir: Path | None = None) -> dict:
27
+ entries = ["/usr/bin", "/bin"]
28
+ if bin_dir is not None:
29
+ entries.insert(0, str(bin_dir))
30
+ return {**os.environ, "PATH": ":".join(entries)}
31
+
32
+
33
+ def _stub_env(tmp_path: Path, *, pipx_body: str, cli_body: str) -> Path:
34
+ bin_dir = tmp_path / "bin"
35
+ bin_dir.mkdir()
36
+ _make_stub(bin_dir, "pipx", pipx_body)
37
+ _make_stub(bin_dir, "agentic-dev-loop", cli_body)
38
+ return bin_dir
39
+
40
+
41
+ def test_upgrade_installs_latest_and_writes_pin(tmp_path, capsys):
42
+ pipx_log = tmp_path / "pipx.log"
43
+ bin_dir = _stub_env(
44
+ tmp_path,
45
+ pipx_body=f'echo "$*" >> "{pipx_log}"',
46
+ cli_body='echo "agentic-dev-loop 0.10.4"',
47
+ )
48
+
49
+ code = run_upgrade([], workspace=tmp_path, env=_env_with(bin_dir))
50
+
51
+ assert code == 0
52
+ assert pipx_log.read_text().strip() == "install --force agentic-dev-loop"
53
+ pin = tmp_path / "agentic-dev-loop" / ".engine-version"
54
+ assert pin.read_text(encoding="utf-8") == "0.10.4\n"
55
+ assert "upgraded agentic-dev-loop to 0.10.4" in capsys.readouterr().out
56
+
57
+
58
+ def test_upgrade_overwrites_existing_pin(tmp_path):
59
+ out = tmp_path / "agentic-dev-loop"
60
+ out.mkdir()
61
+ (out / ".engine-version").write_text("0.10.2\n", encoding="utf-8")
62
+ bin_dir = _stub_env(
63
+ tmp_path,
64
+ pipx_body="exit 0",
65
+ cli_body='echo "agentic-dev-loop 0.10.4"',
66
+ )
67
+
68
+ code = run_upgrade([], workspace=tmp_path, env=_env_with(bin_dir))
69
+
70
+ assert code == 0
71
+ assert (out / ".engine-version").read_text(encoding="utf-8") == "0.10.4\n"
72
+
73
+
74
+ def test_upgrade_pipx_failure_is_loud(tmp_path, capsys):
75
+ bin_dir = _stub_env(
76
+ tmp_path,
77
+ pipx_body="echo index-unreachable >&2; exit 1",
78
+ cli_body='echo "agentic-dev-loop 0.10.4"',
79
+ )
80
+
81
+ code = run_upgrade([], workspace=tmp_path, env=_env_with(bin_dir))
82
+
83
+ assert code == 1
84
+ captured = capsys.readouterr()
85
+ assert "index-unreachable" in captured.err
86
+ assert not (tmp_path / "agentic-dev-loop" / ".engine-version").exists()
87
+
88
+
89
+ def test_upgrade_version_read_failure_is_loud(tmp_path, capsys):
90
+ bin_dir = _stub_env(
91
+ tmp_path,
92
+ pipx_body="exit 0",
93
+ cli_body="echo version-unknown >&2; exit 1",
94
+ )
95
+
96
+ code = run_upgrade([], workspace=tmp_path, env=_env_with(bin_dir))
97
+
98
+ assert code == 1
99
+ assert "could not read the installed version" in capsys.readouterr().err
100
+ assert not (tmp_path / "agentic-dev-loop" / ".engine-version").exists()
101
+
102
+
103
+ def test_upgrade_unparseable_version_is_loud(tmp_path, capsys):
104
+ bin_dir = _stub_env(
105
+ tmp_path,
106
+ pipx_body="exit 0",
107
+ cli_body='echo "agentic-dev-loop nope"',
108
+ )
109
+
110
+ code = run_upgrade([], workspace=tmp_path, env=_env_with(bin_dir))
111
+
112
+ assert code == 1
113
+ assert "unreadable version" in capsys.readouterr().err
114
+ assert not (tmp_path / "agentic-dev-loop" / ".engine-version").exists()
115
+
116
+
117
+ def test_upgrade_missing_pipx_is_loud(tmp_path, capsys):
118
+ bin_dir = tmp_path / "bin"
119
+ bin_dir.mkdir()
120
+ _make_stub(bin_dir, "agentic-dev-loop", 'echo "agentic-dev-loop 0.10.4"')
121
+
122
+ code = run_upgrade([], workspace=tmp_path, env=_env_with(bin_dir))
123
+
124
+ assert code == 1
125
+ assert "pipx is not on PATH" in capsys.readouterr().err
@@ -135,6 +135,21 @@ class TestResolveUnitDocs:
135
135
  assert not any("nfr-design" in k for k in docs)
136
136
  assert not any("unit-2" in k for k in docs)
137
137
 
138
+ def test_loads_bare_slug_code_generation_plan(self, tmp_path):
139
+ """`{slug}-code-generation-plan.md` (no infix) is the build spec -
140
+ the repo's actual plan filenames, e.g. unit-3-code-generation-plan.md,
141
+ must load, not only infixed variants like unit-3-scan-*."""
142
+ unit_dir = tmp_path / "construction" / "unit-3"
143
+ unit_dir.mkdir(parents=True)
144
+ (unit_dir / "design.md").write_text("# Design")
145
+ plans = tmp_path / "construction" / "plans"
146
+ plans.mkdir(parents=True)
147
+ (plans / "unit-3-code-generation-plan.md").write_text("# Build spec")
148
+
149
+ docs = resolve_unit_docs(tmp_path, "unit-3")
150
+
151
+ assert docs["plans/unit-3-code-generation-plan.md"] == "# Build spec"
152
+
138
153
  def test_missing_plans_dir_is_not_an_error(self, tmp_path):
139
154
  unit_dir = tmp_path / "construction" / "unit-2"
140
155
  unit_dir.mkdir(parents=True)