opencode-plugin-flow 4.0.1 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,13 @@
3
3
  One short line per release. For the full rationale behind each entry, see the
4
4
  commit history and review evidence.
5
5
 
6
- ## [Unreleased]
6
+ ## [4.1.1] - 2026-06-15
7
+
8
+ Keep Flow's local session ledger out of Git by default with a generated `.flow/.gitignore`, while preserving opt-in versioning for teams that intentionally archive session evidence.
9
+
10
+ ## [4.1.0] - 2026-06-15
11
+
12
+ Add Flow-native orchestration handoffs, verification gates, and a hidden verifier worker, inspired by Ray Fernando's parallel agent workflow skill work and RepoPrompt CE's context-engineering approach, while keeping the public runtime surface unchanged.
7
13
 
8
14
  ## [4.0.1] - 2026-06-15
9
15
 
package/README.md CHANGED
@@ -1,16 +1,26 @@
1
1
  # Flow Plugin for OpenCode
2
2
 
3
- `opencode-plugin-flow` is a skills-first workflow helper for OpenCode. The skills carry the planning, execution, validation, cleanup, UI, and review guidance. The plugin code is deliberately small: it keeps a durable `.flow/session.json` ledger and enforces the few binary gates that prompts cannot reliably enforce.
3
+ `opencode-plugin-flow` is a skills-first workflow helper for OpenCode. The skills carry planning, execution, validation, cleanup, UI quality, review, and orchestration judgment. The plugin code stays deliberately small: it keeps a durable `.flow/session.json` ledger and enforces the hard gates prompts should not be trusted to remember.
4
4
 
5
5
  Flow v4 is a breaking simplification. It does not preserve v3 session layouts or retired tool aliases.
6
6
 
7
+ ## What Flow adds
8
+
9
+ - A resumable one-feature-at-a-time loop for larger coding work.
10
+ - Skill-guided planning, running, validation, review, cleanup, and UI quality.
11
+ - Hidden evidence, review, validation, audit, verifier, and candidate workers for broad work.
12
+ - Structured handoffs with coverage, evidence, confidence, and gaps.
13
+ - Runtime gates for approval immutability, validation evidence, review evidence, and safe session closure.
14
+
15
+ The manager still owns every Flow state change. Workers gather evidence; they do not approve plans, complete features, or close sessions.
16
+
7
17
  ## Install
8
18
 
9
19
  Add Flow to your OpenCode config:
10
20
 
11
21
  ```json
12
22
  {
13
- "plugin": ["opencode-plugin-flow@4.0.1"]
23
+ "plugin": ["opencode-plugin-flow@4.1.1"]
14
24
  }
15
25
  ```
16
26
 
@@ -45,7 +55,7 @@ Commands are thin pointers into skills:
45
55
 
46
56
  ## Tools
47
57
 
48
- The v4 runtime exposes seven tools:
58
+ The runtime exposes seven tools:
49
59
 
50
60
  | Tool | Purpose |
51
61
  | --- | --- |
@@ -66,6 +76,7 @@ The runtime owns only safety:
66
76
  - `.flow/session.json` is the active source of truth.
67
77
  - `.flow/history/<session-id>.json` stores closed sessions.
68
78
  - Session writes are locked and atomic.
79
+ - Flow writes `.flow/.gitignore` so session state stays out of Git by default.
69
80
  - Mutable roots cannot be filesystem roots or `$HOME`.
70
81
  - Plans cannot be changed after approval.
71
82
  - Only one feature can be active at a time.
@@ -74,7 +85,7 @@ The runtime owns only safety:
74
85
  - Final completion requires `validationScope: "broad"` and a passing final review matching the plan's `finalReviewPolicy`.
75
86
  - `flow_session_close` accepts `kind: "completed"` only after an approved plan has passed final completion.
76
87
 
77
- Planning quality, decomposition, review depth, validation adequacy, and recovery judgment live in the skills.
88
+ Planning quality, decomposition, review depth, validation adequacy, orchestration, and recovery judgment live in the skills.
78
89
 
79
90
  ## State Layout
80
91
 
@@ -84,6 +95,10 @@ Planning quality, decomposition, review depth, validation adequacy, and recovery
84
95
  .flow/session.lock/
85
96
  ```
86
97
 
98
+ Versioning `.flow` state is opt-in. Edit `.flow/.gitignore` or use
99
+ `git add -f` only when a repository intentionally wants to archive Flow session
100
+ evidence.
101
+
87
102
  ## Development
88
103
 
89
104
  ```bash
@@ -97,6 +112,12 @@ The package exports only the OpenCode plugin entrypoint:
97
112
  import flowPlugin from "opencode-plugin-flow";
