1bcoder 0.1.29__tar.gz → 0.1.31__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 (169) hide show
  1. {1bcoder-0.1.29 → 1bcoder-0.1.31}/1bcoder.egg-info/PKG-INFO +1 -1
  2. {1bcoder-0.1.29 → 1bcoder-0.1.31}/1bcoder.egg-info/SOURCES.txt +11 -0
  3. {1bcoder-0.1.29 → 1bcoder-0.1.31}/PKG-INFO +1 -1
  4. 1bcoder-0.1.31/_bcoder_data/flows/__pycache__/deepagent_architect.cpython-312.pyc +0 -0
  5. 1bcoder-0.1.31/_bcoder_data/flows/__pycache__/deepagent_code.cpython-312.pyc +0 -0
  6. 1bcoder-0.1.31/_bcoder_data/flows/__pycache__/deepagent_md.cpython-312.pyc +0 -0
  7. 1bcoder-0.1.31/_bcoder_data/flows/__pycache__/deepagent_spec.cpython-312.pyc +0 -0
  8. 1bcoder-0.1.31/_bcoder_data/flows/__pycache__/deepagent_task.cpython-312.pyc +0 -0
  9. 1bcoder-0.1.31/_bcoder_data/flows/__pycache__/deepagent_tree.cpython-312.pyc +0 -0
  10. 1bcoder-0.1.31/_bcoder_data/flows/__pycache__/deepagent_tree_md.cpython-312.pyc +0 -0
  11. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent_architect.py +280 -49
  12. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent_md.py +91 -8
  13. 1bcoder-0.1.31/_bcoder_data/flows/deepagent_tree.py +2041 -0
  14. 1bcoder-0.1.31/_bcoder_data/flows/deepagent_tree_md.py +1967 -0
  15. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/rag.py +4 -1
  16. 1bcoder-0.1.31/_bcoder_data/scripts/deepagent_tree_spec_task.txt +20 -0
  17. 1bcoder-0.1.31/_bcoder_data/scripts/deepagent_treemd_spec_task.txt +20 -0
  18. {1bcoder-0.1.29 → 1bcoder-0.1.31}/pyproject.toml +1 -1
  19. {1bcoder-0.1.29 → 1bcoder-0.1.31}/1bcoder.egg-info/dependency_links.txt +0 -0
  20. {1bcoder-0.1.29 → 1bcoder-0.1.31}/1bcoder.egg-info/entry_points.txt +0 -0
  21. {1bcoder-0.1.29 → 1bcoder-0.1.31}/1bcoder.egg-info/requires.txt +0 -0
  22. {1bcoder-0.1.29 → 1bcoder-0.1.31}/1bcoder.egg-info/top_level.txt +0 -0
  23. {1bcoder-0.1.29 → 1bcoder-0.1.31}/LICENSE +0 -0
  24. {1bcoder-0.1.29 → 1bcoder-0.1.31}/README.md +0 -0
  25. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/__init__.py +0 -0
  26. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/advance.txt +0 -0
  27. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/ask.txt +0 -0
  28. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/coder.txt +0 -0
  29. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/codex.txt +0 -0
  30. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/compact.txt +0 -0
  31. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/concepts.txt +0 -0
  32. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/fill.txt +0 -0
  33. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/planning.txt +0 -0
  34. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/research.txt +0 -0
  35. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/scan.txt +0 -0
  36. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/sqlite.txt +0 -0
  37. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/terminator.txt +0 -0
  38. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/agents/websearch.txt +0 -0
  39. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/aliases.txt +0 -0
  40. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/ctxtimer/base_prompt.txt +0 -0
  41. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/java_decompose.txt +0 -0
  42. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/java_implement.txt +0 -0
  43. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/js_decompose.txt +0 -0
  44. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/js_implement.txt +0 -0
  45. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/kt_decompose.txt +0 -0
  46. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/kt_implement.txt +0 -0
  47. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/mysql_decompose.txt +0 -0
  48. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/mysql_implement.txt +0 -0
  49. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/plsql_decompose.txt +0 -0
  50. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/plsql_implement.txt +0 -0
  51. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/py_decompose.txt +0 -0
  52. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/py_implement.txt +0 -0
  53. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/scala_decompose.txt +0 -0
  54. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/scala_implement.txt +0 -0
  55. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/sql_decompose.txt +0 -0
  56. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/deepagent_code/sql_implement.txt +0 -0
  57. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/doc/FLOWS.md +0 -0
  58. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/doc/MCP.md +0 -0
  59. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/doc/OLLAMA_SERVER_PARAM.md +0 -0
  60. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/doc/PARAM.md +0 -0
  61. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/doc/PROC.md +0 -0
  62. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/doc/TRANSLATE.md +0 -0
  63. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/commit_message.py +0 -0
  64. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/compress.py +0 -0
  65. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/ctxtimer.py +0 -0
  66. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent.py +0 -0
  67. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent_code.py +0 -0
  68. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent_merge.py +0 -0
  69. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent_spec.py +0 -0
  70. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent_task.py +0 -0
  71. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent_test.py +0 -0
  72. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deepagent_translate.py +0 -0
  73. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/deobfuscate.py +0 -0
  74. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/external_help.py +0 -0
  75. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/glossary.py +0 -0
  76. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/grounding.py +0 -0
  77. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/history.py +0 -0
  78. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/interview.py +0 -0
  79. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/obfuscate.py +0 -0
  80. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/py_error_trace.py +0 -0
  81. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/scan.py +0 -0
  82. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/simargl_files.py +0 -0
  83. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/visual_search.py +0 -0
  84. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/webanalys.py +0 -0
  85. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/webask.py +0 -0
  86. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/webcrawl.py +0 -0
  87. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/flows/webindex.py +0 -0
  88. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/map.txt +0 -0
  89. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/action-required.py +0 -0
  90. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/add-save.py +0 -0
  91. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/assist.py +0 -0
  92. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/autobkup.py +0 -0
  93. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/autocheck.py +0 -0
  94. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/collect-files.py +0 -0
  95. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/ctx_cut.py +0 -0
  96. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/ctx_expand.py +0 -0
  97. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/expr_gate.py +0 -0
  98. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/extract-code.py +0 -0
  99. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/extract-files.py +0 -0
  100. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/extract-list.py +0 -0
  101. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/grounding-check.py +0 -0
  102. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/ladder.py +0 -0
  103. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/md.py +0 -0
  104. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/mdx.py +0 -0
  105. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/pattern-gate.py +0 -0
  106. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/radogast-gate.py +0 -0
  107. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/regexp-extract.py +0 -0
  108. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/rude_words.py +0 -0
  109. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/scan-save.py +0 -0
  110. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/secret_check.py +0 -0
  111. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/sql_readonly_guard.py +0 -0
  112. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/tempctx-cut.py +0 -0
  113. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/proc/tool-allowlist-gate.py +0 -0
  114. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/profiles.txt +0 -0
  115. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/prompts/analysis.txt +0 -0
  116. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/prompts/sumarise.txt +0 -0
  117. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/prompts.txt +0 -0
  118. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/AddFunction.txt +0 -0
  119. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/AskProject.txt +0 -0
  120. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/CheckRequirements.txt +0 -0
  121. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/DockerMySQL.txt +0 -0
  122. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/DockerNginx.txt +0 -0
  123. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/DockerPython.txt +0 -0
  124. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/DockerStack.txt +0 -0
  125. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/DuckDuckGoInstant.txt +0 -0
  126. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/EnvTemplate.txt +0 -0
  127. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/Explain.txt +0 -0
  128. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/ExploreProjectStructure.txt +0 -0
  129. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/GitIgnorePython.txt +0 -0
  130. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/MySQLDump.txt +0 -0
  131. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/NewScript.txt +0 -0
  132. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/PipFreeze.txt +0 -0
  133. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/PyPI.txt +0 -0
  134. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/Refactor.txt +0 -0
  135. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/RunAndFix.txt +0 -0
  136. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/SQLiteSchema.txt +0 -0
  137. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/SqlSelectGate.txt +0 -0
  138. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/SystemQueryRouter.txt +0 -0
  139. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/Translate.txt +0 -0
  140. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/WikiPage.txt +0 -0
  141. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/WikiSearch.txt +0 -0
  142. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/auto-bkup.txt +0 -0
  143. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/deepagent_implement.txt +0 -0
  144. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/deepagent_loop.txt +0 -0
  145. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/deepagent_next.txt +0 -0
  146. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/deepagent_plan.txt +0 -0
  147. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/deepagent_spec_task.txt +0 -0
  148. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/edit-control.txt +0 -0
  149. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/parallel_call.txt +0 -0
  150. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/personal/content/create-regular-content.txt +0 -0
  151. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/personal/content/plan.txt +0 -0
  152. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/personal/test/collect-data-from-test-environment.txt +0 -0
  153. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/plan.txt +0 -0
  154. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/remote/create-content-on-remote-server.txt +0 -0
  155. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/set_ctx.txt +0 -0
  156. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/simargl-cli_index_files.txt +0 -0
  157. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/simargl-cli_index_units.txt +0 -0
  158. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/simargl-cli_search.txt +0 -0
  159. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/team-map-worker.txt +0 -0
  160. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/team-search-worker.txt +0 -0
  161. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/team-summarize.txt +0 -0
  162. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/team-tree-worker.txt +0 -0
  163. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/scripts/test.txt +0 -0
  164. {1bcoder-0.1.29 → 1bcoder-0.1.31}/_bcoder_data/teams/code-analysis.yaml +0 -0
  165. {1bcoder-0.1.29 → 1bcoder-0.1.31}/chat.py +0 -0
  166. {1bcoder-0.1.29 → 1bcoder-0.1.31}/map_index.py +0 -0
  167. {1bcoder-0.1.29 → 1bcoder-0.1.31}/map_query.py +0 -0
  168. {1bcoder-0.1.29 → 1bcoder-0.1.31}/setup.cfg +0 -0
  169. {1bcoder-0.1.29 → 1bcoder-0.1.31}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: 1bcoder
