Skip to content

Add bedside ask and step for operator gates - #8

Merged
tig merged 3 commits into
mainfrom
feat/ask-step-gates
Jul 13, 2026
Merged

Add bedside ask and step for operator gates#8
tig merged 3 commits into
mainfrom
feat/ask-step-gates

Conversation

@tig

@tig tig commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • bedside ask: one structured yes/no or multi-choice gate (--id, --prompt, --choices, --default, --answer). Recommended option shown first. Exit 0 if recommended; 10 if alternate/needed; 30 setup.
  • bedside step: one human body/browser act with --expect in their words, --confirm / --decline. Exit 0 confirmed; 10 declined/needed; 30 setup.
  • UI-agnostic cores under commands/; fixture-friendly Record: lines; surface/README + root README + init AGENTS stub pointer.
  • Fixtures: known-good operator-gate-ask / operator-gate-step; known-bad multi-step-body-dump.

Closes #6

Test plan

  • pytest -q (27 passed)
  • bedside eval all fixtures match expect
  • bedside ask --id confirm-deploy --prompt Deploy? --choices yes,no --default no --answer no exits 0
  • bedside step --id plug-usb --prompt Plug USB --confirm exits 0

tig added 2 commits July 13, 2026 16:24
Encode human gates in tools so product AGENTS.md can point at ask/step
instead of restating multi-choice free-text manners. UI-agnostic cores,
exit 10 for declined or still-needed, fixtures and surface docs.

Closes #6
Resolve eval/README.md fixture table: keep choice-wall/structured-choice
from #7 and ask/step operator-gate fixtures from this branch.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 338a1a877a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/bedside/cli.py
Comment thread src/bedside/commands/ask_cmd.py
Comment thread src/bedside/commands/step_cmd.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an “operator gate” surface to Bedside by introducing bedside ask (structured choice gate) and bedside step (single human act with confirmation), implemented as UI-agnostic command cores under bedside.commands.*, wired into the argparse CLI, documented in surface and root READMEs, and exercised via new eval fixtures.

Changes:

  • Added new command cores for ask and step, plus CLI subcommands/flags and stable exit-code semantics (0/10/30).
  • Added eval fixtures (known-good operator-gate-ask / operator-gate-step, known-bad multi-step-body-dump) and documentation updates describing the operator-gate contract.
  • Added a dedicated test module for ask/step behavior and basic CLI integration, and bumped version to 0.1.2.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_ask_step.py New tests for ask/step cores, CLI wiring, and fixture eval integration.
surface/README.md Documents ask/step as preferred operator-gate verbs and codifies rules/exit codes.
src/bedside/exit_codes.py Documents stable meanings for exit codes, including new gate semantics.
src/bedside/commands/step_cmd.py Implements run_step core (prompt + optional expect + confirm/decline/pending paths).
src/bedside/commands/init_cmd.py Updates generated agent guidance to point to bedside ask / bedside step for human gates.
src/bedside/commands/ask_cmd.py Implements run_ask core (choices/default/recommended ordering + interactive/non-interactive handling).
src/bedside/cli.py Adds argparse subcommands for ask and step, and dispatch to the new cores.
src/bedside/init.py Version bump to 0.1.2.
README.md Documents new verbs and updated exit-code semantics.
pyproject.toml Version bump to 0.1.2.
eval/README.md Registers the new fixtures in the known-good/known-bad index.
eval/fixtures/known-good/operator-gate-step/transcript.md New known-good transcript illustrating bedside step.
eval/fixtures/known-good/operator-gate-step/meta.toml Fixture metadata for operator-gate-step.
eval/fixtures/known-good/operator-gate-ask/transcript.md New known-good transcript illustrating bedside ask.
eval/fixtures/known-good/operator-gate-ask/meta.toml Fixture metadata for operator-gate-ask.
eval/fixtures/known-bad/multi-step-body-dump/transcript.md New known-bad transcript illustrating batched physical steps + cliff.
eval/fixtures/known-bad/multi-step-body-dump/meta.toml Fixture metadata for multi-step-body-dump.
AGENTS.md Updates repo agent guidance to reference ask/step and clarify anti “choice wall” guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/bedside/commands/step_cmd.py Outdated
Comment thread src/bedside/commands/ask_cmd.py Outdated
Comment thread tests/test_ask_step.py
- Map argparse usage errors to SETUP_ERROR (30) for agent branching.
- Print ask/step prompt before blocking stdin read.
- Fix --no-wait Record line to wait=false.
- Enforce case-insensitive unique choices.
- Fail tests if shipped operator-gate fixtures are missing.
@tig
tig merged commit 868e3b8 into main Jul 13, 2026
2 checks passed
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.

Surface: bedside ask / step for operator gates (encode manners in tools, free agent context)

2 participants