Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ jobs:
python scripts/test_check_activation.py
python scripts/test_macos_quarantine_bootstrap.py
python scripts/check_packaging.py
python scripts/package_release_assets.py
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish TreeWork Editions

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4

- name: Build release assets from the tagged commit
run: python3 scripts/package_release_assets.py --tag "${GITHUB_REF_NAME}"

- name: Publish both TreeWork editions
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${GITHUB_REF_NAME}" \
dist/releases/TreeWork-Coding-Agents-"${GITHUB_REF_NAME}".zip \
dist/releases/TreeWork-Manual-"${GITHUB_REF_NAME}".zip \
--title "TreeWork ${GITHUB_REF_NAME}" \
--generate-notes \
--verify-tag
11 changes: 7 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# TreeWork Repository Guidance

This repository contains both an installable Codex plugin and the source used
to maintain it.
This repository contains two independently installable TreeWork editions and
the source used to maintain them.

## Read Before Editing

Expand All @@ -16,8 +16,11 @@ to maintain it.

## Repository Boundaries

- `plugins/treework/` is the installable plugin. Keep it free of
project history, UI source, prototypes, and maintainer-only documents.
- `plugins/treework/` is the installable Coding Agents edition. Keep
it free of project history, UI source, prototypes, and maintainer-only
documents.
- `skills/treework-manual/` is the independently installable Manual edition.
Keep its complete working contract in one self-contained `SKILL.md`.
- Agent references explain how to use TreeWork. Do not put Rust modules, API
internals, migration plans, or frontend architecture there.
- `project-map-ui/` is source; `plugins/treework/assets/graph-panel/`
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ validate: build-ui
python3 $(PLUGIN_CREATOR)/scripts/validate_plugin.py $(PLUGIN)
python3 $(SKILL_CREATOR)/scripts/quick_validate.py \
$(PLUGIN)/skills/treework
python3 $(SKILL_CREATOR)/scripts/quick_validate.py \
skills/treework-manual

package:
python3 scripts/package_plugin.py
python3 scripts/check_package_commit_source.py
python3 scripts/package_release_assets.py

browser-test:
mkdir -p $(ARTIFACTS)
Expand Down
93 changes: 70 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,66 @@

# TreeWork

TreeWork is a **tree-guided development plugin for Codex**. It helps coding
agents organize complex projects as branches, prepare the important design
before coding, and move through long-running work without losing direction.
TreeWork is a **tree-guided working model for Agents**. It externalizes evolving
work as a persistent Tree, gives every line of effort a branch, and teaches an
Agent to move from the root into one branch and back instead of chasing requests
as a flat queue. Plans, progress, and findings keep each location recoverable
across interruptions, context resets, and handoffs.

This repository provides two independently installable editions. They share the
same root-to-branch mental model, but each defines its own state and operating
contract.

## TreeWork Editions

- **TreeWork for Coding Agents** is a runtime-backed development system. It adds
Alignment, Specs, declarative Tree transactions, isolated Git worktrees,
protected completion, Recall, and Project Map through the Codex plugin.
- **[TreeWork Manual](skills/treework-manual/SKILL.md)** is a standalone,
single-file Agent Skill for writing, research, notes, planning, creative work,
operations, and other evolving work. The Agent maintains the Tree and its
project state directly in Markdown.

Choose an edition from the user's needs and the actual work rather than treating
one as a fallback for the other. Do not combine both state models inside one
project without an explicit migration.

## Installation

### TreeWork Manual

