@mrciphersmith/keryx 0.3.120 → 0.3.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/cli.js +8511 -7282
  2. package/dist/core.js +954 -791
  3. package/package.json +1 -1
  4. package/src/gdskills/bundled/install-manifest.json +2 -1
  5. package/src/gdskills/bundled/rules/core/session-plan-bridge.mdc +1 -1
  6. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.md +4 -4
  7. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +8 -17
  8. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.detail.md +70 -0
  9. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +36 -73
  10. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +1 -1
  11. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +17 -2
  12. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +6 -11
  13. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +6 -11
  14. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +6 -11
  15. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +5 -10
  16. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +5 -10
  17. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +6 -11
  18. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +5 -10
  19. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +6 -11
  20. package/src/gdskills/bundled/skills/review/review-jev-comments/SKILL.md +4 -9
  21. package/src/gdskills/bundled/skills/review/review-jev-contract/SKILL.md +4 -9
  22. package/src/gdskills/bundled/skills/review/review-jev-docs/SKILL.md +4 -9
  23. package/src/gdskills/bundled/skills/review/review-jev-risk/SKILL.md +4 -9
  24. package/src/gdskills/bundled/skills/review/review-jev-rules/SKILL.md +4 -9
  25. package/src/gdskills/bundled/skills/review/review-jev-scenarios/SKILL.md +4 -9
  26. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +8 -9
  27. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +6 -11
  28. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +25 -2
  29. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +34 -44
  30. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +1 -1
  31. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +6 -11
  32. package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +2 -2
  33. package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +8 -10
  34. package/src/gdskills/bundled/skills/review/review-premise/SKILL.md +180 -0
  35. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +3 -3
  36. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +6 -11
  37. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +6 -11
  38. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +2 -2
  39. package/src/gdskills/contracts/review-finding.schema.json +63 -0
@@ -23,7 +23,7 @@ license: "MIT"
23
23
 
24
24
  ## Purpose
25
25
 
26
- Finds exploitable security vulnerabilities introduced in the changed code of the current branch. Covers injection, auth/authz gaps, IDOR, secrets, insecure crypto, CSRF, path traversal, and framework-specific patterns (NestJS, React). Produces findings with explicit attack vectors and concrete fixes. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`.
26
+ Finds exploitable security vulnerabilities introduced in the changed code of the current branch. Covers injection, auth/authz gaps, IDOR, secrets, insecure crypto, CSRF, path traversal, and framework-specific patterns (NestJS, React). Produces findings with explicit attack vectors and concrete fixes. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
27
27
 
28
28
  This skill covers **code-level security only**. It does NOT audit npm/bun dependency trees, Docker configurations, or deployment surfaces — use `security-audit` for those.
29
29
 
@@ -67,7 +67,7 @@ See shared script: `.metaproject/skills/gdskills/shared/git-merge-base.md`
67
67
 
68
68
  Run the script from that file to determine `MERGE_BASE` (`BASE_SHA`) and `SCOPE` before proceeding.
69
69
 
70
- **Supplied text first.** When the payload carries `slices`, `context_files`, `diff` or `file_contents`, review exactly that text: a read-only child has no shell, so run no git command and never rebuild the diff. Only with none supplied, collect it:
70
+ **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:
71
71
  ```bash
72
72
  git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files --others --exclude-standard
73
73
  # explicit range: <FROM_SHA>..<TO_SHA> in place of "${BASE_SHA}"
@@ -201,15 +201,10 @@ Attack vector template: _"Attacker sends `filename=../../etc/passwd`, reading ar
201
201
 
202
202
  ### Shared laws (every reviewer)
203
203
 
204
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot
205
- name the input, call, or condition that reaches the code, you have an
206
- observation, not a finding. Report it as `info` and say what would settle it.
207
- 2. **Never flag the theoretical.** The path you describe must exist in the code
208
- under review. Do not report a safe API because it could be misused, or a
209
- pattern because it is often wrong elsewhere.
210
- 3. **One finding per class, not one per occurrence.** When the same shape appears
211
- at several sites, report it once and list every site. Ten findings that are one
212
- finding hide the other nine problems.
204
+ 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
205
+ 2. **Never flag the theoretical.** The path you describe must exist in the code under review. Do not report a safe API because it could be misused, or a pattern because it is often wrong elsewhere.
206
+ 3. **One finding per class, not one per occurrence.** When the same shape appears at several sites, report it once and list every site. Ten findings that are one finding hide the other nine problems.
207
+ 4. **A deliberate choice is not a defect until its reason is read and shown wrong.** An explicit override, suppression or exemption, a comment or commit giving a reason, or a sibling doing the same is a decision: read its reason (the comment, `git log -L` or `git blame`, the sibling) before you report it, and report it only when you can show that reason wrong. A project rule is checked against accepted platform practice and its known exceptions before a deviation from it is reported.
213
208
 
214
209
  Severity levels are defined once, in `review-orchestrator/SKILL.md` →
215
210
  **Severity (canonical)**. This reviewer does not restate them: `blocker` is the
@@ -25,7 +25,7 @@ license: "MIT"
25
25
 
26
26
  Focused style reviewer. Covers naming conventions, dead code, readability, DRY violations,
27
27
  import organization, comment quality, file length, cyclomatic complexity, and console noise.
28
- Never touches logic correctness, architecture, security, or performance. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`.
28
+ Never touches logic correctness, architecture, security, or performance. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs no command unless its payload's `allowed_tools` says `run-tests`, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
29
29
 
30
30
  ---
31
31
 
@@ -66,7 +66,7 @@ Run that script to determine `BASE_SHA` before collecting the diff.
66
66
 
67
67
  Only review code changed in scope. Do not flag style issues in lines outside the diff.
68
68
 
69
- **Supplied text first.** When the payload carries `slices`, `context_files`, `diff` or `file_contents`, review exactly that text: a read-only child has no shell, so run no git command and never rebuild the diff. Only with none supplied, collect it:
69
+ **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
70
  ```bash
71
71
  git diff --name-status "${BASE_SHA}" && git diff "${BASE_SHA}" && git ls-files --others --exclude-standard
72
72
  # explicit range: <FROM_SHA>..<TO_SHA> in place of "${BASE_SHA}"
@@ -195,15 +195,10 @@ Do not flag DRY violations for code outside the diff even if legacy duplication
195
195
 
196
196
  ### Shared laws (every reviewer)
197
197
 
198
- 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot
199
- name the input, call, or condition that reaches the code, you have an
200
- observation, not a finding. Report it as `info` and say what would settle it.
201
- 2. **Never flag the theoretical.** The path you describe must exist in the code
202
- under review. Do not report a safe API because it could be misused, or a
203
- pattern because it is often wrong elsewhere.
204
- 3. **One finding per class, not one per occurrence.** When the same shape appears
205
- at several sites, report it once and list every site. Ten findings that are one
206
- finding hide the other nine problems.
198
+ 1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
199
+ 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.
200
+ 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.
201
+ 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.
207
202
 
208
203
  Severity levels are defined once, in `review-orchestrator/SKILL.md` →
209
204
  **Severity (canonical)**. This reviewer does not restate them: `blocker` is the
@@ -28,8 +28,7 @@ license: "MIT"
28
28
 
29
29
  # Review — Testing Practices
30
30
 
31
- Reviewer for local testing discipline. Read project test guides first when present, then apply
32
- the neutral baseline below. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs the tests only when its payload's `allowed_tools` says `run-tests`, within `exec_budget_s`; otherwise it runs no command.
31
+ Reviewer for local testing discipline. Read project test guides first when present, then apply the neutral baseline below. Its inputs are the reviewer payload only; session memory and earlier conversation are not inputs. It runs the tests only when its payload's `allowed_tools` says `run-tests`, within `exec_budget_s`; otherwise it runs no command, except the read-only `git log`, `git blame` and `git show` where its host gives a read-only child git (keryx shell does not: there the payload supplies the history).
33
32
 
34
33
  ---
35
34
 
@@ -195,6 +194,7 @@ pass, then work the checklist.
195
194
  1. **A claim of runtime harm with no reproducible path is `info`.** If you cannot name the input, call, or condition that reaches the code, you have an observation, not a finding. Report it as `info` and say what would settle it.
196
195
  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.
197
196
  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.
197
+ 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.
198
198
 
199
199
  Severity levels are defined once, in `review-orchestrator/SKILL.md` → **Severity (canonical)**. This reviewer does not restate them: `blocker` is the four merge-blocking shapes named there and nothing else, and the `major`/`minor` boundary is the trigger-and-outcome test.
200
200
 
@@ -115,6 +115,69 @@
115
115
  "description": "Reasoning alone produces no new evidence, so it can never reach `confirmed` (AC7). It cannot reach `refuted` either, and that extension is deliberate: `refuted` is the only verdict with a destructive consequence, so granting it to the weakest method would reinstate review-strict with the sign flipped. Anything checkable is `site-check` or `execution`; `reasoning` is what is left when nothing was run."
