@mrciphersmith/keryx 0.4.35 → 0.4.36

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.
Files changed (89) hide show
  1. package/dist/cli.js +5751 -3626
  2. package/dist/core.js +239 -48
  3. package/dist/keryx-general-worker-entry.js +265 -48
  4. package/package.json +1 -1
  5. package/src/gdskills/bundled/install-manifest.json +132 -95
  6. package/src/gdskills/bundled/rules/activity/implement.mdc +55 -0
  7. package/src/gdskills/bundled/rules/activity/review.mdc +47 -0
  8. package/src/gdskills/bundled/rules/activity/test.mdc +46 -0
  9. package/src/gdskills/bundled/rules/core/async-patterns.mdc +10 -9
  10. package/src/gdskills/bundled/rules/core/concurrency-patterns.mdc +2 -2
  11. package/src/gdskills/bundled/rules/core/definition-of-done.mdc +6 -5
  12. package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +4 -3
  13. package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +2 -18
  14. package/src/gdskills/bundled/rules/process/agent-conduct.mdc +79 -0
  15. package/src/gdskills/bundled/rules/{core → process}/documentation-management.mdc +1 -1
  16. package/src/gdskills/bundled/rules/{core → process}/git-rules.mdc +1 -1
  17. package/src/gdskills/bundled/rules/{core → process}/skills-storage-workflow.mdc +1 -1
  18. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.detail.md +1 -1
  19. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +6 -6
  20. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +4 -0
  21. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +4 -4
  22. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +2 -0
  23. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +19 -19
  24. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +1 -1
  25. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +2 -0
  26. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +9 -9
  27. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +10 -0
  28. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +16 -17
  29. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +4 -0
  30. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +2 -2
  31. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +2 -2
  32. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +1 -1
  33. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +2 -10
  34. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
  35. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +7 -18
  36. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +2 -10
  37. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +2 -14
  38. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +1 -9
  39. package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +1 -4
  40. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -9
  41. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +4 -12
  42. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +4 -12
  43. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +1 -12
  44. package/src/gdskills/bundled/skills/review/review-jev-comments/SKILL.md +1 -4
  45. package/src/gdskills/bundled/skills/review/review-jev-contract/SKILL.md +1 -4
  46. package/src/gdskills/bundled/skills/review/review-jev-docs/SKILL.md +1 -4
  47. package/src/gdskills/bundled/skills/review/review-jev-risk/SKILL.md +1 -4
  48. package/src/gdskills/bundled/skills/review/review-jev-rules/SKILL.md +1 -4
  49. package/src/gdskills/bundled/skills/review/review-jev-scenarios/SKILL.md +1 -4
  50. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +1 -4
  51. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +5 -13
  52. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +2 -2
  53. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +5 -12
  54. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +6 -0
  55. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +5 -13
  56. package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +1 -6
  57. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +1 -6
  58. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +1 -9
  59. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +1 -9
  60. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +2 -7
  61. package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +1 -4
  62. package/src/gdskills/bundled/{rules/core → stacks/mobx/rules}/mobx-store-template.mdc +4 -2
  63. package/src/gdskills/bundled/{rules/core → stacks/nestjs/rules}/nestjs-dto.mdc +4 -3
  64. package/src/gdskills/bundled/stacks/playwright/governance/scout.json +1 -0
  65. package/src/gdskills/bundled/stacks/playwright/pack.json +19 -0
  66. package/src/gdskills/bundled/{rules/core → stacks/playwright/rules}/playwright-testing.mdc +6 -6
  67. package/src/gdskills/bundled/{rules/core → stacks/react/rules}/code-style-patterns.mdc +11 -9
  68. package/src/gdskills/bundled/stacks/storybook/governance/scout.json +1 -0
  69. package/src/gdskills/bundled/stacks/storybook/pack.json +19 -0
  70. package/src/gdskills/bundled/{rules/core → stacks/storybook/rules}/storybook-guidelines.mdc +4 -3
  71. package/src/gdskills/bundled/stacks/ts-js-node/rules/coding-style.mdc +17 -1
  72. package/src/gdskills/bundled/stacks/ts-js-node/rules/patterns.mdc +18 -0
  73. package/src/gdskills/contracts/subagent-dispatch.schema.json +4 -1
  74. /package/src/gdskills/bundled/rules/{core → process}/commit-message-formatting.mdc +0 -0
  75. /package/src/gdskills/bundled/rules/{core → process}/execution-metrics.md +0 -0
  76. /package/src/gdskills/bundled/rules/{core → process}/git-concurrency.mdc +0 -0
  77. /package/src/gdskills/bundled/rules/{core → process}/implementation-doc-mandate.mdc +0 -0
  78. /package/src/gdskills/bundled/rules/{core → process}/implementation-plans.mdc +0 -0
  79. /package/src/gdskills/bundled/rules/{core → process}/jobs-documentation.mdc +0 -0
  80. /package/src/gdskills/bundled/rules/{core → process}/model-selection.mdc +0 -0
  81. /package/src/gdskills/bundled/rules/{core → process}/opus-5-5-prompting.mdc +0 -0
  82. /package/src/gdskills/bundled/rules/{core → process}/requirements-management.mdc +0 -0
  83. /package/src/gdskills/bundled/rules/{core → process}/requirements-package-standard.mdc +0 -0
  84. /package/src/gdskills/bundled/rules/{core → process}/rule-management-workflow.mdc +0 -0
  85. /package/src/gdskills/bundled/rules/{core → process}/session-plan-bridge.mdc +0 -0
  86. /package/src/gdskills/bundled/rules/{core → process}/skill-authoring.mdc +0 -0
  87. /package/src/gdskills/bundled/rules/{core → process}/skill-lifecycle.mdc +0 -0
  88. /package/src/gdskills/bundled/rules/{core → process}/subagent-context-construction.md +0 -0
  89. /package/src/gdskills/bundled/rules/{core → process}/subagent-status-protocol.md +0 -0
