Skip to content

Latest commit

 

History

History
109 lines (86 loc) · 3.91 KB

02-context-management.org

File metadata and controls

109 lines (86 loc) · 3.91 KB

LLM Lab Code Analysis Example

Available Analysis Templates

First, check available analysis templates.

llm templates list | grep '^sin'

Initial Code Analysis

Framework Selection

Analyze codebase to recommend suitable framework.

files-to-prompt -c scripts | llm -m llama3.2 -c -t sin \
  "Analyze this codebase and recommend a suitable framework for summarizing, assessing risk, or strategic analysis."

RAID Analysis

Risks and Dependencies

Run RAID framework analysis.

files-to-prompt -c scripts | llm -m llama3.2 -c -t memory \
  "Using the RAID framework, identify and document risks, assumptions, issues, and dependencies in this codebase."

Structure Analysis

Project Organization

Analyze repository structure.

tree -a -I '.git|.venv|__pycache__|*.pyc' . | llm -m llama3.2 -c -t memory \
  "Identify the most important files and directories in this codebase and explain their purpose."

Documentation Review

find . -type f -name "*.md" -o -name "*.org" | files-to-prompt | llm -m llama3.2 -c -t memory \
  "Assess the quality and completeness of the documentation, including READMEs, comments, and inline docs."

Dependency Analysis

files-to-prompt -c scripts | llm -m llama3.2 -c -t memory \
  "Identify external libraries or tools used in this project and assess their impact on the codebase."

Testing Infrastructure

files-to-prompt -c tests | llm -m llama3.2 -c -t memory \
  "Evaluate the presence and quality of tests, CI/CD pipelines, and their coverage in this project."

Technical Debt

find . -type f -name "*.sh" -o -name "*.py" | xargs grep -l "TODO\|FIXME" | files-to-prompt | \
  llm -m llama3.2 -c -t memory \
  "Identify any TODOs or FIXMEs in the codebase and suggest actions to address them."

Generate Executive Summary

cat data/analysis/*.md | llm -m llama3.2 "Create an executive summary of the codebase analysis, including:
1. Key findings
2. Critical risks and dependencies
3. Recommended immediate actions
4. Long-term improvements

Format with markdown headings and bullet points."