opencode-plugin-flow 4.3.3 → 4.3.5

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/cli.js CHANGED
@@ -178,7 +178,7 @@ stay separate:
178
178
  | --- | --- | --- |
179
179
  | Repo shape is unclear before planning | Discovery pass | Requirements, decisions, targets, validation entries, or a review-first feature |
180
180
  | A broad finding set needs refutation | Audit pass | Surviving findings with guards checked and gaps named |
181
- | Changed files or risk lenses are too broad for one review pass | Review pass | One \`featureReview\` or \`finalReview\` payload owned by the manager |
181
+ | Changed files or risk lenses are too broad for one review pass | Review pass | One feature review packet or \`finalReview\` payload owned by the manager |
182
182
  | Test strategy or route coverage is unclear | Validation pass | Candidate commands or authorized raw command evidence |
183
183
  | A claim is single-source, surprising, high-stakes, or payload-bound | Verification pass | Per-claim keep, narrow, rewrite, or remove decisions |
184
184
  | Multiple implementation paths are plausible | Candidate pass | Candidate patches inspected and validated by the manager before use |
@@ -412,7 +412,7 @@ Where accepted evidence goes:
412
412
  - Validation evidence may become \`validationRun\` only when the worker was
413
413
  explicitly authorized to run the command and reported the exact command,
414
414
  status, and raw outcome summary.
415
- - Review evidence informs \`featureReview\` or \`finalReview\`, but the manager
415
+ - Review evidence informs \`featureReviewDepth\` plus \`featureReview\`, or \`finalReview\`, but the manager
416
416
  owns the pass/fail verdict and must resolve blockers, contradictions, and
417
417
  coverage gaps before returning the payload.
418
418
  - Audit evidence becomes findings only after refutation; blocking findings need
@@ -539,10 +539,10 @@ suggestions do not move into the next pass or user-facing answer.
539
539
  `;
540
540
 
541
541
  // skills/flow/references/recovery-playbook.md
542
- var recovery_playbook_default = '# Recovery playbook\n\nUse this when a Flow tool returns `status: "error"`, a blocker, or a `nextAction` that conflicts with memory.\n\n## First response\n\n1. Re-anchor with `flow_status`.\n2. Read the returned `summary`, `recovery`, `lastError`, and active feature.\n3. Fix the cause, then retry the smallest valid Flow action.\n\n## Common cases\n\n- `missing_session`: start with `flow_plan_save` using the user\'s goal.\n- `missing_goal`: ask for a concrete goal before planning.\n- `Approved plans cannot be changed`: use `flow_feature_reset` when only affected features need another pass; otherwise close and start a new goal.\n- `No feature is currently running`: call `flow_run_start` before completing.\n- `already in progress`: finish, reset, or block the active feature before starting another.\n- `Completion requires recorded validation evidence`: run real validation and include at least one passing `validationRun`.\n- `Completion requires all recorded validation to pass`: fix failures and rerun. Do not relabel failed checks as passed.\n- `Non-final feature completion requires targeted validation`: use `validationScope: "targeted"` for ordinary features.\n- `Final feature completion requires broad validation`: run the project-level gate and use `validationScope: "broad"`.\n- `Completion requires a passing featureReview`: run or request a real review and include a passing `featureReview` only when there are no blocking findings.\n- `Final feature completion requires a finalReview`: perform final review and include `finalReview`.\n- `Final review depth must match the plan policy`: use `reviewDepth` equal to the approved plan\'s `finalReviewPolicy`; valid final-review values are `broad` and `detailed`.\n- `Cannot close ... unfinished features`: complete, reset, defer, or abandon honestly. Do not mark completed while work remains.\n\n## Reset guidance\n\nUse `flow_feature_reset` when the active or completed work was built on the wrong assumption, validation revealed a design issue, dependencies need to be rerun, or dependent features must be invalidated. Resetting a feature also resets its dependents.\n\n## Closure guidance\n\nUse `flow_session_close`:\n\n- `completed`: only after all planned features are complete.\n- `deferred`: the user intentionally postpones unfinished work.\n- `abandoned`: the session should be archived without claiming delivery.\n\nAfter closure, the active `.flow/session.json` is removed and the archived JSON is stored under `.flow/history/`.\n';
542
+ var recovery_playbook_default = '# Recovery playbook\n\nUse this when a Flow tool returns `status: "error"`, a blocker, or a `nextAction` that conflicts with memory.\n\n## First response\n\n1. Re-anchor with `flow_status`.\n2. Read the returned `summary`, `recovery`, `lastError`, and active feature.\n3. Fix the cause, then retry the smallest valid Flow action.\n\n## Common cases\n\n- `missing_session`: start with `flow_plan_save` using the user\'s goal.\n- `missing_goal`: ask for a concrete goal before planning.\n- `Approved plans cannot be changed`: use `flow_feature_reset` when only affected features need another pass; otherwise close and start a new goal.\n- `No feature is currently running`: call `flow_run_start` before completing.\n- `already in progress`: finish, reset, or block the active feature before starting another.\n- `Completion requires recorded validation evidence`: run real validation and include at least one passing `validationRun`.\n- `Completion requires all recorded validation to pass`: fix failures and rerun. Do not relabel failed checks as passed.\n- `Non-final feature completion requires targeted validation`: use `validationScope: "targeted"` for ordinary features.\n- `Final feature completion requires broad validation`: run the project-level gate and use `validationScope: "broad"`.\n- `Feature review depth ... does not meet the plan requirement`: rerun review\n at the feature\'s planned depth or reset/replan if the depth was chosen\n incorrectly.\n- `Completion requires a passing featureReview`: run or request a real review and include a passing `featureReview` only when there are no blocking findings.\n- `Review retry budget exhausted`: stop and report the remaining blocker. Do\n not keep patching; reset or replan only after explicit user direction.\n- `Final feature completion requires a finalReview`: perform final review and include `finalReview`.\n- `Final review depth must match the plan policy`: use `reviewDepth` equal to the approved plan\'s `finalReviewPolicy`; valid final-review values are `broad` and `detailed`.\n- `Completed ... features since the last Flow checkpoint`: stop the current\n root session and resume from `.flow/session.json` in a fresh OpenCode session.\n- `Cannot close ... unfinished features`: complete, reset, defer, or abandon honestly. Do not mark completed while work remains.\n\n## Reset guidance\n\nUse `flow_feature_reset` when the active or completed work was built on the wrong assumption, validation revealed a design issue, dependencies need to be rerun, or dependent features must be invalidated. Resetting a feature also resets its dependents.\n\n## Closure guidance\n\nUse `flow_session_close`:\n\n- `completed`: only after all planned features are complete.\n- `deferred`: the user intentionally postpones unfinished work.\n- `abandoned`: the session should be archived without claiming delivery.\n\nAfter closure, the active `.flow/session.json` is removed and the archived JSON is stored under `.flow/history/`.\n';
543
543
 
544
544
  // skills/flow/SKILL.md
545
- var SKILL_default = "---\nname: flow\ndescription: Manage the end-to-end Flow loop for skills-first OpenCode work. Use when a user asks for Flow-guided delivery from goal to completion, resumable autonomous delivery, or resuming or closing a Flow session. For plan-only work use flow-plan; for executing one approved feature use flow-run.\n---\n\n# Flow\n\nUse Flow as a minimal state ledger, not as a framework. Skills provide judgment; the runtime only records the approved plan, active feature, validation evidence, review evidence, and closure.\n\nRouting: this manager skill owns the whole loop and every state-changing `flow_*` call. Load `flow-plan` alone for plan-only requests and `flow-run` alone when an approved plan needs one feature executed. Answer status-only questions with `flow_status`; no skill load is needed. `flow-test`, `flow-deslop`, and `flow-ui-quality` are optional helpers loaded from inside the loop; `flow-commit` is user-triggered only and never part of the autonomous loop.\n\n## Loop\n\n1. Call `flow_status` first. Trust its active session and next action over conversation memory.\n If the result includes `setup.skills`, follow the Skill Availability rules\n below before loading any Flow skill.\n2. If there is no active session and the user gave a goal, load `flow-plan`, save a plan with `flow_plan_save`, then approve it with `flow_plan_approve` only after explicit user approval or prior authorization for autonomous implementation. If there is no goal, ask for one.\n3. Load `flow-run`, call `flow_run_start`, implement exactly one feature, validate it, and prepare a `flow_feature_complete` payload. For validation-heavy, regression-sensitive, browser QA, route QA, or failure-prone work, use `flow-test` to choose and summarize evidence before completion.\n4. Load `flow-review` for the required feature review. The reviewer reports a `featureReview` payload; the manager records it inside `flow_feature_complete`.\n5. On the final feature, run broad validation and include `finalReview` in the same `flow_feature_complete` call. Its `reviewDepth` must match the plan's `finalReviewPolicy`.\n6. After all features are complete, archive the session with `flow_session_close` using `kind: \"completed\"`.\n\nUse `references/parallel-orchestration.md` for broad read-only discovery, audit, validation, review, verification, or candidate implementation passes. It is the whole pass playbook — orient, slice, manifest, fan out, account, verify, synthesize, extend or stop — and its `references/handoff-format.md` companion holds the worker report templates the manager pastes into prompts. Hidden Flow workers are injected by plugin config; invoke the named worker when it is available. The manager owns every `flow_*` state change.\n\nDo not commit, push, amend, rebase, publish, or mutate releases during the\nautonomous Flow loop. Load `flow-commit` only when the user explicitly asks for\ncommit preparation or commit creation.\n\n## Skill Availability\n\nIf `flow_status` returns `setup.skills`, report that setup status and stop\nnative-loading Flow skills in the current OpenCode startup. Missing, incomplete,\nor outdated managed skills require a sync/restart cycle before their native skill\ninstructions can be trusted by the running process. Public command bundles are\nself-contained and may continue when the command prompt already embeds the\nrequired Flow instructions.\n\nIf optional helper skills such as `flow-test`, `flow-deslop`, or\n`flow-ui-quality` are unavailable, continue only with explicit coverage gaps. Do\nnot copy their rubrics into another skill and do not claim their quality checks\nwere completed.\n\n## Runtime Surface\n\n- `flow_status`: read the active session.\n- `flow_plan_save`: create a session and/or save a draft plan.\n- `flow_plan_approve`: lock the draft plan.\n- `flow_run_start`: start one runnable feature.\n- `flow_feature_complete`: record completion or a real blocker with validation and review evidence.\n- `flow_feature_reset`: reset one feature and its dependents.\n- `flow_session_close`: archive the active session as `completed`, `deferred`, or `abandoned`.\n\nThere is no `flow_context`, no separate review-record tool, and no multi-session activation surface. The single active source of truth is `.flow/session.json`; closed sessions are archived under `.flow/history/`.\n\nPlanning and running require loaded Flow tools; do not simulate plan approval or feature completion when the runtime is unavailable. Review may still return advisory output when tools, skills, or references are stale or unavailable, but the manager must not record it as Flow-gated evidence.\n\n## Hard Gates\n\n- Approved plans are immutable. To change direction, reset affected features or close the session and start a new goal.\n- Only one feature can be active at a time.\n- Completion requires at least one passing `validationRun` entry.\n- Non-final completion requires `validationScope: \"targeted\"`.\n- Final completion requires `validationScope: \"broad\"` and a passing `finalReview`.\n- Every completed feature requires a passing `featureReview` with no blocking findings.\n- `flow_session_close` accepts `kind: \"completed\"` only after an approved plan has passed final completion.\n\n## Recovery\n\n- Confused state: call `flow_status` and follow `nextAction`.\n- Wrong assumption or failed implementation path: use `flow_feature_reset` for the feature and dependents, then rerun from the corrected plan.\n- Missing validation or review evidence: gather real evidence, then call `flow_feature_complete`.\n- Approved plan is materially wrong: reset the affected features, save a revised plan if the session is back in planning; otherwise close and start a new goal.\n- Unknown runtime error: read `summary` and `recovery`; see `references/recovery-playbook.md` for common cases.\n\nNever fabricate validation output, backfill review approval you did not perform, or close as `deferred`/`abandoned` merely to avoid an unfinished-work blocker.\n";
545
+ var SKILL_default = "---\nname: flow\ndescription: Manage the end-to-end Flow loop for skills-first OpenCode work. Use when a user asks for Flow-guided delivery from goal to completion, resumable autonomous delivery, or resuming or closing a Flow session. For plan-only work use flow-plan; for executing one approved feature use flow-run.\n---\n\n# Flow\n\nUse Flow as a minimal state ledger, not as a framework. Skills provide judgment; the runtime only records the approved plan, active feature, validation evidence, review evidence, and closure.\n\nRouting: this manager skill owns the whole loop and every state-changing `flow_*` call. Load `flow-plan` alone for plan-only requests and `flow-run` alone when an approved plan needs one feature executed. Answer status-only questions with `flow_status`; no skill load is needed. `flow-test`, `flow-deslop`, and `flow-ui-quality` are optional helpers loaded from inside the loop; `flow-commit` is user-triggered only and never part of the autonomous loop.\n\n## Loop\n\n1. Call `flow_status` first. Trust its active session and next action over conversation memory.\n If the result includes `setup.skills`, follow the Skill Availability rules\n below before loading any Flow skill.\n If it includes `session.resumePacket` or `session.budget.phaseBoundary`, stop\n and report the resume instructions unless this is a fresh user invocation\n explicitly resuming the session. Only then may the next `flow_run_start` use\n `phaseBoundaryAck: true`.\n2. If there is no active session and the user gave a goal, load `flow-plan`, save a plan with `flow_plan_save`, then approve it with `flow_plan_approve` only after explicit user approval or prior authorization for autonomous implementation. If there is no goal, ask for one.\n3. Load `flow-run`, call `flow_run_start`, implement exactly one feature, validate it, and prepare a `flow_feature_complete` payload. For validation-heavy, regression-sensitive, browser QA, route QA, or failure-prone work, use `flow-test` to choose and summarize evidence before completion.\n4. Load `flow-review` for the required feature review. Send a compact review\n packet, not the accumulated root transcript. The reviewer reports\n `featureReviewDepth` and `featureReview`; the manager records both inside\n `flow_feature_complete`.\n5. On the final feature, run broad validation and include `finalReview` in the same `flow_feature_complete` call. Its `reviewDepth` must match the plan's `finalReviewPolicy`.\n6. After all features are complete, archive the session with `flow_session_close` using `kind: \"completed\"`.\n\nUse `references/parallel-orchestration.md` for broad read-only discovery, audit, validation, review, verification, or candidate implementation passes. It is the whole pass playbook — orient, slice, manifest, fan out, account, verify, synthesize, extend or stop — and its `references/handoff-format.md` companion holds the worker report templates the manager pastes into prompts. Hidden Flow workers are injected by plugin config; invoke the named worker when it is available. The manager owns every `flow_*` state change.\n\nDo not commit, push, amend, rebase, publish, or mutate releases during the\nautonomous Flow loop. Load `flow-commit` only when the user explicitly asks for\ncommit preparation or commit creation.\n\n## Skill Availability\n\nIf `flow_status` returns `setup.skills`, report that setup status and stop\nnative-loading Flow skills in the current OpenCode startup. Missing, incomplete,\nor outdated managed skills require a sync/restart cycle before their native skill\ninstructions can be trusted by the running process. Public command bundles are\nself-contained and may continue when the command prompt already embeds the\nrequired Flow instructions.\n\nIf optional helper skills such as `flow-test`, `flow-deslop`, or\n`flow-ui-quality` are unavailable, continue only with explicit coverage gaps. Do\nnot copy their rubrics into another skill and do not claim their quality checks\nwere completed.\n\n## Runtime Surface\n\n- `flow_status`: read the active session.\n- `flow_plan_save`: create a session and/or save a draft plan.\n- `flow_plan_approve`: lock the draft plan.\n- `flow_run_start`: start one runnable feature.\n- `flow_feature_complete`: record completion or a real blocker with validation and review evidence.\n- `flow_feature_reset`: reset one feature and its dependents.\n- `flow_session_close`: archive the active session as `completed`, `deferred`, or `abandoned`.\n\nThere is no `flow_context`, no separate review-record tool, and no multi-session activation surface. The single active source of truth is `.flow/session.json`; closed sessions are archived under `.flow/history/`.\n\nPlanning and running require loaded Flow tools; do not simulate plan approval or feature completion when the runtime is unavailable. Review may still return advisory output when tools, skills, or references are stale or unavailable, but the manager must not record it as Flow-gated evidence.\n\n## Hard Gates\n\n- Approved plans are immutable. To change direction, reset affected features or close the session and start a new goal.\n- Only one feature can be active at a time.\n- Each feature's planned `reviewDepth` is the minimum accepted\n `featureReviewDepth` for completion.\n- Completion requires at least one passing `validationRun` entry.\n- Non-final completion requires `validationScope: \"targeted\"`.\n- Final completion requires `validationScope: \"broad\"` and a passing `finalReview`.\n- Every completed feature requires a passing `featureReview` with no blocking findings.\n- Failed reviews pause the loop by default. Autonomous repair may make at most\n one repair plus one retry review before stopping.\n- Phase boundaries stop the current root session; resume from\n `.flow/session.json` in a fresh OpenCode session.\n- `flow_session_close` accepts `kind: \"completed\"` only after an approved plan has passed final completion.\n\n## Budget And Retry Boundaries\n\nFlow can enforce review retry counts and feature-count phase boundaries in the\nruntime ledger. The current OpenCode plugin surface does not expose per-turn\ntoken usage to Flow; when usage is visible in the host UI or logs, stop the\ncurrent autonomous loop once the root session is large enough to threaten\nlatency or cost and report a compact handoff instead of continuing. Treat high\nvisible tokens, high non-cache tokens, or repeated reviewer fan-out as a reason\nto finish the current feature, emit the resume packet, and continue in a fresh\nsession.\n\n## Recovery\n\n- Confused state: call `flow_status` and follow `nextAction`.\n- Wrong assumption or failed implementation path: use `flow_feature_reset` for the feature and dependents, then rerun from the corrected plan.\n- Missing validation or review evidence: gather real evidence, then call `flow_feature_complete`.\n- Approved plan is materially wrong: reset the affected features, save a revised plan if the session is back in planning; otherwise close and start a new goal.\n- Unknown runtime error: read `summary` and `recovery`; see `references/recovery-playbook.md` for common cases.\n\nNever fabricate validation output, backfill review approval you did not perform, or close as `deferred`/`abandoned` merely to avoid an unfinished-work blocker.\n";
546
546
 
