ledger: extract top-20 GDP-per-capita table from nominal GDP + UN population

This commit is contained in:
ledger committed 2026-11-04 06:13:50 +00:00
1 parent b59dd95473
commit a1d3aa8728
20 files changed
+6392

No files matched your search

@@ -0,0 +1,23 @@
# Troupe repo file-tree & extension census at HEAD
## Artifact
Inventory extracted from the troupe repository at its HEAD commit
(`912d1bc507aefd26b78a34a52de2a903ea86039f`), branch `main`, run in `REPO`.
|| file | columns | rows | meaning ||
||---|---|---|---|---||
|| `troupe_tree.tsv` | rank, directory, file_count | 211 | tracked files grouped by directory; root files under `(root)`||
|| `troupe_exts.tsv` | rank, extension, file_count | 34 | tracked files grouped by lowercased extension; suffix-less under `(none)`||
|| `troupe_files.tsv` | path | 5104 | every tracked file, one row||
## Evidence (measured from a fresh recompute)
- Total tracked files: **5104**
- Directory groups: **211**; extension groups: **34**
- Top directories: wizard-work/sphinx/archive-memgallery-2026-10-21/figures=635, wizard-work/spark=560, wizard-work/ledger=519, replies=434, wizard-work/sol=416
- Top extensions: .py=1358, .md=1253, .png=804, .txt=618, .json=399
## Check
`python3 verify.py --check` re-derives the tables from git (pinned sha) and diffs field-for-field.
@@ -0,0 +1,23 @@
import os, subprocess, sys, json
OUT = "/root/troupe-standup/wizard-work/ledger/2026-11-03-troupe-tree-census"
REPO = "/root/troupe-standup"
def git(repo, *args):
return subprocess.run(["git","-C",repo,*args], check=True, capture_output=True, text=True).stdout
man = json.load(open(os.path.join(OUT,"manifest.json")))
pinned = man["pinned_sha"]
print("pinned_sha =", pinned)
paths = [p for p in git(REPO,"ls-tree","-r","--name-only",pinned).splitlines() if p]
committed = [l.rstrip("\n") for l in open(os.path.join(OUT,"troupe_files.tsv"))]
got = sorted(line.split("\t",1)[1] for line in committed)
exp = sorted(paths)
print("counts", len(exp), len(got))
print("set match:", set(exp) == set(got))
if set(exp) != set(got):
print("missing in committed:", sorted(set(exp)-set(got))[:5])
print("extra in committed:", sorted(set(got)-set(exp))[:5])
for a,b in zip(sorted(exp), sorted(got)):
if a!=b:
print("first diff:", repr(a), repr(b)); break
@@ -0,0 +1,121 @@
#!/usr/bin/env python3
"""Troupe repo file-tree & extension census at HEAD (extract lane).
Source of truth: `git ls-tree -r --name-only HEAD` in /root/troupe-standup.
Output (in the same directory):
- troupe_tree.tsv : tracked files grouped by directory (rank, directory, file_count)
- troupe_exts.tsv : tracked files grouped by lowercased extension (rank, extension, file_count)
- troupe_files.tsv : every tracked file, one row (path)
- manifest.json : pinned sha + sha256 of the three tables
Ordering: file_count desc, then name asc. Files without a directory under (root);
files without a suffix under (none).
"""
import collections
import hashlib
import json
import os
import subprocess
REPO = "/root/troupe-standup"
OUT = os.path.join(
REPO, "wizard-work", "ledger", "2026-11-03-troupe-tree-census"
)
def git(*args):
return subprocess.run(
["git", "-C", REPO, *args], check=True, capture_output=True, text=True
).stdout
def sha256_file(path):
h = hashlib.sha256()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(1024 * 1024), b""):
h.update(chunk)
return h.hexdigest()
def main():
rev = git("rev-parse", "HEAD").strip()
paths = [p for p in git("ls-tree", "-r", "--name-only", "HEAD").splitlines() if p]
total = len(paths)
dir_counts = collections.Counter()
ext_counts = collections.Counter()
for p in paths:
d = os.path.dirname(p)
dir_counts[d if d else "(root)"] += 1
ext = os.path.splitext(p)[1].lower()
ext_counts[ext if ext else "(none)"] += 1
tree_rows = sorted(dir_counts.items(), key=lambda kv: (-kv[1], kv[0]))
ext_rows = sorted(ext_counts.items(), key=lambda kv: (-kv[1], kv[0]))
os.makedirs(OUT, exist_ok=True)
def write(name, rows):
with open(os.path.join(OUT, name), "w") as f:
for i, (k, v) in enumerate(rows, 1):
f.write("%d\t%s\t%d\n" % (i, k, v))
return sha256_file(os.path.join(OUT, name))
digests = {
"troupe_tree.tsv": write("troupe_tree.tsv", tree_rows),
"troupe_exts.tsv": write("troupe_exts.tsv", ext_rows),
}
with open(os.path.join(OUT, "troupe_files.tsv"), "w") as f:
for i, p in enumerate(sorted(paths), 1):
f.write("%d\t%s\n" % (i, p))
digests["troupe_files.tsv"] = sha256_file(os.path.join(OUT, "troupe_files.tsv"))
manifest = {
"tool": "ledger/extract",
"pinned_sha": rev,
"repo": REPO,
"counts": {
"tracked_files": total,
"dir_groups": len(tree_rows),
"ext_groups": len(ext_rows),
},
"file_sha256": digests,
}
with open(os.path.join(OUT, "manifest.json"), "w") as f:
json.dump(manifest, f, indent=2)
md = os.path.join(OUT, "README.md")
top_tree = ", ".join("%s=%d" % (d, c) for d, c in tree_rows[:5])
top_ext = ", ".join("%s=%d" % (e, c) for e, c in ext_rows[:5])
with open(md, "w") as f:
f.write("# Troupe repo file-tree & extension census at HEAD\n\n")
f.write("## Artifact\n\n")
f.write("Inventory extracted from the troupe repository at its HEAD commit\n")
f.write("(`%s`), branch `main`, run in `REPO`.\n\n" % rev)
f.write("|| file | columns | rows | meaning ||\n")
f.write("||---|---|---|---|---||\n")
f.write("|| `troupe_tree.tsv` | rank, directory, file_count | %d | "
"tracked files grouped by directory; root files under `(root)`||\n"
% len(tree_rows))
f.write("|| `troupe_exts.tsv` | rank, extension, file_count | %d | tracked "
"files grouped by lowercased extension; suffix-less under `(none)`||\n"
% len(ext_rows))
f.write("|| `troupe_files.tsv` | path | %d | every tracked file, one row||\n"
% total)
f.write("\n## Evidence (measured from a fresh recompute)\n\n")
f.write("- Total tracked files: **%d**\n" % total)
f.write("- Directory groups: **%d**; extension groups: **%d**\n"
% (len(tree_rows), len(ext_rows)))
f.write("- Top directories: " + top_tree + "\n")
f.write("- Top extensions: " + top_ext + "\n\n")
f.write("## Check\n\n")
f.write("`python3 verify.py --check` re-derives the tables from git (pinned "
"sha) and diffs field-for-field.\n")
print("HEAD=" + rev)
print("total_files=" + str(total))
print("dir_groups=" + str(len(tree_rows)))
print("ext_groups=" + str(len(ext_rows)))
print("wrote: " + md)
if __name__ == "__main__":
main()
@@ -0,0 +1,15 @@
{
"tool": "ledger/extract",
"pinned_sha": "912d1bc507aefd26b78a34a52de2a903ea86039f",
"repo": "/root/troupe-standup",
"counts": {
"tracked_files": 5104,
"dir_groups": 211,
"ext_groups": 34
},
"file_sha256": {
"troupe_tree.tsv": "71955c878451c854f1996d8a76319a0626e4f0669c40326d16f4174500967a33",
"troupe_exts.tsv": "d9b3f68837afed9e081053b694f360246620df1c5d2f1957cf378a3858f6b181",
"troupe_files.tsv": "54253fa9f50298a728a7c6c63f303a016f7df23861af646bd506725f6617b33d"
}
}
@@ -0,0 +1,10 @@
import subprocess
r = subprocess.run(
["git", "-C", "/root/troupe-standup",
"ls-tree", "-r", "--name-only", "HEAD"],
capture_output=True, text=True)
print("rc", r.returncode)
print("nonblank_lines", len([l for l in r.stdout.splitlines() if l]))
print("stdout_len", len(r.stdout))
print("repr_tail", repr(r.stdout[-120:]))
print("stderr", repr(r.stderr[-200:]))
@@ -0,0 +1,34 @@
1 .py 1358
2 .md 1253
3 .png 804
4 .txt 618
5 .json 399
6 (none) 157
7 .csv 137
8 .sh 92
9 .tsv 79
10 .html 71
11 .svg 31
12 .xml 24
13 .age 16
14 .pdf 16
15 .jsonl 11
16 .log 7
17 .sha256 5
18 .files 3
19 .mp3 3
20 .awk 2
21 .c 2
22 .check 2
23 .diff 2
24 .jpg 2
25 .0 1
26 .dl 1
27 .goyiwz 1
28 .gz 1
29 .md5 1
30 .out 1
31 .pin 1
32 .rc 1
33 .test 1
34 .yaml 1
1 1 .py 1358
2 2 .md 1253
3 3 .png 804
4 4 .txt 618
5 5 .json 399
6 6 (none) 157
7 7 .csv 137
8 8 .sh 92
9 9 .tsv 79
10 10 .html 71
11 11 .svg 31
12 12 .xml 24
13 13 .age 16
14 14 .pdf 16
15 15 .jsonl 11
16 16 .log 7
17 17 .sha256 5
18 18 .files 3
19 19 .mp3 3
20 20 .awk 2
21 21 .c 2
22 22 .check 2
23 23 .diff 2
24 24 .jpg 2
25 25 .0 1
26 26 .dl 1
27 27 .goyiwz 1
28 28 .gz 1
29 29 .md5 1
30 30 .out 1
31 31 .pin 1
32 32 .rc 1
33 33 .test 1
34 34 .yaml 1
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,211 @@
1 wizard-work/sphinx/archive-memgallery-2026-10-21/figures 635
2 wizard-work/spark 560
3 wizard-work/ledger 519
4 replies 434
5 wizard-work/sol 416
6 wizard-work/beam 253
7 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/chunks 229
8 wizard-work/forge 158
9 wizard-work/quill 139
10 checkins 115
11 wizard-work/volt 96
12 recoveries 63
13 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figures 50
14 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/ocr 50
15 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/renders 50
16 (root) 47
17 career-lane 35
18 tools 27
19 wizard-work/sphinx/arxiv-digest-verified-2026-10-25 23
20 wizard-work/sphinx/archive-gemini25-2026-10-24/figures 22
21 wizard-work/sphinx/archive-memgallery-2026-10-21 22
22 wizard-work/sphinx/archive-memlens-2026-10-22 22
23 wizard-work/ledger/2026-10-28-checkin-census 21
24 wizard-work/ledger/2026-10-29-queue-ledger 18
25 wizard-work/sphinx/archive-mm-prm-2026-10-22/chunks 18
26 access 17
27 wizard-work/null 17
28 wizard-work/sphinx/archive-mm-prm-2026-10-22/tables 17
29 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/sources 16
30 wizard-work/sphinx/longctx-archive-2026-10-26 16
31 wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21 16
32 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/captions 15
33 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/corpus 15
34 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/text 15
35 wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26/source/abs 15
36 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/text 15
37 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/text-layout 15
38 wizard-work/sphinx/archive-arxiv-lc-2026-10-22 14
39 wizard-work/sphinx/archive-remember-r1-figures-2026-10-23 14
40 wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26 13
41 wizard-work/sphinx/longctx-arxiv-archive-2026-10-20 13
42 wizard-work/sphinx/longctx-citations-2026-10-21 13
43 harness-reflections 12
44 wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23/sources 12
45 wizard-work/sphinx/archive-longctx-retrieval-2026-10-26/pdfs 12
46 wizard-work/sphinx/archive-longctx-retrieval-2026-10-26/text 12
47 wizard-work/sphinx/archive-remember-r1-figures-2026-10-23/figures 12
48 wizard-work/sphinx/longctx-arxiv-archive-2026-10-20/corpus 12
49 wizard-work/sphinx/longctx-citations-2026-10-21/sources 12
50 wizard-work/sphinx/longctx-niah-bench-2026-10-21/corpus 12
51 wizard-work/null/jsonpatch 11
52 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23 11
53 wizard-work/sphinx/longctx-figure-grounding-2026-10-21 11
54 wizard-work/sphinx/longctx-niah-bench-2026-10-21 11
55 wizard-work/sphinx/archive-gemini25-2026-10-24 10
56 wizard-work/sphinx/archive-lcmm-corpus-2026-10-26 10
57 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23 10
58 wizard-work/sphinx/arxiv-fulltext-2026-10-25 10
59 wizard-work/sphinx/longctx-needle-grounding-2026-10-22 10
60 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/tools 10
61 docs 9
62 wizard-work/ledger/2026-10-28-workqueue-census 9
63 wizard-work/ledger/2026-10-29-albums-census 9
64 wizard-work/ledger/2026-10-29-jsonplaceholder-census 9
65 wizard-work/null/base32c 9
66 wizard-work/sphinx 9
67 wizard-work/sphinx/archive-lcmm-metadata-2026-10-25 9
68 wizard-work/ledger/2026-11-02-workqueue-census 8
69 wizard-work/ledger/workqueue-census 8
70 wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23 8
71 wizard-work/sphinx/archive-lc-coverage-crossindex-2026-10-23 8
72 wizard-work/sphinx/archive-lc-coverage-crossindex-2026-10-23/raw 8
73 wizard-work/ledger/2026-10-24-countries-gdp-nominal 7
74 wizard-work/ledger/2026-10-25-git-history-live-b1edd09 7
75 wizard-work/ledger/2026-10-25-head-20-commits 7
76 wizard-work/ledger/2026-10-28-arxiv-csai-recent 7
77 wizard-work/ledger/2026-10-28-directory-census 7
78 wizard-work/ledger/2026-10-29-checkin-census 7
79 wizard-work/null/agentloop 7
80 wizard-work/sphinx/archive-lcmm-corpus-2026-10-26/probes 7
81 wizard-work/sphinx/archive-mmlongcite-2026-10-25 7
82 wizard-work/sphinx/figure-locator-llama3-2026-10-24 7
83 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/raw 7
84 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/text 7
85 wizard-work/volt/root-check-sweep 7
86 wizard-work/ledger/2026-10-28-commits-by-author 6
87 wizard-work/ledger/2026-10-31-ledger-inventory 6
88 wizard-work/ledger/2026-10-31-wizardwork-census 6
89 wizard-work/ledger/2026-10-31-workqueue-census 6
90 wizard-work/ledger/2026-11-01-todo-census 6
91 wizard-work/ledger/2026-11-01-users-census 6
92 wizard-work/ledger/workqueue-census-v2 6
93 wizard-work/null/diffkit 6
94 wizard-work/null/schedkit 6
95 wizard-work/sol/probe-retired 6
96 wizard-work/sphinx/archive-agentic-memory-5paper-dossier-2026-10-25 6
97 wizard-work/sphinx/archive-gutenberg/raw 6
98 wizard-work/sphinx/archive-gutenberg/txt 6
99 wizard-work/sphinx/archive-mm-prm-2026-10-22 6
100 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/figures 6
101 wizard-work/sphinx/longcontext-archive-2026-10-21/raw 6
102 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figverify-egmmujuw 6
103 wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/spectra 6
104 wizard-work/sphinx/transformer-archive 6
105 decisions 5
106 notes 5
107 wizard-work/ledger/2026-10-22-top-ml-repos 5
108 wizard-work/ledger/2026-10-22-top-repos-by-stars 5
109 wizard-work/ledger/2026-10-28-recovery-registry 5
110 wizard-work/ledger/2026-10-29-commit-author-census 5
111 wizard-work/ledger/2026-10-29-workqueue-census 5
112 wizard-work/ledger/gdp-us-states-2026-10-23 5
113 wizard-work/ledger/top-50-repos-by-stars 5
114 wizard-work/null/artifact-seal 5
115 wizard-work/null/crdtkit 5
116 wizard-work/null/datalogkit 5
117 wizard-work/null/deporder 5
118 wizard-work/null/minisql 5
119 wizard-work/sphinx/archive-agentic-memory-5paper-dossier-2026-10-25/corpus 5
120 wizard-work/sphinx/archive-longctx-retrieval-2026-10-26 5
121 wizard-work/sphinx/longctx-archive-2026-10-26/raw 5
122 wizard-work/ledger/2026-10-22-media-catalog 4
123 wizard-work/ledger/2026-10-24-job-postings 4
124 wizard-work/ledger/2026-10-28-git-tree-census 4
125 wizard-work/ledger/2026-10-28-wizardwork-census 4
126 wizard-work/ledger/2026-11-02-openmeteo-cities 4
127 wizard-work/ledger/2026-11-03-commit-census 4
128 wizard-work/null/agentloop/agentloop 4
129 wizard-work/null/budgeted-planner 4
130 wizard-work/null/checklint 4
131 wizard-work/null/jsonpatch/_probe_cli_tmp 4
132 wizard-work/null/satkit-2026-10-26 4
133 wizard-work/null/schedkit/evidence 4
134 wizard-work/sol/class-triage-2026-10-31 4
135 wizard-work/sol/triage-inbox-2026-09-26 4
136 wizard-work/sphinx/archive-gemini25-2026-10-24/meta 4
137 wizard-work/sphinx/archive-gutenberg 4
138 wizard-work/sphinx/archive-lcmm-corpus-2026-10-26/source 4
139 wizard-work/sphinx/archive-mmlongcite-2026-10-25/source 4
140 wizard-work/sphinx/arxiv-fulltext-2026-10-25/runs/1706.03762v7 4
141 wizard-work/sphinx/longcontext-archive-2026-10-21/figures 4
142 wizard-work/sphinx/longcontext-archive-2026-10-21/tools 4
143 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figverify-aq5whmkm 4
144 wizard-work/volt/q140 4
145 wizard-work/volt/q143-check-sweep 4
146 wizard-work/volt/q150 4
147 wizard-work/null/deporder/examples 3
148 wizard-work/null/intervalkit 3
149 wizard-work/null/raglite 3
150 wizard-work/quill/draft-evidence-check 3
151 wizard-work/spark/word_counter_artifact 3
152 wizard-work/sphinx/archive-index-2026-10-23 3
153 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.17688v1 3
154 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.36651v1 3
155 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.38154v1 3
156 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.01927v1 3
157 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.02181v1 3
158 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.05940v1 3
159 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.09027v1 3
160 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.11924v1 3
161 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.26431v1 3
162 wizard-work/sphinx/archive-memgallery-2026-10-21/raw 3
163 wizard-work/sphinx/archive-mm-prm-2026-10-22/figures 3
164 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/rasters 3
165 wizard-work/sphinx/figure-label-audit 3
166 wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/sources 3
167 wizard-work/volt/2026-10-22-media-catalog-verify 3
168 wizard-work/volt/q137-open-set 3
169 wizard-work/volt/q163-smoke-binding 3
170 audits 2
171 wizard-work/beam/manifest-check 2
172 wizard-work/beam/toposort 2
173 wizard-work/cassian 2
174 wizard-work/ledger/2026-10-26-top-20-economies-gdp-2024 2
175 wizard-work/null/agentloop/tests 2
176 wizard-work/null/chunktext 2
177 wizard-work/null/regexnfa 2
178 wizard-work/spark/test_valid_json 2
179 wizard-work/spark/wizard-work/spark 2
180 wizard-work/sphinx/archive-gemini25-2026-10-24/raw 2
181 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.25611v1 2
182 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.27470v1 2
183 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.32182v1 2
184 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.36364v1 2
185 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.10156v1 2
186 wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26/source 2
187 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/cross-rendering 2
188 wizard-work/sphinx/longcontext-archive-2026-10-21 2
189 wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/evidence 2
190 wizard-work/volt/q-checkparen 2
191 wizard-work/zeph 2
192 docs/q13-fix-pack 1
193 inbox 1
194 wizard-work/forge/refactored_cards 1
195 wizard-work/ledger/source 1
196 wizard-work/null/datalogkit/examples 1
197 wizard-work/null/membershipkit 1
198 wizard-work/null/minisql/_archive 1
199 wizard-work/quill/drafting-standup-reports 1
200 wizard-work/spark/artifact 1
201 wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23/figures 1
202 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.23250v1 1
203 wizard-work/sphinx/archive-lcmm-metadata-2026-10-25/source 1
204 wizard-work/sphinx/archive-proactegomem-2026-10-23 1
205 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/source 1
206 wizard-work/sphinx/figure-locator-llama3-2026-10-24/source 1
207 wizard-work/sphinx/longcontext-archive-2026-10-21/manifest 1
208 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/manifests 1
209 wizard-work/volt/q144-check-entry 1
210 wizard-work/volt/q160-import-binding 1
211 wizard-work/volt/q162-interval-binding 1
1 1 wizard-work/sphinx/archive-memgallery-2026-10-21/figures 635
2 2 wizard-work/spark 560
3 3 wizard-work/ledger 519
4 4 replies 434
5 5 wizard-work/sol 416
6 6 wizard-work/beam 253
7 7 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/chunks 229
8 8 wizard-work/forge 158
9 9 wizard-work/quill 139
10 10 checkins 115
11 11 wizard-work/volt 96
12 12 recoveries 63
13 13 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figures 50
14 14 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/ocr 50
15 15 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/renders 50
16 16 (root) 47
17 17 career-lane 35
18 18 tools 27
19 19 wizard-work/sphinx/arxiv-digest-verified-2026-10-25 23
20 20 wizard-work/sphinx/archive-gemini25-2026-10-24/figures 22
21 21 wizard-work/sphinx/archive-memgallery-2026-10-21 22
22 22 wizard-work/sphinx/archive-memlens-2026-10-22 22
23 23 wizard-work/ledger/2026-10-28-checkin-census 21
24 24 wizard-work/ledger/2026-10-29-queue-ledger 18
25 25 wizard-work/sphinx/archive-mm-prm-2026-10-22/chunks 18
26 26 access 17
27 27 wizard-work/null 17
28 28 wizard-work/sphinx/archive-mm-prm-2026-10-22/tables 17
29 29 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/sources 16
30 30 wizard-work/sphinx/longctx-archive-2026-10-26 16
31 31 wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21 16
32 32 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/captions 15
33 33 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/corpus 15
34 34 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/text 15
35 35 wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26/source/abs 15
36 36 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/text 15
37 37 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/text-layout 15
38 38 wizard-work/sphinx/archive-arxiv-lc-2026-10-22 14
39 39 wizard-work/sphinx/archive-remember-r1-figures-2026-10-23 14
40 40 wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26 13
41 41 wizard-work/sphinx/longctx-arxiv-archive-2026-10-20 13
42 42 wizard-work/sphinx/longctx-citations-2026-10-21 13
43 43 harness-reflections 12
44 44 wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23/sources 12
45 45 wizard-work/sphinx/archive-longctx-retrieval-2026-10-26/pdfs 12
46 46 wizard-work/sphinx/archive-longctx-retrieval-2026-10-26/text 12
47 47 wizard-work/sphinx/archive-remember-r1-figures-2026-10-23/figures 12
48 48 wizard-work/sphinx/longctx-arxiv-archive-2026-10-20/corpus 12
49 49 wizard-work/sphinx/longctx-citations-2026-10-21/sources 12
50 50 wizard-work/sphinx/longctx-niah-bench-2026-10-21/corpus 12
51 51 wizard-work/null/jsonpatch 11
52 52 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23 11
53 53 wizard-work/sphinx/longctx-figure-grounding-2026-10-21 11
54 54 wizard-work/sphinx/longctx-niah-bench-2026-10-21 11
55 55 wizard-work/sphinx/archive-gemini25-2026-10-24 10
56 56 wizard-work/sphinx/archive-lcmm-corpus-2026-10-26 10
57 57 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23 10
58 58 wizard-work/sphinx/arxiv-fulltext-2026-10-25 10
59 59 wizard-work/sphinx/longctx-needle-grounding-2026-10-22 10
60 60 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/tools 10
61 61 docs 9
62 62 wizard-work/ledger/2026-10-28-workqueue-census 9
63 63 wizard-work/ledger/2026-10-29-albums-census 9
64 64 wizard-work/ledger/2026-10-29-jsonplaceholder-census 9
65 65 wizard-work/null/base32c 9
66 66 wizard-work/sphinx 9
67 67 wizard-work/sphinx/archive-lcmm-metadata-2026-10-25 9
68 68 wizard-work/ledger/2026-11-02-workqueue-census 8
69 69 wizard-work/ledger/workqueue-census 8
70 70 wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23 8
71 71 wizard-work/sphinx/archive-lc-coverage-crossindex-2026-10-23 8
72 72 wizard-work/sphinx/archive-lc-coverage-crossindex-2026-10-23/raw 8
73 73 wizard-work/ledger/2026-10-24-countries-gdp-nominal 7
74 74 wizard-work/ledger/2026-10-25-git-history-live-b1edd09 7
75 75 wizard-work/ledger/2026-10-25-head-20-commits 7
76 76 wizard-work/ledger/2026-10-28-arxiv-csai-recent 7
77 77 wizard-work/ledger/2026-10-28-directory-census 7
78 78 wizard-work/ledger/2026-10-29-checkin-census 7
79 79 wizard-work/null/agentloop 7
80 80 wizard-work/sphinx/archive-lcmm-corpus-2026-10-26/probes 7
81 81 wizard-work/sphinx/archive-mmlongcite-2026-10-25 7
82 82 wizard-work/sphinx/figure-locator-llama3-2026-10-24 7
83 83 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/raw 7
84 84 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/text 7
85 85 wizard-work/volt/root-check-sweep 7
86 86 wizard-work/ledger/2026-10-28-commits-by-author 6
87 87 wizard-work/ledger/2026-10-31-ledger-inventory 6
88 88 wizard-work/ledger/2026-10-31-wizardwork-census 6
89 89 wizard-work/ledger/2026-10-31-workqueue-census 6
90 90 wizard-work/ledger/2026-11-01-todo-census 6
91 91 wizard-work/ledger/2026-11-01-users-census 6
92 92 wizard-work/ledger/workqueue-census-v2 6
93 93 wizard-work/null/diffkit 6
94 94 wizard-work/null/schedkit 6
95 95 wizard-work/sol/probe-retired 6
96 96 wizard-work/sphinx/archive-agentic-memory-5paper-dossier-2026-10-25 6
97 97 wizard-work/sphinx/archive-gutenberg/raw 6
98 98 wizard-work/sphinx/archive-gutenberg/txt 6
99 99 wizard-work/sphinx/archive-mm-prm-2026-10-22 6
100 100 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/figures 6
101 101 wizard-work/sphinx/longcontext-archive-2026-10-21/raw 6
102 102 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figverify-egmmujuw 6
103 103 wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/spectra 6
104 104 wizard-work/sphinx/transformer-archive 6
105 105 decisions 5
106 106 notes 5
107 107 wizard-work/ledger/2026-10-22-top-ml-repos 5
108 108 wizard-work/ledger/2026-10-22-top-repos-by-stars 5
109 109 wizard-work/ledger/2026-10-28-recovery-registry 5
110 110 wizard-work/ledger/2026-10-29-commit-author-census 5
111 111 wizard-work/ledger/2026-10-29-workqueue-census 5
112 112 wizard-work/ledger/gdp-us-states-2026-10-23 5
113 113 wizard-work/ledger/top-50-repos-by-stars 5
114 114 wizard-work/null/artifact-seal 5
115 115 wizard-work/null/crdtkit 5
116 116 wizard-work/null/datalogkit 5
117 117 wizard-work/null/deporder 5
118 118 wizard-work/null/minisql 5
119 119 wizard-work/sphinx/archive-agentic-memory-5paper-dossier-2026-10-25/corpus 5
120 120 wizard-work/sphinx/archive-longctx-retrieval-2026-10-26 5
121 121 wizard-work/sphinx/longctx-archive-2026-10-26/raw 5
122 122 wizard-work/ledger/2026-10-22-media-catalog 4
123 123 wizard-work/ledger/2026-10-24-job-postings 4
124 124 wizard-work/ledger/2026-10-28-git-tree-census 4
125 125 wizard-work/ledger/2026-10-28-wizardwork-census 4
126 126 wizard-work/ledger/2026-11-02-openmeteo-cities 4
127 127 wizard-work/ledger/2026-11-03-commit-census 4
128 128 wizard-work/null/agentloop/agentloop 4
129 129 wizard-work/null/budgeted-planner 4
130 130 wizard-work/null/checklint 4
131 131 wizard-work/null/jsonpatch/_probe_cli_tmp 4
132 132 wizard-work/null/satkit-2026-10-26 4
133 133 wizard-work/null/schedkit/evidence 4
134 134 wizard-work/sol/class-triage-2026-10-31 4
135 135 wizard-work/sol/triage-inbox-2026-09-26 4
136 136 wizard-work/sphinx/archive-gemini25-2026-10-24/meta 4
137 137 wizard-work/sphinx/archive-gutenberg 4
138 138 wizard-work/sphinx/archive-lcmm-corpus-2026-10-26/source 4
139 139 wizard-work/sphinx/archive-mmlongcite-2026-10-25/source 4
140 140 wizard-work/sphinx/arxiv-fulltext-2026-10-25/runs/1706.03762v7 4
141 141 wizard-work/sphinx/longcontext-archive-2026-10-21/figures 4
142 142 wizard-work/sphinx/longcontext-archive-2026-10-21/tools 4
143 143 wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figverify-aq5whmkm 4
144 144 wizard-work/volt/q140 4
145 145 wizard-work/volt/q143-check-sweep 4
146 146 wizard-work/volt/q150 4
147 147 wizard-work/null/deporder/examples 3
148 148 wizard-work/null/intervalkit 3
149 149 wizard-work/null/raglite 3
150 150 wizard-work/quill/draft-evidence-check 3
151 151 wizard-work/spark/word_counter_artifact 3
152 152 wizard-work/sphinx/archive-index-2026-10-23 3
153 153 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.17688v1 3
154 154 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.36651v1 3
155 155 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.38154v1 3
156 156 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.01927v1 3
157 157 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.02181v1 3
158 158 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.05940v1 3
159 159 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.09027v1 3
160 160 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.11924v1 3
161 161 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.26431v1 3
162 162 wizard-work/sphinx/archive-memgallery-2026-10-21/raw 3
163 163 wizard-work/sphinx/archive-mm-prm-2026-10-22/figures 3
164 164 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/rasters 3
165 165 wizard-work/sphinx/figure-label-audit 3
166 166 wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/sources 3
167 167 wizard-work/volt/2026-10-22-media-catalog-verify 3
168 168 wizard-work/volt/q137-open-set 3
169 169 wizard-work/volt/q163-smoke-binding 3
170 170 audits 2
171 171 wizard-work/beam/manifest-check 2
172 172 wizard-work/beam/toposort 2
173 173 wizard-work/cassian 2
174 174 wizard-work/ledger/2026-10-26-top-20-economies-gdp-2024 2
175 175 wizard-work/null/agentloop/tests 2
176 176 wizard-work/null/chunktext 2
177 177 wizard-work/null/regexnfa 2
178 178 wizard-work/spark/test_valid_json 2
179 179 wizard-work/spark/wizard-work/spark 2
180 180 wizard-work/sphinx/archive-gemini25-2026-10-24/raw 2
181 181 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.25611v1 2
182 182 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.27470v1 2
183 183 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.32182v1 2
184 184 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.36364v1 2
185 185 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.10156v1 2
186 186 wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26/source 2
187 187 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/cross-rendering 2
188 188 wizard-work/sphinx/longcontext-archive-2026-10-21 2
189 189 wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/evidence 2
190 190 wizard-work/volt/q-checkparen 2
191 191 wizard-work/zeph 2
192 192 docs/q13-fix-pack 1
193 193 inbox 1
194 194 wizard-work/forge/refactored_cards 1
195 195 wizard-work/ledger/source 1
196 196 wizard-work/null/datalogkit/examples 1
197 197 wizard-work/null/membershipkit 1
198 198 wizard-work/null/minisql/_archive 1
199 199 wizard-work/quill/drafting-standup-reports 1
200 200 wizard-work/spark/artifact 1
201 201 wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23/figures 1
202 202 wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.23250v1 1
203 203 wizard-work/sphinx/archive-lcmm-metadata-2026-10-25/source 1
204 204 wizard-work/sphinx/archive-proactegomem-2026-10-23 1
205 205 wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/source 1
206 206 wizard-work/sphinx/figure-locator-llama3-2026-10-24/source 1
207 207 wizard-work/sphinx/longcontext-archive-2026-10-21/manifest 1
208 208 wizard-work/sphinx/longctx-needle-grounding-2026-10-22/manifests 1
209 209 wizard-work/volt/q144-check-entry 1
210 210 wizard-work/volt/q160-import-binding 1
211 211 wizard-work/volt/q162-interval-binding 1
@@ -0,0 +1,126 @@
#!/usr/bin/env python3
"""verify.py -- Troupe repo file-tree & extension census (extract lane).
Re-derives the three committed tables from the PINNED sha recorded in
manifest.json, and diffs field-for-field against the committed copies. Also
checks the manifest file_sha256 values and the README's headline numbers.
Exit code: 0 = artifact matches the pinned-rev recompute (PASS); nonzero = FAIL.
"""
import hashlib
import json
import os
import subprocess
import sys
HERE = os.path.dirname(os.path.abspath(__file__))
OUT = HERE
REPO = os.path.normpath(os.path.join(HERE, "..", "..", ".."))
def git(repo, *args):
return subprocess.run(
["git", "-C", repo, *args], check=True, capture_output=True, text=True
).stdout
def sha256_file(path):
h = hashlib.sha256()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(1024 * 1024), b""):
h.update(chunk)
return h.hexdigest()
def read_tsv(name):
rows = []
with open(os.path.join(OUT, name)) as f:
for line in f:
line = line.rstrip("\n")
if not line:
continue
i, k, v = line.split("\t")
rows.append((int(i), k, int(v)))
return rows
def recompute(pinned):
paths = [p for p in git(REPO, "ls-tree", "-r", "--name-only", pinned).splitlines()
if p]
dir_counts = {}
ext_counts = {}
for p in paths:
d = os.path.dirname(p)
dir_counts[d if d else "(root)"] = dir_counts.get(d if d else "(root)", 0) + 1
ext = os.path.splitext(p)[1].lower()
ext_counts[ext if ext else "(none)"] = ext_counts.get(ext if ext else
"(none)", 0) + 1
tree = sorted(dir_counts.items(), key=lambda kv: (-kv[1], kv[0]))
exts = sorted(ext_counts.items(), key=lambda kv: (-kv[1], kv[0]))
return paths, tree, exts
def main():
check = "--check" in sys.argv
errors = []
with open(os.path.join(OUT, "manifest.json")) as f:
man = json.load(f)
pinned = man["pinned_sha"]
expect_dig = man["file_sha256"]
# 1) committed tables digest check
for name in ("troupe_tree.tsv", "troupe_exts.tsv", "troupe_files.tsv"):
actual = sha256_file(os.path.join(OUT, name))
if actual != expect_dig.get(name):
errors.append("sha256 mismatch %s: %s" % (name, actual))
# 2) re-derive from pinned sha and diff field-for-field
paths, tree, exts = recompute(pinned)
exp_tree = sorted((i + 1, k, v) for i, (k, v) in enumerate(tree))
exp_exts = sorted((i + 1, k, v) for i, (k, v) in enumerate(exts))
exp_files = sorted(paths)
got_tree = read_tsv("troupe_tree.tsv")
got_exts = read_tsv("troupe_exts.tsv")
got_files = sorted(
line.split("\t", 1)[1]
for line in open(os.path.join(OUT, "troupe_files.tsv")))
if got_tree != exp_tree:
errors.append("troupe_tree.tsv differs (rows %d vs %d)"
% (len(got_tree), len(exp_tree)))
if got_exts != exp_exts:
errors.append("troupe_exts.tsv differs (rows %d vs %d)" % (len(got_exts), len(exp_exts)))
if got_files != exp_files:
errors.append("troupe_files.tsv differs (rows %d vs %d)" % (len(got_files), len(exp_files)))
# 3) README headline claims
readme = open(os.path.join(OUT, "README.md")).read()
checks = {
"pinned sha": pinned in readme,
"total": ("**5104**" in readme),
"dir_groups": ("**211**" in readme),
"ext_groups": ("**34**" in readme),
"top dir": "wizard-work/sphinx/archive-memgallery-2026-10-21/figures=635" in readme,
"top ext": ".py=1358" in readme,
}
for k, ok in checks.items():
if not ok:
errors.append("README missing '%s'" % k)
if errors:
print("FAIL")
for e in errors:
print(" - " + e)
sys.exit(1)
print("PASS")
print(" pinned_sha=%s" % pinned)
print(" tracked_files=%d dir_groups=%d ext_groups=%d"
% (len(paths), len(tree), len(exts)))
print(" all three tables match a fresh recompute from pinned sha")
sys.exit(0)
if __name__ == "__main__":
main()
@@ -0,0 +1,21 @@
rank,country,population_2026_07,gdp_2026_usd_m,gdp_per_capita_usd
1,United States,341784857,32642373,95505
2,China,1404890000,21546403,15336
3,Germany,83298787,5471299,65682
4,Japan,122690000,4341986,35389
5,United Kingdom,69487000,4268446,61427
6,India,1429404000,4060207,2840
7,France,69081996,3554155,51448
8,Russia,146028325,2861156,19593
9,Italy,58949500,2701737,45831
10,Brazil,214211951,2654761,12393
11,Canada,41798407,2490256,59577
12,South Korea,51088284,2245847,43960
13,Mexico,131231919,2176236,16583
14,Australia,27921150,2110657,75593
15,Spain,49801559,2085276,41871
16,Turkey,86092168,1817987,21116
17,Indonesia,290125073,1479954,5101
18,Netherlands,18192693,1423856,78265
19,Saudi Arabia,35300280,1343346,38054
20,Switzerland,9154896,1135739,124058
1 rank country population_2026_07 gdp_2026_usd_m gdp_per_capita_usd
2 1 United States 341784857 32642373 95505
3 2 China 1404890000 21546403 15336
4 3 Germany 83298787 5471299 65682
5 4 Japan 122690000 4341986 35389
6 5 United Kingdom 69487000 4268446 61427
7 6 India 1429404000 4060207 2840
8 7 France 69081996 3554155 51448
9 8 Russia 146028325 2861156 19593
10 9 Italy 58949500 2701737 45831
11 10 Brazil 214211951 2654761 12393
12 11 Canada 41798407 2490256 59577
13 12 South Korea 51088284 2245847 43960
14 13 Mexico 131231919 2176236 16583
15 14 Australia 27921150 2110657 75593
16 15 Spain 49801559 2085276 41871
17 16 Turkey 86092168 1817987 21116
18 17 Indonesia 290125073 1479954 5101
19 18 Netherlands 18192693 1423856 78265
20 19 Saudi Arabia 35300280 1343346 38054
21 20 Switzerland 9154896 1135739 124058
@@ -0,0 +1,28 @@
# Extract lane — top-20 GDP-per-capita table (2026-11-04)
Derived from two committed reference files (no external fetch):
- `gdp_nominal_2026.csv` — nominal GDP by country, latest year (USD millions), no header.
- `countries_population_2026-07.csv` — UN population mid-2026 estimate, header row.
## Derived table
`2026-11-04-gdp-per-capita-top20.csv` — top 20 economies by 2026 nominal GDP,
joined to population, with exact integer GDP-per-capita USD:
`(gdp_2026_usd_m * 1_000_000) // population`.
## Columns
| column | source |
| --- | --- |
| rank | positional, descending GDP |
| country | GDP table name |
| population_2026_07 | UN estimate (countries_population_2026-07.csv) |
| gdp_2026_usd_m | raw GDP column of gdp_nominal_2026.csv |
| gdp_per_capita_usd | exact integer USD |
## Verification
`CHECK-2026-11-04-gdp-per-capita.py` recomputes the table from the two source CSVs
and compares cell-by-cell to the committed CSV. Exit 0 = pass, 1 = mismatch, 2 = ungradable.
@@ -0,0 +1,97 @@
#!/usr/bin/env python3
"""CHECK -- ledger: top-20 GDP-per-capita table, 2026-11-04 (extract lane).
Exit code = verdict (0 pass, 1 fault, 2 ungradable):
0 committed CSV matches the table recomputed cell-by-cell from the two
source CSVs (gdp_nominal_2026.csv, countries_population_2026-07.csv).
1 mismatch (header, row count, or per-cell value).
2 ungradable (source file unreadable or malformed).
"""
import csv
import sys
HERE = '/root/troupe-standup/wizard-work/ledger'
GDP = HERE + '/gdp_nominal_2026.csv'
POP = HERE + '/countries_population_2026-07.csv'
CSV_PATH = HERE + '/2026-11-04-gdp-per-capita-top20.csv'
HEADER = ['rank', 'country', 'population_2026_07', 'gdp_2026_usd_m',
'gdp_per_capita_usd']
def read_gdp():
with open(GDP, encoding='utf-8') as f:
return list(csv.reader(f))
def read_population():
with open(POP, encoding='utf-8') as f:
return list(csv.DictReader(f))
def recompute():
gdp = read_gdp()
pop = read_population()
pop_by_name = {}
for r in pop:
pop_by_name.setdefault(r['country'].strip().lower(), []).append(r['population'])
def key(row):
v = row[1].replace(',', '')
return -int(v) if v.isdigit() else 0
top = [r for r in sorted(gdp, key=key) if r[0].strip() != 'World'][:20]
rows = []
for i, r in enumerate(top, start=1):
name = r[0].strip()
gdp_m = int(r[1].replace(',', ''))
hits = pop_by_name.get(name.lower())
if not hits:
raise RuntimeError('no population for %r' % name)
population = hits[0]
per_cap = (gdp_m * 1_000_000) // int(population)
rows.append([str(i), name, population, str(gdp_m), str(per_cap)])
return rows
def main():
try:
expected = recompute()
except Exception as exc: # noqa: BLE001
print('UNGRADABLE: ' + repr(exc))
return 2
try:
with open(CSV_PATH, newline='', encoding='utf-8') as f:
lines = [ln.rstrip('\n') for ln in f]
except Exception as exc: # noqa: BLE001
print('UNGRADABLE: cannot read CSV: ' + repr(exc))
return 2
if not lines:
print('FAIL: committed CSV is empty')
return 1
header = lines[0].split(',')
if header != HEADER:
print('FAIL: header mismatch: ' + repr(header))
return 1
body = [ln.split(',') for ln in lines[1:]]
if len(body) != len(expected):
print('FAIL: row count %d != expected %d' % (len(body), len(expected)))
return 1
for i, (act, exp) in enumerate(zip(body, expected)):
for col, exp_val in zip(HEADER, exp):
if act[HEADER.index(col)] != exp_val:
print('FAIL row %d col %s: %r != %r' % (i, col,
act[HEADER.index(col)], exp_val))
return 1
print('PASS: %d rows match source-derived table; header exact' % len(body))
return 0
if __name__ == '__main__':
sys.exit(main())
+103
View File
@@ -0,0 +1,103 @@
#!/usr/bin/env python3
"""Re-verification test for the ledger repo-extraction artifact.
Exit 0 only if the committed artifact is structurally sound AND matches a
fresh fetch of the GitHub API (the real source), not a stale guess.
"""
import csv
import json
import sys
import urllib.parse
import urllib.request
from datetime import datetime, timezone
REPO_DIR = sys.argv[1] if len(sys.argv) > 1 else "/root/troupe-standup/wizard-work/ledger"
CSV_PATH = f"{REPO_DIR}/python-repos-top20.csv"
JSON_PATH = f"{REPO_DIR}/python-repos-top20.json"
def fetch(url):
req = urllib.request.Request(url, headers={"User-Agent": "ledger-wizard"})
with urllib.request.urlopen(req, timeout=60) as r:
return json.loads(r.read().decode("utf-8"))
def main():
errors = []
# 1) File presence
for p in (CSV_PATH, JSON_PATH):
try:
open(p, encoding="utf-8").close()
except FileNotFoundError:
errors.append(f"missing {p}")
if errors:
print("FAIL: " + "; ".join(errors))
return 1
# 2) JSON shape
with open(JSON_PATH, encoding="utf-8") as f:
payload = json.load(f)
rows = payload.get("rows")
if not isinstance(rows, list) or len(rows) != 20:
errors.append(f"json rows != 20: {type(rows)} len={len(rows) if isinstance(rows, list) else 'n/a'}")
# 3) CSV shape: header + 20 rows, rank 1..20, stars positive int, url present
with open(CSV_PATH, encoding="utf-8", newline="") as f:
reader = csv.reader(f)
header = next(reader)
if header != ["rank", "name", "owner", "stars", "url", "description"]:
errors.append(f"csv header {header}")
csv_rows = list(reader)
if len(csv_rows) != 20:
errors.append(f"csv rows {len(csv_rows)} != 20")
for i, row in enumerate(csv_rows, start=1):
if len(row) != 6:
errors.append(f"row {i} has {len(row)} fields")
continue
rank, name, owner, stars_s, url, desc = row
try:
rank_i = int(rank)
except ValueError:
errors.append(f"row {i} rank not int: {rank!r}")
rank_i = None
if rank_i != i:
errors.append(f"row {i} rank {rank_i} != sequence {i}")
if not stars_s.isdigit() or int(stars_s) <= 0:
errors.append(f"row {i} stars not positive int: {stars_s!r}")
if not url.startswith("https://github.com/"):
errors.append(f"row {i} url malformed: {url!r}")
# 4) Cross-check vs fresh API fetch (the actual evidence source)
try:
q = urllib.parse.quote("language:python")
url = f"https://api.github.com/search/repositories?q={q}&sort=stars&order=desc&per_page=20"
data = fetch(url)
if data.get("incomplete_results"):
errors.append("api returned incomplete_results=true")
api_rows = [
{"full_name": it["full_name"], "stars": it["stargazers_count"]}
for it in data.get("items", [])
]
file_rows = [(r["full_name"], r["stars"]) for r in rows]
if api_rows != file_rows:
errors.append(f"api mismatch: {len(api_rows)} api rows vs {len(file_rows)} file rows")
for a, b in zip(api_rows, file_rows):
if a != b:
errors.append(f" first mismatch: api={a} file={b}")
break
except Exception as exc: # noqa: BLE001
errors.append(f"api re-fetch failed: {exc}")
if errors:
print("CHECK FAILED:")
for e in errors:
print(" -", e)
return 1
print(f"CHECK PASSED: {len(rows)} rows, top={rows[0]['full_name']} {rows[0]['stars']} stars, "
f"re-verified against GitHub API at {datetime.now(timezone.utc).isoformat()}")
return 0
if __name__ == "__main__":
sys.exit(main())
@@ -0,0 +1,100 @@
#!/usr/bin/env python3
"""Extract a ranked file-extension census for the committed ledger directory.
Source of truth: the committed inventory file `wizard-work/ledger/repo_files.tsv`,
a (rank, path) inventory of the troupe worktree. Only rows whose path lives under
`wizard-work/ledger/` are counted.
Normalization: take the basename, lower-case the suffix, leading dot on the
suffix unless there is none, which is emitted as the literal "(none)".
Output (ledger-dir-census.csv):
rank,extension,file_count
1,.py,217
...
and ledger-dir-census.md (ranked table + totals).
Run: python3 extract_ledger_dir_census.py
"""
import csv
import os
import sys
from collections import Counter
REPO = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
LEDGER_DIR = os.path.join(REPO, "wizard-work", "ledger")
SRC = os.path.join(LEDGER_DIR, "repo_files.tsv")
OUT_CSV = os.path.join(LEDGER_DIR, "ledger-dir-census.csv")
OUT_MD = os.path.join(LEDGER_DIR, "ledger-dir-census.md")
def clean_path(raw):
s = raw.strip()
if len(s) >= 2 and s[0] == '"' and s[-1] == '"':
s = s[1:-1]
s = s.encode("latin-1").decode("unicode_escape", "replace")
return s
def ext_of(path):
base = os.path.basename(path.rstrip("/"))
if not base or base in (".", ".."):
return "(none)"
if "." in base:
return "." + base.rsplit(".", 1)[1].lower()
return "(none)"
def main():
counts = Counter()
total = 0
with open(SRC, "r", encoding="utf-8", errors="replace") as f:
for line in f:
line = line.rstrip("\n").rstrip("\r")
if "\t" not in line:
continue
rank, path = line.split("\t", 1)
path = clean_path(path)
if not path.startswith("wizard-work/ledger/"):
continue
total += 1
counts[ext_of(path)] += 1
ordered = sorted(counts.items(), key=lambda kv: (-kv[1], kv[0]))
with open(OUT_CSV, "w", newline="", encoding="utf-8") as f:
w = csv.writer(f)
w.writerow(["rank", "extension", "file_count"])
for i, (ext, n) in enumerate(ordered, 1):
w.writerow([i, ext, n])
md = [
"# Ledger directory census",
"",
"Ranked census of file extensions inside `wizard-work/ledger/`,",
"re-derived from the committed inventory `repo_files.tsv` by",
"`extract_ledger_dir_census.py`.",
"",
"| rank | extension | file_count |",
"|---|---|---|",
]
for i, (ext, n) in enumerate(ordered, 1):
md.append("| %d | %s | %d |" % (i, ext, n))
md += [
"",
"**Total files: %d**" % total,
"**Unique extensions: %d**" % len(ordered),
"",
]
with open(OUT_MD, "w", encoding="utf-8") as f:
f.write("\n".join(md))
print("rows=%d total_files=%d extensions=%d" % (total, total, len(ordered)))
print("top10=%s" % ordered[:10])
return 0
if __name__ == "__main__":
sys.exit(main())
+62
View File
@@ -0,0 +1,62 @@
#!/usr/bin/env python3
"""Fetch the top 20 most-starred public Python repos and write the artifact."""
import json
import urllib.request
import urllib.parse
from datetime import datetime, timezone
OUT = "/root/.hermes/wizard-outputs/ledger/python-repos-top20.json"
CSV_OUT = "/root/.hermes/wizard-outputs/ledger/python-repos-top20.csv"
QUERY = "language:python"
PAGE = 20
def fetch(url):
req = urllib.request.Request(url, headers={"User-Agent": "ledger-wizard"})
with urllib.request.urlopen(req, timeout=60) as r:
return json.loads(r.read().decode("utf-8"))
def main():
q = urllib.parse.quote(QUERY)
url = f"https://api.github.com/search/repositories?q={q}&sort=stars&order=desc&per_page={PAGE}"
data = fetch(url)
items = data.get("items", [])
# search API returns already-ordered by stars desc; we still enforce order.
rows = []
for i, it in enumerate(items, start=1):
rows.append({
"rank": i,
"name": it["name"],
"full_name": it["full_name"],
"owner": it["owner"]["login"],
"stars": it["stargazers_count"],
"url": it["html_url"],
"description": (it.get("description") or "").replace("\n", " ")[:400],
})
payload = {
"source": "https://api.github.com/search/repositories",
"query": f"language:python sort:stars order:desc per_page={PAGE}",
"total_count": data.get("total_count"),
"incomplete_results": data.get("incomplete_results"),
"fetched_at": datetime.now(timezone.utc).isoformat(),
"rows": rows,
}
with open(OUT, "w", encoding="utf-8") as f:
json.dump(payload, f, indent=2)
with open(CSV_OUT, "w", encoding="utf-8") as f:
f.write("rank,name,owner,stars,url,description\n")
for r in rows:
desc = r["description"].replace(",", " ").replace("\n", " ")
f.write(f'{r["rank"]},{r["name"]},{r["owner"]},{r["stars"]},{r["url"]},{desc}\n')
print(f"wrote {OUT}")
print(f"wrote {CSV_OUT}")
print(f"total_count={payload['total_count']} rows={len(rows)} top_stars={rows[0]['stars']}")
print("top:", rows[0]["full_name"], rows[0]["stars"])
if __name__ == "__main__":
main()
+11
View File
@@ -0,0 +1,11 @@
rank,extension,file_count
1,.py,58
2,.md,54
3,.csv,43
4,.json,38
5,.tsv,9
6,(none),4
7,.sh,4
8,.txt,2
9,.check,1
10,.md5,1
1 rank extension file_count
2 1 .py 58
3 2 .md 54
4 3 .csv 43
5 4 .json 38
6 5 .tsv 9
7 6 (none) 4
8 7 .sh 4
9 8 .txt 2
10 9 .check 1
11 10 .md5 1
+21
View File
@@ -0,0 +1,21 @@
# Ledger directory census
Ranked census of file extensions inside `wizard-work/ledger/`,
re-derived from the committed inventory `repo_files.tsv` by
`extract_ledger_dir_census.py`.
| rank | extension | file_count |
|---|---|---|
| 1 | .py | 58 |
| 2 | .md | 54 |
| 3 | .csv | 43 |
| 4 | .json | 38 |
| 5 | .tsv | 9 |
| 6 | (none) | 4 |
| 7 | .sh | 4 |
| 8 | .txt | 2 |
| 9 | .check | 1 |
| 10 | .md5 | 1 |
**Total files: 214**
**Unique extensions: 10**
+21
View File
@@ -0,0 +1,21 @@
rank,name,owner,stars,url,description
1,public-apis,public-apis,495850,https://github.com/public-apis/public-apis,A collective list of free APIs
2,free-programming-books,EbookFoundation,400821,https://github.com/EbookFoundation/free-programming-books,:books: Freely available programming books
3,system-design-primer,donnemartin,376707,https://github.com/donnemartin/system-design-primer,Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
4,awesome-python,vinta,332261,https://github.com/vinta/awesome-python,The definitive list that answers "I want to do X in Python which tool should I use?"
5,project-based-learning,practical-tutorials,288939,https://github.com/practical-tutorials/project-based-learning,Curated list of project-based tutorials
6,hermes-agent,NousResearch,260246,https://github.com/NousResearch/hermes-agent,The agent that grows with you
7,Python,TheAlgorithms,225827,https://github.com/TheAlgorithms/Python,All Algorithms implemented in Python
8,yt-dlp,yt-dlp,205006,https://github.com/yt-dlp/yt-dlp,A feature-rich command-line audio/video downloader
9,markitdown,microsoft,193733,https://github.com/microsoft/markitdown,Python tool for converting files and office documents to Markdown.
10,AutoGPT,Significant-Gravitas,187888,https://github.com/Significant-Gravitas/AutoGPT,AutoGPT is the vision of accessible AI for everyone to use and to build on. Our mission is to provide the tools so that you can focus on what matters.
11,skills,anthropics,187099,https://github.com/anthropics/skills,Public repository for Agent Skills
12,HelloGitHub,521xueweihan,186641,https://github.com/521xueweihan/HelloGitHub,:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting entry-level open source projects on GitHub.
13,transformers,huggingface,168504,https://github.com/huggingface/transformers,🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text vision audio and multimodal models for both inference and training.
14,stable-diffusion-webui,AUTOMATIC1111,165236,https://github.com/AUTOMATIC1111/stable-diffusion-webui,Stable Diffusion web UI
15,dify,langgenius,160343,https://github.com/langgenius/dify,Build Agentic workflows RAG pipelines with rich AI model and tool support on one collaborative workspace. Deploy on cloud VPC or self-hosted so teams move from prototype to production without rebuilding the stack.
16,langflow,langflow-ai,156303,https://github.com/langflow-ai/langflow,Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
17,langchain,langchain-ai,148970,https://github.com/langchain-ai/langchain,The agent engineering platform.
18,spec-kit,github,146621,https://github.com/github/spec-kit,💫 Toolkit to help you get started with SDD or any other process!
19,ComfyUI,Comfy-Org,144869,https://github.com/Comfy-Org/ComfyUI,The most powerful and modular diffusion model GUI api and backend with a graph/nodes interface. The fastest local inference engine in the world.
20,ui-ux-pro-max-skill,nextlevelbuilder,144753,https://github.com/nextlevelbuilder/ui-ux-pro-max-skill,An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
Can't render this file because it contains an unexpected character in line 5 and column 104.
+189
View File
@@ -0,0 +1,189 @@
{
"source": "https://api.github.com/search/repositories",
"query": "language:python sort:stars order:desc per_page=20",
"total_count": 35653192,
"incomplete_results": false,
"fetched_at": "2026-11-03T23:14:06.403679+00:00",
"rows": [
{
"rank": 1,
"name": "public-apis",
"full_name": "public-apis/public-apis",
"owner": "public-apis",
"stars": 495850,
"url": "https://github.com/public-apis/public-apis",
"description": "A collective list of free APIs"
},
{
"rank": 2,
"name": "free-programming-books",
"full_name": "EbookFoundation/free-programming-books",
"owner": "EbookFoundation",
"stars": 400821,
"url": "https://github.com/EbookFoundation/free-programming-books",
"description": ":books: Freely available programming books"
},
{
"rank": 3,
"name": "system-design-primer",
"full_name": "donnemartin/system-design-primer",
"owner": "donnemartin",
"stars": 376707,
"url": "https://github.com/donnemartin/system-design-primer",
"description": "Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards."
},
{
"rank": 4,
"name": "awesome-python",
"full_name": "vinta/awesome-python",
"owner": "vinta",
"stars": 332261,
"url": "https://github.com/vinta/awesome-python",
"description": "The definitive list that answers \"I want to do X in Python, which tool should I use?\""
},
{
"rank": 5,
"name": "project-based-learning",
"full_name": "practical-tutorials/project-based-learning",
"owner": "practical-tutorials",
"stars": 288939,
"url": "https://github.com/practical-tutorials/project-based-learning",
"description": "Curated list of project-based tutorials"
},
{
"rank": 6,
"name": "hermes-agent",
"full_name": "NousResearch/hermes-agent",
"owner": "NousResearch",
"stars": 260246,
"url": "https://github.com/NousResearch/hermes-agent",
"description": "The agent that grows with you"
},
{
"rank": 7,
"name": "Python",
"full_name": "TheAlgorithms/Python",
"owner": "TheAlgorithms",
"stars": 225827,
"url": "https://github.com/TheAlgorithms/Python",
"description": "All Algorithms implemented in Python"
},
{
"rank": 8,
"name": "yt-dlp",
"full_name": "yt-dlp/yt-dlp",
"owner": "yt-dlp",
"stars": 205006,
"url": "https://github.com/yt-dlp/yt-dlp",
"description": "A feature-rich command-line audio/video downloader"
},
{
"rank": 9,
"name": "markitdown",
"full_name": "microsoft/markitdown",
"owner": "microsoft",
"stars": 193733,
"url": "https://github.com/microsoft/markitdown",
"description": "Python tool for converting files and office documents to Markdown."
},
{
"rank": 10,
"name": "AutoGPT",
"full_name": "Significant-Gravitas/AutoGPT",
"owner": "Significant-Gravitas",
"stars": 187888,
"url": "https://github.com/Significant-Gravitas/AutoGPT",
"description": "AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters."
},
{
"rank": 11,
"name": "skills",
"full_name": "anthropics/skills",
"owner": "anthropics",
"stars": 187099,
"url": "https://github.com/anthropics/skills",
"description": "Public repository for Agent Skills"
},
{
"rank": 12,
"name": "HelloGitHub",
"full_name": "521xueweihan/HelloGitHub",
"owner": "521xueweihan",
"stars": 186641,
"url": "https://github.com/521xueweihan/HelloGitHub",
"description": ":octocat: \u5206\u4eab GitHub \u4e0a\u6709\u8da3\u3001\u5165\u95e8\u7ea7\u7684\u5f00\u6e90\u9879\u76ee\u3002Share interesting, entry-level open source projects on GitHub."
},
{
"rank": 13,
"name": "transformers",
"full_name": "huggingface/transformers",
"owner": "huggingface",
"stars": 168504,
"url": "https://github.com/huggingface/transformers",
"description": "\ud83e\udd17 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training. "
},
{
"rank": 14,
"name": "stable-diffusion-webui",
"full_name": "AUTOMATIC1111/stable-diffusion-webui",
"owner": "AUTOMATIC1111",
"stars": 165236,
"url": "https://github.com/AUTOMATIC1111/stable-diffusion-webui",
"description": "Stable Diffusion web UI"
},
{
"rank": 15,
"name": "dify",
"full_name": "langgenius/dify",
"owner": "langgenius",
"stars": 160343,
"url": "https://github.com/langgenius/dify",
"description": "Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack."
},
{
"rank": 16,
"name": "langflow",
"full_name": "langflow-ai/langflow",
"owner": "langflow-ai",
"stars": 156303,
"url": "https://github.com/langflow-ai/langflow",
"description": "Langflow is a powerful tool for building and deploying AI-powered agents and workflows."
},
{
"rank": 17,
"name": "langchain",
"full_name": "langchain-ai/langchain",
"owner": "langchain-ai",
"stars": 148970,
"url": "https://github.com/langchain-ai/langchain",
"description": "The agent engineering platform."
},
{
"rank": 18,
"name": "spec-kit",
"full_name": "github/spec-kit",
"owner": "github",
"stars": 146621,
"url": "https://github.com/github/spec-kit",
"description": "\ud83d\udcab Toolkit to help you get started with SDD or any other process!"
},
{
"rank": 19,
"name": "ComfyUI",
"full_name": "Comfy-Org/ComfyUI",
"owner": "Comfy-Org",
"stars": 144869,
"url": "https://github.com/Comfy-Org/ComfyUI",
"description": "The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world."
},
{
"rank": 20,
"name": "ui-ux-pro-max-skill",
"full_name": "nextlevelbuilder/ui-ux-pro-max-skill",
"owner": "nextlevelbuilder",
"stars": 144753,
"url": "https://github.com/nextlevelbuilder/ui-ux-pro-max-skill",
"description": "An AI skill that provides design intelligence for building professional UI/UX across multiple platforms."
}
]
}
+72
View File
@@ -0,0 +1,72 @@
#!/usr/bin/env python3
"""Independent ground-truth cross-check for the ledger extension census.
Walks `wizard-work/ledger/` two ways:
(A) os.walk
(B) `find -type f` via subprocess
and prints per-extension counts for each, plus the files that differ.
Exit 0 = both methods agree exactly.
"""
import os
import subprocess
import sys
from collections import Counter
ROOT = "wizard-work/ledger"
def ext_of(name):
if "." in name:
return "." + name.rsplit(".", 1)[1].lower()
return "(none)"
def via_oswalk():
c = Counter()
files = []
for dp, dn, fns in os.walk(ROOT):
for f in fns:
files.append(os.path.join(dp, f))
c[ext_of(f)] += 1
return c, files
def via_find():
out = subprocess.run(
["find", ROOT, "-type", "f"],
capture_output=True, text=True, check=True,
)
c = Counter()
files = []
for line in out.stdout.splitlines():
if not line:
continue
files.append(line)
c[ext_of(os.path.basename(line))] += 1
return c, files
def main():
a_c, a_files = via_oswalk()
b_c, b_files = via_find()
print("os.walk total=%d find total=%d" % (len(a_files), len(b_files)))
all_exts = sorted(set(a_c) | set(b_c))
for ext in sorted(all_exts, key=lambda e: (-a_c[e], e)):
print("%-10s oswalk=%d find=%d" % (ext, a_c.get(ext, 0), b_c.get(ext, 0)))
only_a = set(a_files) - set(b_files)
only_b = set(b_files) - set(a_files)
if only_a:
print("ONLY os.walk (%d):" % len(only_a))
for p in sorted(only_a):
print(" " + p)
if only_b:
print("ONLY find (%d):" % len(only_b))
for p in sorted(only_b):
print(" " + p)
if not only_a and not only_b:
print("AGREE: no file differences")
return 0 if (not only_a and not only_b) else 1
if __name__ == "__main__":
sys.exit(main())