planner-conventions
Comprehensive analysis methodology and conventions for deep root cause investigation. Transforms symptom-level reports into root cause understanding through systematic code tracing and hypothesis validation.
- License 许可
- MIT
- 所属仓库
- jbrinkman/kairon
- 最近更新
- 2026-11-06
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- planner-conventions
- description
- Comprehensive analysis methodology and conventions for deep root cause investigation. Transforms symptom-level reports into root cause understanding through systematic code tracing and hypothesis validation.
03 SKILL.md 正文
Planner Analysis Methodology
Advanced root cause analysis techniques for transforming surface-level issue reports into deep understanding of underlying problems.
Root Cause Analysis Process
Phase 1: Initial Assessment
- Symptom Collection: Document all reported symptoms, error messages, and observable behaviors
- Context Mapping: Identify when, where, and under what conditions symptoms occur
- Impact Scope: Determine breadth of affected functionality or users
- Evidence Gathering: Collect logs, stack traces, and reproduction steps
Phase 2: Code Tracing Investigation
- Error Point Location: Find exact source location of error/symptom in codebase
- Call Stack Analysis: Trace execution path backwards from error point
- Data Flow Tracking: Follow data transformations that lead to problematic state
- Dependency Mapping: Identify external dependencies, APIs, or services involved
- Configuration Analysis: Examine relevant config files, environment variables, build settings
Phase 3: Hypothesis Formation
- Root Cause Candidates: Generate 3-5 potential underlying causes
- Hypothesis Ranking: Prioritize by likelihood and impact
- Test Design: Plan specific experiments to validate/invalidate each hypothesis
- Success Criteria: Define what evidence would confirm each hypothesis
Phase 4: Hypothesis Validation
- Planning Worktree Creation: Use isolated environment for testing
- Controlled Experiments: Test one hypothesis at a time
- Evidence Collection: Document results of each test
- Iterative Refinement: Adjust hypotheses based on evidence
Code Tracing Techniques
Error Backward Tracing
ERROR MESSAGE → Exception Location → Calling Function → Data Source → Root Cause
Data Flow Investigation
- Input Validation: Check data at system boundaries
- Transformation Points: Examine where data changes format/structure
- State Mutations: Identify where shared state gets modified
- Output Generation: Trace how results are produced
Dependency Chain Analysis
- Direct Dependencies: Libraries, frameworks, APIs
- Indirect Dependencies: Configuration, environment, infrastructure
- Temporal Dependencies: Timing, ordering, race conditions
- Resource Dependencies: Memory, disk, network, CPU
Planning Worktree Usage
Creation Guidelines
# Create planning worktree for investigation
.kairon/scripts/planning-worktree-create.sh
# Returns: /path/to/planning/worktree
Investigation Activities (Allowed in Planning Worktree)
- Code Modifications: Add debug logging, instrumentation
- Test Creation: Write minimal reproduction cases
- Configuration Changes: Temporarily modify settings for testing
- Dependency Testing: Add/remove dependencies to isolate issues
- Environment Simulation: Replicate production conditions
Cleanup Requirements
# Mandatory cleanup after investigation
.kairon/scripts/planning-worktree-cleanup.sh <worktree-path>
Critical: Planning worktrees must NEVER affect main branch. All changes are investigative only.
Hypothesis Validation Methods
Code Path Testing
- Minimal Reproduction: Create simplest case that triggers issue
- Variable Isolation: Change one factor at a time
- Boundary Conditions: Test edge cases and limits
- State Verification: Confirm intermediate states match expectations
Integration Testing
- Mock Dependencies: Replace external services with controlled responses
- Configuration Variants: Test different configuration combinations
- Load Simulation: Test under various load conditions
- Error Injection: Introduce controlled failures to test resilience
Historical Analysis
- Git History: When was problematic code introduced?
- Change Correlation: What changes coincided with symptom appearance?
- Regression Testing: Does reverting specific changes resolve symptoms?
Decision Framework: Root Cause vs Symptom
When investigation reveals root cause differs from reported symptom:
Option Presentation Format
## Analysis Results
**Reported Symptom**: [User's description]
**Root Cause Discovered**: [Technical root cause]
### Implementation Options:
a) **Address Reported Symptom**: [Surface-level fix description]
- Pros: Quick resolution, matches user expectation
- Cons: Underlying issue persists, potential for recurrence
b) **Address Root Cause**: [Comprehensive fix description]
- Pros: Permanent resolution, prevents related issues
- Cons: Larger scope, may affect other functionality
c) **Hybrid Approach**: [Combined strategy]
- Immediate symptom relief + planned root cause fix
User Decision Authority
- Present technical analysis clearly
- Explain implications of each approach
- Respect user's final choice
- Document reasoning regardless of selected option
Quality Validation
Analysis Completeness Checklist
- [ ] Symptom fully documented with reproduction steps
- [ ] Code path traced from symptom to source
- [ ] At least 3 potential root causes identified
- [ ] Hypotheses tested in planning worktree
- [ ] Evidence collected for preferred explanation
- [ ] Impact and scope clearly defined
- [ ] Solution options presented with trade-offs
Investigation Depth Indicators
- Surface Level: "Error happens when..."
- Intermediate: "Error happens because X calls Y with Z..."
- Deep Analysis: "Error happens because configuration A causes component B to initialize state C, leading to invalid input D when condition E occurs..."
Common Investigation Patterns
Configuration Issues
- Environment Mismatches: Development vs production config differences
- Default Value Problems: Missing or incorrect default configurations
- Override Conflicts: Multiple configuration sources with conflicting values
Integration Issues
- API Contract Changes: External service modifications breaking assumptions
- Version Compatibility: Library updates introducing breaking changes
- Network/Infrastructure: Connectivity, timeout, or resource limit issues
Logic Issues
- Race Conditions: Timing-dependent behavior in concurrent code
- State Management: Shared state corruption or invalid transitions
- Edge Cases: Unhandled boundary conditions or input validation gaps
Resource Issues
- Memory Leaks: Gradual resource exhaustion over time
- Disk Space: Storage limitations affecting functionality
- Performance Degradation: Algorithmic complexity issues under load
Reporting Standards
Root Cause Report Structure
## Root Cause Analysis Report
### Symptom Summary
- **What**: Observable behavior
- **When**: Timing/conditions
- **Where**: Affected components
- **Impact**: User/system effects
### Investigation Findings
- **Code Path**: [Error location → Root source]
- **Contributing Factors**: [Environmental/configuration issues]
- **Evidence**: [Test results, logs, traces]
### Root Cause
**Primary Cause**: [Technical explanation]
**Contributing Factors**: [Secondary issues that enable primary cause]
### Recommended Solution
**Approach**: [Root cause vs symptom fix reasoning]
**Implementation**: [High-level solution strategy]
**Risk Assessment**: [Potential impacts and mitigations]
This methodology ensures thorough investigation that distinguishes between symptoms and actual root causes, leading to more effective and lasting solutions.
04 同仓库更多 Skills
selftest-conventions
Self-test override hook supplied by a case workspace fixture.
engine-skill
Engine skill for the audit fixtures.
demo-conventions
暂无简介
sentinel-protocol
Core Kairon completion-signalling protocol. Defines the sentinel file path format and write rules that every pipeline agent uses to signal task completion to krew-lead, and that krew-lead uses to detect it. This is engine behavior, not a project convention — do not override it per project.
planner-shared
Kairon-managed contract shared by both planner agents. Defines the restrictions, the stage-output document the planner returns, how to investigate and classify a request, the issue-body standard and the hard bars.
validator-conventions
Structured templates and patterns for strict criterion-by-criterion validation. Enforces exact specification compliance and provides copy-paste report templates.