opencode-plugin-flow 4.3.2 → 4.3.4

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/dist/index.js CHANGED
@@ -836,6 +836,60 @@ Apply the manager synthesis barrier from
836
836
  evidence-backed claims become plan fields.
837
837
  `;
838
838
 
839
+ // skills/flow-plan/references/plan-quality-checklist.md
840
+ var plan_quality_checklist_default = `# Plan quality checklist
841
+
842
+ Use this checklist before \`flow_plan_save\` and again before approval if the plan
843
+ changed during discussion. The goal is not a long planning artifact; it is a
844
+ compact plan another agent can execute without rediscovering the work.
845
+
846
+ ## Must pass
847
+
848
+ - Outcome: \`summary\` names the user-visible result, not an internal activity.
849
+ - Requirements: acceptance criteria, constraints, and non-goals that affect
850
+ implementation are captured in \`requirements\`.
851
+ - Decisions: assumptions, scope choices, and architecture choices already made
852
+ are captured in \`decisions\`.
853
+ - Uncertainty: specification uncertainty is resolved by a decision or a user
854
+ question; environment uncertainty is resolved by inspection, discovery, or a
855
+ first evidence-producing feature.
856
+ - Feature shape: each feature has one coherent outcome and can be reviewed on
857
+ its own.
858
+ - Targets: each feature names bounded files, modules, routes, commands, docs, or
859
+ generated surfaces. Whole-repo targets are allowed only for explicit broad
860
+ audits or final validation.
861
+ - Validation: each feature names expected check levels, such as targeted unit,
862
+ integration, browser/e2e, package/build, docs/static, cleanup preservation, or
863
+ broad project gate.
864
+ - Dependencies: \`dependsOn\` captures true ordering and avoids hidden dependency
865
+ chains.
866
+ - Review policy: \`finalReviewPolicy\` is \`detailed\` when the work changes
867
+ behavior, persistence, public contracts, security posture, release surfaces,
868
+ or multiple modules.
869
+
870
+ ## Revise when you see this
871
+
872
+ - A feature title describes a step like "update files" instead of a result.
873
+ - A validation entry says only "manual testing" or "run tests".
874
+ - A feature has targets but no behavior or artifact that can be judged.
875
+ - A feature claims cleanup or simplification without an evidence-producing
876
+ audit or cited smell.
877
+ - A docs feature depends on behavior that is not yet implemented but lacks
878
+ \`dependsOn\`.
879
+ - A low-risk \`finalReviewPolicy: "broad"\` is used while the plan crosses runtime,
880
+ schema, persistence, security, or release boundaries.
881
+
882
+ ## Approval summary
883
+
884
+ When presenting the plan for approval, include:
885
+
886
+ - The promised outcome.
887
+ - The feature order and any dependencies that matter.
888
+ - The main validation levels.
889
+ - Material assumptions in \`decisions\`.
890
+ - Any known gaps that remain intentional.
891
+ `;
892
+
839
893
  // skills/flow-plan/references/planning-examples.md
840
894
  var planning_examples_default = `# Planning examples
841
895
 
@@ -914,6 +968,164 @@ Better plan:
914
968
  3. Add behavior-preservation tests for the changed service paths.
915
969
  \`\`\`
916
970
 
971
+ ## Bugfix plan
972
+
973
+ Human summary:
974
+
975
+ 1. Reproduce and localize the failed password reset redirect.
976
+ 2. Fix the redirect state handling and cover the regression.
977
+ 3. Update release notes only if user-facing behavior changed.
978
+
979
+ Payload:
980
+
981
+ \`\`\`json
982
+ {
983
+ "goal": "Fix password reset links landing users on the wrong page",
984
+ "plan": {
985
+ "summary": "Password reset links land users on the intended reset confirmation flow.",
986
+ "overview": "Start with a focused reproduction, then fix the redirect state and update user-facing notes only if the behavior change needs documentation.",
987
+ "requirements": [
988
+ "Preserve existing token validation and expiry behavior.",
989
+ "Users with valid reset links should not be sent to the generic sign-in page before completing the reset."
990
+ ],
991
+ "decisions": [
992
+ "Treat the current redirect mismatch as a regression until reproduction proves otherwise."
993
+ ],
994
+ "finalReviewPolicy": "detailed",
995
+ "features": [
996
+ {
997
+ "id": "reset-redirect-repro",
998
+ "title": "Redirect reproduction",
999
+ "summary": "Produce a failing focused check or trace that identifies where the reset redirect is lost.",
1000
+ "targets": ["src/auth/reset", "tests/auth"],
1001
+ "validation": ["targeted unit or integration reproduction for reset redirect behavior"],
1002
+ "dependsOn": []
1003
+ },
1004
+ {
1005
+ "id": "reset-redirect-fix",
1006
+ "title": "Redirect fix",
1007
+ "summary": "Preserve reset redirect state through token validation and completion.",
1008
+ "targets": ["src/auth/reset", "tests/auth"],
1009
+ "validation": ["targeted regression test passes", "auth package/build check if available"],
1010
+ "dependsOn": ["reset-redirect-repro"]
1011
+ },
1012
+ {
1013
+ "id": "reset-redirect-notes",
1014
+ "title": "User-facing notes",
1015
+ "summary": "Document the corrected reset-link behavior if release notes or help text mention the flow.",
1016
+ "targets": ["CHANGELOG.md", "docs/auth.md"],
1017
+ "validation": ["docs/static check if available", "review docs against implemented behavior"],
1018
+ "dependsOn": ["reset-redirect-fix"]
1019
+ }
1020
+ ]
1021
+ }
1022
+ }
1023
+ \`\`\`
1024
+
1025
+ ## UI/frontend plan
1026
+
1027
+ Human summary:
1028
+
1029
+ 1. Map the current checkout empty state and responsive constraints.
1030
+ 2. Implement the empty state with accessible controls and mobile layout.
1031
+ 3. Verify the visual states with screenshots or browser evidence.
1032
+
1033
+ Good feature outline:
1034
+
1035
+ \`\`\`text
1036
+ 1. Empty-state discovery - inspect the route, component boundaries, design tokens, existing empty states, and likely responsive breakpoints.
1037
+ 2. Empty-state implementation - add the checkout empty state, action wiring, focus order, and loading/error boundaries in the existing component style.
1038
+ 3. Visual and interaction verification - capture desktop and mobile evidence, run available route/component checks, and fix overlap or accessibility regressions.
1039
+ \`\`\`
1040
+
1041
+ Why this is better than one "build UI" feature: the plan names the uncertain
1042
+ surface first, keeps implementation scoped to the route/components, and makes
1043
+ visual evidence part of completion rather than an afterthought.
1044
+
1045
+ ## Runtime or schema plan
1046
+
1047
+ Human summary:
1048
+
1049
+ 1. Introduce the schema change behind a backward-compatible parser.
1050
+ 2. Migrate callers and persistence writes.
1051
+ 3. Add compatibility validation and docs.
1052
+
1053
+ Good feature outline:
1054
+
1055
+ \`\`\`text
1056
+ 1. Compatible schema reader - accept old and new session payloads, with targeted parser tests for both.
1057
+ 2. New writer path - emit the new field from runtime transitions and update affected callers.
1058
+ 3. Compatibility sweep - run persistence/workspace tests, update docs, and verify old sessions still recover.
1059
+ \`\`\`
1060
+
1061
+ Use \`finalReviewPolicy: "detailed"\` for this shape. Persistence and schema work
1062
+ usually has hidden downstream contracts, so feature validation should name both
1063
+ targeted parser checks and broader workspace/runtime gates.
1064
+
1065
+ ## Docs-only plan
1066
+
1067
+ Docs-only work can use \`finalReviewPolicy: "broad"\` when it does not change
1068
+ commands, configuration, generated files, or release metadata.
1069
+
1070
+ Good feature outline:
1071
+
1072
+ \`\`\`text
1073
+ 1. Align installation docs - update README and troubleshooting steps for the current setup flow.
1074
+ 2. Verify commands and links - check documented commands against package scripts and make sure links/paths resolve.
1075
+ \`\`\`
1076
+
1077
+ Bad validation:
1078
+
1079
+ \`\`\`text
1080
+ validation: ["manual review"]
1081
+ \`\`\`
1082
+
1083
+ Better validation:
1084
+
1085
+ \`\`\`text
1086
+ validation: ["docs/static link and path review", "command examples checked against package scripts"]
1087
+ \`\`\`
1088
+
1089
+ ## Audit-first and review-first plans
1090
+
1091
+ Use an evidence-producing first feature when the request asks to "review",
1092
+ "audit", "clean up", "modernize", or "improve" a broad area.
1093
+
1094
+ Good feature outline:
1095
+
1096
+ \`\`\`text
1097
+ 1. Audit checkout state management - cite concrete findings with file:line evidence, refutation checks, severity, and recommended fix order.
1098
+ 2. Fix confirmed high-impact state leak - only for findings that survived the audit.
1099
+ 3. Regression validation - add or run checks covering the changed state paths.
1100
+ \`\`\`
1101
+
1102
+ Do not plan fixes for guessed findings. If the audit might find no actionable
1103
+ issue, say that in the first feature summary and make later features conditional
1104
+ on evidence.
1105
+
1106
+ ## Validation examples
1107
+
1108
+ Weak:
1109
+
1110
+ \`\`\`text
1111
+ validation: ["run tests", "manual testing"]
1112
+ \`\`\`
1113
+
1114
+ Stronger:
1115
+
1116
+ \`\`\`text
1117
+ validation: [
1118
+ "targeted unit tests for empty and invalid input",
1119
+ "integration test for persisted session recovery",
1120
+ "package/build gate for changed TypeScript exports",
1121
+ "browser screenshot at desktop and mobile widths for layout-sensitive UI",
1122
+ "docs/static review for changed command examples"
1123
+ ]
1124
+ \`\`\`
1125
+
1126
+ The stronger version says what level of evidence is expected and which behavior
1127
+ or surface it covers.
1128
+
917
1129
  ## Decomposition anti-patterns
918
1130
 
919
1131
  - Feature per file when behavior crosses files.
@@ -997,6 +1209,15 @@ Call \`flow_plan_save\` with:
997
1209
 
998
1210
  Use only \`finalReviewPolicy: "broad"\` or \`"detailed"\`. These are the canonical final-review policy and \`reviewDepth\` enum values. Use \`"broad"\` only for low-risk, narrow work. Use \`"detailed"\` for behavioral changes, cross-module edits, migrations, releases, security-sensitive code, or large refactors.
999
1211
 
1212
+ ## Plan quality gate
1213
+
1214
+ Before saving or asking for approval, load
1215
+ \`references/plan-quality-checklist.md\` and check the draft against it. Revise the
1216
+ plan until it passes, or record the remaining gap in \`decisions\` when the gap is
1217
+ an intentional assumption. Do not approve a plan whose outcome, requirements,
1218
+ targets, validation, or dependency order are still too vague for another agent
1219
+ to execute.
1220
+
1000
1221
  ## Feature sizing
1001
1222
 
1002
1223
  - Each feature should have one owner, one coherent outcome, and a validation story.
@@ -1012,7 +1233,8 @@ Use only \`finalReviewPolicy: "broad"\` or \`"detailed"\`. These are the canonic
1012
1233
 
1013
1234
  After saving, summarize the plan to the user. Call \`flow_plan_approve\` only after explicit user approval, unless the user already authorized autonomous implementation. Approved plans are immutable; changing them later requires reset/closure rather than silent edits.
1014
1235
 
1015
- See \`references/planning-examples.md\` for payload examples and decomposition anti-patterns.
1236
+ See \`references/planning-examples.md\` for payload examples and decomposition
1237
+ anti-patterns.
1016
1238
  `;
