A domain-agnostic life orchestration system built as a Model Context Protocol (MCP) server. Forest provides intelligent task management, scheduling, and progress tracking through a modular, well-documented architecture.
- Domain Agnostic: Works for any learning goal or project type
- Intelligent Task Selection: AI-powered task prioritization based on energy, time, and context
- Hierarchical Task Analysis (HTA): Structured approach to breaking down complex goals
- Smart Scheduling: Adaptive daily schedule generation
- Progress Tracking: Comprehensive completion analysis and learning insights
- Truthful Filtering: Built-in system for honest, non-sycophantic responses
-
models/- Data models with full JSDoc documentationhta-node.js- HTA node representation with validation and utilitiesschedule-block.js- Time block management with formatting helpersproject.js- Project configuration and metadata managementindex.js- Model utilities and type conversion helpers
-
modules/- Business logic modulestask-logic/- Refactored task management (Scorer, Selector, Formatter)utils/- Utility modules (FileSystem, CacheManager)data-persistence.js- Coordinated data management with cachingtask-intelligence.js- AI-powered task intelligence orchestrationtool-router.js- MCP tool routing with truthful filtering
-
servers/- MCP server implementationsfilesystem-server.js- File system operationsmemory-server.js- Memory managementsequential-thinking-server.js- Structured thinking support
-
Clone the repository
git clone https://github.com/BretMeraki/618forest.git cd 618forest -
Install dependencies
npm install
-
Run tests
npm test -
Start the server
node server-modular.js
This project features comprehensive JSDoc documentation across all modules:
-
Task Logic System (
modules/task-logic/)TaskScorer- 8 methods for intelligent task scoringTaskSelector- 2 methods for optimal task selectionTaskFormatter- 3 methods for user-friendly response formatting
-
Data Models (
models/)HtaNode- 15 methods including validation, state management, and utilitiesScheduleBlock- 17 methods for time block management and formattingProject- 21 methods for project configuration and analysisModelUtils- 8 utility methods for data conversion
-
Utility Modules (
modules/utils/)FileSystem- 15+ methods for all file operationsCacheManager- 11 methods for intelligent caching
-
Data Persistence (
modules/)DataPersistence- 16 methods coordinating cache and file operations
- Parameter Types: All parameters documented with TypeScript-style types
- Return Values: Clear descriptions of what each method returns
- Error Conditions:
@throwsannotations for methods that can fail - Examples: Usage patterns and relationships explained
- Optional Parameters: Clearly marked with default values
- Single Responsibility: Each module has a focused purpose
- Data Models: Rich, validated models with business logic
- Separated Concerns: Task logic split into specialized components
- Clean Coordination: DataPersistence orchestrates file I/O and caching
- 49 Unit Tests: Fast, reliable test suite (600ms runtime)
- Pure Logic Testing: No brittle dependencies or file system operations
- Business Rule Verification: Tests serve as living documentation
import { TaskScorer, TaskSelector } from './modules/task-logic/index.js';
// Score a task based on user context
const score = TaskScorer.calculateTaskScore(task, energyLevel, timeAvailable, context, projectContext);
// Select optimal task from available options
const optimalTask = TaskSelector.selectOptimalTask(htaData, energyLevel, timeAvailable, context, projectContext);import { HtaNode, ScheduleBlock, Project } from './models/index.js';
// Create a new task node
const task = HtaNode.create({
title: "Learn React Components",
description: "Understanding props and state",
branch: "web_development",
difficulty: 3,
duration: "45 minutes"
});
// Create a schedule block
const block = ScheduleBlock.create({
title: "Morning Learning Session",
startTime: "9:00 AM",
duration: 60,
type: "learning"
});import { DataPersistence } from './modules/data-persistence.js';
const persistence = new DataPersistence('./data');
// Load project data (with automatic caching)
const projectData = await persistence.loadProjectData('my-project', 'config.json');
// Save with cache invalidation
await persistence.saveProjectData('my-project', 'config.json', newData);The project maintains a comprehensive test suite:
npm testTest Results:
- ✅ 49 tests passing
- ⚡ 600ms execution time
- 🎯 Pure logic testing (no brittle dependencies)
- 📊 Excellent business rule coverage
- Domain Agnostic: No hardcoded domain logic
- Modular Design: Single responsibility principle
- Comprehensive Documentation: Every function documented with JSDoc
- Test-Driven: Reliable unit test foundation
- Type Safety: Clear parameter and return type documentation
- Performance: Smart caching and efficient algorithms
Forest operates as an MCP server providing tools for:
- Project Management: Create and configure learning projects
- Task Intelligence: Get optimal next tasks based on context
- Schedule Generation: Create adaptive daily schedules
- Progress Tracking: Complete tasks and capture insights
- Strategy Evolution: Adapt approach based on feedback
- Follow JSDoc documentation standards
- Maintain test coverage for new features
- Ensure domain agnosticism
- Write pure functions where possible
- Update documentation for any API changes
This project is part of the Forest MCP ecosystem for domain-agnostic life orchestration.