@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.
- package/README.md +2 -2
- package/dist/cli.js +105640 -105242
- package/dist/core.js +24 -200
- package/dist/keryx-general-worker-entry.js +355 -418
- package/package.json +3 -3
- package/src/gdskills/bundled/agents/work-planner.md +1 -1
- package/src/gdskills/bundled/install-manifest.json +4 -26
- package/src/gdskills/bundled/rules/core/clean-architecture.mdc +25 -153
- package/src/gdskills/bundled/rules/core/code-review-learned-profile.mdc +1 -2
- package/src/gdskills/bundled/rules/core/code-style-patterns.mdc +1 -0
- package/src/gdskills/bundled/rules/core/definition-of-done.mdc +0 -1
- package/src/gdskills/bundled/rules/core/error-handling.mdc +57 -108
- package/src/gdskills/bundled/rules/core/implementation-doc-mandate.mdc +4 -5
- package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +8 -8
- package/src/gdskills/bundled/rules/core/skill-authoring.mdc +190 -0
- package/src/gdskills/bundled/rules/core/skills-storage-workflow.mdc +12 -10
- package/src/gdskills/bundled/rules/core/solid-principles.mdc +48 -123
- package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +12 -21
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +1 -1
- package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.md +3 -4
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/git-publish/SKILL.md +60 -0
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.md +3 -3
- package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +6 -6
- package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +23 -25
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +100 -421
- package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +6 -6
- package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +36 -33
- package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +63 -134
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +4 -5
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +18 -20
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +12 -18
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-finding.schema.json +2 -2
- package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +2 -10
- package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +35 -35
- package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +4 -5
- package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +2 -2
- package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +2 -4
- package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +13 -14
- package/src/gdskills/bundled/skills/review/review-style/SKILL.md +41 -44
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +10 -10
- package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +10 -11
- package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +5 -5
- package/src/gdskills/bundled/skills/shared/git-merge-base.md +1 -1
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +4 -3
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +3 -3
- package/src/gdskills/bundled/stacks/mobx/agent-refs.json +1 -1
- package/src/gdskills/bundled/stacks/mobx/governance/scout.json +2 -2
- package/src/gdskills/bundled/stacks/mobx/skills/mobx-store-implementation/SKILL.md +2 -2
- package/src/gdskills/bundled/stacks/ruby-rails/rules/coding-style.mdc +4 -4
- package/src/gdskills/bundled/stacks/vue/governance/scout.json +1 -1
- package/src/gdskills/contracts/review-finding.schema.json +2 -2
- package/src/gdskills/bundled/rules/core/code-review-ai-assistant.mdc +0 -49
- package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +0 -198
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +0 -177
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.md +0 -414
- package/src/gdskills/bundled/skills/orchestration/job-documenter/input-contract.schema.json +0 -55
- package/src/gdskills/bundled/skills/orchestration/job-documenter/output-contract.schema.json +0 -58
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +0 -209
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +0 -209
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +0 -208
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +0 -255
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +0 -255
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +0 -254
- package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +0 -209
- package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +0 -209
- package/src/gdskills/bundled/skills/planning/planner/SKILL.md +0 -208
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +0 -171
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +0 -171
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +0 -170
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +0 -184
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +0 -184
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +0 -183
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +0 -249
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +0 -249
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +0 -248
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +0 -199
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +0 -199
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +0 -198
- package/src/gdskills/bundled/skills/quality/commit/SKILL.md +0 -87
- package/src/gdskills/bundled/skills/quality/pr/SKILL.md +0 -95
- package/src/gdskills/bundled/skills/quality/push/SKILL.md +0 -73
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.md +0 -238
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.md +0 -301
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.md +0 -208
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Content standard for skill, reviewer-lens and rule text: keep only what changes model behaviour — trigger, finish line, filters, calibration, output format, project decisions — and name a published canon instead of restating it."
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
applies_to: process
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Authoring Standard
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Current models already know the published canon of software engineering: design principles,
|
|
12
|
+
well-known books, framework documentation. A skill earns its context with what the model
|
|
13
|
+
cannot know — this project's decisions, where the work ends, what not to report, how to grade
|
|
14
|
+
a result. Text that restates the canon is paid for on every load and changes nothing.
|
|
15
|
+
|
|
16
|
+
Measured on keryx's own clean-code review lens: replacing its restated textbook material with
|
|
17
|
+
a table of project decisions cut the lens from 531 to 220 lines with no loss of recall and no
|
|
18
|
+
added noise, and one filter ("a threshold counts only when this change crosses it") removed a
|
|
19
|
+
third of the noise findings. Filters and decisions moved the numbers; principles did not.
|
|
20
|
+
|
|
21
|
+
This rule governs **content**. Storage, frontmatter and length ceilings are in
|
|
22
|
+
`skills-storage-workflow.mdc`; freshness is in `skill-lifecycle.mdc`.
|
|
23
|
+
|
|
24
|
+
## When To Apply
|
|
25
|
+
|
|
26
|
+
- Writing or editing a `SKILL.md`, a reviewer lens, a rule file, or a subagent instruction.
|
|
27
|
+
- Reviewing a change to any of those.
|
|
28
|
+
- Auditing existing skills and rules for text that no longer changes behaviour.
|
|
29
|
+
|
|
30
|
+
## Mandatory Behavior
|
|
31
|
+
|
|
32
|
+
### 1. Apply the deletion test to every line
|
|
33
|
+
|
|
34
|
+
A line stays only if a capable model would behave differently without it. These fail:
|
|
35
|
+
definitions of well-known concepts, restated principles, generic advice ("write readable
|
|
36
|
+
code"), and motivation for doing the task well. When unsure about a line you are writing,
|
|
37
|
+
leave it out and let the evidence in section 7 decide; for text that already ships, follow
|
|
38
|
+
section 9.
|
|
39
|
+
|
|
40
|
+
### 2. Name the canon, then state what the name cannot carry
|
|
41
|
+
|
|
42
|
+
Reference a published standard by name, in one line. Then write the part the name leaves
|
|
43
|
+
open:
|
|
44
|
+
|
|
45
|
+
- which side wins where the canon contradicts itself or another named canon (small functions
|
|
46
|
+
against deep modules, removing duplication against keeping code local);
|
|
47
|
+
- where this project departs from the canon on purpose, and why — otherwise the departure is
|
|
48
|
+
reported as a defect on every run.
|
|
49
|
+
|
|
50
|
+
A named canon brings its dogma with it. Pair every such reference with filters (section 3),
|
|
51
|
+
or the output fills with findings the canon implies and the project does not want.
|
|
52
|
+
|
|
53
|
+
A line that mixes the two is split: in "functions should be small and focused; flag as
|
|
54
|
+
minor", the grade stays and the explanation goes.
|
|
55
|
+
|
|
56
|
+
### 3. Carry the content a model cannot derive
|
|
57
|
+
|
|
58
|
+
Include each of these that applies to the skill:
|
|
59
|
+
|
|
60
|
+
- **Trigger** — `description` says what the skill does and when to use it. Conditions of use
|
|
61
|
+
live there, because the body is not loaded until the skill is chosen.
|
|
62
|
+
- **Finish line** — the state in which the work is done.
|
|
63
|
+
- **Filters** — what not to do or report: debt that predates the change, anything a linter
|
|
64
|
+
already catches, anything the change did not touch.
|
|
65
|
+
- **Calibration** — for a skill that grades: the severity scale, the confidence below which a
|
|
66
|
+
finding is dropped, and the evidence a finding must carry (a failing input, not "violates
|
|
67
|
+
a principle").
|
|
68
|
+
- **Input and output contracts** — a template or a schema, for what the skill receives
|
|
69
|
+
and what it returns.
|
|
70
|
+
- **Project decisions** — thresholds, conventions, and the departures from section 2. A
|
|
71
|
+
decision is a specific value or choice the canon leaves open: "40 lines", "locality wins".
|
|
72
|
+
A language's or framework's published default (camelCase in TypeScript) is canon;
|
|
73
|
+
choosing between published conventions, or departing from the default, is a decision.
|
|
74
|
+
In a shipped rule it is a default a project may override; it stays even when its origin
|
|
75
|
+
was never recorded, because the value still constrains the result where the explanation
|
|
76
|
+
around it does not.
|
|
77
|
+
- **Known default failures** — specific outputs the model produces by default and should
|
|
78
|
+
not. A change that adds one names the run where it was seen.
|
|
79
|
+
|
|
80
|
+
### 4. Write steps only where order is a constraint
|
|
81
|
+
|
|
82
|
+
Use numbered steps when a step is a gate for the next one or the operation is fragile enough
|
|
83
|
+
that one path is safe. Otherwise state the goal and the finish line. An operation that must
|
|
84
|
+
run the same way every time belongs in a script the skill runs, not in prose the model
|
|
85
|
+
re-derives.
|
|
86
|
+
|
|
87
|
+
### 5. Give the reason, not the emphasis
|
|
88
|
+
|
|
89
|
+
A hard rule states its reason in the same sentence, so the model can apply it to a case the
|
|
90
|
+
rule did not foresee. Capitalised emphasis is for a gate whose miss cannot be undone; used
|
|
91
|
+
elsewhere it makes the model apply the rule too widely.
|
|
92
|
+
|
|
93
|
+
### 6. Offer one default
|
|
94
|
+
|
|
95
|
+
Give one recommended approach and the condition under which to use the alternative. A list
|
|
96
|
+
of equivalent options moves the choice back to the model without the context to make it.
|
|
97
|
+
|
|
98
|
+
### 7. Add a line for an observed failure, keep it while it shows an effect
|
|
99
|
+
|
|
100
|
+
A new line answers a failure seen in a run, not one imagined in advance. For a shipped skill,
|
|
101
|
+
compare its routing and behaviour evals with and without the change; a line that moves
|
|
102
|
+
nothing is removed, and a change that makes them worse is recorded as
|
|
103
|
+
`skills-storage-workflow.mdc` ("Rejected Changes") requires.
|
|
104
|
+
|
|
105
|
+
### 8. Check the smallest tier the skill runs on
|
|
106
|
+
|
|
107
|
+
A skill dispatched to a lighter tier (`model-selection.mdc`) is tested on that tier. A line
|
|
108
|
+
the flagship does not need can pass the deletion test for the lighter model; keep it, and say
|
|
109
|
+
which tier it is for. This protects procedure and precision, not restated canon or
|
|
110
|
+
motivation: every tier already knows the published canon.
|
|
111
|
+
|
|
112
|
+
### 9. Audit existing text by what reading can decide
|
|
113
|
+
|
|
114
|
+
Reading settles sections 1 and 2; sections 4, 7 and 8 need a run. An audit of text that
|
|
115
|
+
already ships therefore sorts each block into one of three:
|
|
116
|
+
|
|
117
|
+
- **Remove** — restated canon or motivation, with no decision, filter or grade in it. A code
|
|
118
|
+
example of a published principle is restated canon; an example that shows a project
|
|
119
|
+
decision is not.
|
|
120
|
+
- **Keep** — anything section 3 lists, and any block a test pins or a required section
|
|
121
|
+
holds. For a skill, the required sections are its anatomy; for a rule, the headings
|
|
122
|
+
`rule-management-workflow.mdc` ("Rule File Standard") requires — the heading stays, its
|
|
123
|
+
content follows sections 1 and 2. A line that feeds a required field of the output (a
|
|
124
|
+
`Fix`, a severity) stays whole. To remove pinned text, change the check in the same
|
|
125
|
+
change.
|
|
126
|
+
- **Undecided** — everything else. It stays until a run decides: an eval comparison, or a
|
|
127
|
+
run on the lightest tier the skill is dispatched to. Where no eval covers the file, say
|
|
128
|
+
so; reading alone does not justify the removal.
|
|
129
|
+
|
|
130
|
+
Two findings are reported rather than sorted: a capitalised rule without a reason
|
|
131
|
+
(section 5) is rewritten with its reason, and numbered steps that are not gates
|
|
132
|
+
(section 4) are Undecided.
|
|
133
|
+
|
|
134
|
+
An existing line is not removed for lacking a record of the failure it answers; that record
|
|
135
|
+
is required only of lines added from now on.
|
|
136
|
+
|
|
137
|
+
A file that shrinks to a few lines stays a short file while anything cites it by name.
|
|
138
|
+
Shortness is the expected result, not a gap to refill.
|
|
139
|
+
|
|
140
|
+
## Output Contract
|
|
141
|
+
|
|
142
|
+
When this rule drives an edit or a review of a skill or rule:
|
|
143
|
+
|
|
144
|
+
- Report each removed block as `file:line` with the section of this rule it failed.
|
|
145
|
+
- Report each added line with the observed failure it answers.
|
|
146
|
+
- Report the line count before and after; a trimmed shipped skill lowers its ceiling in the
|
|
147
|
+
same change (`skills-storage-workflow.mdc`, "Length Ceilings").
|
|
148
|
+
- Report each undecided block with the run that would decide it.
|
|
149
|
+
- Input and output formats and schemas, and safety, permission and confirmation text are out
|
|
150
|
+
of scope —
|
|
151
|
+
never removed under this rule.
|
|
152
|
+
|
|
153
|
+
## Examples
|
|
154
|
+
|
|
155
|
+
### Restated canon → named canon plus the project's decision
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
# Before
|
|
159
|
+
The Single Responsibility Principle states that a class should have only one
|
|
160
|
+
reason to change. A function should do one thing, and do it well. Functions
|
|
161
|
+
should be small...
|
|
162
|
+
|
|
163
|
+
# After
|
|
164
|
+
Review against SOLID and Clean Code. In this project:
|
|
165
|
+
- a function mixing I/O with a transform is a finding at any length;
|
|
166
|
+
- length alone is a finding only past 40 lines;
|
|
167
|
+
- where "small functions" and locality conflict, locality wins.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Principle → filter
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
# Before
|
|
174
|
+
Report long functions, duplicated literals and long parameter lists.
|
|
175
|
+
|
|
176
|
+
# After
|
|
177
|
+
A threshold counts only when this change crosses it. One more line in a
|
|
178
|
+
function that was already too long is not a finding.
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Emphasis → reason
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
# Before
|
|
185
|
+
NEVER report style issues.
|
|
186
|
+
|
|
187
|
+
# After
|
|
188
|
+
Leave style to the linter: a finding the linter already raises is noise
|
|
189
|
+
for the author and hides the ones it cannot see.
|
|
190
|
+
```
|
|
@@ -11,6 +11,11 @@ Keep skill definitions consistent across master source and global agent director
|
|
|
11
11
|
## Trigger
|
|
12
12
|
Apply when user asks to create, update, or sync a skill.
|
|
13
13
|
|
|
14
|
+
## Content Standard
|
|
15
|
+
What a skill's text must and must not contain is in `skill-authoring.mdc` — read
|
|
16
|
+
it before writing or trimming skill prose. This rule covers where a skill lives
|
|
17
|
+
and how it is shipped.
|
|
18
|
+
|
|
14
19
|
## Mandatory Clarification Step
|
|
15
20
|
Before creating or editing a skill, ask and confirm:
|
|
16
21
|
1. Target location
|
|
@@ -55,16 +60,13 @@ path.
|
|
|
55
60
|
excludes the harness reading it. This is the only field in the tree of
|
|
56
61
|
which that is true.
|
|
57
62
|
|
|
58
|
-
Case 2 is why
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
`
|
|
64
|
-
|
|
65
|
-
excludes Claude. These builds are NOT identical copies and must not be deleted
|
|
66
|
-
as such; `src/gdskills/build-parity.test.ts` exempts this one hunk, by name,
|
|
67
|
-
for these seven skills only, and its allow-list is where any widening has to be
|
|
63
|
+
Case 2 is why such a build may differ from its `SKILL.md` by exactly one line:
|
|
64
|
+
it adds `compatible_harnesses: "cursor,codex,zed,opencode"`, while the
|
|
65
|
+
`SKILL.md` declares no harness list, because it is the Claude build and cannot
|
|
66
|
+
carry one that excludes Claude. No shipped skill has such a build today. Such a
|
|
67
|
+
build is NOT an identical copy and must not be deleted as one;
|
|
68
|
+
`src/gdskills/build-parity.test.ts` exempts this one hunk, by name, for the
|
|
69
|
+
skills it lists only, and its allow-list is where any widening has to be
|
|
68
70
|
argued. Every other difference between a build and its `SKILL.md` is drift and
|
|
69
71
|
gets reconciled.
|
|
70
72
|
|
|
@@ -1,149 +1,74 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "SOLID
|
|
2
|
+
description: "SOLID and function-design standard shared by code writers and the code-quality and style reviewers, with the thresholds they use: function length, parameter count, constructor dependencies, branch chains, file length, nesting, branching. Use when designing classes, modules or functions, or reviewing them."
|
|
3
3
|
alwaysApply: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SOLID Principles
|
|
6
|
+
# SOLID Principles and Function Design
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
|
-
|
|
9
|
+
One standard for designing and reviewing classes and functions. The thresholds below are the ones the code-quality and style reviewers apply. A writer who stays inside them gets no finding, and a reviewer reports nothing inside them.
|
|
10
10
|
|
|
11
11
|
## When To Apply
|
|
12
|
-
Apply when creating
|
|
12
|
+
Apply when creating or extending classes, services, modules or functions, and when reviewing them.
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
**One class/module = one reason to change.**
|
|
19
|
-
|
|
20
|
-
### Rules
|
|
21
|
-
- A class that does more than one thing must be split
|
|
22
|
-
- A function that is longer than ~30 lines almost certainly has multiple responsibilities
|
|
23
|
-
- Mixins of data-fetching + business logic + rendering are always a violation
|
|
24
|
-
- If you cannot name a class in ≤3 words without "and", it has too many responsibilities
|
|
25
|
-
|
|
26
|
-
### Signals of violation
|
|
27
|
-
- Class name contains "Manager", "Handler", "Util", "Helper" (often catch-alls)
|
|
28
|
-
- Constructor receives >5 dependencies
|
|
29
|
-
- File is longer than 300 lines and is not a config or generated file
|
|
30
|
-
- Method count exceeds 10 on a non-entity class
|
|
31
|
-
|
|
32
|
-
### Correct pattern
|
|
33
|
-
```typescript
|
|
34
|
-
// BAD — does everything
|
|
35
|
-
class UserService {
|
|
36
|
-
fetchUser() { /* HTTP */ }
|
|
37
|
-
validateUser() { /* domain logic */ }
|
|
38
|
-
formatUserForUI() { /* presentation */ }
|
|
39
|
-
saveToCache() { /* infrastructure */ }
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// GOOD — each class has one job
|
|
43
|
-
class UserRepository { fetchUser() {} }
|
|
44
|
-
class UserValidator { validate() {} }
|
|
45
|
-
class UserPresenter { format() {} }
|
|
46
|
-
class UserCache { save() {} }
|
|
47
|
-
```
|
|
16
|
+
## Thresholds (shared with review-clean-code)
|
|
48
17
|
|
|
49
|
-
|
|
18
|
+
| Signal | Threshold | When a reviewer reports it |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Function body length | over 40 lines | Only when the function also mixes levels of abstraction or does two separable jobs. A long linear table, serializer or test is not a finding. |
|
|
21
|
+
| I/O mixed with a transform | any length | One function that reads or writes (file, network, store) and also transforms the data in between. Keep the transform a pure helper the I/O shell calls. |
|
|
22
|
+
| Positional parameters | 4 or more | When there is no options object and the parameters are not a natural ordered set the codebase already uses. |
|
|
23
|
+
| Boolean flag parameter | any | When the flag selects between two different behaviours, so that call sites read `run(x, true)`. |
|
|
24
|
+
| Constructor dependencies | more than 5 | As an SRP signal; name the two responsibilities. |
|
|
25
|
+
| Branch chain over a type discriminant | 4 or more branches, extended by the change | When the codebase already uses a lookup map or a strategy for the same kind of dispatch. |
|
|
26
|
+
| Duplicated block | 3 or more copies | Reported once, listing every copy. |
|
|
50
27
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
**Open for extension, closed for modification.**
|
|
54
|
-
|
|
55
|
-
### Rules
|
|
56
|
-
- New behaviour must be addable without editing existing classes
|
|
57
|
-
- Use polymorphism, strategy pattern, or configuration — not if/else chains
|
|
58
|
-
- Every time you add an `else if` to handle a new variant, ask: "should this be a new strategy?"
|
|
59
|
-
- Enums as switch-statement keys are the canonical violation — add a new enum value → touch N files
|
|
60
|
-
|
|
61
|
-
### Signals of violation
|
|
62
|
-
- Switch/if-else over a type enum with 3+ cases
|
|
63
|
-
- Adding a new payment provider / notification channel / export format requires editing core logic
|
|
64
|
-
- A "type" field drives behaviour throughout the codebase
|
|
65
|
-
|
|
66
|
-
### Correct pattern
|
|
67
|
-
```typescript
|
|
68
|
-
// BAD — every new type requires editing this function
|
|
69
|
-
function notify(type: string, msg: string) {
|
|
70
|
-
if (type === 'email') sendEmail(msg);
|
|
71
|
-
else if (type === 'sms') sendSMS(msg);
|
|
72
|
-
else if (type === 'push') sendPush(msg);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// GOOD — new channels added without touching existing code
|
|
76
|
-
interface Notifier { send(msg: string): Promise<void>; }
|
|
77
|
-
class EmailNotifier implements Notifier { send() {} }
|
|
78
|
-
class SMSNotifier implements Notifier { send() {} }
|
|
79
|
-
// registry → inject the right one
|
|
80
|
-
```
|
|
28
|
+
Under a threshold, the reviewer stays silent. At or over one, the finding is `minor` unless it names a trigger and a wrong outcome (see the review-orchestrator severity rubric).
|
|
81
29
|
|
|
82
|
-
|
|
30
|
+
## Readability thresholds (shared with review-style)
|
|
83
31
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
**Depend on abstractions, not concretions.**
|
|
87
|
-
|
|
88
|
-
### Rules
|
|
89
|
-
- High-level modules must not import low-level modules directly
|
|
90
|
-
- Dependencies are injected, not constructed inside the class
|
|
91
|
-
- `new ConcreteService()` inside a business-logic class is always a violation
|
|
92
|
-
- Tests become trivially easy when DIP is followed — if mocking is hard, DIP is violated
|
|
93
|
-
|
|
94
|
-
### Signals of violation
|
|
95
|
-
- `new` keyword used inside a service or use-case class body
|
|
96
|
-
- Direct imports of `axios`, `prisma`, `fetch` in business logic layers
|
|
97
|
-
- Constructor creates its own dependencies instead of receiving them
|
|
98
|
-
- Testing requires monkey-patching module imports
|
|
99
|
-
|
|
100
|
-
### Correct pattern
|
|
101
|
-
```typescript
|
|
102
|
-
// BAD — hard dependency on concrete HTTP client
|
|
103
|
-
class OrderService {
|
|
104
|
-
async createOrder(data: OrderDTO) {
|
|
105
|
-
const client = new HttpClient(); // ← violation
|
|
106
|
-
return client.post('/orders', data);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// GOOD — depends on abstraction, injected externally
|
|
111
|
-
interface HttpClient { post(url: string, body: unknown): Promise<unknown>; }
|
|
112
|
-
|
|
113
|
-
class OrderService {
|
|
114
|
-
constructor(private readonly http: HttpClient) {}
|
|
115
|
-
async createOrder(data: OrderDTO) {
|
|
116
|
-
return this.http.post('/orders', data);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
```
|
|
32
|
+
`review-style` rates these; `review-clean-code` leaves them to it. Generated code, fixtures, migrations and test files are exempt.
|
|
120
33
|
|
|
121
|
-
|
|
34
|
+
| Signal | Threshold | Default |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| File length | over 500 lines; over 800 lines | `info`; `minor` |
|
|
37
|
+
| Nesting depth (callbacks or `if/else`) | more than 3 levels | `minor` |
|
|
38
|
+
| Decision branches in one function | more than 10 | `minor` |
|
|
39
|
+
| Boolean condition | more than 3 clauses without grouping | `minor` |
|
|
40
|
+
| Unrelated exports from one file | more than 5 | `minor` |
|
|
122
41
|
|
|
123
|
-
|
|
42
|
+
A threshold in either table counts only when the change crosses it.
|
|
124
43
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
**Interface Segregation (I):** Prefer small, focused interfaces. A class should not be forced to implement methods it does not use. Split fat interfaces into role interfaces.
|
|
44
|
+
A stack rule may refine a threshold for its language. It names the row it overrides and gives its own value; for that language, writers and reviewers use the stack value.
|
|
128
45
|
|
|
129
46
|
---
|
|
130
47
|
|
|
131
|
-
##
|
|
48
|
+
## S — Single Responsibility
|
|
49
|
+
**One class or module, one reason to change.**
|
|
50
|
+
- Do not mix fetching, business rules and presentation or persistence in one class or function.
|
|
51
|
+
- If you cannot name it in three words without "and", it does too much.
|
|
52
|
+
- A constructor assigns. It does not perform I/O or start async work.
|
|
132
53
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
**IRON LAW 3: Adding a new variant must not require editing more than 1 existing file. If it does, refactor first.**
|
|
54
|
+
## O — Open/Closed
|
|
55
|
+
- Adding a variant should not mean editing a growing `if/else` or `switch` when the codebase already dispatches that kind of thing through a map or a strategy.
|
|
136
56
|
|
|
137
|
-
|
|
57
|
+
## L — Liskov Substitution
|
|
58
|
+
- An override must work wherever the base type is used. An override that throws "not supported", or rejects input the base accepts, breaks callers that hold the base type.
|
|
59
|
+
|
|
60
|
+
## I — Interface Segregation
|
|
61
|
+
- An implementation that leaves methods as stubs or no-ops means the interface is too wide.
|
|
138
62
|
|
|
139
|
-
##
|
|
63
|
+
## D — Dependency Inversion
|
|
64
|
+
- Business logic receives the dependencies it calls into (I/O, network, clock) instead of constructing them. Inside a module, constructing a plain helper or value object is fine.
|
|
65
|
+
- An interface belongs at an I/O or substitution boundary (repository, external client, clock). A single internal implementation gets none. Interfaces are named without an `I` prefix.
|
|
140
66
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
| "I'll inject it later, for now I'll just `new` it" | "Later" never comes; the hard dependency ships to production |
|
|
145
|
-
| "An interface is overkill for this simple case" | Interfaces cost nothing at compile time and enable testing at zero extra effort |
|
|
146
|
-
| "I'll use a switch, there are only 3 cases" | 3 cases becomes 10 over time — the OCP violation compounds |
|
|
147
|
-
| "The constructor is getting long but refactoring is risky" | A long constructor is a signal the class has too many responsibilities — refactor now, not later |
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Iron Laws
|
|
148
70
|
|
|
149
|
-
**IRON LAW:
|
|
71
|
+
**IRON LAW 1: An override never throws where its base type would not.**
|
|
72
|
+
**IRON LAW 2: A constructor performs no I/O.**
|
|
73
|
+
**IRON LAW 3: The thresholds in this file are the standard for both writing and review. Change them here, never in a reviewer.**
|
|
74
|
+
</content>
|
|
@@ -236,7 +236,7 @@ undocumented is drift that will be silently "fixed" by whoever refreshes next.
|
|
|
236
236
|
| Refresh one whose origin drifted | YES | — |
|
|
237
237
|
| Create an entity/module project-skill | NO | `entity-skill-creator` |
|
|
238
238
|
| Change a reviewer keryx ships | NO | edit `src/gdskills/bundled/skills/review/` and open a PR |
|
|
239
|
-
| Update a skill from review findings | NO | `
|
|
239
|
+
| Update a skill from review findings | NO | `keryx skills learn` |
|
|
240
240
|
| Decide which reviewers a round dispatches | NO | `review-orchestrator` |
|
|
241
241
|
| Import a tree of overlay reviewers | YES — `keryx review import --from <dir> --only '<glob>'`, dry-run first (`SKILL.detail.md`) | — |
|
|
242
242
|
| Import a non-review SKILL.md / GitHub URL | NO | `entity-skill-creator` / `keryx skills import` |
|
|
@@ -39,7 +39,7 @@ Collects and maintains a **unified context document** for a job. The context doc
|
|
|
39
39
|
6. Keep the context document up-to-date as the job evolves (version-tracked updates)
|
|
40
40
|
|
|
41
41
|
**Input:** Task description + job name + project path (from orchestrator or user)
|
|
42
|
-
**Output:** `context.md` document in `.metaproject/jobs/<job-name>/ai/` and `.metaproject/jobs/<job-name>/man/`,
|
|
42
|
+
**Output:** `context.md` document in `.metaproject/jobs/<job-name>/ai/` and `.metaproject/jobs/<job-name>/man/`, written straight into the job folder `keryx job init` created
|
|
43
43
|
|
|
44
44
|
## When to Use
|
|
45
45
|
|
|
@@ -55,7 +55,7 @@ Phase 1: RECEIVE -> Parse input, determine scope and focus areas
|
|
|
55
55
|
Phase 2: LOCAL -> Scan local docs, jobs, rules, codebase for relevant context
|
|
56
56
|
Phase 3: EXTERNAL -> Fetch external docs for libraries, APIs, best practices
|
|
57
57
|
Phase 4: SYNTHESIZE -> Merge all findings into a single context document
|
|
58
|
-
Phase 5: DOCUMENT -> Save
|
|
58
|
+
Phase 5: DOCUMENT -> Save into the job folder, return result
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
---
|
|
@@ -487,27 +487,18 @@ When updating an existing context:
|
|
|
487
487
|
|
|
488
488
|
Save the context document and notify orchestrator.
|
|
489
489
|
|
|
490
|
-
### 5.1 Save
|
|
490
|
+
### 5.1 Save into the job folder (when running within a job)
|
|
491
491
|
|
|
492
|
-
If JOB_NAME is provided,
|
|
492
|
+
If JOB_NAME is provided, the job folder already exists — `keryx job init` creates
|
|
493
|
+
it, and the orchestrator owns it. Write the full context document, metadata block
|
|
494
|
+
included, to `<JOBS_ROOT>/<JOB_NAME>/ai/context.md` and `<JOBS_ROOT>/<JOB_NAME>/man/context.md`.
|
|
493
495
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
DATA:
|
|
500
|
-
DOC_TYPE: context
|
|
501
|
-
TARGET: both
|
|
502
|
-
TITLE: Context — <task description short>
|
|
503
|
-
CONTENT: <full context document>
|
|
504
|
-
AGENT: context-collector
|
|
505
|
-
TASK: Collect context for <task description>
|
|
506
|
-
VERSION: <1.0 for new, incremented for update>
|
|
507
|
-
DOC_STATUS: final
|
|
508
|
-
```
|
|
496
|
+
Do not record it with `keryx job document`: that command takes only `analysis`,
|
|
497
|
+
`implementation-report`, `review` and `verification-report`, and recording a type a
|
|
498
|
+
second time replaces the first file, so filing a context document under
|
|
499
|
+
`analysis` would overwrite the real analysis.
|
|
509
500
|
|
|
510
|
-
For ACTION=update,
|
|
501
|
+
For ACTION=update, write to the same paths — the new revision replaces the existing `context.md`.
|
|
511
502
|
|
|
512
503
|
### 5.2 Save directly (when running standalone without a job)
|
|
513
504
|
|
|
@@ -667,5 +658,5 @@ Stop and re-read this skill if you are thinking:
|
|
|
667
658
|
| "The task mentions React, so I should fetch React documentation." | Rule 10: no external fetch for well-known patterns already covered by project rules. External research is for the specific API, version gotcha or convention this task turns on — not for a topic overview. |
|
|
668
659
|
| "This section of the existing context looks stale, so I'll drop it while updating." | 4.3 and Rule 4: preserve existing sections unless they are explicitly outdated. "Looks stale" from inside a scoped update usually means "I did not re-research it" — removing it silently deletes a decision another agent is relying on. |
|
|
669
660
|
| "I fixed the small inconsistency I noticed in the source file while reading it." | Rule 11: this skill writes only into the job folder. An edit made during collection lands in a diff nobody attributed to a task, and the implementer inherits it without knowing. |
|
|
670
|
-
| "The context is written, so I can return —
|
|
661
|
+
| "The context is written, so I can return — saving it can happen later." | Phase 5 is part of the skill. A `context.md` that was never written to the job folder leaves the next phase resolving `CONTEXT_LOCATION` to nothing. |
|
|
671
662
|
| "The content changed only slightly, so bumping the Version and update log is overkill." | Rule 12 and Rule 3: version, timestamp and update log are mandatory. Without them, two agents reading different revisions have no way to tell which one they have. |
|
|
@@ -291,9 +291,9 @@ Check `AGENTS.md` for available tools (`playwright-testing.mdc`, `storybook-guid
|
|
|
291
291
|
## Step 8: Integration with Other Skills
|
|
292
292
|
|
|
293
293
|
Before finalizing, consider running:
|
|
294
|
-
- `skills/review/
|
|
295
|
-
- `skills/review/
|
|
296
|
-
- `skills/review/
|
|
294
|
+
- `skills/review/review-architecture` — if architecture changes detected
|
|
295
|
+
- `skills/review/review-logic` — for self-validation of findings
|
|
296
|
+
- `skills/review/review-frontend` — if store changes found
|
|
297
297
|
|
|
298
298
|
---
|
|
299
299
|
|
|
@@ -290,7 +290,7 @@ Recommended worker routing:
|
|
|
290
290
|
| `test` | `tests-creator` or `test-gen` |
|
|
291
291
|
| `implement` | `task-implementer` |
|
|
292
292
|
| `review` | `review-orchestrator` |
|
|
293
|
-
| `docs` | `
|
|
293
|
+
| `docs` | `prd-creator`, a documentation-specific project skill, or `keryx job document` to file a document in a job folder |
|
|
294
294
|
|
|
295
295
|
**Before the first `task-implementer` dispatch of the run:** when `review.jev.edit_guard` is on (`.metaproject/tasks.config.json`), confirm the guard is active — `keryx review jev-edit-guard status`, else `keryx review jev-edit-guard install` — and say why in one line.
|
|
296
296
|
|
|
@@ -988,7 +988,7 @@ journal line is the record.
|
|
|
988
988
|
`review-orchestrator` is the review path. It is not one strategy among several: it is
|
|
989
989
|
the only entry point that produces a **managed review record**, and every round this
|
|
990
990
|
skill runs is a round that must be citable afterwards. The legacy alternatives —
|
|
991
|
-
launching `code
|
|
991
|
+
launching a `code-*` profile (`code-learned-review`, or the retired ones) by hand, or the
|
|
992
992
|
never-bundled `code-review` 4-agent skill — are gone. They emitted prose into a chat
|
|
993
993
|
transcript and nothing else, which is precisely the failure the managed pipeline
|
|
994
994
|
replaced.
|
|
@@ -204,8 +204,8 @@ Rules `resolve-context` listed are already read (2.0c); load the rest by what yo
|
|
|
204
204
|
|
|
205
205
|
**Always load (all task types):**
|
|
206
206
|
- `tdd-workflow.mdc` — red-green-refactor, STATUS: DONE requires passing tests
|
|
207
|
-
- `error-handling.mdc` —
|
|
208
|
-
- `solid-principles.mdc` — SRP, OCP, DIP (load for any task that creates
|
|
207
|
+
- `error-handling.mdc` — failure signalled explicitly (throw by default, a discriminated result where callers branch), context and `cause` kept, no silent failures
|
|
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
|
|
|
210
210
|
**Load by task type:**
|
|
211
211
|
|
package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json
CHANGED
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
"reviewer": {
|
|
183
183
|
"type": "string",
|
|
184
184
|
"description": "Which review skill found this",
|
|
185
|
-
"examples": ["
|
|
185
|
+
"examples": ["review-logic", "review-frontend", "code-learned-review"]
|
|
186
186
|
},
|
|
187
187
|
"premise_verdict": {
|
|
188
188
|
"type": "string",
|
|
@@ -5,7 +5,7 @@ description: >
|
|
|
5
5
|
and produces comprehensive developer documentation without user involvement after initial setup.
|
|
6
6
|
Use when the user provides a repo path, asks to document existing code, or wants
|
|
7
7
|
onboarding docs, an API reference, or an architecture overview generated automatically.
|
|
8
|
-
NOT for: writing new PRDs or planning new features (use
|
|
8
|
+
NOT for: writing new PRDs or planning new features (use docpack-orchestrator).
|
|
9
9
|
triggers:
|
|
10
10
|
- "autodoc"
|
|
11
11
|
- "document codebase"
|
|
@@ -74,7 +74,7 @@ Launch 3 agents simultaneously:
|
|
|
74
74
|
3. **Next steps** — concrete action items
|
|
75
75
|
|
|
76
76
|
### Step 5: Discuss
|
|
77
|
-
Offer to go deeper on any option or
|
|
77
|
+
Offer to go deeper on any option or start `job-orchestrator` or `/prd-creator`.
|
|
78
78
|
|
|
79
79
|
## Quick Mode (--quick)
|
|
80
80
|
Skip agents. Inline: 3-5 options in table, score each, recommend one.
|
|
@@ -21,7 +21,7 @@ Proceed directly with your assigned task.
|
|
|
21
21
|
|
|
22
22
|
# Interview
|
|
23
23
|
|
|
24
|
-
Critical requirements interviewer that asks targeted clarifying questions before expensive operations begin. The goal is to eliminate ambiguity and gather precise context so downstream skills (job-orchestrator,
|
|
24
|
+
Critical requirements interviewer that asks targeted clarifying questions before expensive operations begin. The goal is to eliminate ambiguity and gather precise context so downstream skills (job-orchestrator, flow-orchestrator, prd-creator) produce accurate results.
|
|
25
25
|
|
|
26
26
|
## Input Contract
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@ When called by another skill (orchestrated mode):
|
|
|
31
31
|
"goal": "what needs to be done (issue title, feature description, task)",
|
|
32
32
|
"context": "collected context from context-collector or another agent",
|
|
33
33
|
"domain": "implement | review | design | migrate | custom",
|
|
34
|
-
"caller": "job-orchestrator |
|
|
34
|
+
"caller": "job-orchestrator | flow-orchestrator | user | prd-creator",
|
|
35
35
|
"known_facts": ["already known facts or decisions"],
|
|
36
36
|
"max_questions": null
|
|
37
37
|
}
|
|
@@ -143,7 +143,7 @@ After all questions are answered:
|
|
|
143
143
|
### Phase 5: Handoff
|
|
144
144
|
|
|
145
145
|
Return the output contract to the calling skill, or if standalone — ask what the user wants to do next:
|
|
146
|
-
- "Start implementing? I can run
|
|
146
|
+
- "Start implementing? I can run the `job-orchestrator` pipeline"
|
|
147
147
|
- "Create a PRD? I can run `/prd-creator`"
|
|
148
148
|
- "Need more brainstorming? Try `/brainstorm`"
|
|
149
149
|
|
|
@@ -168,7 +168,6 @@ Skip options when:
|
|
|
168
168
|
|
|
169
169
|
```
|
|
170
170
|
job-orchestrator → context-collector → interview → plan → execute
|
|
171
|
-
feature-dev → interview (Phase 1) → design → implement
|
|
172
171
|
prd-creator → interview → requirements document
|
|
173
172
|
```
|
|
174
173
|
|
|
@@ -52,7 +52,7 @@ blockers?: string[] — unresolved critical unknowns
|
|
|
52
52
|
|
|
53
53
|
## When to Use
|
|
54
54
|
|
|
55
|
-
- Called by `job-orchestrator
|
|
55
|
+
- Called by `job-orchestrator` and `brainstorm` at start of Phase 0
|
|
56
56
|
- Directly by user: `/interviewer <topic>` — runs context-collector first if no context provided
|
|
57
57
|
- When requirements are vague or ambiguous
|
|
58
58
|
|