clouds-coder 2026.12.5__tar.gz → 2026.12.6__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 (147) hide show
  1. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/CI-VERIFICATION.md +22 -0
  2. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/Clouds_Coder.py +73 -27
  3. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/PKG-INFO +1 -1
  4. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/clouds_coder.egg-info/PKG-INFO +1 -1
  5. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/pyproject.toml +1 -1
  6. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_skill_execution_permissions.py +100 -0
  7. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/.github/workflows/python-app.yml +0 -0
  8. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/.github/workflows/python-publish.yml +0 -0
  9. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/LICENSE +0 -0
  10. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/MANIFEST.in +0 -0
  11. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/README-ja.md +0 -0
  12. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/README-zh.md +0 -0
  13. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/README.md +0 -0
  14. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/RELEASE_NOTES.md +0 -0
  15. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/Split Tools/run_split.bat +0 -0
  16. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/Split Tools/run_split.command +0 -0
  17. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/Split Tools/run_split.py +0 -0
  18. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/Split Tools/run_split.sh +0 -0
  19. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/Split Tools/split_coder.py +0 -0
  20. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/clouds_coder.egg-info/SOURCES.txt +0 -0
  21. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/clouds_coder.egg-info/dependency_links.txt +0 -0
  22. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/clouds_coder.egg-info/entry_points.txt +0 -0
  23. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/clouds_coder.egg-info/requires.txt +0 -0
  24. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/clouds_coder.egg-info/top_level.txt +0 -0
  25. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/docs/liquid_kernel_delivery_verification_20261030.md +0 -0
  26. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/liquid_kernel/README.md +0 -0
  27. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/liquid_kernel/__init__.py +0 -0
  28. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/liquid_kernel/agentic.py +0 -0
  29. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/liquid_kernel/context.py +0 -0
  30. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/liquid_kernel/control.py +0 -0
  31. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/liquid_kernel/execution.py +0 -0
  32. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/liquid_kernel/models.py +0 -0
  33. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-03-07.md +0 -0
  34. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-03-16.md +0 -0
  35. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-03-20.md +0 -0
  36. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-03-25.md +0 -0
  37. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-03-31.md +0 -0
  38. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-05-02.md +0 -0
  39. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-05-28.md +0 -0
  40. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-06-05.md +0 -0
  41. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-06-22.md +0 -0
  42. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-08-10.md +0 -0
  43. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-08-16.md +0 -0
  44. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-08-20.md +0 -0
  45. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-09-12.md +0 -0
  46. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-10-30.md +0 -0
  47. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-11-01.md +0 -0
  48. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-11-04.md +0 -0
  49. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-11-28.md +0 -0
  50. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-11-29.md +0 -0
  51. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/log/CHANGELOG-2026-12-05.md +0 -0
  52. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/requirements.txt +0 -0
  53. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/ruff.toml +0 -0
  54. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/setup.cfg +0 -0
  55. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/split_coder.py +0 -0
  56. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/UPLOAD_NOTES.md +0 -0
  57. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/conftest.py +0 -0
  58. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/fixtures/skills/shader-dev/SKILL.md +0 -0
  59. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_acceptance_portability.py +0 -0
  60. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_admin_bootstrap_compatibility.py +0 -0
  61. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_admin_i18n.py +0 -0
  62. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_admin_output_limits.py +0 -0
  63. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_agentic_evolution.py +0 -0
  64. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_agentic_flow_compatibility.py +0 -0
  65. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_authoritative_prompt_delivery.py +0 -0
  66. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_cache_runtime.py +0 -0
  67. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_candidate_retention.py +0 -0
  68. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_collaboration.py +0 -0
  69. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_compaction_recovery.py +0 -0
  70. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_context_auto_compact.py +0 -0
  71. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_context_memory_recall.py +0 -0
  72. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_cross_platform_runtime.py +0 -0
  73. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_dynamic_agent_loop.py +0 -0
  74. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_effort_probe.py +0 -0
  75. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_evaluator_transport_defenses.py +0 -0
  76. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_evolution_browser.py +0 -0
  77. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_evolution_integration.py +0 -0
  78. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_evolution_policy_safety.py +0 -0
  79. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_evolution_progress.py +0 -0
  80. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_external_skill_permissions.py +0 -0
  81. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_goal_mode.py +0 -0
  82. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_http_incomplete_read.py +0 -0
  83. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_ide_v2.py +0 -0
  84. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_json_restart_defenses.py +0 -0
  85. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_kernel_bootstrap.py +0 -0
  86. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_kernel_restart_persistence.py +0 -0
  87. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_kimi_tool_history_compat.py +0 -0
  88. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_l3_l4_todo_runtime.py +0 -0
  89. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_liquid_kernel.py +0 -0
  90. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_live_harness_repairs.py +0 -0
  91. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_long_content_enrichment_pileup.py +0 -0
  92. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_mcp_workspace_trust.py +0 -0
  93. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_model_configuration.py +0 -0
  94. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_native_output_recovery.py +0 -0
  95. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_network_change_notice.py +0 -0
  96. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_optimization_opportunities.py +0 -0
  97. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_optional_evolution_quotas.py +0 -0
  98. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_outcome_scoring.py +0 -0
  99. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_pair_deployment_policy.py +0 -0
  100. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_plan_structure.py +0 -0
  101. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_plan_todo_progression.py +0 -0
  102. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_portable_capabilities.py +0 -0
  103. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_process_manager.py +0 -0
  104. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_prompt_enhancement_recovery.py +0 -0
  105. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_proposal_schema_recovery.py +0 -0
  106. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_rag_admin_auth.py +0 -0
  107. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_read_compaction_visibility.py +0 -0
  108. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_requirements_coverage.py +0 -0
  109. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_screenshot_regressions.py +0 -0
  110. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_semantic_task_routing.py +0 -0
  111. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_service_logos.py +0 -0
  112. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_session_llm_concurrency.py +0 -0
  113. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_session_performance.py +0 -0
  114. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_shared_context_runtime.py +0 -0
  115. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_shell_timeout_modes.py +0 -0
  116. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_single_no_plan_todo_bootstrap.py +0 -0
  117. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_skill_selection.py +0 -0
  118. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_skills_studio_v2.py +0 -0
  119. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_split_distribution.py +0 -0
  120. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_sqlite_connection_lifecycle.py +0 -0
  121. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_step_skill_runtime.py +0 -0
  122. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_sync_routing_scope.py +0 -0
  123. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_thinking_only_recovery.py +0 -0
  124. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_todo_finish_mode_matrix.py +0 -0
  125. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_todo_llm_budget.py +0 -0
  126. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_todo_no_progress.py +0 -0
  127. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_todo_short_ids.py +0 -0
  128. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_todo_tree_revision_guard.py +0 -0
  129. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_todo_update_recovery.py +0 -0
  130. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_ui_language.py +0 -0
  131. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_user_bubbles_after_compact.py +0 -0
  132. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_web_preview.py +0 -0
  133. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_web_search_local_graph.py +0 -0
  134. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_web_search_public_discovery.py +0 -0
  135. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tests/test_web_ui_export.py +0 -0
  136. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/__init__.py +0 -0
  137. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/inspect_evolution_progress.py +0 -0
  138. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/sync_liquid_kernel_bundle.py +0 -0
  139. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_admin_restart_real.py +0 -0
  140. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_context_runtime_real.py +0 -0
  141. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_evolution_entrypoint.py +0 -0
  142. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_evolution_progress_real.py +0 -0
  143. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_evolution_real.py +0 -0
  144. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_frozen_review_real.py +0 -0
  145. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_json_semantic_real.py +0 -0
  146. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_model_compatibility_real.py +0 -0
  147. {clouds_coder-2026.12.5 → clouds_coder-2026.12.6}/tools/verify_transport_parity_real.py +0 -0
