Open handoff: Thought Tree, a markup/spec idea for modular LLM workflows The Thought Tree Framework, an open framework for modular LLM workflows, has been released as a handoff by its original author, who is stepping back due to personal commitments. The framework aims to move LLM-assisted work from isolated prompting to structured, inspectable cognitive programming by defining inputs, intermediate artefacts, operations, and validation steps. The release invites the community to study, critique, fork, and build upon the idea to prevent it from being trapped with one person. An open framework for cognitive programming with LLMs. Thought Tree is a framework for describing complex LLM-assisted work as structured, executable, inspectable workflows. Instead of relying on a single prompt, an opaque agent loop, or an informal chain of model calls, a Thought Tree defines: - what inputs are required; - what intermediate artefacts should be produced; - what operations transform one artefact into another; - how outputs should be reviewed or validated; - what final outputs should be returned; - and what execution trace should be preserved. At its core, the framework uses a simple pattern: Data Units → Operations → Data Units A Thought Tree program applies this recursively. Complex cognitive work is decomposed into named artefacts, transformations, contracts, modules and traces. The long-term aim is to move LLM-assisted work from isolated prompting toward cognitive programming: reusable, inspectable, model-independent programs whose primary objects are ideas, documents, plans, requirements, reviews, concepts and transformations between them. This is a handoff release. The Thought Tree Framework is conceptually developed and partially prototyped, but it is not a finished production system. The original author is stepping back due to family commitments, caring responsibilities, work commitments, burnout recovery and the fact that the project now needs skills, time and expertise beyond one person. This repository is being released openly so that others can: - study the idea; - critique it; - fork it; - implement a Cognitive Engine; - refine TTML; - build examples; - compare it with existing agent and workflow frameworks; - or take the project in a better direction. The goal of this release is not to claim the framework is complete. The goal is to prevent the idea from being trapped with one person. LLMs are powerful at working with ambiguous human concepts: documents, requirements, notes, stories, plans, reviews, policies, designs and decisions. But most current LLM use still happens through: - one-off prompts; - chat sessions; - brittle prompt chains; - loosely controlled agents; - bespoke scripts; - workflow automations without semantic validation. These approaches can be useful, but they often lack qualities expected from production systems: - explicit structure; - inspectable intermediate results; - reusable modules; - dependency management; - validation; - versioning; - audit trails; - error handling; - separation between workflow definition and model provider; - and clear provenance for final outputs. For small tasks, a prompt may be enough. For larger cognitive work, the process matters. A Thought Tree program describes cognitive work as transformations over named artefacts. Inputs ↓ Operations ↓ Intermediate Artefacts ↓ Review / Validation ↓ Final Outputs ↓ Execution Trace For example, instead of asking an LLM: "Write a technical design document from these notes." a Thought Tree module might define: design notes ↓ CreateSourceDigest ↓ source digest ↓ ExtractRequirements ↓ requirements register ↓ DesignSystemDecomposition ↓ system decomposition ↓ DraftSections ↓ draft tdd sections ↓ AssembleDraft ↓ draft tdd ↓ ReviewDraft ↓ review and correction plan ↓ ReviseFinalDocument ↓ technical design document Each step produces an artefact that can be inspected, validated, replaced, reused or traced. Data Unit A Data Unit is a discrete artefact used or produced by a workflow. Examples: - source document; - requirements register; - plot outline; - chapter draft; - review report; - validation report; - generated TTML module; - final document. In the current TTML draft, Data Units are often represented as files, but conceptually they may be any addressable artefact. An Operation transforms input Data Units into output Data Units. Examples: source notes → CreateSourceDigest → source digest draft chapter + feedback → ReviseChapter → revised chapter sections → ConcatenateFiles → compiled document Operations may be executed by: - an LLM; - a deterministic function; - an external tool; - another module; - a generated submodule; - or a human reviewer. A Module is a reusable cognitive program. It declares: - inputs; - variables; - iterators; - collections; - operations; - intermediate artefacts; - final outputs; - optional contracts and validation expectations. A Module may run as a standalone workflow or be called by another Module. A Cognitive Engine is the compiler and runtime for Thought Tree programs. It is responsible for: - loading a Thought Tree definition; - validating its structure; - resolving variables, inputs, references, collections and iterators; - compiling the workflow into an executable transformation graph; - detecting dependency errors and output collisions; - invoking LLMs, functions, tools, submodules and human review steps; - storing intermediate artefacts; - validating outputs; - recording execution traces; - and returning final outputs. The LLM is not the whole system. In Thought Tree: - LLMs handle ambiguity. - Code handles structure. The Cognitive Engine coordinates both. Thought Tree Markup Language, or TTML, is the current draft XML-based source format for Thought Tree Modules. A minimal TTML-style workflow might look like: