Prompt file imported from ariaxhan/memory-pool (
.cursor/commands/culture.md). Copyright stays with the author.
culture — Grow New Features
Develop and integrate new features into the Synthesis Pool system.
What This Does
Guides the process of adding new functionality to either backend or frontend while maintaining system integrity.
Usage
When user requests a new feature:
1. Identify which layer (backend/frontend/both)
2. Plan the implementation
3. Implement with testing
4. Update documentation
5. Record in CULTURE_LOG.md
Feature Development Workflow
1. Planning Phase
Questions to Answer:
- What layer? (Backend/Frontend/Both/Integration)
- What files affected?
- What data changes needed?
- Breaking changes to API or CSV schema?
- Dependencies needed?
Document in .pool/CULTURE_LOG.md:
## [Date] - Feature: [Name]
**Status:** Planning
**Layer:** Backend/Frontend/Both
**Scope:** Brief description
**Files:** List of files to modify
**Dependencies:** Any new packages needed
2. Implementation Phase
Backend Features:
cd api
# Add new endpoint
# Edit routes/*.py
# Add new model
# Edit models.py
# Add new operation
# Edit operations.py
# Test
python -m pytest # if tests exist
# Or manual testing via curl
Frontend Features:
cd frontend
# Add new component
# Create in src/lib/components/
# Add new route
# Create in src/routes/
# Add new store
# Create in src/lib/stores/
# Test
npm run dev
# Manual testing in browser
Integration Features:
- Update both layers
- Ensure API contract matches
- Update MEMBRANE.md with schema changes
- Test data flow end-to-end
3. Testing Phase
Checklist:
- Feature works as intended
- No errors in console/terminal
- Doesn't break existing features
- CSV format still valid (if changed)
- API endpoints respond correctly
- Frontend displays correctly
- Mobile responsive (if frontend)
Run:
# Use tend command to verify system health
# Test the specific feature manually
# Check for linter errors
4. Documentation Phase
Update These Files:
.pool/SUBSTRATE.md- If architecture changed.pool/MEMBRANE.md- If data schema changed.pool/PATHWAYS.md- If operations changedSTART.mdorQUICK_START.md- If user-facing.pool/CULTURE_LOG.md- Record completion
5. Recording Phase
Update .pool/CULTURE_LOG.md:
## [Date] - Feature: [Name]
**Status:** Complete ✅
**Layer:** Backend/Frontend/Both
**Implementation:**
- Added X component
- Modified Y endpoint
- Updated Z schema
**Files Changed:**
- path/to/file1.py
- path/to/file2.svelte
**Testing:** Manual testing complete, no issues
**Notes:** Any learnings or gotchas
Common Feature Types
New Visualization
Layer: Frontend Files:
frontend/src/lib/components/viz/NewChart.sveltefrontend/src/routes/visualize/+page.svelte
Steps:
- Create new chart component
- Import plotly.js
- Process data from matter/synthesis stores
- Add to visualize page
- Test with real data
New Filter Option
Layer: Frontend + Backend Files:
frontend/src/lib/components/matter/FilterBar.svelteapi/routes/matter.py
Steps:
- Add UI control in FilterBar
- Add query parameter to API endpoint
- Add filtering logic in backend
- Test filter combinations
New Data Field
Layer: Both + Data Files:
models.py(backend model)data/memory_matter.csv(add column)frontend/src/lib/stores/matter.ts(type)frontend/src/lib/components/matter/*.svelte(display)
Steps:
- Add field to CSV schema
- Update Pydantic model
- Update TypeScript interface
- Add to import validation
- Add to display components
- Update MEMBRANE.md
New API Endpoint
Layer: Backend Files:
api/routes/*.py
Steps:
- Define endpoint in appropriate router
- Add Pydantic models if needed
- Implement logic
- Test with curl
- Update frontend API client if needed
Stabilization
After implementing:
- Run tend command - Verify system health
- Test all pages - Ensure nothing broke
- Check data integrity - CSV files still valid
- Restart servers - Fresh start to catch issues
- Document - Update all relevant docs
Example: Adding "Mood" Field
Planning
## 2025-12-30 - Feature: Add Mood Field
**Status:** Planning
**Layer:** Both + Data
**Scope:** Add optional mood field to memory matter
**Files:**
- models.py
- data/memory_matter.csv
- matter.ts
- MatterCard.svelte
- MatterDetail.svelte
- MEMBRANE.md
Implementation
# 1. Update CSV schema
# Add column: mood (after nutrient_density)
# 2. Update backend model
# Edit models.py - add mood: Optional[str]
# 3. Update frontend type
# Edit matter.ts - add mood?: string
# 4. Update display
# Edit MatterCard.svelte - show mood icon
# Edit MatterDetail.svelte - show mood field
# 5. Update docs
# Edit MEMBRANE.md - document mood field
Recording
## 2025-12-30 - Feature: Add Mood Field
**Status:** Complete ✅
**Implementation:** Added optional mood field to track emotional state
**Files Changed:** 5 files
**Testing:** Tested with existing data (null values), tested with new entries
**Notes:** Made field optional to not break existing data
Related Commands
tend- Check system health after changessync- Ensure frontend/backend alignedfilter- Remove issues if something breaksrecord- Document the change
