orbi-cli 0.7.39__tar.gz → 0.7.40__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 (252) hide show
  1. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/PKG-INFO +1 -1
  2. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/pyproject.toml +1 -1
  3. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/__init__.py +1 -1
  4. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/draft.py +105 -20
  5. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/draft_cli.py +8 -1
  6. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/extensions/draft_tools.ts +53 -6
  7. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi_cli.egg-info/PKG-INFO +1 -1
  8. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_claude_plugin.py +9 -6
  9. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_draft.py +129 -21
  10. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/LICENSE +0 -0
  11. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/README.md +0 -0
  12. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/docs/licenses/sustainable-use-license.md +0 -0
  13. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/setup.cfg +0 -0
  14. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/amend_command.py +0 -0
  15. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/base_ci_red.py +0 -0
  16. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/blocked_comment.py +0 -0
  17. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/branch_reclaim.py +0 -0
  18. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/check_permission.py +0 -0
  19. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/checks.py +0 -0
  20. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/claim.py +0 -0
  21. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/clarify.py +0 -0
  22. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/cli.py +0 -0
  23. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/cli_commands.py +0 -0
  24. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/cli_doctor.py +0 -0
  25. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/cli_parser.py +0 -0
  26. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/cli_source.py +0 -0
  27. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/cli_status.py +0 -0
  28. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/cli_ticket_command.py +0 -0
  29. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/comment_kind.py +0 -0
  30. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/comment_rest_id.py +0 -0
  31. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/comment_trust.py +0 -0
  32. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/config.py +0 -0
  33. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/delivery_comment.py +0 -0
  34. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/delivery_labels.py +0 -0
  35. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/delivery_scene.py +0 -0
  36. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/draft_marker.py +0 -0
  37. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/engine_source.py +0 -0
  38. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/example_config.toml +0 -0
  39. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/extensions/clarify_verdict.ts +0 -0
  40. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/failure.py +0 -0
  41. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/failure_report.py +0 -0
  42. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/gh_response.py +0 -0
  43. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/git_identity.py +0 -0
  44. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/git_transport.py +0 -0
  45. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/github.py +0 -0
  46. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/github_feedback.py +0 -0
  47. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/gitops.py +0 -0
  48. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/human_review.py +0 -0
  49. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/journal.py +0 -0
  50. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/language.py +0 -0
  51. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/language_terms.py +0 -0
  52. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/launchd_deploy.py +0 -0
  53. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/merge_exec.py +0 -0
  54. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/merge_gate.py +0 -0
  55. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/merge_handoff.py +0 -0
  56. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/milestone.py +0 -0
  57. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/milestone_command.py +0 -0
  58. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/notify.py +0 -0
  59. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/ops_delivery.py +0 -0
  60. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pi_activity.py +0 -0
  61. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pi_command.py +0 -0
  62. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pi_idle.py +0 -0
  63. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pi_process.py +0 -0
  64. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pi_recovery.py +0 -0
  65. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pi_session.py +0 -0
  66. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pi_stream_log.py +0 -0
  67. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pilot_setup.py +0 -0
  68. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pilot_slots.py +0 -0
  69. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/pr_verification.py +0 -0
  70. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/progress.py +0 -0
  71. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/progress_display.py +0 -0
  72. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/progress_outcome.py +0 -0
  73. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/progress_summary.py +0 -0
  74. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/release.py +0 -0
  75. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/release_closeout.py +0 -0
  76. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/release_comments.py +0 -0
  77. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/release_declaration.py +0 -0
  78. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/release_git.py +0 -0
  79. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/release_notes.py +0 -0
  80. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/release_run.py +0 -0
  81. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/repo_config.py +0 -0
  82. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/resume_scan.py +0 -0
  83. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/resume_verification.py +0 -0
  84. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/review_merge.py +0 -0
  85. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/review_rounds.py +0 -0
  86. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/review_verdict.py +0 -0
  87. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/run_fields.py +0 -0
  88. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/run_state.py +0 -0
  89. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/runner.py +0 -0
  90. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/runner_health.py +0 -0
  91. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/runner_marker.py +0 -0
  92. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/runner_source.py +0 -0
  93. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/scene.py +0 -0
  94. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/scheduler.py +0 -0
  95. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/scheduler_units.py +0 -0
  96. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/session_command.py +0 -0
  97. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/setup_checks.py +0 -0
  98. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/setup_config.py +0 -0
  99. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/source_pool.py +0 -0
  100. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/split_command.py +0 -0
  101. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/status_observe.py +0 -0
  102. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/suggest.py +0 -0
  103. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/systemd_deploy.py +0 -0
  104. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/ticket_command.py +0 -0
  105. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/ticket_command_registry.py +0 -0
  106. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/ticket_criteria.py +0 -0
  107. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi/user_summary.py +0 -0
  108. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi_cli.egg-info/SOURCES.txt +0 -0
  109. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi_cli.egg-info/dependency_links.txt +0 -0
  110. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi_cli.egg-info/entry_points.txt +0 -0
  111. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/src/orbi_cli.egg-info/top_level.txt +0 -0
  112. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_agents_md.py +0 -0
  113. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_amend_command.py +0 -0
  114. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_apply_label_patch.py +0 -0
  115. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_base_branch_failure.py +0 -0
  116. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_base_ci_red.py +0 -0
  117. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_blocked_comment.py +0 -0
  118. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_adapters.py +0 -0
  119. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_delivery.py +0 -0
  120. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_pi.py +0 -0
  121. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_preflight.py +0 -0
  122. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_release.py +0 -0
  123. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_claim_resume.py +0 -0
  124. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_failure_report.py +0 -0
  125. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_main.py +0 -0
  126. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_milestone.py +0 -0
  127. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_outcome.py +0 -0
  128. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_prompt.py +0 -0
  129. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_reconcile.py +0 -0
  130. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_session.py +0 -0
  131. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_bootstrap_runner_tickets.py +0 -0
  132. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_branch_reclaim.py +0 -0
  133. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_check_permission.py +0 -0
  134. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_ci_failure_issue_workflow.py +0 -0
  135. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_ci_failure_triage.py +0 -0
  136. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_ci_macos_workflow.py +0 -0
  137. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_ci_workflow.py +0 -0
  138. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_clarify.py +0 -0
  139. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_cli_golden.py +0 -0
  140. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_cli_install.py +0 -0
  141. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_cli_milestone.py +0 -0
  142. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_cli_packaging.py +0 -0
  143. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_cli_source.py +0 -0
  144. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_cli_ticket_commands.py +0 -0
  145. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_command_receipt_contract.py +0 -0
  146. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_comment_identity.py +0 -0
  147. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_comment_readers_contract.py +0 -0
  148. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_comment_rest_id.py +0 -0
  149. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_comment_trust.py +0 -0
  150. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_concurrency_e2e.py +0 -0
  151. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_constitution.py +0 -0
  152. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_coverage_gate.py +0 -0
  153. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_deliver_pr_fakes.py +0 -0
  154. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_delivery_branch_delete.py +0 -0
  155. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_delivery_labels.py +0 -0
  156. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_delivery_scene.py +0 -0
  157. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docker_docs.py +0 -0
  158. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docker_entrypoint.py +0 -0
  159. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docker_image_workflow.py +0 -0
  160. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docs_i18n.py +0 -0
  161. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docs_issue_shapes.py +0 -0
  162. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docs_labels.py +0 -0
  163. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docs_mermaid.py +0 -0
  164. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docs_releases.py +0 -0
  165. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docs_single_source.py +0 -0
  166. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_docs_site.py +0 -0
  167. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_engine_source.py +0 -0
  168. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_failure.py +0 -0
  169. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_failure_report.py +0 -0
  170. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_fix_needed_loop.py +0 -0
  171. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_gh_read_retry.py +0 -0
  172. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_gh_response.py +0 -0
  173. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_git_base_smoke.py +0 -0
  174. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_git_merge_smoke.py +0 -0
  175. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_git_network_retry.py +0 -0
  176. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_git_transport.py +0 -0
  177. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_github.py +0 -0
  178. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_github_fakes.py +0 -0
  179. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_gitops.py +0 -0
  180. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_gitops_fakes.py +0 -0
  181. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_human_review.py +0 -0
  182. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_import_graph.py +0 -0
  183. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_install_sh.py +0 -0
  184. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_issue_1367.py +0 -0
  185. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_issue_461.py +0 -0
  186. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_issue_template_config.py +0 -0
  187. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_journal.py +0 -0
  188. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_journal_events.py +0 -0
  189. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_launchd_deploy.py +0 -0
  190. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_license.py +0 -0
  191. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_merge_exec_extraction.py +0 -0
  192. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_message_language.py +0 -0
  193. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_milestone_command.py +0 -0
  194. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_notify.py +0 -0
  195. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_ops_e2e.py +0 -0
  196. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_orbi.py +0 -0
  197. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_orbi_dashboard.py +0 -0
  198. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_orbi_exporter.py +0 -0
  199. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_patch_ratchet.py +0 -0
  200. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pi_activity.py +0 -0
  201. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pi_child_reap.py +0 -0
  202. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pi_command.py +0 -0
  203. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pi_extensions.py +0 -0
  204. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pi_provider_templates.py +0 -0
  205. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pi_recovery.py +0 -0
  206. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pi_session.py +0 -0
  207. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pilot_setup.py +0 -0
  208. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pilot_slots.py +0 -0
  209. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pr_issue_link_workflow.py +0 -0
  210. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_pr_verification.py +0 -0
  211. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_prerequisite_check.py +0 -0
  212. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_progress.py +0 -0
  213. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_progress_wiring.py +0 -0
  214. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_prompt_contract.py +0 -0
  215. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_public_contracts.py +0 -0
  216. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_public_helpers.py +0 -0
  217. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_publish_workflow.py +0 -0
  218. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_release_docs_workflow.py +0 -0
  219. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_release_extraction.py +0 -0
  220. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_release_ticket_templates.py +0 -0
  221. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_repo_config.py +0 -0
  222. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_resume_continue_e2e.py +0 -0
  223. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_resume_e2e.py +0 -0
  224. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_resume_pr.py +0 -0
  225. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_review_merge.py +0 -0
  226. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_review_verdict.py +0 -0
  227. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_run_artifacts.py +0 -0
  228. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_run_fields.py +0 -0
  229. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_run_id_e2e.py +0 -0
  230. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_run_id_fixture.py +0 -0
  231. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_runner_config.py +0 -0
  232. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_runner_health.py +0 -0
  233. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_runner_source_freshness.py +0 -0
  234. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_scene.py +0 -0
  235. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_scheduler.py +0 -0
  236. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_seam.py +0 -0
  237. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_setup_output_golden.py +0 -0
  238. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_size_ratchet.py +0 -0
  239. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_split_command.py +0 -0
  240. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_src_layout.py +0 -0
  241. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_status_observe.py +0 -0
  242. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_steering_review.py +0 -0
  243. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_suggest.py +0 -0
  244. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_suite_hygiene.py +0 -0
  245. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_systemd_deploy.py +0 -0
  246. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_systemd_timer.py +0 -0
  247. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_ticket_command.py +0 -0
  248. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_ticket_command_registration.py +0 -0
  249. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_user_acceptance_contract.py +0 -0
  250. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_user_summary.py +0 -0
  251. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_versioned_comment_block.py +0 -0
  252. {orbi_cli-0.7.39 → orbi_cli-0.7.40}/tests/test_worktree_reclaim.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orbi-cli