Download `TreeWork-Manual-vX.Y.Z.zip` from the matching
[GitHub Release](https://github.com/Johnny-xuan/TreeWork/releases), then extract
its `treework-manual/` directory into the Skills directory used by your Agent
host. For Codex, install it under `$CODEX_HOME/skills/` (normally
`~/.codex/skills/`) and start a new task. The package is self-contained and
contains one `SKILL.md`; the ZIP root also carries the MIT license.

The same independently installable source is available at
[`skills/treework-manual`](skills/treework-manual).

Code inspection shows what exists and retrieval memory recalls fragments, but
neither reliably tells an Agent what the project has accepted, where work
stands, or why it stopped. TreeWork therefore keeps the accepted project
structure, branch state, Specs, progress, findings, and verification outside
the model context so work can resume without reconstructing the project from
scratch.
### TreeWork For Coding Agents

## First Install
TreeWork for Coding Agents currently targets Codex on macOS and Linux. Native
Windows support has not been release-tested.

TreeWork currently targets Codex on macOS and Linux. Native Windows support has
not been release-tested.
The matching GitHub Release also provides
`TreeWork-Coding-Agents-vX.Y.Z.zip`. After extracting it, the
`treework-coding-agents/` directory is a self-contained local Codex marketplace:

```bash
codex plugin marketplace add /path/to/treework-coding-agents
codex plugin add treework@treework
```

The Git marketplace installation below is recommended when normal GitHub access
is available because Codex can update it directly from the repository.

Runtime prerequisites: Git, Bash, Python 3, Rust, and Cargo. The Project Map
frontend is bundled; Node.js is needed only for frontend development.

#### Codex guided install

Give the following prompt to a Codex Agent with terminal access:

```text
Expand Down Expand Up @@ -67,7 +108,7 @@ inside the current project until I explicitly approve it.
new one. Leave project initialization to the new Codex task after I choose.
```

### Manual Install
#### Codex manual install

```bash
codex plugin marketplace add https://github.com/Johnny-xuan/TreeWork
Expand Down Expand Up @@ -204,7 +245,7 @@ Read the formal model and evaluation design in the

## Package Contents

The installable plugin lives at
The installable Codex plugin lives at
[`plugins/treework`](plugins/treework) and includes:

- the staged project-state Skill and Agent-facing references;
Expand All @@ -213,12 +254,16 @@ The installable plugin lives at
- a local read-only MCP server for Recall and Project Map launch;
- bundled Project Map assets.

TreeWork stores project state under `.TreeWork/`.
TreeWork for Coding Agents stores project state under `.TreeWork/`.

The independently installable [`skills/treework-manual`](skills/treework-manual)
edition contains one self-contained Agent Skill.

## Repository Layout

```text
plugins/treework/ Installable Codex plugin
plugins/treework/ TreeWork for Coding Agents Codex plugin
skills/treework-manual/ Standalone manual TreeWork Skill
project-map-ui/ React/D3/SVG Project Map source
docs/product/ Product behavior and UX contracts
docs/architecture/ Runtime and transaction contracts
Expand All @@ -231,9 +276,10 @@ while using TreeWork. Maintainer implementation contracts stay under `docs/`.

## Community and Help Wanted

TreeWork currently ships and is release-tested as a Codex plugin. Support for
Claude Code, Cursor, Gemini CLI, OpenCode, and other agent hosts is welcome
through focused host adapters.
TreeWork for Coding Agents currently ships and is release-tested for Codex.
Support for Claude Code, Cursor, Gemini CLI, OpenCode, and other agent hosts is
welcome through focused host adapters. TreeWork Manual can be loaded by hosts
that support standalone Agent Skills.

High-impact contribution areas include:

Expand Down Expand Up @@ -268,10 +314,11 @@ make validate

## Status

`v0.1.7` is the current version. Alignment, declarative Tree construction,
hierarchy-aligned branch documents, protected branch traversal, Recall, Project
Map, and Replay form a usable end-to-end loop. Project Map interaction design
will continue to evolve.
`v0.1.8` is the current Coding Agents edition version. Alignment, declarative Tree
construction, hierarchy-aligned branch documents, protected branch traversal,
Recall, Project Map, and Replay form a usable end-to-end loop. TreeWork Manual
is released independently from the same repository and tag. Project Map
interaction design will continue to evolve.

## Privacy

Expand Down
82 changes: 61 additions & 21 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,59 @@

# TreeWork

TreeWork 是一个面向 Codex 的**树引导开发插件**。它帮助 Coding Agent 把复杂
项目组织成一棵 branch 树,在编码前完成重要设计,并在长期开发中沿着树移动而
不失去方向。
TreeWork 是一种面向 Agent 的**树引导工作模型**。它把持续演化的工作外化成一棵
持久的 Tree,让每条工作线归属一个 branch,并让 Agent 从根进入 branch、完成
局部工作后返回根,而不是把不断到来的请求当成一条扁平队列。Plan、Progress 和
Findings 让每个位置在中断、上下文重置或 Agent 交接后仍然可以恢复。

代码检查能够看到已经实现了什么,检索型记忆能够找回历史片段,但两者都不能
稳定回答项目已经接受了什么、工作进行到哪里,以及上一个 Agent 为什么停下。
TreeWork 将已接受的项目结构、branch 状态、Spec、进度、结论和验证记录保存在
模型上下文之外,让长期任务不必每次从头重建项目就能继续。
本仓库提供两个可以独立安装的版本。它们共享从根到 branch 的工作心智模型,
但各自拥有独立的状态模型和运行契约。

## 首次安装
## TreeWork 版本

TreeWork 当前面向 macOS 和 Linux 上的 Codex。原生 Windows 支持尚未经过发布
测试。
- **TreeWork for Coding Agents** 是带运行时的开发系统。它通过 Codex 插件提供
Alignment、Spec、声明式 Tree transaction、隔离 Git worktree、
completion 保护、Recall 和 Project Map。
- **[TreeWork Manual](skills/treework-manual/SKILL.md)** 是一份独立、单文件的
Agent Skill,适用于写作、研究、笔记、规划、创作、运营及其他持续演化的工作。
Agent 直接在 Markdown 中维护 Tree 与项目状态。

根据用户需要和实际工作选择版本,不要把其中一个视为另一个的 fallback。同一个
项目不能在没有显式迁移的情况下混用两套状态模型。

## 安装

### TreeWork Manual

从对应的 [GitHub Release](https://github.com/Johnny-xuan/TreeWork/releases)
下载 `TreeWork-Manual-vX.Y.Z.zip`,将其中的 `treework-manual/` 目录解压到 Agent
host 的 Skills 目录。对于 Codex,安装到 `$CODEX_HOME/skills/`(通常为
`~/.codex/skills/`),然后新建一个任务。这个包是独立完整的,只包含一份
`SKILL.md`;ZIP 根目录同时包含 MIT License。

同一份可独立安装的源码位于 [`skills/treework-manual`](skills/treework-manual)。

### TreeWork for Coding Agents

TreeWork for Coding Agents 当前面向 macOS 和 Linux 上的 Codex。原生 Windows
支持尚未经过发布测试。

对应的 GitHub Release 同时提供 `TreeWork-Coding-Agents-vX.Y.Z.zip`。解压后,
`treework-coding-agents/` 目录就是一个自包含的本地 Codex marketplace:

```bash
codex plugin marketplace add /path/to/treework-coding-agents
codex plugin add treework@treework
```

如果能够正常访问 GitHub,更推荐使用下面的 Git marketplace 安装方式,因为 Codex
可以直接从仓库更新。

运行依赖包括 Git、Bash、Python 3、Rust 和 Cargo。Project Map 前端已经打包;
只有开发前端时才需要 Node.js。

#### Codex 引导安装

把下面这段 prompt 直接交给一个能够使用终端的 Codex Agent:

```text
Expand Down Expand Up @@ -59,7 +95,7 @@ TreeWork。
后,再进行项目初始化。
```

### 手动安装
#### Codex 手动安装

```bash
codex plugin marketplace add https://github.com/Johnny-xuan/TreeWork
Expand Down Expand Up @@ -188,21 +224,24 @@ Agent 在其中移动的有效方式,同时把局部实现决策留给 Agent

## 插件内容

可安装插件位于 [`plugins/treework`](plugins/treework),
其中包括:
可安装的 Codex 插件位于 [`plugins/treework`](plugins/treework),其中包括:

- 分阶段项目状态 Skill 及面向 Agent 的参考文档;
- Rust 编写的 `tw` 事务运行时;
- branch 状态转移与完成保护 Hooks;
- 用于 Recall 和启动 Project Map 的本地只读 MCP 服务;
- 已打包的 Project Map 资源。

TreeWork 将项目状态保存在 `.TreeWork/` 下。
TreeWork for Coding Agents 将项目状态保存在 `.TreeWork/` 下。

可独立安装的 [`skills/treework-manual`](skills/treework-manual) 版本只包含一份
自包含的 Agent Skill。

## 仓库结构

```text
plugins/treework/ 可安装的 Codex 插件
plugins/treework/ TreeWork for Coding Agents Codex 插件
skills/treework-manual/ 独立的手动 TreeWork Skill
project-map-ui/ React/D3/SVG Project Map 源码
docs/product/ 产品行为和交互契约
docs/architecture/ 运行时和 transaction 契约
Expand All @@ -215,9 +254,9 @@ paper/ 研究论文源码与图片

## 社区参与

TreeWork 目前以 Codex 插件形式提供,并以 Codex 作为发布测试目标。欢迎贡献者
通过聚焦的 host adapter,为 Claude Code、Cursor、Gemini CLI、OpenCode 等
Agent host 增加支持
TreeWork for Coding Agents 目前以 Codex 作为发布测试目标。欢迎贡献者通过聚焦的
host adapter,为 Claude Code、Cursor、Gemini CLI、OpenCode 等 Agent host
增加支持。支持独立 Agent Skills 的 host 可以直接加载 TreeWork Manual

当前特别需要贡献者参与的方向包括:

Expand Down Expand Up @@ -246,9 +285,10 @@ make validate

## 当前状态

`v0.1.7` 是当前版本。Alignment、声明式 Tree 构建、与 Tree 层级一致的 branch
文档、受保护的 branch 移动、Recall、Project Map 和 Replay 已经形成可用的
端到端闭环。Project Map 的交互设计仍会持续演化。
`v0.1.8` 是当前 Coding Agents 版本。Alignment、声明式 Tree 构建、与 Tree 层级一致的
branch 文档、受保护的 branch 移动、Recall、Project Map 和 Replay 已经形成
可用的端到端闭环。TreeWork Manual 从同一仓库和 tag 独立发布。Project Map 的
交互设计仍会持续演化。

## 隐私

Expand Down
15 changes: 10 additions & 5 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Release Notes

## Unreleased

- Withdraws the experimental Pi host adapter, its root package manifest,
Pi-specific host commands, and adapter validation. The Codex plugin and the
persisted TreeWork project-state format are unchanged.
## v0.1.8 - Two Independent Editions

- Adds `treework-manual`, an independently installable single-file TreeWork
edition for writing, research, notes, planning, creative work, operations,
and other evolving projects. Agents maintain its Tree and project state
directly in Markdown.
- Publishes TreeWork for Coding Agents and TreeWork Manual as two independently
installable assets from the same release tag.
- Withdraws the experimental Pi host adapter. The Codex plugin and persisted
TreeWork project-state format are unchanged.

## v0.1.7 - Hierarchical Branch Artifacts

Expand Down
Loading
Loading