-
-
Notifications
You must be signed in to change notification settings - Fork 5k
feat(feedback): add /gsd-feedback with shared issue-filing pipeline #2371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0b563b6
473222c
facaa91
163848c
73ecb05
8590801
435c6e5
274fe35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| type: prompt | ||
| name: gsd:feedback | ||
| description: File GSD bugs, feature requests, or questions with diagnostics auto-attached | ||
| argument-hint: "[freeform description]" | ||
| allowed-tools: | ||
| - Read | ||
| - Bash | ||
| - AskUserQuestion | ||
| --- | ||
|
|
||
| <objective> | ||
| Collect user feedback from inside a GSD session, attach actionable diagnostics automatically, | ||
| and file a GitHub issue against `gsd-build/get-shit-done`. | ||
|
|
||
| Preferred path: create the issue with `gh`. | ||
| Fallback path: open a prefilled GitHub issue URL. | ||
| Final fallback: always return the full markdown body for manual paste. | ||
| </objective> | ||
|
|
||
| <execution_context> | ||
| @~/.claude/get-shit-done/workflows/feedback.md | ||
| </execution_context> | ||
|
|
||
| <context> | ||
| **Issue types:** | ||
| - `bug` | ||
| - `feature` | ||
| - `question` | ||
|
|
||
| **Repo target:** | ||
| - `gsd-build/get-shit-done` | ||
|
|
||
| **Input:** | ||
| - `$ARGUMENTS` may contain a freeform seed for the title and description | ||
| </context> | ||
|
|
||
| <process> | ||
| Read and execute the feedback workflow from @~/.claude/get-shit-done/workflows/feedback.md end-to-end. | ||
| </process> | ||
|
|
||
| <success_criteria> | ||
| - User intent captured as `bug`, `feature`, or `question` | ||
| - Diagnostics attached from current runtime and project state | ||
| - `gh issue create` attempted first when available | ||
| - Prefilled GitHub issue URL generated as fallback | ||
| - Full markdown body returned for manual filing even if submission fails | ||
| </success_criteria> | ||
|
|
||
| <critical_rules> | ||
| - Prefer machine-readable diagnostics from GSD helpers over ad hoc parsing | ||
| - Do not discard `$ARGUMENTS`; use it as a seed whenever possible | ||
| - Always return enough information for manual filing | ||
| - Never block on browser launch failure | ||
| </critical_rules> |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,166 @@ | ||||||
| <purpose> | ||||||
| Collect structured feedback, attach diagnostics from the current GSD session, and file a GitHub issue against `gsd-build/get-shit-done`. Issue submission is delegated to the shared `file-issue.md` workflow so that `/gsd-feedback` and `/gsd-forensics` use one canonical filing path. | ||||||
| </purpose> | ||||||
|
|
||||||
| <required_reading> | ||||||
| Read all files referenced by the invoking prompt's execution_context before starting. | ||||||
| </required_reading> | ||||||
|
|
||||||
| <process> | ||||||
|
|
||||||
| <step name="collect_feedback"> | ||||||
| Start from `$ARGUMENTS` if present. | ||||||
|
|
||||||
| If type is not already clear, ask the user to choose one: | ||||||
| - `bug` | ||||||
| - `feature` | ||||||
| - `question` | ||||||
|
|
||||||
| Then collect: | ||||||
| - `ISSUE_TITLE` | ||||||
| - `ISSUE_DESCRIPTION` | ||||||
|
|
||||||
| If `$ARGUMENTS` already contains enough detail, refine it instead of re-asking from scratch. | ||||||
|
|
||||||
| Keep the intake short. The goal is to get a fileable issue, not run a long interview. | ||||||
|
|
||||||
| ### Optional forensics enrichment (bug type only) | ||||||
|
|
||||||
| If `ISSUE_TYPE` is `bug`, ask the user: | ||||||
|
|
||||||
| > "Want me to run a quick forensics investigation first? This checks git history, planning state, and artifacts for anomalies that might explain the bug. [Y/n]" | ||||||
|
|
||||||
| If yes: | ||||||
| 1. Execute Steps 2–4 from `@~/.claude/get-shit-done/workflows/forensics.md` (Gather Evidence → Detect Anomalies → Generate Report). Skip Steps 5–8 (presentation, interactive investigation, issue creation, STATE update — those are handled here). | ||||||
| 2. Read the most recently generated report from `.planning/forensics/report-*.md` (the file created by the just-completed run). | ||||||
| 3. Set `INVESTIGATION_FINDINGS` to the redacted report contents. | ||||||
|
|
||||||
| If no (or if `ISSUE_TYPE` is `feature` or `question`): | ||||||
| - Set `INVESTIGATION_FINDINGS` to empty string. | ||||||
| </step> | ||||||
|
|
||||||
| <step name="gather_diagnostics"> | ||||||
| Gather diagnostics from existing GSD helpers first. | ||||||
|
|
||||||
| **1. Version and runtime context** | ||||||
| Derive the invoking config dir from the execution context path when possible and prefer its sibling `get-shit-done/VERSION` file: | ||||||
|
|
||||||
| ```bash | ||||||
| PREFERRED_CONFIG_DIR="" | ||||||
| case "$PWD" in | ||||||
| *"/get-shit-done/workflows"*) | ||||||
| PREFERRED_CONFIG_DIR="${PWD%/get-shit-done/workflows*}" | ||||||
| ;; | ||||||
| esac | ||||||
|
|
||||||
| GSD_VERSION="" | ||||||
| for candidate in \ | ||||||
| "${CLAUDE_CONFIG_DIR:-}/get-shit-done/VERSION" \ | ||||||
| "$PREFERRED_CONFIG_DIR/get-shit-done/VERSION" \ | ||||||
| "$HOME/.claude/get-shit-done/VERSION" \ | ||||||
| "$HOME/.gemini/get-shit-done/VERSION" \ | ||||||
| "$HOME/.config/kilo/get-shit-done/VERSION" \ | ||||||
| "$HOME/.kilo/get-shit-done/VERSION" \ | ||||||
| "$HOME/.config/opencode/get-shit-done/VERSION" \ | ||||||
| "$HOME/.opencode/get-shit-done/VERSION" \ | ||||||
| "$HOME/.codex/get-shit-done/VERSION" \ | ||||||
| ".claude/get-shit-done/VERSION" \ | ||||||
| ".gemini/get-shit-done/VERSION" \ | ||||||
| ".config/kilo/get-shit-done/VERSION" \ | ||||||
| ".kilo/get-shit-done/VERSION" \ | ||||||
| ".config/opencode/get-shit-done/VERSION" \ | ||||||
| ".opencode/get-shit-done/VERSION" \ | ||||||
| do | ||||||
|
coderabbitai[bot] marked this conversation as resolved.
|
||||||
| if [ -n "$candidate" ] && [ -f "$candidate" ]; then | ||||||
| GSD_VERSION="$(cat "$candidate")" | ||||||
| break | ||||||
| fi | ||||||
| done | ||||||
|
|
||||||
| if [ -z "$GSD_VERSION" ] && [ -f package.json ]; then | ||||||
| GSD_VERSION=$(node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); console.log(pkg.version || '')" 2>/dev/null) | ||||||
| fi | ||||||
|
|
||||||
| NODE_VERSION=$(node -v 2>/dev/null || echo "unknown") | ||||||
| OS_NAME=$(uname -s 2>/dev/null || echo "$OS") | ||||||
| ARCH_NAME=$(uname -m 2>/dev/null || node -p "process.arch" 2>/dev/null || echo "unknown") | ||||||
| CURRENT_DIR=$(pwd) | ||||||
| ACTIVE_WORKSTREAM=${GSD_WORKSTREAM:-none} | ||||||
| ``` | ||||||
|
|
||||||
| **2. State and phase diagnostics** | ||||||
| ```bash | ||||||
| STATE_JSON=$(gsd-sdk query state.json 2>/dev/null || echo "{}") | ||||||
| STATE_SNAPSHOT=$(gsd-sdk query state-snapshot 2>/dev/null || echo "{}") | ||||||
|
|
||||||
| CURRENT_PHASE=$(printf '%s' "$STATE_SNAPSHOT" | jq -r '.current_phase // "none"' 2>/dev/null || echo "none") | ||||||
| CURRENT_PHASE_NAME=$(printf '%s' "$STATE_SNAPSHOT" | jq -r '.current_phase_name // "none"' 2>/dev/null || echo "none") | ||||||
| STATUS=$(printf '%s' "$STATE_SNAPSHOT" | jq -r '.status // "unknown"' 2>/dev/null || echo "unknown") | ||||||
| LAST_ACTIVITY=$(printf '%s' "$STATE_SNAPSHOT" | jq -r '.last_activity // "unknown"' 2>/dev/null || echo "unknown") | ||||||
| LAST_ACTIVITY_DESC=$(printf '%s' "$STATE_SNAPSHOT" | jq -r '.last_activity_desc // "unknown"' 2>/dev/null || echo "unknown") | ||||||
| RESUME_FILE=$(printf '%s' "$STATE_SNAPSHOT" | jq -r '.session.resume_file // "none"' 2>/dev/null || echo "none") | ||||||
| ``` | ||||||
|
|
||||||
| **3. Small config excerpt** | ||||||
| Prefer direct GSD queries: | ||||||
|
|
||||||
| ```bash | ||||||
| MODEL_PROFILE=$(gsd-sdk query config-get model_profile 2>/dev/null || echo "unset") | ||||||
| BASE_BRANCH=$(gsd-sdk query config-get git.base_branch 2>/dev/null || echo "unset") | ||||||
| USE_WORKTREES=$(gsd-sdk query config-get workflow.use_worktrees 2>/dev/null || echo "unset") | ||||||
| COMMIT_DOCS=$(gsd-sdk query config-get commit_docs 2>/dev/null || echo "unset") | ||||||
| ``` | ||||||
|
|
||||||
| If `.planning/config.json` exists, include only a short relevant snippet rather than dumping the whole file. | ||||||
| </step> | ||||||
|
|
||||||
| <step name="render_diagnostics"> | ||||||
| Render the gathered diagnostics into `DIAGNOSTICS_MARKDOWN`: | ||||||
|
|
||||||
| ````markdown | ||||||
| - GSD version: {GSD_VERSION} | ||||||
| - Node: {NODE_VERSION} | ||||||
| - OS / arch: {OS_NAME} / {ARCH_NAME} | ||||||
| - Working directory: {CURRENT_DIR} | ||||||
| - Workstream: {ACTIVE_WORKSTREAM} | ||||||
| - Current phase: {CURRENT_PHASE} - {CURRENT_PHASE_NAME} | ||||||
| - Status: {STATUS} | ||||||
| - Last activity: {LAST_ACTIVITY} | ||||||
| - Last activity detail: {LAST_ACTIVITY_DESC} | ||||||
| - Resume file: {RESUME_FILE} | ||||||
| - Config excerpt: | ||||||
| - model_profile: {MODEL_PROFILE} | ||||||
| - git.base_branch: {BASE_BRANCH} | ||||||
| - workflow.use_worktrees: {USE_WORKTREES} | ||||||
| - commit_docs: {COMMIT_DOCS} | ||||||
|
|
||||||
| ### State Snapshot (redacted) | ||||||
|
|
||||||
| ```json | ||||||
| {STATE_SNAPSHOT_REDACTED} | ||||||
| ``` | ||||||
|
Comment on lines
+137
to
+141
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implement the redaction logic for Line 140 uses 🔧 Suggested implementation before line 117# Redact sensitive fields from state snapshot
STATE_SNAPSHOT_REDACTED=$(printf '%s' "$STATE_SNAPSHOT" | jq '
# Redact absolute paths - replace home directory
walk(if type == "string" then gsub(env.HOME; "~") else . end)
# Remove potentially sensitive keys
| del(.session.auth_token, .session.api_keys, .secrets)
# Truncate to reasonable size (keep first 50 keys/2KB)
' 2>/dev/null | head -c 2048)
# Add ellipsis if truncated
if [ ${`#STATE_SNAPSHOT_REDACTED`} -eq 2048 ]; then
STATE_SNAPSHOT_REDACTED="${STATE_SNAPSHOT_REDACTED}... [truncated]"
fiAdd this to the gather_diagnostics or render_diagnostics step. 🤖 Prompt for AI Agents |
||||||
| ```` | ||||||
| </step> | ||||||
|
|
||||||
| <step name="file_issue"> | ||||||
| Set the variables required by the shared issue-filing workflow, then delegate: | ||||||
|
|
||||||
| - `ISSUE_TYPE` — from step 1 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix character encoding in variable list comment. Line 148 contains "—" (em-dash) which should be "-" (hyphen) for consistency. Same encoding issue as line 34. 🔧 Proposed fix-- `ISSUE_TYPE` â€" from step 1
+- `ISSUE_TYPE` - from step 1Apply similar fixes to lines 149-153. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| - `ISSUE_TITLE` — from step 1 | ||||||
| - `ISSUE_DESCRIPTION` — from step 1 | ||||||
| - `DIAGNOSTICS_MARKDOWN` — from step 3 | ||||||
| - `INVESTIGATION_FINDINGS` — from step 1 forensics enrichment (empty if skipped) | ||||||
| - `REPO` — `gsd-build/get-shit-done` | ||||||
|
|
||||||
| Execute `@~/.claude/get-shit-done/workflows/file-issue.md` end-to-end. It handles rendering the final issue body, `gh issue create`, URL fallback, and raw markdown fallback. | ||||||
| </step> | ||||||
|
|
||||||
| </process> | ||||||
|
|
||||||
| <success_criteria> | ||||||
| - Intake completes with type, title, and description | ||||||
| - Diagnostics come from `gsd-sdk query` helpers where available | ||||||
| - Bug-type issues offer optional forensics enrichment via `/gsd-forensics` steps 2–4 | ||||||
| - Issue filing delegates to `@~/.claude/get-shit-done/workflows/file-issue.md` | ||||||
| - `DIAGNOSTICS_MARKDOWN` and `INVESTIGATION_FINDINGS` are set before delegation | ||||||
| </success_criteria> | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix character encoding issues in step reference.
Line 34 contains corrupted characters: "Steps 2â€"4" (should be "Steps 2–4" or "Steps 2-4") and "â†'" (should be "→"). These appear to be UTF-8 encoding issues with en-dash and arrow characters.
🔧 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents