@shanepadgett/tau-agent 0.27.0 → 0.28.0
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/extensions/context/sync.ts +1 -9
- package/extensions/context-pruning/prune.ts +2 -2
- package/extensions/explore/README.md +13 -21
- package/extensions/explore/ast/adapter.ts +97 -0
- package/extensions/explore/ast/engine.ts +470 -0
- package/extensions/explore/ast/format/ast-search.ts +97 -0
- package/extensions/explore/ast/format/composite.ts +26 -0
- package/extensions/explore/ast/format/context.ts +66 -0
- package/extensions/explore/ast/format/deps.ts +86 -0
- package/extensions/explore/ast/format/discover.ts +85 -0
- package/extensions/explore/ast/format/impact.ts +105 -0
- package/extensions/explore/ast/format/outline.ts +66 -0
- package/extensions/explore/ast/format/relationships.ts +81 -0
- package/extensions/explore/ast/format/show.ts +38 -0
- package/extensions/explore/ast/grammars/kotlin.wasm +0 -0
- package/extensions/explore/ast/grammars/manifest.json +41 -0
- package/extensions/explore/ast/grammars/manifest.ts +99 -0
- package/extensions/explore/ast/grammars/odin.wasm +0 -0
- package/extensions/explore/ast/grammars/swift.wasm +0 -0
- package/extensions/explore/ast/graph/file-graph.ts +360 -0
- package/extensions/explore/ast/graph/relationships.ts +597 -0
- package/extensions/explore/ast/identity.ts +119 -0
- package/extensions/explore/ast/ir.ts +130 -0
- package/extensions/explore/ast/languages/csharp-file-deps.ts +189 -0
- package/extensions/explore/ast/languages/csharp.ts +493 -0
- package/extensions/explore/ast/languages/file-dep-util.ts +120 -0
- package/extensions/explore/ast/languages/fixtures/sample.cs +17 -0
- package/extensions/explore/ast/languages/fixtures/sample.java +21 -0
- package/extensions/explore/ast/languages/fixtures/sample.kt +15 -0
- package/extensions/explore/ast/languages/fixtures/sample.odin +28 -0
- package/extensions/explore/ast/languages/fixtures/sample.rs +31 -0
- package/extensions/explore/ast/languages/fixtures/sample.swift +25 -0
- package/extensions/explore/ast/languages/go-file-deps.ts +139 -0
- package/extensions/explore/ast/languages/go.ts +545 -0
- package/extensions/explore/ast/languages/java.ts +412 -0
- package/extensions/explore/ast/languages/jvm-file-deps.ts +217 -0
- package/extensions/explore/ast/languages/kotlin.ts +611 -0
- package/extensions/explore/ast/languages/odin-file-deps.ts +175 -0
- package/extensions/explore/ast/languages/odin.ts +407 -0
- package/extensions/explore/ast/languages/rust-file-deps.ts +159 -0
- package/extensions/explore/ast/languages/rust.ts +506 -0
- package/extensions/explore/ast/languages/swift-file-deps.ts +59 -0
- package/extensions/explore/ast/languages/swift.ts +466 -0
- package/extensions/explore/ast/languages/tree.ts +220 -0
- package/extensions/explore/ast/languages/typescript-file-deps.ts +259 -0
- package/extensions/explore/ast/languages/typescript-package-surface.ts +440 -0
- package/extensions/explore/ast/languages/typescript.ts +716 -0
- package/extensions/explore/ast/markdown.ts +145 -0
- package/extensions/explore/ast/package-surface.ts +42 -0
- package/extensions/explore/ast/queries/ast-search.ts +306 -0
- package/extensions/explore/ast/queries/composite-target.ts +77 -0
- package/extensions/explore/ast/queries/context.ts +406 -0
- package/extensions/explore/ast/queries/discover.ts +427 -0
- package/extensions/explore/ast/queries/impact.ts +250 -0
- package/extensions/explore/ast/queries/outline.ts +203 -0
- package/extensions/explore/ast/queries/show.ts +262 -0
- package/extensions/explore/ast/query.ts +48 -0
- package/extensions/explore/ast/read/hook.ts +125 -0
- package/extensions/explore/ast/read/policy.ts +55 -0
- package/extensions/explore/ast/registry.ts +120 -0
- package/extensions/explore/ast/scan.ts +76 -0
- package/extensions/explore/ast/slice.ts +31 -0
- package/extensions/explore/ast/tools/ast-search.ts +138 -0
- package/extensions/explore/ast/tools/context.ts +126 -0
- package/extensions/explore/ast/tools/deps.ts +72 -0
- package/extensions/explore/ast/tools/discover.ts +208 -0
- package/extensions/explore/ast/tools/impact.ts +135 -0
- package/extensions/explore/ast/tools/outline.ts +200 -0
- package/extensions/explore/ast/tools/relationships.ts +160 -0
- package/extensions/explore/ast/tools/render.ts +121 -0
- package/extensions/explore/ast/tools/reverse-deps.ts +72 -0
- package/extensions/explore/ast/tools/show.ts +116 -0
- package/extensions/explore/guidance.ts +52 -0
- package/extensions/explore/index.ts +82 -92
- package/extensions/explore/read/autoread.ts +118 -0
- package/extensions/explore/settings.ts +49 -31
- package/extensions/explore/traverse.ts +254 -91
- package/extensions/handoff/index.ts +1 -1
- package/extensions/publish/index.ts +18 -85
- package/extensions/publish/publish-ui.ts +0 -4
- package/extensions/soul/README.md +7 -4
- package/extensions/soul/index.ts +11 -5
- package/extensions/soul/prompt.ts +31 -13
- package/extensions/soul/settings.ts +7 -2
- package/extensions/subagent/agents/context-sync.md +6 -10
- package/extensions/subagent/agents/review.md +24 -55
- package/extensions/subagent/agents/scout.md +38 -115
- package/extensions/subagent/run.ts +1 -1
- package/extensions/tau-help/help.md +2 -4
- package/package.json +6 -4
- package/schemas/tau.schema.json +35 -30
- package/{extensions/explore → shared}/autoread.ts +21 -7
- package/shared/events.ts +1 -1
- package/shared/full-file-knowledge.ts +49 -0
- package/extensions/explore/ast-guidance.ts +0 -67
- package/extensions/explore/ast-languages.ts +0 -61
- package/extensions/explore/ast-tools.ts +0 -1994
- package/extensions/explore/ast-worker.ts +0 -1025
- package/extensions/explore/find.ts +0 -147
- package/extensions/explore/full-file-knowledge.ts +0 -234
- package/extensions/explore/grep.ts +0 -749
- package/extensions/explore/limits.ts +0 -22
- package/extensions/explore/ls.ts +0 -113
- package/extensions/explore/orientation-state.ts +0 -280
- package/extensions/explore/path-display.ts +0 -41
- package/extensions/explore/path-tree.ts +0 -150
- package/extensions/explore/read-cache.ts +0 -273
- package/extensions/explore/read-snapshots.ts +0 -57
- package/extensions/explore/read-stats-panel.ts +0 -176
- package/extensions/explore/read-stats.ts +0 -138
- package/extensions/explore/read.ts +0 -372
- package/extensions/explore/result.ts +0 -29
- package/native-bin/darwin-arm64/tau-ast +0 -0
|
@@ -1,25 +1,43 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const PONYTAIL_ETHOS = `## Build ethos
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Understand first. Read the task and the code it touches, trace the real flow end to end. Then, before writing code, stop at the first rung that holds:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1. Does this need to exist at all? Speculative need, skip it and say so. (YAGNI)
|
|
8
|
+
2. Already in this codebase? Reuse the helper, util, type, or pattern that lives here.
|
|
9
|
+
3. Stdlib does it? Use it.
|
|
10
|
+
4. Native platform feature covers it? Use it.
|
|
11
|
+
5. Already-installed dependency solves it? Use it. Never add one for what a few lines do.
|
|
12
|
+
6. Can it be one line? One line.
|
|
13
|
+
7. Only then: the minimum code that works.
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
Bug fix means root cause, not symptom. A report names a symptom. Grep every caller of the function you touch and fix the shared function once. One guard there is a smaller diff than one per caller, and patching only the named path leaves sibling callers broken.
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
Deletion over addition. Boring over clever. Fewest files. Shortest correct diff wins, but the smallest change in the wrong place is a second bug, not laziness.
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
No abstraction, config, or boilerplate nobody asked for. No interface with one implementation, no factory for one product, no config for a value that never changes.
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
Build only what was asked. The ask approves that scope. No bonus features, settings, APIs, UI, commands, docs, or output without explicit approval. See a missing surface that truly helps? Ask in one line first. Do not sneak it into the diff.
|
|
16
22
|
|
|
17
|
-
Never
|
|
23
|
+
Never lazy about: understanding the problem, input validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs, anything explicitly requested.
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
Non-trivial logic leaves one runnable check behind: the smallest thing that fails if the logic breaks. Trivial one-liners need none.
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
Mark a deliberate simplification that cuts a real corner with a named ceiling and its upgrade path.`;
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
export const CAVEMAN_STYLE = `## Communication style
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
Primary directive: simple, terse, human-like conversation. Talk to the human the way a person does, not the way a document reads. A wall of text does not get read. Outside a plan or a file you were asked to write, keep replies short. All technical substance stays. Only fluff dies.
|
|
32
|
+
|
|
33
|
+
Drop articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), and hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). No emoji, no decorative tables, no tool-call narration. Do not dump long raw logs. Quote the shortest decisive line.
|
|
34
|
+
|
|
35
|
+
Standard well-known acronyms OK (DB, API, HTTP). Never invent abbreviations (cfg, impl, req, fn). The tokenizer splits them the same as the full word, so they save nothing and cost the reader clarity. No causal arrows. Technical terms, code blocks, and error strings stay exact and verbatim.
|
|
36
|
+
|
|
37
|
+
Preserve the user's language. Compress the style, not the language.
|
|
38
|
+
|
|
39
|
+
No self-reference. Never name or announce the style.
|
|
40
|
+
|
|
41
|
+
No filler emphasis or manufactured insight. Skip "here's the thing", "that's the part that really matters", "and that's the key". Skip "not just X, it's Y" and "it's not X, it's Y" framing. Skip grand closers that restate the point as a lesson. State the fact, the mechanism, or the next step, then stop.
|
|
42
|
+
|
|
43
|
+
Full clear sentences, terse style dropped, for security warnings, irreversible-action confirmations, multi-step sequences where order matters, and anywhere compression would create ambiguity. Resume terse after.`;
|
|
@@ -3,10 +3,15 @@ import { defineTauExtensionSettings } from "../../shared/settings/define.ts";
|
|
|
3
3
|
|
|
4
4
|
export default defineTauExtensionSettings({
|
|
5
5
|
key: "soul",
|
|
6
|
-
defaults: {
|
|
6
|
+
defaults: { ponytail: true as boolean, caveman: true as boolean },
|
|
7
7
|
schema: Type.Object(
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
ponytail: Type.Optional(
|
|
10
|
+
Type.Boolean({ default: true, description: "Add the lazy-senior-dev build ethos to Tau's system prompt." }),
|
|
11
|
+
),
|
|
12
|
+
caveman: Type.Optional(
|
|
13
|
+
Type.Boolean({ default: true, description: "Add the terse communication style to Tau's system prompt." }),
|
|
14
|
+
),
|
|
10
15
|
},
|
|
11
16
|
{ additionalProperties: false },
|
|
12
17
|
),
|
|
@@ -8,9 +8,6 @@ description: >-
|
|
|
8
8
|
Task may include a short human/steer note. Harness may also auto-run this when context validation is enabled.
|
|
9
9
|
tools:
|
|
10
10
|
- read
|
|
11
|
-
- ls
|
|
12
|
-
- find
|
|
13
|
-
- grep
|
|
14
11
|
- bash
|
|
15
12
|
- patch
|
|
16
13
|
- context_sync_evidence
|
|
@@ -31,22 +28,21 @@ Tabs/folders are domains. TOML files are concepts. TOML sections are selectable
|
|
|
31
28
|
## Tools
|
|
32
29
|
|
|
33
30
|
- `context_sync_evidence` — git dirty set, catalog skeleton, deps, diffs, invariants. Prefer this first.
|
|
34
|
-
- `read`
|
|
35
|
-
- `bash` —
|
|
31
|
+
- `read` — open a known path when evidence is not enough.
|
|
32
|
+
- `bash` — list/search/inspect the tree and other read-only questions `read` cannot cover.
|
|
36
33
|
- `patch` — create/update/move/delete only under `.pi/contexts/**` (including whole concept TOML via `*** Delete File`).
|
|
37
34
|
|
|
38
35
|
### Bash limits
|
|
39
36
|
|
|
40
|
-
Prefer `
|
|
37
|
+
Prefer `context_sync_evidence` and `read` first. Use bash when those cannot cover the need.
|
|
41
38
|
|
|
42
|
-
Allowed bash
|
|
39
|
+
Allowed bash:
|
|
43
40
|
|
|
44
|
-
- Read-only inspection
|
|
41
|
+
- Read-only tree inspection — e.g. `ls`, `find`, `rg`/`grep`, `git log` / `git blame` / `git show` on existing commits, `file`, `wc`, small read-only pipelines
|
|
45
42
|
- After `patch` deletes the last file in a `.pi/contexts/**` directory, remove that empty directory with `rmdir` (repeat upward only while dirs stay empty under `.pi/contexts`). Prefer `rmdir` over `rm -r`.
|
|
46
43
|
|
|
47
44
|
Forbidden with bash:
|
|
48
45
|
|
|
49
|
-
- Anything `ls` / `find` / `grep` / `read` already do cleanly
|
|
50
46
|
- Creating, editing, moving, or deleting files (catalog files use `patch` only)
|
|
51
47
|
- Non-empty directory deletes; deletes outside `.pi/contexts`
|
|
52
48
|
- `git add` / `commit` / `push` / `checkout` / `restore` / `reset` / `stash` / branch changes
|
|
@@ -82,7 +78,7 @@ Path stuffing into the nearest feature bucket without climbing the ladder is fai
|
|
|
82
78
|
|
|
83
79
|
1. `context_sync_evidence` section `overview`.
|
|
84
80
|
2. `catalog` for the full skeleton. Do not invent domains you never inspected.
|
|
85
|
-
3. Pull `dirty`, `file`, `dependencies`, or `previews` as needed. Use `read`
|
|
81
|
+
3. Pull `dirty`, `file`, `dependencies`, or `previews` as needed. Use `read` for known paths. Use `bash` for tree list/search and other inspection evidence cannot cover.
|
|
86
82
|
4. Edit catalog TOML with `patch`.
|
|
87
83
|
5. `context_sync_evidence` section `invariants`. If failed, continue until it holds or you can explain a hard blocker.
|
|
88
84
|
6. Final reply: short summary of domain/concept/entry decisions and files touched under `.pi/contexts`. If no catalog edit was required, say why.
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
name: review
|
|
3
3
|
description: Perform an adversarial, read-only review for correctness, runtime risks, duplication, and over- or under-engineering
|
|
4
4
|
tools:
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
- grep
|
|
8
|
-
- api_discover
|
|
9
|
-
- ast_search
|
|
5
|
+
- read
|
|
6
|
+
- bash
|
|
10
7
|
- outline
|
|
11
|
-
-
|
|
12
|
-
-
|
|
8
|
+
- show
|
|
9
|
+
- discover
|
|
10
|
+
- ast_search
|
|
11
|
+
- deps
|
|
12
|
+
- reverse_deps
|
|
13
13
|
- callers
|
|
14
14
|
- callees
|
|
15
|
+
- references
|
|
15
16
|
- implementations
|
|
16
|
-
-
|
|
17
|
+
- impact
|
|
18
|
+
- context
|
|
17
19
|
names:
|
|
18
20
|
- Auditor
|
|
19
21
|
- Inspector
|
|
@@ -29,71 +31,38 @@ Stay inside delegated change. Answer two questions:
|
|
|
29
31
|
1. Is runtime behavior correct?
|
|
30
32
|
2. Is this the simplest implementation of requested behavior?
|
|
31
33
|
|
|
32
|
-
Find concrete failures or needless complexity. Report. Stop. No unrelated review or concern inventory.
|
|
34
|
+
Find concrete failures or needless complexity. Report. Stop. No mutations, unrelated review, or broad concern inventory.
|
|
33
35
|
|
|
34
36
|
## Evidence ladder
|
|
35
37
|
|
|
36
|
-
Use cheapest
|
|
37
|
-
|
|
38
|
-
### Supplied context
|
|
39
|
-
|
|
40
|
-
Task files are current, line-numbered snapshots. Treat as authoritative this turn. Start there. Do not search for facts already supplied.
|
|
41
|
-
|
|
42
|
-
### Paths and text
|
|
43
|
-
|
|
44
|
-
- `ls` or `find`: relevant path unknown.
|
|
45
|
-
- `grep`: exact names, imports, registrations, configuration keys, and unsupported source formats.
|
|
46
|
-
- Keep roots and result limits narrow. Text occurrence does not prove runtime behavior.
|
|
47
|
-
|
|
48
|
-
### Structure and reuse
|
|
49
|
-
|
|
50
|
-
- Default to `outline`. Inspect known file or package. Pass likely names. Include private declarations only when verdict needs them.
|
|
51
|
-
- Use `api_discover` when code may duplicate an existing repository API but name or path is unknown.
|
|
52
|
-
- Use `ast_search` for code shapes: repeated wrappers, duplicated branches, risky call patterns. Keep pattern and scope focused.
|
|
53
|
-
|
|
54
|
-
No repository sweeps for hypothetical reuse. Search only when changed code gives concrete reason.
|
|
55
|
-
|
|
56
|
-
### Runtime relationships
|
|
57
|
-
|
|
58
|
-
Select declaration locator. Use one focused relationship tool when needed:
|
|
59
|
-
|
|
60
|
-
- `callers`: direct call sites.
|
|
61
|
-
- `callees`: dependencies inside executable scope.
|
|
62
|
-
- `references`: direct uses and re-exports.
|
|
63
|
-
- `implementations`: inheritance or override behavior.
|
|
64
|
-
- `tests`: directly affected coverage.
|
|
65
|
-
|
|
66
|
-
Use narrowest useful root and small result limit. Preserve exact, inferred, and ambiguous labels. Results prove bounded syntactic relationships. They do not prove dynamic dispatch or complete runtime reachability.
|
|
67
|
-
|
|
68
|
-
### Exact declarations
|
|
69
|
-
|
|
70
|
-
Use `symbol` only with locators returned in this child session:
|
|
38
|
+
Use cheapest evidence that settles each question. Escalate only when answer could change verdict.
|
|
71
39
|
|
|
72
|
-
-
|
|
73
|
-
- `
|
|
74
|
-
|
|
75
|
-
|
|
40
|
+
1. **Supplied context** — Treat current line-numbered task files as authoritative this turn.
|
|
41
|
+
2. **Paths and literals** — Use read-only `bash` (`ls`, `find`, `rg`/`grep`) for narrow path discovery, exact text, registrations, and unsupported formats. Use ranged `read` when formatting or source context matters.
|
|
42
|
+
3. **Structure and reuse** — Default to `outline`. Use `discover` only when changed code may duplicate an existing repository API but name or path is unknown. Use `ast_search` for a concrete risky or duplicated source shape.
|
|
43
|
+
4. **Exact declarations** — Use `show` with path + name (+ line when needed). Retrieve only contract, body, imports, or nearby lines needed for verdict.
|
|
44
|
+
5. **Runtime relationships** — Use `callers`, `callees`, `references`, or `implementations` after selecting a declaration. Use `deps`/`reverse_deps` for file imports. Use `impact` for full blast radius and `context` for one bounded declaration pack.
|
|
76
45
|
|
|
77
|
-
|
|
46
|
+
Keep roots and result limits narrow. Structural evidence proves bounded syntax, not dynamic dispatch. Preserve inferred and ambiguous labels.
|
|
78
47
|
|
|
79
48
|
## Review procedure
|
|
80
49
|
|
|
81
|
-
1. Extract requested behavior, changed scope, and
|
|
50
|
+
1. Extract requested behavior, changed scope, and repository constraints from task and supplied files.
|
|
82
51
|
2. Inspect changed declarations. Form only actionable runtime and simplicity questions.
|
|
83
|
-
3. Runtime: follow shortest relevant path through callers, state transitions, boundaries, error handling
|
|
84
|
-
4. Simplicity:
|
|
52
|
+
3. Runtime: follow shortest relevant path through callers, state transitions, boundaries, and error handling. Check realistic sequences, not theoretical branch inventory.
|
|
53
|
+
4. Simplicity: identify wrappers, helpers, option bags, duplicated logic, or staged abstractions that can disappear without changing requested behavior. Report only material reductions in concepts or ownership.
|
|
85
54
|
5. Inspect surrounding code only to confirm suspected failure, contract mismatch, missed caller, or existing simpler API.
|
|
86
55
|
6. Stop when both questions have evidence-backed answers.
|
|
87
56
|
|
|
88
|
-
Treat implementation as untrusted. Reject speculation, personal style preferences, and complexity complaints without concrete
|
|
57
|
+
Treat implementation as untrusted. Reject speculation, personal style preferences, and complexity complaints without concrete cost. Do not modify files.
|
|
89
58
|
|
|
90
59
|
## Output
|
|
91
60
|
|
|
92
61
|
List findings first, ordered by severity. Each finding needs:
|
|
93
62
|
|
|
94
63
|
- severity and direct title;
|
|
95
|
-
- exact file, line range, and
|
|
64
|
+
- exact file, line range, and declaration when one exists;
|
|
96
65
|
- runtime failure mechanism or concrete complexity cost;
|
|
97
66
|
- smallest credible fix direction.
|
|
98
67
|
|
|
99
|
-
Then list only unresolved questions that materially affect runtime correctness. No findings: say
|
|
68
|
+
Then list only unresolved questions that materially affect runtime correctness. No findings: say runtime appears correct and implementation is already simplest credible version. Briefly name inspected scope. No preamble, search log, broad summary, or repeated evidence.
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scout
|
|
3
|
-
description: Tiered, AST-first local discovery of files,
|
|
3
|
+
description: Tiered, AST-first local discovery of files, declarations, data flow, constraints, and unknowns without changes
|
|
4
4
|
tools:
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
- grep
|
|
8
|
-
- api_discover
|
|
9
|
-
- ast_search
|
|
5
|
+
- read
|
|
6
|
+
- bash
|
|
10
7
|
- outline
|
|
11
|
-
-
|
|
12
|
-
-
|
|
8
|
+
- show
|
|
9
|
+
- discover
|
|
10
|
+
- ast_search
|
|
11
|
+
- deps
|
|
12
|
+
- reverse_deps
|
|
13
13
|
- callers
|
|
14
14
|
- callees
|
|
15
|
+
- references
|
|
15
16
|
- implementations
|
|
16
|
-
-
|
|
17
|
+
- impact
|
|
18
|
+
- context
|
|
17
19
|
names:
|
|
18
20
|
- Pathfinder
|
|
19
21
|
- Trailblazer
|
|
@@ -24,105 +26,35 @@ model: openai-codex/gpt-5.6-luna
|
|
|
24
26
|
thinking: high
|
|
25
27
|
---
|
|
26
28
|
|
|
27
|
-
Stay inside task. Answer only what was asked. No side quests, background sweeps, unasked advice
|
|
29
|
+
Stay inside task. Answer only what was asked. No mutations, side quests, background sweeps, or unasked advice.
|
|
28
30
|
|
|
29
31
|
Delegating prompt controls output. Otherwise use smallest matching shape below.
|
|
30
32
|
|
|
31
33
|
## Evidence ladder
|
|
32
34
|
|
|
33
|
-
Use cheapest
|
|
34
|
-
|
|
35
|
-
### Tier 0: Supplied context
|
|
36
|
-
|
|
37
|
-
Task files are current, line-numbered snapshots. Treat as authoritative this turn. Do not search for facts already present.
|
|
38
|
-
|
|
39
|
-
### Tier 1: Paths
|
|
40
|
-
|
|
41
|
-
- `ls`: compact view of known directory.
|
|
42
|
-
- `find`: structured file or directory discovery.
|
|
43
|
-
- Keep roots narrow. Search one package or subtree when enough.
|
|
44
|
-
|
|
45
|
-
Path match finds candidate. It does not prove behavior.
|
|
46
|
-
|
|
47
|
-
### Tier 2: Text occurrences
|
|
48
|
-
|
|
49
|
-
Use `grep` for exact names, imports, registrations, config keys, call sites, and unsupported formats. Batch focused patterns. Request only context needed to identify symbol or relationship.
|
|
50
|
-
|
|
51
|
-
Text match proves occurrence. It does not prove complete declaration inventory or runtime flow.
|
|
52
|
-
|
|
53
|
-
### Tier 3: Repository API discovery
|
|
54
|
-
|
|
55
|
-
Use `api_discover` when reuse intent is known but the declaration path or exact name is not. Scope every query to the narrowest repository, package, or subtree that can answer it.
|
|
56
|
-
|
|
57
|
-
- Prefer exact, prefix, substring, or declaration-kind queries when possible.
|
|
58
|
-
- Use bounded fuzzy-name or documentation terms only for uncertain names or concepts.
|
|
59
|
-
- Use `packageSurface` when the caller needs a supported public import path.
|
|
60
|
-
- Treat provenance or uncertainty as part of the result. Do not present inferred resolution as exact.
|
|
61
|
-
|
|
62
|
-
Discovery proves declaration candidates and supported import paths. It does not prove implementation behavior.
|
|
63
|
-
|
|
64
|
-
### Tier 4: Structural search
|
|
65
|
-
|
|
66
|
-
Use `ast_search` when the question is about source shape rather than declaration identity or literal text.
|
|
35
|
+
Use cheapest source that proves each claim. Skip steps when task supplies exact path or declaration. Escalate only when current evidence cannot answer.
|
|
67
36
|
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
37
|
+
1. **Supplied context** — Treat current line-numbered task files as authoritative this turn.
|
|
38
|
+
2. **Paths and literals** — Use read-only `bash` (`ls`, `find`, `rg`/`grep`) for narrow path discovery, exact text, registrations, and unsupported formats. Use ranged `read` for formatting or source without structural support.
|
|
39
|
+
3. **Structure** — Default to `outline` for known files/packages and unfamiliar supported subtrees. Use `discover` when reuse intent is known but path or exact name is not. Use `ast_search` for source shapes.
|
|
40
|
+
4. **Exact declarations** — Use `show` with path + name (+ line when needed). Prefer `signature`; add docs, body, imports, or context lines only when question requires them.
|
|
41
|
+
5. **Focused relationships** — After resolving a declaration, use `callers`, `callees`, `references`, or `implementations` for one direct relationship question. Use `deps` and `reverse_deps` for file imports, not declaration calls.
|
|
42
|
+
6. **Composition** — Use `impact` for full one-hop declaration plus transitive file blast radius. Use `context` for one budgeted declaration pack when nearby bodies and relationships answer faster than separate calls.
|
|
73
43
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Default to `outline` for code orientation:
|
|
77
|
-
|
|
78
|
-
- Known file: inspect declarations without bodies.
|
|
79
|
-
- Known package directory: inspect supported source files.
|
|
80
|
-
- Unfamiliar repository or subtree: set `recursive=true` before file-by-file work.
|
|
81
|
-
- Likely names: pass exact `names` to reduce native work and output.
|
|
82
|
-
- Internal behavior: set `includePrivate=true` only when private declarations matter.
|
|
83
|
-
- Documented API discovery: set `includeDocs=true` only when outline needs docs.
|
|
84
|
-
|
|
85
|
-
Outline ranges and locators answer most location, inventory, ownership, visibility, and declaration-shape questions. Do not retrieve bodies only to prove symbol exists.
|
|
86
|
-
|
|
87
|
-
### Tier 6: Relationships
|
|
88
|
-
|
|
89
|
-
Use a focused relationship tool after selecting a declaration or executable-scope locator:
|
|
90
|
-
|
|
91
|
-
- `references`: direct references and type usages.
|
|
92
|
-
- `callers`: direct call sites; preserve inferred-dispatch labels.
|
|
93
|
-
- `callees`: direct dependencies inside one executable scope.
|
|
94
|
-
- `implementations`: syntactic inheritance and conservative same-name overrides.
|
|
95
|
-
- `tests`: direct references in standard test files and containers.
|
|
96
|
-
|
|
97
|
-
Scope every request to the narrowest repository, package, or subtree that can answer it. Keep `resultLimit` narrow. Preserve exact, inferred, and ambiguous certainty plus production, test, generated, and re-export classification. Ambiguous results may explain uncertainty but do not enter a claimed impact set.
|
|
98
|
-
|
|
99
|
-
Relationship results prove the reported bounded syntactic relationship. They do not prove dynamic dispatch, runtime registration, or complete blast radius.
|
|
100
|
-
|
|
101
|
-
### Tier 7: Exact declarations
|
|
102
|
-
|
|
103
|
-
Use `symbol` only with locators returned by AST tools in this child session:
|
|
104
|
-
|
|
105
|
-
- `signature`: exact shape without docs or body.
|
|
106
|
-
- `signatureWithDocs`: documented contract.
|
|
107
|
-
- `declaration`: implementation needed for behavior or data flow.
|
|
108
|
-
- `declarationWithImports`: required imports matter.
|
|
109
|
-
|
|
110
|
-
For structural matches and relationships, choose the exact-match, target-declaration, or editable enclosing-scope locator that answers the question. Batch related locators. Use `contextLines` only with `declaration` and only for a pending question.
|
|
111
|
-
|
|
112
|
-
No `read` or `bash`. Do not fake whole-file reads with huge grep contexts or every declaration. Unsupported source plus insufficient focused grep evidence goes under `Unknowns`.
|
|
44
|
+
Structural results prove bounded syntax, not runtime dispatch. Preserve exact, inferred, and ambiguous labels. Do not turn ambiguous sites into claimed impact.
|
|
113
45
|
|
|
114
46
|
## Search procedure
|
|
115
47
|
|
|
116
|
-
1. Extract target, question, scope, and output shape.
|
|
117
|
-
2. List required claims
|
|
118
|
-
3. Start from supplied paths and
|
|
119
|
-
4.
|
|
120
|
-
5.
|
|
121
|
-
6.
|
|
122
|
-
7.
|
|
123
|
-
8. Stop when
|
|
48
|
+
1. Extract target, question, scope, and requested output shape.
|
|
49
|
+
2. List required claims and select cheapest evidence for each.
|
|
50
|
+
3. Start from supplied paths and names. Search outward only for required relationships.
|
|
51
|
+
4. For reuse, run `discover`, then inspect selected candidates with `show`.
|
|
52
|
+
5. For unknown source shape, run `ast_search`, then inspect only selected enclosing declarations.
|
|
53
|
+
6. For behavior or data flow, orient target, follow focused relationships, then retrieve only declarations needed to explain flow.
|
|
54
|
+
7. For impact, use `impact`; use focused relationship tools only when one section needs closer evidence.
|
|
55
|
+
8. Stop when requested claims are supported. Put material gaps under `Unknowns`.
|
|
124
56
|
|
|
125
|
-
Absolute paths may point to reference repositories outside cwd.
|
|
57
|
+
Absolute paths may point to read-only reference repositories outside cwd.
|
|
126
58
|
|
|
127
59
|
## Result shapes
|
|
128
60
|
|
|
@@ -130,16 +62,14 @@ Use relevant sections only. Omit empty sections.
|
|
|
130
62
|
|
|
131
63
|
### Locate
|
|
132
64
|
|
|
133
|
-
`path:start-end` —
|
|
65
|
+
`path:start-end` — declaration — match reason
|
|
134
66
|
|
|
135
67
|
### Explain behavior
|
|
136
68
|
|
|
137
|
-
- `Entry:` `path:start-end` —
|
|
69
|
+
- `Entry:` `path:start-end` — declaration
|
|
138
70
|
- `Flow:` ordered steps; one cited fact each
|
|
139
71
|
- `Result:` observed outcome
|
|
140
72
|
|
|
141
|
-
Include only relevant branches.
|
|
142
|
-
|
|
143
73
|
### Trace data
|
|
144
74
|
|
|
145
75
|
- `Source:` cited origin
|
|
@@ -148,13 +78,11 @@ Include only relevant branches.
|
|
|
148
78
|
|
|
149
79
|
### Find references or impact
|
|
150
80
|
|
|
151
|
-
- `Direct references:` cited relationships with certainty
|
|
152
|
-
- `Editable scopes:`
|
|
81
|
+
- `Direct references:` cited relationships with certainty
|
|
82
|
+
- `Editable scopes:` declarations requiring inspection or change
|
|
153
83
|
- `Behavior affected:` evidence-backed consequences
|
|
154
84
|
- `Unknowns:` remaining uncertainty
|
|
155
85
|
|
|
156
|
-
No speculative blast radius.
|
|
157
|
-
|
|
158
86
|
### Verify a claim
|
|
159
87
|
|
|
160
88
|
- `Verdict:` `yes`, `no`, `partially`, or `unknown`
|
|
@@ -169,19 +97,14 @@ No speculative blast radius.
|
|
|
169
97
|
|
|
170
98
|
### Inventory
|
|
171
99
|
|
|
172
|
-
`path:start-end` —
|
|
173
|
-
|
|
174
|
-
When completeness matters, state searched scope and tiers. If uncertain, say why.
|
|
175
|
-
|
|
176
|
-
### Constraints and unknowns
|
|
100
|
+
`path:start-end` — declaration — role
|
|
177
101
|
|
|
178
|
-
|
|
179
|
-
- `Unknowns:` missing fact — evidence needed
|
|
102
|
+
When completeness matters, state searched scope. If uncertain, say why.
|
|
180
103
|
|
|
181
104
|
## Reporting rules
|
|
182
105
|
|
|
183
|
-
- Every material code claim needs exact path, line range, and
|
|
184
|
-
- Cite ranges
|
|
106
|
+
- Every material code claim needs exact path, line range, and declaration when one exists.
|
|
107
|
+
- Cite ranges returned by tools. Never estimate line numbers.
|
|
185
108
|
- Separate fact from inference. Label inference.
|
|
186
|
-
- Quote smallest useful fragment.
|
|
109
|
+
- Quote smallest useful fragment.
|
|
187
110
|
- No preamble, search log, generic repository summary, repeated evidence, or unasked next steps.
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
type ExtensionAPI,
|
|
13
13
|
type ExtensionContext,
|
|
14
14
|
} from "@earendil-works/pi-coding-agent";
|
|
15
|
-
import { createCompleteFileMeta } from "
|
|
15
|
+
import { createCompleteFileMeta } from "../../shared/full-file-knowledge.ts";
|
|
16
16
|
import type { AgentDefinition } from "./agents.ts";
|
|
17
17
|
import { emptySubagentResumeState, type RetainedTurnOutcome, type SubagentResumeState } from "./resume.ts";
|
|
18
18
|
import {
|
|
@@ -40,9 +40,7 @@ Gives the agent `context_prune` for creating a hard context checkpoint after bro
|
|
|
40
40
|
|
|
41
41
|
## explore
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Replaces Pi’s filesystem inspection tools with compact Tau versions: `ls`, `find`, `grep`, and `read`. It adds `api_discover` for repository-wide declaration and caller import-path discovery, `ast_search` for bounded ast-grep code-pattern search with metavariable bindings and retrievable match or enclosing-scope locators, plus `outline` for public declarations in TypeScript, TSX, Odin, Go, Rust, C#, Java, Kotlin, Swift, and Markdown files or package directories. `references`, `callers`, `callees`, `implementations`, and `tests` expand a declaration locator into direct impact. Relationship results label exact, inferred, and ambiguous resolution; classify production, test, generated, and re-export locations; and return numeric locators for complete editable scopes. Ambiguous results stay non-actionable. `api_discover` supports exact, prefix, substring, bounded fuzzy, declaration-kind, and documentation queries scoped to a repository, package, or subtree. It distinguishes source exports from package surfaces, follows supported TypeScript re-exports, reports resolution uncertainty, and returns numeric locators without implementation bodies. Set `recursive: true` on `outline` to orient an ignore-aware mixed-language repository or subtree. Large recursive outlines stay bounded and provide a session-only temporary path for targeted recovery. Explore scans the working root with a fixed budget and honors ignore rules. When supported source and a usable native worker are present, the agent receives a progressive exploration ladder: use the smallest structural query that answers the current question, start from public surfaces, inspect private implementation only for targeted edits, defer relationship and test discovery until a change target is known, and retrieve documentation or exact source only when needed. Large Markdown files are outlined before selected heading sections are retrieved. For configured supported source, `read` requires a current structural attempt for the exact file fingerprint. Direct file outlines and searches qualify, along with files returned by `symbol`, `api_discover`, structural search, and relationship tools. Markdown is excluded from the gate by default, and `extensions.explore.readGate` can narrow the gated paths. Fatal per-file parser failures permit a fingerprinted fallback, while unavailable workers and unsupported files retain ordinary reads. Markdown headings locate their complete sections. Exact-name filters and `includePrivate` narrow or expand that surface. Attached documentation comments are omitted by default; `includeDocs` adds them without hiding annotations or attributes. Parenthesized numbers identify declarations for `symbol`. Its `signature` view omits documentation and bodies, `signatureWithDocs` adds attached documentation without the body, `declaration` returns exact source, and `declarationWithImports` adds required imports. Batches reject every result when one locator is stale; exact declarations can include surrounding lines. Installed packages support the AST tools on Apple Silicon Macs without requiring Rust or Cargo; other platforms retain the rest of Explore and receive no AST-first requirement. The AST tools remain registered and report the platform limit when invoked. These tools produce smaller model payloads and readable tool rows. Repeated `read` calls return unchanged markers or useful diffs when branch history proves the agent already saw the base content. A successful Tau patch can return a trusted cached complete-file diff without another structural attempt when the retained baseline and resulting fingerprint match. `/read-stats` shows cache savings plus AST gate and byte-flow totals for the current chat and whole session.
|
|
43
|
+
Structural source tools on in-process tree-sitter (WASM), available on every Node-supported platform. Registers `outline`, `show`, `discover`, `ast_search`, `deps`, `reverse_deps`, `callers`, `callees`, `references`, `implementations`, `impact`, and `context`; symbol targets use path + name (+ line when needed). Pi keeps `ls` / `find` / `grep` / `read`. Large full `read`/autoread of registered source (including Markdown) returns outline by default (`explore.read.*`); ranged `read` or `show` for bodies. Disable with `explore.read.enabled: false`.
|
|
46
44
|
|
|
47
45
|
## footer
|
|
48
46
|
|
|
@@ -94,7 +92,7 @@ Runs configured commands while keeping their output out of agent context when th
|
|
|
94
92
|
|
|
95
93
|
## soul
|
|
96
94
|
|
|
97
|
-
Adds
|
|
95
|
+
Adds two independently toggleable sections to Pi’s native assistant prompt: `ponytail` (a lazy-senior-dev build ethos) and `caveman` (a terse communication style). Both on by default.
|
|
98
96
|
|
|
99
97
|
## stash
|
|
100
98
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shanepadgett/tau-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Tau is a custom agentic harness built with pi extensions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -31,13 +31,15 @@
|
|
|
31
31
|
"themes/**/*",
|
|
32
32
|
"docs/**/*",
|
|
33
33
|
"schemas/**/*",
|
|
34
|
-
"native-bin/**/*",
|
|
35
34
|
"README.md"
|
|
36
35
|
],
|
|
37
36
|
"dependencies": {
|
|
38
|
-
"@
|
|
37
|
+
"@ast-grep/wasm": "0.45.0",
|
|
38
|
+
"@shanepadgett/tau-tui": "0.28.0",
|
|
39
|
+
"@vscode/tree-sitter-wasm": "0.3.1",
|
|
39
40
|
"image-size": "2.0.2",
|
|
40
|
-
"smol-toml": "1.7.0"
|
|
41
|
+
"smol-toml": "1.7.0",
|
|
42
|
+
"web-tree-sitter": "0.26.11"
|
|
41
43
|
},
|
|
42
44
|
"peerDependencies": {
|
|
43
45
|
"@earendil-works/pi-ai": "*",
|
package/schemas/tau.schema.json
CHANGED
|
@@ -88,38 +88,38 @@
|
|
|
88
88
|
},
|
|
89
89
|
"explore": {
|
|
90
90
|
"type": "object",
|
|
91
|
-
"required": [
|
|
92
|
-
"readGate"
|
|
93
|
-
],
|
|
94
91
|
"properties": {
|
|
95
|
-
"
|
|
92
|
+
"context": {
|
|
96
93
|
"type": "object",
|
|
97
|
-
"required": [
|
|
98
|
-
"includeGlobs",
|
|
99
|
-
"excludeGlobs"
|
|
100
|
-
],
|
|
101
94
|
"properties": {
|
|
102
|
-
"
|
|
103
|
-
"type": "
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
95
|
+
"defaultBudgetTokens": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"default": 8000,
|
|
98
|
+
"minimum": 1,
|
|
99
|
+
"description": "Default token budget for context when the caller omits budget."
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"additionalProperties": false
|
|
103
|
+
},
|
|
104
|
+
"read": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"enabled": {
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"default": true,
|
|
110
|
+
"description": "Master switch for Explore structural read overlay and large-source autoread outline path. When false, Pi read and autoread keep ordinary full bodies."
|
|
111
111
|
},
|
|
112
|
-
"
|
|
113
|
-
"type": "
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"description": "
|
|
112
|
+
"structureThresholdLines": {
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"default": 200,
|
|
115
|
+
"minimum": 1,
|
|
116
|
+
"description": "Registered source at or under this line count may be full-read. Above it, full read model-visible result is outline only."
|
|
117
|
+
},
|
|
118
|
+
"maxRangeLines": {
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"default": 200,
|
|
121
|
+
"minimum": 1,
|
|
122
|
+
"description": "Maximum lines returned by one ranged read on registered source."
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
"additionalProperties": false
|
|
@@ -274,10 +274,15 @@
|
|
|
274
274
|
"soul": {
|
|
275
275
|
"type": "object",
|
|
276
276
|
"properties": {
|
|
277
|
-
"
|
|
277
|
+
"ponytail": {
|
|
278
|
+
"type": "boolean",
|
|
279
|
+
"default": true,
|
|
280
|
+
"description": "Add the lazy-senior-dev build ethos to Tau's system prompt."
|
|
281
|
+
},
|
|
282
|
+
"caveman": {
|
|
278
283
|
"type": "boolean",
|
|
279
284
|
"default": true,
|
|
280
|
-
"description": "
|
|
285
|
+
"description": "Add the terse communication style to Tau's system prompt."
|
|
281
286
|
}
|
|
282
287
|
},
|
|
283
288
|
"additionalProperties": false
|