Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
952dd65
feat: symbol-addressed confirmed-target footer + qualified --section
sting8k Aug 11, 2026
57934c0
feat: symbol-first confirmed-target action hierarchy
sting8k Aug 11, 2026
7c23a6f
feat: add scope-aware Go owner call evidence
sting8k Aug 11, 2026
ffcd742
perf: compact owner call evidence rendering
sting8k Aug 11, 2026
14a9655
chore(release): prepare 1.6.0 owner evidence
sting8k Aug 11, 2026
de8246a
docs: specify output compaction grouping
sting8k Aug 11, 2026
2757744
chore: restore unreleased version metadata
sting8k Aug 11, 2026
e0771e1
feat: compact repeated output evidence
sting8k Aug 11, 2026
f79f3b1
docs: specify multilanguage owner attribution
sting8k Aug 11, 2026
7c812c6
feat: Python owner attribution with honest Go appendix gating
sting8k Aug 11, 2026
f7b6a55
fix(python): clippy -D warnings mechanical lints in owner adapter
sting8k Aug 11, 2026
8c79677
feat: Rust owner attribution with exact qualified identity (US-067 ph…
sting8k Aug 11, 2026
612bf60
feat(js): JavaScript owner attribution (US-067 phase 3)
sting8k Aug 11, 2026
7032310
feat(ts): TypeScript/TSX owner attribution (US-067 phase 3C)
sting8k Aug 11, 2026
8f706f9
test: add deterministic owner replay harness
sting8k Aug 11, 2026
4fdb1a7
test: cover mixed owner orchestration
sting8k Aug 12, 2026
ac73aa0
feat(java): Java owner attribution (US-068 wave 2A)
sting8k Aug 12, 2026
33c0d5f
feat(kotlin): Kotlin owner attribution (US-068 Wave 2A)
sting8k Aug 12, 2026
c63557b
feat(owners): add PHP owner attribution adapter (US-068 Wave 2A)
sting8k Aug 12, 2026
389ea3a
feat(csharp): C# owner attribution (US-068 Wave 2A)
sting8k Aug 12, 2026
9d5b8ae
feat(owners): wire PHP owner attribution
sting8k Aug 12, 2026
ef8bcad
test: add US-068 owner integration regressions
sting8k Aug 12, 2026
968d0c8
feat(search): advise on low-signal text terms
sting8k Aug 12, 2026
f302007
chore: exclude internal story records
sting8k Aug 12, 2026
b118426
test: expect normalized Windows owner paths
sting8k Aug 12, 2026
9bea199
chore(release): prepare 1.6.0
sting8k Aug 12, 2026
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
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

All notable changes to srcwalk are documented here.

## Unreleased
## [1.6.0] - 2026-08-12

### Added
- Default-on Go structural owner attribution and bounded mechanical call evidence for `discover --match any --as text`: compact file rollups include a narrowest-owner rollup (`owners (#N=Nth query term; *K=hits)`) and a `## Mechanical Go calls` appendix with capped (≤10), deterministically ordered, same-file `@:`-elided direct-call edges.

### Changed
- Go owner evidence is now emitted by default (no opt-in flag). It is navigation evidence only, not runtime order, dynamic dispatch, or an inferred chain; zero-edge owners abstain with an explicit caveat. Owner ranges are candidate exact reads, not relation or binding proof.

### Docs
- `skills/srcwalk/GUIDE.md` documents the owner rollup, the `[recv]`/`[local]`/`[bare]` edge labels, the `calls NAME` = call-expression-name honesty note, `@:` same-file elision, and the mechanical-filter/dynamic-dispatch caveat.

Known behavior: on very large monorepos, initial scope-narrowing may add extra navigation turns (srcwalk-general behavior, unrelated to owner evidence; observed in one eval3 run; tokens remained neutral-to-better).

## [1.5.0] - 2026-08-10

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "srcwalk"
version = "1.5.0"
version = "1.6.0"
edition = "2021"
description = "Tree-sitter indexed lookups — smart code reading for AI agents"
license = "MIT"
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,39 @@ source: text · kind: name occurrence · confidence: text evidence
```
</details>

<details>
<summary><b>Discover — Go owner rollup and mechanical call evidence</b></summary>

For compact Go `discover --as text --match any` output, matching file rows may include a narrowest-owner rollup and a bounded mechanical call appendix. Owner ranges are candidate exact reads (dereference them with `srcwalk show`), not runtime binding proof.

```
$ srcwalk discover "apply body,set body,connect body" --match any --as text --scope .
# Text OR: "apply body,set body,connect body" in . — 3 terms, 3 matches, 1 file
> Caveat: literal OR text evidence only; not semantic relation proof.

## Files ranked by term coverage
db.go — 3 terms, 3 shown matches
terms: apply body(1), connect body(1), set body(1)
hits: :4, :5, :6
owners (#N=Nth query term; *K=hits): DB.Apply:4-4[#1]; DB.Set:5-5[#2]; connect:6-6[#3]
windows: :4-6 terms=apply body(1), connect body(1), set body(1)
> Next: srcwalk show db.go --section 4-6 -C 10
> Caveat: hit-window proximity is literal navigation evidence, not semantic relation proof.

## Terms
apply body — 1/1 matches, 1 file
set body — 1/1 matches, 1 file
connect body — 1/1 matches, 1 file

## Mechanical Go calls [recv=same package-qualified receiver type; local=single-assignment constructor; calls NAME=call-expression name, not candidate binding; bare=same-package invocation]
- [recv] DB.Set calls Apply@db.go:5; candidate DB.Apply@:4-4

> Caveat: structural owner and mechanically filtered direct-call evidence only; not runtime order, dynamic dispatch, or an inferred chain.
```

`owners (#N...` attributes each matched line to its narrowest structural owner by original query-term position; `#N*K` means owner hit K times for query term N. `[recv]` marks a same package-qualified receiver type, `[local]` a single-assignment constructor local, and `[bare]` a same-package invocation. `calls NAME` names the call expression, not the candidate binding; `candidate ...@:` means the definition is in the same file as the call (cross-file candidates keep the repo-relative path). Owner ranges are navigation candidates, not relation or runtime proof.
</details>

<details>
<summary><b>Multi-hop caller BFS</b></summary>

Expand Down
2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "srcwalk",
"version": "1.5.0",
"version": "1.6.0",
"description": "Code-intelligence CLI for AI agents — tree-sitter outlines, symbol search, caller/callee graphs, deps, overview",
"bin": {
"srcwalk": "run.js"
Expand Down
22 changes: 11 additions & 11 deletions skills/srcwalk/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,18 @@ srcwalk discover 'foo,bar,baz' --match any --as text --scope <dir> # literal te

Use auto overview depth first; explicit `--depth N` is strict. Narrow `overview --symbols` shows inline `kind name@line-range` anchors when budget allows; broad auto overview may summarize areas/candidates and emit narrow-scope drilldowns.

Intent inference: path-like globs infer file discovery; punctuation/path comma lists infer literal Text OR; symbol globs stay symbol search. Add `--as symbol|file|text|access` when ambiguous. After a first pass, use `--expand=3`, `--filter kind:fn`, or `--exclude 'tests/**'` only when output is too broad. Regex-style queries are translated, not executed as regex: `foo\(` de-escapes to literal + symbol search, `a.*b` runs same-line ordered co-occurrence, `models\.json` behaves like `models.json`, and an unresolved path fragment like `packages/ai` lists matching relative paths (≤20). Each translation is labeled `interpreted as`; zero-match branches print a `> Try:` recovery line. Windows drive paths and `./`/`../` paths are never treated as regex.
Intent inference: path-like globs infer file discovery; punctuation/path comma lists infer literal Text OR; symbol globs stay symbol search. Add `--as symbol|file|text|access` when ambiguous. After a first pass, use `--expand=3`, `--filter kind:fn`, or `--exclude 'tests/**'` only when output is too broad. Regex-style queries are translated, not executed as regex: `foo\(` de-escapes to literal + symbol search, `a.*b` runs same-line ordered co-occurrence, `models\.json` behaves like `models.json`, and an unresolved path fragment like `packages/ai` lists matching relative paths (≤20). Each translation is labeled `interpreted as`; zero-match branches print a `> Try:` recovery line. Windows drive paths and `./`/`../` paths are never treated as regex. Text Search and Text OR may add a conditional `> Note:` when a term has at least 400 matches across at least 150 files and reaches at least 1.5% of eligible files; treat it as measured spread, then consider `overview`, a narrower term or scope, or a structural route when that spread was not intentional.

If `discover` prints `## Confirmed structural targets`, run the matching `srcwalk show <path>:<range>` first. Use `srcwalk context <target>` only when you need a Flow Map, scoped occurrences, or call neighborhood; do not run `context` for each hop just to read source.
If `discover` prints `## Confirmed structural targets`, run the printed `> Next:` command verbatim. It is symbol-addressed (`show <path> --section <symbol>`) when the selector round-trips to the exact body; a numeric `<path>:<start-end>` command is the safe fallback when ambiguity prevents a unique symbol selector. A numeric range shown beside a stable symbol is evidence metadata (a bounded preview), not the preferred body address. Use `srcwalk context <target>` only when you need a Flow Map, scoped occurrences, or call neighborhood; do not run `context` for each hop just to read source.

Symbol discovery separates parser-backed definitions from text-matched name occurrences. Repeated same-name definitions receive an ambiguity caveat. Text discovery remains literal evidence; `--match all` is same-file co-occurrence, not semantic relation proof.

For Go `discover --as text --match any`, matched lines may carry a structural owner rollup and a bounded mechanical call appendix:
- `owners (#N=...; *K=hits)` lists each matched line's narrowest structural owner by query-term position; the range is a candidate exact read (`srcwalk show`), not relation or runtime binding proof.
- Edge labels: `[recv]`=same package-qualified receiver type, `[local]`=single-assignment constructor local, `[bare]`=same-package invocation.
- `calls NAME` names the call expression, not the candidate binding; the candidate is a mechanically filtered definition candidate, not a proven binding.
- Edges are mechanically filtered direct-call navigation (absence does not rule out dynamic dispatch, DI, callbacks, or protocol wiring); `@:` = candidate in the same call file, cross-file keeps the repo-relative path. Capped, deterministically ordered; zero-edge owners abstain with an explicit caveat.

### Understand one target or read exact evidence

Use `show` for known bodies and citations. Use `context` when the task needs a rich local packet such as Flow Map, scoped occurrences, or call neighborhood. Exact path/range contexts may include bounded `Source Evidence`; `show` `Source frame` lines orient exact numeric reads and numeric `--section` blocks, not relation proof.
Expand All @@ -89,27 +95,23 @@ Do not pass a bare file to `context`; use `show` or root reads. `context` accept

### Trace calls

Use `trace callers` for upstream call sites and `trace callees` for downstream calls. Do not grep `foo(` for relation claims. Long result lists collapse to the top entries plus a `+N more → <command>` pointer, and wide evidence ranges may appear as an anchor plus an `expand: <command>` line. These pointer lines are exact commands: run them verbatim when you need the remaining items or the full range. Nothing is dropped — collapsed items are always one command away.
Use `trace callers` for upstream call sites and `trace callees` for downstream calls. Do not grep `foo(` for relation claims. Long result lists collapse to the top entries plus a `+N more → <command>` pointer, and wide evidence ranges may appear as an anchor plus an `expand: <command>` line. These pointer lines are exact commands: run them verbatim when you need the remaining items or the full range. Nothing is dropped — collapsed items are always one command away. Drill down with exact call-site reads or `context` on a caller/callee.

```bash
srcwalk trace callers <symbol> --scope <dir>
srcwalk trace callees <symbol> --detailed --scope <dir>
srcwalk trace callees <symbol> --depth 2 --scope <dir>
```

Drill down with exact call-site reads or `context` on a caller/callee.

### Inspect file coupling

Use `deps` for imports, links/assets, local symbol deps, and dependents. Run it before file moves, deletes, or coupling explanations. For JS/TS/TSX, alias-derived edges marked `(via tsconfig paths)` are config-derived static evidence, not runtime proof, and `Uses (unresolved local-looking)` lists local-looking specifiers (`./`, `../`, `@/`, `~/`) that resolve to no existing file — known-missing local references, not external packages.
Use `deps` for imports, links/assets, local symbol deps, and dependents. Run it before file moves, deletes, or coupling explanations. Do not grep import/use/require/link tags for dependency claims. For JS/TS/TSX, alias-derived edges marked `(via tsconfig paths)` are config-derived static evidence, not runtime proof, and `Uses (unresolved local-looking)` lists local-looking specifiers (`./`, `../`, `@/`, `~/`) that resolve to no existing file — known-missing local references, not external packages.

```bash
srcwalk deps <file>
srcwalk context <related-symbol> --scope <dir>
```

Do not grep import/use/require/link tags for dependency claims.

### Assess and review changes

`assess` is blast-radius triage; verify risky results with `trace callers` or `deps`. `review` composes changed evidence with bounded Flow Maps for changed function-like symbols.
Expand All @@ -133,14 +135,12 @@ srcwalk compare <symbol-a> <symbol-b> --scope <dir>

### Confirm raw text or filesystem metadata

Use `rg` for raw regex and regex flags; srcwalk translates common regex-style queries into literal/co-occurrence searches but never runs a regex engine. srcwalk text discovery is literal evidence plus navigation context. Use shell `find`/`fd` only for filesystem metadata: permissions, mtimes, empty dirs, symlinks, binary assets, generated outputs, cleanup lists.
Use `rg` for raw regex and regex flags; srcwalk translates common regex-style queries into literal/co-occurrence searches but never runs a regex engine. srcwalk text discovery is literal evidence plus navigation context. Use shell `find`/`fd` only for filesystem metadata: permissions, mtimes, empty dirs, symlinks, binary assets, generated outputs, cleanup lists. Do not infer definitions, usages, callers, deps, or code paths from shell path lists, or convert identifiers into paths without evidence.

```bash
rg '<regex>' <dir>
```

Do not infer definitions, usages, callers, deps, or code paths from shell path lists. Do not convert identifiers into paths without evidence.

## Artifact and language support

Exact artifact reads/scopes may auto-enable artifact mode. Use `--artifact` for broad generated, bundled, minified, or binary-like traversal. Prefer exact footer commands. Artifact output is byte-span evidence only.
Expand Down
Loading
Loading