3
- Version: 0.1.29
3
+ Version: 0.1.31
4
4
  Summary: AI coding assistant agent for 1B–7B local models (Ollama, LMStudio, llama.cpp). Terminal REPL with file editing, project map, agents, scripts, and parallel multi-model queries.
5
5
  Project-URL: Homepage, https://github.com/szholobetsky/1bcoder
6
6
  Project-URL: Repository, https://github.com/szholobetsky/1bcoder
@@ -63,6 +63,8 @@ _bcoder_data/flows/deepagent_spec.py
63
63
  _bcoder_data/flows/deepagent_task.py
64
64
  _bcoder_data/flows/deepagent_test.py
65
65
  _bcoder_data/flows/deepagent_translate.py
66
+ _bcoder_data/flows/deepagent_tree.py
67
+ _bcoder_data/flows/deepagent_tree_md.py
66
68
  _bcoder_data/flows/deobfuscate.py
67
69
  _bcoder_data/flows/external_help.py
68
70
  _bcoder_data/flows/glossary.py
@@ -79,6 +81,13 @@ _bcoder_data/flows/webanalys.py
79
81
  _bcoder_data/flows/webask.py
80
82
  _bcoder_data/flows/webcrawl.py
81
83
  _bcoder_data/flows/webindex.py
84
+ _bcoder_data/flows/__pycache__/deepagent_architect.cpython-312.pyc
85
+ _bcoder_data/flows/__pycache__/deepagent_code.cpython-312.pyc
86
+ _bcoder_data/flows/__pycache__/deepagent_md.cpython-312.pyc
87
+ _bcoder_data/flows/__pycache__/deepagent_spec.cpython-312.pyc
88
+ _bcoder_data/flows/__pycache__/deepagent_task.cpython-312.pyc
89
+ _bcoder_data/flows/__pycache__/deepagent_tree.cpython-312.pyc
90
+ _bcoder_data/flows/__pycache__/deepagent_tree_md.cpython-312.pyc
82
91
  _bcoder_data/proc/action-required.py
