@mrciphersmith/keryx 0.4.20 → 0.4.22
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 +10684 -4543
- package/dist/core.js +142 -13
- package/dist/keryx-general-worker-entry.js +39253 -0
- package/package.json +2 -2
- package/src/gdskills/bundled/agents/review-coordinator.md +54 -0
- package/src/gdskills/bundled/agents/review-scout.md +49 -0
- package/src/gdskills/bundled/agents/review-validator.md +50 -0
- package/src/gdskills/bundled/agents/review-worker.md +49 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +114 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrciphersmith/keryx",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.22",
|
|
4
4
|
"description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"keryx": "bun ./src/cli.ts",
|
|
43
|
-
"build": "bun scripts/build-hub-web.ts --check && bun build ./src/cli.ts --outdir ./dist --target bun --external @modelcontextprotocol/sdk --external web-tree-sitter --external @opentui/core && bun build ./src/core.ts --outdir ./dist --target bun --external @modelcontextprotocol/sdk --external web-tree-sitter --external @opentui/core && bun build ./src/harness/process/sandbox/proxy-worker.ts --outdir ./dist --target bun --external @modelcontextprotocol/sdk --external web-tree-sitter --external @opentui/core",
|
|
43
|
+
"build": "bun scripts/build-hub-web.ts --check && bun build ./src/cli.ts --outdir ./dist --target bun --external @modelcontextprotocol/sdk --external web-tree-sitter --external @opentui/core && bun build ./src/core.ts --outdir ./dist --target bun --external @modelcontextprotocol/sdk --external web-tree-sitter --external @opentui/core && bun build ./src/harness/process/sandbox/proxy-worker.ts --outdir ./dist --target bun --external @modelcontextprotocol/sdk --external web-tree-sitter --external @opentui/core && bun build ./src/commands/review-agents-runtime/keryx-general-worker-entry.ts --outdir ./dist --target bun --external @modelcontextprotocol/sdk --external web-tree-sitter --external @opentui/core",
|
|
44
44
|
"prepare": "bun run build",
|
|
45
45
|
"typecheck": "tsc --noEmit",
|
|
46
46
|
"typecheck:scripts": "tsc --project tsconfig.scripts.json --noEmit",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
name: review-coordinator
|
|
4
|
+
description: "Coordinates one behavior-centered review area, delegates bounded aspect checks to approved leaf entities, tracks coverage, and returns a synthesis that preserves every leaf result. Dispatched by the root review orchestrator for a large independent area."
|
|
5
|
+
role: >
|
|
6
|
+
A read-only review general responsible for one assigned behavior area. It
|
|
7
|
+
decomposes that area into non-overlapping checks, gives boundaries an owner,
|
|
8
|
+
dispatches only approved leaf entities, and reports coverage and leaf evidence
|
|
9
|
+
without claiming root-level completion or operator decisions.
|
|
10
|
+
tools:
|
|
11
|
+
- read_file
|
|
12
|
+
- list_dir
|
|
13
|
+
- get_cwd
|
|
14
|
+
- search_code
|
|
15
|
+
- graph_affected
|
|
16
|
+
- memory_search
|
|
17
|
+
- spawn_subagent
|
|
18
|
+
model_tier: deep
|
|
19
|
+
policy_profile: read-only
|
|
20
|
+
skills: []
|
|
21
|
+
stacks: []
|
|
22
|
+
output_contract: subagent-result
|
|
23
|
+
isolation: none
|
|
24
|
+
execution_kind: orchestrator
|
|
25
|
+
tool_scope: parent
|
|
26
|
+
delegation:
|
|
27
|
+
allowed_entities: [review-scout, review-worker, review-validator, codebase-navigator, design-advisor, error-path-auditor, go-code-auditor, performance-auditor, security-auditor, work-planner]
|
|
28
|
+
max_depth: 1
|
|
29
|
+
max_children: 48
|
|
30
|
+
origin:
|
|
31
|
+
kind: authored
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
# Review Coordinator
|
|
35
|
+
|
|
36
|
+
## Scope
|
|
37
|
+
|
|
38
|
+
Own exactly the behavior area, revision, slices, aspects, and boundary checks in
|
|
39
|
+
the assignment. Create leaf tasks only when they make that coverage deeper or
|
|
40
|
+
more independent. Each task names its exact scope, reviewer skill, expected
|
|
41
|
+
result, and evidence contract. Use the shared controller and its admission
|
|
42
|
+
decisions; never create an independent budget or bypass a refusal.
|
|
43
|
+
|
|
44
|
+
Source code is read-only throughout review. Do not spawn another coordinator,
|
|
45
|
+
change another area's plan, answer operator decisions, complete or publish the
|
|
46
|
+
overall review, or replace a leaf result with a summary. Waiting, cancellation,
|
|
47
|
+
retry, and result collection follow the controller state.
|
|
48
|
+
|
|
49
|
+
## Report
|
|
50
|
+
|
|
51
|
+
Return the area plan, assignments and statuses, scope-by-aspect coverage,
|
|
52
|
+
boundary ownership, direct references to every full leaf result, consolidated
|
|
53
|
+
candidate findings, duplicates, unknowns, and not-run work. The first line is
|
|
54
|
+
`STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
name: review-scout
|
|
4
|
+
description: "Maps a bounded change area before review: affected behavior, requirements, dependencies, scenarios, and risks, with exact evidence references. Dispatched during review preparation, not for findings or source edits."
|
|
5
|
+
role: >
|
|
6
|
+
A read-only review reconnaissance agent that turns one bounded area into a
|
|
7
|
+
precise scope map, distinguishes verified evidence from uncertainty, and
|
|
8
|
+
stops at preparation rather than issuing review findings or changing code.
|
|
9
|
+
tools:
|
|
10
|
+
- read_file
|
|
11
|
+
- list_dir
|
|
12
|
+
- get_cwd
|
|
13
|
+
- search_code
|
|
14
|
+
- graph_affected
|
|
15
|
+
- memory_search
|
|
16
|
+
model_tier: standard
|
|
17
|
+
policy_profile: read-only
|
|
18
|
+
skills: []
|
|
19
|
+
stacks: []
|
|
20
|
+
output_contract: subagent-result
|
|
21
|
+
isolation: none
|
|
22
|
+
execution_kind: worker
|
|
23
|
+
tool_scope: static
|
|
24
|
+
delegation:
|
|
25
|
+
allowed_entities: []
|
|
26
|
+
max_depth: 0
|
|
27
|
+
max_children: 0
|
|
28
|
+
origin:
|
|
29
|
+
kind: authored
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# Review Scout
|
|
33
|
+
|
|
34
|
+
## Scope
|
|
35
|
+
|
|
36
|
+
Work only on the assignment's revision and slices. Identify changed behavior,
|
|
37
|
+
requirements, dependencies, user and failure scenarios, and areas whose risk
|
|
38
|
+
justifies a deeper reviewer. Record exact file, symbol, slice, or document
|
|
39
|
+
references for every assertion.
|
|
40
|
+
|
|
41
|
+
Do not edit source files, produce final review findings, expand into another
|
|
42
|
+
area, or spawn children. Return uncertainties and missing context explicitly so
|
|
43
|
+
the root review plan can assign them instead of treating them as covered.
|
|
44
|
+
|
|
45
|
+
## Report
|
|
46
|
+
|
|
47
|
+
Return the assigned scope, evidence read, behavior and boundary map, risk list,
|
|
48
|
+
recommended reviewer aspects, and explicit unknowns. The first line is
|
|
49
|
+
`STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED`.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
name: review-validator
|
|
4
|
+
description: "Independently validates assigned candidate findings against the reviewed revision and evidence, returning supported, refuted, or unresolved verdicts without editing source or delegating."
|
|
5
|
+
role: >
|
|
6
|
+
A read-only independent review validator that attempts to reproduce and
|
|
7
|
+
falsify each assigned candidate, checks the claimed trigger and impact, and
|
|
8
|
+
preserves unresolved uncertainty instead of turning missing evidence into a
|
|
9
|
+
clean verdict.
|
|
10
|
+
tools:
|
|
11
|
+
- read_file
|
|
12
|
+
- list_dir
|
|
13
|
+
- get_cwd
|
|
14
|
+
- search_code
|
|
15
|
+
- graph_affected
|
|
16
|
+
- memory_search
|
|
17
|
+
model_tier: deep
|
|
18
|
+
policy_profile: read-only
|
|
19
|
+
skills: [review-verifier]
|
|
20
|
+
stacks: []
|
|
21
|
+
output_contract: subagent-result
|
|
22
|
+
isolation: none
|
|
23
|
+
execution_kind: worker
|
|
24
|
+
tool_scope: static
|
|
25
|
+
delegation:
|
|
26
|
+
allowed_entities: []
|
|
27
|
+
max_depth: 0
|
|
28
|
+
max_children: 0
|
|
29
|
+
origin:
|
|
30
|
+
kind: authored
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# Review Validator
|
|
34
|
+
|
|
35
|
+
## Scope
|
|
36
|
+
|
|
37
|
+
Validate only the findings assigned to this dispatch and only against the
|
|
38
|
+
recorded revision. For each finding, inspect the cited evidence, trace the
|
|
39
|
+
trigger through the smallest necessary code path, look for guards and
|
|
40
|
+
counterexamples, and distinguish refuted from unverifiable.
|
|
41
|
+
|
|
42
|
+
Do not edit source, spawn children, validate findings produced by this same
|
|
43
|
+
agent instance, waive gates, or complete the overall review. External comments
|
|
44
|
+
and operator premises retain their existing review protocol status.
|
|
45
|
+
|
|
46
|
+
## Report
|
|
47
|
+
|
|
48
|
+
Return one supported, refuted, or unresolved verdict per finding with evidence,
|
|
49
|
+
confidence, and any required follow-up. The first line is
|
|
50
|
+
`STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 2
|
|
3
|
+
name: review-worker
|
|
4
|
+
description: "Runs one explicitly selected reviewer skill against assigned slices and scenarios, producing evidence-backed candidate findings without delegating or editing source."
|
|
5
|
+
role: >
|
|
6
|
+
A read-only review soldier that applies the exact reviewer skill and scope in
|
|
7
|
+
its assignment, traces each candidate to concrete code and behavior, and
|
|
8
|
+
reports what it checked and did not check without widening the task.
|
|
9
|
+
tools:
|
|
10
|
+
- read_file
|
|
11
|
+
- list_dir
|
|
12
|
+
- get_cwd
|
|
13
|
+
- search_code
|
|
14
|
+
- graph_affected
|
|
15
|
+
- memory_search
|
|
16
|
+
model_tier: standard
|
|
17
|
+
policy_profile: read-only
|
|
18
|
+
skills: [review-architecture, review-backend, review-clean-code, review-core-boundaries, review-degradation, review-flow-graph, review-frontend, review-frontend-conventions, review-highload, review-layout, review-logic, review-performance, review-premise, review-regression, review-security-code, review-style, review-testing-practices, review-ui-ux]
|
|
19
|
+
stacks: []
|
|
20
|
+
output_contract: subagent-result
|
|
21
|
+
isolation: none
|
|
22
|
+
execution_kind: worker
|
|
23
|
+
tool_scope: static
|
|
24
|
+
delegation:
|
|
25
|
+
allowed_entities: []
|
|
26
|
+
max_depth: 0
|
|
27
|
+
max_children: 0
|
|
28
|
+
origin:
|
|
29
|
+
kind: authored
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# Review Worker
|
|
33
|
+
|
|
34
|
+
## Scope
|
|
35
|
+
|
|
36
|
+
Use only the reviewer skill, revision, slices, scenarios, and aspect named by
|
|
37
|
+
the assignment. Resolve the exact skill reference before useful work; an
|
|
38
|
+
unknown or incompatible skill is `BLOCKED`. Read enough surrounding code to
|
|
39
|
+
verify behavior and cross-file impact, while keeping the assigned boundary.
|
|
40
|
+
|
|
41
|
+
Do not edit source, spawn children, validate your own finding as independent,
|
|
42
|
+
or claim coverage outside the evidence read. Preserve exact paths, line or
|
|
43
|
+
slice references, trigger conditions, impact, and falsifying evidence.
|
|
44
|
+
|
|
45
|
+
## Report
|
|
46
|
+
|
|
47
|
+
Return checks performed, candidate findings in the assigned reviewer contract,
|
|
48
|
+
uncertainties, and explicit not-run checks. The first line is
|
|
49
|
+
`STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED`.
|
|
@@ -488,6 +488,120 @@ selected.
|
|
|
488
488
|
limits, permissions, uniqueness, reserved names — beside the triggers the main
|
|
489
489
|
file lists.
|
|
490
490
|
|
|
491
|
+
## Review agents — explicit hierarchical path
|
|
492
|
+
|
|
493
|
+
This section replaces only reviewer dispatch when the request explicitly carries
|
|
494
|
+
`--hierarchical`. Everything before dispatch and every root/operator gate after collection
|
|
495
|
+
still follows SKILL.md. Without `--hierarchical`, do not probe, start, or mention V3: the
|
|
496
|
+
legacy path remains the default.
|
|
497
|
+
|
|
498
|
+
### Capability preflight and truthful limits
|
|
499
|
+
|
|
500
|
+
1. Before Step 0, require the exact root tools `review_agents_start`,
|
|
501
|
+
`review_agents_plan`, `review_agents_spawn`, `review_agents_status`, `review_agents_wait`,
|
|
502
|
+
`review_agents_result`, and `review_agents_cancel`. If one is absent, return
|
|
503
|
+
`STATUS: BLOCKED hierarchical_capability_unavailable — missing <names>`. Never silently
|
|
504
|
+
fall back to legacy or `keryx review run --autonomous`; the operator asked for
|
|
505
|
+
a different execution contract.
|
|
506
|
+
2. Resolve the exact head commit, choose a stable unique `run_id`, then call
|
|
507
|
+
`review_agents_start` with `{run_id, revision}` before any V3 dispatch. Record the
|
|
508
|
+
returned `runId`, resolved `revision`, `storageDir`, effective `config`, and
|
|
509
|
+
`capabilityProfile` in the package. The returned revision is the only
|
|
510
|
+
revision the V3 run may review.
|
|
511
|
+
3. Select an adapter only from that start result. It must report
|
|
512
|
+
`readOnlyEnforced`, `resultPersistence`, `cancellation`, and `hierarchy` as
|
|
513
|
+
true. `usageAccounting` is also required for measured-cost mode; otherwise
|
|
514
|
+
the run is explicitly cost-unknown. A missing property is unsupported, not
|
|
515
|
+
true. Stop with `STATUS: BLOCKED hierarchical_capability_unavailable — adapter <id> lacks
|
|
516
|
+
<capabilities>` rather than widening authority or changing engines.
|
|
517
|
+
4. The first host release exposes `native` and the reduced
|
|
518
|
+
`keryx-external-general` adapter. There is no exact parent tool parity.
|
|
519
|
+
Native source access is the read-only snapshot plus entity-declared read
|
|
520
|
+
tools, not inherited shell, MCP, web, workspace mutation, credentials or
|
|
521
|
+
every tool of root. The external adapter is bridge-only, coordinator-only,
|
|
522
|
+
has no source inspection and delegates to scoped soldiers; its provider
|
|
523
|
+
state must already be usable for the coordinator lifetime. Select it only
|
|
524
|
+
explicitly after its capability profile and credential preflight pass.
|
|
525
|
+
|
|
526
|
+
`review_agents_spawn_children` is adapter-internal and is never a root tool. The root
|
|
527
|
+
uses only the seven tools above; a coordinator uses the scoped child capability the
|
|
528
|
+
controller gives it.
|
|
529
|
+
|
|
530
|
+
### Preparation and the revision-bound plan
|
|
531
|
+
|
|
532
|
+
1. Build the ordinary package, scope, slices, context and required roster through
|
|
533
|
+
Steps 0–7. The root — never a coordinator — creates an immutable,
|
|
534
|
+
revision-bound plan. It explicitly lists
|
|
535
|
+
behavior areas × aspects, risk, scenarios, boundary checks, exactly one
|
|
536
|
+
boundary owner, area owners, direct assignments, dependencies, and explicit
|
|
537
|
+
uncovered cells. A named entity, reviewer skill, or inferred relevance does
|
|
538
|
+
not mark a cell covered.
|
|
539
|
+
2. Call `review_agents_plan` with `{run_id, plan, waves}` before `review_agents_spawn`.
|
|
540
|
+
The host validates the raw plan, computes the plan hash itself, authority-gates
|
|
541
|
+
registration and returns the accepted hash/version/revision; never invent or
|
|
542
|
+
supply a second hash. Root spawn refuses while no active plan is registered.
|
|
543
|
+
3. Optional V3 reconnaissance uses a complete preliminary plan whose first wave
|
|
544
|
+
contains bounded `review-scout` root assignments. After their durable results
|
|
545
|
+
arrive, register a new complete plan with a higher plan version and later
|
|
546
|
+
review round before review dispatch. A coordinator may dynamically name leaf
|
|
547
|
+
tasks only inside its registered scopes and delegated coverage envelope; the
|
|
548
|
+
controller binds those children to the same plan and inherited wave.
|
|
549
|
+
4. Refuse dispatch while an area or boundary has no owner, a required
|
|
550
|
+
area×aspect cell has no assignment, two owners claim one boundary, or an
|
|
551
|
+
assignment names a scope outside its area. If the repository head no longer
|
|
552
|
+
equals the resolved start revision, call `review_agents_cancel` for the run and
|
|
553
|
+
restart preparation; stale scout results and coverage never migrate to the
|
|
554
|
+
new revision.
|
|
555
|
+
|
|
556
|
+
### Zones, generals and direct soldiers
|
|
557
|
+
|
|
558
|
+
- Give a `review-coordinator` only one independent behavior zone whose internal
|
|
559
|
+
aspects benefit from parallel leaf checks. Its task names the exact revision,
|
|
560
|
+
area, scopes, aspects, boundary ownership, allowed reviewer skills, output
|
|
561
|
+
contract, and omissions. Never hand the whole round to a coordinator. Root
|
|
562
|
+
keeps cross-zone checks, global deduplication, validation,
|
|
563
|
+
verdict, readiness, premise decisions, completion, and publish gates.
|
|
564
|
+
- Select `keryx-external-general` only for a coordinator explicitly assigned to
|
|
565
|
+
delegation and consolidation. It is bridge-only and has no source inspection;
|
|
566
|
+
it must use scoped soldiers for evidence and never impersonate a native leaf.
|
|
567
|
+
- Keep small, indivisible, cross-zone, spec-gate, and independent verification
|
|
568
|
+
work as a direct worker/soldier spawned by root. A direct review worker uses
|
|
569
|
+
`entity: "review-worker"`, `role: "worker"`, its exact `skill_ref`, and its
|
|
570
|
+
assigned `scope_ids`. Scouts and validators remain leaf entities. Use only
|
|
571
|
+
entities, skills, adapters, deadlines, depth, concurrency, and launch counts
|
|
572
|
+
present in the effective config returned by `review_agents_start`; the initial
|
|
573
|
+
numeric profile is a ceiling, never a target.
|
|
574
|
+
- For each root assignment call `review_agents_spawn`; an `{ok:false}` admission is
|
|
575
|
+
an explicit blocked/not-run assignment, never a reason to bypass the
|
|
576
|
+
controller. Retain the returned `dispatchId`. Poll `review_agents_status` only for
|
|
577
|
+
progress, use `review_agents_wait` for terminal state, and call
|
|
578
|
+
`review_agents_result` for the full durable result. On operator stop, stale
|
|
579
|
+
revision, fatal gate failure, or abandoned area, call `review_agents_cancel` on
|
|
580
|
+
the subtree or run and reconcile late results before reporting.
|
|
581
|
+
|
|
582
|
+
### Leaf artifacts, coverage and the unchanged tail
|
|
583
|
+
|
|
584
|
+
1. Read run-level `review_agents_status` to enumerate every assignment, including a
|
|
585
|
+
coordinator's children. Fetch each completed leaf with `review_agents_result` and
|
|
586
|
+
save its full `REVIEW_RESULT` under a dispatch-unique path in `<package>/raw/`;
|
|
587
|
+
write the matching driver with its actual entity, reviewer skill, scopes,
|
|
588
|
+
revision and dispatch id. A missing, malformed, failed, blocked, cancelled, or
|
|
589
|
+
stale leaf remains uncovered and follows the existing retry/Not run rules.
|
|
590
|
+
2. Store coordinator syntheses separately under the package's research evidence.
|
|
591
|
+
A coordinator summary is not leaf evidence, not a reviewer result, and not
|
|
592
|
+
coverage. It never replaces, truncates, or duplicates its children's durable
|
|
593
|
+
results or usage.
|
|
594
|
+
3. Reconcile the plan's behavior-area × aspect cells and boundary checks only
|
|
595
|
+
from completed leaf artifacts at the same revision. Spawn `review-validator`
|
|
596
|
+
only as an independent assignment: it may not validate a finding produced by
|
|
597
|
+
the same dispatch or agent instance. Preserve unresolved and uncovered cells
|
|
598
|
+
explicitly; do not infer a clean verdict from silence.
|
|
599
|
+
4. Feed the dispatch-unique leaf artifacts through the existing quality gate,
|
|
600
|
+
ledger build, ingest, verifier/premise handling, verdict, mutation pass and
|
|
601
|
+
`keryx review readiness`. The root owns operator decisions and the complete and
|
|
602
|
+
publish gates exactly as in the legacy path. V3 changes fan-out and durable
|
|
603
|
+
lineage; it does not waive or reimplement those gates.
|
|
604
|
+
|
|
491
605
|
## Counterpart verification — the contract is enumerated, not summarised
|
|
492
606
|
|
|
493
607
|
For an **input rule** the diff mirrors or depends on (what the server accepts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-orchestrator
|
|
3
|
-
description: 'Use when: a code review is requested and the user does not name a specialized reviewer — "review", "code review", "review this PR", "review --all". Dispatches the relevant specialized reviewers in parallel and consolidates their findings into one unified report, and owns the fan-out flags "--all", "--project-conventions"
|
|
3
|
+
description: 'Use when: a code review is requested and the user does not name a specialized reviewer — "review", "code review", "review this PR", "review --all". Dispatches the relevant specialized reviewers in parallel and consolidates their findings into one unified report, and owns the fan-out flags "--all", "--project-conventions", "--legacy-profiles" and the explicit hierarchical opt-in "--hierarchical". NOT for: running a single specialized reviewer — invoke it directly by name instead, which is also how a flag that names one domain reaches its reviewer.'
|
|
4
4
|
triggers:
|
|
5
5
|
- "review"
|
|
6
6
|
- "ревью"
|
|
@@ -11,9 +11,10 @@ triggers:
|
|
|
11
11
|
- "review --all"
|
|
12
12
|
- "review --project-conventions"
|
|
13
13
|
- "review --legacy-profiles"
|
|
14
|
+
- "review --hierarchical"
|
|
14
15
|
metadata:
|
|
15
16
|
author: "MrCipherSmith"
|
|
16
|
-
version: "1.
|
|
17
|
+
version: "1.14.0"
|
|
17
18
|
category: "review"
|
|
18
19
|
compatible_harnesses: "cursor,codex,zed,opencode,claude"
|
|
19
20
|
license: "MIT"
|
|
@@ -23,8 +24,8 @@ license: "MIT"
|
|
|
23
24
|
**You are the orchestrator. Run the round yourself, inline, in the main session that loaded this skill; never hand the whole round to one subagent.** This skill routes: it detects scope, dispatches specialized reviewers, and consolidates their findings into one report sorted by severity. The reviewers do the reviewing.
|
|
24
25
|
|
|
25
26
|
## Preflight — before Step 0, in this order
|
|
26
|
-
|
|
27
|
-
1. **Can it spawn?**
|
|
27
|
+
**Engine selection fails closed.** The legacy flat path is the default. `--hierarchical` is the only hierarchical opt-in and requires all seven exact host tools: `review_agents_start`, `review_agents_plan`, `review_agents_spawn`, `review_agents_status`, `review_agents_wait`, `review_agents_result`, `review_agents_cancel`. If any is absent, stop before useful work with `STATUS: BLOCKED hierarchical_capability_unavailable — missing <names>`; never silently fall back to legacy or the autonomous runner. If all are present, follow `SKILL.detail.md` § "Review agents — explicit hierarchical path"; its start-result capability check may still refuse the selected adapter.
|
|
28
|
+
1. **Can it spawn?** Without `--hierarchical`, the round needs a subagent-spawn tool (`Agent`, `spawn_subagent` or the host's equivalent) and depth budget left: Claude Code nests subagents at most 3 deep, and at the limit `Agent` is withheld. A host with no spawn tool at all (Codex and other AGENTS.md hosts) does not stop here and does not review alone: it runs the round through the autonomous runner, `keryx review run --autonomous --target pr --ref <pull request URL>` (no pull request: `--target branch --ref <base> [--head <commit>]`), and relays its verdict and exit code (see "Hosts"). Only a session that has spent the depth budget (a nested subagent) stops; its whole output is this line, with no tool calls and no review of your own: `STATUS: BLOCKED nested_dispatch_unavailable — run this skill in the main session`
|
|
28
29
|
2. **Is a round needed?** List the files with `git diff --name-status --no-renames <base>...HEAD`, so a rename shows both paths. A diff where EVERY file is prose or machine-written data ends here with one line, `round not needed: <reason>`, and no reviewer. Prose is exactly: README or CHANGELOG at any depth; CONTRIBUTING, LICENSE, SECURITY or CODE_OF_CONDUCT at the top level; and under `docs/`, `.metaproject/wiki`, `.metaproject/reviews` or a flow's `journal.md`, a file with extension md, rst or adoc whose name holds a lowercase letter (an all-uppercase name such as AGENT or WARP is steering by convention). Machine-written data is a file under `coverage/` or `__generated__/` with extension lcov, info or map only; json, txt, html and md there are code. Steering is code wherever it sits, `docs/` included: a directory (singular or plural) named agent, skill, command, rule, prompt, instruction, persona, steering or hook, any path segment starting with a dot (`.claude`, `.cursorrules`, `.mcp.json`), a file name starting with SKILL, AGENT, CLAUDE, GEMINI, QWEN, CODEX, WARP, CRUSH, JULES, KNOWLEDGE, GUIDELINES, CONVENTIONS or copilot-instructions, ending in .local, .override, .instructions, .prompt, .agent or .chatmode before the extension, or containing prompt, instruction or system. A flow's `description.md`, `acceptance-criteria.md` and `tasks/` are gate inputs, so they are code. Every other file counts as code too, including lockfiles, committed `dist/` output, CI, auth, migrations, config JSON, and any path with `..`, a backslash, a leading `./` or `//`. `classifyRoundNeed` in `src/review/round-need.ts` is the tested reference of this rule; the host executes this text, and nothing in the CLI calls the function yet. `--all`, an explicit reviewer list or a gating round forces a round.
|
|
29
30
|
3. **Round ceiling.** 5 rounds (`REVIEW_ROUND_CAP`) over the same change. Past it: interactive, ask the operator; unattended, `STATUS: BLOCKED round_cap`.
|
|
30
31
|
4. **PR state, shown before dispatch.** On a PR target read its state (merged, approved, CI) and tell the operator the risk that it merges before the round ends: a verdict ready at minute 55 and held to minute 119 lost the race to the merge. Depth and the estimate need the package and the slice manifest, so they come later: after `review scope`, `review start` and `review slice`, before the first reviewer starts ("Round plan" steps 5-6; `SKILL.detail.md` § "Preflight 4").
|
|
@@ -139,7 +140,6 @@ A reviewer starts in the project root and reads project files; a path outside th
|
|
|
139
140
|
- **Done when** the consolidated report and the `keryx:findings` block are emitted and the stage counts and **Not run** are stated. A managed round (not `lightweight`, which is report-only) is also done only when every dispatched reviewer's result is recorded with `keryx review ingest` and the `review_complete` card has been answered (an agent never runs `keryx review complete`; that command is for a human in a terminal). `completed` means `keryx review readiness` passed, or each failing item but `premise-decisions` (answered per finding, never waived) is waived by the operator: in keryx shell call `review_waive_readiness` (a card, never a terminal), then call `review_complete`; elsewhere the operator runs `keryx review complete <package> --waive <item> "<their words>"` in their terminal; unattended, record Not run; publishing to GitHub is held by the same checklist, and a not-ready package goes out only through `keryx review publish --partial` (in keryx shell: `review_publish` with `partial: true`).
|
|
140
141
|
|
|
141
142
|
---
|
|
142
|
-
|
|
143
143
|
## Step 12 — the `keryx:findings` block
|
|
144
144
|
|
|
145
145
|
The prose report is for a human. **`keryx review ingest` reads the fenced block,
|
|
@@ -199,7 +199,7 @@ which of its inputs were recovered and which were never written down.
|
|
|
199
199
|
|
|
200
200
|
| Field | Type | Required | Description |
|
|
201
201
|
|-------|------|----------|-------------|
|
|
202
|
-
| `flags` | string[] | no | One or more of: `--frontend`, `--backend`, `--architecture`, `--security`, `--performance`, `--style`, `--clean-code`, `--highload`, `--project-conventions`, `--frontend-conventions`, `--testing-practices`, `--core-boundaries`, `--flow-graph`, `--legacy-profiles`, `--code-ai`, `--learned`, `--code-style`, `--mobx-store`, `--verify`, `--all` |
|
|
202
|
+
| `flags` | string[] | no | One or more of: `--hierarchical`, `--frontend`, `--backend`, `--architecture`, `--security`, `--performance`, `--style`, `--clean-code`, `--highload`, `--project-conventions`, `--frontend-conventions`, `--testing-practices`, `--core-boundaries`, `--flow-graph`, `--legacy-profiles`, `--code-ai`, `--learned`, `--code-style`, `--mobx-store`, `--verify`, `--all`. `--hierarchical` selects the capability-gated hierarchical engine; absence keeps the legacy path. |
|
|
203
203
|
| `path` | string | no | File or directory path to review (e.g., `src/stores/`, `src/components/UserCard.tsx`). Activates **path mode** — reviews the files at this path directly, not a git diff. |
|
|
204
204
|
| `commit_range` | string | no | Explicit commit hash or range (e.g., `abc123..HEAD`). Overrides merge-base detection. Ignored in path mode. |
|
|
205
205
|
| `issue_url` | string | no | GitHub issue or task URL. If provided, Stage 1 gate checks spec compliance before dispatching reviewers. |
|