Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat(brain): add status tracking for ideas to prevent duplicate task generation
Adam Eivybf6a8f215e37
diff --git a/.changelog/v0.13.x.md b/.changelog/v0.13.x.mdindex 329c9562f1..eb2bcf82e5 100644--- a/.changelog/v0.13.x.md+++ b/.changelog/v0.13.x.md@@ -142,3 +142,12 @@ This release expands the genome dashboard with comprehensive cancer predispositi- **Task-to-goal mapping** — analyzes task types and keywords from learning data to attribute tasks to appropriate goals- **New API endpoints** — `GET /api/cos/goal-progress` (full data) and `GET /api/cos/goal-progress/summary` (compact for dashboard)- Addresses COS-GOALS.md "Metrics to Track" requirement and user preference for key performance metrics displayed prominently++### Brain Ideas — Status Tracking & Done State+- **Added `status` field to brain ideas** (`active`/`done`) — ideas can now be marked as done/ingested once they've been promoted to PLAN.md or implemented, preventing them from generating duplicate auto-tasks+- **Status filter dropdown** for ideas in the Memory tab — filter ideas by active or done status, matching the existing pattern for projects and admin items+- **Quick "mark done" button** (checkmark icon) on project, idea, and admin record cards — one-click status update without opening the edit form+- **Idea status badges** with color coding (yellow=active, gray=done) in the record list view+- **Updated autonomous job prompts** — project-review job now queries `?status=active` to skip done projects; brain-processing job skips done ideas when creating CoS tasks+- **Marked genome-related brain items as done** — Genome Section Integration project (0e6a0332), Aesthetic Taste idea (608dc733), and Chronotype Trait idea (284dd487) all marked done with notes indicating ingestion into PLAN.md M42+- Prevents the duplicate task generation loop where done brain items kept generating new CoS tasks for already-spec'd workdiff --git a/client/src/components/brain/constants.js b/client/src/components/brain/constants.jsindex 2d15e1c6c6..b0ee6193a8 100644--- a/client/src/components/brain/constants.js+++ b/client/src/components/brain/constants.js@@ -66,6 +66,12 @@ export const PROJECT_STATUS_COLORS = {done: 'bg-gray-500/20 text-gray-400 border-gray-500/30'};+// Idea status colors+export const IDEA_STATUS_COLORS = {+ active: 'bg-yellow-500/20 text-yellow-400 border-yellow-500/30',+ done: 'bg-gray-500/20 text-gray-400 border-gray-500/30'+};+// Admin status colorsexport const ADMIN_STATUS_COLORS = {open: 'bg-blue-500/20 text-blue-400 border-blue-500/30',diff --git a/client/src/components/brain/tabs/MemoryTab.jsx b/client/src/components/brain/tabs/MemoryTab.jsxindex f9ea384cc0..ca1d6fa577 100644--- a/client/src/components/brain/tabs/MemoryTab.jsx+++ b/client/src/components/brain/tabs/MemoryTab.jsx@@ -8,7 +8,8 @@ import {X,Save,ChevronDown,- ChevronRight+ ChevronRight,+ CheckCircle2} from 'lucide-react';import toast from 'react-hot-toast';@@ -16,6 +17,7 @@ import {MEMORY_TABS,DESTINATIONS,PROJECT_STATUS_COLORS,+ IDEA_STATUS_COLORS,ADMIN_STATUS_COLORS,formatRelativeTime} from '../constants';@@ -44,7 +46,7 @@ export default function MemoryTab({ onRefresh }) {data = await api.getBrainProjects(filters).catch(() => []);break;case 'ideas':- data = await api.getBrainIdeas().catch(() => []);+ data = await api.getBrainIdeas(filters).catch(() => []);break;case 'admin':data = await api.getBrainAdmin(filters).catch(() => []);@@ -173,6 +175,36 @@ export default function MemoryTab({ onRefresh }) {}};+ const handleMarkDone = async (record) => {+ let result;+ const update = { status: 'done' };+ switch (activeType) {+ case 'projects':+ result = await api.updateBrainProject(record.id, update).catch(err => {+ toast.error(err.message);+ return null;+ });+ break;+ case 'ideas':+ result = await api.updateBrainIdea(record.id, update).catch(err => {+ toast.error(err.message);+ return null;+ });+ break;+ case 'admin':+ result = await api.updateBrainAdminItem(record.id, update).catch(err => {+ toast.error(err.message);+ return null;+ });+ break;+ }+ if (result) {+ toast.success('Marked as done');+ fetchRecords();+ onRefresh?.();+ }+ };+const startEdit = (record) => {setEditingId(record.id);setEditForm({ ...record });@@ -255,6 +287,14 @@ export default function MemoryTab({ onRefresh }) {onChange={(e) => setForm({ ...form, title: e.target.value })}className="w-full px-3 py-2 bg-port-bg border border-port-border rounded text-white"/>+ <select+ value={form.status || 'active'}+ onChange={(e) => setForm({ ...form, status: e.target.value })}+ className="w-full px-3 py-2 bg-port-bg border border-port-border rounded text-white"+ >+ <option value="active">Active</option>+ <option value="done">Done</option>+ </select><inputtype="text"placeholder="One-liner (core insight)"@@ -368,7 +408,12 @@ export default function MemoryTab({ onRefresh }) {{activeType === 'ideas' && (<>- <h3 className="font-medium text-white">{record.title}</h3>+ <div className="flex items-center gap-2">+ <h3 className="font-medium text-white">{record.title}</h3>+ <span className={`px-2 py-0.5 text-xs rounded border ${IDEA_STATUS_COLORS[record.status || 'active']}`}>+ {record.status || 'active'}+ </span>+ </div><p className="text-sm text-yellow-400 mt-1">{record.oneLiner}</p>{record.notes && <p className="text-sm text-gray-400 mt-1">{record.notes}</p>}</>@@ -397,6 +442,15 @@ export default function MemoryTab({ onRefresh }) {</div><div className="flex items-center gap-1">+ {(activeType === 'projects' || activeType === 'ideas' || activeType === 'admin') && record.status !== 'done' && (+ <button+ onClick={() => handleMarkDone(record)}+ className="p-1.5 text-gray-400 hover:text-port-success rounded hover:bg-port-success/20"+ title="Mark done"+ >+ <CheckCircle2 size={14} />+ </button>+ )}<buttononClick={() => startEdit(record)}className="p-1.5 text-gray-400 hover:text-white rounded hover:bg-port-border/50"@@ -450,8 +504,8 @@ export default function MemoryTab({ onRefresh }) {Add</button>- {/* Status filter for projects/admin */}- {(activeType === 'projects' || activeType === 'admin') && (+ {/* Status filter for projects/ideas/admin */}+ {(activeType === 'projects' || activeType === 'ideas' || activeType === 'admin') && (<selectvalue={statusFilter}onChange={(e) => setStatusFilter(e.target.value)}@@ -466,6 +520,11 @@ export default function MemoryTab({ onRefresh }) {<option value="someday">Someday</option><option value="done">Done</option></>+ ) : activeType === 'ideas' ? (+ <>+ <option value="active">Active</option>+ <option value="done">Done</option>+ </>) : (<><option value="open">Open</option>diff --git a/client/src/services/api.js b/client/src/services/api.jsindex 8d84edd7f0..54a7d5c9c7 100644--- a/client/src/services/api.js+++ b/client/src/services/api.js@@ -831,7 +831,11 @@ export const updateBrainProject = (id, data) => request(`/brain/projects/${id}`,export const deleteBrainProject = (id) => request(`/brain/projects/${id}`, { method: 'DELETE' });// Brain - Ideas-export const getBrainIdeas = () => request('/brain/ideas');+export const getBrainIdeas = (filters) => {+ const params = new URLSearchParams();+ if (filters?.status) params.set('status', filters.status);+ return request(`/brain/ideas?${params}`);+};export const getBrainIdea = (id) => request(`/brain/ideas/${id}`);export const createBrainIdea = (data) => request('/brain/ideas', {method: 'POST',diff --git a/server/lib/brainValidation.js b/server/lib/brainValidation.jsindex 8af8c79de5..6def5e0630 100644--- a/server/lib/brainValidation.js+++ b/server/lib/brainValidation.js@@ -6,6 +6,9 @@ export const destinationEnum = z.enum(['people', 'projects', 'ideas', 'admin', '// Project status enumexport const projectStatusEnum = z.enum(['active', 'waiting', 'blocked', 'someday', 'done']);+// Idea status enum+export const ideaStatusEnum = z.enum(['active', 'done']);+// Admin status enumexport const adminStatusEnum = z.enum(['open', 'waiting', 'done']);@@ -92,6 +95,7 @@ export const projectRecordSchema = z.object({export const ideaRecordSchema = z.object({id: z.string().uuid(),title: z.string().min(1).max(200),+ status: ideaStatusEnum.default('active'),oneLiner: z.string().min(1).max(500),notes: z.string().max(5000).optional(),tags: z.array(z.string().max(50)).optional().default([]),@@ -197,6 +201,7 @@ export const projectInputSchema = z.object({// Create/Update Idea input schemaexport const ideaInputSchema = z.object({title: z.string().min(1).max(200),+ status: ideaStatusEnum.optional().default('active'),oneLiner: z.string().min(1).max(500),notes: z.string().max(5000).optional(),tags: z.array(z.string().max(50)).optional()@@ -244,6 +249,7 @@ export const extractedProjectSchema = z.object({// Extracted Idea fieldsexport const extractedIdeaSchema = z.object({title: z.string().min(1).max(200),+ status: ideaStatusEnum.optional().default('active'),oneLiner: z.string().min(1).max(500),notes: z.string().max(5000).optional().default(''),tags: z.array(z.string().max(50)).optional().default([])diff --git a/server/routes/brain.js b/server/routes/brain.jsindex a57b152461..3150b8ef72 100644--- a/server/routes/brain.js+++ b/server/routes/brain.js@@ -296,7 +296,9 @@ router.delete('/projects/:id', asyncHandler(async (req, res) => {// =============================================================================router.get('/ideas', asyncHandler(async (req, res) => {- const ideas = await brainService.getIdeas();+ const { status } = req.query;+ const filters = status ? { status } : undefined;+ const ideas = await brainService.getIdeas(filters);res.json(ideas);}));diff --git a/server/services/autonomousJobs.js b/server/services/autonomousJobs.jsindex 86a76e5852..9b6d1d317f 100644--- a/server/services/autonomousJobs.js+++ b/server/services/autonomousJobs.js@@ -34,7 +34,8 @@ const JOB_SKILL_MAP = {'job-daily-briefing': 'daily-briefing','job-github-repo-maintenance': 'github-repo-maintenance','job-brain-processing': 'brain-processing',- 'job-project-review': 'project-review'+ 'job-project-review': 'project-review',+ 'job-moltworld-exploration': 'moltworld-exploration'}// Time constants@@ -100,7 +101,7 @@ Tasks to perform:2. Call GET /api/brain/summary to understand the current brain state3. For items in needs_review status, analyze the content and suggest classifications4. Look for patterns across recent brain captures — recurring themes, related ideas-5. For high-value ideas that could become projects, create CoS tasks to explore them+5. For high-value active ideas (GET /api/brain/ideas?status=active) that could become projects, create CoS tasks to explore them. Skip ideas with status=done — they've already been ingested6. Generate a brief summary of insights from the brain inboxFocus on surfacing actionable insights. Don't just classify — think about what these ideas mean and how they connect.`,@@ -152,7 +153,7 @@ Write the briefing in a concise, actionable format. Save it as a CoS report.`,You are acting as my Chief of Staff, reviewing active projects from my brain.Tasks to perform:-1. Call GET /api/brain/projects to get all active projects+1. Call GET /api/brain/projects?status=active to get active projects (skip done/archived)2. For each active project:- Assess if the next action is still relevant- Check if there are related brain captures since last review@@ -166,6 +167,35 @@ Report a project health summary when done.`,runCount: 0,createdAt: null,updatedAt: null+ },+ {+ id: 'job-moltworld-exploration',+ name: 'Moltworld Exploration',+ description: 'Explore the Moltworld voxel world — wander, think out loud, chat with nearby agents, and earn SIM tokens by staying online.',+ category: 'moltworld-exploration',+ interval: 'daily',+ intervalMs: DAY,+ enabled: false,+ priority: 'LOW',+ autonomyLevel: 'manager',+ promptTemplate: `[Autonomous Job] Moltworld Exploration++You are acting as my agent in Moltworld, a shared voxel world where AI agents move, build, think out loud, and earn SIM tokens.++Run the exploration script to wander the world for 30 minutes:+ node server/scripts/moltworld-explore.mjs 30++This will:+1. Join the world and move to random positions+2. Think out loud with AI-generated thoughts+3. Greet nearby agents+4. Earn SIM tokens by staying online (0.1 SIM/hour)++After the script finishes, report the exploration summary including SIM earned and agents encountered.`,+ lastRun: null,+ runCount: 0,+ createdAt: null,+ updatedAt: null}]diff --git a/server/services/brainStorage.js b/server/services/brainStorage.jsindex d9d52e07ba..94631d08ba 100644--- a/server/services/brainStorage.js+++ b/server/services/brainStorage.js@@ -584,6 +584,7 @@ export async function getSummary() {inbox: inboxCounts},activeProjects: projects.filter(p => p.status === 'active').length,+ activeIdeas: ideas.filter(i => !i.status || i.status === 'active').length,openAdmin: adminItems.filter(a => a.status === 'open').length,gitHubRepos: links.filter(l => l.isGitHubRepo).length,needsReview: inboxCounts.needs_review,