peaks-loop 4.1.6 → 4.1.8
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +78 -0
- package/config/eslint/tsconfig.lint.json +1 -0
- package/dist/cli/commands/core/skill-registry-commands.js +9 -4
- package/dist/cli/commands/dispatch-from-dag.js +17 -0
- package/dist/cli/commands/job-commands.js +15 -5
- package/dist/cli/commands/lint-baseline-command.d.ts +15 -0
- package/dist/cli/commands/lint-baseline-command.js +64 -0
- package/dist/cli/commands/lint-commands.js +27 -51
- package/dist/cli/commands/request-command-options.d.ts +6 -0
- package/dist/cli/commands/request-commands.js +2 -0
- package/dist/cli/commands/request-mark-qa-initiated-command.d.ts +3 -0
- package/dist/cli/commands/request-mark-qa-initiated-command.js +80 -0
- package/dist/cli/commands/request-transition-failures.js +1 -0
- package/dist/cli/commands/reviewer-commands.d.ts +6 -6
- package/dist/cli/commands/reviewer-commands.js +154 -56
- package/dist/cli/commands/reviewer-config-commands.d.ts +9 -0
- package/dist/cli/commands/reviewer-config-commands.js +133 -0
- package/dist/services/artifacts/artifact-lint-service.js +102 -27
- package/dist/services/artifacts/artifact-prerequisites.d.ts +2 -0
- package/dist/services/artifacts/artifact-prerequisites.js +22 -110
- package/dist/services/artifacts/artifact-template-bodies.d.ts +7 -1
- package/dist/services/artifacts/artifact-template-bodies.js +14 -3
- package/dist/services/artifacts/artifact-templates.d.ts +6 -1
- package/dist/services/artifacts/artifact-templates.js +8 -5
- package/dist/services/artifacts/backcompat-acceptance.d.ts +66 -0
- package/dist/services/artifacts/backcompat-acceptance.js +222 -0
- package/dist/services/artifacts/prerequisite-checks.d.ts +42 -9
- package/dist/services/artifacts/prerequisite-checks.js +35 -11
- package/dist/services/artifacts/prerequisite-path-resolver.d.ts +39 -0
- package/dist/services/artifacts/prerequisite-path-resolver.js +110 -0
- package/dist/services/artifacts/qa-initiated-marker.d.ts +24 -0
- package/dist/services/artifacts/qa-initiated-marker.js +36 -0
- package/dist/services/artifacts/request-artifact-metadata.d.ts +9 -0
- package/dist/services/artifacts/request-artifact-metadata.js +9 -0
- package/dist/services/artifacts/request-artifact-service.js +6 -10
- package/dist/services/artifacts/request-artifact-state-helpers.d.ts +2 -1
- package/dist/services/artifacts/request-artifact-state-helpers.js +6 -3
- package/dist/services/dispatch/isolation-lease.d.ts +3 -2
- package/dist/services/dispatch/isolation-lease.js +15 -6
- package/dist/services/doctor/doctor-service/checks/backcompat-acceptance.d.ts +15 -0
- package/dist/services/doctor/doctor-service/checks/backcompat-acceptance.js +53 -0
- package/dist/services/doctor/doctor-service/checks/skill-reference-parity.d.ts +38 -0
- package/dist/services/doctor/doctor-service/checks/skill-reference-parity.js +243 -0
- package/dist/services/doctor/doctor-service/plugin-registry.js +4 -0
- package/dist/services/doctor/doctor-service/types.d.ts +12 -0
- package/dist/services/job/subagent-job-wrapper.d.ts +20 -7
- package/dist/services/job/subagent-job-wrapper.js +53 -5
- package/dist/services/lint/eslint-report.d.ts +19 -0
- package/dist/services/lint/eslint-report.js +60 -0
- package/dist/services/lint/eslint-runner-support.d.ts +18 -1
- package/dist/services/lint/eslint-runner-support.js +35 -2
- package/dist/services/lint/eslint-runner-types.d.ts +21 -1
- package/dist/services/lint/eslint-runner.js +43 -33
- package/dist/services/prd/gate-evidence-derivation.d.ts +2 -4
- package/dist/services/prd/gate-evidence-derivation.js +3 -1
- package/dist/services/qa/bdd-test-style-contract.d.ts +17 -0
- package/dist/services/qa/bdd-test-style-contract.js +41 -0
- package/dist/services/qa/bdd-test-style-verifier.d.ts +9 -6
- package/dist/services/qa/bdd-test-style-verifier.js +24 -37
- package/dist/services/rd/reviewer-dispatch-policy.d.ts +18 -14
- package/dist/services/rd/reviewer-dispatch-policy.js +14 -11
- package/dist/services/release/release-state.js +20 -5
- package/dist/services/reviewer/model-family.js +1 -1
- package/dist/services/reviewer/reviewer-artifacts.d.ts +12 -0
- package/dist/services/reviewer/reviewer-artifacts.js +67 -0
- package/dist/services/reviewer/reviewer-config-write.d.ts +18 -0
- package/dist/services/reviewer/reviewer-config-write.js +71 -0
- package/dist/services/reviewer/reviewer-config.d.ts +33 -5
- package/dist/services/reviewer/reviewer-config.js +102 -46
- package/dist/services/reviewer/reviewer-envelopes.d.ts +8 -0
- package/dist/services/reviewer/reviewer-envelopes.js +53 -0
- package/dist/services/reviewer/reviewer-service.d.ts +7 -4
- package/dist/services/reviewer/reviewer-service.js +46 -52
- package/dist/services/reviewer/reviewer-types.d.ts +9 -1
- package/dist/services/session/getSessionDir.js +16 -7
- package/dist/services/web/daemon-registry.d.ts +6 -4
- package/dist/services/web/daemon-registry.js +92 -17
- package/dist/services/workflow/pipeline-verify-gate-support.d.ts +4 -1
- package/dist/services/workflow/pipeline-verify-gate-support.js +8 -79
- package/dist/services/workflow/pipeline-verify-rd-phase.d.ts +67 -0
- package/dist/services/workflow/pipeline-verify-rd-phase.js +122 -0
- package/dist/services/workflow/pipeline-verify-service.js +16 -17
- package/dist/services/workspace/workspace-service.js +4 -16
- package/package.json +5 -5
- package/schemas/doctor-report.schema.json +2 -2
- package/schemas/reviewer-envelope.schema.json +1 -1
- package/skills/bee/peaks-reviewer/SKILL.md +20 -4
- package/skills/bee/peaks-reviewer/references/reviewer-schema.md +12 -7
- package/skills/bee/peaks-security-audit/SKILL.md +20 -0
|
@@ -72,11 +72,23 @@ If the distinctness check fails, the CI gate fails. See `references/reviewer-sch
|
|
|
72
72
|
## CLI surface
|
|
73
73
|
|
|
74
74
|
```
|
|
75
|
-
peaks reviewer
|
|
75
|
+
peaks reviewer config --provider <name:model> --provider <name:model> [options]
|
|
76
|
+
peaks reviewer run --rid <rid> [--write] [--session-id <id>] [--json]
|
|
76
77
|
peaks reviewer status [--json]
|
|
77
78
|
```
|
|
78
79
|
|
|
79
|
-
`
|
|
80
|
+
`config` writes the `reviewer` section to `~/.peaks/config.json` — the LLM
|
|
81
|
+
runs it on the user's behalf; nobody hand-authors JSON. It refuses a section
|
|
82
|
+
with fewer than two dispatchable providers (`ollama` / `anthropic` / `openai`).
|
|
83
|
+
|
|
84
|
+
`run --write` produces `rd/third-party-review-<rid>.json` (the validated envelope)
|
|
85
|
+
and the human-readable `rd/third-party-review-<rid>.md` under
|
|
86
|
+
`.peaks/_runtime/<sessionId>/rd/`. It writes **nothing** on a skip and
|
|
87
|
+
reports why: a skip is `passed: false` + `gateAction: 'warn'`, never a pass.
|
|
88
|
+
|
|
89
|
+
`status` reports one of three states — `no-section`, `insufficient-providers`
|
|
90
|
+
(naming the count and the >=2 requirement), or `configured` — and carries the
|
|
91
|
+
fix command in `nextActions`.
|
|
80
92
|
|
|
81
93
|
## Configuration (`~/.peaks/config.json`)
|
|
82
94
|
|
|
@@ -97,7 +109,11 @@ peaks reviewer status [--json]
|
|
|
97
109
|
}
|
|
98
110
|
```
|
|
99
111
|
|
|
100
|
-
Missing section: reviewer is skipped
|
|
112
|
+
Missing section: reviewer is skipped. The skip envelope records
|
|
113
|
+
`passed: false` + `gateAction: 'warn'` plus `skipped: no-reviewer-config` in
|
|
114
|
+
`reason` — it is never reported as a pass. Per A4.1, the CLI flag
|
|
115
|
+
`--reviewer-model` is REMOVED; configuration goes through
|
|
116
|
+
`peaks reviewer config`.
|
|
101
117
|
|
|
102
118
|
## Hard prohibitions
|
|
103
119
|
|
|
@@ -108,7 +124,7 @@ Missing section: reviewer is skipped (transition still passes; envelope records
|
|
|
108
124
|
|
|
109
125
|
## Sub-agent dispatch (when launched by peaks-code swarm)
|
|
110
126
|
|
|
111
|
-
When this skill runs as a sub-agent dispatched by peaks-code, the sub-agent receives the parent session id and change-id via envelope. It MUST write its output to `.peaks/_runtime/<sessionId>/rd/third-party-review
|
|
127
|
+
When this skill runs as a sub-agent dispatched by peaks-code, the sub-agent receives the parent session id and change-id via envelope. It MUST write its output to `.peaks/_runtime/<sessionId>/rd/third-party-review-<rid>.json` + `.md` and return a compact JSON envelope.
|
|
112
128
|
|
|
113
129
|
## L2 surface reference (post rid-l2-extended)
|
|
114
130
|
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
| `reviewerId` | string | yes | Stable id (`third-party-reviewer-v2.14.0`). |
|
|
11
11
|
| `modelId` | string | yes | Concrete model id (overwritten server-side from the provider we called). |
|
|
12
12
|
| `modelFamily`| string | yes | Family bucket (overwritten server-side via `deriveModelFamily(modelId)`). |
|
|
13
|
-
| `passed` | bool | yes | True when no blocking violations. |
|
|
13
|
+
| `passed` | bool | yes | True only when a review RAN and found no blocking violations. False on every skip path. |
|
|
14
14
|
| `violations` | array | yes | `[{kind, file, line, hint}]`. Empty when none. |
|
|
15
|
-
| `gateAction` | enum | yes | `block` | `allow` | `warn`. |
|
|
15
|
+
| `gateAction` | enum | yes | `block` | `allow` | `warn`. A skip is `warn`, never `allow`. |
|
|
16
16
|
| `reason` | string | yes | One-sentence rationale. |
|
|
17
17
|
|
|
18
18
|
## Violation kinds (closed enum)
|
|
@@ -28,22 +28,27 @@
|
|
|
28
28
|
|
|
29
29
|
## Distinctness gate (AC-4.4)
|
|
30
30
|
|
|
31
|
-
`third-party-review
|
|
31
|
+
`third-party-review-<rid>.json.modelFamily` MUST differ from `karpathy-review.json.modelFamily`. Equality fails the build. The reviewer service stamps `modelFamily` from the actual `modelId` (the LLM cannot self-report a different family).
|
|
32
32
|
|
|
33
33
|
## Skipped envelope
|
|
34
34
|
|
|
35
|
-
When `~/.peaks/config.json` lacks the `reviewer` section
|
|
35
|
+
When `~/.peaks/config.json` lacks the `reviewer` section (or has fewer than
|
|
36
|
+
two usable providers), the reviewer returns:
|
|
36
37
|
|
|
37
38
|
```json
|
|
38
39
|
{
|
|
39
40
|
"reviewerId": "third-party-reviewer-v2.14.0",
|
|
40
41
|
"modelId": "skipped",
|
|
41
42
|
"modelFamily": "skipped",
|
|
42
|
-
"passed":
|
|
43
|
+
"passed": false,
|
|
43
44
|
"violations": [],
|
|
44
|
-
"gateAction": "
|
|
45
|
+
"gateAction": "warn",
|
|
45
46
|
"reason": "skipped: no-reviewer-config (fallbackOnError=skip)"
|
|
46
47
|
}
|
|
47
48
|
```
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
A skip is not a pass: `passed` is `false` and `gateAction` is `warn`, so no
|
|
51
|
+
consumer reading those two fields sees green. `peaks reviewer run --write`
|
|
52
|
+
refuses to write `rd/third-party-review-<rid>.md` / `.json` from a skipped
|
|
53
|
+
envelope — the artifact exists only when a review actually ran. The
|
|
54
|
+
THIRD_PARTY_REVIEW prereq records the skip in `prerequisites.warnings`.
|
|
@@ -155,6 +155,26 @@ hash in the artifact, and `rd:qa-handoff` re-hashes them, so a declared path edi
|
|
|
155
155
|
refuses that transition. **Declare what you judged, not what you touched** — the check can tell
|
|
156
156
|
that a declared path moved, and it cannot tell that an undeclared one did.
|
|
157
157
|
|
|
158
|
+
#### Where the audit loop terminates (BLOCKING discipline)
|
|
159
|
+
|
|
160
|
+
The content-hash binding is intentional: **any** later edit to a judged path — including a
|
|
161
|
+
comment-only edit — invalidates the audit, and the transition refuses until the audit is re-run.
|
|
162
|
+
That is the correct behaviour, and it is also an unbounded loop if the audit's own findings are
|
|
163
|
+
fixed after it runs: fixing a finding edits a judged path, which invalidates the audit, whose
|
|
164
|
+
re-run can surface the next finding. Nothing in the CLI can bound this; the skill must:
|
|
165
|
+
|
|
166
|
+
1. **Freeze `src/` before the audit.** The audit is the **last** producer step, not a mid-slice
|
|
167
|
+
reviewer. Do not run it, then edit code, then run it again by default.
|
|
168
|
+
2. **A re-run is required, never optional.** After a post-audit edit, the artifact is stale — the
|
|
169
|
+
transition will refuse, and no hand-editing of `## Judged content` is a substitute (the
|
|
170
|
+
declaration is written by `run`, and hand-authoring it fails §11.1).
|
|
171
|
+
3. **Record the remaining findings as accepted residuals.** A finding that survives the frozen
|
|
172
|
+
diff is a decision, not a blocker: put it in the backlog / handoff residuals with the reason it
|
|
173
|
+
was accepted. Do not spend a second audit on comment text.
|
|
174
|
+
4. **If a finding must be fixed, fix everything the re-run will judge in one pass,** then run the
|
|
175
|
+
audit exactly once more. Two audits are the normal ceiling for a slice; a third means the
|
|
176
|
+
freeze step was skipped.
|
|
177
|
+
|
|
158
178
|
The artifact body has the required sections per `.peaks/project-scan/audit-output-schema.md`:
|
|
159
179
|
|
|
160
180
|
- `## Summary` — 1-paragraph narrative
|