evolve
Use when all sections are complete - generates the final driver-plan/ export package
SKILL.md
| Name | evolve |
| Description | Use when all sections are complete - generates the final driver-plan/ export package |
name: evolve description: Use when all sections are complete - improves the workflow, refines the artifact, extracts patterns, and generates the final driver-plan/ export package
Evolve
Stage Announcement: "We're in EVOLVE — making the next cycle better than this one."
You are a Cognition Mate helping the developer carry forward what compounds. Evolve has four beats; the plugin's job is to make all four concrete and produce a self-contained export along the way.
Project Folder: Check
.driver.jsonat the repo root for the project folder name (default:my-project/). All project files live in this folder.
Your relationship: 互帮互助,因缘合和,互相成就
- You bring: organization, packaging, documentation, retrospective prompts
- They bring: the completed design work and the judgment about what's worth keeping
- The export speaks for itself — show don't tell
Iron Law
<IMPORTANT> **EVERY CYCLE IMPROVES THE NEXT**Don't ship the export until the four beats are addressed:
- Process improvement — what got better about HOW we worked this cycle?
- Artifact refinement — what did Validate surface that should land in v2?
- Pattern extraction — what generalizes beyond this project?
- Outside the box — same pattern, new domain?
The driver-plan/ package is the artifact carrier for beats 2 and 3; the
retrospective ("Optimize + Expand" step) carries beats 1 and 4. Both ship.
The export itself MUST be completely self-contained — anyone should be able to take the folder and implement the product, with no references to DRIVER, no external dependencies, no missing context. </IMPORTANT>
Red Flags
| Thought | Reality |
|---|---|
| "They can refer back to the original files" | Export must be self-contained |
| "The prompts are optional" | Prompts are the primary interface |
| "Implementation details aren't needed" | Include types, sample data, everything |
| "This is just a handoff doc" | This is the complete deliverable |
Prerequisites
Verify the minimum requirements exist:
Required:
[project]/product-overview.md— Product overview[project]/roadmap.md— Sections defined- At least one built section:
- Python/Streamlit:
app.pyorpages/*.pyfiles exist - React:
src/sections/[section-id]/directories exist
- Python/Streamlit:
Recommended (show warning if missing):
[project]/data-model.md— Global data model[project]/validation.md— Validation results- React only:
[project]/design/tokens.json,src/shell/components/AppShell.tsx
If required files are missing:
"To export your product, you need at minimum:
- A product overview (
/define) - A roadmap with sections (
/represent-roadmap) - At least one section with screen designs
Please complete these first."
Stop here if required files are missing.
The Flow
1. Gather Export Information
Read all relevant files:
[project]/product-overview.md[project]/roadmap.md[project]/research.md(if exists)[project]/data-model.md(if exists)[project]/design/tokens.json(if exists)- For each section:
[project]/spec-[section-name].md - Python/Streamlit: List
.pyfiles inapp.py,pages/,calculations/,data/ - React: List components in
src/sections/andsrc/shell/; read[project]/build/[section-id]/data.jsonandtypes.ts
2. Create Export Directory Structure
Check .driver.json for the type field ("python" or "react"). If type is missing, infer from [project]/product-overview.md and existing source files.
Path A: Python + Streamlit (Quant/Analytical Tools)
driver-plan/
├── README.md # Quick start guide
├── product-overview.md # Product summary (always provide)
├── research.md # Research findings (if exists)
│
├── prompts/ # Ready-to-use prompts for coding agents
│ ├── one-shot-prompt.md # Prompt for full implementation
│ └── section-prompt.md # Prompt template for section-by-section
│
├── instructions/ # Implementation instructions
│ ├── one-shot-instructions.md # All milestones combined
│ └── incremental/ # For milestone-by-milestone
│ ├── 01-foundation.md
│ └── [NN]-[section-id].md
│
├── requirements.txt # Python dependencies (pinned versions)
├── app.py # Main Streamlit entry point
├── pages/ # Streamlit multi-page convention
│ ├── 1_[Section_Name].py # Each file = a nav item (auto-discovered)
│ └── 2_[Section_Name].py # Prefix with number for ordering
├── calculations/ # Core logic (pure Python, testable)
│ └── [module].py
├── data/ # Data loading and processing
│ └── loader.py
└── sections/ # Section reference docs
└── [section-id]/
├── README.md
├── tests.md # Test-writing instructions (pytest)
└── logic.py # Calculation logic (separate from UI)
Path B: React + TypeScript (Web App UI)
driver-plan/
├── README.md # Quick start guide
├── product-overview.md # Product summary (always provide)
├── research.md # Research findings (if exists)
│
├── prompts/ # Ready-to-use prompts for coding agents
│ ├── one-shot-prompt.md # Prompt for full implementation
│ └── section-prompt.md # Prompt template for section-by-section
│
├── instructions/ # Implementation instructions
│ ├── one-shot-instructions.md # All milestones combined
│ └── incremental/ # For milestone-by-milestone
│ ├── 01-foundation.md
│ └── [NN]-[section-id].md
│
├── design-system/ # Design tokens
├── data-model/ # Data model and types
├── shell/ # Shell components
└── sections/ # Section components
└── [section-id]/
├── README.md
├── tests.md # Test-writing instructions (TDD)
├── components/
├── types.ts
└── sample-data.json
3. Generate Content
For each file, generate appropriate content:
- product-overview.md: Product summary with sections and data model
- research.md: Copy from
[project]/research.mdif it exists - Prompts: Ready-to-paste prompts that ask clarifying questions about data sources, deployment, tech stack
- Instructions: Milestone-by-milestone implementation guides
- tests.md: Framework-appropriate test instructions
- Section READMEs: Overview, user flows, key logic
Path A Preamble (Python + Streamlit)
Include in all instruction files:
**What you're receiving:**
- Working Streamlit app with calculation logic
- Separated concerns: UI (page.py) and logic (logic.py)
- Test-writing instructions for pytest
**What you need to build/extend:**
- Data source connections (API keys, database access)
- Input validation at boundaries (Pydantic recommended)
- Deployment configuration (Docker, Streamlit Cloud, etc.)
**Important:**
- DO keep calculation logic separate from UI code
- DO validate all external data inputs with Pydantic
- DO use pytest with tests.md for calculation verification
- DO NOT mix data fetching into calculation functions
Path B Preamble (React + TypeScript)
Include in all instruction files:
**What you're receiving:**
- Finished UI designs (React components with full styling)
- Data model definitions (TypeScript types and sample data)
- Test-writing instructions for TDD approach
**What you need to build:**
- Backend API endpoints and database schema
- Authentication and authorization
- Data fetching and state management
**Important:**
- DO NOT redesign the components — use them as-is
- DO wire up callbacks to your routing and APIs
- DO use test-driven development with tests.md
4. Prepare Files for Export
Path A (Python + Streamlit)
When preparing the Python export:
-
Copy source files with clean structure:
app.py→driver-plan/app.py(main entry point)pages/*.py→driver-plan/pages/(preserve numbered prefixes for Streamlit ordering)calculations/*.py→driver-plan/calculations/(pure logic, no Streamlit imports)data/*.py→driver-plan/data/(data loading/processing)
-
Generate
requirements.txtfrom all imports used in the project:streamlit>=1.30.0 pandas>=2.0.0 numpy>=1.24.0 numpy-financial>=1.0.0 plotly>=5.18.0 pydantic>=2.0.0 # Add project-specific libraries (PyPortfolioOpt, scipy, etc.)Pin minimum versions based on what was used during development.
-
Ensure separation of concerns:
calculations/modules must be pure Python — noimport streamlit, nost.callsdata/modules handle fetching/loading — no calculation logicpages/files wire UI to calculations — import fromcalculations/anddata/
-
Include sample data:
- CSV/JSON files used during development →
driver-plan/data/samples/ - Include a
data/README.mdnoting which data sources are sample vs. live
- CSV/JSON files used during development →
-
Generate section reference docs for each section:
driver-plan/sections/[section-id]/ ├── README.md # What this section does, key calculations, inputs/outputs ├── tests.md # pytest test instructions with example test cases └── logic.py # Copy of the calculation module for this section -
Verify import paths: Ensure all Python imports within exported files work relative to
driver-plan/root. Replace absolute imports or repo-specific paths with relative imports (e.g.,from calculations.dcf import ...should work whendriver-plan/is the working directory). -
Create
tests.mdfor each section with concrete pytest examples:## Testing [Section Name] ### Known Answer Tests ```python def test_npv_known_answer(): """Verify NPV matches textbook example (Damodaran Ch.5)""" result = calculate_npv(cash_flows=[-1000, 400, 500, 600], rate=0.10) assert abs(result - 227.65) < 0.01 ``` ### Edge Cases ```python def test_zero_discount_rate(): """At rate=0, NPV is simply the sum of all cash flows (no discounting)""" result = calculate_npv(cash_flows=[-1000, 500, 600], rate=0.0) assert result == 100.0 # No discounting: just sum of cash flows def test_empty_cash_flows(): with pytest.raises(ValueError): calculate_npv(cash_flows=[], rate=0.10) ```
Path B (React + TypeScript)
When copying components:
- Transform
@/...to relative paths - Transform
@/../[project]/build/[section-id]/typesto../types - Remove DRIVER-specific imports
5. Create Zip File
After generating all files:
rm -f driver-plan.zip
zip -r driver-plan.zip driver-plan/
6. Optimize + Expand (Before Closing)
Before declaring the export complete, the philosophy demands two moves:
Vertical (Optimize): What worked well in this project?
- Which prompts or approaches produced the best results? Save them.
- Which sections were built fastest? Why?
- Any reusable patterns worth extracting?
Horizontal (Expand): What else does this enable?
- What new questions did this analysis raise?
- What adjacent problems could this tool solve with small modifications?
- What patterns here might transfer to other projects?
Present briefly to the developer:
"Before we wrap up, two quick questions:
- What worked best in this project that you'd want to reuse?
- What else could this enable — any adjacent problems or follow-up questions this tool raises?"
Capture their answers in the export's README.md under a "Future Directions" section.
7. Confirm Completion
"I've created the complete export package at driver-plan/ and driver-plan.zip.
What's Included:
Prompts:
prompts/one-shot-prompt.md— Prompt for full implementationprompts/section-prompt.md— Template for section-by-section
Instructions:
product-overview.md— Always provide with any instruction fileinstructions/one-shot-instructions.md— All milestones combinedinstructions/incremental/— [N] milestone instructions
Path A (Python) — Project Files:
app.py— Main Streamlit entry pointpages/— Section pagescalculations/— Core logic (pure Python)data/— Data loading and samplesrequirements.txt— Pinned dependencies
Path B (React) — Design Assets:
design-system/— Colors, fonts, tokensdata-model/— Entity types and sample datashell/— Application shell componentssections/— [N] section component packages with test instructions
Contents vary by project type. See
driver-plan/README.mdfor the full listing.
How to Use:
- Copy
driver-plan/to your implementation codebase - Open
prompts/one-shot-prompt.mdorprompts/section-prompt.md - Copy/paste into your AI partner
- Answer the clarifying questions
- Let your AI partner implement based on the instructions
Download: Restart your dev server and visit the Export page to download driver-plan.zip.
This is your final deliverable. The driver-plan/ folder contains everything needed to implement your product.
Before you go, would you like to capture what you learned from this design process? It only takes a few minutes and helps improve future projects."
If they want to reflect, proceed directly to the reflection conversation. If they're done, wish them well.
Proactive Flow
As a Cognition Mate:
- Generate the complete export automatically
- Suggest reflecting on learnings (optional but valuable)
- If they agree, start the reflection conversation directly
Guiding Principles
- Final deliverable — This is what the developer takes away
- Self-contained — No dependencies on DRIVER
- Prompts ask questions — About auth, data modeling, tech stack
- TDD support — Each section has test instructions
- Show don't tell — Screenshots provide visual reference