Conversation
…apture (#17) New command: /gh-issue-driven:propose drafts and files GitHub issues from session context. 14-step pipeline: context collection, mandatory dedup check via gh issue list, quality review via /claude-c-suite:ask (green/yellow/red), PM enrichment via /claude-c-suite:pm for labels/milestone/priority, secret detection scan, HITL confirmation with re-roll capability, then gh issue create. - commands/propose.md: new command (560 lines) - commands/config.md: add propose.* config block - commands/status.md: add 'proposals' mode for /status - README.md, README.ja.md: add /propose to commands table Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new phase-0 workflow (/gh-issue-driven:propose) to draft + optionally create GitHub issues from operator-provided context, and extends docs/config/status to support proposal state.
Changes:
- Introduces
commands/propose.mdimplementing a propose pipeline (dedup → review via/ask→ PM enrichment → HITL →gh issue create). - Extends
/gh-issue-driven:statuswith aproposalsmode to list retained proposal state files. - Updates README (EN/JA) command list and adds
propose.*configuration defaults.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents new /propose command and extends /status usage to include proposals. |
| README.ja.md | Japanese doc parity for /propose and /status … proposals. |
| commands/status.md | Adds $ARGUMENTS == "proposals" mode to list cached proposal JSON files. |
| commands/propose.md | New command spec for capturing/deduping/reviewing/enriching/creating issues + proposal state schema. |
| commands/config.md | Adds propose config block defaults. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| gh issue list \ | ||
| --repo "$REPO_FULL_NAME" \ | ||
| --search "$KEYWORDS" \ | ||
| --state open \ | ||
| --limit "$DEDUP_MAX" \ | ||
| --json number,title,url | ||
| ``` |
There was a problem hiding this comment.
The dedup check searches only --state open, but this PR claims to close #17 whose proposed dedup step was --state all. Searching only open issues can miss previously closed duplicates and weakens the “mandatory dedup” goal; consider using --state all or documenting why closed issues are intentionally excluded.
| ══════════════════════════════════════════ | ||
| ``` | ||
|
|
||
| If `REVIEW_OUTPUT` is non-empty, write it verbatim to `REVIEW_MD`. Skip the write if `DRY_RUN` or if `REVIEW_OUTPUT` is empty (reviewer was skipped). |
There was a problem hiding this comment.
Step 9 skips writing REVIEW_MD when REVIEW_OUTPUT is empty (e.g. reviewer disabled / skill missing), but the state schema later always includes review.summary_path as a concrete path. That can leave state pointing to a non-existent file; consider writing an empty placeholder file, or set summary_path to null/omit it when no review output was persisted.
| If `REVIEW_OUTPUT` is non-empty, write it verbatim to `REVIEW_MD`. Skip the write if `DRY_RUN` or if `REVIEW_OUTPUT` is empty (reviewer was skipped). | |
| If `DRY_RUN` is false, always write `REVIEW_MD`. When `REVIEW_OUTPUT` is non-empty, write it verbatim. When `REVIEW_OUTPUT` is empty (for example, the reviewer was skipped or unavailable), write an empty placeholder file so any later `review.summary_path` still points to an existing file. |
| - **green** → continue to step 11. | ||
| - **yellow** AND `YELLOW_CONFIRM` is true (default) → continue to step 11 (the HITL gate handles confirmation; the review concerns are visible from step 9's output). | ||
| - **yellow** AND `YELLOW_CONFIRM` is false → log a one-line note and continue. | ||
| - **red** AND `FORCE` is true → log a loud warning `review returned red — proceeding because 'force' flag is set` and continue to step 11. |
There was a problem hiding this comment.
YELLOW_CONFIRM doesn’t currently change control flow: both branches continue to step 11, and step 11 always requires explicit user confirmation to create the issue anyway. Either remove this config knob for propose, or make it meaningfully affect behavior (e.g., require an extra confirmation step only when enabled).
| ```bash | ||
| set -euo pipefail | ||
| TMPBODY=$(mktemp) | ||
| printf '%s' "$DRAFT_BODY" > "$TMPBODY" | ||
|
|
||
| GH_ARGS=(--repo "$REPO_FULL_NAME" --title "$DRAFT_TITLE" --body-file "$TMPBODY") | ||
|
|
||
| for label in "${ENRICHMENT_LABELS[@]}"; do | ||
| GH_ARGS+=(--label "$label") | ||
| done | ||
|
|
||
| if [ -n "${ENRICHMENT_MILESTONE:-}" ]; then | ||
| GH_ARGS+=(--milestone "$ENRICHMENT_MILESTONE") | ||
| fi | ||
|
|
||
| ISSUE_URL=$(gh issue create "${GH_ARGS[@]}") | ||
| rm -f "$TMPBODY" | ||
| ISSUE_NUMBER=$(echo "$ISSUE_URL" | grep -oE '[0-9]+$') |
There was a problem hiding this comment.
The temp-file cleanup is not guaranteed if gh issue create fails: with set -euo pipefail, the script will exit before rm -f "$TMPBODY", leaving the draft body on disk. Add a cleanup trap (or otherwise ensure deletion on all exit paths) since the draft may include sensitive data and this command explicitly does secret detection.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/JFK/gh-issue-driven/sessions/ce63906d-ac22-4031-951b-9071f5b8305e Co-authored-by: JFK <73969+JFK@users.noreply.github.com>
Closes #17
Summary
/gh-issue-driven:proposecommand (phase 0) — a 14-step pipeline for drafting and filing GitHub issues from session context/claude-c-suite:ask→ PM enrichment via/claude-c-suite:pm→ secret detection → HITL confirmation with re-roll →gh issue create~/.claude/cache/gh-issue-driven/proposals/, GC on success, retain on failurecommands/config.mdwithpropose.*config block andcommands/status.mdwithproposalsmodeImplementation notes
commands/propose.mdfollows the same structural patterns asstart.md(frontmatter, Output language, Trust boundary, Steps, Failure modes)start.mdstep 8a by reference (not duplicated)start.mdstep 11 with samegreen|yellow|redtokenscontext.sourcediscriminator included for future--from-session/--from-failureextensibilityPre-PR review summary
Full reviews are saved in the plugin cache:
🤖 Generated via /gh-issue-driven:ship