@@ -136,10 +136,7 @@ object (`sites`, `enumeration_method`) — never a bare label.
136
136
 
137
137
  ### Shared laws (every reviewer)
138
138
 
139
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
140
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
141
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
142
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
139
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
143
140
 
144
141
  This reviewer satisfies laws 1-3 by construction (law 4 is the premise judge's question, Wave D, for its findings at `minor` and above): `evidence` always names the
145
142
  matched artefacts/facts and the claim text (never an unreproducible claim); a
@@ -162,10 +162,7 @@ Before trusting a run's findings:
162
162
 
163
163
  ### Shared laws (every reviewer)
164
164
 
165
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
166
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
167
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
168
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
165
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
169
166
 
170
167
  Severity levels are defined once, in `review-orchestrator/SKILL.md` →
171
168
  **Severity (canonical)**. This reviewer does not restate them — it only ever
@@ -131,10 +131,7 @@ Gate, same dedup, same Wave C verification.
131
131
 
132
132
  ### Shared laws (every reviewer)
133
133
 
134
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
135
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
136
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
137
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
134
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
138
135
 
139
136
  This reviewer satisfies laws 1-3 by construction (law 4 is the premise judge's question, Wave D, for its findings at `minor` and above): `evidence` always names the
140
137
  hunk location, quotes the changed line, and states every dimension's
@@ -205,10 +205,7 @@ other reviewer's: same Quality Gate, same dedup, same Wave C verification.
205
205
 
206
206
  ### Shared laws (every reviewer)
207
207
 
208
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
209
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
210
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
211
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
208
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
212
209
 
213
210
  This reviewer already satisfies laws 1-3 by construction (law 4 is the premise judge's question, Wave D, for its findings at `minor` and above): `evidence` always
214
211
  names the hunk and quotes it (never an unreproducible claim), a finding is
@@ -129,10 +129,7 @@ same dedup, same Wave C verification.
129
129
 
130
130
  ### Shared laws (every reviewer)
131
131
 
132
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
133
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
134
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
135
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
132
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
136
133
 
137
134
  This reviewer satisfies laws 1-3 by construction (law 4 is the premise judge's question, Wave D, for its findings at `minor` and above): severity is fixed at
138
135
  `minor` — never higher — and `evidence` always names the scenario's linked
@@ -152,10 +152,7 @@ name instead.
152
152
 
153
153
  ### Shared laws (every reviewer)
154
154
 
155
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
156
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
157
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
158
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
155
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
159
156
 
160
157
  Severity levels are defined once, in `review-orchestrator/SKILL.md` →
161
158
  **Severity (canonical)**. This reviewer keeps no rubric of its own: its conditions are
@@ -37,7 +37,7 @@ Every finding must describe an observable, reproducible defect or a spec gap.
37
37
  ## The standard
38
38
 
39
39
  Read both rules before the diff; where this file and a rule disagree, the rule wins.
40
- - `.metaproject/rules/core/async-patterns.mdc` — parallel awaits, timeouts, bounded fan-out, event-loop blocking, **Review severities**.
40
+ - `.metaproject/rules/core/async-patterns.mdc` — parallel awaits, timeouts, bounded fan-out, blocking the request-serving thread, **Review severities**; the Node.js values and rows are `.metaproject/rules/stacks/ts-js-node/patterns.mdc` when that pack is installed.
41
41
  - `.metaproject/rules/core/error-handling.mdc` — failure signalling, silent catches, unhandled rejections, **Review severities**.
42
42
 
43
43
  ## Workflow
@@ -72,7 +72,7 @@ Logic Review Progress:
72
72
 
73
73
  See shared script: `.metaproject/skills/gdskills/shared/git-merge-base.md`
74
74
 
75
- Review scope: **changes introduced in the current branch since merge-base only**.
75
+ In diff mode, review scope: **changes introduced in the current branch since merge-base only**.
76
76
  Do not review unrelated files.
77
77
 
78
78
  **Supplied text first.** When the payload carries `slices`, `context_files`, `diff` or `file_contents`, review exactly that text and never rebuild the diff. A choice's history (law 4) is read with `git log`, `git blame` and `git show` only where the host gives a read-only child git; on keryx shell a read-only child has no shell and no git tool, so read the `git log -L`/`git blame` excerpts the payload supplies, or say the history was not read. Only with none supplied, collect it:
@@ -246,29 +246,21 @@ conditions land under that rubric, not a second rubric.
246
246
 
247
247
  | Condition | Severity | Why, under the canonical rubric |
248
248
  |---|---|---|
249
- | Unhandled rejection; swallowed error; sequential independent awaits, no timeout, unbounded fan-out, event-loop blocking | per `error-handling.mdc` / `async-patterns.mdc` **Review severities** | One table for writers and every reviewer |
249
+ | Unhandled rejection; swallowed error; sequential independent awaits, no timeout, unbounded fan-out, blocking the request-serving thread | per `error-handling.mdc` / `async-patterns.mdc` **Review severities** | One table for writers and every reviewer |
250
250
  | Corrupted or lost persisted/returned data | `blocker` | Data loss or corruption |
251
251
  | Unimplemented acceptance criterion | `blocker` | Named shape 4 |
252
252
  | Race condition on shared mutable state | `blocker` **if** the interleaving can corrupt or lose data; otherwise `major` | The outcome decides, not the word "race" |
253
253
  | Silent wrong result on a named input | `major` | Trigger and outcome are both named |
254
254
  | Type contract broken (declared type is not what is returned) | `major` | Callers observe the wrong value |
255
255
  | Edge case not handled, no input that reaches it named | `minor` | No trigger; the cost is to the next editor |
256
- | Non-null assertion (`!`) | the `!` row of `code-style-patterns.mdc` Review severities | That table owns the rating; do not restate it here |
256
+ | Non-null assertion (`!`) | the `!` row of `.metaproject/rules/stacks/ts-js-node/coding-style.mdc` Review severities | That table owns the rating; without the pack, rate a `!` on a value the types allow to be missing `blocker` when it throws during render, `major` elsewhere, `minor` with no input shown |
257
257
  | "Could be more defensive", no observable defect | `info` | Neither trigger nor maintenance cost named |
258
258
 
259
259
  ## Iron Laws
260
260
 
261
261
  ### Shared laws (every reviewer)
262
262
 
263
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
264
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
265
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
266
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
267
-
268
- Severity levels are defined once, in `review-orchestrator/SKILL.md` →
269
- **Severity (canonical)**. This reviewer does not restate them: `blocker` is the
270
- four merge-blocking shapes named there and nothing else, and the `major`/`minor`
271
- boundary is the trigger-and-outcome test.
263
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
272
264
 
273
265
  ### Logic laws
274
266
 
@@ -21,7 +21,7 @@ them from the reviewer's prose.
21
21
  | `pathsSource` | `metadata` (declared `metadata.paths`) or `description` (globs read out of its description, and the literal file paths such as `src/utils/column-zone.ts` listed beside them; a cited `.md` / `.mdc` document and a `.metaproject/` path are not triggers). A description with no glob gives `none` even when it names a file: a literal path counts only beside a glob. `none` means there is nothing to gate on: **dispatch it** — ambiguity includes. |
22
22
  | `stackRequires` | Apply stack scoping exactly as for a bundled reviewer carrying `metadata.stack_requires`. |
23
23
  | `unresolvedRules` | Rules it cites that the project does not have. Dispatch it anyway, tell it in the prompt which rules are absent, and name them once in the report with the fix (`keryx review import --from <overlay> --only '<glob>'` copies them). Never a finding against the code. |
24
- | `shadowedRules` | `[{ ref, resolved }]`: rules it cites by one path and must read from another. The project holds its own version of the rule at `resolved` — the reference's slot under `.metaproject/rules/project/`, the whole reference kept (`core/x.mdc` → `.metaproject/rules/project/core/x.mdc`) — which answers the reference before the file `ref` names. In the dispatch prompt, tell the reviewer to read `resolved` in place of `ref` — see "Dispatching a project reviewer" below. Not a defect and not reported as one. |
24
+ | `shadowedRules` | `[{ ref, resolved }]`: rules it cites by one path and must read from another. The project holds its own version of the rule at `resolved` — the reference's slot under `.metaproject/rules/project/`, the whole reference kept (`core/x.mdc` → `.metaproject/rules/project/core/x.mdc`) — which answers the reference before the file `ref` names — or, for a rule keryx moved out of `core/`, the file at its new path (`core/<name>.mdc` → `.metaproject/rules/process/<name>.mdc`). In the dispatch prompt, tell the reviewer to read `resolved` in place of `ref` — see "Dispatching a project reviewer" below. Not a defect and not reported as one. |
25
25
  | `unresolvedReferences` | `[{ ref, reason }]`: other references in its text that will not hold. `missing` — a backticked `skills/…` or `rules/…` path ending `.md` / `.json` with no file under `.metaproject/`; `non-portable` — a rule cited by an absolute or `~` path, true on one machine at most. Dispatch it anyway, tell it in the prompt which references are absent, and name them once in the report. Never a finding against the code. |
26
26
 
27
27
  `metadata.paths`, `metadata.flags` and `metadata.stack_requires` are read by
@@ -418,7 +418,7 @@ records them under `### How this review was run`.
418
418
  the per-role tier `keryx review tier` prints for each planned dispatch, and
419
419
  the model each tier resolves to on this host. Choices: accept the plan (the
420
420
  default), all `deep`, or custom. The plan is shown once per round, never per
421
- dispatch (`rules/core/model-selection.mdc`). Skills, rules and this file name
421
+ dispatch (`rules/process/model-selection.mdc`). Skills, rules and this file name
422
422
  tiers only; model ids appear in the rendered question and the report.
423
423
 
424
424
  ```text
@@ -100,7 +100,7 @@ Step 0 runs on **every** round. Step 14 runs **once**, after the last one. They
100
100
 
101
101
  ### Step 6 — the model is computed, not chosen
102
102
 
103
- Before dispatching each reviewer, run `keryx review tier` with the signals you hold (`--scope`, `--findings`, `--diff-lines`, `--fix-attempt`, `--verifier`, `--security`, `--forced-strategy-change`) and paste the `model` block it prints into that dispatch. The tier comes from the command, not from reading `rules/core/model-selection.mdc`.
103
+ Before dispatching each reviewer, run `keryx review tier` with the signals you hold (`--scope`, `--findings`, `--diff-lines`, `--fix-attempt`, `--verifier`, `--security`, `--forced-strategy-change`) and paste the `model` block it prints into that dispatch. The tier comes from the command, not from reading `rules/process/model-selection.mdc`.
104
104
 
105
105
  It names a model only if you gave it your session (`--session-provider`/`--session-model` or `KERYX_SESSION_*`) and discovery found another. Otherwise it prints `inherit: true` with the tier — **adaptive**: pick your own runtime's model for that tier (`standard` = your session model; `light`/`deep` = your runtime's lighter/most capable class if its dispatch tool offers one, else the session model). A model id never goes into a dispatch by hand.
106
106
 
@@ -1162,6 +1162,7 @@ skill_path: <absolute path of <path>/SKILL.md — project reviewers only; omit f
1162
1162
  scope_mode: diff | path
1163
1163
  context_doc: <path or empty>
1164
1164
  issue_url: <url or empty>
1165
+ conduct: <the "Dispatch form" line of .metaproject/rules/process/agent-conduct.mdc, verbatim>
1165
1166
  model: <the `model` block `keryx review tier` printed for this dispatch — paste verbatim>
1166
1167
  budget:
1167
1168
  max_prompt_tokens: <number or null>
@@ -1177,9 +1178,7 @@ target_path: <resolved path or file list>
1177
1178
  file_contents: <bounded file contents relevant to this reviewer>
1178
1179
  ```
1179
1180
 
1180
- Each reviewer must return a `REVIEW_RESULT` object matching `.metaproject/skills/gdskills/review/review-orchestrator/reviewer-finding.schema.json`, followed by a concise markdown summary. The orchestrator must reject or normalize free-form reports before consolidation.
1181
-
1182
- **Important for path mode:** instruct each reviewer to check the **entire file**, not just changes. The scope report should say "Path: `<TARGET_PATH>`" instead of a branch/merge-base.
1181
+ Each reviewer must return a `REVIEW_RESULT` object matching `.metaproject/skills/gdskills/review/review-orchestrator/reviewer-finding.schema.json`, followed by a concise markdown summary. The orchestrator must reject or normalize free-form reports before consolidation. **Important for path mode:** instruct each reviewer to check the **entire file**, not just changes. The scope report should say "Path: `<TARGET_PATH>`" instead of a branch/merge-base.
1183
1182
 
1184
1183
  ## Scope Boundaries
1185
1184
 
@@ -1308,13 +1307,7 @@ inventing a fifth level to express it would put us back where we started.
1308
1307
 
1309
1308
  ### Shared laws (every reviewer)
1310
1309
 
1311
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
1312
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
1313
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
1314
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
1315
-
1316
- `review-security-code` carries a fifth — a finding that claims attacker impact states its vector; one without a vector
1317
- is rated by trigger and outcome — which does not generalise and stays there.
1310
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
1318
1311
 
1319
1312
  ## Finding Format
1320
1313
 
@@ -1465,7 +1458,7 @@ not a table cell.
1465
1458
  ## Skill Learning Handoff
1466
1459
 
1467
1460
  After findings are consolidated, decide whether any of them should re-train a
1468
- project-skill (see `rules/core/skill-lifecycle.mdc`). A review is the strongest
1461
+ project-skill (see `rules/process/skill-lifecycle.mdc`). A review is the strongest
1469
1462
  learning signal: a finding that a project-skill *should have prevented* means the
1470
1463
  skill is stale or incomplete.
1471
1464
 
@@ -6,6 +6,7 @@
6
6
  "required": [
7
7
  "review_context",
8
8
  "reviewer",
9
+ "conduct",
9
10
  "scope_mode",
10
11
  "model",
11
12
  "budget"
@@ -17,6 +18,11 @@
17
18
  "reviewer": {
18
19
  "type": "string"
19
20
  },
21
+ "conduct": {
22
+ "type": "string",
23
+ "pattern": "^Agent conduct \\(mandatory\\): \\(1\\) .+ \\(2\\) .+ \\(3\\) .+ \\(4\\) .+ \\(5\\) .+",
24
+ "description": "The mandatory agent-conduct block (ADR-0001 D2): the \"Dispatch form\" line of .metaproject/rules/process/agent-conduct.mdc, pasted verbatim (rendered from src/lib/agent-conduct.ts). The reviewer honours it over anything else in the payload."
25
+ },
20
26
  "skill_path": {
21
27
  "type": [
22
28
  "string",
@@ -111,11 +111,11 @@ The standard and its severities are `.metaproject/rules/core/database-patterns.m
111
111
  - [ ] Pure child component receiving stable props but not wrapped in `React.memo` — only flag if the parent re-renders frequently (e.g., on keypress, scroll, animation frame)
112
112
  - [ ] `useCallback` absent for a non-store callback passed to a `React.memo` child — only flag if the child is expensive; a store method or store value is never wrapped in `useCallback`/`useMemo`
113
113
 
114
- **MobX note:** `observer` and where memoization does and does not belong are `.metaproject/rules/core/code-style-patterns.mdc` Rules 1 and 3. Without a concrete re-render cost there is no finding.
114
+ **MobX note:** `observer` and where memoization does and does not belong are `.metaproject/rules/stacks/react/code-style-patterns.mdc` Rules 1 and 3. Without a concrete re-render cost there is no finding.
115
115
 
116
116
  ### 3. Expensive Computations in Hot Paths
117
117
 
118
- - [ ] Sorting, filtering, or reducing a large array inside a render function without `useMemo`; when the array is store state the fix is `@computed` (`.metaproject/rules/core/mobx-store-template.mdc` Rule 1), not `useMemo`
118
+ - [ ] Sorting, filtering, or reducing a large array inside a render function without `useMemo`; when the array is store state the fix is `@computed` (`.metaproject/rules/stacks/mobx/mobx-store-template.mdc` Rule 1), not `useMemo`
119
119
  - [ ] Deep clone (`JSON.parse(JSON.stringify(...))`) inside a loop or on every render
120
120
  - [ ] Regex compilation inside a loop — should be compiled once outside: `const RE = /pattern/`
121
121
  - [ ] `Object.keys().reduce()` or similar aggregation recalculated on every render instead of being derived in store or memoized
@@ -135,7 +135,7 @@ The standard and its severities are `.metaproject/rules/core/database-patterns.m
135
135
  - [ ] RxJS `subscribe()` without `unsubscribe()` stored in a disposable or returned from useEffect cleanup
136
136
  - [ ] WebSocket or SSE connection opened without close in cleanup
137
137
 
138
- MobX disposers are `.metaproject/rules/core/mobx-store-template.mdc` Rule 5; a `useEffect` subscription, timer or async operation with no cleanup is `.metaproject/rules/core/code-style-patterns.mdc` Rule 5. Each takes its severity from that rule's table.
138
+ MobX disposers are `.metaproject/rules/stacks/mobx/mobx-store-template.mdc` Rule 5; a `useEffect` subscription, timer or async operation with no cleanup is `.metaproject/rules/stacks/react/code-style-patterns.mdc` Rule 5. Each takes its severity from that rule's table.
139
139
 
140
140
  **Unbounded collections:**
141
141
  - [ ] Map, Set, or array that grows on every event/request with no eviction, max size, or TTL
@@ -178,7 +178,7 @@ The standard and its severities are `.metaproject/rules/core/api-contracts.mdc`
178
178
 
179
179
  ### 10. MobX: Derived State Computed in Renders
180
180
 
181
- Derived values belong in `@computed` (`.metaproject/rules/core/mobx-store-template.mdc` Rule 1 and its row) and logic does not live in a component (`.metaproject/rules/core/code-style-patterns.mdc` Rule 2). This lens adds only the cost angle: a reduce, filter or format recomputed on a high-frequency render, with its frequency named.
181
+ Derived values belong in `@computed` (`.metaproject/rules/stacks/mobx/mobx-store-template.mdc` Rule 1 and its row) and logic does not live in a component (`.metaproject/rules/stacks/react/code-style-patterns.mdc` Rule 2). This lens adds only the cost angle: a reduce, filter or format recomputed on a high-frequency render, with its frequency named.
182
182
 
183
183
  ---
184
184
 
@@ -186,15 +186,7 @@ Derived values belong in `@computed` (`.metaproject/rules/core/mobx-store-templa
186
186
 
187
187
  ### Shared laws (every reviewer)
188
188
 
189
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
190
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
191
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
192
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
193
-
194
- Severity levels are defined once, in `review-orchestrator/SKILL.md` →
195
- **Severity (canonical)**. This reviewer does not restate them: `blocker` is the
196
- four merge-blocking shapes named there and nothing else, and the `major`/`minor`
197
- boundary is the trigger-and-outcome test.
189
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
198
190
 
199
191
  ### Performance laws
200
192
 
@@ -144,12 +144,7 @@ finding ids prefixed `PC-`, then a short summary; `NEEDS_CONTEXT` rather than a
144
144
 
145
145
  ### Shared laws (every reviewer)
146
146
 
147
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
148
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
149
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
150
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
151
-
152
- Severity levels are defined once, in `review-orchestrator/SKILL.md` → **Severity (canonical)**. This reviewer does not restate them: `blocker` is the four merge-blocking shapes named there and nothing else, and the `major`/`minor` boundary is the trigger-and-outcome test.
147
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
153
148
 
154
149
  ---
155
150
 
@@ -165,12 +165,7 @@ Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md`;
165
165
 
166
166
  ### Shared laws (every reviewer)
167
167
 
168
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
169
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
170
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
171
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
172
-
173
- Severity levels are defined once, in `review-orchestrator/SKILL.md` → **Severity (canonical)**. This reviewer does not restate them: `blocker` is the four merge-blocking shapes named there and nothing else, and the `major`/`minor` boundary is the trigger-and-outcome test.
168
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
174
169
 
175
170
  ---
176
171
 
@@ -201,15 +201,7 @@ Attack vector template: _"Attacker sends `filename=../../etc/passwd`, reading ar
201
201
 
202
202
  ### Shared laws (every reviewer)
203
203
 
204
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
205
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
206
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
207
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
208
-
209
- Severity levels are defined once, in `review-orchestrator/SKILL.md` →
210
- **Severity (canonical)**. This reviewer does not restate them: `blocker` is the
211
- four merge-blocking shapes named there and nothing else, and the `major`/`minor`
212
- boundary is the trigger-and-outcome test.
204
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
213
205
 
214
206
  ### Security-specific law
215
207
 
@@ -158,15 +158,7 @@ Naming severity is set by the Style laws below and by the canonical rubric in `r
158
158
 
159
159
  ### Shared laws (every reviewer)
160
160
 
161
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
162
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
163
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
164
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
165
-
166
- Severity levels are defined once, in `review-orchestrator/SKILL.md` →
167
- **Severity (canonical)**. This reviewer does not restate them: `blocker` is the
168
- four merge-blocking shapes named there and nothing else, and the `major`/`minor`
169
- boundary is the trigger-and-outcome test.
161
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
170
162
 
171
163
  ### Style laws
172
164
 
@@ -109,7 +109,7 @@ pass, then work the checklist.
109
109
  These project rules hold what to check and how to rate it. Read each one that applies to the change and rate by its **Review severities** table; this lens does not restate them.
110
110
 
111
111
  - `.metaproject/rules/core/tdd-workflow.mdc`: one toolchain, colocation, a test for new or changed logic, boundary mocking, no real network or clock, no sleeps, flakes fixed by waiting on a state, tests never deleted to go green.
112
- - `.metaproject/rules/core/playwright-testing.mdc`: waits, locator order, auth in a setup project, independent specs, owned data, route mocking, screenshots, smoke tags.
112
+ - `.metaproject/rules/stacks/playwright/playwright-testing.mdc`: waits, locator order, auth in a setup project, independent specs, owned data, route mocking, screenshots, smoke tags.
113
113
 
114
114
  The checks below are the lens's own; no rule covers them.
115
115
 
@@ -176,12 +176,7 @@ The checks below are the lens's own; no rule covers them.
176
176
 
177
177
  ### Shared laws (every reviewer)
178
178
 
179
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
180
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
181
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
182
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
183
-
184
- Severity levels are defined once, in `review-orchestrator/SKILL.md` → **Severity (canonical)**. This reviewer does not restate them: `blocker` is the four merge-blocking shapes named there and nothing else, and the `major`/`minor` boundary is the trigger-and-outcome test.
179
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
185
180
 
186
181
  ---
187
182
 
@@ -142,10 +142,7 @@ pass/fail, viewports checked or "not run"); Top 3 changes; findings by severity;
142
142
 
143
143
  ### Shared laws (every reviewer)
144
144
 
145
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
146
- 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
147
- 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
148
- 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
145
+ Read the review activity rule before the code: `.metaproject/rules/project/activity/review.mdc` when the project keeps its own, else `.metaproject/rules/activity/review.mdc`. It holds what every reviewer applies and this file does not restate: scope (diff mode: the change; path mode: the whole file), the four shared laws, `info`, one finding per defect across lenses, and where severity comes from.
149
146
 
150
147
  Severity levels are defined once, in `review-orchestrator/SKILL.md` →
151
148
  **Severity (canonical)**. This reviewer keeps no rubric of its own: its conditions are
@@ -1,9 +1,11 @@
1
1
  ---
2
+ extends: common
2
3
  description: "MobX store standard shared by code writers and reviewers, with the severities reviewers use: decorators and makeObservable, mutations only in actions, thin public UI actions over private arrow methods, async state with try/catch/finally and a disposed guard, disposed reactions and child stores, in-place collection updates, guarded two-way sync, the lifecycle bridge, and a minimal template. Use when writing or reviewing a MobX store."
3
4
  alwaysApply: false
4
- globs:
5
- - "**/*store*.ts"
6
5
  stack_requires: "mobx"
6
+ paths: ["**/*store*.ts", "**/*store*.tsx"]
7
+ metadata:
8
+ origin: authored
7
9
  ---
8
10
 
9
11
  # MobX Store Template
@@ -1,10 +1,11 @@
1
1
  ---
2
+ extends: common
2
3
  description: "NestJS DTO standard shared by code writers and reviewers, with the severities reviewers use: every input is a validated DTO class, validators match the type, nested and query values are transformed, Swagger decorators match optionality. Use when writing or reviewing NestJS controllers and DTOs."
3
4
  alwaysApply: false
4
- globs:
5
- - "**/*dto*.ts"
6
- - "**/dto/**/*.ts"
7
5
  stack_requires: "nestjs"
6
+ paths: ["**/*dto*.ts", "**/dto/**/*.ts"]
7
+ metadata:
8
+ origin: authored
8
9
  ---
9
10
 
10
11
  # NestJS DTOs
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "playwright",
3
+ "family": "tool",
4
+ "modules": ["playwright-rules"],
5
+ "detectionMarkers": ["playwright"],
6
+ "provenance": {
7
+ "origin": "authored",
8
+ "sourceRef": "ADR-0001 P4 (rules-layers): playwright-testing moved out of rules/core"
9
+ },
10
+ "stability": "experimental",
11
+ "skills": {
12
+ "implement": [],
13
+ "test": [],
14
+ "review": [],
15
+ "build-fix": [],
16
+ "migrate": []
17
+ },
18
+ "notes": "Rules-only pack: it carries the Playwright e2e rule that used to sit in rules/core (gated stack_requires: playwright). Review of specs stays with review-testing-practices, which reads this pack's rule."
19
+ }
@@ -1,16 +1,16 @@
1
1
  ---
2
+ extends: common
2
3
  description: "Playwright e2e standard shared by code writers and reviewers, with the severities reviewers use: web-first waits instead of sleeps or retries, getByRole and getByLabel locators, auth once in a setup project, independent specs, mocked network, screenshots only on stable surfaces. Use when writing or reviewing Playwright specs."
3
4
  alwaysApply: false
4
- globs:
5
- - "e2e/**"
6
- - "**/*.spec.ts"
7
- - "playwright.config.ts"
8
5
  stack_requires: "playwright"
6
+ paths: ["e2e/**/*.ts", "e2e/**/*.js", "**/*.spec.ts", "**/*.e2e.ts", "playwright.config.ts"]
7
+ metadata:
8
+ origin: authored
9
9
  ---
10
10
 
11
11
  # Playwright E2E Testing
12
12
 
13
- Canon applies: the Playwright documentation on locators, web-first assertions, fixtures and projects. This rule holds only this project's decisions; the general testing rules are in `tdd-workflow.mdc`.
13
+ Canon applies: the Playwright documentation on locators, web-first assertions, fixtures and projects. This rule holds only this project's decisions; the general testing rules are in `core/tdd-workflow.mdc`.
14
14
 
15
15
  ## Rules
16
16
 
@@ -44,6 +44,6 @@ Canon applies: the Playwright documentation on locators, web-first assertions, f
44
44
  | Screenshot test on a heavy or non-deterministic surface (Rule 6) | the repo has no visual-test setup, or nothing is masked or fixed | `minor` | a stable component with masked regions |
45
45
  | Screenshot threshold loosened inside a spec (Rule 6) | always | `info` | — |
46
46
  | Smoke tag on a slow or unreliable flow (Rule 7) | always | `minor` | — |
47
- | Real secret hard-coded in a spec (Rule 3) | the value is a real credential | rated by the real-credential row of `security-baseline.mdc` Review severities | a test-only value (`info`) |
47
+ | Real secret hard-coded in a spec (Rule 3) | the value is a real credential | rated by the real-credential row of `core/security-baseline.mdc` Review severities | a test-only value (`info`) |
48
48
  | Shared test account or a non-test origin inlined in a spec instead of read from env or the setup project (Rule 3) | the spec uses the inlined value as the account or host, with no env read in front of it | `major` | a placeholder or empty fallback after an env read (`process.env.E2E_USER ?? "operator@example.com"`); a reserved-domain address (`example.com`) typed into a form to drive a failure path |
49
49
  | Non-TypeScript spec or a vague test name (Rule 8) | always | `info` | — |
@@ -1,12 +1,16 @@
1
1
  ---
2
- description: "React and TypeScript standard for the frontend, shared by code writers and reviewers, with the severities reviewers use: observer on every component that reads observables, layers (service IO, store logic, component render), where state lives, stores created once, effects that clean up, stable keys, accessibility basics, and TypeScript safety. Use when writing or reviewing React/TypeScript components."
2
+ extends: common
3
+ description: "React standard for the frontend, shared by code writers and reviewers, with the severities reviewers use: observer on every component that reads observables, layers (service IO, store logic, component render), where state lives, stores created once, effects that clean up, stable keys, accessibility basics, and props typing. Use when writing or reviewing React components. TypeScript safety (`any`, `!`, import paths) is the ts-js-node pack's coding-style.mdc."
3
4
  alwaysApply: false
4
5
  stack_requires: "react,mobx"
6
+ paths: ["**/*.tsx", "**/*.jsx"]
7
+ metadata:
8
+ origin: authored
5
9
  ---
6
10
 
7
11
  # Code Style and Architecture Patterns
8
12
 
9
- Canon applies: the React documentation (rules of hooks, effects, keys), WAI-ARIA basics and the TypeScript handbook. Store internals are `mobx-store-template.mdc`; backend layering is `clean-architecture.mdc`. This rule holds only this project's frontend decisions.
13
+ Canon applies: the React documentation (rules of hooks, effects, keys), WAI-ARIA basics and the TypeScript handbook. Store internals are `stacks/mobx/mobx-store-template.mdc`; backend layering is `core/clean-architecture.mdc`. This rule holds only this project's frontend decisions.
10
14
 
11
15
  ## Rules
12
16
 
@@ -14,10 +18,10 @@ Canon applies: the React documentation (rules of hooks, effects, keys), WAI-ARIA
14
18
  2. **Layers.** A service does IO only; a store holds state, logic and state transitions; a component renders and forwards events to store actions. No API/IO call and no business logic (validation, transformation, branching on domain state) in a component, its handlers or its effects.
15
19
  3. **Where state lives.** UI-only state that one component uses (an open flag, a hover, an input draft) is `useState`. State with logic, or read by another component or a store, lives in a store; it is never copied into `useState`. `useMemo`/`useCallback` do not wrap store values or store methods.
16
20
  4. **A store is created once per mount**: `useState(() => new PageStore(api))[0]` or `useLocalObservable`, never `new Store()` in the component body.
17
- 5. **An effect that subscribes, listens or starts a timer returns its cleanup.** Data loading is not started from an effect (see `mobx-store-template.mdc` Rule 8).
21
+ 5. **An effect that subscribes, listens or starts a timer returns its cleanup.** Data loading is not started from an effect (see `stacks/mobx/mobx-store-template.mdc` Rule 8).
18
22
  6. **List keys** are on the element `.map()` returns and are stable ids; an index key only for a static list that never reorders or filters.
19
23
  7. **Accessibility.** `<img>` has `alt` (`""` when decorative); an icon-only button or link has `aria-label`; a form input has a label; a clickable element is a `<button>` or `<a>`, not a `<div onClick>`.
20
- 8. **TypeScript.** No `any` (use `unknown` and a guard, or the named type). A `!` assertion carries a comment that proves it; otherwise use `?.`/`??` and handle the missing case. Props types are `XProps`, no `I` prefix. Imports use relative paths or the configured aliases, never `from "src/..."`.
24
+ 8. **Props types** are `XProps`, no `I` prefix. The TypeScript rules every `.ts`/`.tsx` file follows (no `any`, a `!` that carries its proof, import paths) are `stacks/ts-js-node/coding-style.mdc` Review severities.
21
25
 
22
26
  ---
23
27
 
@@ -36,8 +40,6 @@ Canon applies: the React documentation (rules of hooks, effects, keys), WAI-ARIA
36
40
  | Subscription, listener or timer without cleanup (Rule 5) | always | `major` | — |
37
41
  | Missing `key` (Rule 6) | always | `major` | — |
38
42
  | Index key on a list that reorders, filters or paginates (Rule 6) | always | `minor` | a static list |
39
- | `<img>` without `alt`; interactive element without an accessible name (Rule 7) | always | rated by the missing-accessible-name row of `ui-anti-slop.mdc` Review severities | — |
40
- | Clickable non-semantic element without keyboard support (Rule 7) | always | rated by the keyboard-reachability row of `ui-anti-slop.mdc` Review severities | — |
41
- | `!` on a value the types allow to be missing (Rule 8) | a named input reaches it | `blocker` when it throws during render; `major` elsewhere; `minor` with no input shown | a `!` with a comment that proves it |
42
- | `any` in new code (Rule 8) | always | `minor`; `major` with a named input and the wrong value it lets through | — |
43
- | `I`-prefixed props type, `from "src/..."` import (Rule 8) | introduced by the change | `minor` | — |
43
+ | `<img>` without `alt`; interactive element without an accessible name (Rule 7) | always | rated by the missing-accessible-name row of `core/ui-anti-slop.mdc` Review severities | — |
44
+ | Clickable non-semantic element without keyboard support (Rule 7) | always | rated by the keyboard-reachability row of `core/ui-anti-slop.mdc` Review severities | — |
45
+ | `I`-prefixed props type (Rule 8) | introduced by the change | `minor` | — |
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "storybook",
3
+ "family": "tool",
4
+ "modules": ["storybook-rules"],
5
+ "detectionMarkers": ["storybook"],
6
+ "provenance": {
7
+ "origin": "authored",
8
+ "sourceRef": "ADR-0001 P4 (rules-layers): storybook-guidelines moved out of rules/core"
9
+ },
10
+ "stability": "experimental",
11
+ "skills": {
12
+ "implement": [],
13
+ "test": [],
14
+ "review": [],
15
+ "build-fix": [],
16
+ "migrate": []
17
+ },
18
+ "notes": "Rules-only pack: it carries the Storybook rule that used to sit in rules/core (gated stack_requires: react). Detected from a storybook or @storybook/* dependency, not from React, so a React project without Storybook no longer receives it. Story review stays with review-frontend and review-frontend-conventions, which read this pack's rule."
19
+ }