3
- Version: 0.7.39
3
+ Version: 0.7.40
4
4
  Summary: Orbi — local AI development worker: claims GitHub Issues, runs Pi in isolated worktrees, and delivers PRs (GitHub Issues + labels are the only state store).
5
5
  Author: xqliu
6
6
  License-Expression: AGPL-3.0-only OR LicenseRef-Sustainable-Use-1.0
@@ -44,7 +44,7 @@ build-backend = "setuptools.build_meta"
44
44
 
45
45
  [project]
46
46
  name = "orbi-cli"
47
- version = "0.7.39"
47
+ version = "0.7.40"
48
48
  description = "Orbi — local AI development worker: claims GitHub Issues, runs Pi in isolated worktrees, and delivers PRs (GitHub Issues + labels are the only state store)."
49
49
  readme = "README.md"
50
50
  requires-python = ">=3.14"
@@ -18,4 +18,4 @@ the package would shadow the installed package for every process with
18
18
  the checkout root on sys.path. The direct-execution compatibility entry
19
19
  is `python3 -m orbi.cli` (development path only).
20
20
  """
21
- __version__ = "0.7.39"
21
+ __version__ = "0.7.40"
@@ -106,6 +106,9 @@ DECLINE = frozenset({"n", "no", "cancel", "q", "quit"})
106
106
  # never converges must fail fast instead of spinning forever.
107
107
  MAX_ROUNDS = 12
108
108
 
109
+ # The marker the hosted page keys on: a question's recommended option is FIRST.
110
+ RECOMMENDED_MARK = "(Recommended)"
111
+
109
112
  # The one rule that replaced the skill's "draft only the first slice": the
110
113
  # check reports single_outcome for a request that bundles independent
111
114
  # deliverables, so the drafter splits it BEFORE the check ever sees it.
@@ -133,8 +136,14 @@ DRAFTING_RULES = (
133
136
  "- Ask a question only when, after reading the repository, the request "
134
137
  "itself still does not say what to build — it is empty or contradicts "
135
138
  "itself — and no deliverable default version can be written. Then ask "
136
- "at most three questions, one sentence each, with no suggested "
137
- "answer.\n"
139
+ "at most three questions in one call, each with a header of one to "
140
+ "three words naming the decision and 2 to 4 options, every option a "
141
+ "label of one to five words plus one sentence of what it means or "
142
+ "its trade-off. A recommended option, when one exists, is FIRST and "
143
+ "its label ends with \"" + RECOMMENDED_MARK + "\". Never add a "
144
+ "\"Other\" option: the page adds the person's own answer row "
145
+ "itself, and never say the person chose the recommended option: "
146
+ "they answer in their own words.\n"
138
147
  "- Every other disagreement — which library, font or place to use, "
139
148
  "what to leave out, how to word a deliverable version of a request "
140
149
  "that cannot be done as asked — is a decision: take the most "
@@ -193,12 +202,40 @@ class DraftIssue:
193
202
  return data
194
203
 
195
204
 
205
+ @dataclass(frozen=True)
206
+ class DraftOption:
207
+ """One choice a question offers: a short label and what it means."""
208
+
209
+ label: str
210
+ description: str
211
+
212
+ def as_json(self) -> dict:
213
+ return {"label": self.label, "description": self.description}
214
+
215
+
216
+ @dataclass(frozen=True)
217
+ class DraftQuestion:
218
+ """One question as the hosted page reads it (Issue #2136): a header
219
+ naming the decision and 2–4 options, the recommended one first."""
220
+
221
+ question: str
222
+ header: str
223
+ options: tuple[DraftOption, ...]
224
+
225
+ def as_json(self) -> dict:
226
+ return {
227
+ "question": self.question,
228
+ "header": self.header,
229
+ "options": [option.as_json() for option in self.options],
230
+ }
231
+
232
+
196
233
  @dataclass(frozen=True)
197
234
  class DraftAnswer:
198
235
  """One drafting-session answer: questions, or a draft, never both."""
199
236
 
200
237
  reply: str
201
- questions: tuple[str, ...] = ()
238
+ questions: tuple[DraftQuestion, ...] = ()
202
239
  issues: tuple[DraftIssue, ...] = ()
203
240
 
204
241
 
@@ -207,7 +244,7 @@ class DraftRound:
207
244
  """One round as the caller reads it (the stdout contract)."""
208
245
 
209
246
  reply: str
210
- questions: tuple[str, ...] = ()
247
+ questions: tuple[DraftQuestion, ...] = ()
211
248
  issues: tuple[DraftIssue, ...] = ()
212
249
  check: str | None = None
213
250
  warning: str | None = None
@@ -215,7 +252,7 @@ class DraftRound:
215
252
  def as_json(self) -> dict:
216
253
  data: dict = {
217
254
  "reply": self.reply,
218
- "questions": list(self.questions),
255
+ "questions": [question.as_json() for question in self.questions],
219
256
  "issues": [issue.as_json() for issue in self.issues],
220
257
  }
221
258
  if self.check is not None:
@@ -231,6 +268,11 @@ def _invalid(detail: str) -> DraftError:
231
268
  return DraftError("invalid_input", "read stdin", detail)
232
269
 
233
270
 
271
+ def _unreadable(detail: str) -> DraftError:
272
+ """One answer the engine cannot read as a question (Issue #2136)."""
273
+ return DraftError("no_answer", "read the draft", detail)
274
+
275
+
234
276
  def read_payload(text: str) -> dict:
235
277
  """Parse one stdin document; a non-object or broken JSON fails fast."""
236
278
  try:
@@ -293,6 +335,61 @@ def parse_issues(value: object) -> tuple[DraftIssue, ...]:
293
335
  return tuple(issues)
294
336
 
295
337
 
338
+ def parse_options(value: object, position: int) -> tuple[DraftOption, ...]:
339
+ """Validate one question's options: 2 to 4, each a label and a sentence.
340
+
341
+ The recommended option is FIRST: that is the position the hosted page
342
+ preselects from, so a marker anywhere else contradicts the page.
343
+ """
344
+ if not isinstance(value, list) or not 2 <= len(value) <= 4:
345
+ raise _unreadable(f"question {position} needs 2 to 4 options")
346
+ options: list[DraftOption] = []
347
+ for index, entry in enumerate(value, start=1):
348
+ if not isinstance(entry, dict):
349
+ raise _unreadable(
350
+ f"question {position}, option {index} is not an object")
351
+ label = entry.get("label")
352
+ description = entry.get("description")
353
+ if not isinstance(label, str) or not label.strip():
354
+ raise _unreadable(
355
+ f"question {position}, option {index} has no label")
356
+ if not isinstance(description, str) or not description.strip():
357
+ raise _unreadable(
358
+ f"question {position}, option {index} has no description")
359
+ options.append(
360
+ DraftOption(label=label.strip(), description=description.strip())
361
+ )
362
+ marked = [index for index, option in enumerate(options)
363
+ if option.label.endswith(RECOMMENDED_MARK)]
364
+ if marked and marked[0] != 0:
365
+ raise _unreadable(
366
+ f"question {position}: the recommended option must come first")
367
+ return tuple(options)
368
+
369
+
370
+ def parse_questions(value: object) -> tuple[DraftQuestion, ...]:
371
+ """Validate a round's questions: the object shape the hosted page
372
+ renders as option buttons — a header, 2–4 options, recommended first.
373
+ A bare string question carries no options, so the page cannot show it.
374
+ """
375
+ if not isinstance(value, list) or not value:
376
+ raise _unreadable("the answer carries no questions")
377
+ questions: list[DraftQuestion] = []
378
+ for position, entry in enumerate(value, start=1):
379
+ if not isinstance(entry, dict):
380
+ raise _unreadable(f"question {position} is not an object")
381
+ question, header = entry.get("question"), entry.get("header")
382
+ if not isinstance(question, str) or not question.strip():
383
+ raise _unreadable(f"question {position} has no question")
384
+ if not isinstance(header, str) or not header.strip():
385
+ raise _unreadable(f"question {position} has no header")
386
+ questions.append(DraftQuestion(
387
+ question=question.strip(), header=header.strip(),
388
+ options=parse_options(entry.get("options"), position),
389
+ ))
390
+ return tuple(questions)
391
+
392
+
296
393
  def parse_answer(value: object) -> DraftAnswer:
297
394
  """Parse the extension's answer file: a questions or a draft answer."""
298
395
  if not isinstance(value, dict):
@@ -307,22 +404,10 @@ def parse_answer(value: object) -> DraftAnswer:
307
404
  "no_answer", "read the draft", "the answer carries no reply",
308
405
  )
309
406
  if kind == "questions":
310
- questions = value.get("questions")
311
- if not isinstance(questions, list):
312
- raise DraftError(
313
- "no_answer", "read the draft",
314
- "the answer carries no questions",
315
- )
316
- kept = tuple(
317
- str(question).strip() for question in questions
318
- if str(question).strip()
407
+ return DraftAnswer(
408
+ reply=reply,
409
+ questions=parse_questions(value.get("questions")),
319
410
  )
320
- if not kept:
321
- raise DraftError(
322
- "no_answer", "read the draft",
323
- "the answer carries no questions",
324
- )
325
- return DraftAnswer(reply=reply, questions=kept)
326
411
  if kind == "draft":
327
412
  return DraftAnswer(reply=reply, issues=parse_issues(value.get("issues")))
328
413
  raise DraftError(
@@ -101,7 +101,14 @@ def _interactive(
101
101
  for position, question in enumerate(
102
102
  round_.questions, start=1,
103
103
  ):
104
- print(f"Q{position} — {question}", file=stdout)
104
+ print(
105
+ f"Q{position} — {question.question}", file=stdout,
106
+ )
107
+ for option in question.options:
108
+ print(
109
+ f" - {option.label}: {option.description}",
110
+ file=stdout,
111
+ )
105
112
  answer = _ask(stdin, stdout, "Your answers: ")
106
113
  if answer is None:
107
114
  return _declined(stdout)
@@ -71,15 +71,56 @@ const draftParameters = Type.Object(
71
71
  { additionalProperties: false },
72
72
  );
73
73
 
74
+ /**
75
+ * Issue #2136: a question is the object the hosted page renders as option
76
+ * buttons, never a bare string. The header names the decision (the page shows
77
+ * it as the question's chip) and the options are the person's choices; the
78
+ * page adds the person's own answer row itself, so there is no "Other" option
79
+ * here.
80
+ */
81
+ const askOption = Type.Object(
82
+ {
83
+ label: Type.String({
84
+ minLength: 1,
85
+ description: "One to five words: the choice the person picks",
86
+ }),
87
+ description: Type.String({
88
+ minLength: 1,
89
+ description: "One sentence: what it means or its trade-off",
90
+ }),
91
+ },
92
+ { additionalProperties: false },
93
+ );
94
+
95
+ const askQuestion = Type.Object(
96
+ {
97
+ question: Type.String({
98
+ minLength: 1,
99
+ description: "One sentence, in the person's language",
100
+ }),
101
+ header: Type.String({
102
+ minLength: 1,
103
+ description: "One to three words naming the decision, e.g. Sharing",
104
+ }),
105
+ options: Type.Array(askOption, {
106
+ minItems: 2,
107
+ maxItems: 4,
108
+ description:
109
+ "The 2 to 4 choices; when one is the reasonable default, it is FIRST and its label ends with (Recommended)",
110
+ }),
111
+ },
112
+ { additionalProperties: false },
113
+ );
114
+
74
115
  const askParameters = Type.Object(
75
116
  {
76
117
  reply: Type.String({
77
118
  description: "One plain-language sentence for the person",
78
119
  }),
79
- questions: Type.Array(Type.String({ minLength: 1 }), {
120
+ questions: Type.Array(askQuestion, {
80
121
  minItems: 1,
81
122
  maxItems: 3,
82
- description: "The numbered questions to ask, in the person's language",
123
+ description: "The questions to ask, in the person's language",
83
124
  }),
84
125
  },
85
126
  { additionalProperties: false },
@@ -116,10 +157,16 @@ export const askUserTool = {
116
157
  name: ASK_USER_TOOL,
117
158
  label: "Ask the person",
118
159
  description:
119
- "Ask the person up to three questions, one sentence each and with no " +
120
- "suggested answer. Call this only when the request itself does not " +
121
- "say what to build and no deliverable default can be written, and " +
122
- "never in the same turn as write_draft.",
160
+ "Ask the person up to three questions in one call. Each question " +
161
+ "carries a header of one to three words naming the decision and 2 " +
162
+ "to 4 options, every option a label plus one sentence of what it " +
163
+ "means or its trade-off. When one option is the reasonable default, " +
164
+ "put it FIRST and end its label with (Recommended); never add an " +
165
+ "Other option, because the person's own answer is always allowed. " +
166
+ "Never say the person chose the recommended option. Call this only " +
167
+ "when the request itself does not say what to build and no " +
168
+ "deliverable default can be written, and never in the same turn as " +
169
+ "write_draft.",
123
170
  parameters: askParameters,
124
171
  async execute(_toolCallId: string, args: object) {
125
172
  return writeAnswer("questions", args);
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orbi-cli
3
- Version: 0.7.39
3
+ Version: 0.7.40
4
4
  Summary: Orbi — local AI development worker: claims GitHub Issues, runs Pi in isolated worktrees, and delivers PRs (GitHub Issues + labels are the only state store).
5
5
  Author: xqliu
6
6
  License-Expression: AGPL-3.0-only OR LicenseRef-Sustainable-Use-1.0
@@ -936,12 +936,14 @@ def test_skill_drafts_the_nearest_version_the_code_can_deliver():
936
936
 
937
937
  # The skill may ask only when the request itself says too little and no
938
938
  # deliverable default version can be written; every other disagreement is a
939
- # line under Assumptions. The "Q1 — … ➜ recommended: …" template and the
940
- # "All recommended" reply are gone.
939
+ # line under Assumptions. The "➜ recommended: …" template and the
940
+ # "All recommended" reply are gone, while a question carries the option shape
941
+ # the hosted page renders (Issue #2136).
941
942
  ASSUMPTION_RULE_PHRASES = (
942
943
  "Ask the person only when",
943
944
  "no deliverable default version can be written",
944
- "no suggested answer",
945
+ "2 to 4 options",
946
+ "the person's own answer",
945
947
  "what you chose and why",
946
948
  )
947
949
 
@@ -950,14 +952,15 @@ def check_skill_writes_a_default_answer_as_an_assumption(
950
952
  plugin_dir: Path = PLUGIN_DIR,
951
953
  ) -> None:
952
954
  """Issue #2133: a default answer is an assumption line, and a question is
953
- the narrow empty/contradictory-request case with no suggested answer."""
955
+ the narrow empty/contradictory-request case. Issue #2136: that question
956
+ carries 2–4 options, a recommended one first."""
954
957
  flat = " ".join(read_plugin_file(plugin_dir, SKILL_REL).split())
955
958
  for phrase in ASSUMPTION_RULE_PHRASES:
956
959
  assert phrase in flat, (
957
960
  f"{SKILL_REL}: missing {phrase!r}, so a question with a default "
958
- "answer can come back (Issue #2133)"
961
+ "answer can come back (Issue #2133, #2136)"
959
962
  )
960
- for removed in ("recommended", "All recommended", "➜"):
963
+ for removed in ("All recommended", "➜"):
961
964
  assert removed not in flat, (
962
965
  f"{SKILL_REL}: the {removed!r} question form is gone "
963
966
  "(Issue #2133)"
@@ -62,6 +62,15 @@ THREE_ISSUES = [
62
62
 
63
63
  FIDELITY_RULES = "Fidelity: remove what the person did not ask for."
64
64
 
65
+ # Two options in the shape a question carries (Issue #2136), the recommended
66
+ # one first and marked the way the hosted page keys on it.
67
+ TWO_OPTIONS = [
68
+ {"label": "A local store (Recommended)",
69
+ "description": "Keeps everything in one file."},
70
+ {"label": "A remote store",
71
+ "description": "Reads and writes through a server."},
72
+ ]
73
+
65
74
 
66
75
  # --- the fixtures --------------------------------------------------------
67
76
 
@@ -191,7 +200,10 @@ def test_a_round_that_only_asks_questions_returns_no_issues(
191
200
  assert code == 0, err
192
201
  answer = json.loads(out)
193
202
  assert answer["issues"] == []
194
- assert answer["questions"] == ["Which store?", "Which language?"]
203
+ assert [
204
+ question["question"] for question in answer["questions"]
205
+ ] == ["Which store?", "Which language?"]
206
+ assert answer["questions"][0]["header"] == "Choice"
195
207
  assert "check" not in answer
196
208
 
197
209
 
@@ -866,8 +878,43 @@ def test_a_create_payload_names_its_own_bad_fields(
866
878
  (123, "no answer"),
867
879
  ({"kind": "draft", "issues": TWO_ISSUES}, "no reply"),
868
880
  ({"kind": "questions", "reply": "x", "questions": "a"}, "no questions"),
869
- ({"kind": "questions", "reply": "x", "questions": [" "]},
881
+ ({"kind": "questions", "reply": "x", "questions": []},
870
882
  "no questions"),
883
+ ({"kind": "questions", "reply": "x", "questions": ["Which store?"]},
884
+ "question 1 is not an object"),
885
+ ({"kind": "questions", "reply": "x", "questions": [{
886
+ "question": "Which store?", "options": TWO_OPTIONS,
887
+ }]}, "question 1 has no header"),
888
+ ({"kind": "questions", "reply": "x", "questions": [{
889
+ "question": " ", "header": "Store", "options": TWO_OPTIONS,
890
+ }]}, "question 1 has no question"),
891
+ ({"kind": "questions", "reply": "x", "questions": [{
892
+ "question": "Which store?", "header": "Store",
893
+ "options": TWO_OPTIONS[:1],
894
+ }]}, "needs 2 to 4 options"),
895
+ ({"kind": "questions", "reply": "x", "questions": [{
896
+ "question": "Which store?", "header": "Store",
897
+ "options": TWO_OPTIONS * 3,
898
+ }]}, "needs 2 to 4 options"),
899
+ ({"kind": "questions", "reply": "x", "questions": [{
900
+ "question": "Which store?", "header": "Store", "options": "both",
901
+ }]}, "needs 2 to 4 options"),
902
+ ({"kind": "questions", "reply": "x", "questions": [{
903
+ "question": "Which store?", "header": "Store",
904
+ "options": ["Local", TWO_OPTIONS[1]],
905
+ }]}, "option 1 is not an object"),
906
+ ({"kind": "questions", "reply": "x", "questions": [{
907
+ "question": "Which store?", "header": "Store",
908
+ "options": [{"description": "Keeps it local."}, TWO_OPTIONS[1]],
909
+ }]}, "option 1 has no label"),
910
+ ({"kind": "questions", "reply": "x", "questions": [{
911
+ "question": "Which store?", "header": "Store",
912
+ "options": [{"label": "Local"}, TWO_OPTIONS[1]],
913
+ }]}, "option 1 has no description"),
914
+ ({"kind": "questions", "reply": "x", "questions": [{
915
+ "question": "Which store?", "header": "Store",
916
+ "options": [TWO_OPTIONS[1], TWO_OPTIONS[0]],
917
+ }]}, "recommended option must come first"),
871
918
  ({"kind": "weird", "reply": "x"}, "unknown answer kind"),
872
919
  ],
873
920
  )
@@ -1153,11 +1200,14 @@ DRAFT_FIXTURES = Path(__file__).resolve().parent / "fixtures" / "draft"
1153
1200
 
1154
1201
 
1155
1202
  def model_answer(name: str) -> dict:
1156
- """One real model answer, as the shipped extension hands it to the engine.
1157
-
1158
- The fixtures are the issue author's own real model runs
1159
- (`tests/fixtures/draft/`); the extension adds the `kind` the engine reads,
1160
- and the round document's `check` field is not a tool argument.
1203
+ """One model answer, as the shipped extension hands it to the engine.
1204
+
1205
+ `font-professional.en.json` is the issue author's own real model run.
1206
+ `empty-request.zh.json` keeps that run's three questions and carries the
1207
+ option shape Issue #2136 requires, written by hand: the pre-#2136 model
1208
+ could not emit options, and the tool's typed parameters now enforce the
1209
+ shape on the model. The extension adds the `kind` the engine reads, and
1210
+ the round document's `check` field is not a tool argument.
1161
1211
  """
1162
1212
  fixture = json.loads((DRAFT_FIXTURES / name).read_text(encoding="utf-8"))
1163
1213
  kind = "draft" if fixture["issues"] else "questions"
@@ -1202,11 +1252,13 @@ def test_a_real_answer_with_a_default_choice_drafts_with_assumptions(
1202
1252
  assert "recommended" not in body.lower()
1203
1253
 
1204
1254
 
1205
- def test_a_real_answer_to_an_empty_request_asks_without_a_suggested_answer(
1255
+ def test_a_real_answer_to_an_empty_request_asks_with_an_option_shape(
1206
1256
  config, sessions, monkeypatch, tmp_path,
1207
1257
  ):
1208
- """A request that says too little is the one case that asks: three plain
1209
- questions, none of them carrying a suggested answer."""
1258
+ """A request that says too little is the one case that asks: three
1259
+ questions, each carrying a header and 2–4 options the person can pick,
1260
+ a recommended one first — the object shape the hosted page reads
1261
+ (Issue #2136)."""
1210
1262
  draft_fakes.judge_passing(monkeypatch)
1211
1263
  sessions.queue(model_answer("empty-request.zh.json"))
1212
1264
  code, out, err = run_round_cli(
@@ -1217,18 +1269,36 @@ def test_a_real_answer_to_an_empty_request_asks_without_a_suggested_answer(
1217
1269
  assert answer["issues"] == []
1218
1270
  assert len(answer["questions"]) == 3
1219
1271
  for question in answer["questions"]:
1220
- assert "recommended" not in question.lower()
1221
- assert "推荐" not in question
1222
-
1223
-
1224
- def test_the_drafting_rules_never_offer_a_suggested_answer():
1225
- """The prompt must not teach the removed "➜ recommended" shape: a default
1226
- answer is a written assumption, and a question is the narrow
1227
- empty-request case."""
1272
+ assert set(question) == {"question", "header", "options"}
1273
+ assert question["question"].strip()
1274
+ assert question["header"].strip()
1275
+ options = question["options"]
1276
+ assert 2 <= len(options) <= 4
1277
+ for option in options:
1278
+ assert set(option) == {"label", "description"}
1279
+ assert option["label"].strip()
1280
+ assert option["description"].strip()
1281
+ marked = [
1282
+ position for position, option in enumerate(options)
1283
+ if option["label"].endswith(draft.RECOMMENDED_MARK)
1284
+ ]
1285
+ assert marked, "the fixture marks a recommended option"
1286
+ assert marked == [0], "the recommended option comes first"
1287
+
1288
+
1289
+ def test_the_drafting_rules_teach_the_option_shape():
1290
+ """The prompt teaches the shape the hosted page renders: a header,
1291
+ 2–4 options and a recommended one first. The orbi#2133 "how" (a bare
1292
+ question with no suggested answer) is replaced; its "when" stays, with
1293
+ every other disagreement recorded under Assumptions."""
1228
1294
  prompt = draft.draft_system_prompt()
1229
- assert "recommended" not in prompt.lower()
1230
- assert "no suggested answer" in prompt
1295
+ assert draft.RECOMMENDED_MARK in prompt
1296
+ assert "header" in prompt
1297
+ assert "2 to 4 options" in prompt
1298
+ assert "the person's own answer" in prompt
1299
+ assert "no suggested answer" not in prompt
1231
1300
  assert "Assumptions" in prompt
1301
+ # The marker is data the model writes, never a string the CLI hardcodes.
1232
1302
  cli_source = Path(draft_cli.__file__).read_text(encoding="utf-8")
1233
1303
  assert "recommended" not in cli_source.lower()
1234
1304
 
@@ -1398,7 +1468,10 @@ def test_a_body_quoting_the_phrase_is_not_this_drafts_issue(
1398
1468
 
1399
1469
  def test_interactive_prints_no_empty_reply(config, sessions, monkeypatch):
1400
1470
  draft_fakes.judge_passing(monkeypatch)
1401
- sessions.queue({"kind": "questions", "reply": "", "questions": ["Q?"]})
1471
+ sessions.queue({
1472
+ "kind": "questions", "reply": "",
1473
+ "questions": [draft_fakes.structured_question("Q?")],
1474
+ })
1402
1475
  out, err = io.StringIO(), io.StringIO()
1403
1476
  code = draft_cli.run_draft(
1404
1477
  config, REPO, request="add tags", stdin=io.StringIO(""),
@@ -1408,6 +1481,41 @@ def test_interactive_prints_no_empty_reply(config, sessions, monkeypatch):
1408
1481
  assert out.getvalue().startswith("Q1")
1409
1482
 
1410
1483
 
1484
+ def test_interactive_prints_each_option_under_its_question(
1485
+ config, sessions, monkeypatch,
1486
+ ):
1487
+ """The person sees the choices, recommended one first, under the
1488
+ question they answer in typed text (Issue #2136)."""
1489
+ draft_fakes.judge_passing(monkeypatch)
1490
+ sessions.queue_questions({
1491
+ "question": "What should the other person get?",
1492
+ "header": "Sharing",
1493
+ "options": [
1494
+ {"label": "A read-only link (Recommended)",
1495
+ "description": "Opens the list, cannot change it."},
1496
+ {"label": "An editable link",
1497
+ "description": "Lets whoever holds it change the list."},
1498
+ ],
1499
+ })
1500
+ out, err = io.StringIO(), io.StringIO()
1501
+ code = draft_cli.run_draft(
1502
+ config, REPO, request="share my notes", stdin=io.StringIO(""),
1503
+ stdout=out, stderr=err,
1504
+ )
1505
+ assert code == 0
1506
+ text = out.getvalue()
1507
+ assert "Q1 — What should the other person get?" in text
1508
+ question_at = text.index("Q1 —")
1509
+ first_at = text.index(
1510
+ "A read-only link (Recommended): Opens the list, cannot change it.",
1511
+ )
1512
+ second_at = text.index(
1513
+ "An editable link: Lets whoever holds it change the list.",
1514
+ )
1515
+ assert question_at < first_at < second_at
1516
+ assert "Nothing was created." in text
1517
+
1518
+
1411
1519
  def test_the_cli_handler_dispatches_to_the_command(
1412
1520
  config, capsys, tmp_path,
1413
1521
  ):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes