Feature Ledger
CSecurityRead every change on a project's working branches (and list every branch, tag, worktree, PR and issue with fresh/aging/stalled/cold freshness) and keep ONE living ledger of it: old features (what the trunk already had), new features, changes and fixes, every API path compared module by module, and the insights found by reading the code (twin code, drift, untested paths, security, real-data performance). Revises its sections in place and appends a dated run log each time, never starting over. ...
- 132 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Works with
Security analysis
63/100- Pipes output to a shell interpreter
- Downloads and executes remote scripts — classic supply chain attack
Pro scans all 8 files and shows the line behind each finding
npx -y skills add Soul-Brews-Studio/arra-oracle-skills-cli --skill feature-ledger --agent claude-codeAre you the author of Feature Ledger?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/soul-brews-studio-feature-ledger)---
name: feature-ledger
description: "Read every change on a project's working branches (and list every branch, tag, worktree, PR and issue with fresh/aging/stalled/cold freshness) and keep ONE living ledger of it: old features (what the trunk already had), new features, changes and fixes, every API path compared module by module, and the insights found by reading the code (twin code, drift, untested paths, security, real-data performance). Revises its sections in place and appends a dated run log each time, never starting over. Use when Nat says \"feature ledger\", \"what changed\", \"old features / new features\", \"list all api path\", \"compare to module\", \"read all changes\", \"what's on delta\", or before a PR/release review. Do NOT use for one commit's review (use /code-review) or for a book (use /press-run)."
hidden: true
metadata:
internal: true
tier: full
---
# /feature-ledger — old features · new features · changes · every API path
> A changelog lists commits. A ledger says what the product could do before, what it can do now,
> what broke on the way, and what reading the code taught us. It is revised, never restarted.
```
/feature-ledger # default project (arra-hub), full run
/feature-ledger <project> # a project from projects.json
/feature-ledger --since # only what came after the last run's commits (still revises everything it touches)
/feature-ledger add <project> # add a project to projects.json (asks for repos + base refs)
```
## Step 0: Init
```bash
date "+🕐 %H:%M %Z (%A %d %B %Y)" && cat ~/.claude/skills/feature-ledger/projects.json
```
No `projects.json` yet? It is per-machine and deliberately not shipped — it holds absolute checkout
paths and a local port. Start it from the template beside this file:
```bash
cp ~/.claude/skills/feature-ledger/projects.example.json ~/.claude/skills/feature-ledger/projects.json
```
`projects.json` names, per project: the ledger file, each repo's working dir and base ref (the trunk the
branch is compared to), whether it is an arra-style server (`routes: true`), the live URL, related work.
## Step 1: Facts (scripts, 0 tokens of judgement)
For every repo in the project:
```bash
S=~/.claude/skills/feature-ledger/scripts
$S/scan.sh <dir> <base> [<last run's head sha>] # merge-base, commits, size, areas, files added/removed, routes, env vars, deps
$S/inventory.sh <dir> <base> # OLD: what the trunk HAS (route clusters, MCP tools, CLI, pages, components)
$S/inventory.sh <dir> HEAD # NOW
```
For a server repo (`routes: true`), the full API, attributed to the route module that mounts it:
```bash
W=/opt/tmp/feature-ledger/<repo>-base # a detached worktree of the base, reused between runs
[ -d $W ] || git -C <dir> worktree add -q --detach $W <base>
git -C $W checkout -q --detach <base> && ln -sfn <dir>/node_modules $W/node_modules
(cd $W && bun $S/routes.ts > /opt/tmp/feature-ledger/<repo>-routes-base.tsv)
(cd <dir> && bun $S/routes.ts > /opt/tmp/feature-ledger/<repo>-routes-now.tsv)
python3 $S/compare.py <base.tsv> <now.tsv> # per-module table, added, removed, every route now
```
`routes.ts` reads Elysia's own route table (what the server serves), and names modules from
`createServerRouteModules()` in that checkout's `src/server.ts`. A route only `createApp()` adds is module `app`.
Every branch, tag and worktree, per repo (slow on a repo with ~1,000 branches: run it in a herdr pane):
```bash
$S/branches.sh <dir> <base> <ledger dir> <repo name> # stdout = summary for the ledger;
# <ledger dir>/<repo>-branches.md = full lists
```
It reports: local branches (merged into base / upstream gone / never pushed), every remote branch with
ahead/behind and its PR (`gh pr list --state all`), every tag with date and whether the base contains it,
the newest tag reachable from HEAD vs the version in `package.json`, and the worktrees.
Every open PR and issue, with freshness (days since last update: fresh ≤7 · aging 8–30 · stalled 31–90 · cold >90):
```bash
python3 $S/prs-issues.py <owner/repo> <ledger dir> <repo name> # stdout = summary; <repo>-prs-issues.md = full lists
```
`branches.sh` prints the same buckets for local and remote branches (by last commit). Read the fresh issues and
the PRs that touch what changed: a stalled PR may already hold the fix for this run's finding.
**Do this cross-match for every insight, not only for the new code.** Grep the PR and issue titles for the
subsystem each insight names. When the same shape repeats — a measured problem whose fix sits in a stalled
PR — stop treating the instances separately and write the pattern as its own insight.
Also: MCP tools old vs new (`git grep -h -o "name: 'oracle_[a-z_]*'" <ref> -- 'src/tools/**/*.ts'`), open PRs
(`gh pr list --head <branch>`), uncommitted work (`git status --short`), and the live server.
### Probing the live server — warm, real paths, quoted
```bash
curl -s -m 20 http://127.0.0.1:<port>/api/health | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d["data"]["uptime"])'
for i in 1 2 3; do curl -s -m 60 -o /dev/null -w '%{http_code} %{time_total}s %{size_download}B\n' '<url>'; done
```
- **Check `uptime` first.** A server 20 s old answers 4× slower than the same server warm, and a probe
during its restart returns `000`. A `000` is a finding only once `uptime` shows the process was already
up; otherwise it is the measurement being wrong, and reporting it as an outage is a false alarm.
- **Probe three times and report the warm number**, with the cold one only if the gap is the point.
- **Only probe paths that came out of `routes.ts`.** A guessed path returning 404 says nothing about the
product and reads in the ledger as a regression that does not exist.
- **Quote the URL**: in zsh an unquoted `?` is a glob and the command dies with `no matches found`.
- Follow the version prefix: if `/api/<p>` answers `308` to `/api/v1/<p>`, time the destination, not the
redirect, and note which headers the redirect drops.
## Step 2: Read the code — be curious, every run
The scripts say WHAT changed. Reading says what it MEANS. For every new feature, open the code (Serena
`get_symbols_overview` / `find_symbol`, or Read) and ask each question below. Write down only what
you verified, with `file:line`:
| look for | how |
|---|---|
| **twin code** — the same files in two repos | compare file names across the project's repos; `cmp` each pair; count same / drifted |
| **real-data cost** — a query fine at 2k rows, slow at 300k | time it against the live DB read-only (`bun:sqlite`, `{ readonly: true }`); note row counts |
| **security** — trust boundaries, proxies, bypasses, secrets | who can call it; what a request through a local proxy looks like; what defaults to "local" |
| **untested paths** — new routes with no test | `rg -l '<route path>' tests src --glob '*.test.ts'` per added route |
| **docs drift** — README/CLAUDE.md/docs claims vs code | read the claim, find the code, quote both |
| **dead ends** — named but not built, flags nothing reads | dashed box in the ledger, `rg` for readers of each new env var |
| **the fix you are about to recommend** — does it actually help? | measure the alternative before writing it down: `EXPLAIN QUERY PLAN`, then vary the bound (`LIMIT 1 / 5 / 25`) — constant time means the limit prunes nothing; time the proposed rewrite against the live data |
| **the schema under the blame** | read it, do not infer it: `SELECT sql FROM sqlite_master WHERE name='<table>'`; an `UNINDEXED` column or a missing index is a quotable fact |
| **a status that contradicts itself** | read the whole health/status body, not the field you came for: a `subsystems.x = healthy` beside `xAvailable: false` is a green light on an unavailable capability |
| **payload waste** | compare the keys of a response against each other — a body that mirrors all of `data` at the top level pays for every byte twice |
| **the fix already written and parked** | cross-match every insight against open PRs and issues by keyword; two such matches is no longer luck, it is the project's shape |
| **behaviour changes on OLD routes** — same path, new meaning | `git diff <base> -- <route file>` for every module whose count did not change but whose files did |
| **what the live server says** | probe; a hang, a 5xx or a slow answer goes in Insights with the measurement |
Spend effort here. A ledger whose Insights section repeats last run's list is a run that did not look.
## Step 3: Write the ledger (revise, append, never restart)
The ledger path comes from `projects.json`. Its sections, in this order (a reader's order, like /press-run):
1. **Now — what it can do** (new features, grouped by what a user does, each with its routes, UI page, commit)
2. **Before — old features** (the trunk's inventory: modules, MCP tools, pages, components, with counts)
3. **Changes and fixes** (behaviour changes on old features, bug fixes with root cause, perf numbers)
4. **API — every path, module by module** (compare.py output: table, added, removed, full list in `<details>`)
5. **Insights** (numbered, never renumbered; each: date found, evidence, status `open / fixed in <sha> / superseded by #N`)
6. **Branches, tags, worktrees, PRs and issues — with freshness** (bucket table, branches.sh + prs-issues.py summaries, links to full lists)
7. **Open threads** (PRs, uncommitted work, decisions waiting on Nat)
8. **Run log** (append one row per run: date, heads per repo, commits since last run, what was new this run)
Rules:
- **Revise sections 1–4, 6 and 7 in place** so they are true today. **Append to 5 and 8 only**: an
insight is never deleted; when it stops being true, set its status and say why.
- Every number comes from a script output or a measurement taken this run. No number from memory.
- Name commits by short sha; name code by `file:line`.
- Keep the ledger readable on a phone: short lines, tables, `<details>` for long lists.
- Not in the ledger: tokens, hostnames beyond what the repo already says, other people's data,
Laris internals.
- The run-log timestamp comes from `date` at write time. If it lands earlier than the row above it, say
so in the row rather than smoothing it — a ledger that quietly re-sorts its own clock cannot be used
as evidence.
- When a run has **0 new commits**, it is a reading run, not a skipped run: revise what drifted
(live measurements, docs, PR freshness, uncommitted work) and spend the whole pass on Step 2. Say in
the run log that the heads were unchanged and what you read instead.
- A measurement that disproves your own hypothesis goes in the ledger with the hypothesis named. Those
are the entries that stop the next run from re-proposing a fix that does not work.
## Step 4: Report
Tell Nat, in a few lines: what is new since the last run, the top 3 insights (new ones first), the
ledger path. Do not paste the ledger.
## Scripts
| script | what |
|---|---|
| `scripts/scan.sh` | facts of a branch vs its base (or since a sha) |
| `scripts/inventory.sh` | what a ref has, counted the same way for base and HEAD |
| `scripts/routes.ts` | every route + module from Elysia's route table (arra-style servers) |
| `scripts/compare.py` | old vs new routes, per module, as markdown |
| `scripts/branches.sh` | every branch / tag / worktree vs the base, PR state, version vs newest tag, branch freshness |
| `scripts/prs-issues.py` | every open PR and issue with freshness buckets, last merges and closes |
## Traps met building it (2026-11-30)
| trap | fix |
|---|---|
| zsh `$REF:src/...` is a history modifier (`:s`), silently rewriting the ref | `${REF}:src/...` |
| a loop over `"dir ref"` strings does not word-split in zsh | call the script once per repo |
| first path segment ≠ module (`/api/federation/*` lives in `hubRoutes`) | name modules from `createServerRouteModules` |
| a server whose log line is written when a request ENDS hides the request that blocks it | arra: `ORACLE_LOG_REQUEST_START=1` |
| zsh eats `?` in a URL as a glob (`no matches found: /api/x?limit=1`) | quote the whole URL |
| timings taken in the first seconds after a restart are 4–10× the warm number | read `uptime` from `/api/health` before believing any duration |
| `LIMIT n` on a `GROUP BY … ORDER BY` join prunes nothing — temp B-trees are built over the whole join first | vary `n` and watch the time stay flat; the plan line `USE TEMP B-TREE` is the tell |
| splitting a slow join into "ids first, then rows by id" changes nothing when the id column is `UNINDEXED` | measure both halves; compare against a bare `count(*)` as the floor |
Files in this skill
- SKILL.md
- projects.example.json
- scripts/branches.sh
- scripts/compare.py
- scripts/inventory.sh
- scripts/prs-issues.py
- scripts/routes.ts
- scripts/scan.sh
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.