diff --git a/SKILL.md.tmpl b/SKILL.md.tmpl index 68f18ce9..f0b403a9 100644 --- a/SKILL.md.tmpl +++ b/SKILL.md.tmpl @@ -15,7 +15,7 @@ description: | - Reviewing a plan (architecture) → suggest /plan-eng-review - Reviewing a plan (design) → suggest /plan-design-review - Creating a design system → suggest /design-consultation - - Debugging errors → suggest /debug + - Debugging errors → suggest /investigate - Testing the app → suggest /qa - Code review before merge → suggest /review - Visual design audit → suggest /design-review diff --git a/TODOS.md b/TODOS.md index e77b8f47..0a452da2 100644 --- a/TODOS.md +++ b/TODOS.md @@ -520,25 +520,25 @@ Shipped as `/careful`, `/freeze`, `/guard`, and `/unfreeze` in v0.6.5. Includes Shipped in v0.6.5. TemplateContext in gen-skill-docs.ts bakes skill name into preamble telemetry line. Analytics CLI (`bun run analytics`) for querying. /retro integration shows skills-used-this-week. -### /debug scoped debugging enhancements (gated on telemetry) +### /investigate scoped debugging enhancements (gated on telemetry) -**What:** Six enhancements to /debug auto-freeze, contingent on telemetry showing the freeze hook actually fires in real debugging sessions. +**What:** Six enhancements to /investigate auto-freeze, contingent on telemetry showing the freeze hook actually fires in real debugging sessions. -**Why:** /debug v0.7.1 auto-freezes edits to the module being debugged. If telemetry shows the hook fires often, these enhancements make the experience smarter. If it never fires, the problem wasn't real and these aren't worth building. +**Why:** /investigate v0.7.1 auto-freezes edits to the module being debugged. If telemetry shows the hook fires often, these enhancements make the experience smarter. If it never fires, the problem wasn't real and these aren't worth building. -**Context:** All items are prose additions to `debug/SKILL.md.tmpl`. No new scripts. +**Context:** All items are prose additions to `investigate/SKILL.md.tmpl`. No new scripts. **Items:** 1. Stack trace auto-detection for freeze directory (parse deepest app frame) 2. Freeze boundary widening (ask to widen instead of hard-block when hitting boundary) 3. Post-fix auto-unfreeze + full test suite run 4. Debug instrumentation cleanup (tag with DEBUG-TEMP, remove before commit) -5. Debug session persistence (~/.gstack/debug-sessions/ — save investigation for reuse) +5. Debug session persistence (~/.gstack/investigate-sessions/ — save investigation for reuse) 6. Investigation timeline in debug report (hypothesis log with timing) **Effort:** M (all 6 combined) **Priority:** P3 -**Depends on:** Telemetry data showing freeze hook fires in real /debug sessions +**Depends on:** Telemetry data showing freeze hook fires in real /investigate sessions ## Completed diff --git a/debug/SKILL.md b/investigate/SKILL.md similarity index 98% rename from debug/SKILL.md rename to investigate/SKILL.md index e3f2d57d..5bce8d2f 100644 --- a/debug/SKILL.md +++ b/investigate/SKILL.md @@ -1,5 +1,5 @@ --- -name: debug +name: investigate version: 1.0.0 description: | Systematic debugging with root cause investigation. Four phases: investigate, @@ -49,7 +49,7 @@ echo "PROACTIVE: $_PROACTIVE" _LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no") echo "LAKE_INTRO: $_LAKE_SEEN" mkdir -p ~/.gstack/analytics -echo '{"skill":"debug","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true +echo '{"skill":"investigate","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true ``` If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills — only invoke diff --git a/debug/SKILL.md.tmpl b/investigate/SKILL.md.tmpl similarity index 99% rename from debug/SKILL.md.tmpl rename to investigate/SKILL.md.tmpl index 683e1a0b..4db09f30 100644 --- a/debug/SKILL.md.tmpl +++ b/investigate/SKILL.md.tmpl @@ -1,5 +1,5 @@ --- -name: debug +name: investigate version: 1.0.0 description: | Systematic debugging with root cause investigation. Four phases: investigate, diff --git a/test/skill-routing-e2e.test.ts b/test/skill-routing-e2e.test.ts index ee2d84b4..7a4a5698 100644 --- a/test/skill-routing-e2e.test.ts +++ b/test/skill-routing-e2e.test.ts @@ -50,7 +50,7 @@ function installSkills(tmpDir: string) { '', // root gstack SKILL.md 'qa', 'qa-only', 'ship', 'review', 'plan-ceo-review', 'plan-eng-review', 'plan-design-review', 'design-review', 'design-consultation', 'retro', - 'document-release', 'debug', 'office-hours', 'browse', 'setup-browser-cookies', + 'document-release', 'investigate', 'office-hours', 'browse', 'setup-browser-cookies', 'gstack-upgrade', 'humanizer', ]; @@ -277,7 +277,7 @@ export default app; run('git', ['checkout', '-b', 'feature/waitlist-api']); const testName = 'journey-debug'; - const expectedSkill = 'debug'; + const expectedSkill = 'investigate'; const result = await runSkillTest({ prompt: "The GET /api/waitlist endpoint was working fine yesterday but now it's returning 500 errors. The tests are passing locally but the endpoint fails when I hit it with curl. Can you figure out what's going on?", workingDirectory: tmpDir, diff --git a/test/skill-validation.test.ts b/test/skill-validation.test.ts index dbba759a..d3ab11e9 100644 --- a/test/skill-validation.test.ts +++ b/test/skill-validation.test.ts @@ -218,7 +218,7 @@ describe('Update check preamble', () => { 'ship/SKILL.md', 'review/SKILL.md', 'plan-ceo-review/SKILL.md', 'plan-eng-review/SKILL.md', 'retro/SKILL.md', - 'office-hours/SKILL.md', 'debug/SKILL.md', + 'office-hours/SKILL.md', 'investigate/SKILL.md', 'plan-design-review/SKILL.md', 'design-review/SKILL.md', 'design-consultation/SKILL.md', @@ -530,7 +530,7 @@ describe('v0.4.1 preamble features', () => { 'ship/SKILL.md', 'review/SKILL.md', 'plan-ceo-review/SKILL.md', 'plan-eng-review/SKILL.md', 'retro/SKILL.md', - 'office-hours/SKILL.md', 'debug/SKILL.md', + 'office-hours/SKILL.md', 'investigate/SKILL.md', 'plan-design-review/SKILL.md', 'design-review/SKILL.md', 'design-consultation/SKILL.md', @@ -646,8 +646,8 @@ describe('office-hours skill structure', () => { }); }); -describe('debug skill structure', () => { - const content = fs.readFileSync(path.join(ROOT, 'debug', 'SKILL.md'), 'utf-8'); +describe('investigate skill structure', () => { + const content = fs.readFileSync(path.join(ROOT, 'investigate', 'SKILL.md'), 'utf-8'); for (const section of ['Iron Law', 'Root Cause', 'Pattern Analysis', 'Hypothesis', 'DEBUG REPORT', '3-strike', 'BLOCKED']) { test(`contains ${section}`, () => expect(content).toContain(section)); @@ -1221,7 +1221,7 @@ describe('Skill trigger phrases', () => { // Excluded: root gstack (browser tool), gstack-upgrade (gstack-specific), // humanizer (text tool) const SKILLS_REQUIRING_TRIGGERS = [ - 'qa', 'qa-only', 'ship', 'review', 'debug', 'office-hours', + 'qa', 'qa-only', 'ship', 'review', 'investigate', 'office-hours', 'plan-ceo-review', 'plan-eng-review', 'plan-design-review', 'design-review', 'design-consultation', 'retro', 'document-release', 'codex', 'browse', 'setup-browser-cookies', @@ -1241,7 +1241,7 @@ describe('Skill trigger phrases', () => { // Skills with proactive triggers should have "Proactively suggest" in description const SKILLS_REQUIRING_PROACTIVE = [ - 'qa', 'qa-only', 'ship', 'review', 'debug', 'office-hours', + 'qa', 'qa-only', 'ship', 'review', 'investigate', 'office-hours', 'plan-ceo-review', 'plan-eng-review', 'plan-design-review', 'design-review', 'design-consultation', 'retro', 'document-release', ];