547
547
  // skills/flow-commit/SKILL.md
548
548
  var SKILL_default2 = `---
@@ -845,6 +845,60 @@ Apply the manager synthesis barrier from
845
845
  evidence-backed claims become plan fields.
846
846
  `;
847
847
 
848
+ // skills/flow-plan/references/plan-quality-checklist.md
849
+ var plan_quality_checklist_default = `# Plan quality checklist
850
+
851
+ Use this checklist before \`flow_plan_save\` and again before approval if the plan
852
+ changed during discussion. The goal is not a long planning artifact; it is a
853
+ compact plan another agent can execute without rediscovering the work.
854
+
855
+ ## Must pass
856
+
857
+ - Outcome: \`summary\` names the user-visible result, not an internal activity.
858
+ - Requirements: acceptance criteria, constraints, and non-goals that affect
859
+ implementation are captured in \`requirements\`.
860
+ - Decisions: assumptions, scope choices, and architecture choices already made
861
+ are captured in \`decisions\`.
862
+ - Uncertainty: specification uncertainty is resolved by a decision or a user
863
+ question; environment uncertainty is resolved by inspection, discovery, or a
864
+ first evidence-producing feature.
865
+ - Feature shape: each feature has one coherent outcome and can be reviewed on
866
+ its own.
867
+ - Targets: each feature names bounded files, modules, routes, commands, docs, or
868
+ generated surfaces. Whole-repo targets are allowed only for explicit broad
869
+ audits or final validation.
870
+ - Validation: each feature names expected check levels, such as targeted unit,
871
+ integration, browser/e2e, package/build, docs/static, cleanup preservation, or
872
+ broad project gate.
873
+ - Dependencies: \`dependsOn\` captures true ordering and avoids hidden dependency
874
+ chains.
875
+ - Review policy: \`finalReviewPolicy\` is \`detailed\` when the work changes
876
+ behavior, persistence, public contracts, security posture, release surfaces,
877
+ or multiple modules.
878
+
879
+ ## Revise when you see this
880
+
881
+ - A feature title describes a step like "update files" instead of a result.
882
+ - A validation entry says only "manual testing" or "run tests".
883
+ - A feature has targets but no behavior or artifact that can be judged.
884
+ - A feature claims cleanup or simplification without an evidence-producing
885
+ audit or cited smell.
886
+ - A docs feature depends on behavior that is not yet implemented but lacks
887
+ \`dependsOn\`.
888
+ - A low-risk \`finalReviewPolicy: "broad"\` is used while the plan crosses runtime,
889
+ schema, persistence, security, or release boundaries.
890
+
891
+ ## Approval summary
892
+
893
+ When presenting the plan for approval, include:
894
+
895
+ - The promised outcome.
896
+ - The feature order and any dependencies that matter.
897
+ - The main validation levels.
898
+ - Material assumptions in \`decisions\`.
899
+ - Any known gaps that remain intentional.
900
+ `;
901
+
848
902
  // skills/flow-plan/references/planning-examples.md
