pi-anchorloop
Agent workflow skills for pi: one entry skill per task type over a short anchor loop (state the check, change, show it passing), plus a close guard and a skill validator.
Package details
Install pi-anchorloop from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-anchorloop- Package
pi-anchorloop- Version
3.2.0- Published
- Nov 24, 2026
- Downloads
- 11.4K/mo · 1,363/wk
- Author
- weihung1017
- License
- MIT
- Types
- extension, skill
- Size
- 173.4 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"skills": [
"./skills"
],
"extensions": [
"./pi/validate-tool-use.ts",
"./pi/close-guard.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-anchorloop
Agent workflow skills for pi: every task enters through its own skill, picks a playbook, and runs one short loop: state the check, change, show it passing.
Documentation in English and Traditional Chinese: concepts, skills, merge trains, and every extension behavior. It also covers using anchorloop with pi-straw-boss.
Why
- An anchor before the first change. Each task writes
Anchor: <check>before its first edit and ends with a passing run of that check after its last change. - A reviewer on another model. Authorization, migrations, shared contracts, security, or two or more workers bring one fresh reviewer on a different model family; P0 and P1 block the merge.
- No turn tax. No phase machine, no stage tools, and no advisory turns: one close guard adds a single line when a run settles without a passing anchor run.
Skills
anchorloop loop card · playbooks: autonomous-run, pause, pickup
├─ answering explain · compare
├─ investigating research · diagnose
├─ inspecting diff-review · qa-release
├─ coding bug-fix · feature · refactoring · perf · prototype · state-model (+ Mini SDD)
├─ integrating receive-car · train · urgent-car (+ seams)
├─ deploying deploy · rollback
├─ writing draft · tighten · comments · pr-description
├─ visual-designing compare · refine · motion (+ canvases, measure script)
└─ solid-loop apply-friction · author-skill · bootstrap
shared grilling · domain-modeling · human-feedback (uat) · agent-terse
Extensions
| File | What it does |
|---|---|
pi/close-guard.ts |
Adds one line when a run settles after a file change with no passing run of its anchor since; never starts a turn. |
pi/validate-tool-use.ts |
Validates skills, instruction files, and specs after each edit. |
3.0.0 removed the loop book, the anchor gate, the decision tool, second thought, and stream rules; docs/migration-3.0.md lists what to change.
Install
pi install npm:pi-anchorloop
pi install npm:pi-better-show # optional: review pages for human-feedback and visual-designing
Quick start
- Give pi a task; it picks the entry skill whose description matches.
- Read the opening goal line and correct a misreading right away.
- Read the
Anchor:line: the exact check that will observe the result. - Read the reply: it carries a passing run of the anchor after the last change, and anything it did not exercise is
unknown.
Develop
uv run python hooks/validate_all.py . # skills, rules, and durable specs
uv run --with pytest pytest -q # validators and the pi extensions (needs node)
cd site && npm ci && npm run check && npm run build # the documentation site
Acknowledgments
- pstack by Lauren Tan (MIT), mirror revision
e44668cof cursor/plugins (the 2.8.0 engineering-standard additions from cursor/pluginsc742dd6), and its port pstack-claude by Michael Denyer (MIT): task-type playbooks, the lifecycle playbooks, the closed review gate, fresh-subagent hand-off, and evidence grades; thestate-modelplaybook adapts thestatechartskill (cursor/pluginsa5539b15). - google-research/harness2 (Apache-2.0), revision
1cfe254: solid-loop's placement test, cheapest-mechanism order, and declining a lesson without a before/after contrast. - mattpocock/skills (MIT): grilling, domain-modeling, the diff review, the prototype playbook, and the feature playbook's interface checks.
- JuliusBrussee/caveman (Apache-2.0), revision
bad48a0: the terse voice inagent-terse. - HumanLayer's show-me (MIT): the views in
answering.
Ported files credit their sources in their own footers.