simplicio-loop 3.24.0__tar.gz → 3.25.1__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 (138) hide show
  1. {simplicio_loop-3.24.0/simplicio_loop.egg-info → simplicio_loop-3.25.1}/PKG-INFO +2 -3
  2. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/PYPI.md +1 -1
  3. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/README.md +62 -77
  4. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/pyproject.toml +3 -5
  5. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/__init__.py +2 -2
  6. simplicio_loop-3.25.1/simplicio_loop/_bundle/hooks/loop_capture.py +31 -0
  7. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/loop_stop.py +103 -13
  8. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/pre-commit.py +5 -2
  9. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/simplicio_watch.py +12 -0
  10. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/scripts/hierarchical_planner.py +6 -0
  11. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/SKILL.md +24 -22
  12. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/bound-operators.md +13 -11
  13. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/orchestration.md +3 -2
  14. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/quality-safety-delivery.md +10 -3
  15. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/orchestration.md +3 -2
  16. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/quality-safety-delivery.md +20 -3
  17. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1/simplicio_loop/_bundle}/tests/test_loop_e2e.py +162 -6
  18. simplicio_loop-3.25.1/simplicio_loop/cli.py +651 -0
  19. simplicio_loop-3.25.1/simplicio_loop/delivery.py +225 -0
  20. simplicio_loop-3.25.1/simplicio_loop/drain.py +349 -0
  21. simplicio_loop-3.25.1/simplicio_loop/evidence.py +395 -0
  22. simplicio_loop-3.25.1/simplicio_loop/ops_ledger.py +283 -0
  23. simplicio_loop-3.25.1/simplicio_loop/oracle.py +261 -0
  24. simplicio_loop-3.25.1/simplicio_loop/phase_events.py +139 -0
  25. simplicio_loop-3.25.1/simplicio_loop/runner.py +1930 -0
  26. simplicio_loop-3.25.1/simplicio_loop/source_state.py +122 -0
  27. simplicio_loop-3.25.1/simplicio_loop/task_contract.py +673 -0
  28. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1/simplicio_loop.egg-info}/PKG-INFO +2 -3
  29. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop.egg-info/SOURCES.txt +33 -1
  30. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop.egg-info/requires.txt +0 -1
  31. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_action_gate.py +32 -20
  32. simplicio_loop-3.25.1/tests/test_check_e2e_demo_contract.py +13 -0
  33. simplicio_loop-3.25.1/tests/test_check_e2e_installed.py +97 -0
  34. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_claims_audit.py +44 -0
  35. simplicio_loop-3.25.1/tests/test_clean_env_contract.py +33 -0
  36. simplicio_loop-3.25.1/tests/test_completion_oracle.py +321 -0
  37. simplicio_loop-3.25.1/tests/test_completion_oracle_matrix.py +51 -0
  38. simplicio_loop-3.25.1/tests/test_delivery_source_identity.py +24 -0
  39. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_doctor_smoke.py +18 -2
  40. simplicio_loop-3.25.1/tests/test_drain.py +140 -0
  41. simplicio_loop-3.25.1/tests/test_drain_cli.py +136 -0
  42. simplicio_loop-3.25.1/tests/test_e2e_demo_audit.py +97 -0
  43. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_evidence_chain.py +54 -2
  44. simplicio_loop-3.25.1/tests/test_evidence_receipt.py +252 -0
  45. simplicio_loop-3.25.1/tests/test_fan_out_scheduler.py +193 -0
  46. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_fan_out_unit.py +46 -0
  47. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_hbp_topics.py +5 -5
  48. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_hooks_coverage.py +16 -5
  49. simplicio_loop-3.25.1/tests/test_ledger_cli.py +81 -0
  50. {simplicio_loop-3.24.0/simplicio_loop/_bundle → simplicio_loop-3.25.1}/tests/test_loop_e2e.py +162 -6
  51. simplicio_loop-3.25.1/tests/test_mirror_parity.py +34 -0
  52. simplicio_loop-3.25.1/tests/test_operator_batch.py +119 -0
  53. simplicio_loop-3.25.1/tests/test_operator_worktree_batch.py +142 -0
  54. simplicio_loop-3.25.1/tests/test_ops_ledger.py +163 -0
  55. simplicio_loop-3.25.1/tests/test_phase_events.py +74 -0
  56. simplicio_loop-3.25.1/tests/test_planes_golden_eval.py +89 -0
  57. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_precommit_bundle_sync.py +40 -9
  58. simplicio_loop-3.25.1/tests/test_runner_cli.py +1001 -0
  59. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_system_check.py +19 -2
  60. simplicio_loop-3.25.1/tests/test_task_backlog.py +602 -0
  61. simplicio_loop-3.25.1/tests/test_task_contract_cli.py +79 -0
  62. simplicio_loop-3.25.1/tests/test_task_contract_unit.py +146 -0
  63. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_token_budget.py +5 -3
  64. simplicio_loop-3.25.1/tests/test_watcher_binding.py +23 -0
  65. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_worker_cli_contract.py +8 -1
  66. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_worker_selftests.py +50 -1
  67. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_worker_smoke.py +92 -15
  68. simplicio_loop-3.25.1/tests/test_worktree_queue.py +127 -0
  69. simplicio_loop-3.24.0/simplicio_loop/_bundle/hooks/loop_capture.py +0 -86
  70. simplicio_loop-3.24.0/simplicio_loop/cli.py +0 -180
  71. simplicio_loop-3.24.0/tests/test_task_backlog.py +0 -225
  72. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/LICENSE +0 -0
  73. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/MANIFEST.in +0 -0
  74. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/setup.cfg +0 -0
  75. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/README.md +0 -0
  76. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/action_gate.py +0 -0
  77. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/hooks.claude.json +0 -0
  78. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/hooks.json +0 -0
  79. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/orient_clamp.py +0 -0
  80. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/orient_rewrite.py +0 -0
  81. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/hooks/simplicio_dashboard.py +0 -0
  82. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/scripts/cross_agent_wiki.py +0 -0
  83. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-autoresearch/SKILL.md +0 -0
  84. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-compress/SKILL.md +0 -0
  85. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-learn/SKILL.md +0 -0
  86. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/agentsview-adapter.md +0 -0
  87. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/azure-devops-adapter.md +0 -0
  88. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/claims-gate.md +0 -0
  89. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/cross-agent-wiki.md +0 -0
  90. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/cross-repo-integration.md +0 -0
  91. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/extension-points.md +0 -0
  92. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/hierarchical-planner.md +0 -0
  93. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/lmcache-adapter.md +0 -0
  94. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/run-journal-stall-detector.md +0 -0
  95. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/spindle-handoff.md +0 -0
  96. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/standing-loop-247.md +0 -0
  97. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/token-capture.md +0 -0
  98. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/token-economy.md +0 -0
  99. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/triage-verify-detail.md +0 -0
  100. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/understand-anything-adapter.md +0 -0
  101. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/video-evidence.md +0 -0
  102. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-loop/references/web-evidence.md +0 -0
  103. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-orient/SKILL.md +0 -0
  104. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-review/SKILL.md +0 -0
  105. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/SKILL.md +0 -0
  106. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/agentsview-adapter.md +0 -0
  107. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/azure-devops-adapter.md +0 -0
  108. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/extension-points.md +0 -0
  109. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/lmcache-adapter.md +0 -0
  110. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/standing-loop-247.md +0 -0
  111. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/token-capture.md +0 -0
  112. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/token-economy.md +0 -0
  113. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/understand-anything-adapter.md +0 -0
  114. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/video-evidence.md +0 -0
  115. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/skills/simplicio-tasks/references/web-evidence.md +0 -0
  116. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/tests/_selfrun.py +0 -0
  117. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop/_bundle/tests/test_cross_agent_wiki.py +0 -0
  118. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop.egg-info/dependency_links.txt +0 -0
  119. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop.egg-info/entry_points.txt +0 -0
  120. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/simplicio_loop.egg-info/top_level.txt +0 -0
  121. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_agentsview_adapter.py +0 -0
  122. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_autoresearch.py +0 -0
  123. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_az_boards_adapter.py +0 -0
  124. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_claims_manifest_unit.py +0 -0
  125. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_cross_agent_wiki.py +0 -0
  126. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_dashboard_hook.py +0 -0
  127. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_fan_out_flow.py +0 -0
  128. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_flow_audit.py +0 -0
  129. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_hierarchical_planner.py +0 -0
  130. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_impact_audit.py +0 -0
  131. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_install_lib.py +0 -0
  132. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_learn_pipeline_removed.py +0 -0
  133. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_locked_append.py +0 -0
  134. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_repo_conventions_architecture.py +0 -0
  135. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_schema_verify_integration.py +0 -0
  136. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_schema_verify_unit.py +0 -0
  137. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_toon_codec.py +0 -0
  138. {simplicio_loop-3.24.0 → simplicio_loop-3.25.1}/tests/test_verify_adapters_integration.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simplicio-loop
3
- Version: 3.24.0
3
+ Version: 3.25.1
4
4
  Summary: The Universal Looping AI Orchestrator — a runtime-agnostic super-plugin (7 skills) that drains any queue of work end-to-end on any LLM/runtime.
5
5
  Author-email: Wesley Simplicio <wesleybob4@gmail.com>
6
6
  License: MIT
@@ -19,7 +19,6 @@ Classifier: Operating System :: OS Independent
19
19
  Requires-Python: >=3.8
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
- Requires-Dist: simplicio-mapper>=0.19.0
23
22
  Requires-Dist: simplicio-cli>=0.11.0
24
23
  Provides-Extra: dev
25
24
  Requires-Dist: pytest>=7; extra == "dev"
@@ -35,7 +34,7 @@ drains any queue of work end-to-end on **any LLM / runtime**:
35
34
  `discover → implement → verify → merge → close → watch 24/7`, behind safety gates and evidence
36
35
  checks, at up to **96% fewer tokens**. Not a chatbot. A worker.
37
36
 
38
- ![simplicio-loop](https://raw.githubusercontent.com/wesleysimplicio/simplicio-loop/main/assets/simplicio-loop-hero.jpg)
37
+ ![simplicio-loop](https://raw.githubusercontent.com/wesleysimplicio/simplicio-loop/main/assets/simplicio-loop-hero-2026.png)
39
38
 
40
39
  ## Install
41
40
 
@@ -5,7 +5,7 @@ drains any queue of work end-to-end on **any LLM / runtime**:
5
5
  `discover → implement → verify → merge → close → watch 24/7`, behind safety gates and evidence
6
6
  checks, at up to **96% fewer tokens**. Not a chatbot. A worker.
7
7
 
8
- ![simplicio-loop](https://raw.githubusercontent.com/wesleysimplicio/simplicio-loop/main/assets/simplicio-loop-hero.jpg)
8
+ ![simplicio-loop](https://raw.githubusercontent.com/wesleysimplicio/simplicio-loop/main/assets/simplicio-loop-hero-2026.png)
9
9
 
10
10
  ## Install
11
11
 
@@ -1,7 +1,7 @@
1
1
  # 🔁 simplicio-loop — The Universal Looping AI Orchestrator
2
2
 
3
3
  <p align="center">
4
- <img src="assets/simplicio-loop-hero.jpg" alt="simplicio-loop" width="920" />
4
+ <img src="assets/simplicio-loop-hero-2026.png" alt="simplicio-loop autonomous parallel evidence-gated orchestration" width="920" />
5
5
  </p>
6
6
 
7
7
  <p align="center">
@@ -48,6 +48,41 @@
48
48
 
49
49
  ---
50
50
 
51
+ <!-- visual-story:start -->
52
+ ## 🚀 The new generation — an operating system for verified agent work
53
+
54
+ **simplicio-loop has evolved far beyond a repeat-until-done prompt.** It now compiles intent into a frozen task contract, maps the repository, schedules dependency-aware work, fans execution out into isolated worktrees, collects structured receipts, verifies independently, rolls back safely, remembers every attempt, and keeps the source of record synchronized through delivery.
55
+
56
+ - **Contract first** — acceptance criteria, dependencies, risks, source state, and the completion oracle are explicit before execution.
57
+ - **Parallel without corruption** — ready tasks run in isolated lanes/worktrees and converge through an operational ledger.
58
+ - **Proof before completion** — tests, impact/flow checks, watcher challenges, delivery receipts, and HBP evidence reject false done states.
59
+ - **Memory that changes behavior** — the journal, stall detector, checkpoints, and cross-agent wiki prevent oscillation and make handoffs durable.
60
+
61
+ <p align="center">
62
+ <img src="assets/simplicio-loop-parallel-worktrees.png" alt="simplicio-loop parallel isolated worktree execution" width="920" />
63
+ </p>
64
+
65
+ <p align="center"><em>Dependency-aware fan-out: isolated workers execute concurrently, return evidence, and converge into one verified delivery.</em></p>
66
+
67
+ <p align="center">
68
+ <img src="assets/simplicio-loop-lifecycle-2026.svg" alt="simplicio-loop lifecycle from intake to durable memory" width="920" />
69
+ </p>
70
+
71
+ <p align="center"><em>Every stage is explicit, bounded, observable, and reversible.</em></p>
72
+
73
+ <p align="center">
74
+ <img src="assets/simplicio-loop-evidence-memory.png" alt="simplicio-loop evidence memory verification rollback and completion" width="920" />
75
+ </p>
76
+
77
+ <p align="center"><em>Evidence and memory are part of the execution path—not a report written after the fact.</em></p>
78
+
79
+ That architecture lets one goal become a governed delivery system: from a single hard task to an entire backlog, across sessions and runtimes, with local-first operators and receipts strong enough for humans, CI, or another agent to audit.
80
+
81
+ <p align="center">
82
+ <img src="assets/simplicio-loop-architecture-2026.svg" alt="simplicio-loop control execution evidence and delivery planes" width="920" />
83
+ </p>
84
+ <!-- visual-story:end -->
85
+
51
86
  ## ⚡ TL;DR
52
87
 
53
88
  **simplicio-loop** is a runtime-agnostic **super-plugin** — one autonomous looping
@@ -210,79 +245,28 @@ Every layer the orchestrator acts on, in order — from reading the demand (issu
210
245
  to delivering merged, evidenced work, then looping 24/7 for more.
211
246
 
212
247
  ```mermaid
213
- flowchart TD
214
- subgraph SRC["1 · Demand sources (any adapter)"]
215
- direction LR
216
- S1["GitHub Issues / PRs / CI"]
217
- S2["Jira · Azure DevOps · Linear · ClickUp · Notion · agentsview · Understand Anything (orient)"]
218
- S3["Assigns · TODO/FIXME · CVE · local files · LMCache (inference accelerator)"]
219
- end
220
- SRC --> PF
221
- subgraph PF["2 · Pre-flight gates"]
222
- direction LR
223
- P1["source auth + scopes"]
224
- P2["runtime/tools ready"]
225
- P3["arm 24/7 watcher + STOP path"]
226
- end
227
- PF --> DISC
228
- subgraph DISC["3 · Discover + normalize"]
229
- direction LR
230
- D1["source_adapter: list metadata only"]
231
- D2["normalize to canonical schema"]
232
- D3["dedup id+title+fingerprint+branch/PR"]
233
- D4["dependency DAG"]
234
- end
235
- DISC --> INTK
236
- subgraph INTK["4 · Deep intake (per item)"]
237
- direction LR
238
- I1["body + ALL comments"]
239
- I2["extract acceptance criteria"]
240
- I3["orient code · signatures-only reads or Understand Anything knowledge graph"]
241
- I4["plan + AC checklist + complexity"]
242
- end
243
- INTK --> RT{"5 · Route"}
244
- RT -->|"small and every item complexity at most 3"| FAST["Fast-path: solo, one targeted test"]
245
- RT -->|"large queue or any medium+"| POOL
246
- subgraph POOL["6 · Continuous worker pool (autoscaled, conflict-aware)"]
247
- direction LR
248
- W1["claim · branch · worktree if overlap"]
249
- W2["deterministic_edit"]
250
- W3["quality loop: edit-lint-test-fix"]
251
- end
252
- FAST --> QG
253
- POOL --> QG
254
- subgraph QG["7 · Quality gates"]
255
- direction LR
256
- Q1["AC gate + impact_audit = real DoD"]
257
- Q2["WORKS not just compiles · web_verify · video_evidence · flow_audit"]
258
- Q3["adversarial review · thermos rubrics"]
259
- end
260
- QG --> SG
261
- subgraph SG["8 · Safety gates (non-negotiable)"]
262
- direction LR
263
- G1["secret-scan"]
264
- G2["irreversible-op human gate"]
265
- G3["4-state verdict · attestation"]
266
- end
267
- SG --> DEL
268
- subgraph DEL["9 · Deliver"]
269
- direction LR
270
- L1["commit · push · Draft PR"]
271
- L2["close in-source + evidence"]
272
- L3["verify reality, not self-report"]
273
- end
274
- DEL --> FB
275
- subgraph FB["10 · Feedback loop to merge-ready"]
276
- direction LR
277
- F1["CI fail -> fix root cause"]
278
- F2["review comments -> adjust"]
279
- F3["branch behind main -> additive rebase"]
280
- end
281
- FB -->|"merged and closed"| DONE(["done + evidence + measured savings (only if a receipt exists)"])
282
- WATCH["11 · 24/7 watcher · simplicio-loop evidence-gated promise · max-iterations cap · STOP path · LMCache KV cache warm"]
283
- FB -. "poll new work / comments / checks" .-> WATCH
284
- DONE -. "idle until new work" .-> WATCH
285
- WATCH -. "re-feed the goal" .-> DISC
248
+ flowchart LR
249
+ IN["Intent: issue · task · queue"] --> CONTRACT["1 · Freeze task contract"]
250
+ CONTRACT --> MAP["2 · Map source + normalize"]
251
+ MAP --> PLAN["3 · Dependency DAG + acceptance criteria"]
252
+ PLAN --> ROUTE{"4 · Ready task?"}
253
+ ROUTE -->|"solo / small"| SOLO["Targeted lane"]
254
+ ROUTE -->|"parallel / medium+"| FAN["Bounded fan-out"]
255
+ FAN --> A["Isolated worktree A"]
256
+ FAN --> B["Isolated worktree B"]
257
+ FAN --> C["Isolated worktree C"]
258
+ SOLO --> VERIFY["5 · Test + impact/flow evidence"]
259
+ A --> VERIFY
260
+ B --> VERIFY
261
+ C --> VERIFY
262
+ VERIFY --> RECEIPT["Watcher challenge + evidence receipt"]
263
+ RECEIPT --> ORACLE{"6 · Completion oracle"}
264
+ ORACLE -->|"pending / blocked"| RECOVER["Journal · checkpoint · rollback · backlog-only maintenance"]
265
+ RECOVER --> PLAN
266
+ ORACLE -->|"verified / measured"| DELIVER["7 · Source sync · PR · merge"]
267
+ DELIVER --> MEMORY["8 · Ledger · wiki · durable attempt memory"]
268
+ MEMORY --> WATCH["9 · Re-feed · watcher · STOP path"]
269
+ WATCH -->|"new work"| IN
286
270
  ```
287
271
 
288
272
  ---
@@ -530,8 +514,9 @@ pwsh scripts/install.ps1 <runtime> [-Global] # Windows
530
514
  ```
531
515
 
532
516
  **The repo installer is full-stack by default — it installs everything.** One command sets up the whole stack:
533
- the two loop operators (`simplicio-mapper` + `simplicio-cli`, auto-handling PEP 668 / externally-managed
534
- Python and symlinking the binaries onto `PATH`), the **full Python stack** (the package itself),
517
+ the loop operator package (`simplicio-cli`, which exposes `simplicio-dev-cli` and also brings
518
+ `simplicio-mapper` transitively, auto-handling PEP 668 / externally-managed Python and symlinking
519
+ the binaries onto `PATH`), the **full Python stack** (the package itself),
535
520
  the **7 skills + hooks** with the loop's Stop hook wired, and the **always-on capture proxy**
536
521
  with Claude + Codex + Hermes **routed and measured** in the background. The **dashboard opens once** on a
537
522
  fresh install, then it's on-demand (`simplicio-loop dashboard` / `simplicio-economy.sh monitor`); the
@@ -556,7 +541,7 @@ python3 scripts/doctor.py --repair # install/wire what's fixable; make everyth
556
541
  # also: bash scripts/simplicio-economy.sh doctor [--repair]
557
542
  ```
558
543
 
559
- `doctor` separates **REQUIRED** (python3, the two loop operators, the 7 skills, the loop hooks, the
544
+ `doctor` separates **REQUIRED** (python3, the loop operator package plus its runtime bins, the 7 skills, the loop hooks, the
560
545
  capture proxy — `--repair` installs/wires them) from **OPTIONAL** accelerators (the tray dep).
561
546
  **Missing an optional piece is never a failure and
562
547
  never blocks** — the Python engine + the deterministic path cover everything; the exit code is 0 as
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simplicio-loop"
7
- version = "3.24.0"
7
+ version = "3.25.1"
8
8
  description = "The Universal Looping AI Orchestrator — a runtime-agnostic super-plugin (7 skills) that drains any queue of work end-to-end on any LLM/runtime."
9
9
  readme = "PYPI.md"
10
10
  requires-python = ">=3.8"
@@ -21,11 +21,9 @@ classifiers = [
21
21
  "Topic :: Utilities",
22
22
  "Operating System :: OS Independent",
23
23
  ]
24
- # The simplicio-loop drive REQUIRES two operators (see .claude/skills/simplicio-loop/SKILL.md):
25
- # simplicio-mapper -> the repo-survey step (binds `orient`)
26
- # simplicio-cli -> the operator that applies+verifies changes (binds `execute`/`deterministic_edit`)
24
+ # The simplicio-loop drive requires the operator package (`simplicio-cli`), which exposes
25
+ # `simplicio-dev-cli` and also brings the survey binary `simplicio-mapper` transitively.
27
26
  dependencies = [
28
- "simplicio-mapper>=0.19.0",
29
27
  "simplicio-cli>=0.11.0",
30
28
  ]
31
29
 
@@ -13,6 +13,6 @@ try:
13
13
  try:
14
14
  __version__ = _v("simplicio-loop")
15
15
  except PackageNotFoundError:
16
- __version__ = "3.22.6"
16
+ __version__ = "3.25.1"
17
17
  except Exception: # pragma: no cover
18
- __version__ = "3.22.6"
18
+ __version__ = "3.25.1"
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env python3
2
+ """simplicio-loop — capture hook (Cursor `afterAgentResponse`).
3
+
4
+ Transport only: stash the latest assistant response so the shared completion oracle
5
+ can evaluate it later in the stop hook. This hook never decides completion and never
6
+ raises `done` on its own.
7
+ """
8
+ import json
9
+ import os
10
+ import sys
11
+
12
+ LOOP_DIR = os.path.join(".orchestrator", "loop")
13
+ LAST_RESP = os.path.join(LOOP_DIR, "last_response.txt")
14
+
15
+
16
+ def main():
17
+ try:
18
+ raw = sys.stdin.read()
19
+ data = json.loads(raw) if raw.strip() else {}
20
+ resp = data.get("text", "") or ""
21
+ if resp:
22
+ os.makedirs(LOOP_DIR, exist_ok=True)
23
+ with open(LAST_RESP, "w", encoding="utf-8") as f:
24
+ f.write(resp)
25
+ except Exception:
26
+ pass
27
+ sys.exit(0)
28
+
29
+
30
+ if __name__ == "__main__":
31
+ main()
@@ -26,6 +26,14 @@ import subprocess
26
26
  import sys
27
27
  import time
28
28
  import uuid
29
+ from pathlib import Path
30
+
31
+ try: # Windows consoles default to cp1252; hook protocols and evidence are UTF-8.
32
+ sys.stdin.reconfigure(encoding="utf-8", errors="replace")
33
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
34
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
35
+ except Exception:
36
+ pass
29
37
 
30
38
  LOOP_DIR = os.path.join(".orchestrator", "loop")
31
39
  SCRATCHPAD = os.path.join(LOOP_DIR, "scratchpad.md")
@@ -222,6 +230,7 @@ def write_handoff(reason, meta=None, body=None):
222
230
  anchor = read_anchor() or {}
223
231
  criteria = anchor.get("criteria") or []
224
232
  attempts = tail_journal()
233
+ completion = latest_completion_receipt() or {}
225
234
  lines = [
226
235
  "# simplicio-loop handoff",
227
236
  "",
@@ -262,6 +271,16 @@ def write_handoff(reason, meta=None, body=None):
262
271
  attempt_suffix(a),
263
272
  )
264
273
  )
274
+ if completion:
275
+ lines += [
276
+ "",
277
+ "## Completion oracle",
278
+ "",
279
+ "- verdict: %s" % completion.get("verdict", "DELIVERY_PENDING"),
280
+ "- reason_code: %s" % completion.get("reason_code", "oracle_incomplete"),
281
+ "- tag: %s" % completion.get("tag", "UNVERIFIED"),
282
+ "- receipt: %s" % completion.get("_path", "(unknown)"),
283
+ ]
265
284
  lines += [
266
285
  "",
267
286
  "## Resume",
@@ -679,6 +698,70 @@ def watcher_verify():
679
698
  return False, "UNVERIFIED"
680
699
 
681
700
 
701
+ def latest_run_dir():
702
+ try:
703
+ runs = Path(".orchestrator") / "runs"
704
+ if not runs.exists():
705
+ return ""
706
+ candidates = sorted([p for p in runs.iterdir() if p.is_dir()], key=lambda p: p.name)
707
+ return str(candidates[-1]) if candidates else ""
708
+ except Exception:
709
+ return ""
710
+
711
+
712
+ def latest_completion_receipt():
713
+ try:
714
+ run_dir = latest_run_dir()
715
+ if not run_dir:
716
+ return None
717
+ path = Path(run_dir) / "completion-receipt.json"
718
+ if not path.exists():
719
+ return None
720
+ with open(path, encoding="utf-8") as f:
721
+ payload = json.load(f)
722
+ payload["_path"] = str(path)
723
+ return payload
724
+ except Exception:
725
+ return None
726
+
727
+
728
+ def completion_oracle_payload(response_text="", flow_gap=""):
729
+ try:
730
+ repo_root = os.getcwd()
731
+ script = os.path.join(repo_root, "scripts", "completion_oracle.py")
732
+ if not os.path.exists(script):
733
+ source_repo = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
734
+ script = os.path.join(source_repo, "scripts", "completion_oracle.py")
735
+ if not os.path.exists(script):
736
+ return {"ready": False, "reason_code": "oracle_script_missing", "tag": "UNVERIFIED"}
737
+ run_dir = latest_run_dir()
738
+ cmd = [sys.executable, script, "--loop-dir", LOOP_DIR]
739
+ if run_dir:
740
+ cmd += ["--run-dir", run_dir]
741
+ if response_text:
742
+ cmd += ["--response-text", response_text]
743
+ if flow_gap:
744
+ cmd += ["--flow-gap", flow_gap]
745
+ if run_dir:
746
+ cmd += ["--write-receipt"]
747
+ r = subprocess.run(
748
+ cmd,
749
+ capture_output=True,
750
+ stdin=subprocess.DEVNULL,
751
+ text=True,
752
+ encoding="utf-8",
753
+ errors="replace",
754
+ timeout=15,
755
+ cwd=repo_root,
756
+ )
757
+ payload = json.loads(r.stdout) if (r.stdout or "").strip() else {}
758
+ if isinstance(payload, dict):
759
+ return payload
760
+ return {"ready": False, "reason_code": "oracle_invalid_payload", "tag": "UNVERIFIED"}
761
+ except Exception:
762
+ return {"ready": False, "reason_code": "oracle_error", "tag": "UNVERIFIED"}
763
+
764
+
682
765
  def spindle_latched():
683
766
  """True when a spindle handoff exists with an unreleased latch.
684
767
 
@@ -861,24 +944,31 @@ def main():
861
944
  # Pre-promise: front→back flow-audit gate (#80) — mechanical, not prose-only.
862
945
  flow_gap = flow_audit_gap()
863
946
 
864
- # Completion detection (capture folded in for single-hook runtimes like Claude).
947
+ # Completion detection is centralized in the shared oracle (#138). The stop hook can still
948
+ # surface watcher/flow state in the re-feed header below, but it no longer decides COMPLETE
949
+ # on its own.
865
950
  if promise and resp:
866
- m = PROMISE_RE.search(resp)
867
- if m and m.group(1).strip() == promise.strip():
868
- # The promise is honored only with evidence AND watcher verification AND no
869
- # acceptance criterion still open in the task anchor AND no open flow-audit gap.
870
- # The watcher-gate ensures the agent's result was independently re-executed and
871
- # matched before the promise is accepted — corrective gate per Asolaria.
872
- if (((not evidence_required) or has_evidence) and watcher_pass
873
- and not anchor_pending() and not flow_gap):
951
+ oracle = completion_oracle_payload(resp, flow_gap or "")
952
+ if oracle.get("ready") and os.path.exists(str(oracle.get("receipt_path") or "")):
953
+ _call_simplicio_hbp_append(iteration, promise, watcher_tag)
954
+ refresh_cross_agent_wiki(include_handoff=False)
955
+ cleanup_and_stop() # (3) promise fulfilled → stop, no handoff needed
956
+ # Legacy converge fixtures and lightweight installs predate persisted run artifacts.
957
+ # Preserve their evidence-gated contract only when the oracle explicitly reports that
958
+ # no run directory exists; every persisted run remains exclusively oracle-authorized.
959
+ if oracle.get("reason_code") == "run_dir_missing":
960
+ match = PROMISE_RE.search(resp)
961
+ if (match and match.group(1).strip() == promise.strip()
962
+ and ((not evidence_required) or has_evidence)
963
+ and watcher_pass and not anchor_pending() and not flow_gap):
874
964
  _call_simplicio_hbp_append(iteration, promise, watcher_tag)
875
965
  refresh_cross_agent_wiki(include_handoff=False)
876
- cleanup_and_stop() # (3) promise fulfilled → stop, no handoff needed
877
- # promise without evidence, or watcher disagrees, or anchor still has open ACs,
878
- # or a flow-audit gap remains → ignore, keep looping
966
+ cleanup_and_stop()
879
967
  # (3') Cursor capture may have raised the flag.
880
968
  if os.path.exists(DONE_FLAG) or os.path.exists(LEGACY_DONE_FLAG):
881
- cleanup_and_stop()
969
+ oracle = completion_oracle_payload(flow_gap=flow_gap or "")
970
+ if oracle.get("ready") and os.path.exists(str(oracle.get("receipt_path") or "")):
971
+ cleanup_and_stop()
882
972
  # (4) Iteration cap — incomplete stop, hand off.
883
973
  if max_iter > 0 and iteration >= max_iter:
884
974
  _call_simplicio_hbp_append_topic("loop-run-blocked", {
@@ -58,7 +58,10 @@ def _monitored_paths():
58
58
  for prefix in WATCHED_SOURCE_DIRS:
59
59
  full = os.path.join(REPO, prefix)
60
60
  if os.path.exists(full):
61
- watched.add(full)
61
+ # Normalize separators before commonpath on Windows. A manifest entry
62
+ # may use POSIX-style `/` while git emits `\\`; mixed forms caused the
63
+ # hook to silently miss staged skill changes on Windows.
64
+ watched.add(os.path.abspath(os.path.normpath(full)))
62
65
  return watched
63
66
 
64
67
 
@@ -77,7 +80,7 @@ def _staged_changes_touch_monitored():
77
80
 
78
81
  for rel_path in r.stdout.splitlines():
79
82
  for watched in _monitored_paths():
80
- abs_path = os.path.join(REPO, rel_path)
83
+ abs_path = os.path.abspath(os.path.normpath(os.path.join(REPO, rel_path)))
81
84
  if os.path.commonpath([abs_path, watched]) == watched:
82
85
  return True
83
86
  return False
@@ -15,6 +15,13 @@ import subprocess
15
15
  import sys
16
16
  from pathlib import Path
17
17
 
18
+
19
+ try: # Status icons and protocol output must survive Windows cp1252 consoles.
20
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
21
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
22
+ except Exception:
23
+ pass
24
+
18
25
  HOME = os.path.expanduser("~")
19
26
  LOGS = os.path.join(HOME, ".simplicio", "logs")
20
27
  REPO_ROOT = Path(__file__).resolve().parents[1]
@@ -36,6 +43,11 @@ PROXY_SERVICE = "ai.simplicio.proxy"
36
43
 
37
44
 
38
45
  def log(msg):
46
+ encoding = getattr(sys.stdout, "encoding", None) or "utf-8"
47
+ try:
48
+ msg = str(msg).encode(encoding).decode(encoding)
49
+ except UnicodeEncodeError:
50
+ msg = str(msg).encode(encoding, errors="replace").decode(encoding)
39
51
  print(msg)
40
52
 
41
53
 
@@ -38,6 +38,12 @@ import sys
38
38
  import tempfile
39
39
  import time
40
40
 
41
+ try:
42
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
43
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
44
+ except Exception:
45
+ pass
46
+
41
47
  HERE = os.path.dirname(os.path.abspath(__file__))
42
48
  REPO = os.path.dirname(HERE)
43
49
  LOOP_DIR = os.path.join(REPO, ".orchestrator", "loop")
@@ -46,13 +46,17 @@ The rest of this file is the mechanism that enforces this contract.
46
46
  - "/simplicio-loop finish all the open issues", "clear the CI queue", "drain the Jira board".
47
47
  - "run a ralph loop on X", "iterate until the tests pass", "keep going until done".
48
48
  - As the unified public entrypoint for unattended queue-drain or converge-until-done runs.
49
+ - For body-of-work / Phase-0 drains, freeze the backlog once (`task_backlog.py init`) and use
50
+ `task_backlog.py checklist` / `pr_evidence.py build --backlog ...` so the PR shows the whole
51
+ backlog table above the per-item anchor checklist, not just the current item.
49
52
  - NOT for a one-shot edit — use the host's normal flow.
50
53
 
51
54
  ## Bound operators (REQUIRED): survey + operate
52
55
 
53
56
  This loop does NOT survey the repo with the LLM, and it does NOT hand-edit files with the LLM.
54
- Two installed CLIs are the operators; the model only DECIDES, the operators DO. Both ship as
55
- hard dependencies of the `simplicio-loop` package (`pip install simplicio-loop` pulls them).
57
+ Two installed CLIs are the operators; the model only DECIDES, the operators DO. The supported
58
+ install surface is the operator package `simplicio-cli`, which exposes `simplicio-dev-cli` and
59
+ also brings `simplicio-mapper` transitively for the survey step.
56
60
  Full mechanics (two-tier survey, evidence gate, context-pack, structured queries, docs-drift
57
61
  gates, the operator dispatch table): **`references/bound-operators.md`**.
58
62
 
@@ -61,19 +65,19 @@ gates, the operator dispatch table): **`references/bound-operators.md`**.
61
65
  | **simplicio-mapper** | `simplicio-mapper` | `orient` / `recall` | **Survey** — maps the repo(s) into `.simplicio/*.json` (project-map, precedent-index, symbol-index, call-graph, docs). This survey, not an ad-hoc LLM read, is what feeds the goal each turn. |
62
66
  | **simplicio-dev-cli** | `simplicio-dev-cli` | `execute` / `deterministic_edit` / `validate` / `diagnostics` | **Operate** — applies a DECIDED change through its 6-layer contract (mapper context → precedent → prompt → diff → test → verify, ≤3 retries). The CLI edits and verifies; the AI does not hand-write the diff. |
63
67
 
64
- **Preflight (MANDATORY, BLOCKING).** Before iteration 1, auto-update both operators to their
65
- latest release, then confirm both are on PATH:
68
+ **Preflight (MANDATORY, BLOCKING).** Before iteration 1, auto-update the operator package to its
69
+ latest release, then confirm both runtime binaries are on PATH:
66
70
  ```bash
67
- python3 -m pip install -qU simplicio-mapper simplicio-cli 2>/dev/null \
68
- || python3 -m pip install -qU --user --break-system-packages simplicio-mapper simplicio-cli 2>/dev/null || true
69
- simplicio-mapper --version # survey operator (now latest)
71
+ python3 -m pip install -qU simplicio-cli 2>/dev/null \
72
+ || python3 -m pip install -qU --user --break-system-packages simplicio-cli 2>/dev/null || true
73
+ simplicio-mapper --version # survey operator (expected transitively from simplicio-cli)
70
74
  simplicio-dev-cli --help # action operator (pkg simplicio-cli; exposes `simplicio-dev-cli`)
71
75
  ```
72
76
  Best-effort and offline-safe — a network/pip failure leaves the working version in place. The
73
77
  action binary is `simplicio-dev-cli` (from `pip install simplicio-cli`) — NOT the bare `simplicio`
74
- (that's the separate `simplicio-runtime`). If either operator is missing, do NOT fall back to LLM
75
- survey/editing — STOP and emit `simplicio-loop: BLOCKED — missing operator <name>; run: pip
76
- install simplicio-loop`.
78
+ (that's the separate `simplicio-runtime`). If either runtime binary is missing, do NOT fall back to
79
+ LLM survey/editing — STOP and emit `simplicio-loop: BLOCKED — missing operator <name>; run: pip
80
+ install simplicio-cli`.
77
81
 
78
82
  **Survey step (each loop start).** `simplicio-mapper scan . --json` (instant macro skeleton +
79
83
  background deep index) → gate with `inspect . --json` (artifacts exist on disk) → feed the goal
@@ -211,22 +215,20 @@ halt the whole drain). `simplicio-tasks` Step 3 routes fast-path/heavy-path on t
211
215
  When the goal is vague and no external source (board/issues) supplies items, the LLM brainstorms
212
216
  the decomposition — subtasks with ≥1 acceptance criterion each, `depends_on`, risks — and MUST
213
217
  freeze it BEFORE any edit: `python3 scripts/task_backlog.py init --goal "<goal verbatim>"
214
- --items-file plan.json` (the worker refuses an empty plan, a zero-AC item, or an unknown/cyclic
218
+ --item-file plan.json` (the worker refuses an empty plan, a zero-AC item, or an unknown/cyclic
215
219
  dependency — the AI decides, the worker freezes, orders and gates). State:
216
220
  `.orchestrator/backlog/backlog.jsonl`.
217
221
 
218
- **Genesis.** First run `python3 scripts/task_backlog.py genesis --exit-code` — exit 10 means a
219
- repo with NO code yet. There `init` demands `--genesis` plus exactly one item tagged `scaffold`
220
- (structure + toolchain + one minimal green test as its ACs); the worker reorders it to T1 and
221
- makes every other item depend on it. After the scaffold item's gate passes, re-run
222
- `simplicio-mapper scan . --json` before claiming the next item — the survey only feeds the goal
223
- once there is something to map.
224
-
225
- **Per-item cycle**: `python3 scripts/task_backlog.py next` claims one item (re-prints the one in
226
- flight) and prints the ready `task_anchor.py set` arming command → work it under the normal
227
- converge contract → `python3 scripts/task_backlog.py done --id T1` (exit 12 unless the ARMED
228
- anchor is this item with every AC verified) → `next` again; exactly `empty` = drained.
222
+ **Scaffolding a new repo.** Put exactly one explicit `scaffold` item first in `plan.json`
223
+ (structure + toolchain + one minimal green test as its ACs) and make every later item depend on
224
+ it. After that item passes, re-run `simplicio-mapper scan . --json` before claiming the next
225
+ item — the survey only becomes useful once there is code to map.
229
226
 
227
+ **Per-item cycle**: `python3 scripts/task_backlog.py next` claims one ready item and prints its id,
228
+ goal, lease owner, and fencing token → freeze that item's goal/ACs with `task_anchor.py set` → work
229
+ it under the normal converge contract → `python3 scripts/task_backlog.py done --item T1` (exit 12
230
+ unless the current anchor is this item with every AC verified) → `next` again. `status`/`poll`
231
+ provide the deterministic drain signal and active-lease view.
230
232
  ## HRM-style hierarchical planner (two-level reasoning loop)
231
233
 
232
234
  Inspired by the **Hierarchical Reasoning Model** (arXiv:2506.21734, JesseBrown1980/HRM), the loop
@@ -4,32 +4,34 @@ Moved out of `SKILL.md` § Bound operators as part of the #119 shrink (SKILL.md
4
4
  operator table, the preflight one-liner, and the BLOCK rule; this file has the full mechanics).
5
5
 
6
6
  This loop does NOT survey the repo with the LLM, and it does NOT hand-edit files with the LLM.
7
- Two installed CLIs are the operators; the model only DECIDES, the operators do. Both ship as
8
- hard dependencies of the `simplicio-loop` package (`pip install simplicio-loop` pulls them):
7
+ Two installed CLIs are the operators; the model only DECIDES, the operators do. The supported
8
+ install surface is the single operator package `simplicio-cli`, which exposes `simplicio-dev-cli`
9
+ and also brings `simplicio-mapper` transitively:
9
10
 
10
11
  | Operator | CLI (binary) | Binds | Role in the loop |
11
12
  |---|---|---|---|
12
13
  | **simplicio-mapper** | `simplicio-mapper` | `orient` / `recall` | **Survey** — maps the repo(s) into `.simplicio/*.json` (project-map, precedent-index, symbol-index, call-graph, docs). Two-tier (v0.9+): `macro` is an instant shallow skeleton (no content reads), `scan` returns that skeleton now and runs the deep index in the background, `status` reports the deep-pass phase. v0.13+ adds `inspect` (machine-readable evidence that the artifacts actually exist — the survey's own evidence gate) and `handoff` (a compact context-pack — files, symbols, deps, `pack_hash` — that feeds the goal instead of re-reading the tree). v0.14+ adds the flow-docs engine: `ask` (low-token structured queries over the artifacts), `sync --check`/`drift --check` (docs-staleness + spec-drift gates), `flows`/`survey`/`business`/`history`/`diff` (flow inventory, onboarding report, business rules, architecture history). This survey, not an ad-hoc LLM read, is what feeds the goal each turn. |
13
14
  | **simplicio-dev-cli** | `simplicio-dev-cli` | `execute` / `deterministic_edit` / `validate` / `diagnostics` | **Operate** — applies a DECIDED change through its 6-layer contract (mapper context → precedent → prompt → diff → test → verify, ≤3 retries). The CLI edits and verifies; the AI does not hand-write the diff. |
14
15
 
15
- **Preflight (MANDATORY, BLOCKING).** Before iteration 1, auto-update both operators to their latest
16
- release (so every run uses the newest `simplicio-mapper`/`simplicio-cli`), then confirm both are on
16
+ **Preflight (MANDATORY, BLOCKING).** Before iteration 1, auto-update the operator package to its
17
+ latest release (so every run uses the newest `simplicio-cli`-shipped `simplicio-mapper`/`simplicio-dev-cli`),
18
+ then confirm both runtime binaries are on
17
19
  PATH:
18
20
  ```bash
19
21
  # Always run the loop on the latest operators. FAIL-OPEN: offline / no-pip / a pin keeps the
20
22
  # currently-installed build; this never blocks. Runs ONCE per loop preflight, not per turn.
21
- python3 -m pip install -qU simplicio-mapper simplicio-cli 2>/dev/null \
22
- || python3 -m pip install -qU --user --break-system-packages simplicio-mapper simplicio-cli 2>/dev/null || true
23
- simplicio-mapper --version # survey operator (now latest)
23
+ python3 -m pip install -qU simplicio-cli 2>/dev/null \
24
+ || python3 -m pip install -qU --user --break-system-packages simplicio-cli 2>/dev/null || true
25
+ simplicio-mapper --version # survey operator (expected transitively from simplicio-cli)
24
26
  simplicio-dev-cli --help # action operator (pkg simplicio-cli; exposes `simplicio-dev-cli`)
25
27
  ```
26
28
  The auto-update is best-effort and offline-safe — a network/pip failure leaves the working version
27
29
  in place and the loop proceeds. The action binary is `simplicio-dev-cli` (from `pip install simplicio-cli`) — NOT the bare
28
30
  `simplicio`, which is reserved for the separate `simplicio-runtime` and is not what this loop
29
31
  binds. `simplicio-dev-cli` has no `--version` subcommand; `--help` exiting 0 is the readiness
30
- proof. If either operator is missing, do NOT fall back to LLM survey/editing — STOP and emit
31
- `simplicio-loop: BLOCKED — missing operator <name>; run: pip install simplicio-loop` (the install
32
- re-pulls `simplicio-mapper` + `simplicio-cli`). This requirement is scoped to the loop drive.
32
+ proof. If either runtime binary is missing, do NOT fall back to LLM survey/editing — STOP and emit
33
+ `simplicio-loop: BLOCKED — missing operator <name>; run: pip install simplicio-cli`. This requirement
34
+ is scoped to the loop drive.
33
35
 
34
36
  **Survey step (each loop start + on any structural change).** Prefer the two-tier flow (v0.9+):
35
37
  `simplicio-mapper scan . --json` returns an instant `macro` skeleton AND kicks the deep index off in
@@ -95,7 +97,7 @@ merge/close gates); the operators do survey + apply:
95
97
 
96
98
  | Phase | Operator | Command |
97
99
  |---|---|---|
98
- | Preflight (before iteration 1) | both | `python3 -m pip install -qU simplicio-mapper simplicio-cli` (auto-update to latest, fail-open) → `simplicio-mapper --version` · `simplicio-dev-cli --help` → BLOCK if missing |
100
+ | Preflight (before iteration 1) | both | `python3 -m pip install -qU simplicio-cli` (auto-update to latest, fail-open) → `simplicio-mapper --version` · `simplicio-dev-cli --help` → BLOCK if either runtime bin is missing |
99
101
  | Survey (loop start; multi-repo: per root) | mapper | `simplicio-mapper scan . --json` (instant macro + deep index in background; `--sync`/`--await` to block) → `.simplicio/*.json`. `index . --json` for a forced synchronous build. Gate: `inspect . --json` (artifacts exist on disk) → feed goal: `handoff . --for-llm toon` (context-pack, TOON-rendered; `--json` fallback + logged reason if the installed mapper predates `--for-llm`) |
100
102
  | Loop contract step 2 — Triage (every turn) | mapper | `simplicio-mapper handoff . --for-llm toon` → work from the `context_pack` (symbols/deps/recent_changes); `ask . impact\|tests-for\|callers <arg> --json` for targeted questions; `macro . --json` for an instant skeleton, or `scan`/`status` + `inspect` to refresh/re-gate if the tree changed |
101
103
  | Verify / DoD pass | mapper | `simplicio-mapper sync . --check --json` (stale generated docs) + `drift . --check --json` (spec↔code drift) — findings go in the turn report; BLOCK only when the AC itself is documentation |