LPU System
The LPU (LLM Processing Unit) is Tevis's intelligence engineβresponsible for understanding your requirements, generating plans, and providing contextual guidance throughout development.
What is the LPU?β
The LPU is not just a chatbot. It's a specialized AI subsystem designed for software development tasks:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LPU β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Planning β β Analysis β β Guidance β β
β β Engine β β Engine β β Engine β β
β ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ β
β β β β β
β ββββββββββββββββββΌβββββββββββββββββ β
β β β
β βββββββΌββββββ β
β β Context β β
β β Manager β β
β βββββββ¬ββββββ β
β β β
β ββββββββββββββββββΌβββββββββββββββββ β
β β β β β
β ββββββΌβββββ βββββββΌββββββ ββββββββΌβββββββ β
β β Memory β β Planning β β Project β β
β β System β β Context β β Knowledge β β
β βββββββββββ βββββββββββββ βββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
LPU Capabilitiesβ
Plan Generationβ
Transform requirements into structured plans:
Input:
"Add user authentication with OAuth support"
Output:
nanocycle: NC-007
title: User Authentication with OAuth
features:
- name: oauth-providers
tasks:
- T001: Set up OAuth configuration
- T002: Implement Google OAuth
- T003: Implement GitHub OAuth
- name: auth-flow
tasks:
- T004: Create login page
- T005: Handle OAuth callbacks
- T006: Manage sessions
- name: testing
tasks:
- T007: Write auth tests
Context Analysisβ
Understand your project from multiple sources:
Sources Analyzed:
βββ Planning Context
β βββ MACROCYCLE.md β Strategic goals
β βββ MESOCYCLE.md β Current focus
β βββ MICROCYCLE.md β Immediate priorities
βββ Memory System
β βββ Past decisions
β βββ Learned patterns
β βββ Failure lessons
βββ Project Knowledge
β βββ Code structure
β βββ Dependencies
β βββ Conventions
βββ Current Request
βββ Your description
Task Guidanceβ
Provide contextual guidance during execution:
Guidance Generation:
βββ Task instructions
βββ Relevant code patterns
βββ Similar past implementations
βββ Potential pitfalls
βββ Testing suggestions
LPU Enginesβ
Planning Engineβ
Generates structured nanocycle plans:
Inputs:
- Your requirement description
- Planning context (macro/meso/micro)
- Relevant memories
- Project conventions
Outputs:
- Feature breakdown
- Task list with dependencies
- Estimated scope
- Risk factors
Process:
Description β Analyze Requirements
β
Check Planning Context
β
Retrieve Relevant Memories
β
Generate Feature Structure
β
Create Task Breakdown
β
Add Dependencies
β
Validate Plan
β
Return Plan
Analysis Engineβ
Understands context and provides insights:
Capabilities:
- Code analysis (structure, patterns)
- Requirement parsing
- Risk assessment
- Dependency identification
Example:
Query: "What would it take to add GraphQL to this project?"
Analysis:
- Current REST API in src/api/
- 15 endpoints to potentially convert
- Dependencies needed: graphql, apollo-server
- Estimated complexity: Medium
- Suggested approach: Gradual migration with hybrid period
- Risks: Breaking existing clients
- Related memory: Past API migration took 3 nanocycles
Guidance Engineβ
Provides execution-time assistance:
When Used:
- TPU encounters ambiguity
- Hold point triggered
- Error needs resolution
- Decision point reached
Example:
Hold Point: "Two valid approaches for password hashing"
Guidance:
Option A: bcrypt
- Industry standard
- Automatic salt
- Project uses bcrypt elsewhere
Option B: argon2
- Newer, more secure
- Would introduce new dependency
- Not currently used in project
Recommendation: bcrypt (consistency with existing code)
Context Managementβ
The LPU maintains rich context for quality responses:
Planning Context Hierarchyβ
MACROCYCLE (Months)
βββ Strategic vision
βββ Quarterly OKRs
βββ Major milestones
β
βΌ
MESOCYCLE (Weeks)
βββ Feature themes
βββ Monthly objectives
βββ Focus areas
β
βΌ
MICROCYCLE (Days)
βββ Tactical priorities
βββ Planned nanocycles
βββ Blockers/risks
Memory Integrationβ
The LPU accesses the memory system for:
- Decisions β Why certain choices were made
- Patterns β How things are typically done
- Failures β What to avoid
- Preferences β Your coding style
Project Knowledgeβ
Automatic understanding of:
- Repository structure
- Language/framework choices
- Dependency list
- Configuration patterns
- Testing approaches
Using the LPUβ
Direct Queriesβ
Ask questions about your project:
# CLI
tevis ask "How is authentication currently handled?"
# Mission Control
# Use the AI chat panel
Plan Generationβ
Request nanocycle plans:
# With description
tevis nanocycle create --description "Add rate limiting to API"
# LPU generates and presents plan for approval
Analysis Requestsβ
Get insights on specific topics:
# Analyze codebase aspect
tevis analyze "What are our API response patterns?"
# Get implementation guidance
tevis guide "How should I implement caching?"
LPU Best Practicesβ
Write Clear Descriptionsβ
The better your input, the better the output:
β "Add auth"
β
"Add user authentication with:
- Email/password login
- JWT tokens (15min access, 7d refresh)
- Password reset via email
- Rate limiting on auth endpoints
- Audit logging for security events"
Maintain Planning Contextβ
Keep your planning docs current:
# MICROCYCLE.md - Update Weekly
## This Week's Focus
- Complete user settings page
- Start notification system
## Planned Nanocycles
- NC-015: Settings UI
- NC-016: Email notifications
The LPU uses this for alignment.
Provide Feedbackβ
Help the LPU learn your preferences:
# After plan generation
tevis feedback "Plan was good but we prefer Repository pattern over Active Record"
# Stored in memory for future use
LPU Configurationβ
Model Selectionβ
Configure which model powers the LPU:
# ~/.tevis/config.yaml
lpu:
model: claude-sonnet-4-20250514
# Options: claude-sonnet-4-20250514, claude-opus-4-5-20251101
Context Limitsβ
Control how much context is included:
lpu:
context:
max_tokens: 100000
include_memory: true
include_planning: true
memory_limit: 50 # Most recent memories
Custom Instructionsβ
Add persistent instructions:
lpu:
instructions: |
- Prefer TypeScript over JavaScript
- Use functional patterns where appropriate
- Always include error handling
- Write tests for edge cases
Troubleshootingβ
Poor Plan Qualityβ
If generated plans miss the mark:
- Add more detail β Expand your description
- Check planning context β Is it current?
- Review memories β Conflicting patterns?
- Provide examples β Show what you want
Slow Responsesβ
LPU calls taking too long:
# Check model being used
tevis config get lpu.model
# Consider faster model
tevis config set lpu.model claude-sonnet-4-20250514
# Or reduce context
tevis config set lpu.context.memory_limit 20
Inconsistent Suggestionsβ
LPU seems to forget preferences:
# Verify memory is enabled
tevis config get lpu.context.include_memory
# Check stored memories
tevis memory list
# Add explicit preference as memory
tevis memory add "Always use Repository pattern for data access"