@mrciphersmith/keryx 0.4.35 → 0.4.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +14292 -6392
- package/dist/core.js +245 -48
- package/dist/keryx-general-worker-entry.js +277 -49
- package/package.json +2 -1
- package/src/gdskills/bundled/install-manifest.json +132 -95
- package/src/gdskills/bundled/rules/activity/implement.mdc +55 -0
- package/src/gdskills/bundled/rules/activity/review.mdc +47 -0
- package/src/gdskills/bundled/rules/activity/test.mdc +46 -0
- package/src/gdskills/bundled/rules/core/async-patterns.mdc +10 -9
- package/src/gdskills/bundled/rules/core/concurrency-patterns.mdc +2 -2
- package/src/gdskills/bundled/rules/core/definition-of-done.mdc +6 -5
- package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +4 -3
- package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +2 -18
- package/src/gdskills/bundled/rules/process/agent-conduct.mdc +79 -0
- package/src/gdskills/bundled/rules/{core → process}/documentation-management.mdc +1 -1
- package/src/gdskills/bundled/rules/{core → process}/git-rules.mdc +1 -1
- package/src/gdskills/bundled/rules/{core → process}/skills-storage-workflow.mdc +1 -1
- package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.detail.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +6 -6
- package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +4 -0
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +4 -4
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +2 -0
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +19 -19
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +1 -1
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +2 -0
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +9 -9
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +10 -0
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +16 -17
- package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +4 -0
- package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/platform/scheduled-tasks/SKILL.md +7 -7
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +2 -10
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +7 -18
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +2 -10
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +2 -14
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +1 -9
- package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +1 -4
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -9
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +4 -12
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +4 -12
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +1 -12
- package/src/gdskills/bundled/skills/review/review-jev-comments/SKILL.md +1 -4
- package/src/gdskills/bundled/skills/review/review-jev-contract/SKILL.md +1 -4
- package/src/gdskills/bundled/skills/review/review-jev-docs/SKILL.md +1 -4
- package/src/gdskills/bundled/skills/review/review-jev-risk/SKILL.md +1 -4
- package/src/gdskills/bundled/skills/review/review-jev-rules/SKILL.md +1 -4
- package/src/gdskills/bundled/skills/review/review-jev-scenarios/SKILL.md +1 -4
- package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +1 -4
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +5 -13
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +2 -2
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +5 -12
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +6 -0
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +5 -13
- package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +1 -6
- package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +1 -6
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +1 -9
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +1 -9
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +2 -7
- package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +1 -4
- package/src/gdskills/bundled/{rules/core → stacks/mobx/rules}/mobx-store-template.mdc +4 -2
- package/src/gdskills/bundled/{rules/core → stacks/nestjs/rules}/nestjs-dto.mdc +4 -3
- package/src/gdskills/bundled/stacks/playwright/governance/scout.json +1 -0
- package/src/gdskills/bundled/stacks/playwright/pack.json +19 -0
- package/src/gdskills/bundled/{rules/core → stacks/playwright/rules}/playwright-testing.mdc +6 -6
- package/src/gdskills/bundled/{rules/core → stacks/react/rules}/code-style-patterns.mdc +11 -9
- package/src/gdskills/bundled/stacks/storybook/governance/scout.json +1 -0
- package/src/gdskills/bundled/stacks/storybook/pack.json +19 -0
- package/src/gdskills/bundled/{rules/core → stacks/storybook/rules}/storybook-guidelines.mdc +4 -3
- package/src/gdskills/bundled/stacks/ts-js-node/rules/coding-style.mdc +17 -1
- package/src/gdskills/bundled/stacks/ts-js-node/rules/patterns.mdc +18 -0
- package/src/gdskills/contracts/subagent-dispatch.schema.json +4 -1
- /package/src/gdskills/bundled/rules/{core → process}/commit-message-formatting.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/execution-metrics.md +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/git-concurrency.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/implementation-doc-mandate.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/implementation-plans.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/jobs-documentation.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/model-selection.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/opus-5-5-prompting.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/requirements-management.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/requirements-package-standard.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/rule-management-workflow.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/session-plan-bridge.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/skill-authoring.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/skill-lifecycle.mdc +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/subagent-context-construction.md +0 -0
- /package/src/gdskills/bundled/rules/{core → process}/subagent-status-protocol.md +0 -0
|
@@ -94,6 +94,16 @@ keryx job step <job-name> <step-id> --status completed
|
|
|
94
94
|
A conditional step whose trigger did not fire is closed too:
|
|
95
95
|
`keryx job step <job-name> <step-id> --status skipped --reason "<why>"`.
|
|
96
96
|
|
|
97
|
+
### Every dispatch carries the conduct line
|
|
98
|
+
|
|
99
|
+
Every prompt this job dispatches — issue-analyzer, tests-creator, task-implementer,
|
|
100
|
+
code-verifier, the review round, pr-issue-documenter, any fix task — carries this
|
|
101
|
+
line, pasted verbatim (ADR-0001 D2):
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Agent conduct (mandatory): <the "Dispatch form" line of .metaproject/rules/process/agent-conduct.mdc, verbatim>
|
|
105
|
+
```
|
|
106
|
+
|
|
97
107
|
### Step: ANALYZE
|
|
98
108
|
|
|
99
109
|
Read `skills/gdskills/orchestration/issue-analyzer/orchestrator-prompt.md`, fill in parameters:
|
|
@@ -167,7 +167,7 @@ If the orchestrator provided `JOB_NAME` and `CONTEXT_PATH`:
|
|
|
167
167
|
- Use this context throughout Phase 2-4 to guide implementation decisions
|
|
168
168
|
- If the file does not exist, proceed without it — context is optional
|
|
169
169
|
|
|
170
|
-
**2.0b Verify the project-skill covering the target (see `rules/
|
|
170
|
+
**2.0b Verify the project-skill covering the target (see `rules/process/skill-lifecycle.mdc`):**
|
|
171
171
|
|
|
172
172
|
Before you rely on a project-skill's guidance, confirm it still matches the code:
|
|
173
173
|
- `keryx skills route <target_file>` — find the project-skill for this module/entity (if any).
|
|
@@ -203,7 +203,7 @@ This step is read-only and inline; do not spawn a subagent for it.
|
|
|
203
203
|
Rules `resolve-context` listed are already read (2.0c); load the rest by what you're implementing.
|
|
204
204
|
|
|
205
205
|
**Always load (all task types):**
|
|
206
|
-
- `
|
|
206
|
+
- `activity/implement.mdc` — order of work (red-green-refactor), change scope, back-compat; `tdd-workflow.mdc` — STATUS: DONE requires passing tests
|
|
207
207
|
- `error-handling.mdc` — failure signalled explicitly (throw by default, a discriminated result where callers branch), context and `cause` kept, no silent failures
|
|
208
208
|
- `solid-principles.mdc` — SRP, OCP, DIP and the function-design thresholds the code-quality reviewer applies (load for any task that creates or grows classes, services or functions)
|
|
209
209
|
|
|
@@ -211,9 +211,9 @@ Rules `resolve-context` listed are already read (2.0c); load the rest by what yo
|
|
|
211
211
|
|
|
212
212
|
| Task Type | Additional Rules |
|
|
213
213
|
|-----------|---------------|
|
|
214
|
-
| `ui_component` | `code-style-patterns.mdc`, `frontend-assistant.mdc`, `storybook-guidelines.mdc` |
|
|
215
|
-
| `store_logic` | `code-style-patterns.mdc`, `mobx-store-template.mdc` |
|
|
216
|
-
| `service_api` | `
|
|
214
|
+
| `ui_component` | `stacks/react/code-style-patterns.mdc`, `frontend-assistant.mdc`, `stacks/storybook/storybook-guidelines.mdc` |
|
|
215
|
+
| `store_logic` | `stacks/react/code-style-patterns.mdc`, `stacks/mobx/mobx-store-template.mdc` |
|
|
216
|
+
| `service_api` | `stacks/nestjs/nestjs-dto.mdc`, `api-contracts.mdc` |
|
|
217
217
|
| `fix` | Rules based on the files being fixed; always `error-handling.mdc` |
|
|
218
218
|
| `mixed` | All applicable rules above |
|
|
219
219
|
|
|
@@ -223,7 +223,7 @@ Rules `resolve-context` listed are already read (2.0c); load the rest by what yo
|
|
|
223
223
|
- `async`/`await` or queue code → `async-patterns.mdc`
|
|
224
224
|
- New architectural layers or modules → `clean-architecture.mdc`
|
|
225
225
|
|
|
226
|
-
Resolve every rule above project first, bundled second: read `.metaproject/rules/project/<rule>.mdc` when it exists, otherwise `.metaproject/rules/core/<rule>.mdc
|
|
226
|
+
Resolve every rule above project first, bundled second: read `.metaproject/rules/project/<rule>.mdc` when it exists, otherwise the bundled copy: `.metaproject/rules/<rule>.mdc` for a name that carries its layer (`activity/…`, `stacks/react/…`), `.metaproject/rules/core/<rule>.mdc` for a bare one. A project rule with the same name replaces the bundled one (never read both as if they agreed). `.metaproject/rules/core/` is the tree `keryx init` installs and `keryx update` overwrites, so a project's own rules live only in `rules/project/`.
|
|
227
227
|
|
|
228
228
|
### Phase 3: PLAN
|
|
229
229
|
|
|
@@ -286,15 +286,14 @@ Execute the change plan. Write production-quality code.
|
|
|
286
286
|
- Naming: PascalCase for components/types, camelCase for functions/variables, kebab-case for files
|
|
287
287
|
- Follow existing module patterns discovered in Phase 2
|
|
288
288
|
|
|
289
|
-
**4.3 Test standards:**
|
|
290
|
-
- Use the runner, selectors and structure Phase 2.2 found in this project's own tests — not a remembered stack. Arrange/Act/Assert; mock external dependencies, not internal module logic.
|
|
289
|
+
**4.3 Test standards:** `activity/test.mdc`, with the runner, selectors and structure Phase 2.2 found in this project's own tests — not a remembered stack.
|
|
291
290
|
|
|
292
291
|
**4.4 Story standards:**
|
|
293
292
|
- Use the story patterns Phase 2.2 found (`Meta` + `StoryObj`, `args`-based variants, `fn()` callbacks); cover default state, edge cases and error states.
|
|
294
293
|
|
|
295
294
|
**4.5 Commit after implementation:**
|
|
296
295
|
|
|
297
|
-
When auto-commit is enabled, create a conventional commit with the changes. Stage explicit paths only — never `-A`/`--all`/`.` — and run every git command as `git -C "<codebase_path>"` (`rules/
|
|
296
|
+
When auto-commit is enabled, create a conventional commit with the changes. Stage explicit paths only — never `-A`/`--all`/`.` — and run every git command as `git -C "<codebase_path>"` (`rules/process/git-concurrency.mdc`). Include the `refs #<issue_number>` line below only when a positive real issue number was supplied; otherwise omit that entire line:
|
|
298
297
|
```bash
|
|
299
298
|
git -C "<codebase_path>" add <modified files, explicit paths>
|
|
300
299
|
git -C "<codebase_path>" commit -m "<type>(<scope>): <description>
|
|
@@ -306,7 +305,7 @@ task: <task_id>"
|
|
|
306
305
|
When auto-commit is disabled, do not commit. Report the exact list of files you
|
|
307
306
|
changed — nothing inferred — in the Phase 6 STATUS response and the result
|
|
308
307
|
file's `files_modified`/`files_created`/`files_deleted`; the orchestrator stages
|
|
309
|
-
and commits those exact paths at the task boundary (`rules/
|
|
308
|
+
and commits those exact paths at the task boundary (`rules/process/git-concurrency.mdc`,
|
|
310
309
|
"Reporting Back").
|
|
311
310
|
|
|
312
311
|
Commit type mapping:
|
|
@@ -382,10 +381,10 @@ said. Report the block instead, naming what repeated.
|
|
|
382
381
|
|
|
383
382
|
**Never run `git reset --hard`, `git clean`, or any unscoped revert.** You do not own the worktree. `job-orchestrator` dispatches implementers in PARALLEL WAVES sharing a single worktree, so an unscoped reset destroys a wave-mate's uncommitted work — work that is not yours, cannot be recovered, and whose loss is invisible to you because the other agent's failure surfaces somewhere else entirely. If you cannot identify which files are yours, leave the tree exactly as it is and say so in the report: a dirty tree is recoverable, a destroyed one is not.
|
|
384
383
|
|
|
385
|
-
**Same reasoning bans `git stash` and unscoped `git add`.** Never `git stash` — the stash stack is shared by every worktree, so even a scoped `push -- <file>` can be popped by another lane. Stage only the files this task changed (`git -C "<codebase_path>" add <path> <path>`), never `-A`/`--all`/`.`. Every git command runs as `git -C <this worktree's absolute path>`. See `rules/
|
|
384
|
+
**Same reasoning bans `git stash` and unscoped `git add`.** Never `git stash` — the stash stack is shared by every worktree, so even a scoped `push -- <file>` can be popped by another lane. Stage only the files this task changed (`git -C "<codebase_path>" add <path> <path>`), never `-A`/`--all`/`.`. Every git command runs as `git -C <this worktree's absolute path>`. See `rules/process/git-concurrency.mdc`.
|
|
386
385
|
|
|
387
386
|
**5.5 Re-commit fixes if any:**
|
|
388
|
-
When auto-commit is enabled, use the template below — explicit paths only, `git -C "<codebase_path>"` for every command (`rules/
|
|
387
|
+
When auto-commit is enabled, use the template below — explicit paths only, `git -C "<codebase_path>"` for every command (`rules/process/git-concurrency.mdc`). Include `refs #<issue_number>` only for a supplied positive real issue number; otherwise omit that entire line.
|
|
389
388
|
```bash
|
|
390
389
|
git -C "<codebase_path>" add <fixed files, explicit paths>
|
|
391
390
|
git -C "<codebase_path>" commit -m "fix(<scope>): resolve lint/type/test issues
|
|
@@ -434,7 +433,7 @@ Write full JSON to `<JOBS_ROOT>/<JOB_NAME>/results/<task_id>.json`:
|
|
|
434
433
|
}
|
|
435
434
|
```
|
|
436
435
|
|
|
437
|
-
Set `skill_drift` from Phase 2.0b: if the project-skill you used was not `fresh`, or the code you wrote diverged from what a skill documents, name the skill and the divergence. The orchestrator uses this to decide whether to trigger `skills learn` (do NOT run `learn` yourself — it is a mutating step the orchestrator dispatches; see `rules/
|
|
436
|
+
Set `skill_drift` from Phase 2.0b: if the project-skill you used was not `fresh`, or the code you wrote diverged from what a skill documents, name the skill and the divergence. The orchestrator uses this to decide whether to trigger `skills learn` (do NOT run `learn` yourself — it is a mutating step the orchestrator dispatches; see `rules/process/skill-lifecycle.mdc`).
|
|
438
437
|
|
|
439
438
|
Four of those fields have a bar, and a field that collects noise trains the reader to skim all of them. Omit one rather than pad it. The first three are adapted (MIT; see THIRD_PARTY_NOTICES.md) as contract fields rather than a free-text template; the bars below are ours.
|
|
440
439
|
|
|
@@ -480,7 +479,7 @@ The step's own status is the orchestrator's to write (`keryx job step <JOB_NAME>
|
|
|
480
479
|
|
|
481
480
|
**6.2 Emit compact STATUS response:**
|
|
482
481
|
|
|
483
|
-
Return a compact STATUS response following `rules/
|
|
482
|
+
Return a compact STATUS response following `rules/process/subagent-status-protocol.md`.
|
|
484
483
|
**Do NOT include the full JSON block inline** — the orchestrator reads the result file when it needs details.
|
|
485
484
|
The inline response must contain only: STATUS line + Completed bullets + Files changed + Verification summary + a `## Behavior changes` list (each entry's description, `user_visible`, `needs_operator`, alternatives) whenever `behavior_changes` is non-empty — a flow dispatch writes no result file, so this list is the only copy the orchestrator reads. Any `needs_operator: true` entry makes the status at best `DONE_WITH_CONCERNS`, never `DONE`.
|
|
486
485
|
|
|
@@ -531,7 +530,7 @@ second copy of a schema is how that happens.
|
|
|
531
530
|
## Rules of Engagement
|
|
532
531
|
|
|
533
532
|
1. **DO NOT** ask the user any questions. All input comes from the task Scenario and workspace context.
|
|
534
|
-
2. **DO
|
|
533
|
+
2. **DO** stay inside the change scope of `activity/implement.mdc`.
|
|
535
534
|
3. **DO** follow the project's existing code patterns discovered in Phase 2.
|
|
536
535
|
4. **DO** write TypeScript-strict code — no `any`, no untyped functions.
|
|
537
536
|
5. **DO** use project path aliases (`@components`, `@utils`, etc.) for imports.
|
|
@@ -560,7 +559,7 @@ second copy of a schema is how that happens.
|
|
|
560
559
|
|
|
561
560
|
## Reporting Results
|
|
562
561
|
|
|
563
|
-
**Rule:** `rules/
|
|
562
|
+
**Rule:** `rules/process/subagent-status-protocol.md`
|
|
564
563
|
|
|
565
564
|
Every final response to the orchestrator MUST begin with `STATUS: <STATUS>`. The full JSON result object is written to a file in Phase 6.1 — the inline response contains only the compact STATUS format. No JSON in the response body.
|
|
566
565
|
|
|
@@ -636,7 +635,7 @@ Run task-1 (which creates pipeline.ts) before re-dispatching this task, or provi
|
|
|
636
635
|
- (nothing — blocked before implementation could start)
|
|
637
636
|
```
|
|
638
637
|
|
|
639
|
-
See `rules/
|
|
638
|
+
See `rules/process/subagent-status-protocol.md` for the full format specification. Four statuses are yours as a skill worker; the fifth, `FAILED`, belongs to harness child workers and you must never emit it — report `BLOCKED` instead.
|
|
640
639
|
|
|
641
640
|
---
|
|
642
641
|
|
|
@@ -85,6 +85,8 @@ DO NOT ask the user any questions. Execute the full workflow end-to-end.
|
|
|
85
85
|
|
|
86
86
|
Load the skill: task-implementer (from skills/gdskills/orchestration/task-implementer/SKILL.md)
|
|
87
87
|
|
|
88
|
+
Agent conduct (mandatory): <the "Dispatch form" line of .metaproject/rules/process/agent-conduct.mdc, verbatim>
|
|
89
|
+
|
|
88
90
|
═══════════════════════════════════════════════
|
|
89
91
|
TASK
|
|
90
92
|
═══════════════════════════════════════════════
|
|
@@ -164,6 +166,8 @@ DO NOT ask the user any questions. Execute the full workflow end-to-end.
|
|
|
164
166
|
|
|
165
167
|
Load the skill: task-implementer (from skills/gdskills/orchestration/task-implementer/SKILL.md)
|
|
166
168
|
|
|
169
|
+
Agent conduct (mandatory): <the "Dispatch form" line of .metaproject/rules/process/agent-conduct.mdc, verbatim>
|
|
170
|
+
|
|
167
171
|
═══════════════════════════════════════════════
|
|
168
172
|
FIX TASK
|
|
169
173
|
═══════════════════════════════════════════════
|
|
@@ -37,7 +37,7 @@ with no human gates.
|
|
|
37
37
|
|
|
38
38
|
When a USER runs this orchestrator directly (not as a dispatched subagent), at
|
|
39
39
|
the start ask "Collect execution statistics for this run? (yes/no)" per
|
|
40
|
-
`.metaproject/rules/
|
|
40
|
+
`.metaproject/rules/process/execution-metrics.md`. If yes, append the
|
|
41
41
|
`## Execution Metrics` section at the end and save it under the run's artifact
|
|
42
42
|
dir (`.metaproject/data/gdwiki/metrics/` or the docs output dir). Never ask or
|
|
43
43
|
emit it when dispatched as a subagent.
|
|
@@ -145,7 +145,7 @@ Agent({
|
|
|
145
145
|
description: "<phase>: <task>",
|
|
146
146
|
prompt: |
|
|
147
147
|
## Your Role
|
|
148
|
-
You are <agent_role>. Load skill: skills/<skill-name>/SKILL.md
|
|
148
|
+
You are <agent_role>. Load skill: skills/<skill-name>/SKILL.md. Agent conduct (mandatory): <the "Dispatch form" line of .metaproject/rules/process/agent-conduct.mdc, verbatim>
|
|
149
149
|
|
|
150
150
|
## Task
|
|
151
151
|
<specific task>
|
|
@@ -32,7 +32,7 @@ current codebase and produce architecture/onboarding/developer documentation.
|
|
|
32
32
|
|
|
33
33
|
When a USER runs this orchestrator directly (not as a dispatched subagent), at
|
|
34
34
|
the start ask "Collect execution statistics for this run? (yes/no)" per
|
|
35
|
-
`.metaproject/rules/
|
|
35
|
+
`.metaproject/rules/process/execution-metrics.md`. If yes, append the
|
|
36
36
|
`## Execution Metrics` section at the end and save it under the docpack output
|
|
37
37
|
dir. Never ask or emit it when dispatched as a subagent. Plan bridge: publish `phase-0`…`phase-5` with `plan_set`/`plan_update`, and hold them `proposed` while Phase 0's location question is open — see the `session-plan-bridge` rule.
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ dir. Never ask or emit it when dispatched as a subagent. Plan bridge: publish `p
|
|
|
41
41
|
| # | Law |
|
|
42
42
|
|---|---|
|
|
43
43
|
| 1 | Never create a single loose doc when a package is needed. |
|
|
44
|
-
| 2 | Always follow `rules/
|
|
44
|
+
| 2 | Always follow `rules/process/requirements-package-standard.mdc`. |
|
|
45
45
|
| 3 | Every Markdown doc must have `Version`. |
|
|
46
46
|
| 4 | README, PRD and specification are required for module packages. |
|
|
47
47
|
| 5 | Verification and documentation review are mandatory before final output. |
|
|
@@ -149,7 +149,7 @@ Then
|
|
|
149
149
|
## 6. Output Location & Format
|
|
150
150
|
|
|
151
151
|
**Direct Mode:**
|
|
152
|
-
- You MUST follow `rules/
|
|
152
|
+
- You MUST follow `rules/process/requirements-package-standard.mdc` (via `rules/process/documentation-management.mdc` for the `requirements` category).
|
|
153
153
|
- Before saving, ASK the user to confirm the feature name (`<name>`) or to suggest a custom path.
|
|
154
154
|
- The default target path is: `<current_project_root>/docs/requirements/<name>/prd.md` — no date-stamped folder.
|
|
155
155
|
- If the requirements package (`README.md`, `prd.md`, `specification.md`) does not exist yet, create it; otherwise update `prd.md` in place and bump its `Version` field rather than creating a parallel copy.
|
|
@@ -32,9 +32,12 @@ operator reads in the shell's Schedules section.
|
|
|
32
32
|
"sometimes". Ask.
|
|
33
33
|
- **Prompt**: the task in the operator's words, written for an agent that runs
|
|
34
34
|
alone and whose final message is the report.
|
|
35
|
-
- **
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
- **Permission mode**: ASK which one the unattended run uses: `ask` (commands
|
|
36
|
+
needing approval are DENIED), `trust` (non-destructive commands run in the
|
|
37
|
+
sandbox) or `auto` (all but credential-touching ones run in the sandbox).
|
|
38
|
+
- **Cost** (optional): `rates` (USD per million tokens) only prices the report;
|
|
39
|
+
`ceilingUsd` is informational. Cost is reported, never a limit. No price
|
|
40
|
+
table: if rates are unknown, leave them out. Never guess them.
|
|
38
41
|
|
|
39
42
|
### Step 2: Grant only what the task needs
|
|
40
43
|
- `tools`: pick from the fixed catalogue: `gh.pr.list`, `gh.pr.view`,
|
|
@@ -48,12 +51,10 @@ operator reads in the shell's Schedules section.
|
|
|
48
51
|
tools cover it. `full` hands the shell the whole host network; say why. `allowlist`
|
|
49
52
|
(Linux only, `domains` required) reaches only the named domains, and governs only
|
|
50
53
|
the agent's own shell — never the model call or a granted tool.
|
|
51
|
-
- `permissionMode`: `ask` (the default) is read-only, and granted tools still run.
|
|
52
|
-
Propose `trust` only when the scheduled agent must run shell commands.
|
|
53
54
|
|
|
54
55
|
### Step 3: Propose with schedule_create
|
|
55
56
|
Call `schedule_create`. The operator then sees a confirmation card: cadence and
|
|
56
|
-
next runs, prompt, runner,
|
|
57
|
+
next runs, prompt, runner, permission mode, network, every granted tool with its binary
|
|
57
58
|
and account, and exactly what gets installed. You do not confirm it. Only the
|
|
58
59
|
operator can, and every permission mode asks, `auto` included. Changing an existing schedule works the same way (`schedule_pause`, `schedule_resume`, `schedule_run`, `schedule_remove`): the operator answers a card; never send them to a terminal.
|
|
59
60
|
|
|
@@ -85,7 +86,6 @@ that nothing was written. Point to `/schedules` for the list and the reports.
|
|
|
85
86
|
| "The operator said 'every so often' — I'll pick hourly" | A cadence runs and spends unattended. Ask for it |
|
|
86
87
|
| "I'll grant every gh tool so the agent is not stuck" | Grants are the operator's credentials acting unattended. Grant what the prompt needs |
|
|
87
88
|
| "Network full is simpler than granted tools" | It gives the unattended shell the whole host network. Granted tools need none |
|
|
88
|
-
| "I know roughly what the model costs" | A wrong rate makes both spend ceilings wrong by the same factor. Ask |
|
|
89
89
|
|
|
90
90
|
## Verification
|
|
91
91
|
|
|
@@ -41,13 +41,7 @@ Auto-generate tests for specified files or modules.
|
|
|
41
41
|
|
|
42
42
|
### Step 3: Plan Test Cases
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
**Components:** renders, props, interactions, conditional rendering, states
|
|
47
|
-
|
|
48
|
-
**Endpoints:** success (200), validation (400), not found (404), auth (401/403)
|
|
49
|
-
|
|
50
|
-
**Classes:** constructor, methods, state transitions, errors
|
|
44
|
+
Per `.metaproject/rules/activity/test.mdc`: what each test pins, and the cases at the boundaries for functions, components, endpoints and classes.
|
|
51
45
|
|
|
52
46
|
### Step 4: Generate
|
|
53
47
|
1. Create test file at correct path (matching convention)
|
|
@@ -74,10 +68,8 @@ Fix failing tests (max 3 iterations) — fix the test, not the source.
|
|
|
74
68
|
|
|
75
69
|
## Rules
|
|
76
70
|
|
|
77
|
-
-
|
|
71
|
+
- Test design (patterns, doubles, determinism): `.metaproject/rules/activity/test.mdc`
|
|
78
72
|
- NEVER modify source code — only test files
|
|
79
|
-
- Mock external dependencies, not internal modules
|
|
80
|
-
- Meaningful test descriptions
|
|
81
73
|
- If no test framework detected, suggest installing one
|
|
82
74
|
|
|
83
75
|
## Red Flags
|
|
@@ -90,7 +90,7 @@ not a hardcoded `cat`/`ls`/`find` invocation).
|
|
|
90
90
|
- Fixture/factory patterns (how test data is created)
|
|
91
91
|
- Before/after hook usage
|
|
92
92
|
|
|
93
|
-
**1.2b Load test-convention rules, project first.** Read the testing rules the task touches (`tdd-workflow`, the installed stack pack's `testing.mdc`, and any rule the task names) in this order: `.metaproject/rules/project/<rule>.mdc` first, then `.metaproject/rules/core/<rule>.mdc`. A project rule with the same name replaces the bundled one; a project rule with a different name adds to it. Take the list from `workspace.resolved_context_file` when the task carries one, otherwise run `keryx skills resolve-context --for test --files <target_files, comma-joined> --task-text '<task description, each ' written as '\''>' --out <project-relative path>` (`--task-text` lets a declared keyword promote a document); read its `must_read` entries in full and record each in `project_context_applied` with the resolver's `sha256`. An entry with reason `condition:glob:<g>` or `condition:keyword:<k>` was promoted by a declared condition: read its anchored section, and its item needs the `path`, the `sha256` of the whole file as pinned, the `anchor` exactly as declared, a `summary` (at least 40 characters, in your own words, naming at least three distinct words of five or more letters from that section) and `how` `read` or `followed`, never `n/a`. Where a project test convention and a bundled one conflict, the project wins. A project skill only supplements these steps; it never replaces this skill.
|
|
93
|
+
**1.2b Load test-convention rules, project first.** Read the test-design rule `.metaproject/rules/activity/test.mdc` and the testing rules the task touches (`tdd-workflow`, the installed stack pack's `testing.mdc`, and any rule the task names) in this order: `.metaproject/rules/project/<rule>.mdc` first, then `.metaproject/rules/core/<rule>.mdc`. A project rule with the same name replaces the bundled one; a project rule with a different name adds to it. Take the list from `workspace.resolved_context_file` when the task carries one, otherwise run `keryx skills resolve-context --for test --files <target_files, comma-joined> --task-text '<task description, each ' written as '\''>' --out <project-relative path>` (`--task-text` lets a declared keyword promote a document); read its `must_read` entries in full and record each in `project_context_applied` with the resolver's `sha256`. An entry with reason `condition:glob:<g>` or `condition:keyword:<k>` was promoted by a declared condition: read its anchored section, and its item needs the `path`, the `sha256` of the whole file as pinned, the `anchor` exactly as declared, a `summary` (at least 40 characters, in your own words, naming at least three distinct words of five or more letters from that section) and `how` `read` or `followed`, never `n/a`. Where a project test convention and a bundled one conflict, the project wins. A project skill only supplements these steps; it never replaces this skill.
|
|
94
94
|
|
|
95
95
|
**1.3 Identify test file naming:**
|
|
96
96
|
- Pattern (`<component>.test.ts`, `<service>.spec.ts`, `test_<module>.py`) and location (co-located, or `__tests__`/`tests/`)
|
|
@@ -63,9 +63,6 @@ Architecture Review Progress:
|
|
|
63
63
|
|
|
64
64
|
See shared script: `.metaproject/skills/gdskills/shared/git-merge-base.md`
|
|
65
65
|
|
|
66
|
-
Review scope: **changes introduced in the current branch since merge-base only**.
|
|
67
|
-
Do not review pre-existing architectural problems unless they are directly touched by the diff.
|
|
68
|
-
|
|
69
66
|
**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:
|
|
70
67
|
```bash
|
|
71
68
|
git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files --others --exclude-standard
|
|
@@ -92,7 +89,7 @@ When `stack_hint` is not provided, infer from changed file paths:
|
|
|
92
89
|
|
|
93
90
|
### Layer Violations
|
|
94
91
|
|
|
95
|
-
A **layer violation** occurs when code belonging to one architectural layer is placed in another. The layers and what each may import are `.metaproject/rules/core/clean-architecture.mdc` (backend: controller, use case, repository, domain, infrastructure, each boundary mapping its own types) and `.metaproject/rules/
|
|
92
|
+
A **layer violation** occurs when code belonging to one architectural layer is placed in another. The layers and what each may import are `.metaproject/rules/core/clean-architecture.mdc` (backend: controller, use case, repository, domain, infrastructure, each boundary mapping its own types) and `.metaproject/rules/stacks/react/code-style-patterns.mdc` Rule 2 (frontend: component renders, store holds logic, service does I/O only; derived state is `@computed` per `.metaproject/rules/stacks/mobx/mobx-store-template.mdc` Rule 1). Adapt to the project's actual layering and report a placement those rules forbid.
|
|
96
93
|
|
|
97
94
|
### Dependency Direction
|
|
98
95
|
|
|
@@ -125,7 +122,7 @@ Dependencies must flow **inward** (from infrastructure toward domain), never out
|
|
|
125
122
|
|
|
126
123
|
### Dependency Inversion
|
|
127
124
|
|
|
128
|
-
This lens owns DIP, layer and dependency direction, module boundaries and circular imports; their severities are `.metaproject/rules/core/clean-architecture.mdc` Review severities. SRP, OCP, LSP and ISP are `review-clean-code`'s, rated by `.metaproject/rules/core/solid-principles.mdc` Review severities. A component that renders, fetches and derives is `.metaproject/rules/
|
|
125
|
+
This lens owns DIP, layer and dependency direction, module boundaries and circular imports; their severities are `.metaproject/rules/core/clean-architecture.mdc` Review severities. SRP, OCP, LSP and ISP are `review-clean-code`'s, rated by `.metaproject/rules/core/solid-principles.mdc` Review severities. A component that renders, fetches and derives is `.metaproject/rules/stacks/react/code-style-patterns.mdc` Rule 2.
|
|
129
126
|
|
|
130
127
|
- DIP asks for an interface only at an I/O or substitution boundary; a single internal implementation gets none. An infrastructure class passed through several layers instead of behind an interface at that boundary is a finding.
|
|
131
128
|
|
|
@@ -140,14 +137,14 @@ This lens owns DIP, layer and dependency direction, module boundaries and circul
|
|
|
140
137
|
|
|
141
138
|
### React + MVVM (with MobX)
|
|
142
139
|
|
|
143
|
-
Logic in a component, effects that orchestrate state, and cleanup are `.metaproject/rules/
|
|
140
|
+
Logic in a component, effects that orchestrate state, and cleanup are `.metaproject/rules/stacks/react/code-style-patterns.mdc` Rules 2 and 5 with `.metaproject/rules/stacks/mobx/mobx-store-template.mdc` Rule 8. This lens adds:
|
|
144
141
|
|
|
145
142
|
- [ ] Component subscribing to raw observable fields instead of using computed/derived values
|
|
146
143
|
- [ ] View rendering based on multiple raw observable fields instead of a single computed boolean
|
|
147
144
|
|
|
148
145
|
### MobX Store Layer
|
|
149
146
|
|
|
150
|
-
Mutation outside an action, async resolution without `runInAction`, and inter-store callbacks left public are `.metaproject/rules/
|
|
147
|
+
Mutation outside an action, async resolution without `runInAction`, and inter-store callbacks left public are `.metaproject/rules/stacks/mobx/mobx-store-template.mdc` Rules 2 and 3 and their rows; a store importing another store's internal file is `.metaproject/rules/core/clean-architecture.mdc` (public exports only). This lens adds:
|
|
151
148
|
|
|
152
149
|
- [ ] `@computed` with side effects (computed must be pure)
|
|
153
150
|
|
|
@@ -234,19 +231,11 @@ conditions land under that rubric, not a second rubric.
|
|
|
234
231
|
|
|
235
232
|
### Shared laws (every reviewer)
|
|
236
233
|
|
|
237
|
-
|
|
238
|
-
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.
|
|
239
|
-
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.
|
|
240
|
-
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.
|
|
241
|
-
|
|
242
|
-
Severity levels are defined once, in `review-orchestrator/SKILL.md` →
|
|
243
|
-
**Severity (canonical)**. This reviewer does not restate them: `blocker` is the
|
|
244
|
-
four merge-blocking shapes named there and nothing else, and the `major`/`minor`
|
|
245
|
-
boundary is the trigger-and-outcome test.
|
|
234
|
+
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. In diff mode, do not review pre-existing architectural problems unless they are directly touched by the diff.
|
|
246
235
|
|
|
247
236
|
### Architecture laws
|
|
248
237
|
|
|
249
|
-
-
|
|
238
|
+
- In diff mode, only flag actual violations found **in the diff**, not pre-existing issues untouched by the change.
|
|
250
239
|
- Every finding MUST cite a specific `file:line` from the diff.
|
|
251
240
|
- Architecture opinions without a clear, named violation (layer, dependency, pattern misuse) are `info` only — never `blocker` or `major`.
|
|
252
241
|
- Do not flag correct framework usage as a violation just because an alternative exists.
|
|
@@ -316,7 +305,7 @@ When dispatched by `review-orchestrator` or `job-orchestrator`, the prompt MAY c
|
|
|
316
305
|
|
|
317
306
|
| Rationalization | Why it is wrong |
|
|
318
307
|
|----------------|-----------------|
|
|
319
|
-
| "I see a potential layer violation in a file not in the diff" |
|
|
308
|
+
| "I see a potential layer violation in a file not in the diff" | In diff mode, scope is diff-only; pre-existing issues are out of scope unless the diff touches them |
|
|
320
309
|
| "This architecture opinion makes things cleaner, so it's a major" | Opinions without a named violation are `info` only |
|
|
321
310
|
| "I'll flag every cross-import as a boundary violation" | Not all cross-imports violate boundaries; check whether the dependency direction is correct |
|
|
322
311
|
| "The team probably didn't intend this pattern" | Unless the context doc or a clear rule says otherwise, assume intentional; use `info` if unsure |
|
|
@@ -108,7 +108,7 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
|
|
|
108
108
|
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.
|
|
109
109
|
|
|
110
110
|
- `.metaproject/rules/core/api-contracts.mdc`: spec first, versioning, error envelope (validation failure is `400`), idempotency keys, list envelopes and pagination.
|
|
111
|
-
- `.metaproject/rules/
|
|
111
|
+
- `.metaproject/rules/stacks/nestjs/nestjs-dto.mdc`: DTO classes, validators, nested and query transforms, Swagger decorators.
|
|
112
112
|
- `.metaproject/rules/core/database-patterns.mdc`: queries in loops, indexes, migration safety, transactions, `SELECT *`, soft deletes.
|
|
113
113
|
- `.metaproject/rules/core/security-baseline.mdc`: parameterized queries (string interpolation in raw SQL).
|
|
114
114
|
|
|
@@ -140,15 +140,7 @@ Beyond them: a `GET` with a body is `major`; `PUT` for full replacement and `PAT
|
|
|
140
140
|
|
|
141
141
|
### Shared laws (every reviewer)
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
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.
|
|
145
|
-
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.
|
|
146
|
-
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.
|
|
147
|
-
|
|
148
|
-
Severity levels are defined once, in `review-orchestrator/SKILL.md` →
|
|
149
|
-
**Severity (canonical)**. This reviewer does not restate them: `blocker` is the
|
|
150
|
-
four merge-blocking shapes named there and nothing else, and the `major`/`minor`
|
|
151
|
-
boundary is the trigger-and-outcome test.
|
|
143
|
+
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.
|
|
152
144
|
|
|
153
145
|
### Backend conditions
|
|
154
146
|
|
|
@@ -54,11 +54,7 @@ module boundaries and circular imports; `review-style` owns names and readabilit
|
|
|
54
54
|
|
|
55
55
|
## Scope
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
**Debt the change did not create** is not a finding (`solid-principles.mdc`):
|
|
60
|
-
check the before-state first. It is a finding when the change crosses a threshold,
|
|
61
|
-
or adds a self-contained block that meets it alone; cite that block.
|
|
57
|
+
In diff mode, only code introduced or modified in this change.
|
|
62
58
|
|
|
63
59
|
**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:
|
|
64
60
|
```bash
|
|
@@ -70,15 +66,7 @@ git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files -
|
|
|
70
66
|
|
|
71
67
|
### Shared laws (every reviewer)
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
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.
|
|
75
|
-
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.
|
|
76
|
-
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.
|
|
77
|
-
|
|
78
|
-
Severity levels are defined once, in `review-orchestrator/SKILL.md` →
|
|
79
|
-
**Severity (canonical)**. This reviewer does not restate them: `blocker` is the
|
|
80
|
-
four merge-blocking shapes named there and nothing else, and the `major`/`minor`
|
|
81
|
-
boundary is the trigger-and-outcome test.
|
|
69
|
+
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. In diff mode, **debt the change did not create** is not a finding (`solid-principles.mdc`): check the before-state first. It is a finding when the change crosses a threshold, or adds a self-contained block that meets it alone; cite that block.
|
|
82
70
|
|
|
83
71
|
### Clean Code laws
|
|
84
72
|
|
|
@@ -58,15 +58,7 @@ If a more specific module reviewer also applies, run both.
|
|
|
58
58
|
|
|
59
59
|
### Shared laws (every reviewer)
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
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.
|
|
63
|
-
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.
|
|
64
|
-
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.
|
|
65
|
-
|
|
66
|
-
Severity levels are defined once, in `review-orchestrator/SKILL.md` →
|
|
67
|
-
**Severity (canonical)**. This reviewer does not restate them: `blocker` is the
|
|
68
|
-
four merge-blocking shapes named there and nothing else, and the `major`/`minor`
|
|
69
|
-
boundary is the trigger-and-outcome test.
|
|
61
|
+
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.
|
|
70
62
|
|
|
71
63
|
---
|
|
72
64
|
|
|
@@ -148,10 +148,7 @@ Severity comes from **Severity (canonical)** in `review-orchestrator/SKILL.md` (
|
|
|
148
148
|
|
|
149
149
|
### Shared laws (every reviewer)
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
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.
|
|
153
|
-
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.
|
|
154
|
-
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
|
+
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.
|
|
155
152
|
|
|
156
153
|
---
|
|
157
154
|
|
|
@@ -83,15 +83,7 @@ baseline.
|
|
|
83
83
|
|
|
84
84
|
### Shared laws (every reviewer)
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
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.
|
|
88
|
-
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.
|
|
89
|
-
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.
|
|
90
|
-
|
|
91
|
-
Severity levels are defined once, in `review-orchestrator/SKILL.md` →
|
|
92
|
-
**Severity (canonical)**. This reviewer does not restate them: `blocker` is the
|
|
93
|
-
four merge-blocking shapes named there and nothing else, and the `major`/`minor`
|
|
94
|
-
boundary is the trigger-and-outcome test.
|
|
86
|
+
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.
|
|
95
87
|
|
|
96
88
|
---
|
|
97
89
|
|
|
@@ -55,15 +55,7 @@ This skill consolidates what two earlier profiles (a style one and a MobX store
|
|
|
55
55
|
|
|
56
56
|
### Shared laws (every reviewer)
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
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.
|
|
60
|
-
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.
|
|
61
|
-
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.
|
|
62
|
-
|
|
63
|
-
Severity levels are defined once, in `review-orchestrator/SKILL.md` →
|
|
64
|
-
**Severity (canonical)**. This reviewer does not restate them: `blocker` is the
|
|
65
|
-
four merge-blocking shapes named there and nothing else, and the `major`/`minor`
|
|
66
|
-
boundary is the trigger-and-outcome test.
|
|
58
|
+
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.
|
|
67
59
|
|
|
68
60
|
### Frontend / MobX laws
|
|
69
61
|
|
|
@@ -132,9 +124,9 @@ If no CLAUDE.md is found, proceed normally. CLAUDE.md is optional and non-blocki
|
|
|
132
124
|
|
|
133
125
|
Components, stores, TypeScript and stories are checked against the rules the code was written to. Read each that the change touches; each ends with a **Review severities** table, and a finding takes its level from that table's row:
|
|
134
126
|
|
|
135
|
-
- `.metaproject/rules/
|
|
136
|
-
- `.metaproject/rules/
|
|
137
|
-
- `.metaproject/rules/
|
|
127
|
+
- `.metaproject/rules/stacks/react/code-style-patterns.mdc`: `observer`, layers (no API/IO or business logic in components), where state lives (`useState` for UI-only state is correct), store created once, effect cleanup, keys, accessibility, TypeScript (`I` prefix, Rule 8); `any`, `!` and `src/` imports are in `.metaproject/rules/stacks/ts-js-node/coding-style.mdc` Review severities.
|
|
128
|
+
- `.metaproject/rules/stacks/mobx/mobx-store-template.mdc`: `makeObservable` and decorators, mutations in actions, thin public `@action.bound` over private arrow methods (`@action.bound` on a private method is a finding), async flags and the `disposed` guard, disposers and child stores, in-place collection updates, two-way sync guards, the `onMount()`/`onUnmount()` lifecycle bridge (correct, never flagged).
|
|
129
|
+
- `.metaproject/rules/stacks/storybook/storybook-guidelines.mdc`: which states each component's stories cover, `fn()` for actions.
|
|
138
130
|
- `.metaproject/rules/core/error-handling.mdc` for `catch` typing and swallowed errors.
|
|
139
131
|
|
|
140
132
|
A pattern listed under a row's **Not a finding** is not reported. A defect no row covers is rated by the canonical rubric.
|
|
@@ -58,14 +58,14 @@ project-specific guide was found.
|
|
|
58
58
|
|
|
59
59
|
### TypeScript
|
|
60
60
|
|
|
61
|
-
- Avoid broad `as` casts. Prefer type guards, discriminated unions, and precise types. `any
|
|
61
|
+
- Avoid broad `as` casts. Prefer type guards, discriminated unions, and precise types. `any` and `!` are `.metaproject/rules/stacks/ts-js-node/coding-style.mdc` Review severities; the `I` prefix is `.metaproject/rules/stacks/react/code-style-patterns.mdc` Rule 8.
|
|
62
62
|
- Keep tests and stories typed unless intentionally exercising invalid edge cases.
|
|
63
63
|
- Follow local React type import conventions consistently.
|
|
64
64
|
- Write new code in the direction of stricter compiler settings.
|
|
65
65
|
|
|
66
66
|
### React Components and State Stores
|
|
67
67
|
|
|
68
|
-
Components follow `.metaproject/rules/
|
|
68
|
+
Components follow `.metaproject/rules/stacks/react/code-style-patterns.mdc` (reactive wrapper, thin components, where state lives, effects and cleanup, props naming) and stores follow `.metaproject/rules/stacks/mobx/mobx-store-template.mdc` (naming and file casing, reactivity in the constructor, member order, `@action.bound` on public UI-called methods only, actions around async mutations). Each takes its severity from that rule's **Review severities** table, and a local guide that is stricter wins. Local `useState` for UI-only state and a memo over non-store values are correct. Beyond the rules:
|
|
69
69
|
|
|
70
70
|
- Derived serializable state has a single source of truth such as `currentState` when that is the
|
|
71
71
|
local pattern.
|
|
@@ -82,7 +82,7 @@ Components follow `.metaproject/rules/core/code-style-patterns.mdc` (reactive wr
|
|
|
82
82
|
|
|
83
83
|
### Stories and Tooling
|
|
84
84
|
|
|
85
|
-
- New reusable UI surfaces have stories or examples matching local standards; which states they cover is `.metaproject/rules/
|
|
85
|
+
- New reusable UI surfaces have stories or examples matching local standards; which states they cover is `.metaproject/rules/stacks/storybook/storybook-guidelines.mdc` Rule 2.
|
|
86
86
|
- Wrapper components expose plain props for controls when the primary component is store-only.
|
|
87
87
|
- Treat unused-code tools as signals: preserve intentional public APIs with narrow ignores rather
|
|
88
88
|
than deleting documented runtime/story/test entrypoints.
|
|
@@ -93,15 +93,7 @@ Components follow `.metaproject/rules/core/code-style-patterns.mdc` (reactive wr
|
|
|
93
93
|
|
|
94
94
|
### Shared laws (every reviewer)
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
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.
|
|
98
|
-
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.
|
|
99
|
-
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.
|
|
100
|
-
|
|
101
|
-
Severity levels are defined once, in `review-orchestrator/SKILL.md` →
|
|
102
|
-
**Severity (canonical)**. This reviewer does not restate them: `blocker` is the
|
|
103
|
-
four merge-blocking shapes named there and nothing else, and the `major`/`minor`
|
|
104
|
-
boundary is the trigger-and-outcome test.
|
|
96
|
+
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.
|
|
105
97
|
|
|
106
98
|
---
|
|
107
99
|
|