docs: approve explicit Bash cwd argument

This commit is contained in:
jb
2026-09-04 16:44:17 -04:00
parent bda414abbe
commit 3d68f7c6bf
+8 -8
View File
@@ -2,9 +2,9 @@
## Status
- Status: waiting
- Current phase: 3. Design and obtain plan approval
- Next safe action: obtain approval for the corrected explicit-`cwd` tool contract before further product mutation.
- Status: active
- Current phase: 5. Implement owned slices
- Next safe action: implement and verify the approved optional `cwd` Bash argument.
## Request and scope
@@ -35,7 +35,7 @@
- Plan/specification source: user request, `docs/todos.md`, and upstream Pi 0.84.4/0.85.0 source under `/srv/data/opensrc/repos/github.com/earendil-works/pi/`.
- Exact plan: pending corrected approval. Proposed: (1) keep `extensions/bash-cwd` as the approved publishable package; (2) replace the built-in Bash schema with its existing `command` and `timeout` fields plus optional `cwd`; (3) resolve relative `cwd` from `ctx.cwd`, validate that the result is a directory, and only then construct and invoke Pi's built-in Bash definition for that directory; (4) preserve built-in rendering, prompt metadata, output, timeout, cancellation, truncation, and session environment by spreading and delegating to the host definition; (5) revise the regression to pass explicit absolute and relative `cwd` arguments while the session context remains the primary fixture checkout, covering hidden-worktree root, nested package, omitted cwd, and fail-before-sentinel cases; (6) retain approved package inventory/docs/full-verification work and record that Pi 0.85.0's separate `ctx.cwd` correction does not add this per-call argument.
- Plan approval: pending because direct use of the live Bash tool proved the prior `ctx.cwd`-only plan did not satisfy the original explicit-`cwd` report.
- Plan approval: approved by the user through `ask_user` on 04SEP2026 (`approve` explicit cwd argument).
- UI classification and direction approval: non-UI; no prototype gate applies.
- Risk decisions and scope: the Pi dependency upgrade remains abandoned. The corrected tool schema adds one optional, backward-compatible field and uses the repository's existing `typebox` dependency. The package remains repository-only and will not be installed, published, or added to the active global Pi environment in this task.
@@ -45,7 +45,7 @@
| --- | --- | --- | --- | --- | --- |
| Workflow setup and research | parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87` | 15 minutes | workflow record only | Before: clean `main` at `7e7cfdb`; after: clean feature worktree at `5f853dc` | Complete |
| Initial dependency-plan implementation | parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87` | 15 minutes | `package.json`, `bun.lock`, focused test, workflow record | Before: clean feature worktree at `9d68d5f`; after: Pi 0.85.0 upgrade restored; focused red test retained unstaged | Paused and replanned after upstream packaging blocker |
| Local override implementation | parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87` | 15 minutes | `extensions/bash-cwd/**`, `scripts/bash-cwd.test.mjs` removal, `package.json`, `scripts/package-workspaces.test.mjs`, `README.md`, `docs/npm-packages.md`, `docs/todos.md`, `docs/workflow/skill-led-development-workflow-plan.md`, workflow record | Before: feature worktree at `f61f197` with inspected product changes | Paused for corrected contract approval |
| Local override implementation | parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87` | 15 minutes | `extensions/bash-cwd/**`, `scripts/bash-cwd.test.mjs` removal, `package.json`, `scripts/package-workspaces.test.mjs`, `README.md`, `docs/npm-packages.md`, `docs/todos.md`, `docs/workflow/skill-led-development-workflow-plan.md`, workflow record | Before: feature worktree at `f61f197` with inspected product changes | In progress under corrected approval |
## Verification matrix
@@ -81,6 +81,6 @@
## Checkpoints and blockers
- Last committed valid checkpoint: local-override approval commit `f61f197`
- Blockers: corrected explicit-`cwd` plan approval.
- Exact next safe action: present this corrected plan and ask the user to approve or reject the additive Bash tool argument.
- Last committed valid checkpoint: corrected-plan record commit `PENDING`
- Blockers: none.
- Exact next safe action: implement the optional `cwd` schema, path preflight, and explicit-argument regression cases.