1017
1239
 
1018
1240
  // skills/flow-review/references/review-rubric.md
@@ -1048,13 +1270,42 @@ If unsure whether a finding is real, read more or downgrade it. Do not promote g
1048
1270
 
1049
1271
  ## Final review checklist
1050
1272
 
1051
- - Every feature is complete and together they satisfy the original goal.
1052
- - Broad validation ran and passed.
1273
+ - The original goal is satisfied by the delivered behavior or artifacts.
1274
+ - Every approved requirement is either met or explicitly accounted for by an
1275
+ accepted gap.
1276
+ - Plan decisions and scope boundaries still match the implementation.
1277
+ - Every planned feature is complete, has recorded validation evidence, and
1278
+ contributes to the final outcome.
1279
+ - Feature dependencies were completed in an order that makes the evidence
1280
+ trustworthy.
1281
+ - Changed artifacts match the plan's \`targets\`; extra changed surfaces are
1282
+ explained and reviewed.
1283
+ - Broad validation ran and passed, or any skipped broad check is justified as a
1284
+ non-blocking gap.
1053
1285
  - The final \`reviewDepth\` equals the approved \`finalReviewPolicy\`; the only final-review enum values are \`broad\` and \`detailed\`.
1054
1286
  - Feature-level reviews have no unresolved blocking findings.
1055
1287
  - Docs, commands, package metadata, and release surfaces match the delivered behavior.
1056
1288
  - Remaining gaps are explicit and do not contradict \`kind: "completed"\`.
1057
1289
 
1290
+ ## Final convergence scan
1291
+
1292
+ Run this scan before returning a passing \`finalReview\`:
1293
+
1294
+ 1. Restate the original goal and the approved plan summary in your own words.
1295
+ 2. Map each requirement to delivered evidence, validation output, or an explicit
1296
+ accepted gap.
1297
+ 3. Walk every planned feature and confirm its completion evidence, review
1298
+ result, and validation level.
1299
+ 4. Compare the changed files, docs, commands, generated surfaces, and package
1300
+ metadata to the planned targets and requirements.
1301
+ 5. Check whether the validation evidence would have caught the main failure
1302
+ modes introduced by the work.
1303
+ 6. Decide whether remaining gaps are advisory or blocking before setting
1304
+ \`status\`.
1305
+
1306
+ Fail the final review when the delivered work cannot be traced back to the
1307
+ approved goal and requirements, even if each individual feature review passed.
1308
+
1058
1309
  ## Payloads
1059
1310
 
1060
1311
  Feature review:
@@ -1139,6 +1390,9 @@ These instructions run in two contexts, and only one of them can load helpers:
1139
1390
  - Call \`flow_status\` when available.
1140
1391
  - Identify whether this is a feature review or final review.
1141
1392
  - Read the approved plan fields relevant to the work: \`requirements\`, \`decisions\`, feature \`targets\`, feature \`validation\`, and dependencies.
1393
+ - For final review, also compare the original goal, full feature list, completed
1394
+ feature evidence, changed artifacts, and final validation against the
1395
+ convergence checklist in \`references/review-rubric.md\`.
1142
1396
  - Inspect the actual diff, changed files, tests, and validation output. Do not review only the completion summary.
1143
1397
  - In manager context, load \`flow-test\` for validation-heavy,
1144
1398
  regression-sensitive, browser QA, or unclear coverage reviews. If it is
@@ -1710,6 +1964,10 @@ var FLOW_SKILL_DEFINITIONS = [
1710
1964
  relativePath: "references/planning-examples.md",
1711
1965
  content: planning_examples_default
1712
1966
  },
1967
+ {
1968
+ relativePath: "references/plan-quality-checklist.md",
1969
+ content: plan_quality_checklist_default
1970
+ },
1713
1971
  {
1714
1972
  relativePath: "references/parallel-discovery.md",
1715
1973
  content: parallel_discovery_default
@@ -1802,6 +2060,7 @@ var FLOW_REVIEW_BUNDLED_INSTRUCTIONS = bundledFlowInstructions([
1802
2060
  var FLOW_PLAN_BUNDLED_INSTRUCTIONS = bundledFlowInstructions([
1803
2061
  ["flow-plan", "SKILL.md"],
1804
2062
  ["flow-plan", "references/planning-examples.md"],
2063
+ ["flow-plan", "references/plan-quality-checklist.md"],
1805
2064
  ["flow-plan", "references/parallel-discovery.md"],
1806
2065
  ["flow", "references/parallel-orchestration.md"],
1807
2066
  ["flow", "references/handoff-format.md"]
@@ -1822,6 +2081,7 @@ var FLOW_AUTO_BUNDLED_INSTRUCTIONS = bundledFlowInstructions([
1822
2081
  ["flow", "references/handoff-format.md"],
1823
2082
  ["flow-plan", "SKILL.md"],
1824
2083
  ["flow-plan", "references/planning-examples.md"],
2084
+ ["flow-plan", "references/plan-quality-checklist.md"],
1825
2085
  ["flow-plan", "references/parallel-discovery.md"],
1826
2086
  ["flow-run", "SKILL.md"],
1827
2087
  ["flow-run", "references/validation-rubric.md"],
@@ -3744,4 +4004,4 @@ export {
3744
4004
  plugin_default as default
3745
4005
  };
3746
4006
 
3747
- //# debugId=F01203B3D1AFDF4F64756E2164756E21
4007
+ //# debugId=72872E938F875B1A64756E2164756E21