threadroot 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,21 @@ All notable changes to Threadroot will be documented here.
4
4
 
5
5
  Threadroot follows semantic versioning after the first public release. While `0.x`, minor versions may include breaking changes as the harness format settles.
6
6
 
7
+ ## 0.1.1 - Clean setup and global agent bootstrap
8
+
9
+ ### Changed
10
+
11
+ - `threadroot init` now creates a local-only `.threadroot/` harness by default.
12
+ - Missing MCP config is now a doctor hint instead of a warning for local-only projects.
13
+ - Bootstrap prompts now ask before writing project-local MCP config or provider exposure files.
14
+
15
+ ### Added
16
+
17
+ - `threadroot expose` for thin project skill shims across Codex, Claude Code, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Antigravity, and OpenCode.
18
+ - `threadroot setup --global` for one-time machine-level Threadroot skills across supported agents.
19
+ - Codex global setup support for `~/.agents/skills/threadroot/SKILL.md`, `~/.codex/AGENTS.md`, and optional `~/.codex/config.toml` MCP config.
20
+ - Dry-run, check, undo, force, and MCP options for global setup.
21
+
7
22
  ## 0.1.0 - Initial OSS alpha
8
23
 
9
24
  ### Added
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Threadroot
2
2
 
3
- Threadroot is **git for your AI agent harness**: you author skills, rules, tools, and
4
- memory once in a canonical `.threadroot/` directory, and Threadroot compiles them into
5
- every vendor format (AGENTS.md, Claude, Copilot, Cursor) so your agents stay in sync.
3
+ Threadroot is **git for your AI agent harness**: you author skills, rules, tools,
4
+ memory, connections, and agent setup once in a canonical `.threadroot/` directory.
5
+ Provider-specific files are opt-in, thin exposure shims.
6
6
 
7
7
  It is local-first: a `tr` CLI for humans and CI, plus a local MCP server that exposes the
8
8
  same harness to coding agents. V1 does not require a cloud account, API key, or hosted
@@ -13,10 +13,12 @@ service.
13
13
  Run Threadroot without adding it to your project:
14
14
 
15
15
  ```bash
16
+ npx threadroot setup --global --dry-run
17
+ npx threadroot setup --global
18
+ npx threadroot init
19
+ # or
16
20
  pnpm dlx threadroot init
17
21
  # or
18
- npx threadroot init
19
- # or, explicitly with npm exec
20
22
  npm exec --package=threadroot -- threadroot init
21
23
  ```
22
24
 
@@ -25,7 +27,6 @@ After initialization:
25
27
  ```bash
26
28
  threadroot doctor
27
29
  threadroot context "write tests"
28
- threadroot mcp setup --write
29
30
  ```
30
31
 
31
32
  For local development on Threadroot itself:
@@ -39,12 +40,12 @@ node dist/index.js --help
39
40
  ## Quick start
40
41
 
41
42
  ```bash
42
- tr init # detect the repo, scaffold a harness, import existing
43
- # vendor files once, and compile
44
- tr status # authored objects vs compiled outputs, with drift
43
+ tr setup --global # one-time machine setup for supported coding agents
44
+ tr init # detect the repo and scaffold local-only .threadroot/
45
+ tr status # authored objects and optional compiled outputs
45
46
  tr context "write tests" # task-relevant skills, rules, tools, and memory
46
- tr doctor # health check for harness validity, drift, MCP hints, tool trust
47
- tr diff # line diff between canonical sources and vendor files
47
+ tr doctor # health check for harness validity, setup hints, tool trust
48
+ tr expose codex # optional: write a thin project skill shim for Codex
48
49
  ```
49
50
 
50
51
  `threadroot` is the full name; `tr` is the short alias.
@@ -52,7 +53,9 @@ tr diff # line diff between canonical sources and vendor files
52
53
  ## CLI surface
53
54
 
54
55
  ```bash
55
- tr init [--force] [--no-import] [--profile <p>] [--adapters <list>]
56
+ tr setup --global [--agent <list>] [--dry-run] [--check] [--undo] [--mcp]
57
+ tr init [--force] [--no-import] [--profile <p>] [--adapters <list>] [--expose <list>]
58
+ tr expose [agent|all] [--dry-run] [--check] [--undo] [--force]
56
59
  tr status
57
60
  tr diff
58
61
  tr doctor
@@ -91,9 +94,49 @@ The canonical, vendor-neutral source of truth:
91
94
  lock.json # provenance for installed objects (commit SHA + integrity)
92
95
  ```
93
96
 
94
- `tr compile` turns the harness into the big-four vendor formats. Hand-authored prose in a
97
+ By default, `tr init` keeps the repo clean and writes only `.threadroot/`. `tr compile`
98
+ turns the harness into legacy vendor instruction formats only when adapters are enabled
99
+ in `harness.yaml` or when you run `tr compile --adapter <name>`. Hand-authored prose in a
95
100
  vendor file is preserved; Threadroot only owns the block it marks as generated.
