بنقرة واحدة
recipe-diagnose
Investigate problem, verify findings, and derive solutions through structured diagnosis.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Investigate problem, verify findings, and derive solutions through structured diagnosis.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Anti-pattern detection, root-cause discipline, quality check workflow, and implementation completeness assurance. Use when: fixing bugs, reviewing code quality, refactoring, making technical decisions, or performing quality assurance.
Language-agnostic coding standards for maintainability, readability, and quality. Use when: implementing features, refactoring code, reviewing code quality, or writing functions.
Documentation creation criteria for PRD, ADR, Design Doc, UI Spec, and Work Plan with templates. Use when: creating or reviewing technical documents, determining which documents are required, or following document templates.
Implementation strategy selection framework with meta-cognitive approach. Use when: planning implementation strategy, selecting between vertical/horizontal slicing, or defining verification criteria for tasks.
Integration and E2E test design principles, value-based selection, test skeleton specification, and review criteria. Use when: designing integration tests, E2E tests, generating test skeletons, or reviewing test quality.
Guides subagent coordination through implementation workflows. Use when: orchestrating multiple agents, managing workflow phases, determining autonomous execution mode, or coordinating recipe execution.
| name | recipe-diagnose |
| description | Investigate problem, verify findings, and derive solutions through structured diagnosis. |
ai-development-guide — AI development patternscoding-rules — coding standardsllm-friendly-context — clear prompts, handoffs, and generated artifactsSpawn rule: every spawn_agent call uses fork_turns="none" so the subagent receives only the task message and explicitly provided context.
Context: Diagnosis flow to identify concrete failure points and present solutions
Target problem: $ARGUMENTS
Core Identity: "I am not a worker. I am an orchestrator."
Execution Method:
Orchestrator spawns sub-agents and passes structured data between them.
Task Registration: Register execution steps and proceed systematically. Track status for each step.
| 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, MUST ask the user before proceeding:
Spawn rule-advisor agent: "Identify the essence and required rules for this problem: [Problem reported by user]"
Confirm from rule-advisor output:
taskAnalysis.essence: Root problem beyond surface symptomstaskAnalysis.taskType: Classification of the problemselectedRules: Applicable rule sectionswarningPatterns: Patterns to avoidInclude the following in investigator prompt:
taskAnalysis.essence)Problem -> investigator -> verifier -> solver --+
^ |
+-- coverage insufficient -----+
(max 2 iterations)
coverage sufficient -> Report
Context Separation: Pass only structured output to each step. Each step starts fresh with the data only.
Register the following and execute:
Spawn investigator agent with the following prompt:
Comprehensively collect information related to the following phenomenon.
Phenomenon: [Problem reported by user]
Problem essence: [taskEssence]
Investigation focus: [investigationFocus]
Applicable rules: [selectedRules summary]
For change failures, also include:
- what changed
- what broke
- what both areas share
Expected output: Evidence matrix, path map, failure points, comparison analysis results, list of unexplored areas, investigation limitations
Review investigation output:
Quality Check (verify output contains the following):
comparisonAnalysis is present and normalImplementation is non-null, or explicitly states that no working implementation was foundpathMap is present with ordered nodes or explicit unknown segmentsinvestigationSources covers at least 3 distinct source typesIf quality insufficient: MUST re-spawn investigator agent specifying the missing items and include the previous investigation output for context ENFORCEMENT: Proceeding to verifier with incomplete investigation data produces unreliable conclusions.
design_gap Escalation:
When investigator output contains causeCategory: design_gap or recurrenceRisk: high:
includeRedesign: true to solverProceed to verifier once quality is satisfied.
Spawn verifier agent: "Verify the following investigation results. Investigation results: [Investigation output]"
Expected output: Path coverage findings, independent failure-point evaluation, final conclusion, coverageAssessment/finalStatus
Coverage Criteria:
Spawn solver agent: "Derive solutions based on the following verified conclusion. Failure points: [verifier's conclusion.confirmedFailurePoints]. Failure-point relationships: [verifier's conclusion.failurePointRelationships]. Coverage assessment: [verifier's conclusion.coverageAssessment]. Final status: [verifier's conclusion.finalStatus]. Impact analysis: [investigator output impactAnalysis]."
Expected output: Multiple solutions (at least 3), tradeoff analysis, recommendation and implementation steps, residual risks
Completion condition: coverageAssessment=sufficient and finalStatus=ready_for_solution
When not reached:
Prerequisite: sufficient coverage achieved
After diagnosis completion, report to user in the following format:
## Diagnosis Result Summary
### Identified Failure Points
[Failure point list from verification results]
- Failure-point relationships: [independent/upstream_of/downstream_of/amplifies/same_boundary]
### Verification Process
- Investigation scope: [Scope confirmed in investigation]
- Additional investigation iterations: [0/1/2]
- Coverage assessment: [sufficient/partial/insufficient]
### 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]