Pbench
Use when a coding agent's final result is wrong, incomplete, or disproved by verification — capture the imperfect session as a personal benchmark case via `yk pbench`.From its SKILL.md
npx -y skills add Yaphet2015/ya-skills --skill pbenchAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.8 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
PBench Agent Skill
Use this skill when a coding-agent task should be recorded as a personal benchmark case through yk pbench.
What Counts
Capture task/session-level outcome mismatch, not ordinary intermediate errors.
Benchmark-worthy cases include:
- the final or claimed result is wrong, incomplete, or not what the user expected;
- the user points out that the result or approach is incorrect after the agent produced work;
- verification disproves the claimed completion;
- the agent missed required context and had to redo the task because of that miss.
Do not treat these as benchmark-worthy by themselves:
- expected failing tests during TDD;
- one-off tool or command failures that are corrected inside a healthy workflow;
- exploratory retries before the agent has claimed or delivered a result.
Process debt, such as inefficient route, overengineering, or too much user steering, is future scope unless it also causes outcome mismatch.
Default Behavior
When you notice benchmark-worthy outcome mismatch:
- Finish repairing the user-visible task first.
- Ask the user whether to capture the imperfect session as a pbench case.
- Do not run capture before user approval.
Capture Flow
After the user approves capture:
- Run
yk pbench capture --source <agent> --yesfrom the subject Git repository. Built-in sources arecodexandclaude; other sources require--input <transcript>. For Codex, if capturing an older or non-current session, pass--input <jsonl>or--session-id <id>; for Claude, pass--session-id <id>(matches~/.claude/projectstranscripts) or--input <jsonl>. Capture uses the session cwd and Git baseline when the agent recorded them. - Read the printed transaction path, case directory, and
initialValidationwarnings.- Read
private/authoring-checklist.mdfirst for the generated capture-quality summary. - Treat empty prompt, empty command observations, or missing failure evidence warnings as capture-quality gaps to fix before finalizing.
- Read
- Edit the transaction
case/bundle:- read
public/replay.mdandpublic/context.manifest.jsonto understand the replay capsule; - keep all future agent-visible task input inside
public/; usepublic/key-observations.mdfor filtered failure/verification evidence andpublic/command-observations.mdonly as supporting context; - refine
public/prompt.md,public/context.md,public/environment.md,public/replay.md, and public context files as the future agent-visible task input; - review generated
private/failure.md,private/success.md, andprivate/verification.mdagainstprivate/failure-draft.mdand the raw session transcript; - fix generated private docs only when the session evidence is missing, ambiguous, or incomplete;
- keep generated command validators only when their captured cwd was normalized to the replay repository; unsafe cwd warnings mean the validator must be authored manually;
- if
private/validators/check-completion.mjssaysPBENCH_AUTHORING_REQUIRED, implement the validator from the correction evidence and private transcript; - if strict validation needs live services or secrets, record the required environment variable names in
replayRequirements.requiredEnvand on the validator instead of putting secret values in docs; - ask the user for clarification only when the captured session does not identify the failure or does not imply an observable completion check.
- read
- Run
yk pbench validate --transaction <tx-path> --strictuntil it passes. - Run
yk pbench finalize --transaction <tx-path>.
Never expose private/ contents to a future benchmarked agent. Use yk pbench export-replay --case <case-dir-or-case-id> --out <dir> when preparing replay input for an agent; the export contains only sanitized public/ files plus case.public.json. Replay startup fails closed if agent-visible pbench inputs expose /private, private/..., PB_PRIVATE_DIR, PB_CASE_DIR, raw transcript paths, validator paths, or the original case directory.
Replay Flow
Use finalized cases through the harness when comparing agents, models, rules, or skills:
- For headless automation, run
yk pbench run --case <case-id-or-dir> --agent <agent> --profile <comparison-label>. Built-in agents arecodexandclaude; any case can run against any registered agent, so a case captured from one agent can be benchmarked against another. - For agents that cannot be launched headlessly, run
yk pbench start --case <case-id-or-dir> --profile <comparison-label>, open the printed<workspace>/.personal-bench/replays/<run-id>/worktreewith that agent, and let the installedpbench-runnerskill trigger the one-shotyk pbench finish --run <run-id>validation. - Use stable profile labels such as
baseline,current-model,current-skills, ornew-harnesswhen comparing model, skill, rules, or harness changes. - Use
yk pbench auditbefore a comparison pass when you want a quick quality check across finalized cases. - After runs finish, use
yk pbench report --profile <comparison-label>oryk pbench report --format markdownto summarize status, manual-intervention, duration, token, case, and recent-run results. For debugging an individual run, inspect the run summary plusrunner-environment.json,agent.diff, andcandidate/untracked.jsonin the artifact directory.
Do not give a benchmarked agent the full case bundle. The runner prepares .pbench/public/, .pbench/case.public.json, and .pbench/run.json as the agent-visible surface inside the workspace-owned replay worktree, then runs private validators outside the public replay capsule.
What ships with it: 1 file
608 B alongside SKILL.md
- skill.json608 B