Investigate problem, verify findings, and derive solutions
44
31%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./skills/recipe-diagnose/SKILL.mdContext: Diagnosis flow to identify root cause and present solutions
Target problem: $ARGUMENTS
Core Identity: "I am not a worker. I am an orchestrator."
Execution Method:
Orchestrator invokes sub-agents and passes structured JSON between them.
Task Registration: Register execution steps using TaskCreate and proceed systematically. Update status using TaskUpdate.
| Type | Criteria |
|---|---|
| Change Failure | Indicates some change occurred before the problem appeared |
| New Discovery | No relation to changes is indicated |
If uncertain, ask the user whether any changes were made right before the problem occurred.
If the following are unclear, ask with AskUserQuestion before proceeding:
Invoke rule-advisor via Agent tool:
subagent_type: rule-advisor
description: "Problem essence analysis"
prompt: Identify the essence and required rules for this problem: [Problem reported by user]Confirm from rule-advisor output:
taskAnalysis.mainFocus: Primary focus of the problemmandatoryChecks.taskEssence: Root problem beyond surface symptomsselectedRules: Applicable rule sectionswarningPatterns: Patterns to avoidInclude the following in investigator prompt:
Problem → investigator → verifier → solver ─┐
↑ │
└── confidence < high ─────┘
(max 2 iterations)
confidence=high reached → ReportContext Separation: Pass only structured JSON output to each step. Each step starts fresh with the JSON data only.
Register the following using TaskCreate and execute:
Agent tool invocation:
subagent_type: investigator
description: "Investigate problem"
prompt: |
Comprehensively collect information related to the following phenomenon.
Phenomenon: [Problem reported by user]
Problem essence: [taskEssence from Step 0.3]
Investigation focus: [investigationFocus from Step 0.4]
[For change failures, additionally include:]
Change details: [What was changed]
Affected area: [What broke]
Shared components: [Commonalities between cause and effect]Expected output: Evidence matrix, comparison analysis results, causal tracking results, list of unexplored areas, investigation limitations
Review investigation output:
Quality Check (verify JSON output contains the following):
comparisonAnalysis is present and normalImplementation is not null (comparison target found) OR explicitly recorded as "no working implementation found"causalChain for each hypothesis reaches a stop condition (code change / design decision / external constraint)causeCategory for each hypothesis is one of: typo / logic_error / missing_constraint / design_gap / external_factorinvestigationSources covers at least 3 distinct source types (code, history, dependency, config, document, external)investigationFocus items (when provided in Step 0.4)supportingEvidence with a source field citing a specific file or locationIf quality insufficient: Re-run investigator specifying missing items explicitly:
prompt: |
Re-investigate with focus on the following gaps:
- Missing: [list specific missing items from quality check]
Previous investigation results (for context, do not re-investigate covered areas):
[Previous investigation JSON]design_gap Escalation:
When investigator output contains causeCategory: design_gap or recurrenceRisk: high:
includeRedesign: true to solverProceed to verifier once quality is satisfied.
Agent tool invocation:
subagent_type: verifier
description: "Verify investigation results"
prompt: Verify the following investigation results.
Investigation results: [Investigation JSON output]Expected output: Alternative hypotheses (at least 3), Devil's Advocate evaluation, final conclusion, confidence
Confidence Criteria:
Agent tool invocation:
subagent_type: solver
description: "Derive solutions"
prompt: Derive solutions based on the following verified conclusion.
Causes: [verifier's conclusion.causes]
Causes relationship: [causesRelationship: independent/dependent/exclusive]
Confidence: [high/medium/low]Expected output: Multiple solutions (at least 3), tradeoff analysis, recommendation and implementation steps, residual risks
Completion condition: confidence=high
When not reached:
Prerequisite: confidence=high achieved
After diagnosis completion, report to user in the following format:
## Diagnosis Result Summary
### Identified Causes
[Cause list from verification results]
- Causes relationship: [independent/dependent/exclusive]
### Verification Process
- Investigation scope: [Scope confirmed in investigation]
- Additional investigation iterations: [0/1/2]
- Alternative hypotheses count: [Number generated in verification]
### Recommended Solution
[Solution derivation recommendation]
Rationale: [Selection rationale]
### Implementation Steps
1. [Step 1]
2. [Step 2]
...
### Alternatives
[Alternative description]
### Residual Risks
[solver's residualRisks]
### Post-Resolution Verification Items
- [Verification item 1]
- [Verification item 2]2e719be
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.