Skip to content

feat(skills): ask blocking questions one at a time - #135

Merged
datacas merged 3 commits into
mainfrom
issue-132-ask-one-at-a-time
Sep 30, 2026
Merged

datacas merged 3 commits into
mainfrom
issue-132-ask-one-at-a-time

Conversation

@datacas

@datacas datacas commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Closes #132 — #132

Summary

A stop that needs a person's decision now leads with one summary line and asks its questions one at a time — context, two to four options with the recommended one first, and free text — instead of ending with every finding, piece of evidence, and proposed edit at once.

  • New runtime module scripts/stop_questions.py: the questions contract (id, prompt, options, recommended, blocks), validation, and asking order (the question that settles the most first).
  • issue_review.result_errors accepts an optional questions list and requires each blocks entry to name one of the result's own IR-NNN/IU-NNN identifiers.
  • run_cycle.py prints a readiness stop as decisions: N needed, the questions in asking order, then the findings under details (show on request):.
  • New shared section ## Asking the user in every cycle skill and cc-provider-bootstrap: host question tool when available (AskUserQuestion, coordinator channel), one numbered question per message otherwise, never a wall of text; details on request; answers fed to the resumed stage; work-item edits only after confirmation; delegated stages return questions instead of asking.
  • Stage-specific wiring: issue-review report and example, orchestrator issue-review gate and final result, bootstrap missing values, implement-issue stopping decisions, resolve-comments needs_clarification, Orca worker questions.
  • Validator: the section is byte-identical across its group, states the rule, and its example passes stop_questions.questions_errors.

Diagnosis

Work units