849
903
  var planning_examples_default = `# Planning examples
850
904
 
@@ -923,6 +977,164 @@ Better plan:
923
977
  3. Add behavior-preservation tests for the changed service paths.
924
978
  \`\`\`
925
979
 
980
+ ## Bugfix plan
981
+
982
+ Human summary:
983
+
984
+ 1. Reproduce and localize the failed password reset redirect.
985
+ 2. Fix the redirect state handling and cover the regression.
986
+ 3. Update release notes only if user-facing behavior changed.
987
+
988
+ Payload:
989
+
990
+ \`\`\`json
991
+ {
992
+ "goal": "Fix password reset links landing users on the wrong page",
993
+ "plan": {
994
+ "summary": "Password reset links land users on the intended reset confirmation flow.",
995
+ "overview": "Start with a focused reproduction, then fix the redirect state and update user-facing notes only if the behavior change needs documentation.",
996
+ "requirements": [
997
+ "Preserve existing token validation and expiry behavior.",
998
+ "Users with valid reset links should not be sent to the generic sign-in page before completing the reset."
999
+ ],
1000
+ "decisions": [
1001
+ "Treat the current redirect mismatch as a regression until reproduction proves otherwise."
1002
+ ],
1003
+ "finalReviewPolicy": "detailed",
1004
+ "features": [
1005
+ {
1006
+ "id": "reset-redirect-repro",
1007
+ "title": "Redirect reproduction",
1008
+ "summary": "Produce a failing focused check or trace that identifies where the reset redirect is lost.",
1009
+ "targets": ["src/auth/reset", "tests/auth"],
1010
+ "validation": ["targeted unit or integration reproduction for reset redirect behavior"],
1011
+ "dependsOn": []
1012
+ },
1013
+ {
1014
+ "id": "reset-redirect-fix",
1015
+ "title": "Redirect fix",
1016
+ "summary": "Preserve reset redirect state through token validation and completion.",
1017
+ "targets": ["src/auth/reset", "tests/auth"],
1018
+ "validation": ["targeted regression test passes", "auth package/build check if available"],
1019
+ "dependsOn": ["reset-redirect-repro"]
1020
+ },
1021
+ {
1022
+ "id": "reset-redirect-notes",
1023
+ "title": "User-facing notes",
1024
+ "summary": "Document the corrected reset-link behavior if release notes or help text mention the flow.",
1025
+ "targets": ["CHANGELOG.md", "docs/auth.md"],
1026
+ "validation": ["docs/static check if available", "review docs against implemented behavior"],
1027
+ "dependsOn": ["reset-redirect-fix"]
1028
+ }
1029
+ ]
1030
+ }
1031
+ }
1032
+ \`\`\`
1033
+
1034
+ ## UI/frontend plan
1035
+
1036
+ Human summary:
1037
+
1038
+ 1. Map the current checkout empty state and responsive constraints.
1039
+ 2. Implement the empty state with accessible controls and mobile layout.
1040
+ 3. Verify the visual states with screenshots or browser evidence.
1041
+
1042
+ Good feature outline:
1043
+
1044
+ \`\`\`text
1045
+ 1. Empty-state discovery - inspect the route, component boundaries, design tokens, existing empty states, and likely responsive breakpoints.
1046
+ 2. Empty-state implementation - add the checkout empty state, action wiring, focus order, and loading/error boundaries in the existing component style.
1047
+ 3. Visual and interaction verification - capture desktop and mobile evidence, run available route/component checks, and fix overlap or accessibility regressions.
1048
+ \`\`\`
1049
+
1050
+ Why this is better than one "build UI" feature: the plan names the uncertain
1051
+ surface first, keeps implementation scoped to the route/components, and makes
1052
+ visual evidence part of completion rather than an afterthought.
1053
+
1054
+ ## Runtime or schema plan
1055
+
1056
+ Human summary:
1057
+
1058
+ 1. Introduce the schema change behind a backward-compatible parser.
1059
+ 2. Migrate callers and persistence writes.
1060
+ 3. Add compatibility validation and docs.
1061
+
1062
+ Good feature outline:
1063
+
1064
+ \`\`\`text
1065
+ 1. Compatible schema reader - accept old and new session payloads, with targeted parser tests for both.
1066
+ 2. New writer path - emit the new field from runtime transitions and update affected callers.
1067
+ 3. Compatibility sweep - run persistence/workspace tests, update docs, and verify old sessions still recover.
1068
+ \`\`\`
1069
+
1070
+ Use \`finalReviewPolicy: "detailed"\` for this shape. Persistence and schema work
1071
+ usually has hidden downstream contracts, so feature validation should name both
1072
+ targeted parser checks and broader workspace/runtime gates.
1073
+
1074
+ ## Docs-only plan
1075
+
1076
+ Docs-only work can use \`finalReviewPolicy: "broad"\` when it does not change
1077
+ commands, configuration, generated files, or release metadata.
1078
+
1079
+ Good feature outline:
1080
+
1081
+ \`\`\`text
1082
+ 1. Align installation docs - update README and troubleshooting steps for the current setup flow.
1083
+ 2. Verify commands and links - check documented commands against package scripts and make sure links/paths resolve.
1084
+ \`\`\`
1085
+
1086
+ Bad validation:
1087
+
1088
+ \`\`\`text
1089
+ validation: ["manual review"]
1090
+ \`\`\`
1091
+
1092
+ Better validation:
1093
+
1094
+ \`\`\`text
1095
+ validation: ["docs/static link and path review", "command examples checked against package scripts"]
1096
+ \`\`\`
1097
+
1098
+ ## Audit-first and review-first plans
1099
+
1100
+ Use an evidence-producing first feature when the request asks to "review",
1101
+ "audit", "clean up", "modernize", or "improve" a broad area.
1102
+
1103
+ Good feature outline:
1104
+
1105
+ \`\`\`text
1106
+ 1. Audit checkout state management - cite concrete findings with file:line evidence, refutation checks, severity, and recommended fix order.
1107
+ 2. Fix confirmed high-impact state leak - only for findings that survived the audit.
1108
+ 3. Regression validation - add or run checks covering the changed state paths.
1109
+ \`\`\`
1110
+
1111
+ Do not plan fixes for guessed findings. If the audit might find no actionable
1112
+ issue, say that in the first feature summary and make later features conditional
1113
+ on evidence.
1114
+
1115
+ ## Validation examples
1116
+
1117
+ Weak:
1118
+
1119
+ \`\`\`text
1120
+ validation: ["run tests", "manual testing"]
1121
+ \`\`\`
1122
+
1123
+ Stronger:
1124
+
1125
+ \`\`\`text
1126
+ validation: [
1127
+ "targeted unit tests for empty and invalid input",
1128
+ "integration test for persisted session recovery",
1129
+ "package/build gate for changed TypeScript exports",
1130
+ "browser screenshot at desktop and mobile widths for layout-sensitive UI",
1131
+ "docs/static review for changed command examples"
1132
+ ]
1133
+ \`\`\`
1134
+
1135
+ The stronger version says what level of evidence is expected and which behavior
1136
+ or surface it covers.
1137
+
926
1138
  ## Decomposition anti-patterns
927
1139
 
928
1140
  - Feature per file when behavior crosses files.
@@ -995,6 +1207,7 @@ Call \`flow_plan_save\` with:
995
1207
  "id": "lowercase-kebab-case",
996
1208
  "title": "Short title",
997
1209
  "summary": "Outcome this feature delivers",
1210
+ "reviewDepth": "standard",
998
1211
  "targets": ["files, modules, routes, commands, or docs in scope"],
999
1212
  "validation": ["focused checks expected before completion"],
1000
1213
  "dependsOn": []
@@ -1006,6 +1219,23 @@ Call \`flow_plan_save\` with:
1006
1219
 
1007
1220
  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.
1008
1221
 
1222
+ Set each feature's \`reviewDepth\` to one of:
1223
+
1224
+ - \`quick\`: docs, comments, config-only changes, generated output, or mechanical changes fully covered by tooling.
1225
+ - \`standard\`: the default for ordinary implementation slices. The review reads every changed file and relevant tests.
1226
+ - \`detailed\`: persistence, migrations, concurrency, security, cross-module behavior, release/package surfaces, large refactors, weak validation, or any work where a missed edge case would be expensive.
1227
+
1228
+ Do not make reviews shallower to save tokens. Reduce token use by splitting features, keeping \`targets\` precise, and using scoped review packets during execution.
1229
+
1230
+ ## Plan quality gate
1231
+
1232
+ Before saving or asking for approval, load
1233
+ \`references/plan-quality-checklist.md\` and check the draft against it. Revise the
1234
+ plan until it passes, or record the remaining gap in \`decisions\` when the gap is
1235
+ an intentional assumption. Do not approve a plan whose outcome, requirements,
1236
+ targets, validation, or dependency order are still too vague for another agent
1237
+ to execute.
1238
+
1009
1239
  ## Feature sizing
1010
1240
 
1011
1241
  - Each feature should have one owner, one coherent outcome, and a validation story.
@@ -1016,12 +1246,17 @@ Use only \`finalReviewPolicy: "broad"\` or \`"detailed"\`. These are the canonic
1016
1246
  validation entry should name the expected test level, such as targeted unit,
1017
1247
  integration, browser/e2e, package/build, docs/static, cleanup preservation, or
1018
1248
  broad project gate.
1249
+ - Assign \`reviewDepth\` from risk. Use \`detailed\` for persistence, migration,
1250
+ concurrency, security, final-delivery-adjacent, or cross-module slices; use
1251
+ \`standard\` for normal code changes; reserve \`quick\` for low-risk non-behavioral
1252
+ work.
1019
1253
 
1020
1254
  ## Approval
1021
1255
 
1022
1256
  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.
1023
1257
 
1024
- See \`references/planning-examples.md\` for payload examples and decomposition anti-patterns.
1258
+ See \`references/planning-examples.md\` for payload examples and decomposition
1259
+ anti-patterns.
1025
1260
  `;
