@flyingrobots/footprint 0.0.0-stage → 0.6.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/CHANGELOG.md ADDED
@@ -0,0 +1,436 @@
1
+ # Changelog
2
+
3
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versioning is
4
+ [SemVer](https://semver.org/). Pre-1.0: anything may change between minor versions.
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.6.0] — 2026-11-23
9
+
10
+ ### Added
11
+
12
+ - **One Footprint comment per pull request** (flyingrobots/footprint#59). `footprint comment <pr>
13
+ --report <file> --change <text> --reason <text> [--remarks <text>]` posts a `--human` report as
14
+ the pull request's one Footprint comment:
15
+ - it finds the comment whose first line is the hidden marker `<!-- footprint:report -->`, written
16
+ by the current `gh` user, and edits it in place; failing that it adopts the most recent
17
+ comment by that user beginning `## Footprint`, and says so in the row's Remarks; failing that
18
+ it creates one;
19
+ - it never edits another user's comment: a marked comment by someone else is
20
+ `comment.other_author`, and nothing is written;
21
+ - every earlier row of the **Changelog** at the comment's foot is carried over verbatim, and one
22
+ row is appended: UTC timestamp, the head's 7-character SHA, Change, Reason, Remarks, with `|`
23
+ escaped and newlines as `<br>`;
24
+ - the comment stays within 65536 characters: when the Changelog does not fit, the newest rows are
25
+ kept and the comment states how many older rows were dropped, across runs;
26
+ - a new result type, **`footprint.comment` 1.0.0** (`schemas/footprint.comment.schema.json`);
27
+ `--dry-run` writes nothing.
28
+ - **`--impact <file>`**: the posting agent's reading of the call sites, one JSON object per line
29
+ (`{symbol, system, file?, impact, dataFlow}`), rendered as **Impact** and **Data flow** columns
30
+ in every call-site table of `--human`, `not assessed` where no entry covers a row, and labelled
31
+ as the agent's reading rather than footprint's measurement. No result line carries it. An
32
+ invalid file is `impact.invalid`; an entry that matches no row is an `impact.unmatched` warning.
33
+ - **`--max-chars <n>`** (40960 to 65536) bounds `--human` below GitHub's 65536, so the Changelog
34
+ has room beside the report; the skill uses 57344.
35
+
36
+ ### Changed
37
+
38
+ - **The skill** (`skills/footprint/SKILL.md`) posts with `footprint comment` instead of `gh pr
39
+ comment`, runs the report at `--max-chars 57344`, has the agent assess the call sites for
40
+ `--impact` proportionately, and says what to write in Change, Reason and Remarks. Reinstall it.
41
+ - An unknown flag, a flag without its value, or a second range is now `args.invalid` (exit 2);
42
+ before, an unknown flag was ignored and a flag's value could be read as the range.
43
+ - `footprint --help` still describes the default command; `footprint comment --help` describes the
44
+ new one, and `--schema` both.
45
+
46
+ ## [0.5.0] — 2026-11-23
47
+
48
+ ### Added
49
+
50
+ - **Symbol-level overlap for pull requests whose commits are not in the local clone**
51
+ (flyingrobots/footprint#55). A pull request whose head or base commit is absent locally, as a
52
+ fork's head is in CI, was always `undetermined` with `git.head_missing`. It is now read over
53
+ read-only `gh api` calls pinned to exact commit ids, and never fetched (`git fetch` writes to
54
+ `.git`; footprint declares no writes):
55
+ - `gh api repos/{owner}/{repo}/compare/<baseRefOid>...<headRefOid>` gives the merge base
56
+ (`merge_base_commit.sha`) and each file's patch from that merge base to the head, the same
57
+ comparison `git diff` makes locally. `gh pr diff` is not used: it diffs against the pull
58
+ request's current merge base, which can differ from the pinned one;
59
+ - the file's content at the merge base and at the head comes from
60
+ `gh api -H 'Accept: application/vnd.github.raw' repos/{owner}/{repo}/contents/<path>?ref=<sha>`,
61
+ each path segment percent-encoded;
62
+ - nothing is sent but full commit ids and the file's own path, and every call is a GET;
63
+ - bounded like the outline calls: at most 32 calls per run (`REMOTE_BUDGET`), each stopped after
64
+ 20 seconds (`REMOTE_TIMEOUT_MS`), contents over 1 MiB not read, and no call after a rate limit;
65
+ - the rule of 0.4.1 holds: a merge base the compare does not state as a commit id, a file with
66
+ no patch or renamed, a file the compare did not list, a failed, timed-out or rate-limited call,
67
+ and a head that moved or a base `gh` did not report all leave the file `undetermined` with the
68
+ reason, never `symbol-disjoint`.
69
+ - `--human` marks a file whose side was read over the API, and the overlap section counts the
70
+ calls.
71
+
72
+ ### Changed
73
+
74
+ - **`footprint.overlap` 2.2.0.** Additive. `symbolLevel.files[].github` (`["a"]`, `["b"]` or both)
75
+ names the sides read over the GitHub API; the undetermined `code` enum gains `gh.remote_failed`,
76
+ `gh.rate_limited`, `gh.timeout`, `gh.budget_spent`, `gh.compare_unpinned`,
77
+ `gh.compare_incomplete`, `gh.patch_unavailable` and `gh.content_too_large`; `symbolAnalysis`
78
+ gains `remoteCalls`, `remoteBudget` and `remoteTimeoutMs`.
79
+ - The second side of a shared file is not resolved once the first is undetermined, so a pair
80
+ already undetermined spends no `gh api` call.
81
+
82
+ ## [0.4.1] — 2026-11-22
83
+
84
+ ### Fixed
85
+
86
+ - **Symbol-level overlap no longer calls an edge `symbol-disjoint` when the comparison is not
87
+ exact.** Fourteen review claims on flyingrobots/footprint#54, each reproduced with a failing test
88
+ or refuted. When the analysis cannot be tied to exact commits or exact content, the file is now
89
+ `undetermined` with the reason (flyingrobots/footprint#56):
90
+ - a pull request's merge base is taken against the base commit `gh` reports (`baseRefOid`),
91
+ never a local branch tip, which on a fork could already hold the head and make the diff empty.
92
+ An unreported base is `gh.base_unknown`; a base commit that is not local is `git.base_missing`;
93
+ - `gh pr list` runs again after the file lists, and a pull request whose head commit moved is
94
+ `gh.head_moved`;
95
+ - a file listed as changed whose own diff changes no line of it is `symbols.file_unchanged`;
96
+ - the range's two ends are pinned to commit ids before any section reads them, so a branch that
97
+ advances during the `gh` calls is not read once for the files and again for the symbols;
98
+ - the attribution diff reads raw content (`--no-textconv`) and takes the path root-relative and
99
+ literally (`:(top,literal)`, `--no-relative`), so a textconv driver, a run from a subdirectory
100
+ or a `[` in a file name cannot empty or merge its hunks;
101
+ - a whitespace-only line inside a symbol's span is attributed to that symbol;
102
+ - outlines are cached by blob and path, since graft picks the grammar by the path;
103
+ - valid JSON of the wrong shape from `graft read outline` is `graft.outline_unreadable`, not a
104
+ throw that cost every edge its symbol level;
105
+ - the outline timeout covers reading graft's output, not only its exit;
106
+ - a pair with one side already undetermined spends no outline call;
107
+ - a failure to remove the outline directory is a `symbols.cleanup_failed` warning, not an
108
+ uncaught exception that lost the overlap result.
109
+ - The `docs/topics/overlap` reference describes wave 1 as a plan, not a promise that its pull
110
+ requests merge in any order.
111
+ - `test/symbols.test.ts` skips its real-graft cases by name when graft does not resolve (and runs
112
+ them under `FOOTPRINT_REQUIRE_GRAFT=1`, as CI does), removes the directories it makes, and links
113
+ `git` and `node` into its stand-in PATH instead of wrapping them in a shell script that split a
114
+ path holding a space.
115
+ - `package-lock.json` names the package version again; it had been left at 0.3.3.
116
+
117
+ ### Changed
118
+
119
+ - **`footprint.overlap` 2.1.0.** The undetermined `code` enum gains `gh.head_moved`,
120
+ `gh.base_unknown` and `symbols.file_unchanged`. `gh pr list` also asks for `baseRefOid`.
121
+ (flyingrobots/footprint#56)
122
+
123
+ ## [0.4.0] — 2026-11-22
124
+
125
+ ### Added
126
+
127
+ - **Symbol-level overlap between open pull requests.** A file shared by two open pull requests
128
+ (or by this change and an open pull request) is now compared symbol by symbol. Each side's
129
+ changed lines, from `git diff -U0` against its own merge base, are attributed to the top-level
130
+ symbols in `graft read outline`'s jump table: removed lines at the merge base, added lines at the
131
+ head. A rename is therefore never read as disjoint from an edit to the old name. The file is
132
+ reported as `symbol-disjoint` with each side's symbols named, as `symbol-overlapping` with the
133
+ shared symbols named, or as `undetermined` with a stable code and a reason (graft absent, no
134
+ grammar, timeout, budget spent, head commit not local, and others). The analysis covers only the
135
+ shared files of pairs that share a file. It is limited to 24 outline calls per run, cached by
136
+ blob, with a 20-second timeout on each. `--human` names the symbols in nested lines under each
137
+ shared file, inside the overlap section's budget. On flyingrobots/taskalisk#21 against #19 it
138
+ reports `tests/test_taskalisk.py` as different symbols (`CrossRepositoryPRs` against
139
+ `Mutation`, `Parsing`, `Trust`) and `taskalisk.py` as the same symbols
140
+ (`collect_frontmatter_dag`, `compile_from_github`). (flyingrobots/footprint#33)
141
+
142
+ ### Changed
143
+
144
+ - **`footprint.overlap` 2.0.0.** `overlapping[]` and `conflicts[]` carry a required `symbolLevel`,
145
+ and the result carries `symbolAnalysis`. An edge's `reason` now states its symbol level. A
146
+ **symbol-disjoint edge no longer separates waves**, so two pull requests in one wave may share a
147
+ file. That breaks 1.0.0's waves invariant, which is why this is a major version of the message
148
+ schema. Overlapping and undetermined edges separate waves as before. `gh pr list` also asks for
149
+ `baseRefName`, the branch each pull request's merge base is taken against.
150
+ (flyingrobots/footprint#33)
151
+
152
+ ## [0.3.3] — 2026-11-22
153
+
154
+ ### Fixed
155
+
156
+ - **The `--human` report always fits one GitHub comment.** On flyingrobots/taskalisk#71 it was
157
+ 284007 characters and GitHub refused it at 65536. It is now bounded to 65536 characters in total:
158
+ the `Files` list, the exported-symbols table, each system's call-site table, the lists of symbols
159
+ with no call site, and the overlap section are cut to a limit, and each cut says how many entries
160
+ it left out and that the result line carries every one; if the report is still too long the larger
161
+ table is halved until it fits, deterministically. A symbol with more than 50 call sites (the
162
+ fields of a JSON Schema file, such as `type` and `id`, were the cause) is summarised as a count per
163
+ system instead of a row per site. footprint still scans for those names and still records every
164
+ site. The same range now renders at 54368 characters. The JSON Lines records are unchanged and not
165
+ bounded. The landing section, the formatting-labelled paths and the per-symbol remainder notes are
166
+ bounded too, and a last-resort clamp on every section makes the total bound hold for any input,
167
+ stating what it cut. (flyingrobots/footprint#51)
168
+
169
+ ## [0.3.2] — 2026-11-22
170
+
171
+ ### Fixed
172
+
173
+ - **The structural section compares a three-dot range from the merge base.** `footprint
174
+ origin/main...origin/branch` handed `graft struct review` the base ref itself, `origin/main`'s
175
+ tip, while the composition and exports sections used the merge base. Every symbol the default
176
+ branch gained after the branch was cut was reported as removed by the branch and as a breaking
177
+ change (35 of them on a one-file test change in flyingrobots/school). graft is now given the
178
+ merge base, from the same `rangeBase` the exports section uses, so the three sections compare
179
+ one range. A two-dot range, which was split on `...` and so handed graft the whole range as one
180
+ ref, is now compared from its written base. A range with no merge base states the limitation
181
+ as a `graft.review_failed` warning. No schema moved. (flyingrobots/footprint#39)
182
+
183
+ - **Markdown under `spec/` is documentation, not test.** The `spec/` directory rule, meant for
184
+ RSpec-style test code, classified a specification repository's prose (`spec/parley-v0.2.md`) as
185
+ `test`. A documentation extension under `spec/` is now `docs`; code and fixtures there stay
186
+ `test`. No schema changed; compositions of such repositories shift from `test` to `docs`.
187
+ (flyingrobots/footprint#42)
188
+
189
+ - **The release page no longer says the npm and GitHub tarballs are the same bytes.** They hold
190
+ the same files, but different npm versions gzip them differently: for `v0.3.1` the release
191
+ asset's SHA-256 is `46f614f3...` and `npm pack` of the same tree under npm 11.20.0 gives
192
+ `8c91dd6d...`, with `diff -r` of the unpacked contents empty. The page now says what is
193
+ guaranteed and how to verify contents by comparing a file list and per-file digests, with the
194
+ captured comparison. (flyingrobots/footprint#47)
195
+
196
+ - **The Structural line names graft as the source of its `formatting` reading.** It read "1
197
+ formatting-only" for a change whose only edit was a new entry in a rule table, as if footprint
198
+ had judged the change cosmetic. graft's own `struct review --json` labels such a file
199
+ `formatting` (reproduced on flyingrobots/footprint#43's range with graft 0.14.0), so the label is
200
+ graft's; the line now reads "as `graft struct review` reads it", says "labelled `formatting`",
201
+ and lists each such file beneath it with a note that the label is graft's and that a changed
202
+ value inside an existing symbol can carry it. The wording is the only change; no schema moved.
203
+ graft's side is flyingrobots/graft#276. (flyingrobots/footprint#44)
204
+
205
+ ## [0.3.1] — 2026-11-22
206
+
207
+ Fixes found by the first real use of 0.3.0 and the footprint skill. **Publish this, not 0.3.0**:
208
+ 0.3.0 as tagged would publish without its `bin`. No schema changed: `footprint.composition` 1.0.0,
209
+ `footprint.landing` 1.0.0, `footprint.blast_radius` 1.1.0 and `footprint.overlap` 1.0.0 are as
210
+ 0.3.0 shipped them. Two classification changes move composition shares: licence files and agent
211
+ skills are no longer counted as `source` and `docs` respectively. Reinstall the skill.
212
+
213
+ ### Added
214
+
215
+ - **The release fails on a manifest npm would correct.** `scripts/manifest-check.ts`, run as the
216
+ `sanity` job's last step with the npm the `publish` job uses, fails when `npm pkg fix` would
217
+ change any field or `npm publish --dry-run` reports a correction. See
218
+ [`docs/workflows/release/README.md`](docs/workflows/release/README.md#the-manifest-npm-publishes).
219
+ (flyingrobots/footprint#35)
220
+
221
+ ### Fixed
222
+
223
+ - **A change to an agent skill is not documentation only.** Markdown under a `skills/` path
224
+ component, and any `SKILL.md`, classified as `docs`, so a skill-only change read "Documentation
225
+ only" and the landing plan set aside the after-merge steps, including this repository's own
226
+ "reinstall the skill". They now classify as `config`, which changes no schema; compositions of
227
+ changes to skills shift from `docs` to `config`. (flyingrobots/footprint#34)
228
+ - **Licence files are docs.** `LICENSE`, `LICENSE.*`, `NOTICE` and `COPYING`, at any depth, fell
229
+ through to `source`, so a change adding them inflated the source share and reported them as
230
+ "changed files in unanalysed language: `(none)`". They now classify as `docs`; a composition
231
+ that includes one shifts accordingly. (flyingrobots/footprint#36)
232
+ - **The skill's commands run in zsh.** `skills/footprint/SKILL.md` set `FP="bun …/src/cli.ts"` and
233
+ ran `$FP …`, which zsh, the macOS default shell, does not word-split, so the command failed with
234
+ exit 127. It now defines a shell function, `fp() { bun "$SCRATCH/footprint/src/cli.ts" "$@"; }`
235
+ (or `bunx` once published), which bash and zsh call the same way; `test/skill.test.ts` runs the
236
+ skill's step 3 verbatim under both. CI installs `zsh` for it. Reinstall the skill.
237
+ (flyingrobots/footprint#37)
238
+ - **`bin.footprint` survives `npm publish`.** It was written `./src/cli.ts`, a form npm's
239
+ publish-time normalization removes ("script name src/cli.ts was invalid and removed"), so 0.3.0
240
+ as tagged would have published with no command and `bunx @flyingrobots/footprint` would have
241
+ found nothing. It is now `src/cli.ts`. Do not publish 0.3.0. (flyingrobots/footprint#35)
242
+
243
+ ## [0.3.0] — 2026-11-22
244
+
245
+ The first release to carry the landing plan, the blast radius and the cross-pull-request overlap.
246
+ **After this release no footprint schema is a draft**: `footprint.composition` 1.0.0,
247
+ `footprint.landing` 1.0.0, `footprint.blast_radius` 1.1.0 and `footprint.overlap` 1.0.0 have all
248
+ shipped, so a change to any of them is a new version of that schema, recorded under `### Schemas`,
249
+ rather than an edit to the entry below (spec §4.5).
250
+
251
+ ### Added
252
+
253
+ - **A release workflow.** `.github/workflows/release.yml` runs on a tag `vX.Y.Z`: a `sanity` job
254
+ refuses a tag that differs from `package.json`'s `version` or has no dated changelog heading,
255
+ checks the manifest's publishing fields, runs the gate and dry-runs the pack; a `release` job
256
+ creates the GitHub release with this section as its notes and the tarball plus `SHA256SUMS`
257
+ attached; a `publish` job, in the GitHub environment `npm`, publishes with OIDC provenance
258
+ through npm trusted publishing, with no token in the repository. The first publish of the package
259
+ is manual. See [`docs/workflows/release/README.md`](docs/workflows/release/README.md).
260
+ (flyingrobots/footprint#30)
261
+ - **`RELEASE.md`**, the after-merge steps in the form footprint's landing plan reads, so footprint
262
+ run on a change to this repository reports its own landing steps. `test/release.test.ts` holds it
263
+ to that form, and checks that the manifest version has a dated heading here. (flyingrobots/footprint#30)
264
+ - **The `footprint` agent skill**, `skills/footprint/SKILL.md`: on an open pull request, run
265
+ footprint over its range, post the `--human` report as a comment, and act on what it lists
266
+ before and after the merge, without reading it as a verdict. See
267
+ [`docs/topics/agent-skill/README.md`](docs/topics/agent-skill/README.md). (flyingrobots/footprint#30)
268
+ - `package.json` carries `files`, `engines`, `publishConfig`, `homepage` and `bugs`, so the npm
269
+ package ships the source, the schemas and the skill and nothing else.
270
+ - A measured wall-time bound for the call-site scan on a large repository: 4,823 tracked files,
271
+ 169 changed files, 142 changed symbols, 7,735 call sites, median 38.72s over three runs. See
272
+ [Performance](docs/topics/blast-radius/README.md#performance). (flyingrobots/footprint#13)
273
+ - CI: a GitHub Actions workflow (`.github/workflows/ci.yml`) runs `bun install --frozen-lockfile`
274
+ and `bun test` on every push to `main` and on every pull request. See
275
+ [`docs/workflows/ci/README.md`](docs/workflows/ci/README.md). (flyingrobots/footprint#22)
276
+ - **CI proves graft answered, rather than merely installed.** `test/require-graft.test.ts` asserts
277
+ `footprint.blast_radius`'s `exports.available` over a real range of this repository, naming graft
278
+ and the reason it carried when that fails — but only when `FOOTPRINT_REQUIRE_GRAFT=1` is set, so
279
+ a local run without it still passes. The workflow sets the variable, plus `GIT_AUTHOR_NAME`,
280
+ `GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_NAME` and `GIT_COMMITTER_EMAIL`: graft writes its own lazy WARP
281
+ index as git objects, through git-plumbing that strips `HOME` from the environment it hands its
282
+ own git subprocesses, so without an identity in one of those four variables `git commit-tree`
283
+ exited 128 on `ubuntu-latest` and every graft-backed assertion took its "unavailable" branch
284
+ while the suite read green. See [`docs/workflows/ci/README.md`](docs/workflows/ci/README.md).
285
+ (flyingrobots/footprint#25)
286
+ - A second result in the same run, `footprint.landing` 1.0.0
287
+ (`schemas/footprint.landing.schema.json`), and two `--human` sections, **Before merge** and
288
+ **After merge**. The after-merge steps are read out of the repository's own `RELEASE.md` and
289
+ `AGENTS.md` — list items under a heading that names the landing process — and each cites the
290
+ file and heading it came from; where neither document declares any, the result states that
291
+ fallback rather than inventing steps, and where the change touches no executable surface it says
292
+ "nothing to do after merge" plainly. Before merge reports what the changed-file list shows:
293
+ migrations with their ordering constraint, generated files, a manifest changed with no lockfile
294
+ beside it, and a loud warning when the diff changes source and no changed file is a migration, a
295
+ flag, or a version or changelog entry. The guard rule is documented path patterns, never a
296
+ judgement: [`docs/topics/landing/README.md`](docs/topics/landing/README.md).
297
+ (flyingrobots/footprint#3)
298
+ - **Blast radius: the export-surface diff.** A third result line per run,
299
+ `footprint.blast_radius` (`schemas/footprint.blast_radius.schema.json`), emitted after the
300
+ landing plan, listing the exported symbols the change added, removed and signature-changed,
301
+ each with its file and name. `--human` gains a `## Blast radius` section. The facts come from
302
+ graft's CLI contract `graft struct exports <base-ref> <head-ref> --json`, bound to `_schema`
303
+ `graft.cli.struct_exports` 1.0.0; a three-dot range is compared from the merge base. When graft
304
+ is absent, fails, or answers under another contract version, the result carries
305
+ `exports.available: false` with a `reason` — the section is stated, never omitted — and a
306
+ `graft.exports_failed` warning is emitted when graft resolved but could not be read.
307
+ (flyingrobots/footprint#9)
308
+ - **1.1.0** (still unreleased, so recorded in this same entry rather than a new one): a required
309
+ `unanalysed_languages` field names the changed source files, by extension with a count, in
310
+ languages footprint does not recognise as one graft's grammars can parse — present and empty
311
+ when every changed file was in a supported language, never omitted. Independent of `exports`:
312
+ a parse failure in a *supported* language is never counted, because detection is extension-only
313
+ and never looks at whether graft ran or what it returned. `--human`'s `## Blast radius` section
314
+ states it alongside the symbol list. (flyingrobots/footprint#12)
315
+ - `docs/topics/blast-radius/README.md`: what the export-surface diff lists, which graft contract it
316
+ comes from, and the two failure modes it inherits (re-exports read as changes, dynamic dispatch
317
+ invisible).
318
+ - **Call sites for each changed symbol, with file and line.** Every symbol on the blast radius
319
+ carries `call_sites`, each a `{ file, line }`; a symbol nothing references is listed with an
320
+ empty list rather than dropped. `exports.call_site_scan` says how they were found and
321
+ `counts.call_sites` adds them up, and the `## Blast radius` section of `--human` gains a
322
+ **Call sites** column and a collapsed `file:line` list per symbol. These are footprint's own,
323
+ not graft's: no graft CLI contract answers with a call site's *line* — `symbol blame --json`
324
+ carries a `referenceCount` and no per-reference list, and `struct review`, `symbol difficulty`
325
+ and `struct test-coverage` carry referencing file paths only. So the rule is the most
326
+ conservative one an independent oracle can check: every whole-word occurrence of the name in the
327
+ tracked, non-binary files of the working tree, `grep -w`'s boundary — a letter, digit or
328
+ underscore in any script, which a differential fuzz against real grep proved had to be Unicode
329
+ rather than ASCII. It counts the declaration, comments, strings and prose, and misses dynamic dispatch and a re-export under another name;
330
+ both limits are stated in the result, in the schema and under the list in the comment. A binary
331
+ file is skipped exactly as `grep -I` skips it and a tracked file no longer on disk is counted,
332
+ not fatal; a scan that could not run is `call_site_scan.available: false` with a reason and a
333
+ `callsites.scan_failed` warning, and then no symbol carries `call_sites` at all.
334
+ (flyingrobots/footprint#10)
335
+ - **Call sites grouped by system, with a mitigation on every row.** Each call site now names the
336
+ `system` containing it and carries a `mitigation` and the `mitigation_basis` that derived it, and
337
+ `exports.call_site_systems` names the grouping rule, the mitigation derivation and every system
338
+ with its call-site count — counts that sum to `counts.call_sites`. `--human`'s `## Blast radius`
339
+ section renders one Markdown table per system, `| Symbol | Call site | Mitigation |`.
340
+ A **system** is the first path segment of a call site's repository-relative path, the directory
341
+ immediately under the repository root; a file at the repository root is grouped under
342
+ `(unassigned)`, which is named and listed last rather than dropped. A **mitigation** is one of
343
+ exactly three sentences, chosen by two reported facts and nothing else — whether the call site is
344
+ in the very file the symbol is exported from, and what `classify()` calls that file: `None
345
+ needed` for the declaring file or a test file, otherwise the system it is in, or that it is
346
+ outside every known system. It is never a judgement about importance, risk or coverage and never
347
+ advice, because footprint reports and does not judge (`AGENTS.md`); the guard is a test that
348
+ matches every mitigation of the real Definition-of-Done run against an allowlist of those three
349
+ forms, declared in the test rather than imported from `src/`. A scan that did not run carries no
350
+ grouping at all, so an absent grouping can never be read as a change that reaches no system.
351
+ **Still on the unreleased 1.1.0 draft rather than the 1.2.0 the issue proposed**: 1.1.0 has never
352
+ been in a release, so `AGENTS.md`'s rule (spec §4.5) is to record the change in this entry rather
353
+ than cut a second unreleased version. (flyingrobots/footprint#11)
354
+ - `test/languages-drift.test.ts`: checks `src/languages.ts`'s hand-mirrored extension list against
355
+ the extensions the *installed* `@flyingrobots/graft` actually recognises, by reading its
356
+ `dist/parser/lang.js` from disk and running footprint's extensions through its own `detectLang`.
357
+ Fails loudly, naming the path, if that module moves or no longer exports what the test depends
358
+ on, rather than skipping. (flyingrobots/footprint#21)
359
+ - **Cross-pull-request overlap.** A fourth result in the same run, `footprint.overlap` 1.0.0
360
+ (`schemas/footprint.overlap.schema.json`), emitted after the blast radius: the open pull requests
361
+ that change a file this change changes, named by number and title; the conflict graph between the
362
+ open pull requests, with the shared files and a reason for every edge; and a proposed merge order
363
+ as waves, where no two pull requests in a wave share a file. `--human` renders it as an
364
+ `### Open pull requests` section. (flyingrobots/footprint#1)
365
+ - The open pull requests come from `gh pr list --json` and their files from
366
+ `gh pr diff --name-only`; the pull request under review is the one whose head commit is the
367
+ range's head commit (falling back to a same-repository head branch name), reported in `self`
368
+ (null when none) and excluded from the overlap and its count while staying in the waves, so a
369
+ report on an open pull request no longer lists it against itself. (flyingrobots/footprint#29) When `gh` is absent,
370
+ unauthenticated, rate-limited, without a GitHub remote, or returns unreadable JSON, the result
371
+ carries `available: false` with a stable code and `gh`'s own message, and the run still exits 0.
372
+ A pull request whose files `gh` would not report is `undetermined` rather than assumed disjoint;
373
+ a list that came back at the limit sets `truncated`.
374
+ - [`docs/topics/overlap/README.md`](docs/topics/overlap/README.md): the conflict graph, the merge
375
+ waves, and why the greedy grouping is a reimplementation of graft's `findParallelGroups` rather
376
+ than an import.
377
+
378
+ ### Fixed
379
+
380
+ - `package-lock.json` was stale since 0.1.0: it named version 0.1.0 and lacked
381
+ `@flyingrobots/parley-emit`. Regenerated.
382
+
383
+ ### Changed
384
+
385
+ - The `--human` comment says where each severity statement comes from: "breaking change(s), as
386
+ `graft struct review` lists them" and "`graft struct exports` reads this as a minor change", so
387
+ the two cannot read as a contradiction. footprint reports both and picks neither.
388
+ (flyingrobots/footprint#29)
389
+
390
+ ### Decided
391
+
392
+ - footprint#2's call-site/structural analysis depends on graft's **CLI JSON contract**, not a
393
+ library import: `struct review --json` (`graft.cli.struct_review` 2.0.0, already wired),
394
+ `struct exports --json` (`graft.cli.struct_exports` 1.0.0), `struct diff --json`
395
+ (`graft.cli.struct_diff` 2.0.0), and `symbol blame --json` (`graft.cli.symbol_blame` 1.0.0).
396
+ Rejected: graft's MCP tools (ruled out by footprint#2 §2a — the agent must not be in the
397
+ computation path) and waiting on a library barrel graft does not export today (its installed
398
+ `exports` map resolves only `"."`, and the capability thought to require one,
399
+ export-surface diffing, is already reachable as `struct exports`). (flyingrobots/footprint#8)
400
+
401
+ ### Schemas
402
+
403
+ - `footprint.blast_radius` **1.0.0 → 1.1.0**, additive: `call_sites` on every symbol of `added`,
404
+ `removed` and `signature_changed`; `exports.call_site_scan`; `counts.call_sites`. When
405
+ `call_site_scan.available` is true the schema *requires* `call_sites` on every listed symbol, so
406
+ "listed with an empty list, not dropped" is structural rather than a convention. A consumer
407
+ pinned to 1.0.0 keeps reading every field it already read. (flyingrobots/footprint#10)
408
+
409
+ ## [0.2.0] — 2026-11-22
410
+
411
+ ### Changed
412
+
413
+ - **Breaking.** The default output is JSON Lines on stdout and stderr, through
414
+ `@flyingrobots/parley-emit` (the Parley output protocol, spec v0.2): a bootstrap line, one
415
+ `footprint.composition` 1.0.0 result, an `end` line; structured errors on stderr; a receipt per
416
+ run under `.parley/receipts/`. The Markdown comment is `--human`. Pipelines that posted the
417
+ default output to a pull request need `--human`. (flyingrobots/footprint#4)
418
+ - "No changes" is a result with zero files; a failing `git diff` is a `git.diff_failed` error and
419
+ exit 2; a missing default branch is `base.not_found`.
420
+
421
+ ### Added
422
+
423
+ - `schemas/footprint.composition.schema.json`, validated against real output in `test/cli.test.ts`.
424
+ - `--help` and `--schema` as runs that describe the tool.
425
+ - The receipt head's resolved interpretation carries the range after the default base, both
426
+ commit ids and the graft setting, so `inv` identifies the comparison of two trees rather than
427
+ the arguments alone.
428
+
429
+ ## [0.1.0] — 2026-11-22
430
+
431
+ ### Added
432
+
433
+ - Composition report: file and line counts by category, a mermaid pie, a gut check, and a
434
+ collapsed file listing. Every figure computed from `git diff --numstat`.
435
+ - `src/classify.ts`: ordered, first-match-wins classification into `source`, `test`, `docs`,
436
+ `config`, `ci`, `generated`, `assets`.
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 James Ross
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
package/NOTICE ADDED
@@ -0,0 +1,14 @@
1
+ footprint
2
+ Copyright 2026 James Ross
3
+
4
+ This product includes software developed by James Ross (https://github.com/flyingrobots).
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
7
+ file except in compliance with the License. You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ ---
12
+
13
+ Optional dependency: @flyingrobots/graft (Apache-2.0), invoked as a separate process
14
+ via its command-line interface. footprint does not link against or embed graft.