Skip to content

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

Merged
mabry1985 merged 1 commit into
mainfrom
feat/issue-command
Jun 24, 2026
Merged

feat: own the user-only /issue chat command + repo config#9
mabry1985 merged 1 commit into
mainfrom
feat/issue-command

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Re-opened against main (the original #7 was auto-closed when its stacked base branch was deleted on #6's merge). Rebased onto main — carries only its own commit.

What

Brings the /issue chat control command into the plugin — a user-only command (not an agent tool), owned via protoAgent's register_chat_command seam.

  • gh_issue.py — host-free /issue logic: flag parsing, the gate-conformance check (matches the CI issue gate), gh issue create.
  • __init__.py — registers /issue when the host exposes register_chat_command, hasattr-guarded so an older host still loads the tools (degrade-safe).
  • manifestgithub.default_repo + github.repos config + settings. Repo resolution: explicit --repo > default_repo > first of repos > env > error.

Tests

test_gh_issue (parse/gate/file) + test_issue_command (register wiring incl. legacy-host degrade). ruff + pytest -q → 64 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.

@mabry1985 mabry1985 merged commit c8716be into main Jun 24, 2026
1 check passed

@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 #9 | feat: own the user-only /issue chat command + repo config

VERDICT: WARN (non-terminal CI — test in progress; re-review on terminal-green)


CI Status

  • test: ⏳ in_progress

Diff Review

  • Adds /issue chat command via gh_issue.py (258 lines) + __init__.py registration wiring (27 lines) + PROTO.md docs
  • hasattr(registry, "register_chat_command") guard ensures degrade-safe loading on legacy hosts — well-designed
  • Section-detection regexes kept in lockstep with CI gate — correct design for conformance guarantee
  • Repo resolution cascade (--repo > default_repo > env > error) prevents silent misrouting

Observations

  • LOW: clawpatch structural review unavailable — repo not in project registry; review based on diff + static analysis only
  • Gap: diff truncated at 200/601 lines — run_issue_command, parse_issue_flags, effective_default_repo, and test files not fully reviewed. Everything in the visible portion is clean.
  • LOW: _issue(rest, session_id) in __init__.py defines session_id but never uses it — likely required by the host's register_chat_command handler contract, but worth confirming if the seam spec mandates it

No unresolved CodeRabbit threads. Visible code is well-structured with clear separation of concerns. Gate-conformance check (>=80 chars, required sections) matches the CI issue gate spec. Awaiting terminal CI for final PASS.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jun 24, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #9.

@mabry1985 mabry1985 deleted the feat/issue-command branch June 24, 2026 05:16
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