baphuongna/pi-crew/real-test-pi-crew

Claude Code and agent skill by baphuongna/pi-crew

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

LIVE end-to-end battery for pi-crew changes — unit-green ≠ works in a real Pi session; this skill proves the latter. USE WHEN: you changed src/runtime/broker|child-pi|surface|prompt|state, src/ui, src/config, src/schema/team-tool-schema.ts, agents/*.md, workflows, CI, or dist/ — before committing; a worker hung/died/"no output for 600000ms"; a run went green but panes/UI/ask/steer look wrong; someone says "verify it really works". TIERS AT A GLANCE: T1 critical (~19s) · T2 kill-switch · T3 bundle+md5 · T4/T8 live-session sync · T5/T6 TUI probes · T7 smoke run · T9 team-tool feature battery · T10 surface panes (tmux + herdr) · T11 regression battery (a–j) · T12 agent-frontmatter contracts · T13 real-run UI render. A decision table at the TOP of the file maps changed-path → required tiers. When NOT to use: unit tests for isolated modules (use the test runner directly); pure test execution.

Install

npx vskill@latest install baphuongna/pi-crew/real-test-pi-crew

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

real-test-pi-crew

End-to-end verification discipline for pi-crew changes. Distilled from the broker Phase-4 rollout (commits 1cb2dca → d599578 → 612e18b → 4186284, July 2026). The pain this skill prevents: shipping code that compiles + unit-tests-green but breaks in the user's live Pi session, or hangs the verifier worker.

Nhận dạng nhanh — Tier map + decision table

Bản chất: unit xanh ≠ chạy thật. Mỗi tier chứng minh MỘT lớp đảm bảo trong một pi session thật. Bảng dưới là chỉ mục — chi tiết ở section tương ứng; ngưỡng thời gian ở "Performance budget" cuối file.

TierChứng minh gìChi phíSection
1critical suites xanh (broker/UI)~19sTier 1
2kill-switch tắt đúng qua 3 đường75sTier 2
3typecheck + rebuild bundle + md5 sync25sTier 3
4session sống nhận được bundle mới<1s + restartTier 4
5TUI sống (tmux send-keys)5sTier 5
6TUI sống (pty bulk keys)5sTier 6
7smoke run — verifier không treo60–120sTier 7
8md5 session == md5 đĩa<1sTier 8
9team-tool feature battery (9a–9g)30s + ~120s/spawnTier 9
10worker chạy trong pane thật (10a E2E · 10b tmux live · 10c herdr live)90–120s/lầnTier 10
11regression battery ghim các fix cũ (11a–11j)theo suiteTier 11
12resource contract (agent .md frontmatter)—Tier 12
13render MỌI surface từ run thật trên đĩa150sTier 13

Decision table — "đổi file X thì phải chạy tier gì" (bản chi tiết đường dẫn ở phần When to use dưới):

Đổi…Tier bắt buộc (thứ tự)
src/runtime/broker/T1 → T7 → T9b-W
src/extension/command-completions.ts / src/extension/registration/commands/*.ts (autocomplete providers + slash-command handlers)T1 + pinned test/unit/extension/core/command-completions*.test.ts → T5 completion-popup probe: trong tmux session thật, gõ /team-transcript <runId> + 1 ký tự nữa cho popup fire — assert (a) pi CÒN SỐNG, (b) gợi ý task id hiện với runId hợp lệ, (c) KHÔNG crash entry mới trong ~/.pi/agent/crashes.json. Completion callbacks chạy trong CombinedAutocompleteProvider.getSuggestions của pi core — nơi KHÔNG catch lỗi extension: một throw = chết cả pi process (P0 live-caught 2026-10-08: Invalid runId: team_x/team-transcript, crashes.json có full stack)
src/ui/T1 → (T5T6) → T13
src/config/ (kể cả migration-validator)T1 → T11c
src/runtime/child-pi/ (spawn/kill/steer)T7 → T9g
src/runtime/process/** (reap-group.ts / run-descendant-sweep.ts) + child-pi-kill.ts exited-root branch + orphan-reaper.ts identity admission + crash-recovery.ts terminal-sweep lane + state fields childPgid/childStartTime/childUid + heartbeat pgid/starttime/uid (wave-11 class: runtime spawn/kill/teardown + startup reconcile + state schema ADDITIVE)T1 → pinned unit test/unit/runtime/process/{reap-group,run-descendant-sweep}.test.ts + test/unit/runtime/recovery/reconcile-terminal-run-descendant-sweep.test.ts + test/unit/runtime/stale-reconciler-run-descendant-sweep.test.ts + test/unit/runtime/stale-reconciler-reap-escalation.test.ts (5 file / 78 tests @ f578c223) → integration live repro node scripts/test-runner.mjs test/integration/run-descendant-sweep-live.test.ts (A1–A5: spawn leak THẬT → sweep reap ~100 ms; negative control bắt buộc SỐNG: no-marker / interactive-tty / parent-còn-sống) → off-path proof PI_CREW_REAP_GROUP=0 + PI_CREW_REAP_RUN_DESCENDANTS=0 (unit xanh trên CẢ hai trạng thái switch; KHÔNG để ambient =0 sót lại làm run thật câm) → T9a team action='doctor' focus='zombies' (mảng runDescendants report-only + dòng cảnh báo no descent proof ⇒ NOT reaped)
test/** — bất kỳ fixture nào spawn một process THẬT (đặc biệt detached: true), hoặc test fixture rò rỉ process (orphan còn sống sau khi assert throw)T1 file vừa sửa (node scripts/test-runner.mjs <file> ×2 — teardown là timing-sensitive) + pgrep -af "setInterva[l]" phải RỖNG sau mỗi lần chạy + (khi đụng helper) node scripts/test-runner.mjs test/unit/helpers/fixture-process.test.ts. Rule (wave 12c, `test/helpers/README.md`): fixture DETACHED ⇒ spawnFixture+reapFixture trong finally (pid-only child.kill() KHÔNG phải teardown: không chạm tree, vô hiệu trước fixture nuốt SIGTERM, và không chạy nếu throw TRƯỚC finally/trong setup hook) + snapshot identity ngay sau spawn (chống pgid reuse) + registerFixtureTrap() cho cửa sổ abort sớm; fixture NON-DETACHED ⇒ pid kill + comment lý do (group reap giết runner). Cảnh báo: spawnFixture THROW khi detached:false — đúng theo thiết kế
src/runtime/mcp-proxy.ts / src/runtime/model/pi-args.ts (worker argv build + MCP role-gate — G2/G3 surface, SDD-2)T7 (argv-flags.smoke.ts với PI_CREW_SMOKE=1) → T9b-W loadout theo role (post-G2: read-only KHÔNG có MCP trên live-session path là ĐÚNG — xem mục full-loadout sanity 9b) + pinned suites mcp-proxy.test.ts / phase6-runtime-hardening.test.ts / child-pi-timeout+child-pi-surface (argv/spill)
src/runtime/async-runner.ts / src/runtime/background-runner.ts (spawn, allowlist, entry-guard, executeBackgroundRun core)T1 → T9b async (event async.spawned KHÔNG được có data.inline:true — battery phải chứng minh runner DETACHED thật) → T7; đụng BACKGROUND_RUNNER_ENV_ALLOWLIST → thêm T10b/T10c (quirk F4-2026-08-30: mux env bị strip ⇒ async headless âm thầm)
src/runtime/surface/T10a → T10b → T10c (dò herdr bằng HERDR_ENV=1, KHÔNG phải $TMUX)
src/prompt/ (ask/message/delegate/surface-worker)T9b-W → T9g
team-runner.ts / task-runner/ / goal-workflow/plan-templates.tsT7
src/state/T7 → T9a → T11a
paths.ts / project-markers.ts / stale-reconciler.ts / health-monitor.tsT11 pinned suites (layout/symlink)
team-tool-schema.ts / registration/team-tool.tsT9 FULL — schema validate TRƯỚC handler; schema sai làm chết mọi action âm thầm
agents/*.md / skills/*/SKILL.md / discoveryT12
workflows/*.workflow.mdT7
.github/workflows/ci.ymlT11e
scripts/wc-gate.mjsT11b
scripts/test-runner.mjs (the runner itself)T1 (exercises it) + test/unit/scripts/test-runner-exit.test.ts (21 tests: exit codes, cancelled-guard red-green, missing-file pre-check, batch shard empirical) + ONE batch-mode run (PI_CREW_TEST_BATCH_SIZE=2 node scripts/test-runner.mjs --shard=0/1 <3 small files>). Home isolation per-suite từ 2026-10-11 (set CẢ PI_CREW_HOME + PI_TEAMS_HOME — mirror pair, đặt 1 tên là defeatable; sweep prefix pi-crew- cover orphan pi-crew-test-home-*; opt-out PI_CREW_TEST_NO_HOME_ISOLATION=1) → khi đụng isolation: leak detector = đếm run-dirs ~/.pi/agent/extensions/pi-crew/state/runs/ before/after một suite, KHÔNG được tăng. Dev script — NOT bundled, no T3/T4 needed
scripts/check-lazy-imports.mjsRun the gate on a clean tree (node scripts/check-lazy-imports.mjs exit 0) + re-probe the pattern battery vs the KNOWN GAPS comment (round-3 lesson: a skip-rule fix can OPEN a new false-skip hole — probe both directions; fixture suite test/unit/scripts/check-lazy-imports-gate.test.ts 4 tests probe cả 2 hướng). AST-based từ Δ2 (2026-10-11, esbuild strip + acorn): per-entry budget {maxFiles} là RATCHET — bump chỉ khi chủ ý + justify trong commit; hosted-git-info allowlist ĐÃ xóa (2026-10-12, dead require dropped — gate strict trở lại). NOT bundled
scripts/check-slop-rules.mjs (W10-4, v0.11.38)Run gate trên tree sạch (node scripts/check-slop-rules.mjs exit 0, in no-double-cast baseline 41, current N (burn-down ok)) + suite test/unit/scripts/check-slop-rules.test.ts (5 tests, scanner semantics) + test/unit/scripts/check-slop-rules-cli.test.ts (CLI e2e). 3 scanner: no-json-parse-nonnull + no-any-deref STRICT (clean), no-double-cast WARN-only trên baseline 41. Ratchet: count no-double-cast > 41 → exit 1 — fix site mới (hoặc type relationship) hoặc thêm // slop-ok: <lý do>; KHÔNG tăng baseline trừ khi chủ ý + justify trong commit (burn DOWN only). NOT bundled
src/runtime/verification/verify-gate.ts + task-runner gate mount (U13)T7 smoke ×2 — (a) goal whose checks PASS → run must reach completed (NOT blocked) + task.verifier_pre_gate event with skipVerifier:true + verifier result artifact carries gate summary; (b) goal whose checks FAIL (e.g. false command) → LLM verifier spawns WITH gate context. Guards the U13×effectiveness interplay (live-caught 2026-10-10: green-gated verifier = no usage/transcript by design → effectiveness guard false-blocked the run → sync calls hung forever; fixed by counting diagnostics.verifyGate as observable work — effectiveness-guard.test.ts pins it). U13-ADJ (2026-10-13): layer-3 determinism PI_CREW_VERIFY_DETERMINISM DEFAULT OFF — battery recipe KHÔNG đổi trừ khi flag bật; khi bật: rerun critical-check cuối cùng PASS, flaky/executor-death → INCONCLUSIVE (không FAILED), không rerun khi checks đã FAILED; belt never-fail-task giờ wrap cả writeArtifact skip-path + finalizer NGỒI NGOÀI try (throw lan truyền, không fall-through spawn). W10-2 memo (2026-10-22, v0.11.38): verdict PASS được memoize theo workspace tree OID (git write-tree — FULL tracked tree, tree equality subsumes manifest bookends) + exact check list (name+command) + node version — kill-switch PI_CREW_VERIFY_GATE_MEMO=0 (default ON); battery recipe thêm 1 probe: re-gate cùng cây trong cùng host process → evidence line verify-gate-memo: HIT, checks skipped; KHÔNG memo khi repo không-git (key undefined ⇒ fail-open full gate run) / checks rỗng (0-check repo — live-proven không false-hit) / verdict không-PASS (chỉ PASS ran>0 record — FAILED/INCONCLUSIVE/drift-downgrade never) / typed gate. W10-9 typed gates (2026-10-22, v0.11.38): check accept {output:"json", schema} (minimal subset type/required/properties/items/enum, zero deps) — stdout phải parse AND match: invalid JSON / schema mismatch FAIL tại exit 0, parsed structuredOutput land trên check result; typed gate KHÔNG BAO GIỜ memo (guard cả lookup lẫn record)
src/state/coordination/** (run-lock socket U21, 2026-10-13)T7 + pinned test/unit/state/coordination/{process-lock,run-lock-socket}.test.ts (U21-1..6) — escape hatch PI_CREW_RUN_LOCK_SOCKET=0 (pre-U21 bit-for-bit). Semantics MỚI khi socket ON (default): stale-steal một LIVE holder giờ WAIT trong deadline staleMs*2 thay vì dual-entry (test cũ run-lock-steal-live-holder-warn.test.ts giờ env-scoped socket=0). Test-rule cho mọi lock-freeze tương lai: PHẢI await acquired-signal deterministic từ body (pattern team-tool-resume-liveness F1 sau 2026-10-13) — socket-listen là MACROTASK, assumption "acquisition thắng race với await kế tiếp" đã sai 1 lần (RR-011 token từng vô hình với contender same-process trong cửa sổ file→socket)
PI_CREW_STATE_BACKEND=sqlite (U8 state backend)Unit: sqlite-run-state.test.ts + state-store-sqlite-parity.test.ts (incl. coalesced-mirror pin). LIVE: one fast-fix run with the env set → assert state.sqlite exists, sqlite tasks reach terminal status (live-caught 2026-10-10: saveRunTasksCoalesced hot path skipped the db — manifest+tasks.json completed while sqlite stuck at createRun queued), events.jsonl still written (audit spine), JSON mirrors present
PI_CREW_CHILD_PI_MODE=rpc / PI_CREW_CHILD_PI_POOL (U14 transport)Unit: child-pi-rpc-mode.test.ts (18) + owned-process-u15.test.ts (11). LIVE: one async run with env set → workers' status.json carry rpc transport markers, run green, pgrep -f "mode rpc" clean after completion (no orphan rpc processes), json default unaffected
src/runtime/live-session/** shared-services rework (U4)Unit: live-session-u4 suite (10 — init<50ms via session_created.elapsedMs, recursion assert, D4 planning-window replay, hung-tool drop). LIVE: T8 md5 + one fast-fix run (li

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
58
Repository forks
22
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/baphuongna/pi-crew/real-test-pi-crew/badge)](https://verified-skill.com/skills/baphuongna/pi-crew/real-test-pi-crew)

Something wrong with this skill or its page? Tell us.