From ec9bf77b107b20553d8c48bccb2effa0474322c6 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 21 Oct 2026 11:49:23 -0700 Subject: [PATCH] live: heartbeat sync 2026-10-21T11:49:23-07:00 (Refs #11) --- .../SKILL.md | 47 +++++++++++++++++++ .../line-edit-anchor-discipline/SKILL.md | 24 ++++++++++ .../state.json | 2 +- .../state.json | 2 +- .../product.md | 4 +- .../state.json | 6 +-- .../product.md | 2 +- .../state.json | 4 +- .../state.json | 2 +- 9 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 agent/managed-skills/browser-screenshot-disk-and-cookies/SKILL.md create mode 100644 agent/managed-skills/line-edit-anchor-discipline/SKILL.md diff --git a/agent/managed-skills/browser-screenshot-disk-and-cookies/SKILL.md b/agent/managed-skills/browser-screenshot-disk-and-cookies/SKILL.md new file mode 100644 index 0000000..37d31d7 --- /dev/null +++ b/agent/managed-skills/browser-screenshot-disk-and-cookies/SKILL.md @@ -0,0 +1,47 @@ +--- +name: browser-screenshot-disk-and-cookies +description: Save omp managed-browser screenshots to real files (tab.screenshot path is silently ignored) and reset the shared Chromium cookie jar between persona captures. +--- + +# Screenshots to disk with the omp `browser` eval helper + +## Traps (both cost a full re-capture to discover) +1. `tab.screenshot({ path })` **ignores `path` silently** — the option is not in + its schema (`{selector, fullPage, silent, annotate, format, quality, ifChanged, threshold}`). + The image attaches inline to the tool result and **nothing is written to disk**; + `ls` shows an empty dir. Inline images may also be dropped from transcript + archives later, so "attached to chat" is not "saved". +2. The shared managed Chromium keeps **cookies across tabs and turns** (profile + persists after `tab.close()`). A second capture script that expects the + anonymous view lands signed-in and `waitForSelector("testid/…")` fails fast. + +## Procedure +Write files via `tab.run`, which exposes the raw Puppeteer `page` — its +`screenshot({path})` does write: + +```js +const dir = "/tmp/"; +const tab = await browser.open({ name: "caps", url }); +const shot = (file) => + tab.run(async ({ page }, f) => { await page.screenshot({ path: f }); return f; }, + { args: [`${dir}/${file}.png`] }); + +await tab.clearCookies(); // ALWAYS before an anonymous capture +await tab.goto(url); +await tab.waitForSelector("testid/first-state"); +await shot("1-anonymous"); +// ...drive states with direct helpers: click/fill("testid/", ...) ... +await shot("2-next-state"); +await tab.close(); +``` + +Verify with `ls -la && file /*.png` — do not trust silent success. + +## Notes +- Selectors accept `testid/` handler; prefer it over CSS on `[data-testid]`. +- `tab.run(fn, { args })`: functions receive `{tab, page, browser, wait, assert}` + first, then each arg; a bare code string runs in an **isolated runtime, not the + page** — `document` is undefined there. Use direct helpers or `tab.evaluate` + (page-global expression; top-level `return` invalid) for page access. +- Byte-identical PNG sizes between two frames = same view; fine as proof of a + round-trip (state A → B → A). diff --git a/agent/managed-skills/line-edit-anchor-discipline/SKILL.md b/agent/managed-skills/line-edit-anchor-discipline/SKILL.md new file mode 100644 index 0000000..3f8c643 --- /dev/null +++ b/agent/managed-skills/line-edit-anchor-discipline/SKILL.md @@ -0,0 +1,24 @@ +--- +name: line-edit-anchor-discipline +description: "Avoid the recurring edit-tool line-op traps: empty PUT deletes lines, PUT ranges swallowing multi-line block delimiters, and anchors landing mid-expression. Use whenever issuing CUT/PUT line edits on tagged files." +--- + +# Line-edit anchor discipline (CUT/PUT ops on tagged files) + +Five self-inflicted syntax wounds in one session (franksign, 2026-10-21) all trace to three rules. + +## Rules +1. **An empty PUT body DELETES the targeted lines** (tool warns: "Interpreted an empty PUT body as deletion"). Twice it ate a whole log entry / a closing `}`. For no-ops use nothing; for deletes use explicit `CUT`. +2. **Never PUT a range whose endpoints cut through a multi-line block.** If a `| {`-style union variant, a frontmatter `---` fence, or a `test(...)` closer straddles the range boundary, the replacement swallows the opener/closer and strands the body. Pre-condition: line N-1 and M+1 must be block-complete. Fix-after-the-fact pattern: read the broken region raw, then `PUT k.=k:` to restore the single swallowed line (e.g. the missing `---`, the orphaned ` | {`, `}` → `});`). +3. **Search-hit reads do not authorize PUT.** A grep/folded-summary read marks lines as "never displayed"; the edit tool refuses and echoes actual content. That refusal is a free verification — re-check the echoed lines match intent, then straight-retry with the same tag. + +## Costly mistakes seen +- Empty `PUT 7-7:` deleted a just-written log entry; restoring required re-issuing the full entry text. +- `PUT 6.=7` replacing `timestamp`+`---` dropped the frontmatter close fence → lint-breaking file silently. +- `PUT 10.=11` on a union type swallowed ` | {` opening a 12-line variant → cascade of LSP "unexpected label" warnings. +- `CUT` of a stranded opener left its dangling `.json())` behind; balance errors surface only at EOF (`expected ')' but file ends`) — locate by reading regions raw, not by widening the payload. + +## Discipline +- After any edit that reports a syntax error or a warning: read the touched region with `:raw` before the next op; fix the single wrong line, do not resend the block. +- "no change: byte-identical" means your anchor math is off — re-read, don't append more content. +- Prefer replacing whole coherent blocks (start line = block start, end line = block end) over edits that end mid-statement. diff --git a/agent/memories/sharpshooter/wt-20261019-125509-7c8a99d-me8scwe1t2nf/state.json b/agent/memories/sharpshooter/wt-20261019-125509-7c8a99d-me8scwe1t2nf/state.json index 16854fa..09d0da3 100644 --- a/agent/memories/sharpshooter/wt-20261019-125509-7c8a99d-me8scwe1t2nf/state.json +++ b/agent/memories/sharpshooter/wt-20261019-125509-7c8a99d-me8scwe1t2nf/state.json @@ -1,6 +1,6 @@ { "v": 1, - "lastConsolidatedAt": 1792604806049, + "lastConsolidatedAt": 1792608451914, "lastResult": { "at": 1792573818108, "sessions": 1, diff --git a/agent/memories/sharpshooter/wt-20261020-125416-6d1fc1f-3cjcsma2m7gk5/state.json b/agent/memories/sharpshooter/wt-20261020-125416-6d1fc1f-3cjcsma2m7gk5/state.json index 1fb1548..db899a2 100644 --- a/agent/memories/sharpshooter/wt-20261020-125416-6d1fc1f-3cjcsma2m7gk5/state.json +++ b/agent/memories/sharpshooter/wt-20261020-125416-6d1fc1f-3cjcsma2m7gk5/state.json @@ -1,6 +1,6 @@ { "v": 1, - "lastConsolidatedAt": 1792604841754, + "lastConsolidatedAt": 1792608445881, "lastResult": { "at": 1792574016725, "sessions": 1, diff --git a/agent/memories/sharpshooter/wt-20261020-144605-e7c60f6-31xsw83t7yjc6/product.md b/agent/memories/sharpshooter/wt-20261020-144605-e7c60f6-31xsw83t7yjc6/product.md index 731ff7e..c8b06a7 100644 --- a/agent/memories/sharpshooter/wt-20261020-144605-e7c60f6-31xsw83t7yjc6/product.md +++ b/agent/memories/sharpshooter/wt-20261020-144605-e7c60f6-31xsw83t7yjc6/product.md @@ -1,4 +1,6 @@ ## Templates - Template submissions proceed as an agentically-assisted process. ## Agent Skills -- 16 is a project level agent skill, rather than a strict application thing \ No newline at end of file +- 16 is a project level agent skill, rather than a strict application thing +## Design Assumptions +- All users are studios. \ No newline at end of file diff --git a/agent/memories/sharpshooter/wt-20261020-144605-e7c60f6-31xsw83t7yjc6/state.json b/agent/memories/sharpshooter/wt-20261020-144605-e7c60f6-31xsw83t7yjc6/state.json index 8f68a1d..a1878b2 100644 --- a/agent/memories/sharpshooter/wt-20261020-144605-e7c60f6-31xsw83t7yjc6/state.json +++ b/agent/memories/sharpshooter/wt-20261020-144605-e7c60f6-31xsw83t7yjc6/state.json @@ -1,10 +1,10 @@ { "v": 1, - "lastConsolidatedAt": 1792604738996, + "lastConsolidatedAt": 1792608476331, "lastResult": { - "at": 1792556461435, + "at": 1792607267681, "sessions": 1, - "deltas": 1, + "deltas": 7, "model": "frank-zealot" } } diff --git a/agent/memories/sharpshooter/wt-20261020-155034-1b9ba40-iffz605wjz2v/product.md b/agent/memories/sharpshooter/wt-20261020-155034-1b9ba40-iffz605wjz2v/product.md index 78431c3..38a113a 100644 --- a/agent/memories/sharpshooter/wt-20261020-155034-1b9ba40-iffz605wjz2v/product.md +++ b/agent/memories/sharpshooter/wt-20261020-155034-1b9ba40-iffz605wjz2v/product.md @@ -4,4 +4,4 @@ - The suite shouldn't loop through every epithet ## Testing behavior -- Tests play ONE random Epithet \ No newline at end of file +- Tests play ONE random Epithet diff --git a/agent/memories/sharpshooter/wt-20261020-155034-1b9ba40-iffz605wjz2v/state.json b/agent/memories/sharpshooter/wt-20261020-155034-1b9ba40-iffz605wjz2v/state.json index 7fcf959..9735470 100644 --- a/agent/memories/sharpshooter/wt-20261020-155034-1b9ba40-iffz605wjz2v/state.json +++ b/agent/memories/sharpshooter/wt-20261020-155034-1b9ba40-iffz605wjz2v/state.json @@ -1,8 +1,8 @@ { "v": 1, - "lastConsolidatedAt": 1792604850405, + "lastConsolidatedAt": 1792608310239, "lastResult": { - "at": 1792566095222, + "at": 1792607323355, "sessions": 1, "deltas": 1, "model": "frank-zealot" diff --git a/agent/memories/sharpshooter/wt-20261021-021543-6d1fc1f-o9a35ouamphx/state.json b/agent/memories/sharpshooter/wt-20261021-021543-6d1fc1f-o9a35ouamphx/state.json index 0a1670a..140c2a8 100644 --- a/agent/memories/sharpshooter/wt-20261021-021543-6d1fc1f-o9a35ouamphx/state.json +++ b/agent/memories/sharpshooter/wt-20261021-021543-6d1fc1f-o9a35ouamphx/state.json @@ -1,4 +1,4 @@ { "v": 1, - "lastConsolidatedAt": 1792604683894 + "lastConsolidatedAt": 1792607743914 }