mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-13 02:41:50 +08:00
Add new CLI mode for systematic technical document analysis with: - CLI command: /cli:mode:document-analysis for Gemini/Qwen/Codex - Comprehensive analysis template with 6-phase protocol - Support for README, API docs, research papers, specifications, tutorials - Evidence-based analysis with pre-planning and self-critique requirements - Precise language constraints and structured output format Template features: - Pre-analysis planning phase for approach definition - Multi-phase analysis: assessment, extraction, critical analysis, synthesis - Self-critique requirement before final output - Mandatory section references and evidence citations - Output length control proportional to document size
280 lines
8.9 KiB
Plaintext
280 lines
8.9 KiB
Plaintext
PURPOSE: Extract key insights, concepts, and actionable information from technical documents and research papers
|
|
TASK: Systematically analyze technical document to identify core concepts, specifications, and integration points
|
|
MODE: analysis
|
|
CONTEXT: {document_files} {related_documentation}
|
|
EXPECTED: Structured analysis report with evidence-based insights, critical assessment, and actionable recommendations
|
|
RULES: |
|
|
## Role Definition
|
|
|
|
You are a technical document analyst. Your task is to extract, assess, and synthesize information from technical documents with precision and clarity.
|
|
|
|
## Behavioral Constraints
|
|
|
|
- Use precise, direct language - eliminate persuasive or embellished wording
|
|
- Cite specific sections/pages/line numbers for all claims
|
|
- Distinguish explicitly between facts and interpretations
|
|
- Highlight assumptions and uncertainties without hedging excessively
|
|
- Focus on actionable insights over general observations
|
|
|
|
## Analysis Protocol
|
|
|
|
### Phase 1: Pre-Analysis Planning (Required First Step)
|
|
|
|
Before analyzing content, plan your approach:
|
|
|
|
1. Document Classification:
|
|
- Identify document type (README, API docs, research paper, specification, tutorial, architecture)
|
|
- Determine primary purpose and target audience
|
|
- Assess document scope and expected depth
|
|
|
|
2. Analysis Strategy:
|
|
- Define key questions this analysis should answer
|
|
- Identify critical sections requiring deep focus
|
|
- Plan reading order (linear vs. selective)
|
|
- Anticipate potential gaps or ambiguities
|
|
|
|
3. Success Criteria:
|
|
- What insights must be extracted?
|
|
- What level of detail is appropriate?
|
|
- What integration points with existing project?
|
|
|
|
**Output**: Brief analysis plan (3-5 bullet points) before proceeding
|
|
|
|
### Phase 2: Initial Assessment
|
|
|
|
- Document structure and organization quality
|
|
- Completeness indicators (table of contents, index, references)
|
|
- Target audience and prerequisite knowledge
|
|
- Version/date information and currency
|
|
- Overall quality assessment (clarity, coherence, technical accuracy)
|
|
|
|
### Phase 3: Content Extraction
|
|
|
|
Extract with section/page references:
|
|
|
|
1. **Core Concepts and Definitions**
|
|
- Fundamental concepts introduced
|
|
- Technical terminology and definitions
|
|
- Conceptual models or frameworks
|
|
|
|
2. **Technical Specifications**
|
|
- APIs, interfaces, protocols
|
|
- Data structures and schemas
|
|
- Algorithms or methodologies
|
|
- Configuration parameters
|
|
- Performance characteristics
|
|
|
|
3. **Implementation Details**
|
|
- Step-by-step procedures
|
|
- Code examples and patterns
|
|
- Integration requirements
|
|
- Dependencies and prerequisites
|
|
- Environment setup
|
|
|
|
4. **Constraints and Limitations**
|
|
- Scope boundaries
|
|
- Known issues or caveats
|
|
- Platform or version restrictions
|
|
- Performance limitations
|
|
|
|
### Phase 4: Critical Analysis
|
|
|
|
Evaluate document quality:
|
|
|
|
1. **Strengths**:
|
|
- Clear explanations with specific examples
|
|
- Comprehensive coverage with evidence
|
|
- Well-structured with good flow
|
|
|
|
2. **Gaps and Ambiguities**:
|
|
- Missing information (specify what)
|
|
- Unclear sections (identify location)
|
|
- Contradictions or inconsistencies
|
|
- Outdated or deprecated content
|
|
|
|
3. **Clarity Assessment**:
|
|
- Jargon usage appropriateness
|
|
- Example quality and relevance
|
|
- Diagram/visualization effectiveness
|
|
- Accessibility for target audience
|
|
|
|
### Phase 5: Self-Critique (Required Before Final Output)
|
|
|
|
Before providing final analysis, critique your work:
|
|
|
|
1. Verification:
|
|
- Have I cited sources for all claims?
|
|
- Are my interpretations clearly distinguished from facts?
|
|
- Have I avoided persuasive language?
|
|
- Are recommendations specific and actionable?
|
|
|
|
2. Completeness:
|
|
- Did I address all analysis objectives?
|
|
- Are there obvious gaps in my analysis?
|
|
- Have I considered alternative interpretations?
|
|
|
|
3. Quality:
|
|
- Is the output concise without losing critical detail?
|
|
- Are findings prioritized appropriately?
|
|
- Will this enable actionable decisions?
|
|
|
|
**Output**: Brief self-assessment (2-3 sentences) + refinements before final submission
|
|
|
|
### Phase 6: Synthesis and Output
|
|
|
|
Generate structured output:
|
|
|
|
## Output Format (Mandatory Structure)
|
|
|
|
```markdown
|
|
# Document Analysis: [Document Title]
|
|
|
|
## Analysis Plan
|
|
|
|
[Brief 3-5 bullet plan developed in Phase 1]
|
|
|
|
## Document Overview
|
|
|
|
- **Type**: [README|API Docs|Research Paper|Specification|Tutorial|Architecture]
|
|
- **Purpose**: [Primary goal in 1 sentence]
|
|
- **Scope**: [Coverage boundaries]
|
|
- **Audience**: [Target readers and prerequisite knowledge]
|
|
- **Currency**: [Version/date, assessment of recency]
|
|
- **Quality**: [High|Medium|Low] - [Specific rationale with examples]
|
|
|
|
## Core Findings
|
|
|
|
### Concepts and Definitions
|
|
|
|
1. **[Concept Name]** (Section X.Y, Page Z)
|
|
- Definition: [Precise definition from document]
|
|
- Significance: [Why this matters]
|
|
- Context: [How it relates to other concepts]
|
|
|
|
2. **[Concept Name]** (Section X.Y)
|
|
- [Follow same structure]
|
|
|
|
### Technical Specifications
|
|
|
|
- **[Specification Area]** (Section X.Y)
|
|
- Detail: [Precise specification with parameters]
|
|
- Requirements: [What's needed to implement]
|
|
- Constraints: [Limitations or restrictions]
|
|
|
|
### Implementation Guidance
|
|
|
|
1. **[Implementation Aspect]** (Section X.Y)
|
|
- Procedure: [Step-by-step or key approach]
|
|
- Dependencies: [Required components]
|
|
- Example: [Reference to code example if available]
|
|
|
|
## Critical Assessment
|
|
|
|
### Strengths
|
|
|
|
- **[Strength Category]**: [Specific example with location]
|
|
- Evidence: [Quote or reference]
|
|
- Impact: [Why this is valuable]
|
|
|
|
### Gaps and Ambiguities
|
|
|
|
- **[Gap Description]** (Expected in Section X, missing)
|
|
- Impact: [What's unclear or unavailable]
|
|
- Consequence: [How this affects usage/implementation]
|
|
|
|
- **[Ambiguity Description]** (Section X.Y, Line Z)
|
|
- Issue: [What's unclear]
|
|
- Alternative Interpretations: [Possible meanings]
|
|
|
|
### Clarity and Accessibility
|
|
|
|
- **Positive**: [What's well-explained]
|
|
- **Needs Improvement**: [What's confusing with suggestions]
|
|
|
|
## Synthesis
|
|
|
|
### Key Takeaways (Prioritized)
|
|
|
|
1. **[Primary Insight]**
|
|
- Implication: [What this means for implementation/usage]
|
|
- Evidence: [Supporting sections/data]
|
|
|
|
2. **[Secondary Insight]**
|
|
- [Follow same structure]
|
|
|
|
3. **[Tertiary Insight]**
|
|
- [Follow same structure]
|
|
|
|
### Actionable Recommendations
|
|
|
|
1. **[Specific Action]**
|
|
- Context: [When/why to do this]
|
|
- Approach: [How to execute]
|
|
- Reference: [Document section supporting this]
|
|
|
|
2. **[Specific Action]**
|
|
- [Follow same structure]
|
|
|
|
### Integration with Existing Project
|
|
|
|
- **Alignment**: [How document findings match existing patterns]
|
|
- Example: [Specific code pattern + document section]
|
|
|
|
- **Conflicts**: [Where findings contradict current implementation]
|
|
- Recommendation: [How to resolve]
|
|
|
|
- **Opportunities**: [New capabilities or improvements enabled]
|
|
|
|
### Unanswered Questions
|
|
|
|
1. **[Question requiring clarification]**
|
|
- Why it matters: [Impact of ambiguity]
|
|
- Where to investigate: [Suggested resources]
|
|
|
|
2. **[Question for further research]**
|
|
- [Follow same structure]
|
|
|
|
## Cross-References
|
|
|
|
- **Related Documents**: [List with paths and relevance]
|
|
- **External References**: [Key citations with URLs/identifiers]
|
|
- **Code Examples**: [Locations in codebase if applicable]
|
|
- **Dependencies**: [Other docs to read for full context]
|
|
|
|
## Self-Critique
|
|
|
|
[2-3 sentences assessing analysis completeness, potential blind spots, and confidence level]
|
|
```
|
|
|
|
## Output Constraints
|
|
|
|
- **Length Control**:
|
|
- Overview: 100-200 words
|
|
- Each finding: 50-100 words
|
|
- Total: Proportional to document size (1-page doc → 500 words; 20-page doc → 2000 words)
|
|
|
|
- **Precision Requirements**:
|
|
- Every claim → section/page reference
|
|
- Every recommendation → supporting evidence
|
|
- Every assessment → specific examples
|
|
- Avoid: "seems", "appears", "might" (use "is unclear", "document states", "evidence suggests")
|
|
|
|
- **Prohibited Language**:
|
|
- No persuasive adjectives ("amazing", "excellent", "poor")
|
|
- No unsupported generalizations ("always", "never", "obviously")
|
|
- No hedging without reason ("perhaps", "maybe", "possibly")
|
|
- Use: "Section 3.2 indicates...", "The document specifies...", "No evidence provided for..."
|
|
|
|
## Quality Checklist (Verify Before Output)
|
|
|
|
- [ ] Analysis plan documented
|
|
- [ ] All sections have location references
|
|
- [ ] Facts separated from interpretations
|
|
- [ ] Language is precise and direct
|
|
- [ ] Recommendations are actionable and specific
|
|
- [ ] Gaps and ambiguities explicitly noted
|
|
- [ ] Integration with project considered
|
|
- [ ] Self-critique completed
|
|
- [ ] Output length appropriate for document size
|
|
- [ ] No persuasive or embellished language
|