v3.8.1: Pi plan resolution anchored to the project, hardened to sh-resolver parity
This release closes #208 and the one gap v3.8.0 dogfooding surfaced.
Fixed
Pi extension: plan resolution no longer depends on the live shell cwd (closes #208, reported by @fd44fdg with a precise root-cause analysis). The Pi session cwd follows the shell, so an agent that changed into a subdirectory lost the project's plan entirely: resolution found nothing, the recitation went dark, and the "No task_plan.md found" warning fired on every write and edit. Resolution now anchors on the nearest ancestor directory carrying planning state, bounded by the .git repository boundary and a depth cap so a plan outside the repository can never leak into a session. Explicit PLAN_ID pins keep working from any subdirectory.
Every Pi injection now states which plan it resolved (plan: or plan: root). A stale .planning directory shadows a root task_plan.md by documented precedence; the label makes that visible instead of silent.
init-session created plans without the v3.8.0 Next Step section: the scripts write plans from an inline heredoc, not from the template files, so the section never reached real plans. All 26 heredoc copies fixed, with a regression test that asserts the created output rather than the template.
Bundled Pi extension bumped to 1.2.2. The npm package @tomxprime/planning-with-files is published by its package author; the npm side follows the repository.
Hardening shipped with the fix, found by the two-model release gate (an Opus adversarial pass plus a five-lens Sonnet reliability fleet): the Pi resolver now matches the sh resolver's slug validation and containment (a traversal PLAN_ID or a junctioned slug directory no longer resolves anything outside the project, fail-closed), every runtime consumer that takes a directory routes through the same anchor as plan resolution, and the injected plan label is sanitized.
New vitest coverage for the anchor walk and the parity hardening (35 tests green). Thanks to fd44fdg for the report and analysis.