|
| 1 | +--- |
| 2 | +title: "From a Raised Issue to Fixed-and-Shipped — the bug-to-ship loop" |
| 3 | +lede: "A raised issue becomes a context-v issue doc, a gh issue, then an attempt→verify cycle that safety-commits every failed try and milestone-commits the win — closing with a changelog beat and an offer to bump semver + tag." |
| 4 | +date_created: 2026-08-02 |
| 5 | +date_modified: 2026-08-02 |
| 6 | +authors: |
| 7 | + - Michael Staton |
| 8 | +augmented_with: |
| 9 | + - Claude Code on Claude Opus 4.8 |
| 10 | +semantic_version: 0.0.1.0 |
| 11 | +proven_on: "[[../issues/Fetch-Full-Content-Clobbers-Operator-Metadata]] — gh #77, milestone d997c63, 2026-08-02, same day as authored. Sibling run the same day: [[../issues/Tag-Input-Swallows-Commas-Into-One-Mega-Tag]] (gh #76, fix 6a0a64e)." |
| 12 | +tags: |
| 13 | + - Loop |
| 14 | + - Augment-It |
| 15 | + - Bug-Fix |
| 16 | + - GH-Issues |
| 17 | + - Git-Conventions |
| 18 | + - Changelog-Conventions |
| 19 | +status: Proven-Once |
| 20 | +--- |
| 21 | + |
| 22 | +# From a Raised Issue to Fixed-and-Shipped |
| 23 | + |
| 24 | +> `context-v/loops/` is **experimental** (per the context-vigilance skill). |
| 25 | +> Siblings: [[Implement-Feature-Loop]] (per-ticket feature execution) and |
| 26 | +> [[Loop-through-Spec-Write-Plans-Implement-Test-Changelog-Commit]] (spec-first |
| 27 | +> feature cadence). This loop is the **bug lane**: a single defect, raised in |
| 28 | +> conversation or a walk-through, driven to shipped. |
| 29 | +
|
| 30 | +## What this loop is |
| 31 | + |
| 32 | +The cadence for turning *one raised issue* into *fixed, committed, and |
| 33 | +ship-ready* code. It differs from the feature loops in two ways: it starts from |
| 34 | +a **defect**, not a plan; and it hardens the fix cycle with a **safety-commit on |
| 35 | +every failed attempt** so no diagnostic work is ever lost between tries. |
| 36 | + |
| 37 | +The distinctive commit grammar: |
| 38 | + |
| 39 | +- `attempt(<names>)` — a safety commit after a **failed** verification, so the |
| 40 | + next try starts from a saved checkpoint (not a dirty tree). |
| 41 | +- `milestone(<names>)` — the commit that lands the **passing** fix. Pair it with |
| 42 | + a `Fixes #N` trailer so the gh issue auto-closes on push to the default branch. |
| 43 | + |
| 44 | +## The loop |
| 45 | + |
| 46 | +```mermaid |
| 47 | +flowchart TD |
| 48 | + Start([Issue raised in conversation / walk-through]) --> L[Loop loaded] |
| 49 | + L --> CV[Load agent-skill: context-vigilance] |
| 50 | + CV --> WriteIssue["Write context-v/issues/<Variable-Title>.md"] |
| 51 | + WriteIssue --> GHskill[Load agent-skill: gh-project-conventions] |
| 52 | + GHskill --> GHissue[Create gh issue per conventions<br/>body links the context-v file] |
| 53 | + GHissue --> Fix[Attempt to fix the issue] |
| 54 | + Fix --> Verify{Run tests / verifications /<br/>acceptance criteria} |
| 55 | + Verify -->|Unsuccessful| Safety["git commit: attempt(<names>)<br/>(safety checkpoint)"] |
| 56 | + Safety --> Fix |
| 57 | + Verify -->|Successful| Milestone["git commit: milestone(<names>)<br/>Fixes #N → auto-closes issue"] |
| 58 | + Milestone --> Ship[Write changelog beat] |
| 59 | + Ship --> Ask{User pre-specified<br/>semver + tag?} |
| 60 | + Ask -->|No| Offer[Ask: increment semver + create tag?] |
| 61 | + Ask -->|Yes| Done([Shipped]) |
| 62 | + Offer --> Done |
| 63 | +``` |
| 64 | + |
| 65 | +## Step-by-step |
| 66 | + |
| 67 | +1. **Loop loaded** — this doc is the durable definition; each session that runs |
| 68 | + it is an execution. |
| 69 | +2. **Load `context-vigilance`** — so the issue doc lands with correct frontmatter, |
| 70 | + folder role, versioning, and wikilinks. |
| 71 | +3. **Write `context-v/issues/<Variable-Title>.md`** — title derived from the |
| 72 | + defect. Capture: Why Care, root cause, expected behavior, fix, resolution. |
| 73 | + `status: Resolved` once the fix lands. |
| 74 | +4. **Load `gh-project-conventions`** (the `gh-cli-projects-tasks-conventions` |
| 75 | + skill) — for label/milestone prefill and the body-is-a-GitHub-link convention. |
| 76 | +5. **Create the gh issue** — body's primary content is the clickable GitHub URL |
| 77 | + to the context-v file in *its own repo* on the current branch. |
| 78 | +6. **Attempt to fix** — make the change. |
| 79 | +7. **Verify** — run the tests, the build/typecheck, or the named acceptance |
| 80 | + criteria for this defect. No verification, no milestone. |
| 81 | +8. **On failure → `attempt(<names>)`** — safety-commit the work-in-progress so the |
| 82 | + next iteration starts clean, then return to step 6. |
| 83 | +9. **On success → `milestone(<names>)`** — commit the passing fix with a |
| 84 | + `Fixes #N` trailer; push; the issue auto-closes. |
| 85 | +10. **Changelog + ship decision** — unless the user pre-specified, write the |
| 86 | + changelog beat, then **ask** whether to increment semver and cut a tag |
| 87 | + (per [[changelog-conventions]] and the repo's version discipline). |
| 88 | + |
| 89 | +## Notes carried from the first run (2026-08-02) |
| 90 | + |
| 91 | +- **Deploy caveat is part of "shipped."** For augment-it, a backend/frontend fix |
| 92 | + only reaches augment.didi.sh on the next redeploy — state that in the |
| 93 | + changelog and the resolution so "shipped" isn't mistaken for "live." |
| 94 | +- **Data already mangled by the bug is a separate remediation** from the code |
| 95 | + fix — note it, don't conflate it with the fix commit. |
| 96 | +- **`attempt()` never fired** on the first two runs (both fixes verified on the |
| 97 | + first try). The rung exists for the harder defects; its absence is a clean run, |
| 98 | + not a skipped step. |
| 99 | + |
| 100 | +## See also |
| 101 | + |
| 102 | +- [[Implement-Feature-Loop]] · [[Loop-through-Spec-Write-Plans-Implement-Test-Changelog-Commit]] |
| 103 | +- [[changelog-conventions]] · the `gh-cli-projects-tasks-conventions` and `git-conventions` skills |
0 commit comments