[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DDBJMBAZG6S3C4EVWFJYJ1":3,"skill-same:01M7DDBJMBAZG6S3C4EVWFJYJ1":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7DDBJMBAZG6S3C4EVWFJYJ1","bend-harness-qa",null,"Drive a live bend-harness session programmatically with bend_client.py to test features end to end, reproduce and investigate bugs, and write precise bug reports. Use when asked to test, verify, QA, benchmark, or investigate the Bend harness.","gvergnaud\u002Fbise","gvergnaud","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9265418?v=4","01M7DDBF4P9FC0JR6BJDMX1Q2J","Gabriel Vergnaud","01M7DDBF5FKMW0JNE71GV5SKBN",51,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbend-harness-qa\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bend-harness-qa\ndescription: Drive a live bend-harness session programmatically with bend_client.py to test features end to end, reproduce and investigate bugs, and write precise bug reports. Use when asked to test, verify, QA, benchmark, or investigate the Bend harness.\n---\n\n# Bend Harness QA\n\nYou control a REAL live harness session (GLM model + bash + MCP tools + skills) from Python: the same wire protocol the TUI speaks, but scripted and reproducible. This is how you test a new feature end to end, reproduce a user-reported bug, or investigate weird behavior.\n\nRepo: `\u002FUsers\u002Fgabrielvergnaud\u002Flab\u002Fbend-lab\u002Fharness` (all relative paths below are inside it).\n\n## Golden rules\n\n1. ALWAYS run with `python3 -u` (unbuffered stdout) — without it a long turn looks dead.\n2. One TCP connection per session: the REPL serves one client at a time. Sequential `BendSession.fresh()` calls are fine (each picks a private port); always `s.close()` when done (the REPL dies with it, the session checkpoint stays).\n3. A turn ends at the `--- idle` line. `say()` blocks until then (default timeout 900s — pass a shorter one for smoke tests).\n4. Bash tool calls slower than `BEND_BG_AFTER` seconds (default 30) hand off to a background slot instead of blocking. Use `fresh(bg_after=N)` to shrink the window in tests.\n\n## Minimal run\n\n```python\nimport sys; sys.path.insert(0, \"scripts\")  # run from the repo root\nfrom bend_client import BendSession\n\ns = BendSession.fresh()          # or BendSession.resume(path)\ntry:\n    lines = s.say(\"reply with exactly OK\", timeout=120)\n    assert \"OK\" in s.last_assistant(lines)\n    print(\"PASS\")\nfinally:\n    s.close()\n```\n\nRun it: `python3 -u \u002Ftmp\u002Fmytest.py`. The full turn transcript is in `lines` (print it when debugging); the client log is `\u002Ftmp\u002Fbend-client-\u003Cport>.log`.\n\nFor anything beyond the basics, read `reference\u002Fclient-api.md` (full client API + the wire events) and copy `scripts\u002Fe2e_template.py` as a starting point.\n\n## E2E recipes\n\n- **Feature smoke test**: one turn, instruct precisely, then assert on the obs lines (tool started\u002Ffinished, tool_result) AND `last_assistant()`. Print PASS\u002FFAIL, never eyeball.\n- **Mid-turn steering**: run `say()` in a thread, wait for the tool call to appear in the log, then `s.steer_midturn(text)` — it writes the file side-channel `\u002Ftmp\u002Fbend-steer-\u003Cport>.txt`. Assert: an obs `steering_received:` mid-turn, an obs `steered:` (injected into the next model input), and the final answer honoring the steered text. (`s.steer()` sends on the SOCKET — it is only read at idle and starts a NEW turn; that is NOT mid-turn steering.)\n- **Background commands**: `BendSession.fresh(bg_after=2)`, ask the agent to run `sleep 5 && echo done`. Assert the tool result carries the handoff contract (slot id, tail\u002Fstdin\u002Fstatus\u002Fkill commands) and that a second bash call can read the slot's `.out`\u002F`.rc` under `\u002Ftmp\u002Fbend-bg-\u003Cport>\u002F`.\n- **Skills**: ask the model to call the `skill` tool with exact args `{\"name\":\"\u003Cexact>\"}`. Assert the result starts with the SKILL.md CONTENT (frontmatter stripped), and that a bogus name returns \"Skill ... is not available\" plus the available list.\n- **Sessions \u002F CLI flags** (not client-driven): `.\u002Frun.sh --headless [--scripted]` (what bend_client.py runs: one READY line, lives until stdin closes; there is no single-agent TUI any more, BISE-113). Sessions live in `~\u002F.bend-harness\u002Fsessions\u002F\u003Cid>.txt`; `--continue` = latest mtime, `--resume \u003Cid-or-unique-prefix>`, errors list the available ids.\n\n## Before you report a bug\n\nSeparate a harness bug from an environment\u002Fmodel flake — run the deterministic gates from the repo root:\n\n```sh\npython3 tests\u002Fproof_run.py . 4 \"$TMPDIR\u002Fproofs\"   # laws: every bend\u002Fproofs\u002F*.bend (NEVER `bend update`: pin 2.0.27)\nbend bend\u002Fruntime\u002Fdemo.bend -o harness-demo && .\u002Fharness-demo > \u002Ftmp\u002Fdemo-a.txt && .\u002Fharness-demo > \u002Ftmp\u002Fdemo-b.txt && diff \u002Ftmp\u002Fdemo-a.txt \u002Ftmp\u002Fdemo-b.txt   # deterministic\n~\u002F.bend\u002Fbin\u002Fbend bend\u002Ftests\u002Ftest-bg.bend -o \u002Ftmp\u002Fbg-suite && rm -rf \u002Ftmp\u002Fbgtest && BEND_BG_ROOT=\u002Ftmp\u002Fbgtest BEND_BG_AFTER=2 \u002Ftmp\u002Fbg-suite\n```\n\nA live-model failure with all gates green is a live-integration bug or a model flake — re-run the e2e once before reporting.\n\n## Bug report format\n\nWrite reports as markdown (scratchpad or the file the user asked for), one report per bug:\n\n1. **Title** — one line, the symptom.\n2. **Environment** — commit hash (`git log --oneline -1`), mode (live\u002Fscripted), env vars (BEND_BG_AFTER, port).\n3. **Repro** — the SMALLEST python script that triggers it (must be runnable with `python3 -u`), or the exact pipe command.\n4. **Expected \u002F Observed** — two short lines, not prose.\n5. **Transcript excerpt** — the relevant obs lines only, not the whole turn.\n6. **Hypothesis** — the suspected module (`runtime\u002Fmain.bend`, `runtime\u002Fbash.bend`, `runtime\u002Fprovider.bend`, `core\u002Fsession.bend`, the TUI...) and what the gates say.\n7. **Severity** — blocks-turn \u002F degrades \u002F cosmetic.\n\n## Investigation pointers\n\n- Session checkpoints: `\u002Ftmp\u002Fbend-sessions\u002Fsession-\u003Cport>.txt` (client-spawned) or `~\u002F.bend-harness\u002Fsessions\u002F` (binary-spawned). Format: the checkpoint text protocol (core\u002Fcheckpoint.bend).\n- The harness can test ITSELF: via `say()`, ask the live agent to exercise its own tools (bash, background slots, skills, programmatic calling) and return a structured report — it knows its own contract. That is the QA-round pattern; parse its final answer for findings.\n- Tool routing: `bend\u002Fruntime\u002Fmain.bend` (`exec_pick` top-level, `exec_program.call` from the sandbox). Pure contracts are pinned in `bend\u002Flaws\u002F*.bend`, each closed by its `bend\u002Fproofs\u002F*.bend`.\n- MCP index `~\u002F.bend-harness\u002Fmcp-index.txt`, skills index `~\u002F.bend-harness\u002Fskills-index.txt`.\n\n## Gotchas\n\n- No `timeout` command on macOS (GNU coreutils absent) — use the client timeout args.\n- Assistant text escapes newlines as literal `\\n` on the wire — read it via `last_assistant()`\u002F`unescape()`.\n- The client log shows `REPL on` when the REPL is ready; a TCP probe would steal the resume greeting — never probe, wait for the banner.\n- A client-spawned session is LIVE (real model, real bash): commands the agent runs are real commands on this machine.\n","# Bend Harness QA\n\nYou control a REAL live harness session (GLM model + bash + MCP tools + skills) from Python: the same wire protocol the TUI speaks, but scripted and reproducible. This is how you test a new feature end to end, reproduce a user-reported bug, or investigate weird behavior.\n\nRepo: `\u002FUsers\u002Fgabrielvergnaud\u002Flab\u002Fbend-lab\u002Fharness` (all relative paths below are inside it).\n\n## Golden rules\n\n1. ALWAYS run with `python3 -u` (unbuffered stdout) — without it a long turn looks dead.\n2. One TCP connection per session: the REPL serves one client at a time. Sequential `BendSession.fresh()` calls are fine (each picks a private port); always `s.close()` when done (the REPL dies with it, the session checkpoint stays).\n3. A turn ends at the `--- idle` line. `say()` blocks until then (default timeout 900s — pass a shorter one for smoke tests).\n4. Bash tool calls slower than `BEND_BG_AFTER` seconds (default 30) hand off to a background slot instead of blocking. Use `fresh(bg_after=N)` to shrink the window in tests.\n\n## Minimal run\n\n```python\nimport sys; sys.path.insert(0, \"scripts\")  # run from the repo root\nfrom bend_client import BendSession\n\ns = BendSession.fresh()          # or BendSession.resume(path)\ntry:\n    lines = s.say(\"reply with exactly OK\", timeout=120)\n    assert \"OK\" in s.last_assistant(lines)\n    print(\"PASS\")\nfinally:\n    s.close()\n```\n\nRun it: `python3 -u \u002Ftmp\u002Fmytest.py`. The full turn transcript is in `lines` (print it when debugging); the client log is `\u002Ftmp\u002Fbend-client-\u003Cport>.log`.\n\nFor anything beyond the basics, read `reference\u002Fclient-api.md` (full client API + the wire events) and copy `scripts\u002Fe2e_template.py` as a starting point.\n\n## E2E recipes\n\n- **Feature smoke test**: one turn, instruct precisely, then assert on the obs lines (tool started\u002Ffinished, tool_result) AND `last_assistant()`. Print PASS\u002FFAIL, never eyeball.\n- **Mid-turn steering**: run `say()` in a thread, wait for the tool call to appear in the log, then `s.steer_midturn(text)` — it writes the file side-channel `\u002Ftmp\u002Fbend-steer-\u003Cport>.txt`. Assert: an obs `steering_received:` mid-turn, an obs `steered:` (injected into the next model input), and the final answer honoring the steered text. (`s.steer()` sends on the SOCKET — it is only read at idle and starts a NEW turn; that is NOT mid-turn steering.)\n- **Background commands**: `BendSession.fresh(bg_after=2)`, ask the agent to run `sleep 5 && echo done`. Assert the tool result carries the handoff contract (slot id, tail\u002Fstdin\u002Fstatus\u002Fkill commands) and that a second bash call can read the slot's `.out`\u002F`.rc` under `\u002Ftmp\u002Fbend-bg-\u003Cport>\u002F`.\n- **Skills**: ask the model to call the `skill` tool with exact args `{\"name\":\"\u003Cexact>\"}`. Assert the result starts with the SKILL.md CONTENT (frontmatter stripped), and that a bogus name returns \"Skill ... is not available\" plus the available list.\n- **Sessions \u002F CLI flags** (not client-driven): `.\u002Frun.sh --headless [--scripted]` (what bend_client.py runs: one READY line, lives until stdin closes; there is no single-agent TUI any more, BISE-113). Sessions live in `~\u002F.bend-harness\u002Fsessions\u002F\u003Cid>.txt`; `--continue` = latest mtime, `--resume \u003Cid-or-unique-prefix>`, errors list the available ids.\n\n## Before you report a bug\n\nSeparate a harness bug from an environment\u002Fmodel flake — run the deterministic gates from the repo root:\n\n```sh\npython3 tests\u002Fproof_run.py . 4 \"$TMPDIR\u002Fproofs\"   # laws: every bend\u002Fproofs\u002F*.bend (NEVER `bend update`: pin 2.0.27)\nbend bend\u002Fruntime\u002Fdemo.bend -o harness-demo && .\u002Fharness-demo > \u002Ftmp\u002Fdemo-a.txt && .\u002Fharness-demo > \u002Ftmp\u002Fdemo-b.txt && diff \u002Ftmp\u002Fdemo-a.txt \u002Ftmp\u002Fdemo-b.txt   # deterministic\n~\u002F.bend\u002Fbin\u002Fbend bend\u002Ftests\u002Ftest-bg.bend -o \u002Ftmp\u002Fbg-suite && rm -rf \u002Ftmp\u002Fbgtest && BEND_BG_ROOT=\u002Ftmp\u002Fbgtest BEND_BG_AFTER=2 \u002Ftmp\u002Fbg-suite\n```\n\nA live-model failure with all gates green is a live-integration bug or a model flake — re-run the e2e once before reporting.\n\n## Bug report format\n\nWrite reports as markdown (scratchpad or the file the user asked for), one report per bug:\n\n1. **Title** — one line, the symptom.\n2. **Environment** — commit hash (`git log --oneline -1`), mode (live\u002Fscripted), env vars (BEND_BG_AFTER, port).\n3. **Repro** — the SMALLEST python script that triggers it (must be runnable with `python3 -u`), or the exact pipe command.\n4. **Expected \u002F Observed** — two short lines, not prose.\n5. **Transcript excerpt** — the relevant obs lines only, not the whole turn.\n6. **Hypothesis** — the suspected module (`runtime\u002Fmain.bend`, `runtime\u002Fbash.bend`, `runtime\u002Fprovider.bend`, `core\u002Fsession.bend`, the TUI...) and what the gates say.\n7. **Severity** — blocks-turn \u002F degrades \u002F cosmetic.\n\n## Investigation pointers\n\n- Session checkpoints: `\u002Ftmp\u002Fbend-sessions\u002Fsession-\u003Cport>.txt` (client-spawned) or `~\u002F.bend-harness\u002Fsessions\u002F` (binary-spawned). Format: the checkpoint text protocol (core\u002Fcheckpoint.bend).\n- The harness can test ITSELF: via `say()`, ask the live agent to exercise its own tools (bash, background slots, skills, programmatic calling) and return a structured report — it knows its own contract. That is the QA-round pattern; parse its final answer for findings.\n- Tool routing: `bend\u002Fruntime\u002Fmain.bend` (`exec_pick` top-level, `exec_program.call` from the sandbox). Pure contracts are pinned in `bend\u002Flaws\u002F*.bend`, each closed by its `bend\u002Fproofs\u002F*.bend`.\n- MCP index `~\u002F.bend-harness\u002Fmcp-index.txt`, skills index `~\u002F.bend-harness\u002Fskills-index.txt`.\n\n## Gotchas\n\n- No `timeout` command on macOS (GNU coreutils absent) — use the client timeout args.\n- Assistant text escapes newlines as literal `\\n` on the wire — read it via `last_assistant()`\u002F`unescape()`.\n- The client log shows `REPL on` when the REPL is ready; a TCP probe would steal the resume greeting — never probe, wait for the banner.\n- A client-spawned session is LIVE (real model, real bash): commands the agent runs are real commands on this machine.\n",{"name":5,"description":7},"main","7c09ce329eff2caff1dc3e4d44dfd6c236a282ce",".agents\u002Fskills\u002Fbend-harness-qa",9,"https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise","https:\u002F\u002Fbise.dev","https:\u002F\u002Fgithub.com\u002Fgvergnaud","https:\u002F\u002Ftype-level-typescript.com","Building agents at Mistral — Author of bise, type-level-typescript.com, TS-Pattern, HOTScript...","2026-11-15 04:07:17",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add gvergnaud\u002Fbise --skill bend-harness-qa",{"tool":40,"command":41},"bunx","bunx skills add gvergnaud\u002Fbise --skill bend-harness-qa",{"tool":43,"command":44},"pnpm","pnpm dlx skills add gvergnaud\u002Fbise --skill bend-harness-qa","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbend-harness-qa\u002FSKILL.md",true,[48,54],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"reference\u002Fclient-api.md","REFERENCE","参考文档",3926,"https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbend-harness-qa\u002Freference\u002Fclient-api.md",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"scripts\u002Fe2e_template.py","SCRIPT","脚本",2130,"https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbend-harness-qa\u002Fscripts\u002Fe2e_template.py",[61,68,75,82,89,95],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7DDF53D28NXA17HZP08094A","greet","Greet someone the hello-plugin way. Use when asked for a hello-plugin greeting.","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Frust\u002Fplugins\u002Ftests\u002Ffixtures\u002Fhello-plugin\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7DDF3V0J5P7VEWAS7NM458P","triage","triage Linear issues","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Frust\u002Fplugins\u002Ftests\u002Ffixtures\u002Fadd\u002Fcodex-linear\u002Fin\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7DDF1EPY3GMFG4WG368B3Q8","jot","jot a note","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Frust\u002Fplugins\u002Ftests\u002Ffixtures\u002Fadd\u002Fclaude-notes\u002Fin\u002Fskills\u002Fjot\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7DDETP44AE35MSDENY1THS9","bise-demo","Run bise's built-in demo, a short role-play where a small product team (a pm, a designer, a dev) starts, talks like colleagues, asks the user one question and one agent is dropped, with no file or git change. Use when the user asks to see what bise or you can do, for a demo, a tour or your features (show me what you can do, give me a demo, what can you do?, demo all your features), in any language.","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Fprompts\u002Fskills\u002Fbise-demo\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7DDERQ5JJHVR314X762FD5K","bise-pages","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Fprompts\u002Fskills-all\u002Fbise-pages\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7DDEMV9FHB1HTNWY9W5RXAZ","slides","Make, read or edit a PowerPoint deck (.pptx) - a review, a pitch, a status deck, slides with tables and charts - with a TypeScript script run by `bise office run`. Use when the user asks for slides, a deck or a pptx, sends one, or leaves notes on a pptx artifact.","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Fplugins\u002Fslides\u002Fskills\u002Fslides\u002FSKILL.md",[],[]]