116
116
  }
117
117
  },
118
+ "premise": {
119
+ "title": "What the premise judge found when it asked whether this finding's request is right",
120
+ "description": "Flow 459. Declared HERE and deliberately NOT in the bundled reviewer-finding.schema.json, on the same basis as `verification`: the reviewer that raised a finding is the one actor that may not judge its premise. The verifier asks whether the facts hold; the premise judge asks whether the request is right (an explicit override, an exemption, a sibling doing the same and accepted platform practice are all evidence that a flagged shape is a deliberate choice). `challenged` and `owner-decision` HOLD the finding: it is not an open blocker or major and is not passed to a fixer until the operator answers. The judge is delete-only: it never adds a finding, never raises a severity and never edits the finding's text; `downgraded` carries a strictly lower `severity` (`major` or `minor`: a downgrade stops at the fix-loop threshold), which is then also the finding's own. One source of truth each: the finding's own `severity` wins over a `premise.severity` that disagrees (ingest aligns them), and the operator's answer is the `premise-question` decision in the package's operator-decisions.json; `premise.operator` is only its audit trail on the record, and ingest strips it from any finding it receives. The schema states the per-verdict fields below; that a downgrade is STRICTLY lower than the original is checked in code (src/review/premise.ts). Absent means nobody judged.",
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": ["verdict", "judge"],
124
+ "properties": {
125
+ "verdict": { "type": "string", "enum": ["upheld", "downgraded", "challenged", "owner-decision"] },
126
+ "judge": { "type": "string", "minLength": 1 },
127
+ "model": { "type": "string", "minLength": 1 },
128
+ "severity": { "type": "string", "enum": ["major", "minor"], "description": "`downgraded` only: the lower severity, also the finding's own. Never `info`: a downgrade stops at `minor`, the fix-loop threshold." },
129
+ "original_severity": { "type": "string", "enum": ["blocker", "major"], "description": "`downgraded` only: what the reviewer reported." },
130
+ "intent_signals": {
131
+ "type": "array",
132
+ "items": {
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": ["ref", "says"],
136
+ "properties": { "ref": { "type": "string", "minLength": 1 }, "says": { "type": "string", "minLength": 1 } }
137
+ }
138
+ },
139
+ "practice_sources": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "required": ["name", "says"],
145
+ "properties": { "name": { "type": "string", "minLength": 1 }, "says": { "type": "string", "minLength": 1 } }
146
+ }
147
+ },
148
+ "reasoning": { "type": "string" },
149
+ "question": { "type": "string", "minLength": 1, "description": "`challenged` and `owner-decision`: what the operator is asked." },
150
+ "options": { "type": "array", "minItems": 2, "items": { "type": "string", "minLength": 1 } },
151
+ "operator": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": ["answer", "reason", "at", "actor"],
155
+ "description": "The operator's answer once applied to the record (`keryx review decide-premise`, the `review_decide_premise` card). An audit trail: the answer counts only from the package's operator-decisions.json, and ingest strips this field from input findings.",
156
+ "properties": {
157
+ "answer": { "type": "string", "enum": ["uphold", "dismiss"] },
158
+ "reason": { "type": "string", "minLength": 1 },
159
+ "quote": { "type": "string", "minLength": 1, "description": "The operator's own words: what they typed at the terminal, or the card text they said yes to." },
160
+ "at": { "type": "string", "minLength": 1 },
161
+ "actor": { "type": "string", "minLength": 1 },
162
+ "confirmedVia": { "type": "string", "enum": ["tui-card", "remote-card", "terminal"] }
163
+ }
164
+ }
165
+ },
166
+ "allOf": [
167
+ {
168
+ "if": { "required": ["verdict"], "properties": { "verdict": { "const": "downgraded" } } },
169
+ "then": { "required": ["severity", "original_severity"] }
170
+ },
171
+ {
172
+ "if": { "required": ["verdict"], "properties": { "verdict": { "enum": ["challenged", "owner-decision"] } } },
173
+ "then": { "required": ["question"] }
174
+ },
175
+ {
176
+ "if": { "required": ["verdict"], "properties": { "verdict": { "const": "owner-decision" } } },
177
+ "then": { "required": ["options"] }
178
+ }
179
+ ]
180
+ },
118
181
  "severity": { "type": "string", "enum": ["blocker", "major", "minor", "info"] },
119
182
  "repo": {
120
183
  "type": ["string", "null"],