-
Notifications
You must be signed in to change notification settings - Fork 0
feat: improve skill workflow guidance #25
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1fb630f
Skill improvements
adamwhp a2b8b41
Skill improvements
adamwhp edc0701
Skill improvements
adamwhp a19d065
Skill improvements
adamwhp d23024c
Skill improvements
adamwhp f89a23b
Skill improvements
adamwhp be48732
Fix numbering issue
adamwhp cc5e141
Bump version
adamwhp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,61 +1,66 @@ | ||
| --- | ||
| name: debug | ||
| # prettier-ignore | ||
| description: Handle concrete bug reports through direct intake, reproduce, diagnose, TDD-fix, verify, reset, and escalate loops. Use when failures need repair. | ||
| description: Handle concrete failures through intake, diagnosis, one-hypothesis fixes, review, reset, and escalation. Use when bugs or failures need repair. | ||
| --- | ||
|
|
||
| # Debug | ||
|
|
||
| Use when a concrete failure or bug report needs diagnosis and repair. | ||
| Diagnose concrete failures before dispatching one evidence-backed fix loop. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| ALL prerequisites MUST be true before following this skill. | ||
| ALL prerequisites MUST be satisfied BEFORE following this skill. | ||
|
|
||
| - The work is a bug, regression, crash, incorrect output, flaky behaviour, or other concrete failure. | ||
| - If the work is feature-shaped or expected behaviour is intentionally being designed, STOP. Load `brainstorm`. | ||
| - The request is a concrete failure: bug, regression, crash, failing test/build, incorrect output, flaky behaviour, or runtime error. | ||
| - If the request is feature-shaped, product-scope work, expected-behaviour design, refactor, optimisation, or enhancement, STOP and load `brainstorm`. | ||
|
|
||
| ## Instructions | ||
|
|
||
| Follow these steps IN ORDER. Do NOT skip steps. | ||
|
|
||
| 1. Create or resume `docs/propulsion/{yyyymmdd}-{bug-slug}/debug.md` using [references/debug-template.md](references/debug-template.md). | ||
| 2. Load `interrogate` skill for missing user-answerable intake: report provenance, expected behaviour, actual behaviour, impact, environment, reproduction, and questions answered. | ||
| 3. Record intake answers and resolved decisions from `interrogate` in `debug.md`; if expected behaviour is unknowable, stay in `debug` and ask or block. | ||
| 4. Complete targeted codebase exploration in `debug.md` before reproduction, diagnosis, or fix work: relevant files, existing tests, commands, logs, ownership, and candidate boundaries only. | ||
| 5. Reproduce, reduce, isolate, diagnose, reset, and escalate with [references/investigation-loop.md](references/investigation-loop.md). | ||
| 6. Do not allow production-code changes until `debug.md` contains a grounded diagnosis, supporting evidence, fix constraints, and one chosen fix hypothesis. | ||
| 7. Start a fresh bug-worker subagent with [references/bug-worker-prompt.md](references/bug-worker-prompt.md), then review with [references/bug-reviewer-prompt.md](references/bug-reviewer-prompt.md). | ||
| 8. If review rejects the fix, send findings back with [references/bug-feedback-prompt.md](references/bug-feedback-prompt.md). Repeat until approved, reset when evidence contradicts the diagnosis, or reassess architecture and patterns before escalating after 3 failed fix loops. | ||
| 9. If the fix is verified and approved, record closure in `debug.md` and finish. | ||
| 1. Create or resume `docs/propulsion/{yyyymmdd}-{bug-slug}/debug.md` from [references/debug-template.md](references/debug-template.md) before diagnosis work. | ||
| 2. Record report provenance, expected behaviour, actual behaviour, impact, environment, reproduction, prior attempts, and open blockers in `debug.md`. | ||
| 3. Load `interrogate` ONLY when missing user-answerable intake blocks expected behaviour, reproduction, impact, or environment; record answers and resolved decisions in `debug.md`. | ||
| 4. Explore only the relevant code, tests, logs, recent changes, ownership, and likely boundaries; record facts and intentional limits in `debug.md`. | ||
| 5. Use [references/investigation-loop.md](references/investigation-loop.md) to reproduce, read the full error, reduce, compare working examples, isolate the first bad boundary, and test one diagnosis hypothesis at a time. | ||
| 6. Gate fix dispatch until `debug.md` has grounded diagnosis evidence, the first bad state or divergence, fix constraints, a falsifier, and one chosen fix hypothesis. | ||
| 7. Dispatch one fresh bug-worker with [references/bug-worker-prompt.md](references/bug-worker-prompt.md), then dispatch one fresh reviewer with [references/bug-reviewer-prompt.md](references/bug-reviewer-prompt.md). | ||
| 8. If review rejects the fix, return findings to the active worker with [references/bug-feedback-prompt.md](references/bug-feedback-prompt.md) while the diagnosis still holds. | ||
| 9. If verification, review, or new evidence contradicts the diagnosis, reset to investigation and record the contradicted evidence before any new fix attempt. | ||
| 10. After 3 failed fix loops, reassess architecture and patterns, record the reassessment, then escalate to the user with evidence and next options. | ||
| 11. Close only when fixed and verified, blocked by missing intake, no-repro after documented attempts, or escalated after the 3-loop reassessment path. | ||
|
|
||
| ## Rules | ||
|
|
||
| These rules are MANDATORY. | ||
|
|
||
| - MUST keep `debug.md` current from direct entry or resumed entry through closure. | ||
| - MUST complete intake for expected behaviour, actual behaviour, impact, environment, and reproduction before broad code inspection or fix work. | ||
| - MUST record `interrogate` intake answers and resolved decisions in `debug.md`. | ||
| - MUST record targeted codebase exploration before reproduction, diagnosis, or fix work. | ||
| - MUST stabilise reproduction, reduce the failing case, and isolate the first bad boundary or divergence before choosing a fix. | ||
| - NEVER edit production code in the main `debug` stage. | ||
| - EVERY fix attempt MUST start with a failing regression test and target one fix hypothesis. | ||
| - MUST record each failed hypothesis, diagnostic edit, fix attempt, review outcome, reset, escalation, and closure in `debug.md`. | ||
| - MUST keep `debug.md` current from entry through closure. | ||
| - MUST diagnose before fixing; NEVER make permanent production-code edits in the controller stage. | ||
| - MUST use `interrogate` only for missing user-answerable intake, not repo facts the agent can inspect. | ||
| - MUST reset instead of pushing through when evidence contradicts the diagnosis or chosen fix hypothesis. | ||
| - EVERY fix loop MUST target one chosen fix hypothesis and start with a failing regression test unless `tdd` declares no valuable test. | ||
| - MUST record failed hypotheses, blocked/no-repro status, rejected reviews, resets, failed loops, verification, escalation, and closure. | ||
|
|
||
| ## Completion Gate | ||
|
|
||
| Do NOT leave this skill until ALL items are complete. | ||
|
|
||
| - [ ] `debug.md` exists at `docs/propulsion/{yyyymmdd}-{bug-slug}/debug.md` and was created or resumed on entry. | ||
| - [ ] Intake, `interrogate` answers and resolved decisions, targeted codebase exploration, reproduction, reduction, evidence, ranked hypotheses, experiments, diagnosis gate, fix attempts, review outcomes, verification, and closure are recorded in `debug.md`. | ||
| - [ ] The bug is either closed with verified evidence or escalated after architecture and pattern reassessment following 3 failed fix loops. | ||
| - [ ] `debug.md` exists or is resumed at `docs/propulsion/{yyyymmdd}-{bug-slug}/debug.md`. | ||
| - [ ] Intake, user-answerable `interrogate` decisions if any, targeted exploration, reproduction or no-repro attempts, full error reading, reduction, evidence, hypotheses, diagnosis gate, fix loops, reviews, resets, and verification are recorded. | ||
| - [ ] Outcome is one of: fixed and verified; blocked on missing intake; no-repro with documented attempts; reset to diagnosis with contradicted evidence; review-rejected and returned to worker; escalated after 3 failed loops plus architecture and pattern reassessment. | ||
|
|
||
| ## Next Steps | ||
|
|
||
| Once the completion gate is fully checked: | ||
|
|
||
| - Return a concise status with the `debug.md` path, final outcome, checks run, and any user decision needed. | ||
|
|
||
| ## References | ||
|
|
||
| Use these references when you need detail. | ||
|
|
||
| - [references/debug-template.md](references/debug-template.md) - Living `debug.md` template for the full bug dossier. | ||
| - [references/investigation-loop.md](references/investigation-loop.md) - Core bug loop for reproduce, reduce, isolate, diagnose, reset, and escalate. | ||
| - [references/debug-template.md](references/debug-template.md) - Living `debug.md` template for the bug dossier. | ||
| - [references/investigation-loop.md](references/investigation-loop.md) - Evidence-first reproduce, reduce, isolate, diagnose, reset, and escalate loop. | ||
| - [references/bug-worker-prompt.md](references/bug-worker-prompt.md) - Prompt template for one diagnosis-gated TDD fix attempt. | ||
| - [references/bug-reviewer-prompt.md](references/bug-reviewer-prompt.md) - Prompt template for independent review of one bug fix attempt. | ||
| - [references/bug-feedback-prompt.md](references/bug-feedback-prompt.md) - Prompt template for feeding review findings back into the active bug fix attempt. | ||
| - [references/bug-feedback-prompt.md](references/bug-feedback-prompt.md) - Prompt template for returning review findings to the active worker. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.