In this section
- Pager render · claude / sessions/202609040030-ab-discovery/pager.py lines 1–39
- Probe render · claude / sessions/202609040030-ab-discovery/probe.py lines 1–124
- Show ingest · claude / sessions/202609040030-ab-discovery/show.py lines 1–53
- T2show ingest · claude / sessions/202609040030-ab-discovery/t2show.py lines 1–15
- Timeline render · claude / sessions/202609040030-ab-discovery/timeline.py lines 1–156
- Timeline2 render · claude / sessions/202609040030-ab-discovery/timeline2.py lines 1–174
- Tlshow ingest · claude / sessions/202609040030-ab-discovery/tlshow.py lines 1–20
- Features docs-config · code-generator / spider/features.yml lines 1–12
Pager
A Python module in the sessions folder of Claude covering solar.
renderclaude / sessions/202609040030-ab-discovery/pager.py · lines 1–39 of 39 · version 2026-09-04 00:30 · Not reached from any entry point (candidate for review)
- What it does
- It lists and searches solar. Uses libraries json, sys, time, clicker. Side effects: changes the web page (DOM).
- Why it exists in the grid workflow
- Domain stage agent_infra (repository name word 'claude'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief). Domain terms in the code: solar.
- Inputs & outputs
- In: command-line arguments.
- What it achieves
- Does NEXT 50 move 50 rows, on a window that says 1-100?
- Why it matters
- No other file in the estate was found to import it.
- Application
- claude · sessions/202609040030-ab-discovery · Python module
- Uses
- json, sys, time, clicker
- Used by
- none found
- Produces
- none declared
- Defines here
- none
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- claude@df9da02425fdf0c65d11a84f32cd9b3ef927b309 sessions/202609040030-ab-discovery/pager.py:1-39 · blob c1c048aff759292a88e25efca826cd64caa9792e · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom · domain stage: agent_infra · users: ai_agent · canonical: unreached_review
"""Does NEXT 50 move 50 rows, on a window that says 1-100?"""
import json, sys, time
sys.path.insert(0, r'C:\Users\vikra\OneDrive\Documents\GitHub\claude\familiars')
from clicker import Browser, PROBE_VISIBLE
BASE = 'http://127.0.0.1:8971/releases/%s-pipelinenews/index.html'
gen, port = sys.argv[1], int(sys.argv[2])
READ = ("({pager:(document.getElementById('projectWindowControls')||{}).textContent"
".replace(/\s+/g,' ').trim(),"
" rows:document.querySelectorAll('#tbody tr').length,"
" first:(document.querySelector('#tbody tr td')||{}).textContent,"
" cap:(()=>{const t=document.querySelector('#tbody tr');"
"return t?t.children[7].textContent.trim():null;})(),"
" units:[...new Set([...document.querySelectorAll('#tbody tr')]"
".map(t=>(t.children[7].textContent.match(/[A-Za-z]+$/)||[''])[0]))]})")
b = Browser(port, mobile=False, headless=True)
out = {'gen': gen, 'utc': time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())}
try:
b.setup(); b.arm()
for m in ('Browser.setDownloadBehavior','Page.setDownloadBehavior'):
try: b.send(m, behavior='deny')
except Exception: pass
b.go(BASE % gen, settle=8.0)
v = b.js(PROBE_VISIBLE)
assert isinstance(v, dict) and v.get('hidden') is False, v
b.js("document.querySelectorAll('#tech button')[1].click()") # SOLAR
time.sleep(1.3)
out['page1'] = b.js(READ)
b.js("[...document.querySelectorAll('#projectWindowControls button')]"
".filter(x=>/NEXT/i.test(x.textContent))[0].click()")
time.sleep(1.3)
out['page2'] = b.js(READ)
# units across the whole spine, not just solar
b.js("document.querySelectorAll('#tech button')[0].click()") # ALL TECH
time.sleep(1.3)
out['alltech'] = b.js(READ)
out['errs'] = b.js('(window.__errs||[]).slice(0,6)')
finally:
b.close()
print(json.dumps(out, indent=1, ensure_ascii=False))Probe
A Python command-line tool in the sessions folder of Claude that reads solar.
renderclaude / sessions/202609040030-ab-discovery/probe.py · lines 1–124 of 124 · version 2026-09-04 00:30 · Entry point
- What it does
- It loads solar. Defines main. Uses libraries argparse, json, os, sys, time. Side effects: changes the web page (DOM); reads or writes files.
- Why it exists in the grid workflow
- Domain stage agent_infra (repository name word 'claude'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief). Domain terms in the code: solar.
- Inputs & outputs
- In: command-line arguments. Out: JSON file.
- Downstream impact
- It is itself an entry point (Python CLI); no other file was found loading it.
- What it achieves
- A short, targeted read of one release. Its code works with 0 MW. It accepts `--port`, `--gen` and `--out`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- claude · sessions/202609040030-ab-discovery · Python CLI
- Uses
- argparse, json, os, sys, time, clicker
- Used by
- none found
- Produces
- main
- Defines here
- main
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- claude@df9da02425fdf0c65d11a84f32cd9b3ef927b309 sessions/202609040030-ab-discovery/probe.py:1-124 · blob a22853cde82d0dea86b59bf3485e61de6362324d · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: agent_infra · users: ai_agent · canonical: unknown
"""A short, targeted read of one release. Whatever the last round left open.
Round 2 raised three questions a summary could not answer: what exactly the
solar rows' capacity cell says next to the capacity the MAP link carries; what
pager controls exist beside "1-50 of 275"; and whether the export strip warns a
reader BEFORE the click that the cut on screen cannot be exported.
"""
import argparse
import json
import os
import sys
import time
sys.path.insert(0, r'C:\Users\vikra\OneDrive\Documents\GitHub\claude\familiars')
from clicker import Browser, PROBE_VISIBLE # noqa: E402
BASE = 'http://127.0.0.1:8971/releases/%s-pipelinenews/index.html'
CAP_PAIRS = r"""(() => {
return [...document.querySelectorAll('#tbody tr')].slice(0, 8).map(tr => {
const c = [...tr.children].map(td => (td.textContent || '').replace(/\s+/g, ' ').trim());
const a = [...tr.querySelectorAll('a')].filter(x => /\bMAP\b/i.test(x.textContent || ''))[0];
const u = a ? new URL(a.getAttribute('href'), location.href) : null;
return {name: c[0].slice(0, 30), cell_cap: c[7], cell_tech: c[5],
link_cap: u ? u.searchParams.get('capacity_mw') : null,
link_tech: u ? u.searchParams.get('technology') : null,
link_zoom: u ? u.searchParams.get('zoom') : null,
link_lat: u ? u.searchParams.get('latitude') : null};
});
})()"""
PAGER = r"""(() => {
const host = document.getElementById('projectWindowControls');
if (!host) return null;
return {text: (host.textContent || '').replace(/\s+/g, ' ').trim().slice(0, 200),
controls: [...host.querySelectorAll('button,select,a')].map(e => {
const r = e.getBoundingClientRect();
return (e.tagName === 'SELECT'
? 'SELECT[' + [...e.options].map(o => o.textContent.trim()).join(',') + ']'
: (e.textContent || '').replace(/\s+/g, ' ').trim())
+ ' ' + Math.round(r.width) + 'x' + Math.round(r.height)
+ (e.disabled ? ' disabled' : ''); })};
})()"""
STRIP = r"""(() => {
const m = document.getElementById('exportMeta'), b = document.getElementById('exportInline');
const rb = b ? b.getBoundingClientRect() : null;
return {meta: m ? (m.textContent || '').replace(/\s+/g, ' ').trim() : null,
declined_class: m ? m.classList.contains('is-declined') : null,
declined_dataset: m ? (m.dataset.exportDeclinedColumns || null) : null,
btn_text: b ? (b.textContent || '').trim() : null,
btn_disabled: b ? !!b.disabled : null,
btn_aria: b ? b.getAttribute('aria-disabled') : null,
btn_size: rb ? Math.round(rb.width) + 'x' + Math.round(rb.height) : null};
})()"""
# the register's own stated floor, and what the cut on screen actually holds
FLOOR = r"""(() => {
const caps = [...document.querySelectorAll('#tbody tr')]
.map(tr => parseFloat(((tr.children[7] || {}).textContent || '').replace(/[^\d.]/g, '')))
.filter(v => !isNaN(v));
const body = (document.body.textContent || '').replace(/\s+/g, ' ');
const claim = (body.match(/every qualifying[^.]{0,60}/) || [])[0] || null;
const note = (document.getElementById('sizeNote') || {}).textContent || null;
return {rows_read: caps.length, min: caps.length ? Math.min(...caps) : null,
below_1mw: caps.filter(v => v < 1).length,
zero: caps.filter(v => v === 0).length,
stated_claim: claim, size_note: note ? note.replace(/\s+/g, ' ').trim() : null};
})()"""
def main():
ap = argparse.ArgumentParser()
ap.add_argument('--port', type=int, required=True)
ap.add_argument('--gen', required=True)
ap.add_argument('--out', required=True)
ap.add_argument('--mobile', action='store_true')
args = ap.parse_args()
b = Browser(args.port, mobile=args.mobile, headless=True)
res = {'generation': args.gen, 'mobile': args.mobile,
'utc': time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())}
try:
b.setup(); b.arm()
for m in ('Browser.setDownloadBehavior', 'Page.setDownloadBehavior'):
try:
b.send(m, behavior='deny')
except Exception:
pass
b.go(BASE % args.gen, settle=8.0)
vis = b.js(PROBE_VISIBLE)
if not isinstance(vis, dict) or vis.get('hidden') is not False:
res['ABORT'] = 'document.hidden was not false'
print(json.dumps(res)); return
b.js("document.querySelectorAll('#tech button')[1].click()") # SOLAR
time.sleep(1.3)
res['solar'] = {'cap_pairs': b.js(CAP_PAIRS), 'pager': b.js(PAGER),
'strip': b.js(STRIP), 'floor': b.js(FLOOR)}
# GEOTHERMAL: the cut whose counter reads 0 MW / largest 0 MW
res['geothermal_label'] = b.js(
"(()=>{const s=document.getElementById('widerTechnology');"
"if(!s)return null;const i=[...s.options].findIndex(o=>/GEOTHERMAL/i.test(o.textContent));"
"if(i<0)return null;s.selectedIndex=i;"
"s.dispatchEvent(new Event('change',{bubbles:true}));"
"return s.options[i].textContent.trim();})()")
time.sleep(1.5)
res['geothermal'] = {'cap_pairs': b.js(CAP_PAIRS), 'pager': b.js(PAGER),
'strip': b.js(STRIP), 'floor': b.js(FLOOR),
'counter': b.js("(document.getElementById('resultsMeta')||{}).textContent")}
res['shot'] = b.shot(os.path.join('shots', 'probe-%s-geothermal.png' % args.gen))
res['errs'] = b.js('(window.__errs||[]).slice(0,8)')
res['log'] = b.js('(window.__log||[]).slice(0,8)')
finally:
b.close()
with open(args.out, 'w', encoding='utf-8') as fh:
json.dump(res, fh, indent=1)
print('WROTE', args.out)
if __name__ == '__main__':
main()Show
A Python module in the sessions folder of Claude.
ingestclaude / sessions/202609040030-ab-discovery/show.py · lines 1–53 of 53 · version 2026-09-04 00:30 · Not reached from any entry point (candidate for review)
- What it does
- It loads data. Defines p. Uses libraries json, sys. Side effects: reads or writes files.
- Why it exists in the grid workflow
- Domain stage agent_infra (repository name word 'claude'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief).
- Inputs & outputs
- In: command-line arguments.
- What it achieves
- Print one A/B reading as a diff, not as two dumps.
- Why it matters
- No other file in the estate was found to import it.
- Application
- claude · sessions/202609040030-ab-discovery · Python module
- Uses
- json, sys
- Used by
- none found
- Produces
- p
- Defines here
- p
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- claude@df9da02425fdf0c65d11a84f32cd9b3ef927b309 sessions/202609040030-ab-discovery/show.py:1-53 · blob 765486566b07c06a7cb5fbe6f4f8b845dc8147c0 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: ingest · effects: filesystem · domain stage: agent_infra · users: ai_agent · canonical: unreached_review
"""Print one A/B reading as a diff, not as two dumps.
A finding is a difference. Printing both sides in full and asking a reader to
spot it is how a regression survives a review, so this prints only the keys
where A and B disagree, plus the keys a reader always wants regardless.
"""
import json
import sys
ALWAYS = ('counter', 'counter_dataset', 'v1', 'v2', 'v3', 'g1', 'g2', 'g3',
'exportMeta', 'export_dataset', 'row_count', 'pagination',
'map_cells_total', 'map_hrefs', 'map_cell_rect', 'table_scroll',
'wider_selected', 'widerFleetMeta', 'screens_tall', 'depth',
'gauge_canvas', 'errs', 'log', 'no_map_cells')
r = json.load(open(sys.argv[1], encoding='utf-8'))
buf = []
def p(*a):
buf.append(' '.join(str(x) for x in a))
p('#', sys.argv[1], r['viewport'], r['utc'])
A, B = r['A'], r['B']
p('A =', A['generation'], ' B =', B['generation'])
p('picks: spine', A.get('spine_pick'), '| wider', A.get('wider_pick'))
for st in ('at_rest', 'after_spine', 'after_wider'):
p('')
p('== %s ==' % st)
a, b = A.get(st) or {}, B.get(st) or {}
for k in ALWAYS:
va, vb = json.dumps(a.get(k)), json.dumps(b.get(k))
mark = ' ' if va == vb else '!!'
if va == vb:
p('%s %-16s %s' % (mark, k, va[:300]))
else:
p('%s %-16s A: %s' % (mark, k, va[:300]))
p('%s %-16s B: %s' % (mark, '', vb[:300]))
p('')
p('== share at table ==')
p('A', json.dumps(A.get('share_at_table')))
p('B', json.dumps(B.get('share_at_table')))
p('== export click (after a wider-fleet cut owns the table) ==')
p('A', json.dumps(A.get('export_click')))
p('B', json.dumps(B.get('export_click')))
p('== columns ==')
p(json.dumps((A.get('at_rest') or {}).get('columns')))
p('== first rows after wider ==')
p('A', json.dumps((A.get('after_wider') or {}).get('first_rows'))[:400])
p('B', json.dumps((B.get('after_wider') or {}).get('first_rows'))[:400])
p('== download guard ==', json.dumps(r.get('download_guard')))
sys.stdout.buffer.write('\n'.join(buf).encode('utf-8', 'replace'))T2show
A Python module in the sessions folder of Claude.
ingestclaude / sessions/202609040030-ab-discovery/t2show.py · lines 1–15 of 15 · version 2026-09-04 00:30 · Not reached from any entry point (candidate for review)
- What it does
- It loads data. Uses libraries json, sys. Side effects: reads or writes files.
- Why it exists in the grid workflow
- Domain stage agent_infra (repository name word 'claude'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief).
- Inputs & outputs
- In: command-line arguments.
- What it achieves
- No statement of purpose was found in the file, a README line naming it, or its name.
- Why it matters
- No other file in the estate was found to import it.
- Application
- claude · sessions/202609040030-ab-discovery · Python module
- Uses
- json, sys
- Used by
- none found
- Produces
- none declared
- Defines here
- none
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- claude@df9da02425fdf0c65d11a84f32cd9b3ef927b309 sessions/202609040030-ab-discovery/t2show.py:1-15 · blob cd503eac8f891098daeb308ae9b2a888e0a4853b · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: agent_infra · users: ai_agent · canonical: unreached_review
import json,sys
for f in sys.argv[1:]:
r=json.load(open(f,encoding='utf-8'))
b=['### %s profile=%s mobile=%s %s final_hidden=%s'%(f,r['profile'],r['mobile'],r['utc'],r.get('final_hidden'))]
for s in r['transitions']:
b.append(' t=%-6s ready=%-8s popups=%s sheet=%-5s ans_len=%-4s deep=%-9s loader=%-5s working=%-28s painted@0.78=%-24s ids=%s'%(
s.get('t_s'),s.get('ready'),s.get('n_popups'),s.get('sheet'),s.get('answer_len'),
s.get('deep'),s.get('loader_visible'),str(s.get('working_label'))[:28],
s.get('painted_at_answer'),s.get('identity_repeats')))
for p in s.get('popups') or []:
b.append(' popup cls=%-30s rect=%-20s z=%-5s measure=%-5s | %s'%(p['cls'][:30],json.dumps(p['rect']),p['z'],p['has_measure'],p['text'][:60]))
if s.get('search_bar'): b.append(' search_bar %s | %s'%(json.dumps(s['search_bar']['rect']),s['search_bar']['text'][:100]))
if s.get('errs'): b.append(' errs %s'%json.dumps(s['errs'])[:180])
b.append('')
sys.stdout.buffer.write(('\n'.join(b)+'\n').encode('utf-8','replace'))Timeline
A Python command-line tool in the sessions folder of Claude using data from the GridAtlas repository.
renderclaude / sessions/202609040030-ab-discovery/timeline.py · lines 1–156 of 156 · version 2026-09-04 00:30 · Entry point
- What it does
- It loads data. Defines main. Uses libraries argparse, json, os, sys, time. Side effects: changes the web page (DOM); reads or writes files.
- Why it exists in the grid workflow
- Domain stage agent_infra (repository name word 'claude'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief).
- Inputs & outputs
- In: data source: gridatlas data; command-line arguments. Out: JSON file.
- Downstream impact
- It is itself an entry point (Python CLI); no other file was found loading it.
- What it achieves
- When does the grid measurement appear, and what is on screen before it does? It accepts `--port`, `--profile` and `--mobile`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- claude · sessions/202609040030-ab-discovery · Python CLI
- Uses
- GridAtlas — Atlas Page (estate URL), argparse, json, os, sys, time, clicker
- Used by
- none found
- Produces
- main
- Defines here
- main
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- claude@df9da02425fdf0c65d11a84f32cd9b3ef927b309 sessions/202609040030-ab-discovery/timeline.py:1-156 · blob 1d82c70b7552921f945f3c67dcc853aa31129e98 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: agent_infra · users: ai_agent · canonical: unknown
"""When does the grid measurement appear, and what is on screen before it does?
The architect arrived at the live Atlas from Pipeline News and saw the identity
popup with no measurement. Two agents then measured the same URL and found the
measurement present. Both readings can be true: an END STATE cannot answer a
question about a TRANSIENT one. So this samples the DOM from the moment of
navigation rather than after it settles, on a cold profile and a throttled
link, and reports what a reader has on screen at each second.
It reports the timeline. It does not decide which of the three theories is
right - but a timeline distinguishes them: a timing gap shows the sheet
arriving late, a two-popup ordering fault shows the sheet present and covered
or off-screen from the first sample, and a real-device difference shows neither.
python timeline.py --port 9441 --profile slow-3g --mobile
"""
import argparse
import json
import os
import sys
import time
sys.path.insert(0, r'C:\Users\vikra\OneDrive\Documents\GitHub\claude\familiars')
from clicker import Browser # noqa: E402
URL = ('https://ventusltd.github.io/gridatlas/atlas/'
'?repd_ref=155&project=Markinch+Biomass+CHP+Plant&technology=biomass'
'&capacity_mw=65&latitude=56.20118&longitude=-3.16226&zoom=12')
# Chrome DevTools' own presets, so the numbers mean what a reader expects
PROFILES = {
'none': None,
'fast-4g': dict(latency=20, downloadThroughput=9000 * 1024 / 8,
uploadThroughput=9000 * 1024 / 8),
'slow-4g': dict(latency=150, downloadThroughput=1500 * 1024 / 8,
uploadThroughput=750 * 1024 / 8),
'slow-3g': dict(latency=400, downloadThroughput=400 * 1024 / 8,
uploadThroughput=400 * 1024 / 8),
}
SAMPLE = r"""(() => {
const rect = e => { const r = e.getBoundingClientRect();
return [Math.round(r.left), Math.round(r.top), Math.round(r.width), Math.round(r.height)]; };
const txt = e => e ? (e.textContent || '').replace(/\s+/g, ' ').trim() : null;
const sheet = document.querySelector('.gridatlas-sheet, .maplibregl-popup.gridatlas-sheet');
const answer = document.querySelector('.neon-answer');
const body = (document.body.textContent || '').replace(/\s+/g, ' ');
// every popup in the DOM, in paint order, with the stacking that decides
// which one a reader actually sees
const popups = [...document.querySelectorAll('.maplibregl-popup')].map((p, i) => {
const cs = getComputedStyle(p);
const r = rect(p);
return {i, cls: p.className, rect: r, z: cs.zIndex, display: cs.display,
opacity: cs.opacity, visibility: cs.visibility,
offscreen_below: r[1] > innerHeight,
offscreen_any: r[1] > innerHeight || r[1] + r[3] < 0
|| r[0] > innerWidth || r[0] + r[2] < 0,
text: txt(p).slice(0, 110)};
});
// what is actually painted at the middle of the viewport and at the card
const topAt = (x, y) => { const e = document.elementFromPoint(x, y);
if (!e) return null; let n = e, nm = '';
while (n && n !== document.body) {
if (n.className && typeof n.className === 'string' && n.className.trim()) {
nm = '.' + n.className.trim().split(/\s+/)[0]; break; }
if (n.id) { nm = '#' + n.id; break; }
n = n.parentElement; }
return nm || e.tagName.toLowerCase(); };
return {
hidden: document.hidden,
viewport: innerWidth + 'x' + innerHeight,
ready: document.readyState,
sheet_present: !!sheet,
sheet_rect: sheet ? rect(sheet) : null,
sheet_offscreen_below: sheet ? rect(sheet)[1] > innerHeight : null,
answer_present: !!answer,
answer_text: txt(answer) ? txt(answer).slice(0, 160) : null,
answer_rect: answer ? rect(answer) : null,
has_nearest: /Nearest/i.test(body),
has_km_straight: /km straight/i.test(body),
has_corridor: /corridor estimate/i.test(body),
measurement_line: (body.match(/Nearest[^·]{0,60}substation:[^|]{0,120}/) || [null])[0],
/* an absence that announces itself and an absence that is silent are
different products; this is the test for which one is on screen */
says_working: /computing|measuring|loading|working|resolving|please wait/i.test(body),
deep_link_state: document.body.dataset.gridatlasRepdDeepLink || null,
deep_link_ref: document.body.dataset.gridatlasRepdRef || null,
popups: popups,
popup_count: popups.length,
top_at_centre: topAt(innerWidth / 2, innerHeight / 2),
top_at_lower_third: topAt(innerWidth / 2, innerHeight * 0.75),
identity_repeats: (body.match(/Markinch Biomass CHP Plant/g) || []).length,
errs: (window.__errs || []).slice(0, 6),
};
})()"""
def main():
ap = argparse.ArgumentParser()
ap.add_argument('--port', type=int, required=True)
ap.add_argument('--profile', default='slow-4g', choices=sorted(PROFILES))
ap.add_argument('--mobile', action='store_true')
ap.add_argument('--out', required=True)
ap.add_argument('--shots', default='shots')
args = ap.parse_args()
os.makedirs(args.shots, exist_ok=True)
b = Browser(args.port, mobile=args.mobile, headless=True)
res = {'url': URL, 'profile': args.profile, 'mobile': args.mobile,
'utc': time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()), 'samples': []}
try:
b.setup()
b.arm()
b.send('Network.enable')
cond = PROFILES[args.profile]
if cond:
b.send('Network.emulateNetworkConditions', offline=False,
latency=cond['latency'],
downloadThroughput=cond['downloadThroughput'],
uploadThroughput=cond['uploadThroughput'])
res['throttle'] = cond
# settle=0: the whole point is to read BEFORE the page settles
t0 = time.time()
b.send('Page.navigate', url=URL)
try:
b.send('Page.bringToFront')
except Exception:
pass
for at in (1, 2, 3, 5, 7, 10, 15, 20, 30):
while time.time() - t0 < at:
time.sleep(0.05)
s = b.js(SAMPLE)
if isinstance(s, dict):
s['t_s'] = round(time.time() - t0, 2)
res['samples'].append({'at': at, 'reading': s})
if at in (2, 5, 10, 30):
res.setdefault('shots', []).append(b.shot(os.path.join(
args.shots, 'timeline-%s-%s-t%02d.png'
% (args.profile, 'm' if args.mobile else 'd', at))))
finally:
b.close()
with open(args.out, 'w', encoding='utf-8') as fh:
json.dump(res, fh, indent=1)
print('WROTE', args.out)
if __name__ == '__main__':
main()Timeline2
A Python command-line tool in the sessions folder of Claude using data from the GridAtlas repository. It is built from the key step (`key`).
renderclaude / sessions/202609040030-ab-discovery/timeline2.py · lines 1–174 of 174 · version 2026-09-04 00:30 · Entry point
- What it does
- It loads data. Defines key, main. Uses libraries argparse, json, os, sys, time. Side effects: changes the web page (DOM); reads or writes files.
- Why it exists in the grid workflow
- Domain stage agent_infra (repository name word 'claude'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief).
- Inputs & outputs
- In: data source: gridatlas data; command-line arguments. Out: JSON file.
- Downstream impact
- It is itself an entry point (Python CLI); no other file was found loading it.
- What it achieves
- The same arrival, sampled four times a second, reported as TRANSITIONS. Its code works with 1 Hz. It accepts `--port`, `--profile` and `--mobile`.
- Why it matters
- No other file in the estate was found to import it; it is an entry point.
- Application
- claude · sessions/202609040030-ab-discovery · Python CLI
- Uses
- GridAtlas — Atlas Page (estate URL), argparse, json, os, sys, time, clicker
- Used by
- none found
- Produces
- key, main
- Defines here
- key, main
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- claude@df9da02425fdf0c65d11a84f32cd9b3ef927b309 sessions/202609040030-ab-discovery/timeline2.py:1-174 · blob 6a6b8715c566b1378be493a922c107013a5bd114 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: output · effects: dom, filesystem · domain stage: agent_infra · users: ai_agent · canonical: unknown
"""The same arrival, sampled four times a second, reported as TRANSITIONS.
The one-second timeline answered "is it timing" (yes) and raised two questions
it could not answer: exactly when the sheet arrives, and whether there is ever a
window in which an identity popup is on screen WITHOUT the measurement -- which
is the state the architect photographed and the state a 1 Hz sample can walk
straight past.
So this samples every 250 ms and prints a line only when the state CHANGES. A
state here is deliberately narrow: which popups exist, whether the sheet is
present, whether the answer has text, what the deep-link dataset says, and what
is actually painted where the answer will be. Everything else is noise between
transitions.
`says_working` from the first pass was a false positive -- it matched the word
"loading" somewhere in the page's own static prose, at t=1 s, before anything
had happened. This asks a narrower question instead: is a VISIBLE element
telling the reader that work is in progress, and is it inside the card.
"""
import argparse
import json
import os
import sys
import time
sys.path.insert(0, r'C:\Users\vikra\OneDrive\Documents\GitHub\claude\familiars')
from clicker import Browser # noqa: E402
URL = ('https://ventusltd.github.io/gridatlas/atlas/'
'?repd_ref=155&project=Markinch+Biomass+CHP+Plant&technology=biomass'
'&capacity_mw=65&latitude=56.20118&longitude=-3.16226&zoom=12')
PROFILES = {
'none': None,
'slow-4g': dict(latency=150, downloadThroughput=1500 * 1024 / 8,
uploadThroughput=750 * 1024 / 8),
'slow-3g': dict(latency=400, downloadThroughput=400 * 1024 / 8,
uploadThroughput=400 * 1024 / 8),
}
STATE = r"""(() => {
const R = e => { const r = e.getBoundingClientRect();
return [Math.round(r.left), Math.round(r.top), Math.round(r.width), Math.round(r.height)]; };
const T = e => e ? (e.textContent || '').replace(/\s+/g, ' ').trim() : null;
const vis = e => { if (!e) return false; const cs = getComputedStyle(e);
if (cs.display === 'none' || cs.visibility === 'hidden' || +cs.opacity === 0) return false;
const r = e.getBoundingClientRect(); return r.width > 0 && r.height > 0; };
const popups = [...document.querySelectorAll('.maplibregl-popup')].map(p => ({
cls: p.className.replace('maplibregl-popup', '').replace(/\s+/g, ' ').trim() || '(plain)',
rect: R(p), z: getComputedStyle(p).zIndex,
is_sheet: p.classList.contains('gridatlas-sheet'),
has_measure: /km straight/i.test(p.textContent || ''),
text: T(p).slice(0, 90)}));
const sheet = document.querySelector('.gridatlas-sheet');
const answer = document.querySelector('.neon-answer');
const loader = document.getElementById('gridatlas-loader');
const sb = document.querySelector('.search-bar-wrapper');
// is anything VISIBLE telling the reader work is in progress?
let working = null;
for (const e of document.querySelectorAll('body *')) {
if (!vis(e)) continue;
if (e.children.length) continue;
const t = (e.textContent || '').trim();
if (t && t.length < 80 && /computing|measuring|resolving|loading|working|please wait|…/i.test(t)) {
/* WHERE the label is decides whether it answers the reader's question.
A "Loading the substation…" line somewhere else on the page does not
tell somebody staring at an identity popup that a measurement is
coming for THIS project. */
const pop = e.closest('.maplibregl-popup');
working = {text: t.slice(0, 60), cls: String(e.className || e.tagName),
rect: R(e), in_popup: !!pop,
in_sheet: !!e.closest('.gridatlas-sheet')};
break; }
}
return {
popups: popups,
n_popups: popups.length,
sheet: !!sheet,
sheet_rect: sheet ? R(sheet) : null,
answer_len: answer ? (T(answer) || '').length : 0,
deep: document.body.dataset.gridatlasRepdDeepLink || null,
ref: document.body.dataset.gridatlasRepdRef || null,
loader_visible: vis(loader),
working_label: working,
search_bar: vis(sb) ? {rect: R(sb), text: T(sb).slice(0, 120)} : null,
ready: document.readyState,
identity_repeats: ((document.body.textContent || '')
.match(/Markinch Biomass CHP Plant/g) || []).length,
// what a finger would hit where the answer eventually renders
painted_at_answer: (() => { const e = document.elementFromPoint(innerWidth / 2, innerHeight * 0.78);
if (!e) return null; let n = e;
while (n && n !== document.body) {
if (n.className && typeof n.className === 'string' && n.className.trim())
return '.' + n.className.trim().split(/\s+/)[0];
if (n.id) return '#' + n.id;
n = n.parentElement; }
return e.tagName.toLowerCase(); })(),
errs: (window.__errs || []).slice(0, 4),
};
})()"""
def key(s):
"""A state's identity, tolerant of a sample taken mid-navigation.
b.js returns {'_error': ...} while the document is being swapped, and an
earlier version compared `answer_len > 0` on that dict and died 60 seconds
into a 70-second run. A probe that crashes on the states it exists to
observe measures only the calm ones."""
if not isinstance(s, dict) or '_error' in s:
return 'ERROR:' + str((s or {}).get('_error'))[:60] if isinstance(s, dict) else 'ERROR'
return json.dumps([s.get('n_popups'),
[p.get('cls', '') + ('+m' if p.get('has_measure') else '')
for p in s.get('popups') or []],
s.get('sheet'), bool(s.get('answer_len')), s.get('deep'),
s.get('loader_visible'), s.get('working_label'),
s.get('ready'), s.get('painted_at_answer'),
s.get('identity_repeats')], sort_keys=True)
def main():
ap = argparse.ArgumentParser()
ap.add_argument('--port', type=int, required=True)
ap.add_argument('--profile', default='slow-4g', choices=sorted(PROFILES))
ap.add_argument('--mobile', action='store_true')
ap.add_argument('--seconds', type=float, default=45.0)
ap.add_argument('--out', required=True)
args = ap.parse_args()
b = Browser(args.port, mobile=args.mobile, headless=True)
res = {'url': URL, 'profile': args.profile, 'mobile': args.mobile,
'utc': time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()),
'transitions': []}
try:
b.setup(); b.arm()
b.send('Network.enable')
if PROFILES[args.profile]:
c = PROFILES[args.profile]
b.send('Network.emulateNetworkConditions', offline=False, **c)
res['throttle'] = c
t0 = time.time()
b.send('Page.navigate', url=URL)
try:
b.send('Page.bringToFront')
except Exception:
pass
last = None
while time.time() - t0 < args.seconds:
s = b.js(STATE)
k = key(s)
if k != last:
last = k
if isinstance(s, dict):
s['t_s'] = round(time.time() - t0, 2)
res['transitions'].append(s)
time.sleep(0.25)
res['final_hidden'] = b.js('document.hidden')
finally:
b.close()
with open(args.out, 'w', encoding='utf-8') as fh:
json.dump(res, fh, indent=1)
print('WROTE', args.out, len(res['transitions']), 'transitions')
if __name__ == '__main__':
main()Tlshow
A Python module in the sessions folder of Claude.
ingestclaude / sessions/202609040030-ab-discovery/tlshow.py · lines 1–20 of 20 · version 2026-09-04 00:30 · Not reached from any entry point (candidate for review)
- What it does
- It loads data. Uses libraries json, sys. Side effects: reads or writes files.
- Why it exists in the grid workflow
- Domain stage agent_infra (repository name word 'claude'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief).
- Inputs & outputs
- In: command-line arguments.
- What it achieves
- No statement of purpose was found in the file, a README line naming it, or its name.
- Why it matters
- No other file in the estate was found to import it.
- Application
- claude · sessions/202609040030-ab-discovery · Python module
- Uses
- json, sys
- Used by
- none found
- Produces
- none declared
- Defines here
- none
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- claude@df9da02425fdf0c65d11a84f32cd9b3ef927b309 sessions/202609040030-ab-discovery/tlshow.py:1-20 · blob 9d38d3c4e5ea4a7518c1cd221d5d9eca76433186 · GitHub at these lines
- State
- achieves: name · context: readme_derived · stage: ingest · effects: filesystem · domain stage: agent_infra · users: ai_agent · canonical: unreached_review
import json,sys
for f in sys.argv[1:]:
r=json.load(open(f,encoding='utf-8'))
b=[]
b.append('### %s profile=%s mobile=%s %s'%(f,r['profile'],r['mobile'],r['utc']))
for s in r['samples']:
d=s['reading']
if not isinstance(d,dict): b.append(' t=%-3s ERROR %s'%(s['at'],str(d)[:120])); continue
b.append(' t=%-3s hidden=%s ready=%-9s sheet=%-5s rect=%-22s answer=%-5s nearest=%-5s working=%-5s deep=%-10s popups=%d top@centre=%-22s top@0.75=%-22s ids=%s'%(
d.get('t_s'),d.get('hidden'),d.get('ready'),d.get('sheet_present'),
json.dumps(d.get('sheet_rect')),d.get('answer_present'),d.get('has_nearest'),
d.get('says_working'),d.get('deep_link_state'),d.get('popup_count'),
d.get('top_at_centre'),d.get('top_at_lower_third'),d.get('identity_repeats')))
for p in d.get('popups') or []:
b.append(' popup[%d] %-46s rect=%-22s z=%-6s off_below=%-5s off_any=%-5s | %s'%(
p['i'],p['cls'][:46],json.dumps(p['rect']),p['z'],p['offscreen_below'],p['offscreen_any'],p['text'][:70]))
if d.get('measurement_line'): b.append(' ANSWER: %s'%d['measurement_line'][:150])
if d.get('errs'): b.append(' errs: %s'%json.dumps(d['errs'])[:200])
b.append('')
sys.stdout.buffer.write(('\n'.join(b)+'\n').encode('utf-8','replace'))Features
A configuration file in the spider folder of Code Generator.
docs-configcode-generator / spider/features.yml · lines 1–12 of 12 · Not reached from any entry point (candidate for review)
- Why it exists in the grid workflow
- Domain stage agent_infra (path word 'spider'): AI-agent memory, coordination and code audit (the multi-agent journey named in Ventus Ltd's brief).
- Inputs & outputs
- In: JSON file apps.json.
- Downstream impact
- Used directly by 1 file: Sources (ventus-grid-engine).
- What it achieves
- Graphs this repository publishes for the Spider dashboard.
- Why it matters
- Imported by Sources, from Ventus Grid Engine.
- Application
- code-generator · spider · configuration
- Uses
- Code Generator — Index Page (estate URL)
- Used by
- named by URL in Sources (estate URL)
- Produces
- none declared
- Defines here
- none
- Cannot conclude
- Whether this code runs, is used by a live app today, or is correct. This is a static reading.
- Evidence
- code-generator@3897d83efcd0259d21dce87704b0c33118fe2c2e spider/features.yml:1-12 · blob 4782e288f39889c6b91ae419aeaa6a8d83488162 · GitHub at these lines
- State
- achieves: comment · context: readme_derived · stage: unknown · effects: none found · domain stage: agent_infra · users: ai_agent · canonical: unreached_review
# Graphs this repository publishes for the Spider dashboard. Written by generate.mjs.
schema_version: spider-features-v1
site: "https://ventusltd.github.io/code-generator/"
graphs:
- id: "generated-apps"
title: "Applications"
path: "https://ventusltd.github.io/code-generator/spider/graphs/apps.json"
edges_path: null
source_spider: "code-generator (generate.mjs)"
description: "Apps built from blocks of the periodic table, wired to the blocks they are made of and the work orders still open. Amber apps still need values from their surroundings; the assembly page shows what loads."
nodes: 14
edges: 12