98
113
  ```
99
114
 
115
+ ## Credits
116
+
117
+ Flow's parallel orchestration guidance was inspired by Ray Fernando's skill work on parallel agent workflows. Flow also draws conceptual inspiration from [RepoPrompt CE](https://github.com/repoprompt/repoprompt-ce), especially its emphasis on codebase orientation, context engineering, agent orchestration, and reviewable handoffs.
118
+
119
+ The Flow version is its own OpenCode-native design: skills-first, manager-owned state, hidden workers, and no extra runtime ledger.
120
+
100
121
  ## Uninstall
101
122
 
102
123
  ```bash
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import{createHash as g}from"node:crypto";import{mkdir as Xe,readdir as w,readFile as y,rm as b,writeFile as $e}from"node:fs/promises";import{dirname as Je,join as i,normalize as k,sep as x}from"node:path";var _=".flow-skill-version";function p(){return process.env.HOME??process.env.USERPROFILE??""}function R(e=p()){return i(e,".config","opencode","skills")}function I(e){return g("sha256").update(e).digest("hex")}async function u(e){try{return await y(e,"utf8")}catch(a){if(a.code==="ENOENT")return null;throw a}}function F(e){let a=new Map;if(!e)return a;for(let t of e.split(/\r?\n/)){let o=/^file=(.+) sha256=([a-f0-9]{64})$/.exec(t)??/^file=(.+)=sha256:([a-f0-9]{64})$/.exec(t);if(o?.[1]&&o[2])a.set(o[1],o[2]);let n=/^hash=sha256:([a-f0-9]{64})$/.exec(t);if(n?.[1]&&!a.has("SKILL.md"))a.set("SKILL.md",n[1])}return a}function C(e,a){let t=k(i(e,...a.split("/")));if(t!==e&&t.startsWith(`${e}${x}`))return t;throw Error(`Unsafe skill file path '${a}'.`)}async function h(e=p()){let a=R(e),t=[],o=[],n;try{n=await w(a)}catch(r){if(r.code==="ENOENT")return{removed:t,kept:o};throw r}for(let r of n){if(r!=="flow"&&!r.startsWith("flow-"))continue;let s=i(a,r),l=await u(i(s,_));if(l===null){o.push(s);continue}let f=F(l),d=!1;for(let[m,v]of f){let c=await u(C(s,m));if(c!==null&&I(c)!==v){d=!0;break}}if(d){o.push(s);continue}await b(s,{recursive:!0,force:!0}),t.push(s)}return{removed:t,kept:o}}async function A(e){if(e[2]!=="uninstall"){process.stderr.write(`usage: opencode-plugin-flow uninstall
3
- `),process.exitCode=2;return}let t=await h();for(let o of t.removed)process.stdout.write(`Removed Flow skill: ${o}
2
+ import{createHash as g}from"node:crypto";import{mkdir as aa,readdir as w,readFile as y,rm as b,writeFile as ta}from"node:fs/promises";import{dirname as ra,join as i,normalize as k,sep as x}from"node:path";var _=".flow-skill-version";function h(){return process.env.HOME??process.env.USERPROFILE??""}function F(e=h()){return i(e,".config","opencode","skills")}function R(e){return g("sha256").update(e).digest("hex")}async function u(e){try{return await y(e,"utf8")}catch(a){if(a.code==="ENOENT")return null;throw a}}function I(e){let a=new Map;if(!e)return a;for(let t of e.split(/\r?\n/)){let o=/^file=(.+) sha256=([a-f0-9]{64})$/.exec(t)??/^file=(.+)=sha256:([a-f0-9]{64})$/.exec(t);if(o?.[1]&&o[2])a.set(o[1],o[2]);let n=/^hash=sha256:([a-f0-9]{64})$/.exec(t);if(n?.[1]&&!a.has("SKILL.md"))a.set("SKILL.md",n[1])}return a}function C(e,a){let t=k(i(e,...a.split("/")));if(t!==e&&t.startsWith(`${e}${x}`))return t;throw Error(`Unsafe skill file path '${a}'.`)}async function p(e=h()){let a=F(e),t=[],o=[],n;try{n=await w(a)}catch(r){if(r.code==="ENOENT")return{removed:t,kept:o};throw r}for(let r of n){if(r!=="flow"&&!r.startsWith("flow-"))continue;let s=i(a,r),c=await u(i(s,_));if(c===null){o.push(s);continue}let f=I(c),l=!1;for(let[m,v]of f){let d=await u(C(s,m));if(d!==null&&R(d)!==v){l=!0;break}}if(l){o.push(s);continue}await b(s,{recursive:!0,force:!0}),t.push(s)}return{removed:t,kept:o}}async function U(e){if(e[2]!=="uninstall"){process.stderr.write(`usage: opencode-plugin-flow uninstall
3
+ `),process.exitCode=2;return}let t=await p();for(let o of t.removed)process.stdout.write(`Removed Flow skill: ${o}
4
4
  `);for(let o of t.kept)process.stdout.write(`Kept non-Flow or user-edited skill: ${o}
5
5
  `);process.stdout.write(`Remove "opencode-plugin-flow" from opencode.json and restart OpenCode.
6
- `)}A(process.argv).catch((e)=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}
6
+ `)}U(process.argv).catch((e)=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}
7
7
  `),process.exitCode=1});