@@ -1,5 +1,27 @@
1
1
  # CI 验证记录
2
2
 
3
+ ## 2026.12.5 L3/L4 Plan 增量
4
+
5
+ 验证源码 SHA-256 为 `b1f4ab65857b321af606f9704ce1e590963901f0045103a8b5b3ab3e4fb82f68`。在 macOS 上将修复覆盖到 2026.12.5 发布包后运行 CI 测试。
6
+
7
+ | Python | 测试结果 |
8
+ | --- | --- |
9
+ | 3.9 | 1245 passed, 11 skipped |
10
+ | 3.10 | 1245 passed, 11 skipped, 501 subtests passed |
11
+ | 3.11 | 1245 passed, 11 skipped, 501 subtests passed |
12
+ | 3.12 | 1245 passed, 11 skipped, 501 subtests passed |
13
+ | 3.13 | 1245 passed, 11 skipped, 501 subtests passed |
14
+
15
+ Ruff、阻断级 Flake8 和拆分包独立启动检查通过。Python 3.12 构建的 wheel 和 sdist 通过 Twine 严格校验。
16
+
17
+ OpenAI 兼容 HTTP 模拟器按默认研究轮次回放 L3 的 16 轮和 L4 的 24 轮。旧版在两级都停在研究阶段。修复版各完成一次准备判断和方案生成,写入 `plan.md` 并等待用户选择。
18
+
19
+ Python 3.13 的 Conda 环境曾在 SQLite 集成测试中停滞。随后分进程运行,14 个 HTTP 集成用例与其余用例均完成。各版本跳过了发布包缺少的 11 项历史源码快照测试。
20
+
21
+ 本次 CI 在本地运行。
22
+
23
+ ---
24
+
3
25
  GitHub 比对基线 `5b4c8b1dc49be75ad022b46ca4128ff514ed2a67`。[#298 的 Python 3.11 作业](https://github.com/FonaTech/Clouds-Coder/actions/runs/47467739559/job/145508621755) 在测试临时目录清理时失败。该运行的 Python 3.10、3.13 通过,3.12 被取消。
4
26
 
5
27
  ## 本地修复版 2026.12.5
@@ -86911,17 +86911,24 @@ body{padding:18px}
86911
86911
  "Pending workflows: " + json_dumps(gaps)
86912
86912
  )
86913
86913
 
86914
- def _todo_preparation_guard(self, source: dict, *, role: str, existing_rows: list[dict], board: dict) -> str:
86914
+ def _todo_preparation_guard(
86915
+ self, source: dict, *, role: str, existing_rows: list[dict], board: dict, for_plan: bool = False,
86916
+ ) -> str:
86915
86917
  """Require a concise model decision, never infer readiness from a read count.
86916
86918
 
86917
86919
  The execution model supplies the decision in the same call as the first
86918
86920
  Todo graph. This adds no independent planning request and stores no
86919
- private reasoning. A material gap keeps observation/clarification open.
86921
+ private reasoning. Plan research supplies a separate decision and may
86922
+ only finish after resolving gaps that affect the plan.
86920
86923
  """
86921
- if not bool(getattr(self, "_task_preparation_required", False)) or self._runtime_task_level_for_todo_policy() < 1:
86924
+ if not for_plan and (
86925
+ not bool(getattr(self, "_task_preparation_required", False)) or self._runtime_task_level_for_todo_policy() < 1
86926
+ ):
86922
86927
  return ""
86923
86928
  goal = str(self._authoritative_user_goal_for_model() or board.get("original_goal", "") or "").strip()
86924
86929
  if not goal or self._blackboard_is_terminal_completion(board):
86930
+ if for_plan:
86931
+ return self._plan_control_feedback("task_preparation_pending", "Identify the active user goal before closing plan research.")
86925
86932
  return ""
86926
86933
  owner = self._sanitize_agent_role(role)
86927
86934
  if any(str(row.get("owner", "") or "") in {"", owner} for row in existing_rows if isinstance(row, dict)):
@@ -86932,6 +86939,8 @@ body{padding:18px}
86932
86939
  if isinstance(preparation, str):
86933
86940
  preparation = extract_json_object_from_text(preparation, {})
86934
86941
  if not isinstance(preparation, dict):
