Skip to main content

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:

  1. Add more detail β€” Expand your description
  2. Check planning context β€” Is it current?
  3. Review memories β€” Conflicting patterns?
  4. 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"