@mrciphersmith/keryx 0.4.27 → 0.4.29

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 (97) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +105640 -105242
  3. package/dist/core.js +24 -200
  4. package/dist/keryx-general-worker-entry.js +355 -418
  5. package/package.json +3 -3
  6. package/src/gdskills/bundled/agents/work-planner.md +1 -1
  7. package/src/gdskills/bundled/install-manifest.json +4 -26
  8. package/src/gdskills/bundled/rules/core/clean-architecture.mdc +25 -153
  9. package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
  10. package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +1 -0
  11. package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
  12. package/src/gdskills/bundled/rules/core/error-handling.mdc +57 -108
  13. package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +4 -5
  14. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +8 -8
  15. package/src/gdskills/bundled/rules/core/skill-authoring.mdc +190 -0
  16. package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +12 -10
  17. package/src/gdskills/bundled/rules/core/solid-principles.mdc +48 -123
  18. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +1 -1
  19. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +12 -21
  20. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
  21. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
  22. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
  23. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +2 -2
  24. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
  25. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +1 -1
  26. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
  27. package/src/gdskills/bundled/skills/planning/interview/SKILL.md +3 -4
  28. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
  29. package/src/gdskills/bundled/skills/quality/git-publish/SKILL.md +60 -0
  30. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
  31. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
  32. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +3 -3
  33. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +6 -6
  34. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +23 -25
  35. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +100 -421
  36. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
  37. package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +6 -6
  38. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
  39. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +36 -33
  40. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
  41. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +63 -134
  42. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -5
  43. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +18 -20
  44. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +12 -18
  45. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +2 -2
  46. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +2 -10
  47. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +35 -35
  48. package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +4 -5
  49. package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +2 -2
  50. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +2 -4
  51. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +13 -14
  52. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +41 -44
  53. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +10 -10
  54. package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +10 -11
  55. package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +5 -5
  56. package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
  57. package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +4 -3
  58. package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +3 -3
  59. package/src/gdskills/bundled/stacks/mobx/agent-refs.json +1 -1
  60. package/src/gdskills/bundled/stacks/mobx/governance/scout.json +2 -2
  61. package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +2 -2
  62. package/src/gdskills/bundled/stacks/ruby-rails/rules/coding-style.mdc +4 -4
  63. package/src/gdskills/bundled/stacks/vue/governance/scout.json +1 -1
  64. package/src/gdskills/contracts/review-finding.schema.json +2 -2
  65. package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +0 -49
  66. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +0 -198
  67. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +0 -177
  68. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +0 -414
  69. package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +0 -55
  70. package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +0 -58
  71. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +0 -209
  72. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +0 -209
  73. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +0 -208
  74. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +0 -255
  75. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +0 -255
  76. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +0 -254
  77. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +0 -209
  78. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +0 -209
  79. package/src/gdskills/bundled/skills/planning/planner/SKILL.md +0 -208
  80. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +0 -171
  81. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +0 -171
  82. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +0 -170
  83. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +0 -184
  84. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +0 -184
  85. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +0 -183
  86. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +0 -249
  87. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +0 -249
  88. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +0 -248
  89. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +0 -199
  90. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +0 -199
  91. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +0 -198
  92. package/src/gdskills/bundled/skills/quality/commit/SKILL.md +0 -87
  93. package/src/gdskills/bundled/skills/quality/pr/SKILL.md +0 -95
  94. package/src/gdskills/bundled/skills/quality/push/SKILL.md +0 -73
  95. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +0 -238
  96. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +0 -301
  97. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +0 -208
