@shanepadgett/tau-agent 0.18.0 → 0.18.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/README.md +1 -0
- package/docs/context.md +62 -0
- package/extensions/context/README.md +2 -0
- package/extensions/tau-help/index.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ pi -e .
|
|
|
25
25
|
|
|
26
26
|
## Docs
|
|
27
27
|
|
|
28
|
+
- [Context management](./docs/context.md) — repository context structure and taxonomy
|
|
28
29
|
- [Extending Tau Agent](./docs/extending-tau-agent.md) — public events and integration
|
|
29
30
|
- [Subagents](./docs/subagents.md) — custom agent definitions
|
|
30
31
|
- [TUI](./docs/tui.md) — shared UI components
|
package/docs/context.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Context management
|
|
2
|
+
|
|
3
|
+
Tau uses `.pi/contexts` as a reusable map of the repository. A selected context gives an agent the primary files for a work scope and points it toward related files without loading everything.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
The catalog has three levels:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
.pi/contexts/<domain>/<concept>.toml
|
|
11
|
+
└── [entry]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- **Domain**: a stable top-level area of the repository, such as `commerce`, `platform`, or `documentation`. Domains become tabs in `/context`.
|
|
15
|
+
- **Concept**: a coherent subsystem or capability inside a domain. Each concept is one TOML file.
|
|
16
|
+
- **Entry**: a selectable work scope inside that concept. Each TOML section defines one entry.
|
|
17
|
+
|
|
18
|
+
Domain folders, concept filenames, and entry section names use lowercase kebab-case.
|
|
19
|
+
|
|
20
|
+
```toml
|
|
21
|
+
name = "Checkout"
|
|
22
|
+
description = "Checkout calculation and order submission"
|
|
23
|
+
|
|
24
|
+
[orchestration]
|
|
25
|
+
description = "Building and submitting a checkout order"
|
|
26
|
+
files = ["src/checkout/order.ts", "src/checkout/service.ts"]
|
|
27
|
+
anchors = ["test/checkout/service.test.ts", "src/payments/client.ts"]
|
|
28
|
+
|
|
29
|
+
[discounts]
|
|
30
|
+
description = "Applying coupons and account discounts"
|
|
31
|
+
files = ["src/checkout/discounts.ts"]
|
|
32
|
+
anchors = ["test/checkout/discounts.test.ts"]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Saved as `.pi/contexts/commerce/checkout.toml`, these entries have the IDs `commerce/checkout/orchestration` and `commerce/checkout/discounts`.
|
|
36
|
+
|
|
37
|
+
## Build a useful taxonomy
|
|
38
|
+
|
|
39
|
+
A good entry gives the agent enough primary code to start one recurring kind of work without flooding its context window. Classify each scope from the top down:
|
|
40
|
+
|
|
41
|
+
1. **Domain:** Which stable product or technical area owns this work?
|
|
42
|
+
2. **Concept:** Which subsystem inside that area has a clear shared purpose?
|
|
43
|
+
3. **Entry:** Which files are commonly needed together for one task?
|
|
44
|
+
|
|
45
|
+
Reuse existing terms when they still describe the code honestly. Create, move, split, or merge taxonomy when ownership or subsystem boundaries change. Directory layout can inform the decision, though domains and concepts should describe responsibility rather than copy the source tree.
|
|
46
|
+
|
|
47
|
+
Keep entries focused. Names such as `misc`, `shared`, and `other` hide missing boundaries. A broad `all` entry can support deliberate subsystem-wide work, but focused entries should remain available for normal tasks. If an entry keeps collecting unrelated paths, split it by work scope. If several tiny entries are always selected together, merge them.
|
|
48
|
+
|
|
49
|
+
Catalog durable code, configuration, tests, standards, and long-lived documentation. Leave scratch files, working plans, interviews, generated output, and rough ideas out of the catalog.
|
|
50
|
+
|
|
51
|
+
## Choose files and anchors
|
|
52
|
+
|
|
53
|
+
- `files` are eagerly read when the entry is selected. Include primary files that are usually required for that scope.
|
|
54
|
+
- `anchors` are shown to the agent as unloaded navigation paths. Use them for related tests, callers, shared dependencies, or documentation that is useful only for some tasks.
|
|
55
|
+
|
|
56
|
+
Keep the eager set small enough to read on every selection. Keep each path's loading class consistent across the catalog. If selected entries classify the same path differently, eager loading wins.
|
|
57
|
+
|
|
58
|
+
## Maintain the map
|
|
59
|
+
|
|
60
|
+
Inspect the existing catalog before placing new paths. Re-evaluate domain, concept, and entry boundaries after moves, ownership changes, or a coherent batch of new work; avoid stuffing paths into the nearest existing bucket.
|
|
61
|
+
|
|
62
|
+
Run `/context-sync` to update the catalog from uncommitted repository changes. Tau can also delegate to the `context-sync` subagent when automation is enabled. Context sync checks every eligible changed file for membership, removes stale paths, and re-evaluates the taxonomy before editing `.pi/contexts`.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Context stores reusable repository work scopes in `.pi/contexts`. Folder names become selector tabs, TOML files become concepts, and TOML sections become selectable entries.
|
|
4
4
|
|
|
5
|
+
See [Context management](../../docs/context.md) for catalog structure and taxonomy guidance.
|
|
6
|
+
|
|
5
7
|
Use `/context` to select entries. Entry `files` are injected through Tau autoread. Entry `anchors` supply lazy navigation paths that the agent can grep or read in ranges when needed.
|
|
6
8
|
|
|
7
9
|
After meaningful uncommitted work (new/moved ownership, not trivial already-covered polish), the coding agent should run the `context-sync` subagent so `.pi/contexts` stays aligned. Context sync catalogs durable code and long-lived documentation. Scratch pads, working plans, interviews, rough ideas, and other temporary artifacts should stay out; add recurring transient paths to `validation.ignoreGlobs`. Humans can also run `/context-sync` or `/context-sync <nudge>` and press Escape to cancel a running sync. It walks domain → concept → entry → membership, edits only `.pi/contexts` with `patch`, and the harness verifies write scope plus catalog invariants afterward. Out-of-scope writes are restored and the run fails. Optional nudge text soft-steers judgment without skipping evidence.
|
|
@@ -7,7 +7,7 @@ import { Markdown, type Component, visibleWidth } from "@earendil-works/pi-tui";
|
|
|
7
7
|
const TAU_DOCS_PATH = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "docs");
|
|
8
8
|
const TAU_DOCS_GUIDANCE = `Tau Agent documentation (read only when the user asks about Tau Agent, Rok, Tau extensions, Tau event APIs, harness behavior, or extending Tau Agent):
|
|
9
9
|
- Tau Agent docs: ${TAU_DOCS_PATH}
|
|
10
|
-
- When asked about: public events / external integration (docs/extending-tau-agent.md), custom subagents (docs/subagents.md), Tau TUI components (docs/tui.md)
|
|
10
|
+
- When asked about: context management / .pi/contexts taxonomy (docs/context.md), public events / external integration (docs/extending-tau-agent.md), custom subagents (docs/subagents.md), Tau TUI components (docs/tui.md)
|
|
11
11
|
- Resolve Tau docs/... under Tau Agent docs, not the current working directory
|
|
12
12
|
- When working on Tau topics, read the docs and follow .md cross-references before implementing
|
|
13
13
|
- Do not read Tau Agent docs for normal coding tasks`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shanepadgett/tau-agent",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "Tau is a custom agentic harness built with pi extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"README.md"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@shanepadgett/tau-tui": "0.18.
|
|
31
|
+
"@shanepadgett/tau-tui": "0.18.1",
|
|
32
32
|
"@toon-format/toon": "2.3.0",
|
|
33
33
|
"smol-toml": "1.7.0"
|
|
34
34
|
},
|