New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

opencode-planning-with-files

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-planning-with-files

Native OpenCode plugin for planning-with-files: per-turn plan injection, write reminders, compaction flush, a session-idle completion gate, and pwf_init / pwf_status / pwf_check tools.

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
107
0.94%
Maintainers
1
Weekly downloads
 
Created
Source

opencode-planning-with-files

Native OpenCode plugin for planning-with-files: persistent file-based planning for AI coding agents. The plan lives on disk in task_plan.md, findings.md and progress.md; this plugin keeps it in the model's context on every turn and can hold the session open until the plan reports complete.

Install

Version 1.2.0 supports OpenCode 1.18.21 and OpenCode 2.0.21. For OpenCode 2, add the plugin to opencode.json (project) or ~/.config/opencode/opencode.json (global):

{
  "plugins": ["opencode-planning-with-files@1.2.0"]
}

OpenCode 1 uses the singular plugin key:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-planning-with-files@1.2.0"]
}

OpenCode installs the package on the next start. Install the skill text as well so the agent knows the workflow:

npx skills add OthmanAdi/planning-with-files --skill planning-with-files -g

That command lands in ~/.agents/skills/planning-with-files/, one of the paths OpenCode reads natively.

What the plugin does

BehaviorOpenCode 2OpenCode 1
Inject framed planning contextsession.hook("context"), added to the model requestchat.message, added as a synthetic message part
Remind after writestool.hook("execute.after"), preserving output and attachmentstool.execute.after
Preserve the plan pointer and hash during compactionsession.hook("compaction")experimental.session.compacting
Continue an unfinished gated plansession.status with an idle statussession.idle
Planning toolstool.transformtool definitions

The tools are pwf_init (root or .planning/<date>-<slug>/, mode: autonomous or gated with attestation), pwf_status and pwf_check. Write reminders apply to write, edit, patch, multiedit and apply_patch.

Plan selection honors PLAN_ID. Without it, multiple named plans produce an ambiguity notice; a single named plan or the legacy root plan can be selected. The completion gate uses PWF_GATE_CAP (default 20) and ledger stall detection to release the session. Child sessions are never re-prompted.

Local v2 wrappers must re-export the default definition: export { default } from "./path/to/dist/index.js". The default definition also carries the v1 server entry, and the named PlanningWithFiles factory remains available.

Autonomous and gated plans inject only when .attestation (slug) or .plan-attestation (root) matches the SHA-256 of task_plan.md. PLANNING_DISABLED=1 silences every hook; PWF_PLAN_ROOT=<absolute path> pins the project root and fails closed when it does not resolve. A live plan in a direct child project makes a cwd guess ambiguous and nothing is injected, with a one-line notice.

Commands

Copy pwf.md and pwf-status.md from the repository's .opencode/commands/ into ~/.config/opencode/commands/ (or your project's .opencode/commands/) to get /pwf [--gated] [plan name] and /pwf-status.

Full guide: docs/opencode.md.

License

MIT

Keywords

opencode

FAQs

Package last updated on 01 Oct 2026

Related posts