ThinkTree is a web-first knowledge workspace for projects that need both hierarchy and semantic connections. It combines a readable tree, a draggable graph, Markdown blocks, node-purpose summaries, grounded evidence, structured change logs, and human-reviewed patch workflows into a long-term path toward a human-and-LLM maintained knowledge IDE.
ThinkTree is designed as a system that humans and models maintain together:
- Tree structure keeps the project readable from top to bottom.
- Each node now has a dedicated purpose/summary layer, so readers and agents can understand what a node and its subtree are for before opening detailed blocks.
- Graph relations capture semantic links without collapsing the outline.
- Evidence keeps nodes grounded in real files, paths, excerpts, and imported material.
- Patch review keeps structural change explicit, reviewable, and reversible at the workflow level.
- Structured change logs create an audit trail for later snapshots, restore, supervision, and branch-like workflows.
The current product surface is web-first. The data model and interaction model are intentionally being shaped so the project can later grow into a desktop or IDE shell.
The current repository includes a working foundation across the first major product slice:
- Next.js 14 App Router + TypeScript + Tailwind CSS
- Prisma + SQLite persistence
- Project creation, rename, delete, import, and export
- Hybrid tree + graph workspace
- Canonical tree nodes stored through
parentId - Dedicated node
summary/purposefield plus detailed Markdown blocks - Semantic graph edges stored separately from the tree
- Draggable graph nodes with persisted coordinates
- Folder-style outline index synced with graph selection
- Markdown block editing with live preview
- Math rendering in preview with
$...$,$$...$$,\(...\), and\[...\] - Resizable
projects / graph / editorpanels - Resizable
source / previewsplit inside block editing - Project-scoped evidence records
- Managed evidence file import into project-local storage
- Evidence projected into the graph as a distinct visual layer
- Evidence promotion into real nodes
- Tool-shaped retrieval APIs for tree, node search, evidence search, and scoped project context
- Reviewable patch proposals with apply, reject, and queued-proposal deletion
- Direct review mode that lets a draft become an immediately reviewable patch without a separate manual create step
- Structured change log entries for key user edits and patch decisions
- Right-side History tab for browsing the structured audit trail
- Project changelog API plus a live History tab for audit browsing
- Local
.thinktree.jsonsave and load for project transfer
The next product work should build on the current node-summary, evidence, and patch surfaces rather than bypass them:
- richer patch review UX with graph/editor-aligned visual previews
- savepoints and snapshots before and after major change application
- restore and later branch-style workflows built on snapshots and logs
- Codex / skills integration over explicit retrieval and patch APIs
- node-attached tool-using chat built on the same retrieval and patch contract
- broader provider support once the tool loop is stable
- portable project packaging and later zip-based export
- a future desktop or IDE shell once the core workflow is proven in web form
Important areas in the current app:
app/for the Next.js app router and API routescomponents/workspace-shell.tsxfor the main three-panel workspacecomponents/workspace/node-summary-card.tsxfor node-purpose editingcomponents/workspace/graph-canvas.tsxfor the graph rendering and interaction layercomponents/workspace/evidence-panel.tsxfor evidence authoring and managed-file workflowscomponents/workspace/patch-panel.tsxfor direct review and queued patch reviewcomponents/workspace/history-panel.tsxfor project audit historyprisma/schema.prismafor the persisted project, node, block, graph-edge, evidence, session, patch, and changelog models
Current API surfaces include:
/api/projects/api/projects/:id/api/projects/:id/tree/api/projects/:id/changelog/api/projects/import/api/nodes/api/nodes/:id/api/blocks/api/blocks/:id/api/graph-edges/api/graph-edges/:id/api/evidence/api/evidence/search/api/tooling/tree/api/tooling/context/api/tooling/nodes/search/api/patch-proposals/api/patch-proposals/:id/api/patch-proposals/:id/apply/api/patch-proposals/:id/reject
- Install dependencies:
npm installIf PowerShell blocks npm.ps1, use:
npm.cmd install- Create the environment file:
Copy-Item .env.example .env- Generate the Prisma client and create the SQLite schema:
npm.cmd run db:generate
npm.cmd run db:push- Start the development server:
npm.cmd run devThe current persisted foundation now spans both knowledge structure and reviewable change:
ProjectNodeBlockGraphEdgeEvidenceNodeEvidenceLinkSessionMessageSessionArtifactPatchProposalPatchOperationChangeLogEntry
The tree remains canonical through Node.parentId.
Semantic relations are modeled separately through GraphEdge.
Grounding material is modeled through project-scoped Evidence plus node links.
Node intent is modeled separately through Node.summary.
Reviewable structured updates are modeled through PatchProposal and PatchOperation.
Auditability is now modeled through ChangeLogEntry.
- D:\new_windows\PhD\winter2026\AIproduct\ThinkTree\product-spec.md describes the intended product model and long-term workflows.
- D:\new_windows\PhD\winter2026\AIproduct\ThinkTree\implementation-plan.md turns that direction into a dependency-ordered delivery roadmap.
- D:\new_windows\PhD\winter2026\AIproduct\ThinkTree\docs\phase2a-api-reference.md documents the current evidence and retrieval surface.
- D:\new_windows\PhD\winter2026\AIproduct\ThinkTree\docs\patch-api-reference.md documents the current patch proposal and review surface.
- D:\new_windows\PhD\winter2026\AIproduct\ThinkTree\docs\change-log-api-reference.md documents the current audit trail surface.
- D:\new_windows\PhD\winter2026\AIproduct\ThinkTree\docs\thinktree-agent-skills.md explains how external agents should read ThinkTree and propose changes.
- D:\new_windows\PhD\winter2026\AIproduct\ThinkTree\docs\project-storage.md explains where data, evidence, and imports currently live.
- Managed evidence files live inside the project-specific ThinkTree storage area so later tools and exports can resolve them reliably.
- The graph currently shows both structural nodes and evidence nodes, but the system is still early relative to the eventual heterogeneous knowledge graph vision.
- The current patch review loop supports full apply or reject; partial apply and richer diff editing are the next layer.
- The new History tab sits on top of the changelog foundation; snapshots and branch-like workflows are the next layer, not a replacement for the audit trail.
- The documentation is intentionally explicit about what already exists versus what is still planned.