83
92
  _bcoder_data/proc/add-save.py
84
93
  _bcoder_data/proc/assist.py
@@ -136,6 +145,8 @@ _bcoder_data/scripts/deepagent_loop.txt
136
145
  _bcoder_data/scripts/deepagent_next.txt
137
146
  _bcoder_data/scripts/deepagent_plan.txt
138
147
  _bcoder_data/scripts/deepagent_spec_task.txt
148
+ _bcoder_data/scripts/deepagent_tree_spec_task.txt
149
+ _bcoder_data/scripts/deepagent_treemd_spec_task.txt
139
150
  _bcoder_data/scripts/edit-control.txt
140
151
  _bcoder_data/scripts/parallel_call.txt
141
152
  _bcoder_data/scripts/plan.txt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: 1bcoder
3
- Version: 0.1.29
3
+ Version: 0.1.31
4
4
  Summary: AI coding assistant agent for 1B–7B local models (Ollama, LMStudio, llama.cpp). Terminal REPL with file editing, project map, agents, scripts, and parallel multi-model queries.
5
5
  Project-URL: Homepage, https://github.com/szholobetsky/1bcoder
6
6
  Project-URL: Repository, https://github.com/szholobetsky/1bcoder
@@ -76,6 +76,21 @@ comma-separated list of level names to force out regardless of research
76
76
  evidence (only "abstract" is meaningful to skip in practice -- interface/
77
77
  approach/class are not optional in v1).
78
78
 
79
+ --noposition: disable the "Ticket <key> pipeline: interface->abstract->
80
+ approach->class. So far: interface="X", ... You are now at: <level> (step N
81
+ of M)" breadcrumb normally added to every research question and design
82
+ decision. Without it, each level only ever sees the previous level's raw
83
+ decision text as an isolated "Task/need" -- no explicit sense of how many
84
+ design stages exist, which already ran, or whether this is the last one (the
85
+ same missing-positional-awareness gap deepagent_md/deepagent_tree had; see
86
+ DEEPAGENT_SPEC.md). On by default.
87
+
88
+ --finalize ["<text>"]: opt-in. At the LAST active level in the pipeline
89
+ (normally "class", or whichever level --skip leaves as the final one),
90
+ append a universal "this is the last design step before deepagent_code"
91
+ instruction, plus <text> as well if given (never replaces the universal
92
+ one). Off by default.
93
+
79
94
  --next / --loop: pick the next open (not "[x]") row from tasks.md instead of
80
95
  a caller-supplied task_id. Before starting work on a ticket, it is claimed
81
96
  by atomically creating .1bcoder/arch/<plan>/<id>/.claim (os.O_EXCL -- fails
@@ -117,6 +132,7 @@ def _load(name: str, filename: str):
117
132
  _dspec = _load("_dspec", "deepagent_spec.py")
118
133
  _dcode = _load("_dcode", "deepagent_code.py")
119
134
  _dtask = _load("_dtask", "deepagent_task.py")
135
+ _dmd = _load("_dmd", "deepagent_md.py")
120
136
 
121
137
  _CLAIM_STALE_SECONDS = 60 * 60 # 1 hour -- abandoned claim, safe to re-take
122
138
 
@@ -250,6 +266,47 @@ _DECIDE_SYSTEM = {
250
266
  ),
251
267
  }
252
268
 