1026
1261
 
1027
1262
  // skills/flow-review/references/review-rubric.md
@@ -1057,22 +1292,54 @@ If unsure whether a finding is real, read more or downgrade it. Do not promote g
1057
1292
 
1058
1293
  ## Final review checklist
1059
1294
 
1060
- - Every feature is complete and together they satisfy the original goal.
1061
- - Broad validation ran and passed.
1295
+ - The original goal is satisfied by the delivered behavior or artifacts.
1296
+ - Every approved requirement is either met or explicitly accounted for by an
1297
+ accepted gap.
1298
+ - Plan decisions and scope boundaries still match the implementation.
1299
+ - Every planned feature is complete, has recorded validation evidence, and
1300
+ contributes to the final outcome.
1301
+ - Feature dependencies were completed in an order that makes the evidence
1302
+ trustworthy.
1303
+ - Changed artifacts match the plan's \`targets\`; extra changed surfaces are
1304
+ explained and reviewed.
1305
+ - Broad validation ran and passed, or any skipped broad check is justified as a
1306
+ non-blocking gap.
1062
1307
  - The final \`reviewDepth\` equals the approved \`finalReviewPolicy\`; the only final-review enum values are \`broad\` and \`detailed\`.
1063
1308
  - Feature-level reviews have no unresolved blocking findings.
1064
1309
  - Docs, commands, package metadata, and release surfaces match the delivered behavior.
1065
1310
  - Remaining gaps are explicit and do not contradict \`kind: "completed"\`.
1066
1311
 
1312
+ ## Final convergence scan
1313
+
1314
+ Run this scan before returning a passing \`finalReview\`:
1315
+
1316
+ 1. Restate the original goal and the approved plan summary in your own words.
1317
+ 2. Map each requirement to delivered evidence, validation output, or an explicit
1318
+ accepted gap.
1319
+ 3. Walk every planned feature and confirm its completion evidence, review
1320
+ result, and validation level.
1321
+ 4. Compare the changed files, docs, commands, generated surfaces, and package
1322
+ metadata to the planned targets and requirements.
1323
+ 5. Check whether the validation evidence would have caught the main failure
1324
+ modes introduced by the work.
1325
+ 6. Decide whether remaining gaps are advisory or blocking before setting
1326
+ \`status\`.
1327
+
1328
+ Fail the final review when the delivered work cannot be traced back to the
1329
+ approved goal and requirements, even if each individual feature review passed.
1330
+
1067
1331
  ## Payloads
1068
1332
 
1069
1333
  Feature review:
1070
1334
 
1071
1335
  \`\`\`json
1072
1336
  {
1073
- "status": "passed",
1074
- "summary": "Reviewed changed runtime files and focused tests; validation covers the new gate.",
1075
- "blockingFindings": []
1337
+ "featureReviewDepth": "standard",
1338
+ "featureReview": {
1339
+ "status": "passed",
1340
+ "summary": "Reviewed changed runtime files and focused tests; validation covers the new gate.",
1341
+ "blockingFindings": []
1342
+ }
1076
1343
  }
1077
1344
  \`\`\`
1078
1345
 
@@ -1080,14 +1347,17 @@ Failed feature review:
1080
1347
 
1081
1348
  \`\`\`json
1082
1349
  {
1083
- "status": "failed",
1084
- "summary": "Validation does not exercise the changed persistence path.",
1085
- "blockingFindings": [
1086
- {
1087
- "summary": "No test covers archive removal of .flow/session.json after close.",
1088
- "severity": "blocking"
1089
- }
1090
- ]
1350
+ "featureReviewDepth": "detailed",
1351
+ "featureReview": {
1352
+ "status": "failed",
1353
+ "summary": "Validation does not exercise the changed persistence path.",
1354
+ "blockingFindings": [
1355
+ {
1356
+ "summary": "No test covers archive removal of .flow/session.json after close.",
1357
+ "severity": "blocking"
1358
+ }
1359
+ ]
1360
+ }
1091
1361
  }
1092
1362
  \`\`\`
1093
1363
 
@@ -1147,7 +1417,15 @@ These instructions run in two contexts, and only one of them can load helpers:
1147
1417
 
1148
1418
  - Call \`flow_status\` when available.
1149
1419
  - Identify whether this is a feature review or final review.
1420
+ - Prefer the manager's compact review packet over parent-session memory. The
1421
+ packet should name the active feature, minimum \`reviewDepth\`, changed files,
1422
+ diff summary, validation evidence, and targeted paths or risk lenses. If the
1423
+ packet is missing important scope or evidence, record that as a coverage gap
1424
+ or blocker instead of searching the full conversation transcript.
1150
1425
  - Read the approved plan fields relevant to the work: \`requirements\`, \`decisions\`, feature \`targets\`, feature \`validation\`, and dependencies.
1426
+ - For final review, also compare the original goal, full feature list, completed
1427
+ feature evidence, changed artifacts, and final validation against the
1428
+ convergence checklist in \`references/review-rubric.md\`.
1151
1429
  - Inspect the actual diff, changed files, tests, and validation output. Do not review only the completion summary.
1152
1430
  - In manager context, load \`flow-test\` for validation-heavy,
1153
1431
  regression-sensitive, browser QA, or unclear coverage reviews. If it is
@@ -1165,16 +1443,23 @@ These instructions run in two contexts, and only one of them can load helpers:
1165
1443
 
1166
1444
  ## Output
1167
1445
 
1168
- For a feature review, return:
1446
+ For a feature review, return a packet the manager can copy into
1447
+ \`flow_feature_complete\`:
1169
1448
 
1170
1449
  \`\`\`json
1171
1450
  {
1172
- "status": "passed",
1173
- "summary": "what was reviewed and why it is acceptable",
1174
- "blockingFindings": []
1451
+ "featureReviewDepth": "standard",
1452
+ "featureReview": {
1453
+ "status": "passed",
1454
+ "summary": "what was reviewed and why it is acceptable",
1455
+ "blockingFindings": []
1456
+ }
1175
1457
  }
1176
1458
  \`\`\`
1177
1459
 
1460
+ \`featureReviewDepth\` must be at least the feature's planned \`reviewDepth\`.
1461
+ Use the actual depth performed: \`quick\`, \`standard\`, or \`detailed\`.
1462
+
1178
1463
  For a final review, return:
1179
1464
 
1180
1465
  \`\`\`json
@@ -1326,96 +1611,7 @@ Never trim failing output, relabel a failed command as passed, or use "not run"
1326
1611
  `;
1327
1612
 
1328
1613
  // skills/flow-run/SKILL.md
1329
- var SKILL_default6 = `---
1330
- name: flow-run
1331
- description: "Use when an approved Flow plan has a feature to implement, validate, or complete in the v4 runtime, and the work is scoped to one active feature. For planning a goal first use flow-plan; for the full goal-to-completion loop or resuming a session use flow."
1332
- ---
1333
-
1334
- # Flow Run
1335
-
1336
- Use this skill for implementation after a Flow plan is approved. Work one feature at a time.
1337
-
1338
- If \`flow_run_start\` is unavailable, stop and tell the user to check that \`opencode-plugin-flow\` is loaded in OpenCode.
1339
-
1340
- ## Start
1341
-
1342
- - Call \`flow_status\`.
1343
- - Call \`flow_run_start\` with no \`featureId\` unless the user or plan requires a specific runnable feature.
1344
- - Treat the returned feature as the sole scope until it is completed, blocked, or reset.
1345
- - Helper rule: when a named helper skill is unavailable, record the gap and
1346
- keep the corresponding claims conservative instead of simulating its checks.
1347
- - Load \`flow-deslop\` for cleanup/refactor features.
1348
- - Load \`flow-ui-quality\` for frontend, UX, responsive, accessibility, or visual work.
1349
-
1350
- ## Implement
1351
-
1352
- - Read the feature \`targets\`, \`summary\`, \`validation\`, dependencies, and plan \`requirements\`/\`decisions\`.
1353
- - Keep edits scoped to the active feature. If new scope appears, stop and replan or defer it to another feature.
1354
- - Preserve unrelated user changes in the worktree.
1355
- - When a wrong assumption invalidates the feature, use \`flow_feature_reset\`; do not pile patches onto a bad path.
1356
- - Do not stage, commit, push, amend, rebase, publish, or mutate releases as part
1357
- of feature execution. If the user explicitly asks for commit preparation, load
1358
- \`flow-commit\` only after \`flow_feature_complete\` has been recorded, unless the
1359
- user explicitly asks for a WIP commit path. Keep Git boundaries separate from
1360
- Flow state recording.
1361
-
1362
- ## Validate
1363
-
1364
- - For complex validation, regression-sensitive changes, browser QA, route QA,
1365
- failure-prone checks, unclear coverage, exploratory QA, or
1366
- \`validationRun\` summarization, load \`flow-test\` (helper rule applies).
1367
- - Read \`references/validation-rubric.md\` before completing.
1368
- - Run the strongest practical checks for the changed behavior.
1369
- - Record concrete command names, status, and observed results. "Tests pass" is not evidence.
1370
- - Non-final features complete with \`validationScope: "targeted"\`.
1371
- - The final feature must run a broad project-level gate and use \`validationScope: "broad"\`.
1372
-
1373
- For broad validation research, risky changes, or unclear coverage, use
1374
- \`../flow/references/parallel-orchestration.md\` to fan out named Flow workers.
1375
- Use the mode-to-agent mapping in that reference instead of generic subagents.
1376
- Write its pass manifest before fan-out, paste the matching handoff template
1377
- from \`../flow/references/handoff-format.md\` into every worker prompt, and
1378
- apply its verification tiers to the handoffs that come back.
1379
- They may report command output they actually ran or propose focused checks; the
1380
- manager decides what is strong enough to record.
1381
-
1382
- For independent implementation attempts, use candidate workers only with
1383
- explicit user authorization plus isolated worktrees or exact non-overlapping
1384
- path ownership. Treat their output as candidate patches. The manager inspects,
1385
- merges, validates, and records Flow state serially.
1386
-
1387
- ## Review and complete
1388
-
1389
- Before \`flow_feature_complete\`, obtain a \`featureReview\` payload. Load
1390
- \`flow-review\`; for read-only subagent reviews, the manager receives the payload
1391
- and records it.
1392
-
1393
- If \`flow_status\` reports \`setup.skills\` or \`flow-review\` cannot be loaded, do
1394
- not record a Flow-gated \`featureReview\` or \`finalReview\`. You may perform an
1395
- advisory review using available context or the bundled review fallback provided
1396
- by plugin config, then complete with \`status: "needs_input"\` if review evidence
1397
- is required to proceed.
1398
-
1399
- For the final feature, also obtain a \`finalReview\` payload whose \`reviewDepth\` equals the approved plan's \`finalReviewPolicy\`.
1400
-
1401
- Complete with:
1402
-
1403
- \`\`\`json
1404
- {
1405
- "status": "ok",
1406
- "featureId": "active-feature-id",
1407
- "summary": "what changed",
1408
- "artifactsChanged": [{ "path": "src/file.ts" }],
1409
- "validationRun": [
1410
- { "command": "bun test tests/foo.test.ts", "status": "passed", "summary": "3 pass, exercised foo behavior" }
1411
- ],
1412
- "validationScope": "targeted",
1413
- "featureReview": { "status": "passed", "summary": "review summary", "blockingFindings": [] }
1414
- }
1415
- \`\`\`
1416
-
1417
- If genuinely blocked, call \`flow_feature_complete\` with \`status: "needs_input"\` and an \`outcome\` that explains the blocker and next step. Never fabricate validation or review evidence to force progress.
1418
- `;
1614
+ var SKILL_default6 = '---\nname: flow-run\ndescription: "Use when an approved Flow plan has a feature to implement, validate, or complete in the v4 runtime, and the work is scoped to one active feature. For planning a goal first use flow-plan; for the full goal-to-completion loop or resuming a session use flow."\n---\n\n# Flow Run\n\nUse this skill for implementation after a Flow plan is approved. Work one feature at a time.\n\nIf `flow_run_start` is unavailable, stop and tell the user to check that `opencode-plugin-flow` is loaded in OpenCode.\n\n## Start\n\n- Call `flow_status`.\n- If `flow_status` returns a `session.resumePacket` or\n `session.budget.phaseBoundary`, stop the current autonomous loop and report\n the resume instructions. Only call `flow_run_start` with\n `phaseBoundaryAck: true` at the start of a fresh user invocation that is\n explicitly resuming the Flow session; do not acknowledge a boundary inside\n the same uninterrupted loop that created it.\n- Call `flow_run_start` with no `featureId` unless the user or plan requires a specific runnable feature.\n- Treat the returned feature as the sole scope until it is completed, blocked, or reset.\n- Helper rule: when a named helper skill is unavailable, record the gap and\n keep the corresponding claims conservative instead of simulating its checks.\n- Load `flow-deslop` for cleanup/refactor features.\n- Load `flow-ui-quality` for frontend, UX, responsive, accessibility, or visual work.\n\n## Implement\n\n- Read the feature `targets`, `summary`, `validation`, dependencies, and plan `requirements`/`decisions`.\n- Treat the feature\'s `reviewDepth` as the minimum feature-review depth that\n must be recorded in `flow_feature_complete`.\n- Keep edits scoped to the active feature. If new scope appears, stop and replan or defer it to another feature.\n- Preserve unrelated user changes in the worktree.\n- When a wrong assumption invalidates the feature, use `flow_feature_reset`; do not pile patches onto a bad path.\n- Do not stage, commit, push, amend, rebase, publish, or mutate releases as part\n of feature execution. If the user explicitly asks for commit preparation, load\n `flow-commit` only after `flow_feature_complete` has been recorded, unless the\n user explicitly asks for a WIP commit path. Keep Git boundaries separate from\n Flow state recording.\n\n## Validate\n\n- For complex validation, regression-sensitive changes, browser QA, route QA,\n failure-prone checks, unclear coverage, exploratory QA, or\n `validationRun` summarization, load `flow-test` (helper rule applies).\n- Read `references/validation-rubric.md` before completing.\n- Run the strongest practical checks for the changed behavior.\n- Record concrete command names, status, and observed results. "Tests pass" is not evidence.\n- Non-final features complete with `validationScope: "targeted"`.\n- The final feature must run a broad project-level gate and use `validationScope: "broad"`.\n\nFor broad validation research, risky changes, or unclear coverage, use\n`../flow/references/parallel-orchestration.md` to fan out named Flow workers.\nUse the mode-to-agent mapping in that reference instead of generic subagents.\nWrite its pass manifest before fan-out, paste the matching handoff template\nfrom `../flow/references/handoff-format.md` into every worker prompt, and\napply its verification tiers to the handoffs that come back.\nThey may report command output they actually ran or propose focused checks; the\nmanager decides what is strong enough to record.\n\nFor independent implementation attempts, use candidate workers only with\nexplicit user authorization plus isolated worktrees or exact non-overlapping\npath ownership. Treat their output as candidate patches. The manager inspects,\nmerges, validates, and records Flow state serially.\n\n## Review and complete\n\nBefore `flow_feature_complete`, obtain a `featureReview` payload. Load\n`flow-review`; for read-only subagent reviews, the manager receives the review\npacket and records both `featureReviewDepth` and `featureReview`.\n\nSend reviewers a compact review packet. Do not rely on the accumulated parent\nconversation. Include only:\n\n- active feature id, title, summary, `reviewDepth`, targets, validation, and dependencies\n- relevant plan requirements, decisions, and final review policy\n- changed files and a short diff summary\n- validation evidence with exact commands, status, and observed result\n- targeted paths or risk lenses the reviewer must inspect\n\nIf the review returns `status: "failed"`, do not fix inside the review pass.\nRecord the failed attempt by calling `flow_feature_complete` with the otherwise\nprepared completion payload, the failed `featureReview`, and the attempted\n`featureReviewDepth`; the runtime will reject completion and update the retry\nbudget. Default to stopping and reporting the blocker. When the user already\nauthorized autonomous implementation, make at most one repair and run one retry\nreview. If the retry fails or the runtime reports review retry budget\nexhausted, stop with the blocker.\n\nIf `flow_status` reports `setup.skills` or `flow-review` cannot be loaded, do\nnot record a Flow-gated `featureReview` or `finalReview`. You may perform an\nadvisory review using available context or the bundled review fallback provided\nby plugin config, then complete with `status: "needs_input"` if review evidence\nis required to proceed.\n\nFor the final feature, also obtain a `finalReview` payload whose `reviewDepth` equals the approved plan\'s `finalReviewPolicy`.\n\nComplete with:\n\n```json\n{\n "status": "ok",\n "featureId": "active-feature-id",\n "summary": "what changed",\n "artifactsChanged": [{ "path": "src/file.ts" }],\n "validationRun": [\n { "command": "bun test tests/foo.test.ts", "status": "passed", "summary": "3 pass, exercised foo behavior" }\n ],\n "validationScope": "targeted",\n "featureReviewDepth": "standard",\n "featureReview": { "status": "passed", "summary": "review summary", "blockingFindings": [] }\n}\n```\n\nIf `flow_feature_complete` returns a `session.resumePacket` or\n`session.budget.phaseBoundary`, stop after reporting the compact handoff. If\ngenuinely blocked, call `flow_feature_complete` with `status: "needs_input"` and\nan `outcome` that explains the blocker and next step. Never fabricate validation\nor review evidence to force progress.\n';
1419
1615
 
1420
1616
  // skills/flow-test/SKILL.md
1421
1617
  var SKILL_default7 = `---
@@ -1719,6 +1915,10 @@ var FLOW_SKILL_DEFINITIONS = [
1719
1915
  relativePath: "references/planning-examples.md",
1720
1916
  content: planning_examples_default
1721
1917
  },
1918
+ {
1919
+ relativePath: "references/plan-quality-checklist.md",
1920
+ content: plan_quality_checklist_default
1921
+ },
1722
1922
  {
1723
1923
  relativePath: "references/parallel-discovery.md",
1724
1924
  content: parallel_discovery_default
@@ -2335,4 +2535,4 @@ main(process.argv).catch((error) => {
2335
2535
  process.exitCode = 1;
2336
2536
  });
2337
2537
 
2338
- //# debugId=B10F4D7F094C050864756E2164756E21
2538
+ //# debugId=CEC53495ABFBEF8464756E2164756E21