@@ -1,301 +0,0 @@
1
- ---
2
- name: code-mobx-store-review
3
- description: "Use when MobX store changes need a focused review — actions, computed values, reactions, async runInAction, state typing, and View↔Store boundaries. NOT for: a general frontend review (review-frontend) or a review request that names no domain (review-orchestrator)."
4
- triggers:
5
- - "mobx review"
6
- - "store review"
7
- - "code-mobx-store-review"
8
- - "Review MobX store"
9
- - "Check store changes"
10
- metadata:
11
- author: "MrCipherSmith"
12
- version: "1.1.0"
13
- category: "review"
14
- compatible_harnesses: "cursor,codex,zed,opencode,claude"
15
- stack_requires: "mobx"
16
- license: "MIT"
17
- ---
18
-
19
- ---
20
-
21
- # Code MobX Store Review (только текущая ветка)
22
-
23
- Проводи ревью только изменений текущей ветки от merge-base с родительской веткой. Фокусируйся на корректности состояния, MobX-паттернах и границах архитектуры.
24
-
25
- ## Scope
26
-
27
- - Если пользователь **не передал commit hash/range**, ревьюируй полный срез от merge-base до рабочего дерева:
28
- - закоммиченные изменения (`BASE_SHA..HEAD`)
29
- - локальные (`staged/unstaged/untracked`)
30
- - Если пользователь **явно передал commit hash/range**, ревьюируй только его.
31
- - Не ревьюй легаси вне измененного скоупа.
32
- - Привязывай замечания к измененным строкам в diff.
33
-
34
- ## Scope Detection
35
-
36
- See shared script: `.metaproject/skills/gdskills/shared/git-merge-base.md`
37
-
38
- Run the script from that file to determine MERGE_BASE and SCOPE before proceeding with the review.
39
-
40
- ### Команды сбора изменений
41
-
42
- ```bash
43
- git status
44
- git log --oneline "${BASE_SHA}..HEAD"
45
- git diff --name-status --find-renames "${BASE_SHA}..HEAD"
46
- git diff --find-renames "${BASE_SHA}..HEAD"
47
- git diff --name-status --find-renames "${BASE_SHA}"
48
- git diff --find-renames "${BASE_SHA}"
49
- git ls-files --others --exclude-standard
50
- ```
51
-
52
- ## MobX review checklist
53
-
54
- ### Store structure
55
- - Store-класс должен иметь `makeObservable(this)` в конструкторе.
56
- - Состояние хранится в `@observable`/`@observable.shallow`/`@observable.ref`.
57
- - Производные значения в `@computed`, а не в View.
58
-
59
- ### Member ordering
60
- Проверяй порядок членов класса (соответствие `@typescript-eslint/member-ordering` и проектной конвенции):
61
- 1. `@observable` поля (публичное состояние, без модификатора)
62
- 2. `private` поля (внутреннее состояние: `disposed`, `initialized`, и т.д.)
63
- 3. `constructor`
64
- 4. `@computed` геттеры
65
- 5. `dispose()` — lifecycle очистки
66
- 6. `init()` / `onMount()` — lifecycle инициализации
67
- 7. `@action.bound` методы — UI-facing actions
68
- 8. `private` методы — API-вызовы и внутренняя логика
69
-
70
- ### Member accessibility modifiers
71
- ESLint: `@typescript-eslint/explicit-member-accessibility: ["error", { accessibility: "no-public" }]` — слово `public` **запрещено**.
72
-
73
- - *(без модификатора)*: `@observable` поля, `@computed` геттеры, `@action.bound` методы, `dispose()`, `init()` — публичный API стора.
74
- - `private`: внутреннее состояние (`disposed`, `initialized`), хелпер-методы, методы с API-вызовами (`fetchX`, `performX`), inter-store callbacks (`onChangeX`, `onFireX`, `handleX`, `syncX`).
75
- - `private readonly`: инжектированные через конструктор зависимости, неизменяемая конфигурация (`id`, `context`).
76
- - `readonly`: неизменяемые публичные identity-поля (`pipelineType`, `contextActions`).
77
- - `protected`: только в абстрактных базовых классах для точек расширения.
78
-
79
- Флаги ревью:
80
- - Использование слова `public` — **ошибка ESLint** (error level).
81
- - `private` поле которое можно сделать `private readonly` — предложи `readonly`.
82
- - Отсутствие `private` на внутреннем состоянии или хелпер-методах — **warning**.
83
-
84
- ### Actions and async
85
- - Любая мутация состояния в действиях (`@action.bound` или через `runInAction`).
86
- - После `await` для мутаций использовать `runInAction`.
87
- - Избегать прямых мутаций store извне action-слоя.
88
-
89
- ### Action binding rules
90
- - **`@action.bound`**: только для методов вызываемых из UI (компонентов). Это тонкие обёртки которые делегируют в private-методы.
91
- - **Private метод + `runInAction`**: для методов содержащих API-вызовы и мутации состояния.
92
- - **Никогда** не использовать `@action.bound` на private-методах.
93
- - **Исключение**: `@action.bound private` допустим для inter-store callbacks — методов, передаваемых как bound-ссылки в дочерние/сиблинг сторы (например `new CodeEditorStore(this.onChangeEditorState)`).
94
-
95
- Флаги ревью:
96
- - `@action.bound` метод содержит API-вызов напрямую — **warning**: вынести API в private метод.
97
- - `@action.bound` на private методе (кроме inter-store callbacks) — **warning**: убрать декоратор, использовать `runInAction` внутри.
98
- - Метод вызываемый из другого стора помечен `@action.bound` вместо plain method — **suggestion**.
99
-
100
- ### Inter-store callbacks and internal handlers
101
- Методы служащие **внутренними callback'ами** между сторами или внутренними обработчиками событий ОБЯЗАНЫ быть `private`. Они НЕ являются частью публичного API стора.
102
-
103
- **Паттерны имён которые ОБЯЗАНЫ быть `private`:**
104
- - `onChangeEditorState(state)` — callback получающий состояние от дочернего/сиблинг стора
105
- - `onFireExecutorChange()` — внутренний sync-обработчик при смене executor
106
- - `onChangeX(value)` — обработчик для внутренней синхронизации состояния между сторами
107
- - `handleX()`, `syncX()` — любой метод внутренней координации
108
-
109
- **Правило решения:** Спроси "Этот метод вызывается из React-компонента через JSX/event handler?" Если НЕТ — он `private`.
110
-
111
- Флаги ревью:
112
- - Публичный метод с паттерном `onChangeX`, `onFireX`, `handleX`, `syncX` который не вызывается из компонентов — **warning**: сделать `private`.
113
- - Inter-store callback без `private` — **warning**: нарушение инкапсуляции стора.
114
-
115
- ### Bidirectional sync bounce protection
116
- Когда два стора синхронизируют состояние **в обоих направлениях** (Store A → Store B и Store B → Store A), как минимум одно направление ОБЯЗАНО иметь equality guard (`if (newValue !== currentValue)`) перед записью в другой стор, чтобы предотвратить бесконечный цикл callback'ов.
117
-
118
- ```typescript
119
- // CORRECT — equality guard prevents bounce
120
- private onChangeEditorState(editorState: ICodeEditorState) {
121
- this.setRawScript(editorState.script);
122
- const codeExecutorId = this.codeExecutor?.id;
123
- if (codeExecutorId && this.codeEditorStore.executorId !== codeExecutorId) {
124
- this.codeEditorStore.setExecutorId(codeExecutorId);
125
- }
126
- }
127
-
128
- // WRONG — no guard, infinite loop
129
- private onChangeEditorState(editorState: ICodeEditorState) {
130
- this.setRawScript(editorState.script);
131
- const codeExecutorId = this.codeExecutor?.id;
132
- if (codeExecutorId) {
133
- this.codeEditorStore.setExecutorId(codeExecutorId); // bounces back
134
- }
135
- }
136
- ```
137
-
138
- Флаги ревью:
139
- - Bidirectional store sync без equality guard — **critical**: риск бесконечного цикла callback'ов.
140
- - Store A пишет в Store B в callback'е от Store B без проверки `!==` — **critical**.
141
-
142
- ### Truthy vs equality guards for optional values
143
- Для guard'ов обновления состояния предпочитай **equality comparison** (`!==`) вместо **truthy checks** (`if (value && ...)`) для optional/nullable полей. Truthy guard блокирует пропагацию легитимных `undefined`/`null`/`0`/`""` значений.
144
-
145
- ```typescript
146
- // WRONG — truthy guard blocks clearing
147
- if (executor && executor.id !== this.executorId) {
148
- this.setExecutorId(executor.id);
149
- }
150
- // executor = undefined → ничего не происходит → stale value
151
-
152
- // CORRECT — equality guard allows clearing
153
- if (executor?.id !== this.executorId) {
154
- this.setExecutorId(executor?.id);
155
- }
156
- // executor = undefined → executorId = undefined → поле очищено
157
- ```
158
-
159
- Флаги ревью:
160
- - Truthy guard (`if (x && x !== y)`) на optional/nullable поле — **warning**: блокирует пропагацию `undefined`/falsy clearing.
161
- - `if (value)` вместо `if (value !== currentValue)` в sync-логике между сторами — **warning**: потенциально блокирует clearing.
162
-
163
- ### API calls placement
164
- - API/IO вызовы **только** в `private` методах стора.
165
- - `@action.bound` методы — тонкие: guard-check → делегирование в private метод.
166
- - Компоненты **никогда** не вызывают API напрямую.
167
-
168
- Флаги ревью:
169
- - API-вызов внутри `@action.bound` метода — **warning**: вынести в private метод.
170
- - API-вызов в компоненте — **critical**: перенести в стор.
171
-
172
- ### Lifecycle initialization
173
- - `init()` / `onMount()` дочернего стора вызывается из **родительского стора**, не из component `useEffect`.
174
- - Компоненты **не должны** триггерить загрузку данных стора через `useEffect`. Родительский стор оркестрирует lifecycle дочерних сторов.
175
- - `dispose()` вызывается родительским стором в его `onUnmount()` для предотвращения stale-state обновлений.
176
-
177
- Флаги ревью:
178
- - Component `useEffect` вызывает `store.loadX()` или `store.init()` — **warning**: перенести вызов в родительский стор `onMount`.
179
- - Отсутствие `dispose()` / disposed guard в сторе с async операциями — **warning**.
180
- - Parent store не вызывает `child.dispose()` в `onUnmount()` — **warning**.
181
-
182
- ### View ↔ Store boundaries
183
- - Бизнес-логика и IO остаются в Store/Service, не во View.
184
- - Компоненты, читающие observable, должны быть `observer(...)`.
185
- - `useEffect` не должен подменять lifecycle store-логики.
186
-
187
- ### TypeScript safety
188
- - Не использовать `any` и небезопасные касты.
189
- - Использовать явные интерфейсы для state и публичного API store.
190
- - Избегать `!` без строгого доказательства инициализации.
191
-
192
- ## Output format
193
-
194
- ```markdown
195
- ## Summary
196
- - [1-3 bullets по итогам]
197
-
198
- ## Scope
199
- - Branch: `<BRANCH>`
200
- - Parent ref: `<PARENT>`
201
- - Merge-base: `<BASE_SHA>`
202
- - Scope mode: `<default-with-uncommitted | explicit-hash-range>`
203
-
204
- ## Critical issues (must fix)
205
- ### [Короткий заголовок]
206
- - **Rule**: [core/mobx-store-template.mdc / core/code-style-patterns.mdc]
207
- - **Why**: [почему это риск]
208
- - **Where**: `path/to/file.ts` (строки из diff)
209
- - **Fix**: [минимальное исправление]
210
- - **Proposed patch**:
211
- ```diff
212
- [unified diff]
213
- ```
214
-
215
- ## Warnings
216
- [тот же формат]
217
-
218
- ## Suggestions
219
- [точечные улучшения без расширения scope]
220
-
221
- ## File-by-file notes
222
- - `path/to/file`: [краткие заметки]
223
- ```
224
-
225
- ## Rules of engagement
226
-
227
- - Не предлагай новые библиотеки без запроса.
228
- - Если есть несколько вариантов, дай один default и один краткий альтернативный.
229
- - Исправления предлагай как минимальные патчи, не переписывай крупные блоки без необходимости.
230
-
231
- ---
232
-
233
- ## Scope Boundaries
234
-
235
- This skill covers **MobX store and state logic** — targeted review of store internals following `mobx-store-template.mdc` and `code-style-patterns.mdc`.
236
-
237
- | Concern | This skill | Use instead |
238
- |---------|-----------|-------------|
239
- | Store structure, actions, computed, reactions, async runInAction | ✅ YES | — |
240
- | View↔Store boundary violations | ✅ YES | — |
241
- | General code quality, readability, tests | ❌ NO | `code-ai-review` |
242
- | Learned-convention enforcement | ❌ NO | `code-learned-review` |
243
- | Naming/style/architecture patterns outside stores | ❌ NO | `code-style-review` |
244
-
245
- ---
246
-
247
- ## Job Context Awareness
248
-
249
- When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY include:
250
-
251
- ```
252
- JOB_NAME: <job-name>
253
- CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
254
- ```
255
-
256
- If provided and the file exists, read the context document before starting the review. Use it to:
257
- - Understand which libraries and patterns were intentionally chosen for the implementation
258
- - Validate MobX patterns against documented project conventions
259
- - Avoid flagging intentional architectural decisions as issues
260
-
261
- If the file does not exist or is not provided, proceed normally — context is optional and non-blocking.
262
-
263
- ---
264
-
265
- ## Red Flags
266
-
267
- This profile is a thin legacy wrapper around `mobx-store-template.mdc`. It
268
- predates the shared finding contract, it does not use the review domain's
269
- severity vocabulary at all, and half of it is written in Russian — each of those
270
- is a way it misfires, and they are the rows below.
271
-
272
- | Rationalization | Why it is wrong |
273
- |----------------|-----------------|
274
- | "The checklist prints severities, so this report is a review result." | It is not. `Critical` / `Warnings` / `Suggestions` are section headings in a Markdown document, not a severity field: this profile predates `reviewer-finding.schema.json` and emits free prose with no machine-readable finding. Hand it to a person, never to `keryx review ingest`. |
275
- | "Half the instructions are in Russian, so the report should be." | The mixed language is an artefact of when this file was written. Write the report in the language the requester used. |
276
- | "The two stores sync both ways and I have not seen an infinite loop." | A bounce needs one ordering to appear, and reading the code is not running it. The checklist rates a bidirectional sync with no equality guard as **critical** for exactly that reason: the absence of the guard is the finding, not the absence of a reproduction. |
277
- | "`if (value && value !== other)` is the safer guard." | It is the guard that silently refuses to clear. `undefined`, `null`, `0` and `""` are legitimate values to propagate, and a truthy check strands the stale one instead. |
278
- | "The component's `useEffect` calls `store.init()` — that is ordinary React." | Not under this architecture. The parent store orchestrates its children's lifecycle, and moving that into a component is how `dispose()` stops being called and stale async writes start landing. |
279
- | "The method is only called by another store, so `@action.bound` is harmless." | The decorator publishes it. Inter-store callbacks and internal handlers are `private` here; the naming patterns the checklist lists are the tell, and the decision question is whether a React component calls it. |
280
- | "While I was in the store I also noticed naming and component problems." | The Scope Boundaries table routes those to `code-style-review` and `code-ai-review`. A finding filed under the wrong profile arrives without the checks that lane would have applied. |
281
-
282
- ---
283
-
284
- ## Verification
285
-
286
- Report done only once all of these hold:
287
-
288
- - The requester asked for this profile by name, or through
289
- `review --legacy-profiles`. A general frontend or store review with no profile
290
- named belongs to `review-orchestrator`.
291
- - The scope block carries the real branch, parent ref, merge-base and scope mode —
292
- not the template placeholders.
293
- - Every entry carries Rule, Why, Where (path plus the lines from the diff) and
294
- Fix, with a minimal unified diff where the fix is a line or two.
295
- - Every entry is anchored to a line the branch slice actually changed; legacy
296
- store code outside that slice is not discussed.
297
- - Entries are sorted into this document's own Critical / Warnings / Suggestions
298
- sections, and are not presented as a severity any other reviewer or tool
299
- consumes.
300
- - The report is free prose by design, so it is delivered to a person and is not
301
- fed into the managed-review pipeline.
@@ -1,208 +0,0 @@
1
- ---
2
- name: code-style-review
3
- description: "Use when a caller wants the style/architecture checklist in code-style-patterns.mdc applied by its own name — checks naming, module and file layout, and TypeScript usage patterns against that specific ruleset, over this branch's diff. Narrower than a general style pass, and separate from the correctness-and-security AI review baseline. NOT for: a general style review (review-style) or an architecture review (review-architecture)."
4
- triggers:
5
- - "code-style-review"
6
- - "architecture style"
7
- metadata:
8
- author: "MrCipherSmith"
9
- version: "1.0.0"
10
- category: "review"
11
- compatible_harnesses: "cursor,codex,zed,opencode,claude"
12
- license: "MIT"
13
- ---
14
-
15
-
16
- # Code Style Review
17
-
18
- Проводи ревью только изменений текущей ветки от момента отбранчевания от родительской ветки, строго по правилам из `.metaproject/rules/core/code-style-patterns.mdc`.
19
-
20
- ## Scope
21
-
22
- - Если пользователь **не передал commit hash/range**, ревьюируй полный срез от merge-base до текущего рабочего дерева:
23
- - закоммиченные изменения (`BASE_SHA..HEAD`)
24
- - локальные незакоммиченные (`staged/unstaged/untracked`)
25
- - Если пользователь **явно передал commit hash/range**, ревьюируй только запрошенный диапазон; незакоммиченные изменения не добавляй, если это отдельно не попросили.
26
- - Не обсуждай легаси вне изменённого скоупа.
27
- - Фидбек должен быть подробным: проблема -> почему это проблема -> где (файл/участок) -> что сделать -> пример исправления.
28
- - Исправления предлагай в виде unified diff-патчей, не вноси изменения в код напрямую.
29
-
30
- ## Scope Detection
31
-
32
- See shared script: `.metaproject/skills/gdskills/shared/git-merge-base.md`
33
-
34
- Run the script from that file to determine MERGE_BASE and SCOPE before proceeding with the review.
35
-
36
- Собери входные данные:
37
-
38
- ### A) Режим по умолчанию (без hash/range)
39
-
40
- ```bash
41
- git status
42
-
43
- # Закоммиченная часть ветки
44
- git log --oneline "${BASE_SHA}..HEAD"
45
- git diff --name-status --find-renames "${BASE_SHA}..HEAD"
46
- git diff --find-renames "${BASE_SHA}..HEAD"
47
-
48
- # Полный текущий срез от merge-base до рабочего дерева
49
- # включает commit'ы + staged + unstaged
50
- # (untracked смотри через git status / git ls-files)
51
- git diff --name-status --find-renames "${BASE_SHA}"
52
- git diff --find-renames "${BASE_SHA}"
53
- git ls-files --others --exclude-standard
54
- ```
55
-
56
- ### B) Режим с явным hash/range
57
-
58
- ```bash
59
- git show --stat --name-status --patch <COMMIT_SHA>
60
- git log --oneline <FROM_SHA>..<TO_SHA>
61
- git diff --name-status --find-renames <FROM_SHA>..<TO_SHA>
62
- git diff --find-renames <FROM_SHA>..<TO_SHA>
63
- ```
64
-
65
- Используй только эти изменения как вход для ревью.
66
-
67
- ## Review checklist (по `.metaproject/rules/core/code-style-patterns.mdc`)
68
-
69
- ### TypeScript Strictness
70
- - Запрещён `any` (предлагай `unknown` + type guards / корректные типы).
71
- - Props через `interface`, префикс `I*`.
72
- - Предпочитай `?.` и `??`, избегай `!` (non-null assertion).
73
-
74
- ### MobX
75
- - В сторах обязателен `makeObservable(this)` в конструкторе.
76
- - Для асинхронных мутаций после `await` - `runInAction`.
77
- - Методы экшенов: `@action.bound`.
78
- - Derived state: `@computed`.
79
- - Для коллекций/списков - `@observable.shallow` (когда применимо).
80
- - Inter-store callbacks (`onChangeX`, `onFireX`, `handleX`, `syncX`) обязаны быть `private`. Публичный `@action.bound` только для методов вызываемых из React-компонентов.
81
-
82
- ### React Components
83
- - Компоненты, читающие observable, обязаны быть `observer(...)`.
84
- - MVVM: логика и side effects в Store/Service, а не во View.
85
- - Запрещай бизнес-логику в `useEffect` (предлагай store actions/reactions).
86
- - Следи за порядком структуры файла: imports -> interfaces -> component -> helpers.
87
-
88
- ### Architecture & Layers
89
- - API/IO не во View: в Service/Store.
90
- - Взаимодействие со Store - через actions (без прямых мутаций вне экшенов).
91
-
92
- ### Anti-patterns severity
93
- - Critical: API во View, missing `observer`, direct store mutation, грубые нарушения MobX async.
94
- - Warnings: `console.log` вместо `AppLogger`, inline object props без memo/const, тяжёлая логика в render, спорные типы, public inter-store callbacks/handlers.
95
-
96
- ## Output format (обязательный отчёт)
97
-
98
- Сформируй отчёт в Markdown строго по шаблону:
99
-
100
- ```markdown
101
- ## Summary
102
- - [1-3 bullets] Что изменилось и общий уровень соответствия стилю
103
-
104
- ## Scope
105
- - Branch: `<BRANCH>`
106
- - Parent ref: `<PARENT>`
107
- - Merge-base: `<BASE_SHA>`
108
- - Scope mode: `<default-with-uncommitted | explicit-hash-range>`
109
-
110
- ## Critical issues (must fix)
111
- ### [Короткий заголовок проблемы]
112
- - **Rule**: [ссылка/название секции из core/code-style-patterns.mdc]
113
- - **Why**: [объяснение]
114
- - **Where**: `path/to/file.tsx` (строки из diff)
115
- - **Fix**: [что сделать]
116
- - **Proposed patch**:
117
- ```diff
118
- [unified diff]
119
- ```
120
-
121
- ## Warnings
122
- ... (тот же формат, без "must fix")
123
-
124
- ## Suggestions
125
- ... (тот же формат, improvements без обязательности)
126
-
127
- ## File-by-file notes
128
- - `path/to/file`: [коротко, только по изменённым участкам]
129
- ```
130
-
131
- ## Rules of engagement
132
-
133
- - Привязывай замечания к конкретным изменённым строкам (по diff).
134
- - Если есть несколько вариантов, предлагай один default и короткий альтернативный.
135
- - Не предлагай новые библиотеки без явного запроса.
136
-
137
- ---
138
-
139
- ## Scope Boundaries
140
-
141
- This skill covers **code style and architecture patterns** — naming, organization, TypeScript usage, pattern compliance per `code-style-patterns.mdc`.
142
-
143
- | Concern | This skill | Use instead |
144
- |---------|-----------|-------------|
145
- | Naming conventions, file organization, import order | ✅ YES | — |
146
- | TypeScript patterns, component/hook structure | ✅ YES | — |
147
- | Architecture pattern compliance | ✅ YES | — |
148
- | Logic correctness, type safety deep dives | ❌ NO | `code-ai-review` or `code-learned-review` |
149
- | MobX store internals | ❌ NO | `code-mobx-store-review` |
150
-
151
- ---
152
-
153
- ## Job Context Awareness
154
-
155
- When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY include:
156
-
157
- ```
158
- JOB_NAME: <job-name>
159
- CONTEXT_PATH: .metaproject/jobs/<job-name>/ai/context.md
160
- ```
161
-
162
- If provided and the file exists, read the context document before starting the review. Use it to:
163
- - Understand which libraries and patterns were intentionally chosen for the implementation
164
- - Validate code style against documented project conventions from the context
165
- - Provide more accurate findings by understanding the project's architectural decisions
166
-
167
- If the file does not exist or is not provided, proceed normally — context is optional and non-blocking.
168
-
169
- ---
170
-
171
- ## Red Flags
172
-
173
- This profile is a thin legacy wrapper around `code-style-patterns.mdc`. It
174
- predates the shared finding contract, it does not use the review domain's
175
- severity vocabulary at all, and it is written mostly in Russian — each of those
176
- is a way it misfires, and they are the rows below.
177
-
178
- | Rationalization | Why it is wrong |
179
- |----------------|-----------------|
180
- | "A style review was asked for, so I will run this profile." | It is a legacy opt-in profile pinned to one rules file, reached by name or through `review --legacy-profiles`. A general style request belongs to `review-style`, and an architecture request to `review-architecture`; running this instead answers a narrower question than the one that was asked. |
181
- | "The report has a Critical section, so downstream can consume it." | It cannot. `Critical` / `Warnings` / `Suggestions` are headings in a Markdown document, not a severity field: this profile predates `reviewer-finding.schema.json` and emits free prose with no machine-readable finding. Hand it to a person, never to `keryx review ingest`. |
182
- | "The instructions are in Russian, so the report should be." | The language is an artefact of when this file was written. Write the report in the language the requester used. |
183
- | "`public` reads more clearly than leaving the modifier off." | The project's ESLint configuration forbids the keyword outright, at error level. That is a build failure, not a matter of taste, and a reviewer arguing the taste is arguing with a gate that already decided. |
184
- | "This component does not look like it reads observables, so the wrapper is optional." | Check what it reads through props and through the store getters it calls. Missing `observer` is rated critical in the checklist above because the failure is silent: the component simply stops updating. |
185
- | "The `any` is temporary — the author will type it properly later." | Nothing records that intent and nothing revisits it. Rate the code in the diff, and propose `unknown` plus a type guard as the concrete fix. |
186
- | "While reading for style I found a real bug, so I will report it here." | This report has nowhere to carry it and the requester is not reading it for that. Route it to `code-ai-review` (or `review-logic`) and say in one line that you did. |
187
-
188
- ---
189
-
190
- ## Verification
191
-
192
- Report done only once all of these hold:
193
-
194
- - The requester asked for this profile by name, or through
195
- `review --legacy-profiles`. A style or architecture request that names no
196
- profile belongs to `review-style` or `review-architecture`.
197
- - The scope block carries the real branch, parent ref, merge-base and scope mode —
198
- not the template placeholders.
199
- - Every entry carries Rule (the section of `code-style-patterns.mdc` it rests on),
200
- Why, Where (path plus the lines from the diff) and Fix, with a minimal unified
201
- diff rather than an edit applied to the tree.
202
- - Every entry is anchored to a line the branch slice actually changed; legacy code
203
- outside that slice is not discussed.
204
- - Entries are sorted into this document's own Critical / Warnings / Suggestions
205
- sections, and are not presented as a severity any other reviewer or tool
206
- consumes.
207
- - The report is free prose by design, so it is delivered to a person and is not
208
- fed into the managed-review pipeline.