96
101
 
102
+ ## Global setup and exposure
103
+
104
+ The best experience is one-time global setup plus local-only project harnesses:
105
+
106
+ ```bash
107
+ tr setup --global --dry-run
108
+ tr setup --global
109
+ tr init
110
+ ```
111
+
112
+ Global setup installs a tiny `threadroot` skill into supported agent user-skill
113
+ directories so agents know to call `threadroot doctor` and `threadroot context "<task>"`
114
+ when they see `.threadroot/`.
115
+
116
+ Supported global skill targets:
117
+
118
+ | Agent | Project exposure path | Global setup path |
119
+ | --- | --- | --- |
120
+ | Codex | `.agents/skills/` | `~/.agents/skills/` |
121
+ | Claude Code | `.claude/skills/` | `~/.claude/skills/` |
122
+ | Cursor | `.cursor/skills/` | `~/.cursor/skills/` |
123
+ | GitHub Copilot | `.github/skills/` | `~/.copilot/skills/` |
124
+ | Gemini CLI | `.gemini/skills/` | `~/.gemini/skills/` |
125
+ | Windsurf | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
126
+ | Antigravity | `.agent/skills/` | `~/.gemini/antigravity/skills/` |
127
+ | OpenCode | `.opencode/skills/` | `~/.config/opencode/skills/` |
128
+
129
+ Use project exposure only when you want repo-local native skill discovery:
130
+
131
+ ```bash
132
+ tr expose codex
133
+ tr expose all
134
+ tr expose all --undo
135
+ ```
136
+
137
+ `tr expose` writes one managed `threadroot/SKILL.md` shim per provider. It does not copy
138
+ every Threadroot skill into provider directories.
139
+
97
140
  ## Built-in content
98
141
 
99
142
  `tr init` seeds a useful harness on an empty repo:
@@ -103,7 +146,9 @@ vendor file is preserved; Threadroot only owns the block it marks as generated.
103
146
  - **Starter tools:** wrapped from the repo's detected command surface (scripts, Make/just),
104
147
  auto-added to `tools.allow`.
105
148
  - **Profile presets:** node-cli, web, python, etc. (detected by the scanner).
106
- - **Adapters:** agents, claude, copilot, cursor enabled by default.
149
+ - **Adapters:** disabled by default to keep new repos local-only; use `tr expose` for
150
+ skill-compatible providers or `tr compile --adapter <name>` for legacy instruction
151
+ files.
107
152
 
108
153
  Modern skills use the Agent Skills-style folder shape:
109
154
 
@@ -193,7 +238,7 @@ Threadroot runs a local MCP server over stdio that exposes the harness to agents
193
238
  ```bash
194
239
  tr mcp
195
240
  tr mcp setup # print config snippets and a pasteable agent bootstrap prompt
196
- tr mcp setup --write # write project-local MCP config for supported agents
241
+ tr mcp setup --write # opt-in: write project-local MCP config for supported agents
197
242
  ```
198
243
 
199
244
  Tools: `context`, `skills_list`, `skills_get`, `tools_list`, `tools_check`, `tools_run`,
@@ -201,8 +246,8 @@ Tools: `context`, `skills_list`, `skills_get`, `tools_list`, `tools_check`, `too
201
246
  `memory_append`, `status`, `doctor`.
202
247
 
203
248
  `tr mcp setup` also prints a copy/paste agent prompt that follows the real CLI flow:
204
- check availability, run `threadroot init` when needed, inspect `status`, review `diff` on
205
- drift, and optionally write MCP config.
249
+ check availability, run `threadroot init` when needed, inspect `status`, use
250
+ `threadroot context`, and ask before writing MCP config.
206
251
 
207
252
  ## Profiles
208
253
 
@@ -243,6 +288,8 @@ TMP_REPO="$(mktemp -d /tmp/threadroot-smoke.XXXXXX)"
243
288
  rsync -a --exclude .git --exclude node_modules --exclude dist ./ "$TMP_REPO/"
244
289
  cd "$TMP_REPO"
245
290
  node "$THREADROOT_ROOT/dist/index.js" init --no-import
291
+ HOME="$TMP_REPO/home" node "$THREADROOT_ROOT/dist/index.js" setup --global --agent codex --dry-run
292
+ node "$THREADROOT_ROOT/dist/index.js" expose codex
246
293
  node "$THREADROOT_ROOT/dist/index.js" status
247
294
  node "$THREADROOT_ROOT/dist/index.js" context "write tests"
248
295
  node "$THREADROOT_ROOT/dist/index.js" skills validate