86942
+ if for_plan:
86943
+ return self._plan_control_feedback("task_preparation_required", "Submit an assess_task_preparation decision grounded in the goal, current evidence, and selected workflows.")
86935
86944
  return self._plan_control_feedback(
86936
86945
  "task_preparation_required",
86937
86946
  "Before initializing Todos, understand the actual goal and current state, consider available skills, "
@@ -86946,13 +86955,14 @@ body{padding:18px}
86946
86955
  else:
86947
86956
  skill_decision = skills.strip() if isinstance(skills, str) else ""
86948
86957
  ready = self._optional_bool_value(preparation.get("ready"))
86949
- missing = preparation.get("missing", [])
86958
+ missing = preparation.get("missing", None if for_plan else [])
86950
86959
  basis = str(preparation.get("basis", "") or "").strip()
86951
86960
  if not basis:
86952
86961
  # Provenance is observable without filling in the model's account
86953
86962
  # of the goal, current state, or readiness.
86954
86963
  basis = "user_context"
86955
- for row in reversed(getattr(self, "messages", [])[-80:]):
86964
+ context = self._agent_context(owner) if for_plan else getattr(self, "messages", [])
86965
+ for row in reversed(context[-80:]):
86956
86966
  if row.get("role") == "user" and not self._is_runtime_internal_message(row):
86957
86967
  break
86958
86968
  if row.get("role") == "tool" and row.get("result_ok") is True and self._single_no_plan_todo_is_perception_result(
@@ -86970,13 +86980,22 @@ body{padding:18px}
86970
86980
  if basis not in {"user_context", "observed_context", "continuation"}:
86971
86981
  invalid.append("basis must be user_context, observed_context, or continuation")
86972
86982
  if invalid:
86983
+ guidance = (
86984
+ " Resolve the missing context before reassessing."
86985
+ if for_plan else
86986
+ " Keep the proposed items if they still fit. Do not repeat an unchanged request; use a focused read if the missing assessment needs evidence."
86987
+ )
86973
86988
  return self._plan_control_feedback(
86974
- "task_preparation_invalid", "Correct preparation: " + "; ".join(invalid)
86975
- + ". Keep the proposed items if they still fit. Do not repeat an unchanged request; use a focused read if the missing assessment needs evidence.",
86989
+ "task_preparation_invalid", "Correct preparation: " + "; ".join(invalid) + "." + guidance,
86976
86990
  )
86977
86991
  if not isinstance(missing, list) or not all(isinstance(item, str) for item in missing):
86978
86992
  return self._plan_control_feedback("task_preparation_invalid", "preparation.missing must be a list of actual unresolved context gaps.")
86979
86993
  missing = [item.strip() for item in missing if item.strip()]
86994
+ if for_plan and (ready is not True or missing):
86995
+ return self._plan_control_feedback(
86996
+ "task_preparation_pending",
86997
+ "Resolve gaps that affect the plan with focused research or ask_user before reassessing. " + json_dumps(missing),
86998
+ )
86980
86999
  goal_digest = hashlib.sha256(goal.encode("utf-8", errors="backslashreplace")).hexdigest()
86981
87000
  if str(getattr(self, "todo_preparation_gap_goal", "") or "") != goal_digest:
86982
87001
  self.todo_preparation_gap_goal = goal_digest
@@ -86999,9 +87018,10 @@ body{padding:18px}
86999
87018
  open_gaps = missing or ["preparation reported ready=false without naming a gap"]
87000
87019
  gaps = self._selected_skill_reading_gaps(owner)
87001
87020
  if gaps:
87021
+ retry = "Reassess plan preparation after reviewing the workflow. " if for_plan else "Reassess preparation before retrying TodoWrite. "
87002
87022
  return self._plan_control_feedback(
87003
87023
  "selected_skill_reading_required", "Use read_file mode='full' on the exact workflow path below, "
87004
- "or mode='window' for the remaining lines. Reassess preparation before retrying TodoWrite. " + json_dumps(gaps),
87024
+ "or mode='window' for the remaining lines. " + retry + json_dumps(gaps),
87005
87025
  )
87006
87026
  step = self._get_active_plan_step(board) or {}
87007
87027
  record = {"goal": trim(goal_summary, 1000), "state": trim(state_summary, 1600),
@@ -93022,11 +93042,20 @@ body{padding:18px}
93022
93042
  research_sig = self._plan_mode_research_signature()
93023
93043
  preparation_ready = False
93024
93044
  research_round_limit = max(1, int(getattr(self, "runtime_round_budget", 0) or self.max_agent_rounds))
93025
- for r in range(research_round_limit):
93045
+ # Give Explorer time to assess the last tool results, perform a focused
93046
+ # follow-up if needed, and submit the decision after seeing that result.
93047
+ handoff_round_limit = 3
93048
+ handoff_rounds = 0
93049
+ for r in range(research_round_limit + handoff_round_limit):
93026
93050
  if self.cancel_requested:
93027
93051
  return {"status": "interrupted"}
93028
93052
  self._inject_pending_user_inputs()
93029
- step = self._plan_mode_explorer_turn(pinned_selection, round_idx=r)
93053
+ closing = r >= research_round_limit or stale_rounds >= PLAN_MODE_EXPLORER_STALE_ROUNDS
93054
+ if closing:
93055
+ if handoff_rounds == 0:
93056
+ self._emit("status", {"summary": "plan-mode: checking research readiness from collected evidence"})
93057
+ handoff_rounds += 1
93058
+ step = self._plan_mode_explorer_turn(pinned_selection, round_idx=r, close_preparation=closing)
93030
93059
  status = str(step.get("status", "") or "")
93031
93060
  if status == "interrupted":
93032
93061
  return {"status": "interrupted"}
@@ -93037,15 +93066,16 @@ body{padding:18px}
93037
93066
  break
93038
93067
  if status in {"ok", "findings-only", "no-tools"}:
93039
93068
  self._plan_mode_update_findings(step)
93069
+ if closing:
93070
+ if handoff_rounds >= handoff_round_limit:
93071
+ break
93072
+ continue
93040
93073
  new_sig = self._plan_mode_research_signature()
93041
93074
  if new_sig != research_sig:
93042
93075
  stale_rounds = 0
93043
93076
  research_sig = new_sig
93044
93077
  else:
93045
93078
  stale_rounds += 1
93046
- if stale_rounds >= PLAN_MODE_EXPLORER_STALE_ROUNDS:
93047
- self._emit("status", {"summary": "plan-mode: preparation has not demonstrated readiness; preserving research"})
93048
- break
93049
93079
 
93050
93080
  if not preparation_ready:
93051
93081
  bb = self._ensure_blackboard()
@@ -93116,7 +93146,7 @@ body{padding:18px}
93116
93146
  bb = self._ensure_blackboard()
93117
93147
  if not isinstance(bb.get("plan"), dict):
93118
93148
  bb["plan"] = {"phase": "awaiting_choice", "findings": []}
93119
- bb["status"] = "AWAITING_PLAN_CHOICE"
93149
+ bb["status"] = "PLANNING"
93120
93150
  bb["plan"]["phase"] = "awaiting_choice"
93121
93151
  bb["plan"]["proposal"] = proposal
93122
93152
  self.blackboard = bb
@@ -93207,7 +93237,7 @@ body{padding:18px}
93207
93237
  f"6. Assess risks and note only ambiguities that materially require user input\n"
93208
93238
  f"7. DO NOT write, edit, or create any files. Read-only analysis only. Stop once new reads no longer change the proposed execution path.\n"
93209
93239
  f"8. Write only decision-relevant findings to the blackboard under 'plan_findings'. Include relevant paths/APIs, constraints, validation commands, and any loaded-skill workflow requirements. Omit empty sections and generic inventories.\n"
93210
- f"When the goal, necessary current state and complete selected workflows are understood, call assess_task_preparation with brief goal/state/skills summaries, basis, ready=true and missing=[]. This is the only signal to finish research. No read quota or round count implies readiness. If material user choices are missing, call ask_user and wait; otherwise continue focused observations. User-provided or recalled context can suffice without new reads.\n"
93240
+ f"After each observation, decide whether it changes the plan. When the goal, necessary current state and complete selected workflows are understood, call assess_task_preparation with brief goal/state/skills summaries, ready=true and missing=[]. Include basis when it helps describe the source. No read quota or round count implies readiness. If material user choices are missing, call ask_user and wait; otherwise continue focused observations. User-provided or recalled context can suffice without new reads.\n"
93211
93241
  f"9. For coding tasks, identify the test strategy:\n"
93212
93242
  f" - What build/compilation commands are available? (Makefile, npm, cargo, cmake, etc.)\n"
93213
93243
  f" - What test frameworks/suites exist? (pytest, jest, go test, etc.)\n"
@@ -93226,8 +93256,8 @@ body{padding:18px}
93226
93256
  "content": (
93227
93257
  "You are Explorer in plan-mode (read-only research). "
93228
93258
  "Analyze the codebase to understand the task scope. "
93229
- "Do NOT modify any files. Use read_file, bash (read-only commands), "
93230
- "list_skills, load_skill, and blackboard tools only. "
93259
+ "Do NOT modify workspace files. Use the supplied research tools for observations, "
93260
+ "assess_task_preparation for the research decision, and ask_user when only the user can supply missing information. "
93231
93261
  "When reading files, choose the shape that matches the question: mode='window' for file:line, mode='symbol' for named code, mode='search' for keywords/errors, mode='overview' for structure, and mode='full' only when exact broad context is required. "
93232
93262
  "When reading blackboard or archived context, use mode='summary' first, then mode='search' or mode='window' for focused evidence. "
93233
93263
  f"{skills_block}"
@@ -93245,7 +93275,7 @@ body{padding:18px}
93245
93275
  "agent_role": "explorer",
93246
93276
  }, mirror_to_global=False)
93247
93277
 
93248
- def _plan_mode_explorer_turn(self, pinned_selection: str, round_idx: int) -> dict:
93278
+ def _plan_mode_explorer_turn(self, pinned_selection: str, round_idx: int, *, close_preparation: bool = False) -> dict:
93249
93279
  ctx = self._agent_context("explorer")
93250
93280
  if not ctx:
93251
93281
  return {"status": "skip", "reason": "empty-context"}
@@ -93258,22 +93288,26 @@ body{padding:18px}
93258
93288
  name = str(fn.get("name", "")).strip()
93259
93289
  if name in PLAN_MODE_RESEARCH_TOOL_ALLOWLIST or name.startswith(MCP_TOOL_PREFIX):
93260
93290
  filtered_tools.append(tool)
93261
- preparation_schema = next(
93262
- tool["function"]["parameters"]["properties"]["preparation"]
93263
- for tool in self._available_tools() if tool.get("function", {}).get("name") == "TodoWrite"
93264
- )
93291
+ preparation_schema = TOOL_SPEC_BY_NAME["TodoWrite"]["function"]["parameters"]["properties"]["preparation"]
93265
93292
  filtered_tools.append(tool_def(
93266
- "assess_task_preparation", "Finish research only when the actual task and selected complete workflows are understood; otherwise keep observing or ask_user.",
93267
- preparation_schema["properties"], ["goal", "state", "skills", "basis", "ready", "missing"],
93293
+ "assess_task_preparation", "Report whether the collected evidence and complete selected workflows support an executable plan. List any gaps that would change the plan.",
93294
+ preparation_schema["properties"], ["goal", "state", "skills", "ready", "missing"],
93268
93295
  ))
93269
- if not filtered_tools:
93270
- filtered_tools = self._tools_for_agent("explorer")
93271
93296
  with self.lock:
93272
93297
  self.current_phase = f"plan-mode:explorer:round-{round_idx}"
93273
93298
  self.current_tool_name = ""
93274
93299
  self.active_agent_role = "explorer"
93275
93300
  self._apply_auto_compact_if_needed("auto:plan-explorer", role="explorer")
93276
93301
  ctx = self._agent_context("explorer")
93302
+ if close_preparation:
93303
+ ctx = [*ctx, self._runtime_control_message(
93304
+ "PLAN RESEARCH HANDOFF: Review the evidence already collected, including the latest tool results. "
93305
+ "If you have enough to choose a grounded plan, call assess_task_preparation on its own with ready=true and missing=[]. "
93306
+ "If a specific observation can resolve a material gap, make just that focused read or check. "
93307
+ "Use ask_user if only the user can resolve the gap. If you cannot resolve it, call assess_task_preparation "
93308
+ "with ready=false and name the missing evidence. Only an accepted readiness decision starts plan synthesis.",
93309
+ control_tag="plan_research_handoff", ui_visible=False,
93310
+ )]
93277
93311
  # Build skills awareness block (same as sync/single mode)
93278
93312
  skills_block = self._skills_awareness_block(for_role="explorer")
93279
93313
  shell_guidance_note = self._shell_failure_guidance_prompt_block()
@@ -93283,6 +93317,8 @@ body{padding:18px}
93283
93317
  system=(
93284
93318
  "You are Explorer in plan-mode research. Read-only analysis. "
93285
93319
  "Do NOT create, write, or edit files. "
93320
+ "Once you have the evidence needed to plan and have reviewed selected workflows, call assess_task_preparation on its own. "
93321
+ "Use ask_user to resolve choices that require the user's input. "
93286
93322
  f"{self._public_progress_prompt_instruction()}"
93287
93323
  f"Workspace: \"{self.files_root}\" ($SESSION_ROOT). "
93288
93324
  "When reading files, choose the shape that matches the question: mode='window' for file:line, mode='symbol' for named code, mode='search' for keywords/errors, mode='overview' for structure, and mode='full' only when exact broad context is required. "
@@ -93396,7 +93432,14 @@ body{padding:18px}
93396
93432
  continue
93397
93433
  try:
93398
93434
  if fn_name == "assess_task_preparation":
93399
- feedback = self._todo_preparation_guard({"preparation": fn_args}, role="explorer", existing_rows=[], board=self._ensure_blackboard())
93435
+ if len(tool_calls) == 1:
93436
+ feedback = self._todo_preparation_guard(
93437
+ {"preparation": fn_args}, role="explorer", existing_rows=[], board=self._ensure_blackboard(), for_plan=True,
93438
+ )
93439
+ else:
93440
+ feedback = self._plan_control_feedback(
93441
+ "task_preparation_pending", "Review the other tool results, then submit the preparation decision on its own.",
93442
+ )
93400
93443
  preparation_ready = not feedback
93401
93444
  raw_output = feedback or "Task preparation ready; synthesize from the verified context and findings."
93402
93445
  else:
@@ -93409,6 +93452,7 @@ body{padding:18px}
93409
93452
  except Exception as exc:
93410
93453
  raw_output = f"Error: {exc}"
93411
93454
  result_content = str(raw_output or "")
93455
+ result_ok = bool(result_content and not result_content.startswith(("Control[", "Error:")))
93412
93456
  if result_content and not result_content.startswith("Error:"):
93413
93457
  evidence_rows.append(
93414
93458
  trim(
@@ -93420,6 +93464,8 @@ body{padding:18px}
93420
93464
  self._append_agent_context_message("explorer", {
93421
93465
  "role": "tool",
93422
93466
  "tool_call_id": tc["id"],
93467
+ "name": fn_name,
93468
+ "result_ok": result_ok,
93423
93469
  "content": self._tool_result_context_content(
93424
93470
  fn_name,
93425
93471
  fn_args if isinstance(fn_args, dict) else {},
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clouds-coder
3
- Version: 2026.12.5
3
+ Version: 2026.12.6
4
4
  Summary: Clouds Coder: local-first Cloud CLI coder runtime with Web UI and Skills Studio.
5
5
  Author: Clouds Coder Contributors
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clouds-coder
3
- Version: 2026.12.5
3
+ Version: 2026.12.6
4
4
  Summary: Clouds Coder: local-first Cloud CLI coder runtime with Web UI and Skills Studio.
5
5
  Author: Clouds Coder Contributors
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "clouds-coder"
7
- version = "2026.12.5"
7
+ version = "2026.12.6"
8
8
  description = "Clouds Coder: local-first Cloud CLI coder runtime with Web UI and Skills Studio."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -495,6 +495,106 @@ class SkillExecutionPermissionTests(unittest.TestCase):
495
495
  self.assertEqual(s.todo.snapshot(), [])
496
496
  synthesize.assert_not_called()
497
497
 
498
+ def test_plan_research_handoff_uses_last_observation_before_synthesis(self):
499
+ for level, mode in ((3, cc.EXECUTION_MODE_SINGLE), (4, cc.EXECUTION_MODE_SYNC)):
500
+ with self.subTest(level=level):
501
+ s = self.active_task()
502
+ s.runtime_task_level = level
503
+ s.runtime_execution_mode = s.execution_mode = mode
504
+ s.runtime_round_budget = 1
505
+ s._plan_file_path().unlink(missing_ok=True)
506
+ (s.files_root / 'rules.json').write_text('{"required": "OBSERVED_RULE_37"}', encoding='utf-8')
507
+
508
+ def model(messages, *, tools, system, call_scope, **kwargs):
509
+ names = {spec['function']['name'] for spec in tools}
510
+ if 'submit_plan_proposal' in names:
511
+ self.assertEqual(call_scope, 'auxiliary')
512
+ self.assertIn('OBSERVED_RULE_37', messages[-1]['content'])
513
+ name, args = 'submit_plan_proposal', {
514
+ 'context': 'Use the observed field', 'recommended': 'A', 'options': [{
515
+ 'id': 'A', 'title': 'Local rule validation', 'summary': 'Validate against rules.json locally.',
516
+ 'steps': ['1. Implement the rules.json check', '2. Run the rule validation tests'],
517
+ }],
518
+ }
519
+ elif any('PLAN RESEARCH HANDOFF' in row['content'] for row in messages):
520
+ self.assertEqual(call_scope, 'main')
521
+ self.assertIn('assess_task_preparation', names)
522
+ self.assertIn('ask_user', names)
523
+ self.assertIn('assess_task_preparation', system)
524
+ self.assertTrue(any(row.get('role') == 'tool' and 'OBSERVED_RULE_37' in row['content'] for row in messages))
525
+ name, args = 'assess_task_preparation', self.preparation(
526
+ state='Read rules.json and confirmed OBSERVED_RULE_37.', skills=[],
527
+ )
528
+ args.pop('basis')
529
+ else:
530
+ name, args = 'read_file', {'path': 'rules.json', 'mode': 'full'}
531
+ return {'content': '', 'tool_calls': [{'id': name, 'function': {'name': name, 'arguments': args}}]}
532
+
533
+ with mock.patch.object(s, '_auto_discover_and_load_skills'), mock.patch.object(s.ollama, 'chat', side_effect=model) as chat:
534
+ result = s._plan_mode_worker('')
535
+ self.assertEqual(result['status'], 'awaiting_choice')
536
+ self.assertEqual(chat.call_count, 3)
537
+ self.assertTrue(s._is_plan_choice_response('A'))
538
+ self.assertEqual(s.blackboard['status'], 'PLANNING')
539
+ self.assertEqual(s.blackboard['preparation_decisions'][-1]['basis'], 'observed_context')
540
+ self.assertEqual(s.messages[-1]['type'], 'plan_proposal')
541
+ self.assertIn('Local rule validation', s._read_plan_file())
542
+ self.assertFalse(s.runtime_plan_approved)
543
+ self.assertEqual(s.todo.snapshot(), [])
544
+
545
+ def test_plan_handoff_recovers_after_reading_the_selected_workflow(self):
546
+ s = self.active_task()
547
+ s.runtime_task_level = 4
548
+ s.runtime_execution_mode = s.execution_mode = cc.EXECUTION_MODE_SYNC
549
+ s.runtime_round_budget = 1
550
+ with (self.skill / 'SKILL.md').open('a', encoding='utf-8') as output:
551
+ for area in range(90):
552
+ output.write(f'Verify the source ledger and record the expected data for area {area:03d}.\n')
553
+ s._ensure_skills_ready(force=True)
554
+ assessment = self.preparation(skills=['local:ledger'], state='Validate the existing ledger using its workflow.')
555
+ calls = []
556
+
557
+ def model(messages, **kwargs):
558
+ if not calls:
559
+ name, args = 'load_skill', {'name': 'local:ledger', 'purpose': 'Plan the ledger validation'}
560
+ elif len(calls) == 2:
561
+ self.assertIn('selected_skill_reading_required', messages[-2]['content'])
562
+ path = s._skill_execution_workspaces['local:ledger']['workflow']
563
+ name, args = 'read_file', {'path': path, 'mode': 'full'}
564
+ else:
565
+ if len(calls) == 3:
566
+ self.assertIn('area 089.', messages[-2]['content'])
567
+ name, args = 'assess_task_preparation', assessment
568
+ calls.append(name)
569
+ return {'content': '', 'tool_calls': [{'id': f'call_{len(calls)}', 'function': {'name': name, 'arguments': args}}]}
570
+
571
+ proposal = {'context': 'Ledger workflow reviewed', 'options': [{'id': 'A', 'title': 'Validate the ledger', 'steps': ['1. Validate the data']}]}
572
+ with mock.patch.object(s, '_auto_discover_and_load_skills'), mock.patch.object(s.ollama, 'chat', side_effect=model), mock.patch.object(s, '_plan_mode_synthesize_proposal', return_value=proposal) as synthesize:
573
+ result = s._plan_mode_worker('')
574
+ self.assertEqual(result['status'], 'awaiting_choice')
575
+ self.assertEqual(calls, ['load_skill', 'assess_task_preparation', 'read_file', 'assess_task_preparation'])
576
+ synthesize.assert_called_once()
577
+ self.assertEqual(s._selected_skill_reading_gaps('explorer'), [])
578
+
579
+ def test_unresolved_plan_gap_does_not_use_todo_fallback(self):
580
+ s = self.active_task()
581
+ s.runtime_round_budget = 1
582
+ assessment = self.preparation(ready=False, missing=['The user must choose the data source.'])
583
+
584
+ def model(messages, **kwargs):
585
+ n = sum(row.get('role') == 'assistant' for row in messages)
586
+ return {'content': '', 'tool_calls': [{
587
+ 'id': f'assessment_{n}', 'function': {'name': 'assess_task_preparation', 'arguments': assessment},
588
+ }]}
589
+
590
+ with mock.patch.object(s, '_auto_discover_and_load_skills'), mock.patch.object(s.ollama, 'chat', side_effect=model) as chat, mock.patch.object(s, '_plan_mode_synthesize_proposal') as synthesize:
591
+ result = s._plan_mode_worker('')
592
+ self.assertGreater(chat.call_count, cc.TODO_PREPARATION_GAP_MAX_REJECTIONS)
593
+ self.assertEqual(result['status'], 'preparation_pending')
594
+ synthesize.assert_not_called()
595
+ self.assertFalse(s._plan_file_path().exists())
596
+ self.assertFalse(s.blackboard.get('preparation_decisions'))
597
+
498
598
 
499
599
  if __name__ == '__main__':
500
600
  unittest.main()