269
+ _DEFAULT_FINALIZE_TEXT = (
270
+ "This is the last design step in this ticket's pipeline, before delegating "
271
+ "to deepagent_code for actual method implementation -- the class shape you "
272
+ "decide here must be complete and concrete enough to implement directly, "
273
+ "with no ambiguity left for a level that doesn't exist after this one."
274
+ )
275
+
276
+
277
+ def _build_position_line(task_key: str, level: str, pipeline: list, active_levels: list) -> str:
278
+ """Breadcrumb across this ticket's fixed interface->abstract->approach->class
279
+ pipeline, e.g.:
280
+ 'Ticket "task_key" pipeline: interface->abstract->approach->class. So far:
281
+ interface="UserRepository", abstract=SKIPPED, approach="JPA-based lookup".
282
+ You are now at: class (step 4 of 4).'
283
+
284
+ Without this, the model sees each level's decision only as an isolated
285
+ "Task/need" handed to it fresh -- it has no explicit sense of how many
286
+ stages exist, which have already run, or whether it's the last one.
287
+ Plausibly the same underlying gap DEEPAGENT_SPEC.md's own finding
288
+ describes for deepagent_md's tree (the model never stops subdividing on
289
+ its own, because it's never told where it stands) -- here it manifests
290
+ as not knowing whether more design levels are still coming after this
291
+ one. `active_levels` (already tracked by _run_one for interface_name/
292
+ abstract_name inheritance) supplies each prior level's own gist for
293
+ free -- no extra parsing pass needed."""
294
+ done_bits = []
295
+ for lvl, _nid, dec in active_levels:
296
+ if lvl == "abstract" and dec.strip().upper().startswith("SKIP"):
297
+ done_bits.append(f"{lvl}=SKIPPED")
298
+ continue
299
+ if _is_reuse(dec):
300
+ done_bits.append(f"{lvl}=REUSE")
301
+ continue
302
+ gist = _parse_field(dec, "CHOSEN") if lvl == "approach" else _parse_field(dec, "NAME")
303
+ done_bits.append(f'{lvl}="{gist or "?"}"')
304
+ step_idx = pipeline.index(level) + 1 if level in pipeline else "?"
305
+ so_far = ("So far: " + ", ".join(done_bits) + ". ") if done_bits else ""
306
+ return (f'Ticket "{task_key}" pipeline: {"->".join(pipeline)}. {so_far}'
307
+ f'You are now at: {level} (step {step_idx} of {len(pipeline)}).')
308
+
309
+
253
310
  _METHOD_LINE_RE = _re.compile(
254
311
  r'^([A-Za-z_][A-Za-z0-9_]*)\(([^)]*)\)\s*(?:->\s*(\S+))?\s*(?:#\s*(.*))?$'
255
312
  )
@@ -282,7 +339,19 @@ def _run_research_agent(chat, question: str) -> str:
282
339
  start fresh, not accumulate across nodes or carry the user's unrelated
283
340
  conversation). Gated by tool-allowlist-gate so the read-only guarantee is
284
341
  enforced, not just documented in tools=. Returns the agent's last
285
- assistant message (its findings report)."""
342
+ assistant message (its findings report).
343
+
344
+ The old monkeypatch answered EVERY _input() call with "n", not just the
345
+ natural-completion one -- including _run_agent_loop's own Ctrl+C
346
+ "Response interrupted. Retry current turn? [Y/n/q]:" prompt, which meant
347
+ an interrupted research turn was silently auto-skipped and the loop just
348
+ kept going, "q" could never actually be chosen, and the user never saw
349
+ the prompt at all. _headless_input below only intercepts the
350
+ add-to-context prompt; everything else -- in particular the interrupt
351
+ retry/comment prompts -- reaches the real terminal, and a real "q" there
352
+ raises _StopGeneration (same convention as deepagent_code/deepagent_md)
353
+ so the whole /flow deepagent_architect run stops instead of silently
354
+ moving on to the next level."""
286
355
  path = chat._find_agent_def("research")
287
356
  if not path:
288
357
  return ("[deepagent_architect] 'research' agent not found -- "
@@ -306,7 +375,17 @@ def _run_research_agent(chat, question: str) -> str:
306
375
  chat._aliases.update(cfg["aliases"])
307
376
 
308
377
  orig_input = mod._input
309
- mod._input = lambda prompt="": "n"
378
+ quit_requested = []
379
+
380
+ def _headless_input(prompt: str = "") -> str:
381
+ if prompt.strip().startswith("Add to main context?"):
382
+ return "n"
383
+ ans = orig_input(prompt)
384
+ if prompt.strip().startswith("Response interrupted") and ans.strip().lower().startswith("q"):
385
+ quit_requested.append(True)
386
+ return ans
387
+
388
+ mod._input = _headless_input
310
389
  try:
311
390
  chat._run_agent_loop("research", agent_msgs, cfg["max_turns"],
312
391
  auto_exec=True, auto_apply=True, use_procs=True)
@@ -315,6 +394,9 @@ def _run_research_agent(chat, question: str) -> str:
315
394
  (chat._proc_active, chat._proc_before,
316
395
  chat._proc_gates, chat._proc_gates_post, chat._aliases) = saved
317
396
 
397
+ if quit_requested:
398
+ raise _dcode._StopGeneration()
399
+
318
400
  for m in reversed(agent_msgs):
319
401
  if m["role"] == "assistant":
320
402
  return m["content"]
@@ -322,19 +404,38 @@ def _run_research_agent(chat, question: str) -> str:
322
404
 
323
405
 
324
406
  def _decide(chat, level: str, task_text: str, research_findings: str,
325
- lang: str = "py") -> str:
326
- """Second call: propose the actual design, given research findings."""
407
+ lang: str = "py", label: str = "", extra_ctx: str = "") -> str:
408
+ """Second call: propose the actual design, given research findings.
409
+
410
+ Same interrupted/failed-call handling as every other deepagent_* LLM
411
+ call (deepagent_code._on_interrupt / _StopGeneration): a Ctrl+C or an
412
+ empty/network-error reply gets the normal retry-with-comment/skip/quit
413
+ choice instead of silently falling through with an empty decision
414
+ string -- which used to corrupt every level after it (parent_task_text
415
+ becomes "", NAME:/METHODS: fields all parse empty, etc., see _run_one)."""
327
416
  system = _DECIDE_SYSTEM[level]
328
417
  if level in ("interface", "abstract", "class"):
329
- hint = _LANG_TYPE_HINTS.get(lang, _LANG_TYPE_HINTS["py"])
330
- system += f"\nWrite every method's args and return type using {hint}.\n"
418
+ type_hint = _LANG_TYPE_HINTS.get(lang, _LANG_TYPE_HINTS["py"])
419
+ system += f"\nWrite every method's args and return type using {type_hint}.\n"
331
420
  user = (
332
421
  f"Task/need:\n{task_text}\n\n"
333
422
  f"Research findings:\n{research_findings}\n\n"
334
- f"Now produce your {level} design in exactly the form described above."
423
+ + (f"{extra_ctx}\n\n" if extra_ctx else "")
424
+ + f"Now produce your {level} design in exactly the form described above."
335
425
  )
336
- msgs = [{"role": "system", "content": system}, {"role": "user", "content": user}]
337
- return (chat._stream_chat(msgs) or "").strip()
426
+ while True:
427
+ msgs = [{"role": "system", "content": system}, {"role": "user", "content": user}]
428
+ result = (chat._stream_chat(msgs) or "").strip()
429
+ if result:
430
+ return result
431
+ action = _dcode._on_interrupt(label or f"{level} decide")
432
+ if action == 'quit':
433
+ raise _dcode._StopGeneration()
434
+ if action == 'skip':
435
+ return ""
436
+ note = action.split(':', 1)[1]
437
+ if note:
438
+ user += f"\n\nAdditional instruction: {note}"
338
439
 
339
440
 
340
441
  # ── parsing helpers ───────────────────────────────────────────────────────────
@@ -763,12 +864,45 @@ def _leaf_done_path(arch_dir: str, leaf_id: str) -> str:
763
864
  return _os.path.join(arch_dir, f"leaf_{leaf_id}.done")
764
865
 
765
866
 
867
+ def _row_title(plan_name: str, task_id: str) -> str:
868
+ """Look up a tasks.md row's own title text for task_id (the part after
869
+ 'plan-<id>. ' and before any '+tag' markers), reusing deepagent_task's
870
+ row regex. Last-resort fallback source in _resolve_root_task, below
871
+ even the planMD item -- a title alone still beats the bare digits."""
872
+ tasks_path = _dtask._tasks_path(_plan_dir(plan_name))
873
+ if not _os.path.isfile(tasks_path):
874
+ return ""
875
+ with open(tasks_path, encoding="utf-8") as f:
876
+ for line in f:
877
+ m = _dtask._ROW_RE.match(line.strip())
878
+ if m and m.group(2) == task_id:
879
+ return m.group(3).strip()
880
+ return ""
881
+
882
+
766
883
  def _resolve_root_task(plan_name: str, task_arg: str) -> str:
767
- """If task_arg is a bare dotted id (e.g. "3.2"), read spec_<id>.<n>.md
768
- files for that leaf as the root task description; otherwise task_arg
769
- itself is the literal task text."""
770
- if _re.match(r'^[0-9]+(\.[0-9]+)*$', task_arg.strip()):
771
- plan_dir = _os.path.join(_os.getcwd(), ".1bcoder", "planMD", plan_name)
884
+ """If task_arg is a bare dotted id (e.g. "3.2"), resolve it to real task
885
+ text instead of ever using the bare digits verbatim. Resolution order:
886
+ 1. spec_<id>.<n>.md (deepagent_spec output) -- richest, but only
887
+ exists for LEAF ids (deepagent_spec never writes specs for
888
+ epic/section nodes that have children).
889
+ 2. planMD's own item_<id>.md (deepagent_md's node content) -- exists
890
+ for every node, leaf or not, so this is what backs a non-leaf id.
891
+ 3. the tasks.md row's own title text.
892
+
893
+ Falling through all three used to silently return task_arg itself --
894
+ hit in production: --loop claimed epic id "1" (tasks.md's ids include
895
+ every row, not just leaves, and "1" sorts before "1.1"/"1.1.1"/...) and
896
+ handed the research agent literally the text "1" as its task, which it
897
+ then couldn't ground in anything and wandered off into an unrelated
898
+ file in the repo. _open_task_ids now filters --next/--loop to leaves
899
+ only, but this fallback chain also protects a manually-typed non-leaf
900
+ id (e.g. `/flow deepagent_architect plan1 1`) from the same failure --
901
+ only the true last resort (nothing found anywhere) still returns the
902
+ bare id, now with a loud warning instead of silent corruption."""
903
+ task_arg = task_arg.strip()
904
+ if _re.match(r'^[0-9]+(\.[0-9]+)*$', task_arg):
905
+ plan_dir = _plan_dir(plan_name)
772
906
  spec_dir = _dspec._default_spec_dir(plan_dir)
773
907
  if _os.path.isdir(spec_dir):
774
908
  parts = []
@@ -782,6 +916,18 @@ def _resolve_root_task(plan_name: str, task_arg: str) -> str:
782
916
  i += 1
783
917
  if parts:
784
918
  return "\n\n".join(parts)
919
+ item_path = _dmd._item_path(plan_dir, task_arg)
920
+ if _os.path.isfile(item_path):
921
+ with open(item_path, encoding="utf-8") as f:
922
+ content = f.read().strip()
923
+ if content:
924
+ return content
925
+ title = _row_title(plan_name, task_arg)
926
+ if title:
927
+ return title
928
+ print(f"[deepagent_architect] WARNING: no spec, planMD item, or tasks.md "
929
+ f"title found for id '{task_arg}' -- falling back to the bare id "
930
+ f"as task text, which is almost certainly wrong")
785
931
  return task_arg
786
932
 
787
933
 
@@ -792,24 +938,38 @@ def _plan_dir(plan_name: str) -> str:
792
938
 
793
939
 
794
940
  def _open_task_ids(plan_name: str) -> list:
795
- """Ordered (numeric-tuple sort) list of tasks.md row ids not marked
796
- done ('[x]'). Reuses deepagent_task's own row regex directly instead of
797
- re-deriving it, so both stay in sync if the tasks.md format ever
798
- changes."""
941
+ """Ordered (numeric-tuple sort) list of LEAF tasks.md row ids not marked
942
+ done ('[x]') -- 'leaf' meaning no other row's id starts with '<id>.',
943
+ the same definition deepagent_spec uses for its own leaf selection.
944
+ Reuses deepagent_task's own row regex directly instead of re-deriving
945
+ it, so both stay in sync if the tasks.md format ever changes.
946
+
947
+ Non-leaf (epic/section) ids are deliberately excluded here: they have
948
+ no spec_<id>.<n>.md (deepagent_spec only writes specs for leaves), so
949
+ handing one to _run_one used to fall through _resolve_root_task all the
950
+ way to the bare id string. Real production hit: --loop claimed epic id
951
+ "1" first -- ids sort "1" < "1.1" < "1.1.1" < ... so the coarsest,
952
+ least-atomic row always wins the numeric sort -- and the research agent
953
+ got literally the text "1" as its task."""
799
954
  tasks_path = _dtask._tasks_path(_plan_dir(plan_name))
800
955
  if not _os.path.isfile(tasks_path):
801
956
  return []
802
- ids = []
957
+ all_ids = []
958
+ open_ids = []
803
959
  with open(tasks_path, encoding="utf-8") as f:
804
960
  for line in f:
805
961
  m = _dtask._ROW_RE.match(line.strip())
806
962
  if not m:
807
963
  continue
808
964
  mark, tid = m.group(1), m.group(2)
965
+ all_ids.append(tid)
809
966
  if mark != "x":
810
- ids.append(tid)
811
- ids.sort(key=lambda x: tuple(int(p) for p in x.split(".")))
812
- return ids
967
+ open_ids.append(tid)
968
+ all_ids_set = set(all_ids)
969
+ leaf_ids = [tid for tid in open_ids
970
+ if not any(other.startswith(tid + ".") for other in all_ids_set)]
971
+ leaf_ids.sort(key=lambda x: tuple(int(p) for p in x.split(".")))
972
+ return leaf_ids
813
973
 
814
974
 
815
975
  def _claim_path(arch_dir: str) -> str:
@@ -869,7 +1029,8 @@ def _release_claim(arch_dir: str):
869
1029
  # ── entry point ───────────────────────────────────────────────────────────────
870
1030
 
871
1031
  def _run_one(chat, plan_name: str, task_arg: str, lang: str, skip_levels: set,
872
- arch_dir: str = None) -> bool:
1032
+ arch_dir: str = None, noposition: bool = False,
1033
+ finalize_text: str = None) -> bool:
873
1034
  """Run the full interface->abstract->approach->class->leaf chain for ONE
874
1035
  ticket. Returns True on success (a class + at least one method were
875
1036
  produced), False otherwise -- callers (--next/--loop) use this to decide
@@ -888,6 +1049,8 @@ def _run_one(chat, plan_name: str, task_arg: str, lang: str, skip_levels: set,
888
1049
  if skip_levels:
889
1050
  print(f"[deepagent_architect] skip : {', '.join(sorted(skip_levels))}")
890
1051
 
1052
+ pipeline = [lvl for lvl in LEVELS if lvl not in skip_levels]
1053
+
891
1054
  node_id = "1"
892
1055
  first_level = True
893
1056
  parent_task_text = root_task
@@ -905,15 +1068,25 @@ def _run_one(chat, plan_name: str, task_arg: str, lang: str, skip_levels: set,
905
1068
 
906
1069
  print(f"\n[deepagent_architect] === {level} ({node_id}) ===")
907
1070
 
1071
+ extra_parts = []
1072
+ if not noposition:
1073
+ extra_parts.append(_build_position_line(task_key, level, pipeline, active_levels))
1074
+ if finalize_text and level == pipeline[-1]:
1075
+ extra_parts.append(finalize_text)
1076
+ extra_ctx = "\n\n".join(extra_parts)
1077
+
908
1078
  if _os.path.isfile(_item_path(arch_dir, node_id)):
909
1079
  print(f"[deepagent_architect] [resume] {node_id} already exists -- skipping")
910
1080
  decision = _read_node_decision(arch_dir, node_id)
911
1081
  else:
912
1082
  question = _RESEARCH_QUESTIONS[level].format(task=parent_task_text)
1083
+ if extra_ctx:
1084
+ question += f"\n\n{extra_ctx}"
913
1085
  print("[deepagent_architect] researching...")
914
1086
  research = _run_research_agent(chat, question)
915
1087
 
916
- decision = _decide(chat, level, parent_task_text, research, lang=lang)
1088
+ decision = _decide(chat, level, parent_task_text, research, lang=lang,
1089
+ label=f"{level} decide ({node_id})", extra_ctx=extra_ctx)
917
1090
  _write_node(arch_dir, node_id, level, research, decision)
918
1091
  print(f"[deepagent_architect] wrote item_{node_id}.md")
919
1092
 
@@ -979,7 +1152,14 @@ def _run_one(chat, plan_name: str, task_arg: str, lang: str, skip_levels: set,
979
1152
  "actual concrete class now; do not output REUSE again for "
980
1153
  "that same file."
981
1154
  )
982
- class_decision = _decide(chat, "class", parent_task_text, class_research, lang=lang)
1155
+ retry_extra_parts = []
1156
+ if not noposition:
1157
+ retry_extra_parts.append(_build_position_line(task_key, "class", pipeline, active_levels))
1158
+ if finalize_text:
1159
+ retry_extra_parts.append(finalize_text)
1160
+ class_decision = _decide(chat, "class", parent_task_text, class_research, lang=lang,
1161
+ label=f"class decide ({class_id}) retry",
1162
+ extra_ctx="\n\n".join(retry_extra_parts))
983
1163
  _write_node(arch_dir, class_id, "class", class_research, class_decision)
984
1164
  print(f"[deepagent_architect] rewrote item_{class_id}.md")
985
1165
  if _is_reuse(class_decision) and not _reuse_target_is_stub(class_decision):
@@ -1037,12 +1217,19 @@ def _run_one(chat, plan_name: str, task_arg: str, lang: str, skip_levels: set,
1037
1217
  return True
1038
1218
 
1039
1219
 
1040
- def _run_next(chat, plan_name: str, lang: str, skip_levels: set) -> bool:
1220
+ def _run_next(chat, plan_name: str, lang: str, skip_levels: set,
1221
+ noposition: bool = False, finalize_text: str = None) -> bool:
1041
1222
  """Claim and process exactly one not-yet-taken ticket from tasks.md.
1042
1223
  Returns True if a ticket was processed (successfully or not -- see
1043
1224
  _run_one's own success printout), False if none were available (empty
1044
1225
  backlog, or every remaining ticket is already claimed by another live
1045
- process)."""
1226
+ process).
1227
+
1228
+ A user-chosen "quit" at any interrupt prompt inside _run_one raises
1229
+ _dcode._StopGeneration -- caught here just long enough to release the
1230
+ ticket's claim (so it can be resumed/retaken later) and print a status
1231
+ line, then re-raised so --loop's caller stops instead of moving on to
1232
+ claim the next ticket."""
1046
1233
  ids = _open_task_ids(plan_name)
1047
1234
  if not ids:
1048
1235
  print(f"[deepagent_architect] no open tickets in {plan_name}'s tasks.md")
@@ -1052,32 +1239,43 @@ def _run_next(chat, plan_name: str, lang: str, skip_levels: set) -> bool:
1052
1239
  if not _try_claim(arch_dir):
1053
1240
  continue
1054
1241
  print(f"[deepagent_architect] claimed ticket {tid} (pid {_os.getpid()})")
1055
- ok = False
1056
1242
  try:
1057
- ok = _run_one(chat, plan_name, tid, lang, skip_levels, arch_dir=arch_dir)
1058
- finally:
1059
- if ok:
1060
- _mark_done(arch_dir)
1061
- print(f"[deepagent_architect] ticket {tid} done")
1062
- else:
1063
- _release_claim(arch_dir)
1064
- print(f"[deepagent_architect] ticket {tid} did not complete "
1065
- f"-- claim released for retry")
1243
+ ok = _run_one(chat, plan_name, tid, lang, skip_levels, arch_dir=arch_dir,
1244
+ noposition=noposition, finalize_text=finalize_text)
1245
+ except _dcode._StopGeneration:
1246
+ _release_claim(arch_dir)
1247
+ print(f"[deepagent_architect] stopped by user -- ticket {tid} claim "
1248
+ f"released, partial progress saved (resume with the same command)")
1249
+ raise
1250
+ if ok:
1251
+ _mark_done(arch_dir)
1252
+ print(f"[deepagent_architect] ticket {tid} done")
1253
+ else:
1254
+ _release_claim(arch_dir)
1255
+ print(f"[deepagent_architect] ticket {tid} did not complete "
1256
+ f"-- claim released for retry")
1066
1257
  return True
1067
1258
  print(f"[deepagent_architect] all {len(ids)} open ticket(s) already "
1068
1259
  f"claimed by another process")
1069
1260
  return False
1070
1261
 
1071
1262
 
1072
- def _run_loop(chat, plan_name: str, lang: str, skip_levels: set, max_tickets: int = 0):
1263
+ def _run_loop(chat, plan_name: str, lang: str, skip_levels: set, max_tickets: int = 0,
1264
+ noposition: bool = False, finalize_text: str = None):
1073
1265
  count = 0
