Skip to content

[feat] Add /capture command and product-manager persona for portable issue capture#66

Merged
lugassawan merged 3 commits into
mainfrom
feat/capture-command
May 2, 2026
Merged

[feat] Add /capture command and product-manager persona for portable issue capture#66
lugassawan merged 3 commits into
mainfrom
feat/capture-command

Conversation

@lugassawan
Copy link
Copy Markdown
Owner

Summary

  • Adds agents/product-manager.md: persona-led subagent that turns a rough thought into a well-framed GitHub issue; applies four PM lenses (problem, value, acceptance criteria, Impact/Effort S/M/L); discovers issue templates at runtime via ls .github/ISSUE_TEMPLATE/; falls back to a default body shape when none exist; sanitizes dup-scan keywords and temp-file slug against shell injection; binds the confirm step to a .cmd sidecar file so the filed command matches exactly what the user reviewed
  • Adds commands/capture.md: thin orchestrator that echoes $ARGUMENTS, delegates to product-manager, enforces the preview-gate contract (no gh issue create until user replies confirm), and carries no ticket-context prelude or plan-output footer
  • Both files are repo-agnostic: no hardcoded template names, no hardcoded repo owner, no --label/--assignee/--milestone/--repo flags; works in any repo where the swe-workbench plugin is installed

Test Plan

  • Changed skills/commands/agents load without errors
  • Examples in the diff were exercised manually
  • §1 — /swe-workbench:capture appears in fresh Claude Code session; product-manager agent resolves
  • §2 — Preview shows Filing into: lugassawan/swe-workbench exactly
  • §3 — Happy path (feature): add a /retro commandfeature_request.md selected, ## Product framing prepended, four lenses populated; reply confirm → issue URL returned
  • §4 — Happy path (bug): cleanup-merged sometimes leaves stale local branchesbug_report.md, problem framing emphasizes broken-state symptom
  • §5 — Happy path (chore): bump dependabot interval to weeklychore_maintenance.md, value framing acknowledges internal cleanup
  • §6 — Ambiguity gate: the workflow feels slow → agent asks ONE clarifying question before drafting
  • §7 — Preview gate: run any happy path, do NOT reply confirm; verify NO issue created (gh issue list --limit 5)
  • §8 — Dup detection: pre-create stub issue with unique keyword; /capture with that keyword surfaces it in "possibly related"
  • §9 — Auth bail: GH_TOKEN=invalid /capture … → clean single-line bail before any framing
  • §10 — Framing-block round-trip: open issue from §3 in browser; ## Product framing appears at top with all four lenses
  • §11 — No-template repo: scratch repo with no .github/ISSUE_TEMPLATE/; preview surfaces "No issue templates found"; default body used; issue files into scratch repo, NOT swe-workbench
  • §12 — Custom-template repo: scratch repo with epic.md template; agent picks epic.md, not any swe-workbench-style name

Issue: N/A — captured during /design session 2026-05-02; this PR is the tracking artifact

@lugassawan lugassawan merged commit cfde1a9 into main May 2, 2026
3 checks passed
@lugassawan lugassawan deleted the feat/capture-command branch May 2, 2026 11:08
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