Unit Behaviour Files Tests Verification Rollback
WU-1 questions contract, issue-review acceptance, question-first runtime report scripts/stop_questions.py, scripts/issue_review.py, scripts/run_cycle.py, scripts/runtime.manifest tests/test_stop_questions.py (new), tests/test_issue_review.py python3 -m unittest discover -s tests → exit 0, 955 tests dependent: revert together with WU-2, whose validator check imports stop_questions
WU-2 Shared Asking the user section, stage wiring, validator group and example check, docs skills/*/SKILL.md (8 skills), scripts/validate-package.py, tests/test_validate_package.py, docs/review-cycle.md, docs/workflows.md, CONTRIBUTING.md, CHANGELOG.md tests/test_validate_package.py (5 new) python3 scripts/validate-package.py → exit 0; python3 -m unittest discover -s tests → exit 0, 960 tests independent

Verification (agent-reported)

  • python3 scripts/validate-package.py → exit 0 (VALID: 15 skills (7 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned)
  • python3 -m unittest discover -s tests → exit 0, Ran 960 tests, OK

Environment: the suite ran locally on Linux (WSL) with Python 3 and uses no global Git identity or credentials for these tests; CI additionally runs Windows and real installations.

Not in scope

  • Telemetry does not record question counts or prose (the no-prose boundary stays).
  • No change to how findings are published on the change request.

Accept an optional `questions` list in the issue-review result, validated
by the new stop_questions module, and print a stop as one decisions line
and the questions in asking order before the findings and evidence.
Add a shared "Asking the user" section to every cycle skill and
cc-provider-bootstrap: one summary line, then one question at a time with
two to four options, the recommended one first, and free text. Delegated
stages return a `questions` list instead of asking. The validator keeps
the section identical and checks its example against stop_questions.
@datacas

datacas commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20260930-001] · manual · unknown/gpt-6.1-sol→? · low · schema:1

Review: CHANGES_REQUESTED

Reviewed the complete accumulated diff from main to b10fe5d469edf589be5439e9dec378b75247494a: 20 files, 977 insertions and 27 deletions, including both commits. Scope matches #132: question validation, readiness reporting, shared skill instructions, documentation, and tests. Repository conventions from AGENTS.md and CONTRIBUTING.md were applied. The configured trusted-author list is datacas; there were no previous review findings or threads to recover.

[REV-001] · high · open · - · blocks:yes — Make readiness stops actually defer questions and details

Affected path: scripts/run_cycle.py:501 (_readiness_lines, consumed by CycleReport.explain() and printed by the CLI).

The formatter iterates through every question, then unconditionally appends every finding, evidence reference, proposed change, and uncertainty. The heading details (show on request): does not defer any output. A stop with two questions therefore presents both questions and all details before either answer. This fails both acceptance criteria in #132: questions must follow answers sequentially, and no stop may dump the full findings/evidence unless requested. The new driver test explicitly expects the complete dump, so passing tests currently preserve the wrong behavior.

Keep the full result available separately and make the default user-facing stop concise. Ask one question, accept its answer, then advance; if a host agent owns the interaction, provide it the structured result without also dumping all details to the CLI user. Add a boundary test proving that the second question and full findings are absent before the first answer or an explicit details request.

[REV-002] · medium · open · - · blocks:no — Allow question payloads consistently in delegated review results

Affected paths: skills/cc-initial-review/SKILL.md:99 and skills/cc-rereview/SKILL.md:100; conflicting final-result instructions at lines 625 and 579 respectively.

The new shared section requires delegated stages to return questions in their structured result. Both review skills still restrict that result to “identifiers and status only,” while questions necessarily contain prompt and option prose. A delegated decision-backed BLOCKED review therefore has incompatible instructions about the payload its coordinator needs. cc-resolve-comments already adds an explicit exception for questions; give initial review and rereview the equivalent exception for stops that need a user decision. This is confirmed by instruction inspection; live model adherence was not tested.

Security triage

No repository-specific security_review.always_when rule is declared. The default sensitivity rule activates the audit because the diff adds validation and rendering of untrusted executor question input (stop_questions.py, issue_review.py, and run_cycle.py). The delegated cc-security-review pass found no confirmed vulnerability in the changed surface: question IDs and references are validated, prompt/options use the existing terminal-control filtering, and questions do not bypass readiness gates. Unrelated existing surfaces were outside this audit.

Verification

Preflight succeeded: this Python validator/test workflow needs no application configuration, database service, ports, or migrations; telemetry for the boundary reproduction was disposable. The delegated cc-verify pass ran:

  • python3 -m unittest discover -s tests -p test_stop_questions.py -v — exit 0, 9 tests.
  • python3 -m unittest discover -s tests -p test_issue_review.py -v — exit 0, 54 tests.
  • python3 -m unittest discover -s tests -p test_validate_package.py -v — final exit 0, 57 tests.
  • python3 scripts/validate-package.py — exit 0.
  • python3 -m unittest discover -s tests -v > /tmp/pr135-verify-full.log 2>&1 — exit 0, Ran 960 tests in 50.561s, OK.
  • git diff --check origin/main...HEAD — exit 0.
  • python3 /tmp/pr135-boundary.py — exit 1 with the expected HUMAN_INTERVENTION status. The disposable harness invokes the actual CLI parser and main() with scripted executor adapters. No input was supplied. Its output contains:
  decisions: 2 needed
  question 1/2 Q-001: Which acceptance result?
    options: Result A (recommended) | Result B | free text
  question 2/2 Q-002: Which second decision?
    options: Choice A | Choice B | free text
  details (show on request):
  finding: IR-001 high blocks acceptance_verification: Full diagnostic details exposed before answering [work_item:API-7]
    proposed: Change acceptance criteria

That observed output confirms REV-001. Verification conclusion: failed for the requested user-facing behavior, despite passing automated checks. The harness exercises the actual CLI logic with an injected adapter, not a live model or external executor process.

An initial package-test attempt encountered a transient .aws disappearance while copying the checkout; its native rerun passed. An initial full-suite attempt exceeded the processing tool's timeout; the complete native rerun passed. Neither initial attempt was counted as successful evidence.

CI and residual risks

gh pr checks 135 exited 0. Both Skills, manifests, and Bash installer checks and both PowerShell installer checks passed. These are the two jobs defined by Validate package, run for push and pull request; none are missing, pending, failed, cancelled, or skipped. PR #135 is not a draft. Provider metadata confirms the current head still equals the reviewed SHA above.

The runtime boundary finding prevents approval despite passing CI. Host-specific conversational behavior and real model adherence to the new instructions remain unverified. Schema validation establishes payload shape, not whether a recommendation is semantically trustworthy.

Verdict: CHANGES_REQUESTED. Blocking finding: REV-001.

@datacas

datacas commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

[CCT-20260930-001] · manual · anthropic/opus→? · high · triaged:b10fe5d469edf589be5439e9dec378b75247494a · schema:1

Triage

Every finding in [CCR-20260930-001] was classified against b10fe5d469edf589be5439e9dec378b75247494a before any code change.

[REV-001] · high · open · valid · blocks:yes — Make readiness stops actually defer questions and details

Valid. _readiness_lines prints every question and then every finding under a heading that defers nothing, so a CLI user sees the whole dump. The runtime is not interactive (it may run detached), so it cannot wait for answers itself; the fix is to print the summary line and only the first question, and write the ordered questions and the details to a file the coordinator reads to ask the rest and show details on request.

[REV-002] · medium · open · valid · blocks:no — Allow question payloads consistently in delegated review results

Valid. cc-initial-review and cc-rereview restrict the block to identifiers and status, which contradicts returning questions. They get the same exception cc-resolve-comments already has.

Save every question, finding, and uncertainty to an owner-only decisions
record beside the telemetry database instead of printing them, and let
initial review and rereview carry questions in their structured result.
@datacas

datacas commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20260930-001] · manual · unknown/gpt-6.1-sol→? · low · schema:1

[CCT-20260930-001] · manual · anthropic/opus→? · high · triaged:b10fe5d469edf589be5439e9dec378b75247494a · schema:1

Resolution: RESOLVED

Every finding was triaged against b10fe5d469edf589be5439e9dec378b75247494a before editing; both fixes are in 0d1140c9b3fe2cd98b39f62e3b2eba86cd3f485b.

[REV-001] · high · resolved · valid · blocks:yes — Make readiness stops actually defer questions and details

scripts/run_cycle.py: _readiness_lines now prints only decisions: N needed, the first question with its options and free text, and a details: line. save_decisions writes every question in asking order with the findings and uncertainties to decisions/decisions-<stamp>-<pid>.json beside the telemetry database (mode 0600, outside the status directory that cycle_status.py scans). The runtime is not interactive, so the coordinator asks the next question from that record; both orchestrators' shared gate section now says so. Boundary test ConfigurationTests.test_the_cli_prints_one_question_and_saves_the_rest runs run_cycle.main() and asserts the second question and finding prose are absent from stdout and present in the saved record; driver tests assert the same for CycleReport.explain().

[REV-002] · medium · resolved · valid · blocks:no — Allow question payloads consistently in delegated review results

cc-initial-review and cc-rereview final results now carry the same questions exception as cc-resolve-comments. The validator rejects any skill in the asking group whose result allows identifiers and status only without that exception (test_rejects_a_result_that_forbids_the_prose_of_questions).

Verification (agent-reported)

  • python3 -m unittest discover -s tests — exit 0, Ran 963 tests, OK
  • python3 scripts/validate-package.py — exit 0
  • git diff --check — exit 0

The local run shares no global Git identity or credentials with these tests; CI additionally covers Windows and real installations. Live model adherence to the skill wording remains untested.

Checks of 0d1140c9b3fe2cd98b39f62e3b2eba86cd3f485b

  • Skills, manifests, and Bash installer — pass (×2)
  • PowerShell installer — pass (×2)

Residual risk: the decisions record holds the stage's untrusted prose on local disk (owner-only), consistent with the detached log that already does.

@datacas

datacas commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

[CCR-20260930-002] · manual · unknown/gpt-6.1-sol→? · low · schema:1

Prior run records, preserved:

[CCR-20260930-001] · manual · unknown/gpt-6.1-sol→? · low · schema:1

[CCT-20260930-001] · manual · anthropic/opus→? · high · triaged:b10fe5d469edf589be5439e9dec378b75247494a · schema:1

Re-review: APPROVED

Reviewed the complete accumulated merge-base diff against main at 0d1140c9b3fe2cd98b39f62e3b2eba86cd3f485b: 21 files, 1127 insertions and 52 deletions. Also inspected the full changes since the previous reviewed head, b10fe5d469edf589be5439e9dec378b75247494a. Repository conventions from AGENTS.md and CONTRIBUTING.md were applied.

The runtime now prints only the first question and saves the ordered questions, findings, evidence, and proposed edits to a separate decisions record. The orchestrators explain how to retrieve subsequent questions and requested details. Initial review and rereview now explicitly permit question prose in delegated structured results, with a validator regression check.

Recovered both previous findings from the complete provider comment history, in chronological order, under trusted author datacas. Preserved the resolver's valid dispositions and the original severities, titles, and approval flags. No untrusted-author contract state, malformed records, ID gaps, or review threads were present.

Previous findings

[REV-001] · high · resolved · valid · blocks:yes — Make readiness stops actually defer questions and details

Corrected and verified by execution. The original CLI reproduction now prints decisions: 2 needed, only question 1/2 Q-001, its options, and a details: filepath. It does not print Q-002 or the finding/proposed-change prose. Reading that file verifies that both questions and the full finding/proposed change remain available, with mode 0600 on Linux. The runtime remains noninteractive; the host coordinator asks subsequent questions after answers, as the updated instructions specify.

[REV-002] · medium · resolved · valid · blocks:no — Allow question payloads consistently in delegated review results

Corrected and verified by execution of the package validator and test_rejects_a_result_that_forbids_the_prose_of_questions. Both review skills now have the explicit questions exception; the regression test removes it from a disposable skill copy and verifies rejection. Live model adherence was not tested.

New finding

[REV-003] · medium · open · - · blocks:no — Handle unencodable question text when saving decisions

Affected path: scripts/run_cycle.py:530 (json.dump(..., ensure_ascii=False) in save_decisions). Category: correctness.

A JSON-decoded prompt containing an escaped lone surrogate passes the question validator. For example, a prompt of 550 x characters followed by \ud800 stays below the 600-character schema limit. Its bounded terminal rendering encodes successfully, but saving the full prompt with ensure_ascii=False raises UnicodeEncodeError. The handler catches only OSError; because main() saves before printing, this prevents the CLI report from appearing and leaves a partial JSON file. This was reproduced through the actual CLI parser and main flow with scripted executor adapters.

Use JSON's ASCII escaping, or reject/handle unencodable text before persistence; prevent failed writes from leaving an apparently usable decisions record. Add a regression case for an escaped lone surrogate outside the rendered prompt's truncation boundary. This remains nonblocking because it requires malformed Unicode in executor output; the ordinary question flow is verified.

Security triage and audit

No repository-specific security_review.always_when rule is configured. The default sensitivity rule activates the audit for untrusted-input validation/rendering in stop_questions.py, issue_review.py, and run_cycle.py; the new persistence of stage prose also warrants it. The delegated cc-security-review pass found no confirmed security vulnerability in the changed surface under the default owner-controlled state directory. Newly created decisions files use mode 0600, their path is derived by the runtime, and questions do not change readiness gating.

Preexisting-file/symlink hardening and retention are conditional residual risks, not confirmed vulnerabilities: exploiting the former requires write access to the configured state directory. REV-003 is a correctness finding. Unrelated existing surfaces were outside this audit.

Verification

Preflight succeeded: the Python workflow needs no application configuration, service, port, or migration. Boundary runs used disposable state and scripted adapters, with no product-code edits or external publication by the executors.

  • python3 -m unittest discover -s tests -p test_issue_review.py -v — exit 0, 56 tests.
  • python3 -m unittest discover -s tests -p test_stop_questions.py -v — exit 0, 9 tests.
  • python3 -m unittest discover -s tests -p test_validate_package.py -v — exit 0, 58 tests.
  • python3 scripts/validate-package.py — exit 0, VALID: 15 skills (7 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned.
  • python3 -m unittest discover -s tests -v > /tmp/pr135-rereview-full.log 2>&1 — exit 0, Ran 963 tests in 39.770s, OK.
  • git diff --check origin/main...HEAD — exit 0.
  • python3 /tmp/pr135-boundary.py — expected exit 1 for HUMAN_INTERVENTION; assertions verify that the CLI hides subsequent questions/details and the saved record contains them with owner-only permissions.
  • python3 /tmp/pr135-encoding-boundary.py — exit 2, deliberately reporting the reproduced REV-003 failure: accepted escaped surrogate, successful bounded rendering, uncaught persistence encoding error, no CLI question output, and partial JSON left behind.

Ordinary behavior and both previous fixes are verified; verification has a reservation for the confirmed encoding edge case. Actual model behavior and host-specific question/answer continuation were not exercised; the runtime boundary used injected adapters rather than live model processes.

CI and verdict

gh pr checks 135 exited 0. Both Skills, manifests, and Bash installer checks and both PowerShell installer checks passed, covering the push and pull-request executions of the two Validate package jobs. No expected job is missing, pending, failed, cancelled, or skipped. PR #135 is not a draft. Provider metadata confirms that the current head equals the reviewed SHA, 0d1140c9b3fe2cd98b39f62e3b2eba86cd3f485b.

Project verdict: Approve with observations. Functional status: APPROVED. No open finding blocks approval. REV-003 is the remaining nonblocking observation; host conversational adherence and decisions-record retention remain residual risks.

@datacas
datacas merged commit de4f56d into main Sep 30, 2026
4 checks passed
@datacas
datacas deleted the issue-132-ask-one-at-a-time branch October 6, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ask blocking questions one at a time with options instead of stopping with a wall of text

1 participant