Skip to content

feat(agency-tools): directive usage report, and reach the experimental store - #160

Merged
pathscale merged 3 commits into
masterfrom
feat/ps-usage-report
Aug 16, 2026
Merged

feat(agency-tools): directive usage report, and reach the experimental store#160
pathscale merged 3 commits into
masterfrom
feat/ps-usage-report

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Adds ps-usage-report to the read-only CLI: incidence, per-surface and per-verb counts, outcomes and per-day activity over a closed window, read from the rows the app already writes at its parse and apply boundaries. No second parser, no new table, no schema change.

The window constants are empty by default so an unset window refuses rather than silently choosing a span. --start/--end override for a one-off run. --blinded maps every verb through a fixed table and drops identifying strings.

Also fixes store resolution: the directory came from a hardcoded standard bundle identifier, so an experimental profile's data was reachable only by passing AZ_DATA_DIR by hand, and the default quietly reported the wrong profile's numbers. AZ_PROFILE=experimental resolves the other identifier through the same three-step order the GUI uses.

11 new tests cover once-per-turn counting, the inclusive window end, determinism and the blinded-output assertions. Workspace clippy -D warnings clean, all suites pass, one-rev guard passes.

0.8.8.

🤖 Generated with Claude Code

meh added 3 commits August 16, 2026 18:58
Counts incidence, per-surface and per-verb totals, outcomes and per-day
activity over a closed window, from the rows the app already writes where it
parses and applies a directive. Reading those rows rather than re-matching
prose keeps one parser in the system: a second pattern would drift from the
real one and report a surface the app does not implement.

The window has two named constants and both are empty, so an unset window is
a refusal rather than a silently chosen span. --start and --end override them
for a one-off run.

--blinded substitutes every verb through a fixed table and drops identifying
strings, for output that must not be searchable back to this project. Surface
names and dates pass through unchanged; they are generic and they are the
point of the table.

Two things the source data settles rather than the reader guessing:
directives.rs has exactly two terminal outcomes, applied and refused, so the
normalized bucket is a structural zero rather than a synthesised third state,
and an outcome outside that set is counted as failed under an unrecognized
code so a new arm surfaces instead of vanishing into a total. Directives that
parsed but reached no terminal record are reported as a count, not hidden by
an assertion that would abort the run.

The table this reads is untouched: no new columns, no new table, no migration
on a single-writer store.
The store directory was resolved from a hardcoded standard bundle identifier,
so a machine running the experimental window had its data reachable only by
passing AZ_DATA_DIR by hand. The failure is quiet and wrong rather than loud:
the standard store exists and reads fine, so the tool reports another
profile's numbers as if they were this profile's.

AZ_PROFILE=experimental picks the other identifier and resolves it through the
same three-step order the GUI uses, pointer file included.
@pathscale
pathscale merged commit ca9c055 into master Aug 16, 2026
1 of 2 checks passed
@pathscale
pathscale deleted the feat/ps-usage-report branch August 16, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant