wizz-method 2.24.0 → 2.25.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "wizz-method",
4
- "version": "2.24.0",
4
+ "version": "2.25.0",
5
5
  "description": "Wizz Method: método de agência orientado por IA em PT-BR",
6
6
  "keywords": [
7
7
  "agile",
@@ -83,6 +83,25 @@ review_critical_paths = [
83
83
  "secrets, keys and .env files",
84
84
  "cryptography",
85
85
  "CI and deploy workflows",
86
+ "deletion of user or production data",
87
+ "external sends and publishing (e-mail, webhooks, posts, public pages)",
88
+ "personal data (PII) and user data handling",
89
+ "infrastructure and DNS",
90
+ "new or replaced dependencies",
91
+ ]
92
+
93
+ # Fixed floor for the `critical` tier: git pathspec globs. Any changed file
94
+ # matching one forces `critical` before the session judges anything; the
95
+ # session's judgment can only raise from there, never lower. Model
96
+ # confidence never lowers it either. See references/review-economy.md § 2.
97
+
98
+ review_critical_globs = [
99
+ "**/migrations/**",
100
+ "**/*.sql",
101
+ ".github/workflows/**",
102
+ "**/.env*",
103
+ "**/middleware.*",
104
+ "**/Dockerfile*",
86
105
  ]
87
106
 
88
107
  # Review layers for the review step. `instruction` is the layer's whole
@@ -37,7 +37,11 @@ The session reads the file list (`git diff --name-status`) and, when unsure, the
37
37
 
38
38
  **Provided or pasted diffs, and no VCS.** There is no `git --numstat` to read. Count `files` from the diff's own `diff --git` (or, lacking that, `+++`) headers, and `changed_lines` from the `+`/`-` body lines (the `+++`/`---` header lines themselves don't count). The table above applies without exception in both workflows — `small` included.
39
39
 
40
- `{workflow.review_critical_paths}` is a plain-language list of sensitive areas, not a pattern list. Default: authentication, sessions, passwords and credentials, authorization, permissions and RLS, payments, billing and checkout, database migrations, schema and SQL, secrets, keys and `.env` files, cryptography, CI and deploy workflows. Judge by meaning, not by substring: a security check added inside an otherwise generic file counts as `critical`; a document that merely talks about auth does not.
40
+ **Fixed floor first.** Before any judgment, match the changed file list against `{workflow.review_critical_globs}` (git pathspec globs; default: `**/migrations/**`, `**/*.sql`, `.github/workflows/**`, `**/.env*`, `**/middleware.*`, `**/Dockerfile*`). Any match sets the tier to `critical`, and nothing below can lower it. CI files sit on the floor because a change there can weaken the very checks that review relies on.
41
+
42
+ `{workflow.review_critical_paths}` is a plain-language list of sensitive areas, not a pattern list. Default: authentication, sessions, passwords and credentials, authorization, permissions and RLS, payments, billing and checkout, database migrations, schema and SQL, secrets, keys and `.env` files, cryptography, CI and deploy workflows, deletion of user or production data, external sends and publishing (e-mail, webhooks, posts, public pages), personal data (PII) and user data handling, infrastructure and DNS, new or replaced dependencies. Judge by meaning, not by substring: a security check added inside an otherwise generic file counts as `critical`; a document that merely talks about auth does not.
43
+
44
+ **Model confidence does not count.** A confidence the executor or a reviewer states about its own output never lowers the tier, never drops a layer, and never skips review: self-reported LLM confidence is poorly calibrated and runs high.
41
45
 
42
46
  Raise the tier when in doubt, never lower it — a change that clearly touches something the list above doesn't name (e.g. a data migration done in application code) still earns `critical`. State the tier, the reason and the resulting layer count to the user before launching any layer.
43
47
 
@@ -79,7 +79,7 @@ story_key: '' # set at runtime when discovered from sprint status
79
79
  - **Otherwise:** build `{clean_diff_file}` per § 1 — the identical git command that wrote `{diff_file}` for the chosen source, plus one `:(top,exclude,glob)<pattern>` pathspec per entry in `{workflow.review_exclude}`, appended after the positive pathspecs. For **uncommitted changes**, also append untracked files to `{clean_diff_file}` the same way they were appended to `{diff_file}`, but listed with the positive-plus-exclude pathspecs from § 1 so any excluded file is skipped. Get `files` and `changed_lines` from `git -C "$TOP" diff --no-ext-diff --no-color --no-textconv --numstat` with the same source args and pathspecs, plus per-file `git -C "$TOP" diff --no-index --numstat -- /dev/null <path>` for the untracked ones (§ 1).
80
80
  - If a git command in this instruction fails: delete any partially written `{clean_diff_file}` temp file, then set `{clean_diff_file}` = `{diff_file}` and `{tier}` = `critical`, say so, and continue.
81
81
  - If nothing is left after exclusions (`{clean_diff_file}` is empty, untracked files included, even though `{diff_file}` is non-empty): HALT, list the exclusions, and ask the user whether to review the raw diff anyway. If they do, set `{clean_diff_file}` = `{diff_file}` and pick the tier per § 2 from the raw diff. If they decline, delete `{diff_file}` (when `{diff_file_owned}` is true) and `{clean_diff_file}` per § 5 and end the workflow.
82
- - Otherwise, pick the tier per § 2: read `git diff --name-status` for the same source (and the relevant hunks when unsure) and judge it against `{workflow.review_critical_paths}`.
82
+ - Otherwise, pick the tier per § 2: read `git diff --name-status` for the same source; if any changed path matches `{workflow.review_critical_globs}`, the tier is `critical` (fixed floor). Otherwise read the relevant hunks when unsure and judge it against `{workflow.review_critical_paths}`.
83
83
  - State the tier, the reason, and the resulting Forte subagent count to the user before launching any layer.
84
84
 
85
85
  5. **Stage the claims file.** Collect the change's own narrative: for a branch diff or commit range, the commit messages it covers (`git log <base>..<head>`); for other sources, whatever description of the change the user or conversation supplied. Write it verbatim to a uniquely-named file in the system temp directory and set `{claims_file}` to its path. If there is no narrative, set `{claims_file}` = `''`. Do not analyze or summarize the narrative — it is input for one review layer, staged as a file precisely so the other layers never see it.
@@ -83,6 +83,25 @@ review_critical_paths = [
83
83
  "secrets, keys and .env files",
84
84
  "cryptography",
85
85
  "CI and deploy workflows",
86
+ "deletion of user or production data",
87
+ "external sends and publishing (e-mail, webhooks, posts, public pages)",
88
+ "personal data (PII) and user data handling",
89
+ "infrastructure and DNS",
90
+ "new or replaced dependencies",
91
+ ]
92
+
93
+ # Fixed floor for the `critical` tier: git pathspec globs. Any changed file
94
+ # matching one forces `critical` before the session judges anything; the
95
+ # session's judgment can only raise from there, never lower. Model
96
+ # confidence never lowers it either. See references/review-economy.md § 2.
97
+
98
+ review_critical_globs = [
99
+ "**/migrations/**",
100
+ "**/*.sql",
101
+ ".github/workflows/**",
102
+ "**/.env*",
103
+ "**/middleware.*",
104
+ "**/Dockerfile*",
86
105
  ]
87
106
 
88
107
  # Review layers for the review step. `instruction` is the layer's whole
@@ -37,7 +37,11 @@ The session reads the file list (`git diff --name-status`) and, when unsure, the
37
37
 
38
38
  **Provided or pasted diffs, and no VCS.** There is no `git --numstat` to read. Count `files` from the diff's own `diff --git` (or, lacking that, `+++`) headers, and `changed_lines` from the `+`/`-` body lines (the `+++`/`---` header lines themselves don't count). The table above applies without exception in both workflows — `small` included.
39
39
 
40
- `{workflow.review_critical_paths}` is a plain-language list of sensitive areas, not a pattern list. Default: authentication, sessions, passwords and credentials, authorization, permissions and RLS, payments, billing and checkout, database migrations, schema and SQL, secrets, keys and `.env` files, cryptography, CI and deploy workflows. Judge by meaning, not by substring: a security check added inside an otherwise generic file counts as `critical`; a document that merely talks about auth does not.
40
+ **Fixed floor first.** Before any judgment, match the changed file list against `{workflow.review_critical_globs}` (git pathspec globs; default: `**/migrations/**`, `**/*.sql`, `.github/workflows/**`, `**/.env*`, `**/middleware.*`, `**/Dockerfile*`). Any match sets the tier to `critical`, and nothing below can lower it. CI files sit on the floor because a change there can weaken the very checks that review relies on.
41
+
42
+ `{workflow.review_critical_paths}` is a plain-language list of sensitive areas, not a pattern list. Default: authentication, sessions, passwords and credentials, authorization, permissions and RLS, payments, billing and checkout, database migrations, schema and SQL, secrets, keys and `.env` files, cryptography, CI and deploy workflows, deletion of user or production data, external sends and publishing (e-mail, webhooks, posts, public pages), personal data (PII) and user data handling, infrastructure and DNS, new or replaced dependencies. Judge by meaning, not by substring: a security check added inside an otherwise generic file counts as `critical`; a document that merely talks about auth does not.
43
+
44
+ **Model confidence does not count.** A confidence the executor or a reviewer states about its own output never lowers the tier, never drops a layer, and never skips review: self-reported LLM confidence is poorly calibrated and runs high.
41
45
 
42
46
  Raise the tier when in doubt, never lower it — a change that clearly touches something the list above doesn't name (e.g. a data migration done in application code) still earns `critical`. State the tier, the reason and the resulting layer count to the user before launching any layer.
43
47
 
@@ -38,7 +38,7 @@ Compute the spec's repo-relative path first — `git -C "$TOP" ls-files --full-n
38
38
  - If a git command in this section fails: set `{clean_diff_file}` = `{diff_file}` and `{tier}` = `critical`, say so, and continue.
39
39
  - If `{clean_diff_file}` is empty (untracked files included) and excluding only the spec pathspec — with none of the `review_exclude` globs applied — already empties it too: the spec's own edit was the only change. There is nothing to review: skip the Review section entirely (no layer launches, `{failed_layers}` stays empty) and go straight to Classify, which finds nothing against the empty diff. Do not fall back to the raw diff in this case.
40
40
  - Else if nothing is left after exclusions for any other reason (a `review_exclude` glob, not the spec exclude, accounts for the emptiness): review the raw diff per § 1 — `{clean_diff_file}` = `{diff_file}`, tier picked from the raw diff.
41
- - Otherwise, pick the tier per § 2 (`small` included, on equal footing with `normal`/`critical`) by reading `git -C "$TOP" diff --name-status {baseline_commit} -- ':(top)' ':(top,exclude,literal)<repo-relative spec path>'` and judging it against `{workflow.review_critical_paths}`.
41
+ - Otherwise, pick the tier per § 2 (`small` included, on equal footing with `normal`/`critical`) by reading `git -C "$TOP" diff --name-status {baseline_commit} -- ':(top)' ':(top,exclude,literal)<repo-relative spec path>'`: any changed path matching `{workflow.review_critical_globs}` makes it `critical` (fixed floor); otherwise judge it against `{workflow.review_critical_paths}`.
42
42
 
43
43
  Announce the exclusions once, from this run only. Tell the user the tier, the exclusions, and the resulting Forte subagent count before launching any layer.
44
44
 
@@ -46,6 +46,18 @@ A diff produced by mechanical, standard, strong, or ultra goes through `wizz-exe
46
46
 
47
47
  Review workflows (`wizz-code-review`, `wizz-quick-dev`) stay pinned to the Strong tier, but the number of layers scales with the size of the diff (1, 2, or up to 4); see `wizz-code-review/references/review-economy.md`.
48
48
 
49
+ ## Consequence
50
+
51
+ Difficulty picks the executor's tier; size and sensitive area pick the review layers; consequence decides whether an output may skip extra review at all. This applies to every output, not only diffs: copy, research, client reports, e-mails, and posts included. An output passes with the minimum (for a diff, the `small` tier; for anything else, the agent's own check) only when all three are true:
52
+
53
+ 1. **A machine checks it:** tests, schema, build, lint, or a validator are green.
54
+ 2. **It is easy to undo:** no destructive migration, no deletion, no external send, no publishing.
55
+ 3. **Nobody acts on it before another step sees it.**
56
+
57
+ If any one fails, the output goes through review on the Strong tier (in another vendor when one is available) and the boss gives the final verdict. An external or irreversible action never rests on an LLM reviewer: it stops for the user's explicit OK.
58
+
59
+ Model confidence does not count: a confidence the executor or reviewer states about its own output never skips review, never drops a layer, and never lowers the tier. For diffs, the tier floor comes from `review_critical_globs` and the session's judgment can only raise it (`wizz-code-review/references/review-economy.md` § 2).
60
+
49
61
  ## Fan-out cap
50
62
 
51
63
  - Work that fits in 3 files or fewer: 1 subagent, or the session itself.
@@ -29,4 +29,5 @@ You are Wizz's Ads. It plans campaigns, generates creative variations, and track
29
29
  Index of situation → skill/reference, in order of use: `{skill-root}/knowledge/playbook.md`. Read it only when the request is ambiguous about which skill comes first or the path spans several skills; a request that already names one clear skill goes straight to it. It never replaces the registry.
30
30
 
31
31
  ## Closing
32
+ Before delivering or publishing, run the consequence gate in `_shared/model-ladder.md` ("Consequence"): output that someone will act on, send or publish without another step seeing it goes to review first, and anything external or irreversible waits for the user's OK.
32
33
  Close in the format of `_shared/encerramento.md` (wizz module root). If the campaign needs new text or visuals, next is usually wizz-copy or wizz-designer.
@@ -33,4 +33,5 @@ Always deliver 2-3 variations and say which one you recommend.
33
33
  Index of situation → skill/reference, in order of use: `{skill-root}/knowledge/playbook.md`. Read it only when the request is ambiguous about which skill comes first or the path spans several skills; a request that already names one clear skill goes straight to it. It never replaces the registry.
34
34
 
35
35
  ## Closing
36
+ Before delivering or publishing, run the consequence gate in `_shared/model-ladder.md` ("Consequence"): output that someone will act on, send or publish without another step seeing it goes to review first, and anything external or irreversible waits for the user's OK.
36
37
  Close in the format of `_shared/encerramento.md` (wizz module root). Next is usually wizz-designer, to lay it out.
@@ -35,4 +35,5 @@ Always bring concrete actions and the expected impact of each one.
35
35
  Index of situation → skill/reference, in order of use: `{skill-root}/knowledge/playbook.md`. Read it only when the request is ambiguous about which skill comes first or the path spans several skills; a request that already names one clear skill goes straight to it. It never replaces the registry.
36
36
 
37
37
  ## Closing
38
+ Before delivering or publishing, run the consequence gate in `_shared/model-ladder.md` ("Consequence"): output that someone will act on, send or publish without another step seeing it goes to review first, and anything external or irreversible waits for the user's OK.
38
39
  Close in the format of `_shared/encerramento.md` (wizz module root). If it turns into an ad, point to **wizz-ads**; if it turns into text, **wizz-copy**.
@@ -33,4 +33,5 @@ Always deliver the list of fixes **in order of impact** (what to tackle first).
33
33
  Index of situation → skill/reference, in order of use: `{skill-root}/knowledge/playbook.md`. Read it only when the request is ambiguous about which skill comes first or the path spans several skills; a request that already names one clear skill goes straight to it. It never replaces the registry.
34
34
 
35
35
  ## Closing
36
+ Before delivering or publishing, run the consequence gate in `_shared/model-ladder.md` ("Consequence"): output that someone will act on, send or publish without another step seeing it goes to review first, and anything external or irreversible waits for the user's OK.
36
37
  Close in the format of `_shared/encerramento.md` (wizz module root). If it turns into text, next is usually wizz-copy.
@@ -95,4 +95,5 @@ A viral script names things out loud ("the CEO said", "this app's screen", "the
95
95
  The canonical rules live in `agent.principles` (briefing before anything, hook on the first word, right formula justified, specific numbers, diagnosis + 2 variations, never generic). Execution detail only for the 3D format: fast pacing in the tutorial (short sentences, action verbs), mandatory visual result (if missing, flag that it loses impact), Triple CTA in the right order.
96
96
 
97
97
  ## Closing
98
+ Before delivering or publishing, run the consequence gate in `_shared/model-ladder.md` ("Consequence"): output that someone will act on, send or publish without another step seeing it goes to review first, and anything external or irreversible waits for the user's OK.
98
99
  Close in the format of `_shared/encerramento.md` (wizz module root). Next is usually wizz-designer (to turn it into a video) or saving to cerebro.
@@ -79,9 +79,11 @@ const WORKFLOW_KEYS = new Set([
79
79
  // item keys are validated against REVIEW_LAYER_KEYS below.
80
80
  'review_layers',
81
81
  'oneshot_review_layers',
82
- // review economy (review-economy.md): diff cleaning excludes/critical paths.
82
+ // review economy (review-economy.md): diff cleaning excludes, critical
83
+ // paths (plain-language guidance) and critical globs (fixed floor).
83
84
  'review_exclude',
84
85
  'review_critical_paths',
86
+ 'review_critical_globs',
85
87
  ]);
86
88
  const PARTY_MEMBER_KEYS = new Set(['code', 'name', 'icon', 'title', 'persona', 'capabilities', 'model']);
87
89
  const PARTY_GROUP_KEYS = new Set(['id', 'name', 'scene', 'members', 'memory']);
@@ -104,7 +106,7 @@ function isArrayOfStrings(value) {
104
106
 
105
107
  /**
106
108
  * Collect unknown/invalid entries under `[workflow]`: unknown fields by
107
- * name, invalid values for the two review-economy string-array fields, and
109
+ * name, invalid values for the three review-economy string-array fields, and
108
110
  * — for the arrays-of-tables we own (party members/groups, review layers) —
109
111
  * the unknown keys and invalid values of each item.
110
112
  *
@@ -122,7 +124,7 @@ function findUnknownWorkflowKeys(workflow) {
122
124
  unknown.push({ path: wfPath, kind: 'unknown' });
123
125
  continue;
124
126
  }
125
- if (k2 === 'review_exclude' || k2 === 'review_critical_paths') {
127
+ if (k2 === 'review_exclude' || k2 === 'review_critical_paths' || k2 === 'review_critical_globs') {
126
128
  if (!isArrayOfStrings(v2)) {
127
129
  unknown.push({ path: wfPath, kind: 'invalid', detail: `expected an array of strings, got ${JSON.stringify(v2)}` });
128
130
  }