You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -103,7 +103,6 @@ See [`docs/schema.md`](docs/schema.md) for full schema field behavior and best p
103
103
/ct-tui on|off toggle Context Tree widget display only
104
104
/ct-init [--resume] initialize editable Context Tree config for current codebase
105
105
/ct-init-review <proposal> review agent proposal inside current init flow
106
-
/ct-new <path> [prompt] create new Pi session seeded with session:spawn bundle
107
106
/ct-subagent <path> <task> planned subagent handoff via subagent:spawn
108
107
```
109
108
@@ -146,6 +145,16 @@ Disable extension runtime:
146
145
/ct-toggle off
147
146
```
148
147
148
+
## Global config
149
+
150
+
Context Tree also loads an optional user-global config before project scopes:
151
+
152
+
```text
153
+
~/.pi/CONTEXT.json
154
+
```
155
+
156
+
Set `PI_CONTEXT_TREE_GLOBAL=/path/to/CONTEXT.json` to override the location. File sources in the global config resolve relative to the global config file; path-aware matches are evaluated against repository-relative target paths.
157
+
149
158
## Changelog
150
159
151
160
Release notes live in [`CHANGELOG.md`](CHANGELOG.md). GitHub releases mirror the same version sections.
@@ -219,7 +228,7 @@ For a Git URL, this clones or fast-forwards the target repository under `.test-w
219
228
220
229
This repo uses Context Tree to develop itself:
221
230
222
-
- root `CONTEXT.json` injects README only for scoped session context;
231
+
- root `CONTEXT.json` injects README and package metadata at session startup;
223
232
-`src/CONTEXT.json` injects Pi docs for extension runtime files and implementation-plan sections for core files;
224
233
-`scripts/CONTEXT.json` injects the canonical schema for schema generation;
225
234
-`test/CONTEXT.json` injects test strategy sections.
src/index.ts Pi extension hooks, commands, TUI state, session command
16
21
```
17
22
18
-
This is acceptable for MVP, but `context-tree.ts`and `index.ts`are too broad for long-term maintenance.
23
+
The large legacy entrypoints have been split. `context-tree.ts`is now a compatibility facade over the curated `public-api.ts`surface rather than a broad export of internals.
19
24
20
25
## Target architecture
21
26
@@ -39,25 +44,34 @@ src/cache.ts
39
44
URL cache keying, TTL, stale fallback, metadata read/write.
Copy file name to clipboardExpand all lines: docs/schema.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,14 @@ hook + optional target path
45
45
46
46
Scope is implicit: `dirname(CONTEXT.json)`.
47
47
48
+
A user-global config can also be placed at:
49
+
50
+
```text
51
+
~/.pi/CONTEXT.json
52
+
```
53
+
54
+
It is loaded before project scopes for every repository. Its file sources resolve relative to that global config directory. Path-aware `match[]` patterns are evaluated against the target path relative to the current repository root. Set `PI_CONTEXT_TREE_GLOBAL=/path/to/CONTEXT.json` to override the default location, including in tests.
55
+
48
56
## stability
49
57
50
58
`stability` is a top-level scope signal for AI-assisted editing. It tells agents whether code under this scope is trusted reference, stable working code, active work, prototype, deprecated, or generated. It is not an edit policy engine; detailed rules still belong in hook-injected `.md` files.
0 commit comments