feat: diagnose suggests next gstack skills based on outcome

Report now includes a NEXT STEPS section that recommends the logical
follow-up skill:
- ROOT_CAUSE + simple fix → /investigate
- ROOT_CAUSE + complex fix → plan + /plan-eng-review
- ROOT_CAUSE + scope question → plan + /plan-ceo-review
- PROBABLE_CAUSE → what data would upgrade confidence, or /qa
- INSUFFICIENT_EVIDENCE → /investigate with specific instructions
- Security implications → /cso
- Multi-system fix → /review when PR is ready

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Milan 2026-04-08 21:35:58 -07:00
parent 9776f21ee3
commit 7ee9d495a9
2 changed files with 32 additions and 0 deletions

View File

@ -1633,6 +1633,10 @@ OPEN QUESTIONS
is more useful than a false "complete" diagnosis.]
STATUS: ROOT_CAUSE_ESTABLISHED | PROBABLE_CAUSE | INSUFFICIENT_EVIDENCE
NEXT STEPS
──────────
[Suggest 1-3 gstack skills based on the diagnosis outcome. Pick from:]
════════════════════════════════════════════════════════════════════
```
@ -1641,6 +1645,18 @@ STATUS: ROOT_CAUSE_ESTABLISHED | PROBABLE_CAUSE | INSUFFICIENT_EVIDENCE
- **PROBABLE_CAUSE:** Confidence 6-8, strong evidence but gaps remain. Report clearly states what's uncertain.
- **INSUFFICIENT_EVIDENCE:** Confidence <6, need more data. Report lists exactly what evidence is needed and how to obtain it.
### Next step suggestions (pick based on outcome):
After printing the report, suggest the most relevant next skill:
- **ROOT_CAUSE_ESTABLISHED + fix is straightforward:**`/investigate` to implement and test the fix
- **ROOT_CAUSE_ESTABLISHED + fix is complex / risky / multi-system:** → Write a plan, then `/plan-eng-review` to lock in the architecture before implementing
- **ROOT_CAUSE_ESTABLISHED + fix needs scope/strategy discussion:** → Write a plan, then `/plan-ceo-review` to decide scope (is this a quick patch or a redesign?)
- **PROBABLE_CAUSE:** → Suggest what additional data/access would upgrade to ROOT_CAUSE. If browse is available and issue is UI-visible, suggest `/qa` to reproduce the exact flow.
- **INSUFFICIENT_EVIDENCE:** → Suggest `/investigate` with specific instructions on what to look for, or suggest instrumenting the code (add logging) and waiting for recurrence.
- **Security implications found:**`/cso` for a security audit of the affected area
- **Multiple systems affected:**`/review` when the fix PR is ready, to catch cross-system issues
---
## Capture Learnings

View File

@ -1049,6 +1049,10 @@ OPEN QUESTIONS
is more useful than a false "complete" diagnosis.]
STATUS: ROOT_CAUSE_ESTABLISHED | PROBABLE_CAUSE | INSUFFICIENT_EVIDENCE
NEXT STEPS
──────────
[Suggest 1-3 gstack skills based on the diagnosis outcome. Pick from:]
════════════════════════════════════════════════════════════════════
```
@ -1057,6 +1061,18 @@ STATUS: ROOT_CAUSE_ESTABLISHED | PROBABLE_CAUSE | INSUFFICIENT_EVIDENCE
- **PROBABLE_CAUSE:** Confidence 6-8, strong evidence but gaps remain. Report clearly states what's uncertain.
- **INSUFFICIENT_EVIDENCE:** Confidence <6, need more data. Report lists exactly what evidence is needed and how to obtain it.
### Next step suggestions (pick based on outcome):
After printing the report, suggest the most relevant next skill:
- **ROOT_CAUSE_ESTABLISHED + fix is straightforward:** → `/investigate` to implement and test the fix
- **ROOT_CAUSE_ESTABLISHED + fix is complex / risky / multi-system:** → Write a plan, then `/plan-eng-review` to lock in the architecture before implementing
- **ROOT_CAUSE_ESTABLISHED + fix needs scope/strategy discussion:** → Write a plan, then `/plan-ceo-review` to decide scope (is this a quick patch or a redesign?)
- **PROBABLE_CAUSE:** → Suggest what additional data/access would upgrade to ROOT_CAUSE. If browse is available and issue is UI-visible, suggest `/qa` to reproduce the exact flow.
- **INSUFFICIENT_EVIDENCE:** → Suggest `/investigate` with specific instructions on what to look for, or suggest instrumenting the code (add logging) and waiting for recurrence.
- **Security implications found:** → `/cso` for a security audit of the affected area
- **Multiple systems affected:** → `/review` when the fix PR is ready, to catch cross-system issues
---
{{LEARNINGS_LOG}}