npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-planning-with-files

v1.2.0

Published

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.

Readme

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": ["[email protected]"]
}

OpenCode 1 uses the singular plugin key:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["[email protected]"]
}

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

| Behavior | OpenCode 2 | OpenCode 1 | |---|---|---| | Inject framed planning context | session.hook("context"), added to the model request | chat.message, added as a synthetic message part | | Remind after writes | tool.hook("execute.after"), preserving output and attachments | tool.execute.after | | Preserve the plan pointer and hash during compaction | session.hook("compaction") | experimental.session.compacting | | Continue an unfinished gated plan | session.status with an idle status | session.idle | | Planning tools | tool.transform | tool 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