/os-tk-plan-review
Inputs
- •Plan text (from
$ARGUMENTS) - •Optional
--file <path> - •Optional
--approve <plan-id>to approve a plan (no review) - •Optional
--reject <plan-id>to reject a plan (no review) - •Optional
--pending <plan-id>to mark plan pending (no review) - •Optional
--validate-plan <plan-id>to require approved plan status
Resolve skill dir
bash
SKILL_DIR=".pi/skills/os-tk-plan-review" if [[ ! -d "$SKILL_DIR" ]]; then SKILL_DIR="pi/skills/os-tk-plan-review"; fi
Parse arguments
- •Use
$ARGUMENTSfor plan text unless--fileis provided - •If
--approve/--reject/--pendingis provided: run approval and STOP - •If
--validate-planis provided: validate approval status before review
Approval actions (NEW)
If any of these flags are present, run approval and STOP:
- •
--approve <plan-id> - •
--reject <plan-id> - •
--pending <plan-id>
Run:
bash
bash "$SKILL_DIR/scripts/approve-plan.sh" --plan-id <plan-id> --approve|--reject|--pending
Validate plan approval (NEW)
If --validate-plan <plan-id> is provided, check approval status:
bash
bash "pi/skills/os-tk-proposal/scripts/check-approved-plan.sh" --validate-plan --plan-id <plan-id>
If validation fails, STOP with error.
Load plan
- •If
--fileprovided, usereadto load that file. - •Else use the latest plan from conversation; if missing, ask user to paste the plan.
Fresh-eyes review (subagent)
Invoke the review subagent via the pi-async-subagents tool subagent:
code
subagent({
"agent": "os-tk-plan-reviewer",
"task": "Review this project plan with fresh eyes. Be concise. Plan:\n<PLAN_TEXT>",
"agentScope":"both",
"async": false
})
Output
- •Return reviewer output verbatim.
- •Do not rewrite the plan here.
Approval workflow (summary)
- •Create plan with
/os-tk-plan - •Approve plan with
/os-tk-plan-review --approve <plan-id> - •Create proposal with
/os-tk-proposal --require-plan(checks approved plan)
Approvals file
- •
.os-tk/plan-approvals.json - •Schema:
{ "approvals": { "planId": { "status", "reviewedBy", "reviewedAt", "updatedAt" } } } - •Status values:
approved,pending,rejected