diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 882b8ad..0caee72 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -8,7 +8,6 @@ {"_type":"issue","id":"islandflow-ayo","title":"Drop stale backlog events from live fanout","description":"Follow-up to live freshness rollout: /ws/live was still fanning out stale backlog events for freshness-gated channels, which kept tape panes in Live feed behind despite active synthetic ingest. Gate fanout and cache ingest by freshness for options/nbbo/equities/flow.","status":"closed","priority":1,"issue_type":"bug","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-04-28T21:26:39Z","created_by":"dirtydishes","updated_at":"2026-04-28T21:26:44Z","started_at":"2026-04-28T21:26:44Z","closed_at":"2026-04-28T21:26:44Z","close_reason":"Completed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-0v6","title":"Fix tape freshness, NBBO coverage, pause controls, and filter popup","description":"Implement the tape fixes requested for synthetic options notional sizing, strict live freshness, live-mode pause/resume behavior, stronger NBBO snapshot coverage, and moving flow filters behind a popup. Includes server-side live cache changes, web terminal state/UI changes, and tests for synthetic pricing, live snapshot freshness/NBBO retention, and live pause/filter interactions.","status":"closed","priority":1,"issue_type":"task","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-04-28T21:02:52Z","created_by":"dirtydishes","updated_at":"2026-04-28T21:13:38Z","started_at":"2026-04-28T21:02:57Z","closed_at":"2026-04-28T21:13:38Z","close_reason":"Completed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-e4r","title":"Implement smart-money flow filtering and synthetic firehose modes","description":"Implement the approved multi-surface plan for named synthetic market profiles, options raw-vs-signal filtering, live/API filter contracts, Tape page client-side flow filters, firehose-readiness improvements, tests, and README updates.","status":"closed","priority":1,"issue_type":"feature","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-04-28T20:10:49Z","created_by":"dirtydishes","updated_at":"2026-04-28T20:29:29Z","started_at":"2026-04-28T20:10:53Z","closed_at":"2026-04-28T20:29:29Z","close_reason":"Implemented synthetic market profiles, options signal-path filtering, signal-aware API/replay contracts, Tape page filters, tests, and README updates. Follow-up tracked in islandflow-biq.","dependency_count":0,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"islandflow-hio","title":"Add Pi /plan command for plan mode","description":"Create a Pi extension so typing /plan activates plan mode instructions and guards against implementation file edits until disabled.","status":"closed","priority":2,"issue_type":"task","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-05-15T04:56:00Z","created_by":"dirtydishes","updated_at":"2026-05-15T04:57:03Z","started_at":"2026-05-15T04:56:03Z","closed_at":"2026-05-15T04:57:03Z","close_reason":"Implemented project-local Pi /plan extension with plan-mode guardrails.","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-t8s","title":"Reconcile merge conflicts on impeccable","description":"Resolve the PR branch conflicts against main while preserving terminal hardening, responsive adaptation, and related test coverage.","status":"closed","priority":2,"issue_type":"task","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-05-14T22:32:40Z","created_by":"dirtydishes","updated_at":"2026-05-14T22:34:03Z","started_at":"2026-05-14T22:33:05Z","closed_at":"2026-05-14T22:34:03Z","close_reason":"Rebased impeccable onto main, resolved the terminal test conflict, and revalidated the web app.","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-7ch","title":"Reconcile merge conflicts on impeccable","description":"Resolve the current merge or rebase conflicts on the impeccable branch and preserve the intended terminal UI and documentation changes.","status":"in_progress","priority":2,"issue_type":"task","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-05-14T22:30:10Z","created_by":"dirtydishes","updated_at":"2026-05-14T22:30:29Z","started_at":"2026-05-14T22:30:29Z","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"islandflow-1f5","title":"Adapt terminal view for responsive use","description":"Improve the terminal view so it remains usable across desktop, tablet, and small-screen contexts without hiding core workflow functionality.","status":"closed","priority":2,"issue_type":"task","assignee":"dirtydishes","owner":"dishes@dpdrm.com","created_at":"2026-05-14T22:22:18Z","created_by":"dirtydishes","updated_at":"2026-05-14T22:25:22Z","started_at":"2026-05-14T22:22:25Z","closed_at":"2026-05-14T22:25:22Z","close_reason":"Terminal view adapted for responsive and touch-first contexts; tests and web build passed.","dependency_count":0,"dependent_count":0,"comment_count":0} diff --git a/.pi/extensions/plan-mode.ts b/.pi/extensions/plan-mode.ts deleted file mode 100644 index d80ef01..0000000 --- a/.pi/extensions/plan-mode.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { ExtensionAPI } from "@mariozechner/pi-coding-agent"; -import { isToolCallEventType } from "@mariozechner/pi-coding-agent"; - -const PLAN_MODE_PROMPT = `PLAN MODE IS ACTIVE. - -You must not modify code, configuration, tests, documentation, project files, or external files. Do not use write or edit tools. Do not run shell commands that create, modify, delete, move, format, install, commit, push, or otherwise mutate files, dependencies, services, or repository state. - -You may inspect files and run read-only discovery commands. Produce a concise implementation plan, include risks and validation steps, then ask the user whether they want to proceed with implementation. If the user asks to save the plan, create only a plan document under docs/plans/ after explicitly confirming that saving the plan is allowed.`; - -let planMode = false; - -function looksMutatingShell(command: string): boolean { - const normalized = command.toLowerCase(); - const mutatingPatterns = [ - /(^|[;&|()\s])(>|>>|tee\b)/, - /(^|[;&|()\s])(rm|rmdir|mv|cp|mkdir|touch|chmod|chown|ln|truncate)\b/, - /(^|[;&|()\s])(git\s+(add|commit|push|pull|merge|rebase|reset|checkout|switch|restore|stash|clean|tag|branch)|bd\s+(create|update|close|reopen|dolt\s+push))\b/, - /(^|[;&|()\s])(bun|npm|pnpm|yarn|npx)\s+(install|add|remove|update|upgrade|dedupe|run\s+(build|dev|format|lint:fix))\b/, - /(^|[;&|()\s])(python|python3|node|ruby|perl)\b.*\b(-w|writefile|appendfile|unlink|rmdir|mkdir|rename)\b/, - /(^|[;&|()\s])(docker|docker-compose)\s+(run|compose\s+up|up|down|rm|rmi|build|push|pull)\b/, - ]; - - return mutatingPatterns.some((pattern) => pattern.test(normalized)); -} - -export default function planModeExtension(pi: ExtensionAPI) { - pi.registerCommand("plan", { - description: "Activate plan mode. Use '/plan off' to return to implementation mode.", - handler: async (args, ctx) => { - const command = args.trim().toLowerCase(); - - if (["off", "disable", "disabled", "false", "0"].includes(command)) { - planMode = false; - ctx.ui.setStatus("plan-mode", undefined); - ctx.ui.notify("Plan mode disabled. Implementation tools are available again.", "info"); - return; - } - - planMode = true; - ctx.ui.setStatus("plan-mode", "PLAN"); - ctx.ui.notify("Plan mode enabled. File mutation tools and mutating shell commands are blocked.", "success"); - }, - }); - - pi.registerCommand("implement", { - description: "Disable plan mode and return to implementation mode.", - handler: async (_args, ctx) => { - planMode = false; - ctx.ui.setStatus("plan-mode", undefined); - ctx.ui.notify("Plan mode disabled. Implementation mode is active.", "info"); - }, - }); - - pi.on("session_start", async (_event, ctx) => { - if (planMode) ctx.ui.setStatus("plan-mode", "PLAN"); - }); - - pi.on("before_agent_start", async (event) => { - if (!planMode) return; - return { - systemPrompt: `${event.systemPrompt}\n\n${PLAN_MODE_PROMPT}`, - }; - }); - - pi.on("tool_call", async (event) => { - if (!planMode) return; - - if (event.toolName === "write" || event.toolName === "edit") { - return { - block: true, - reason: "Plan mode is active. Use /plan off or /implement before modifying files.", - }; - } - - if (isToolCallEventType("bash", event) && looksMutatingShell(event.input.command ?? "")) { - return { - block: true, - reason: "Plan mode is active. Mutating shell commands are blocked. Use /plan off or /implement to proceed.", - }; - } - }); -} diff --git a/docs/turns/2026-05-15-add-pi-plan-mode.html b/docs/turns/2026-05-15-add-pi-plan-mode.html deleted file mode 100644 index 87c93a2..0000000 --- a/docs/turns/2026-05-15-add-pi-plan-mode.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - Add Pi /plan Mode - - - -

Add Pi /plan Mode

-
-

Summary

-

Added a project-local Pi extension that lets users type /plan to activate a guarded planning mode, then /plan off or /implement to return to implementation mode.

-
- -

Changes Made

- - -

Context

-

Pi does not ship with built-in plan mode. Its documented extension system supports custom slash commands and tool-call interception, which fits this workflow without patching Pi internals.

- -

Important Implementation Details

-
/plan          # enable planning guardrails
-/plan off      # disable planning guardrails
-/implement     # disable planning guardrails
-

When active, plan mode appends explicit system instructions before each agent turn and blocks file mutation tools. Bash commands are screened with conservative patterns for filesystem, git, package-manager, and Docker mutations.

- -

Validation

- - -

Issues, Limitations, and Mitigations

- - -

Follow-up Work

-

No required follow-up work. Beads issue: islandflow-hio.

- -