1074
- while True:
1075
- if max_tickets and count >= max_tickets:
1076
- print(f"[deepagent_architect] --loop stopping: reached --max {max_tickets}")
1077
- break
1078
- if not _run_next(chat, plan_name, lang, skip_levels):
1079
- break
1080
- count += 1
1266
+ try:
1267
+ while True:
1268
+ if max_tickets and count >= max_tickets:
1269
+ print(f"[deepagent_architect] --loop stopping: reached --max {max_tickets}")
1270
+ break
1271
+ if not _run_next(chat, plan_name, lang, skip_levels,
1272
+ noposition=noposition, finalize_text=finalize_text):
1273
+ break
1274
+ count += 1
1275
+ except _dcode._StopGeneration:
1276
+ print(f"[deepagent_architect] --loop stopped by user after {count} "
1277
+ f"ticket(s) processed (pid {_os.getpid()})")
1278
+ return
1081
1279
  print(f"[deepagent_architect] --loop finished: {count} ticket(s) "
1082
1280
  f"processed by this process (pid {_os.getpid()})")
1083
1281
 
@@ -1085,7 +1283,7 @@ def _run_loop(chat, plan_name: str, lang: str, skip_levels: set, max_tickets: in
1085
1283
  def run(chat, args: str):
1086
1284
  args = args.strip()
1087
1285
  _usage = ('usage: /flow deepagent_architect <plan_name> <task_id_or_text> '
1088
- '[--lang py] [--skip level1,level2]\n'
1286
+ '[--lang py] [--skip level1,level2] [--noposition] [--finalize ["<text>"]]\n'
1089
1287
  ' /flow deepagent_architect <plan_name> --next [--lang py]\n'
1090
1288
  ' /flow deepagent_architect <plan_name> --loop [--lang py] [--max N]')
1091
1289
  if not args:
@@ -1104,6 +1302,20 @@ def run(chat, args: str):
1104
1302
  skip_levels = {s.strip().lower() for s in m.group(1).split(",") if s.strip()}
1105
1303
  args = (args[:m.start()] + args[m.end():]).strip()
1106
1304
 
1305
+ # ── position breadcrumb, final-level instruction ────────────────────────
1306
+ # noposition is opt-OUT (breadcrumb included by default); finalize is
1307
+ # opt-IN (off unless explicitly requested) -- see module docstring.
1308
+ noposition = bool(_re.search(r'--noposition\b', args))
1309
+ if noposition:
1310
+ args = _re.sub(r'--noposition\b', '', args).strip()
1311
+
1312
+ finalize_text = None
1313
+ fzm = _re.search(r'--finalize(?:\s+"([^"]*)")?', args)
1314
+ if fzm:
1315
+ custom = fzm.group(1) or ""
1316
+ finalize_text = _DEFAULT_FINALIZE_TEXT + (f"\n\n{custom}" if custom else "")
1317
+ args = (args[:fzm.start()] + args[fzm.end():]).strip()
1318
+
1107
1319
  loop_mode = bool(_re.search(r'--loop\b', args))
1108
1320
  if loop_mode:
1109
1321
  args = _re.sub(r'--loop\b', '', args).strip()
@@ -1128,10 +1340,19 @@ def run(chat, args: str):
1128
1340
  + (f" (max {max_tickets})" if loop_mode and max_tickets else ""))
1129
1341
  if skip_levels:
1130
1342
  print(f"[deepagent_architect] skip : {', '.join(sorted(skip_levels))}")
1343
+ if noposition:
1344
+ print("[deepagent_architect] noposition: position breadcrumb disabled")
1345
+ if finalize_text:
1346
+ print(f"[deepagent_architect] finalize : on ({len(finalize_text)} chars)")
1131
1347
  if loop_mode:
1132
- _run_loop(chat, plan_name, lang, skip_levels, max_tickets)
1348
+ _run_loop(chat, plan_name, lang, skip_levels, max_tickets,
1349
+ noposition=noposition, finalize_text=finalize_text)
1133
1350
  else:
1134
- _run_next(chat, plan_name, lang, skip_levels)
1351
+ try:
1352
+ _run_next(chat, plan_name, lang, skip_levels,
1353
+ noposition=noposition, finalize_text=finalize_text)
1354
+ except _dcode._StopGeneration:
1355
+ pass # _run_next already printed the stopped-by-user status line
1135
1356
  return
1136
1357
 
1137
1358
  if args.startswith('"'):
@@ -1154,4 +1375,14 @@ def run(chat, args: str):
1154
1375
  print(_usage)
1155
1376
  return
1156
1377
 
1157
- _run_one(chat, plan_name, task_arg, lang, skip_levels)
1378
+ if noposition:
1379
+ print("[deepagent_architect] noposition: position breadcrumb disabled")
1380
+ if finalize_text:
1381
+ print(f"[deepagent_architect] finalize : on ({len(finalize_text)} chars)")
1382
+
1383
+ try:
1384
+ _run_one(chat, plan_name, task_arg, lang, skip_levels,
1385
+ noposition=noposition, finalize_text=finalize_text)
1386
+ except _dcode._StopGeneration:
1387
+ print("\n[deepagent_architect] stopped by user -- partial progress saved "
1388
+ "(resume with the same command)")