Nanocycles
The Nanocycle is the fundamental unit of work in Tevisβa structured development cycle that takes your requirements from plan to merged code.
What is a Nanocycle?β
A nanocycle is a complete development iteration with:
- Clear scope β Defined features and tasks
- AI planning β Structured plan generation
- Parallel execution β Multiple TPUs working simultaneously
- Human review β Approval gates throughout
- Clean completion β Merged, tested, documented
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β NANOCYCLE NC-007 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β PLAN EXECUTE REVIEW CLOSE β
β βββββ βββββββ ββββββ βββββ β
β β β β β β
β ββ Draft ββ TPU-1 ββ Code review ββ Merge β
β ββ Review ββ TPU-2 ββ Tests pass ββ Cleanup β
β ββ Approve ββ TPU-3 ββ Approve ββ Archive β
β ββ Hold points β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Nanocycle Lifecycleβ
1. Draft Phaseβ
You describe what you want to build:
# Nanocycle Description
Add user settings page with:
- Profile editing (name, email, avatar)
- Password change flow
- Notification preferences
- Theme selection (dark/light)
- Account deletion option
Tevis generates a structured plan with features and tasks.
2. Ready Phaseβ
You review and approve the plan:
nanocycle: NC-007
title: User Settings Page
status: ready
features:
- name: settings-api
tasks:
- T001: Create settings endpoints
- T002: Add validation schemas
- T003: Write API tests
- name: settings-ui
tasks:
- T004: Create SettingsPage component
- T005: Add profile editing form
- T006: Add password change modal
- T007: Add notification toggles
- T008: Add theme selector
- T009: Add delete account flow
- name: integration
tasks:
- T010: Wire UI to API
- T011: Add E2E tests
3. In Progress Phaseβ
TPUs execute tasks in parallel:
Feature: settings-api
βββ TPU-1: T001 [ββββββββββββ] Complete
βββ TPU-1: T002 [ββββββββββββ] In Progress
βββ TPU-1: T003 [ββββββββββββ] Pending
Feature: settings-ui
βββ TPU-2: T004 [ββββββββββββ] Complete
βββ TPU-2: T005 [ββββββββββββ] In Progress
βββ ...
Feature: integration (blocked until dependencies complete)
4. Completed Phaseβ
All tasks done, ready for review:
- All features complete
- Tests passing
- Code ready for review
5. Closing Phaseβ
Final review and merge:
- Generate closure summary
- Create PR
- Run final tests
- Merge to main
6. Archived Phaseβ
Nanocycle complete and archived:
- Artifacts preserved in knowledge base
- Memory extracted
- Branches cleaned up
- PR merged
Nanocycle Statesβ
| State | Description | Actions Available |
|---|---|---|
draft | Plan being generated | Edit scope, regenerate |
ready | Plan approved, ready to run | Execute, edit plan |
in_progress | TPUs actively working | Monitor, hold points |
completed | Execution done | Review, request changes |
closing | Closure in progress | Wait |
closed | PR created, ready to merge | Merge, archive |
archived | Complete, PR merged | View history |
failed | Execution failed | Diagnose, retry |
Features and Tasksβ
Featuresβ
Features are logical groupings of related tasks:
features:
- name: auth-backend # Backend auth logic
- name: auth-frontend # UI components
- name: auth-integration # Wiring and tests
Features can have dependencies:
features:
- name: database-setup
- name: api-endpoints
depends_on: [database-setup]
- name: ui-components
depends_on: [api-endpoints]
Tasksβ
Tasks are atomic units of work:
tasks:
- id: T001
subject: Create User model
description: Define SQLAlchemy User model with email, password_hash, created_at
- id: T002
subject: Add password hashing
description: Implement bcrypt password hashing utility
depends_on: [T001]
Task properties:
idβ Unique identifier (T001, T002, etc.)subjectβ Brief descriptiondescriptionβ Detailed requirementsdepends_onβ Task dependenciesstatusβ pending, in_progress, completed, failed
Execution Modelβ
Parallel Executionβ
TPUs work on independent features simultaneously:
Time β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β TPU-1: [auth-backend ββββββββββββββββββββ] β
β β
β TPU-2: [auth-frontend ββββββββββββββββββββββββββββ] β
β β
β TPU-3: [auth-integration ββββββββββββ]β
β β β β
β Start Unblocked when deps complete β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Task Flowβ
Within a feature, tasks execute sequentially respecting dependencies:
T001 (Create model)
β
T002 (Add validation) βββ depends_on: T001
β
T003 (Write tests) ββββββ depends_on: T002
Hold Pointsβ
Execution pauses at hold points:
hold_points:
- type: file_deletion
file: src/old-auth.py
reason: "About to delete existing auth implementation"
- type: ambiguous_requirement
task: T005
question: "Should password require special characters?"
Creating Nanocyclesβ
From Mission Controlβ
- Open active session
- Click "New Nanocycle"
- Describe requirements
- Review generated plan
- Approve to start execution
From CLIβ
# Create with description
tevis nanocycle create --description "Add user settings page"
# Create from file
tevis nanocycle create --from-file requirements.md
# Create and auto-approve (use with caution)
tevis nanocycle create --description "..." --auto-approve
From Planning Contextβ
If your microcycle specifies planned nanocycles:
# Microcycle: Week 1
## Planned Nanocycles
1. NC-007: User settings page
2. NC-008: Email notifications
3. NC-009: API rate limiting
Tevis can auto-populate nanocycle descriptions from your planning context.
Nanocycle Sizingβ
Ideal Sizeβ
A well-sized nanocycle has:
- 5-15 tasks β Enough for meaningful progress
- 2-4 features β Logical groupings
- 4-8 hour execution β Completes in a reasonable time
- Clear scope β Well-defined boundaries
Too Smallβ
β NC-007: Fix typo in README
- Single trivial task
- Overhead exceeds value
- Better as quick fix
Too Largeβ
β NC-007: Rebuild entire authentication system
- 50+ tasks
- Multiple days execution
- Too many unknowns
- Hard to review
Just Rightβ
β
NC-007: Add password reset flow
- Feature 1: Reset API endpoints (3 tasks)
- Feature 2: Email templates (2 tasks)
- Feature 3: Reset UI flow (4 tasks)
- Feature 4: Integration tests (2 tasks)
- Total: 11 tasks, clear scope
Nanocycle Artifactsβ
Each nanocycle produces artifacts stored in the knowledge base:
kb/nanocycles/NC-007/
βββ 01_Planning/
β βββ PLAN.md # Approved plan
β βββ requirements.md # Original requirements
βββ 02_Execution/
β βββ cycle.json # Machine-readable plan
β βββ execution.log # Execution logs
β βββ features/
β βββ settings-api/
β β βββ progress.txt
β βββ settings-ui/
β β βββ progress.txt
β βββ integration/
β βββ progress.txt
βββ 03_Closure/
βββ CLOSURE_OVERVIEW.md # Summary
βββ pr_url.txt # Link to PR
Monitoring Nanocyclesβ
Status Viewβ
tevis nanocycle status NC-007
# Output
Nanocycle: NC-007
Title: User Settings Page
Status: in_progress
Progress: 7/11 tasks (64%)
Features:
settings-api [ββββββββββββ] Complete
settings-ui [ββββββββββββ] 75%
integration [ββββββββββββ] 33%
Active TPUs: 2
Hold Points: 0
ETA: ~45 minutes
Consciousness Streamβ
Real-time execution output streams to Mission Control:
[14:32:15] TPU-2 | Starting T006: Add password change modal
[14:32:18] TPU-2 | Creating file: src/components/PasswordChangeModal.tsx
[14:32:25] TPU-2 | Adding form validation
[14:32:32] TPU-2 | Writing component tests
[14:32:45] TPU-2 | Task T006 complete
Best Practicesβ
Write Clear Requirementsβ
β "Add settings"
β
"Add user settings page with:
- Profile editing (name, email, avatar)
- Password change with current password verification
- Notification preferences (email, push toggles)
- Theme selection (dark/light/system)
- Account deletion with confirmation"
Review Plans Before Approvingβ
Don't auto-approve. Check:
- All requirements addressed
- Tasks are appropriately sized
- Dependencies make sense
- Scope is achievable
Monitor Executionβ
Don't start and walk away for hours. Check periodically:
- Progress is steady
- No stuck tasks
- No accumulating errors
Review Thoroughlyβ
Before closing:
- Read generated code
- Run tests locally
- Check for security issues
- Verify edge cases