Skip to content

feat: own the user-only /issue chat command + repo config#7

Closed
mabry1985 wants to merge 1 commit into
feat/write-ops-completefrom
feat/issue-command
Closed

feat: own the user-only /issue chat command + repo config#7
mabry1985 wants to merge 1 commit into
feat/write-ops-completefrom
feat/issue-command

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Stacked on #6 (write-ops). Base is feat/write-ops-complete; GitHub will retarget to main when #6 merges. Review the last commit for this PR's delta.

What

Brings the /issue chat control command into the plugin. Filing an issue is a write the model must not do autonomously, so — exactly like the core /goal — it's a user-only chat command, not an agent tool. The plugin owns it via protoAgent's new register_chat_command seam.

  • gh_issue.py — ported, host-free /issue logic: flag parsing (--bug/--feature/--repo/--label/--dry-run), the gate-conformance check (same body rules the CI issue gate enforces — a substantive body + Problem/Motivation; bugs want repro; features want proposal/acceptance), and gh issue create. run_issue_command(rest, *, default_repo) is the seam entry.
  • __init__.py — registers /issue when the host exposes register_chat_command, guarded by hasattr so an older host without the seam still loads the tools and just skips /issue (degrade-safe). The handler closes over the plugin's own configured default repo.
  • manifest — adds github.default_repo + github.repos config (and settings fields). Repo resolution (no silent misrouting): explicit --repo > default_repo > first of repos > GITHUB_DEFAULT_REPO/GH_REPO env > error.

Host requirement

/issue needs the host's chat-command seam (protoAgent #1334, unreleased). Rather than hard-gate min_protoagent_version (which would block the tools on current hosts), the registration is hasattr-guarded so the plugin degrades gracefully: full tools everywhere, /issue only where the seam exists.

Tests

  • test_gh_issue.py — parse/gate/file coverage (usage, no-repo, bad-repo, dry-run, files-and-returns-URL, default-repo routing, missing-sections block, gh-error surface).
  • test_issue_command.py — register wiring: /issue registered when the seam is present, skipped (no crash) on a legacy host, and independent of the write gate.
  • Gate green: ruff check ., ruff format --check ., pytest -q64 passed.

🤖 Generated with Claude Code

Adds the `/issue` chat control command — the write the model must NOT do
autonomously, so it's a user-only command (like /goal), not an agent tool. The
plugin registers it through the host's register_chat_command seam.

- gh_issue.py: ported, host-free /issue logic — parse flags (--bug/--feature/
  --repo/--label/--dry-run), the gate-conformance check (same body rules the CI
  issue gate enforces), and `gh issue create`. `run_issue_command(rest, *,
  default_repo)` is the seam entry (the host already matched the token).
- __init__.py: register /issue when the host exposes register_chat_command,
  GUARDED by hasattr so an older host without the seam still loads the tools and
  just skips /issue (degrade-safe). The handler closes over the plugin's own
  configured default repo — no host coupling.
- manifest: add github.default_repo + github.repos config (+ settings fields) to
  route /issue and (later) the console views. Repo resolution: explicit --repo >
  default_repo > first of repos > GITHUB_DEFAULT_REPO/GH_REPO env > error.
- tests: gh_issue parse/gate/file coverage; register wiring incl. the legacy-host
  (no-seam) degrade path; conftest gains a chat-command-aware + a legacy registry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jun 24, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@protoquinn protoquinn 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.

QA Audit — PR #7 | feat: own the user-only /issue chat command + repo config

VERDICT: WARN (CI still queued — non-blocking)


CI Status

  • test: queued

Diff Review

  • /issue registered via hasattr-guarded register_chat_command seam — safe degrade on legacy hosts
  • gh_issue.py section detectors mirror CI gate regexes, ensuring gate-conformance before filing
  • Repo resolution chain: explicit --repo > config default_repo > env > error — no silent misrouting
  • Test suite covers parse/gate/file paths, 64 passed; no unresolved CodeRabbit threads

Observations

  • LOW: clawpatch unavailable (repo not in project registry) — structural review limited to diff
  • The _issue closure captures default_repo at registration time (startup config, no runtime mutation expected — fine)

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jun 24, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #7.

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.

1 participant