jorgex-stack 1.9.11 → 1.9.13
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/package.json +1 -1
- package/stack/agents/code-reviewer.md +2 -2
- package/stack/agents/code-simplifier.md +2 -2
- package/stack/agents/docs-maintainer.md +10 -8
- package/stack/agents/security-auditor.md +2 -2
- package/stack/agents/silent-failure-hunter.md +2 -2
- package/stack/agents/test-analyzer.md +2 -2
- package/stack/agents/type-design-analyzer.md +2 -2
- package/stack/scripts/post-pr-review.cjs +3 -3
- package/stack/skills/orchestrator/SKILL.md +11 -1
- package/stack/skills/orchestrator/references/standard-workflow.md +6 -6
- package/stack/skills/work-lifecycle/SKILL.md +1 -1
- package/stack/skills/xreview/SKILL.md +33 -11
- package/stack/system-prompt/AGENTS.md +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jorgex-stack",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.13",
|
|
4
4
|
"description": "Harness multi-agente portable: instala la config JorgeX (agentes, skills, hooks, Engram, MCPs) en Claude Code, Codex CLI, OpenCode y Pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,8 +13,8 @@ You are an expert code reviewer specializing in modern software development acro
|
|
|
13
13
|
|
|
14
14
|
**First actions, in order**:
|
|
15
15
|
|
|
16
|
-
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only its `PRD.md` and `plan.md` before inspecting the diff. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
17
|
-
2. **Get the diff.**
|
|
16
|
+
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only the sections of its `PRD.md` and `plan.md` needed for the assigned scope before inspecting the diff; do not preload unrelated checkpoints or history. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
17
|
+
2. **Get the diff.** Explicit primary/support scope and pinned base/head SHAs override defaults: review the primary hunks and only the support needed for that contract or risk, including unchanged files. Otherwise, resolve supplied branches to SHAs before diffing, or use the working diff when none are supplied. Never assume `main` or silently widen the assignment.
|
|
18
18
|
3. Load the `agent-delegation` skill.
|
|
19
19
|
|
|
20
20
|
**Final output, last of all**: your final report (ending with the Result contract) must be the very last thing you emit. If you need to save anything to memory, do it BEFORE that output — never after.
|
|
@@ -15,8 +15,8 @@ You are read-only: you analyze recently modified code and **propose** refinement
|
|
|
15
15
|
|
|
16
16
|
**First actions, in order**:
|
|
17
17
|
|
|
18
|
-
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only its `PRD.md` and `plan.md` before inspecting the diff. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
19
|
-
2. **Resolve scope.**
|
|
18
|
+
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only the sections of its `PRD.md` and `plan.md` needed for the assigned scope before inspecting the diff; do not preload unrelated checkpoints or history. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
19
|
+
2. **Resolve scope.** An explicit repo/path audit stays within that audit target, not a default diff. For diff review, explicit primary/support scope and pinned base/head SHAs override defaults: inspect primary hunks and only the support needed for the assigned simplification. Otherwise, resolve supplied branches to SHAs, or use the working diff when none are supplied. Never assume `main` or silently widen the assignment.
|
|
20
20
|
3. Load the `lean-code` skill.
|
|
21
21
|
4. Load the `agent-delegation` skill.
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: docs-maintainer
|
|
3
|
-
description: Evidence-first documentation specialist. Use
|
|
3
|
+
description: Evidence-first documentation specialist. Use when changed use, contracts or operations need explanation, or existing documentation becomes inaccurate. Updates affected internal/public content, navigation and metadata — not product logic or documentation for every edit.
|
|
4
4
|
mode: subagent
|
|
5
5
|
tier: cheap
|
|
6
6
|
readonly: false
|
|
@@ -17,20 +17,20 @@ You handle functional or technical documentation. It may be public, internal or
|
|
|
17
17
|
|
|
18
18
|
## Targets
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Start with the affected surfaces in the assignment and their necessary references; discover additional surfaces only when the impact is unclear:
|
|
21
21
|
|
|
22
|
-
1. **Repo `/docs` folder** —
|
|
22
|
+
1. **Repo `/docs` folder** — affected internal/technical documentation, when relevant to the change.
|
|
23
23
|
2. **Public docs site** — any user-facing documentation living in a website, app or docs portal (e.g. a `docs` route, a docs app, a separate docs package or site).
|
|
24
24
|
|
|
25
25
|
When a change affects both, keep them consistent with each other.
|
|
26
26
|
|
|
27
27
|
## Goal
|
|
28
28
|
|
|
29
|
-
Keep the documentation
|
|
29
|
+
Keep the affected documentation accurate without assuming a fixed structure or documenting every implementation detail. Internal docs should explain non-obvious contracts and operations; public docs should help users complete tasks with simple language. Avoid volatile versions or duplicated history unless they are operationally necessary.
|
|
30
30
|
|
|
31
31
|
## Possible layers
|
|
32
32
|
|
|
33
|
-
Not every
|
|
33
|
+
Not every affected surface has all of these layers. Check those relevant to the changed pages:
|
|
34
34
|
|
|
35
35
|
1. **Content** — markdown, mdx, text docs
|
|
36
36
|
2. **Navigation** — sidebar, tree, index, menu, docs routing
|
|
@@ -44,7 +44,7 @@ If you change a page, check whether navigation or metadata must also be updated.
|
|
|
44
44
|
|
|
45
45
|
- Establish the **allowed write root**. An explicit worktree or write-root path in the assignment always wins; otherwise use the current repository root.
|
|
46
46
|
- Run `git rev-parse --show-toplevel` and inspect the current branch before the first write. Resolve every target path and confirm it stays inside the allowed write root. If the current checkout or any target does not match, do not write: return `blocked` with the mismatch.
|
|
47
|
-
-
|
|
47
|
+
- Use the assignment's scope and existing source-to-claim evidence; search for references to changed titles, slugs, paths or concepts only where needed to keep affected content coherent.
|
|
48
48
|
- Identify whether the documentation is public, internal or hybrid.
|
|
49
49
|
- Follow the project's real pattern; do not impose a new one without need.
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ If you change a page, check whether navigation or metadata must also be updated.
|
|
|
52
52
|
|
|
53
53
|
Documentation is an evidence task, not a creative reconstruction.
|
|
54
54
|
|
|
55
|
-
-
|
|
55
|
+
- Trace every added or changed technical claim to current code, schemas or migrations, tests or canonical project docs; reuse an existing **source-to-claim** map when still valid rather than creating another artifact. A plan states intent, not proof of implemented or published behavior. Distinguish current, candidate and conditional states when that difference changes the claim.
|
|
56
56
|
- Use implementation to classify components. An invocation name is not proof of its implementation type; inspect the defining file before calling something an RPC, database function, API route, Edge Function, job or service.
|
|
57
57
|
- Use git history only when claiming when or in which change something was introduced. Current existence does not prove recent origin.
|
|
58
58
|
- **Never invent** names, paths, symbols, chronology, or snippets. Copy identifiers exactly from a source that exists in the allowed write root.
|
|
@@ -70,13 +70,15 @@ Documentation is an evidence task, not a creative reconstruction.
|
|
|
70
70
|
|
|
71
71
|
## Before reporting
|
|
72
72
|
|
|
73
|
-
- Review the final documentation diff sentence by sentence.
|
|
73
|
+
- Review the final documentation diff sentence by sentence. Verify added or changed factual claims against inspected sources or still-valid evidence, and confirm mentioned files exist. Reread sources when they change, conflict or no longer support the claim; do not repeat unrelated investigation.
|
|
74
74
|
- Re-run the location check and confirm all changed files are inside the allowed write root.
|
|
75
75
|
- Remove unsupported claims instead of weakening them with vague language.
|
|
76
76
|
|
|
77
77
|
## Rules
|
|
78
78
|
|
|
79
79
|
- Scope your work to the affected documentation.
|
|
80
|
+
- A consolidated pass is not a prohibition on corrections: reopen affected pages when their contract changes, without restarting all documentation work.
|
|
81
|
+
- Documentation-site and help content belong here. Product logic, ordinary UI text, comments and translation retain their existing owners; PRD, plan, task specs, memory and PR descriptions remain coordination work.
|
|
80
82
|
- If the docs system has separate content, navigation and metadata, keep them in sync.
|
|
81
83
|
- Do not touch product logic except for minimal edits strictly needed to link docs.
|
|
82
84
|
|
|
@@ -11,8 +11,8 @@ bash: git-read
|
|
|
11
11
|
|
|
12
12
|
**First actions, in order**:
|
|
13
13
|
|
|
14
|
-
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only its `PRD.md` and `plan.md` before inspecting the diff. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
15
|
-
2. **Get the diff.**
|
|
14
|
+
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only the sections of its `PRD.md` and `plan.md` needed for the assigned scope before inspecting the diff; do not preload unrelated checkpoints or history. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
15
|
+
2. **Get the diff.** Explicit primary/support scope and pinned base/head SHAs override defaults: audit primary hunks and the support needed to trace the assigned security risk, including unchanged dependencies or consumers. Otherwise, resolve supplied branches to SHAs, or use the working diff when none are supplied. Never assume `main` or silently widen the assignment.
|
|
16
16
|
3. Load the `agent-delegation` skill.
|
|
17
17
|
|
|
18
18
|
**Final output, last of all**: your final report (ending with the Result contract) must be the very last thing you emit. If you need to save anything to memory, do it BEFORE that output — never after.
|
|
@@ -13,8 +13,8 @@ You are an elite error handling auditor with zero tolerance for silent failures
|
|
|
13
13
|
|
|
14
14
|
**First actions, in order**:
|
|
15
15
|
|
|
16
|
-
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only its `PRD.md` and `plan.md` before inspecting the diff. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
17
|
-
2. **Get the diff.**
|
|
16
|
+
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only the sections of its `PRD.md` and `plan.md` needed for the assigned scope before inspecting the diff; do not preload unrelated checkpoints or history. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
17
|
+
2. **Get the diff.** Explicit primary/support scope and pinned base/head SHAs override defaults: audit primary hunks and the support needed to trace the assigned failure paths, including unchanged dependencies or consumers. Otherwise, resolve supplied branches to SHAs, or use the working diff when none are supplied. Never assume `main` or silently widen the assignment.
|
|
18
18
|
3. Load the `agent-delegation` skill.
|
|
19
19
|
|
|
20
20
|
**Final output, last of all**: your final report (ending with the Result contract) must be the very last thing you emit. If you need to save anything to memory, do it BEFORE that output — never after.
|
|
@@ -13,8 +13,8 @@ You determine whether the diff has sufficient evidence for its meaningful regres
|
|
|
13
13
|
|
|
14
14
|
**First actions, in order**:
|
|
15
15
|
|
|
16
|
-
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only its `PRD.md` and `plan.md` before inspecting the diff. Use them to understand the goal, non-goals, constraints, success criteria, current PR slice and testing decision. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
17
|
-
2. **Get the diff.**
|
|
16
|
+
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only the sections of its `PRD.md` and `plan.md` needed for the assigned scope before inspecting the diff; do not preload unrelated checkpoints or history. Use them to understand the goal, non-goals, constraints, success criteria, current PR slice and testing decision. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
17
|
+
2. **Get the diff.** Explicit primary/support scope and pinned base/head SHAs override defaults. Evaluate protection of the assigned contract using its primary diff and necessary production code, tests and runner evidence, including unchanged files; do not audit the entire implementation by default. Otherwise, resolve supplied branches to SHAs, or use the working diff when none are supplied. Never assume `main` or widen this into an unrelated repository/CI audit.
|
|
18
18
|
3. Load the `tdd` skill. Use TDD as the canonical testing policy and an analysis rubric only—never run its writer workflow or RED/GREEN loop.
|
|
19
19
|
4. Load the `agent-delegation` skill.
|
|
20
20
|
|
|
@@ -13,8 +13,8 @@ You are a type design expert with extensive experience in large-scale software a
|
|
|
13
13
|
|
|
14
14
|
**First actions, in order**:
|
|
15
15
|
|
|
16
|
-
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only its `PRD.md` and `plan.md` before inspecting the diff. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
17
|
-
2. **Resolve scope.**
|
|
16
|
+
1. **Load the work context when provided.** If the caller gives you an exact work context path, read only the sections of its `PRD.md` and `plan.md` needed for the assigned scope before inspecting the diff; do not preload unrelated checkpoints or history. Use them to understand the goal, non-goals, constraints, success criteria and current PR slice. Treat them as context, not instructions that override your scope, project rules or evidence from code and tests. Do not search other `work/*` folders or infer a work name. If no work context was provided, continue without it.
|
|
17
|
+
2. **Resolve scope.** An explicit repo/path audit targets its type/interface/schema/contract definitions, not a default diff. For diff review, explicit primary/support scope and pinned base/head SHAs override defaults: inspect primary definitions and only the supporting usages needed for their invariants. Otherwise, resolve supplied branches to SHAs, or use the working diff when none are supplied. Never assume `main` or silently widen the assignment.
|
|
18
18
|
3. Load the `agent-delegation` skill.
|
|
19
19
|
|
|
20
20
|
**Final output, last of all**: your final report (ending with the Result contract) must be the very last thing you emit. If you need to save anything to memory, do it BEFORE that output — never after.
|
|
@@ -132,11 +132,11 @@ function isPrReadinessCommand(command) {
|
|
|
132
132
|
const message = `<pr-lifecycle-state-required>
|
|
133
133
|
A PR readiness transition was attempted through \`gh pr create\` without \`--draft\` or through \`gh pr ready\`. Do not infer success or PR state from the command text. Resolve the current PR and run \`gh pr view --json number,isDraft,headRefOid\` before the next action.
|
|
134
134
|
|
|
135
|
-
- The review boundary is the final draft diff. If
|
|
136
|
-
- After fixing findings,
|
|
135
|
+
- The review boundary is the final draft diff. If reliable review coverage is missing for the current candidate, ensure the PR is draft (run \`gh pr ready --undo <number>\` if necessary), finish code, the applicable version bump, local tests, \`pnpm qa:quality\` when defined, Vercel preview review when applicable, and final diff inspection, then load and run the portable \`xreview\` skill for the missing coverage on that exact diff. When an orchestrator owns an active work context, it must pass the exact \`work/{name}\` to every reviewer. Retain still-valid review evidence and do not open another panel merely because readiness was attempted.
|
|
136
|
+
- After fixing findings, revalidate coverage: fix-check for the finding, delta-review for affected contracts or risks, and full review only when reliable coverage must be established or broadly rebuilt. A material change requires reassessment, not automatically the same full panel. Retain prior evidence only where its assumptions remain valid; a previously clean role reopens when its dependencies or risks change.
|
|
137
137
|
- If the PR is actually ready, do not push. If the project has PR checks configured, wait for the complete Quality Gates, run \`gh pr checks <number>\`, and verify the checked headRefOid is the candidate SHA.
|
|
138
138
|
- If no PR checks are configured, confirm that from project configuration such as workflows, rulesets or integrations, and record it; their absence does not block the merge. An empty \`gh pr checks\` result immediately after ready is not evidence that no checks are configured.
|
|
139
|
-
- Immediately before reporting or merging, compare \`gh pr view --json headRefOid\` with the recorded candidate SHA. Merge still requires explicit user approval.
|
|
139
|
+
- Immediately before reporting or merging, compare \`gh pr view --json headRefOid\` with the recorded candidate SHA and recheck the effective base and integration context; the same head alone does not preserve review coverage. Merge still requires explicit user approval.
|
|
140
140
|
</pr-lifecycle-state-required>`;
|
|
141
141
|
|
|
142
142
|
let raw = "";
|
|
@@ -27,6 +27,12 @@ For the **standard** route, explicitly read and follow [references/standard-work
|
|
|
27
27
|
|
|
28
28
|
Both routes preserve mandatory memory/Engram saves, testing/TDD by risk, Git/worktree discipline, final-draft review, configured gates, and explicit user approval for merge. Security, permissions, ownership, backups, dependency consent, and the existing human/programmatic output contracts are never relaxed by routing. Product documentation remains with `docs-maintainer` when it is needed; short routing does not absorb that owner's scope.
|
|
29
29
|
|
|
30
|
+
## Documentation when needed
|
|
31
|
+
|
|
32
|
+
The coordinator identifies the audience and affected surfaces when a change needs an explanation of use, contract or operation, or makes an existing claim incorrect. Create documentation only for a concrete reader or operational need; an internal refactor or already-correct description does not require new prose. Product documentation stays with `docs-maintainer`, outside the review panel; code comments, ordinary UI text, translation and work-tracking artifacts keep their existing owners.
|
|
33
|
+
|
|
34
|
+
Identify needs during execution, then consolidate the necessary documentation pass once the implementation and fixes are stable, before ready for each checkpoint that needs it. Do not wait until the end of a roadmap that publishes intermediate behavior. Later contract changes reopen only affected pages; a prose correction alone does not invalidate unchanged code review, while a contractual correction requires reassessing review coverage.
|
|
35
|
+
|
|
30
36
|
## Decision before delegation
|
|
31
37
|
|
|
32
38
|
Use analysis only where it resolves an uncertainty that matters. An analyst's recommendation is evidence for the coordinator, not an implementation order: check the decisive sources, distinguish facts from assumptions, and close the scope, approach, relevant invariants and verification seam before delegating implementation. For formal work, record those decisions in its single Spec. Do not repeat the whole investigation or copy its report into the task.
|
|
@@ -68,7 +74,11 @@ Do not launch `code-reviewer`, `code-simplifier`, `test-analyzer`, or `silent-fa
|
|
|
68
74
|
Both routes cap a failing task or criterion at three attempts. After the third failure, stop retrying, save the meaningful failure and what was tried through the required outcome or memory path, then re-plan with a different approach or report the blocker; never loop blindly.
|
|
69
75
|
### Final review and PR lifecycle
|
|
70
76
|
|
|
71
|
-
The review boundary is the final candidate SHA while the PR is still draft, immediately before `gh pr ready`. It is one final review, not a mandatory panel or multiple reviewers for short work. Load and run the portable `xreview` skill
|
|
77
|
+
The review boundary is the final candidate SHA while the PR is still draft, immediately before `gh pr ready`. It is one final review, not a mandatory panel or multiple reviewers for short work. Load and run the portable `xreview` skill when its scoped review adds value and reliable coverage is missing; pass the exact active `work/{name}` to every review subagent, never another work folder. Freeze base/head and merge-base, assign primary responsibility plus necessary support, and preserve each specialist's output contract.
|
|
78
|
+
|
|
79
|
+
Use the [coverage revalidation rule](../xreview/SKILL.md#7-revalidate-coverage-and-stop): fix-check for a finding, delta-review for affected risks, full review when reliable coverage must be established or broadly rebuilt. A material change requires reassessing coverage, not automatically rerunning the same panel. Previously clean roles reopen when their contracts, dependencies or assumptions change; commits and readiness alone do not trigger reviewers. Record the scope and justification for retained evidence in the existing checkpoint, including changes to base or integration context even when head is unchanged.
|
|
80
|
+
|
|
81
|
+
Triage valid findings before work/backlog creation, reconcile duplicates and reject false positives with reasons. New valid findings are not discarded for being new. Close when blocking findings and material uncertainty are resolved, fixes verified and current coverage justified, not when there are zero suggestions; the bounded-retry guard still applies.
|
|
72
82
|
|
|
73
83
|
Both routes keep the PR draft while it changes, use the canonical Git worktree, complete review before ready, wait for configured gates, compare the candidate SHA before reporting or merging, and never merge without explicit user approval.
|
|
74
84
|
|
|
@@ -79,7 +79,7 @@ Commit after each task or bounded group of tasks, with a message that reflects t
|
|
|
79
79
|
|
|
80
80
|
- After the first coherent commit, push the branch and create the PR against its real base with `gh pr create --draft`. Do not wait until SHIP to open it.
|
|
81
81
|
- Keep every code change, commit and push inside the draft phase. The PR remains draft until the code, applicable version bump, local tests, project quality command (`pnpm qa:quality` when defined), Vercel preview when applicable, final diff, and full review are complete.
|
|
82
|
-
- Never push to a ready PR. If a ready PR needs changes, first run `gh pr ready --undo <number>`, then modify and push while draft and repeat VERIFY and the
|
|
82
|
+
- Never push to a ready PR. If a ready PR needs changes, first run `gh pr ready --undo <number>`, then modify and push while draft and repeat VERIFY and the applicable review revalidation from the common coverage rule before readying it again.
|
|
83
83
|
|
|
84
84
|
### Handoff rule
|
|
85
85
|
|
|
@@ -116,7 +116,7 @@ implementer (direct change)
|
|
|
116
116
|
### Special delegations
|
|
117
117
|
|
|
118
118
|
- `translator` for translations or multilingual visible text
|
|
119
|
-
- `docs-maintainer` for documentation
|
|
119
|
+
- `docs-maintainer` for the affected documentation under [Documentation when needed](../SKILL.md#documentation-when-needed); consolidate the pass with stable implementation, not one dispatch per edit or a new review-panel member
|
|
120
120
|
- `security-auditor` for sensitive review
|
|
121
121
|
|
|
122
122
|
### Verification cadence
|
|
@@ -157,16 +157,16 @@ An early review during EXECUTE is an **exception**, not a default phase. Use it
|
|
|
157
157
|
|
|
158
158
|
When the plan is fully applied and VERIFY passes:
|
|
159
159
|
|
|
160
|
-
1. Confirm the draft PR exists, the worktree is clean, and the draft head matches the local HEAD.
|
|
160
|
+
1. Confirm the draft PR exists, the worktree is clean, and the draft head matches the local HEAD. Complete any necessary documentation under the common rule and inspect the consolidated final diff against the PR's real base; do not publish intermediate behavior with required documentation missing.
|
|
161
161
|
2. Apply **Final review and PR lifecycle** in the entry [SKILL.md](../SKILL.md) and the project's review requirements. Reuse valid prior review evidence; choosing standard does not require another panel. Process the review findings by their three levels:
|
|
162
162
|
- **Critical Issues (must fix)**: apply ALL of them — the PR must not reach merge with these open.
|
|
163
163
|
- **Important Improvements (should fix)**: apply the ones worth doing now, at your judgment.
|
|
164
164
|
- **Suggestions (nice to have)**: apply only if trivial and safe.
|
|
165
|
-
3.
|
|
166
|
-
4. For
|
|
165
|
+
3. Reconcile duplicates, false positives and disputed premises before creating work. Only valid work deliberately deferred goes to the project's `work/backlog` single topic_key — what + why deferred. Use the safe serialized protocol; subagents only return candidate lines. Do not backlog rejected findings or discard valid findings merely because they are new.
|
|
166
|
+
4. For accepted fixes, reuse the bounded owning task where appropriate; formalize genuinely new independent work through the existing lifecycle. Execute and verify while draft. Apply the common coverage revalidation rule: fix-check, delta-review or full review according to affected contracts and evidence, not another full panel by default. Preserve justified clean coverage and reopen it when dependencies or assumptions change.
|
|
167
167
|
5. Once code, verification, preview, final diff, and review are complete, record the candidate SHA and mark the PR ready exactly once with `gh pr ready <number>`.
|
|
168
168
|
6. Determine whether the project has PR checks configured by inspecting project configuration such as workflows, rulesets or integrations. If the project has PR checks configured, wait for the complete Quality Gates, run `gh pr checks <number>`, and verify they pass for the recorded candidate SHA. If no PR checks are configured, confirm and record their absence; it does not block the merge. An empty `gh pr checks` result immediately after ready is not evidence that no checks are configured. In either case, do not push while the PR is ready. Immediately before reporting or merging, compare `gh pr view --json headRefOid` with the recorded candidate SHA.
|
|
169
|
-
7. If any fix is needed, run `gh pr ready --undo <number>` before editing, return to EXECUTE, and repeat the full verification, review, ready
|
|
169
|
+
7. If any fix is needed, run `gh pr ready --undo <number>` before editing, return to EXECUTE, and repeat the full verification, review revalidation, ready and configured gate cycle. Review revalidation follows the common coverage rule, not an automatic panel. Never treat checks from an older SHA as merge evidence; recheck the effective base and integration context as well.
|
|
170
170
|
|
|
171
171
|
## 8. CLOSE
|
|
172
172
|
|
|
@@ -55,7 +55,7 @@ Use this section only after routing selects formal SDD work, including work prom
|
|
|
55
55
|
3. Continue implementation, commits and pushes only while the PR is draft. Draft means the code can still change; ready means the current SHA is the candidate to merge.
|
|
56
56
|
4. Before ready, complete every applicable preflight item: code, version bump, local tests, project quality command (`pnpm qa:quality` when defined), Vercel preview review when the project uses Vercel, final diff inspection, and full PR review.
|
|
57
57
|
5. Mark ready once with `gh pr ready <number>`. If the project has PR checks configured, wait for Quality Gates, run `gh pr checks <number>`, and verify the checks belong to the latest commit. If no PR checks are configured, confirm that from project configuration such as workflows, rulesets or integrations, and record it; their absence does not block the merge. An empty `gh pr checks` result immediately after ready is not evidence that no checks are configured. Immediately before reporting or merging, compare `gh pr view --json headRefOid` with the recorded candidate SHA.
|
|
58
|
-
6. Never push to a ready PR. If it needs changes, first run `gh pr ready --undo <number>`, then modify and push while draft, repeat preflight and review, mark ready again, and wait for a fresh complete gate when checks are configured.
|
|
58
|
+
6. Never push to a ready PR. If it needs changes, first run `gh pr ready --undo <number>`, then modify and push while draft, repeat preflight and review revalidation, mark ready again, and wait for a fresh complete gate when checks are configured. Use [coverage revalidation](../xreview/SKILL.md#7-revalidate-coverage-and-stop), not an automatic repeated panel; preserve evidence only for still-valid contracts and integration assumptions, including the effective base.
|
|
59
59
|
7. Merge only after explicit user approval. When PR checks are configured, their passing result must match the current candidate SHA.
|
|
60
60
|
|
|
61
61
|
Dependent PRs are sequential: merge one checkpoint, update the production branch, then create the next worktree/branch from that updated base. Do not stack a dependent PR from an unmerged work branch unless the human explicitly chooses a stacked-PR strategy.
|
|
@@ -3,13 +3,13 @@ name: xreview
|
|
|
3
3
|
description: Conditional multi-agent code review — determines what to review (asking if unclear), resolves the exact diff, and launches only the relevant subagents in parallel
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Determine what needs review, freeze the evidence, and assign only the relevant specialist scopes. Reuse justified coverage after fixes; an explicitly requested fresh or full review still takes precedence over reuse.
|
|
7
7
|
|
|
8
8
|
## 0. Determine the review target
|
|
9
9
|
|
|
10
10
|
Review target (may be empty): use the invocation context or the explicit target supplied by the caller.
|
|
11
11
|
|
|
12
|
-
- If the input names a branch →
|
|
12
|
+
- If the input names a branch → select it as BASE and resolve immutable refs before reviewing.
|
|
13
13
|
- If the input references a PR (number or URL) → use that PR's base branch as BASE.
|
|
14
14
|
- If the input names files/paths/areas → review the changes touching those paths.
|
|
15
15
|
- If the input is empty or ambiguous: do a quick, cheap situation scan first — uncommitted changes (`git status --short`), current branch, open PR for it (`gh pr view --json baseRefName --jq .baseRefName`) — and ASK the user what to review before launching anything, offering only the options that actually apply:
|
|
@@ -23,7 +23,7 @@ Do NOT guess silently: a review against the wrong target wastes every subagent a
|
|
|
23
23
|
|
|
24
24
|
## 1. Resolve BASE and HEAD (branch/PR reviews)
|
|
25
25
|
|
|
26
|
-
HEAD
|
|
26
|
+
HEAD identifies the current branch/worktree; branch names are labels, not immutable review evidence.
|
|
27
27
|
|
|
28
28
|
BASE is the branch the work will merge into. Do NOT default to `main` — work is often done in sub-branches whose PR targets another branch. Resolve BASE in this order:
|
|
29
29
|
|
|
@@ -32,37 +32,43 @@ BASE is the branch the work will merge into. Do NOT default to `main` — work i
|
|
|
32
32
|
3. Otherwise, inspect local and `origin/*` branches and choose the branch directly underneath the current branch: the candidate whose merge-base with HEAD is newest/closest to HEAD, excluding the current branch itself and its remote tracking ref.
|
|
33
33
|
4. If still unsure, ask the user — never silently fall back to `main`.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Resolve the selected refs to full commit SHAs, record `BASE_SHA`, `HEAD_SHA` and their merge-base, and review `git diff <BASE_SHA>...<HEAD_SHA>`. Print the refs, SHAs and why BASE was selected; do not leave reviewers to resolve a moving `HEAD` independently. If the base or merge-base is ambiguous, resolve the scope before launching them.
|
|
36
|
+
|
|
37
|
+
For working-tree reviews, state the staged, unstaged and relevant untracked changes actually included. They are not evidence for a committed SHA. If the working state changes during review, revalidate the affected coverage rather than attributing it to the old snapshot; never stage files merely to manufacture review evidence.
|
|
36
38
|
|
|
37
39
|
## 2. Decide routing (lightweight)
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
`git diff <BASE>...HEAD --name-only` (or `git diff --name-only` + `git diff --staged --name-only` for working-tree reviews).
|
|
41
|
+
Start with changed file NAMES: `git diff <BASE_SHA>...<HEAD_SHA> --name-only` (or the working-tree inventory). Read only the decisive hunks when names are insufficient to classify a contract or risk; do not preload the entire diff by habit.
|
|
41
42
|
|
|
42
43
|
Sanity check: if that list is far larger than the work being reviewed (hundreds of files, unrelated areas), BASE is almost certainly wrong — STOP, re-resolve it (step 1), and only continue when the diff matches the actual work. Reviewing against the wrong BASE makes every finding worthless.
|
|
43
44
|
|
|
45
|
+
Account for every changed group, including tests, docs, configuration and generated files, and explain deliberate exclusions. Assign each reviewer a **primary scope** (paths/hunks and the contract or risk it owns) and **support context** (directed dependencies, consumers, tests or docs needed to understand it, including unchanged files). Primary is responsibility, not exclusive file ownership or an access-permission boundary. Do not hand every reviewer the entire diff by default or forbid a test reviewer from reading the production contract.
|
|
46
|
+
|
|
44
47
|
## 3. Preserve the work context
|
|
45
48
|
|
|
46
49
|
When running inside the orchestrator's SHIP phase, the main agent already owns the exact active `work/{name}`. Preserve it as the review context and pass it verbatim to every review subagent. Do not infer a work name from the branch or search `work/*`; several pieces of work may be active at once.
|
|
47
50
|
|
|
51
|
+
Use only the goal, constraints, criteria and plan sections relevant to the assigned review. Passing the exact work path is not a request to reload every historical checkpoint or the whole conversation.
|
|
52
|
+
|
|
48
53
|
For a manual xreview without an explicit work context, continue without PRD/plan context and state that it was unavailable. Never choose a work folder silently.
|
|
49
54
|
|
|
50
55
|
## 4. Comment pass FIRST (conditional)
|
|
51
56
|
|
|
52
57
|
If the diff adds or changes comments/docstrings, run `comment-fixer` ALONE before the analysts — it edits comments in place (comments only, never code), so the analysts then review a diff already clean of comment noise instead of re-reporting it or mistaking its edits for contamination.
|
|
53
58
|
|
|
54
|
-
- Pass
|
|
59
|
+
- Pass the frozen refs or working-state identity and the relevant comment/docstring scope.
|
|
55
60
|
- When the orchestrator supplied one, pass it the same exact work context path as every other review subagent.
|
|
56
|
-
- If it changed anything and the scope is a committed diff (branch/PR): comment-fixer itself never commits — YOU commit its fixes
|
|
61
|
+
- If it changed anything and the scope is a committed diff (branch/PR): comment-fixer itself never commits — YOU commit its fixes before launching reviewers, staging ONLY its files (never `-a`/`-A`). Then freeze the new candidate SHA and refresh scopes. If a commit cannot be made, report the uncommitted state; it cannot certify the committed candidate.
|
|
57
62
|
- For working-tree reviews: leave its edits uncommitted (they join the user's pending work) and say so in the report.
|
|
58
63
|
- If the diff touches no comments, skip it and move on.
|
|
59
64
|
|
|
60
65
|
## 5. Launch the remaining subagents in PARALLEL
|
|
61
66
|
|
|
62
|
-
All subagents are CONDITIONAL: launch one only when
|
|
67
|
+
All subagents are CONDITIONAL: launch one only when its contract or risk applies. Run independent scopes in PARALLEL through the available delegation mechanism. Each reviewer reads its assigned primary diff and the support it needs; all are read-only. Pass each assignment in the existing handoff, without inventing a universal output schema:
|
|
63
68
|
|
|
64
|
-
- the
|
|
65
|
-
-
|
|
69
|
+
- the immutable base/head SHAs and merge-base, or the stated working-state scope
|
|
70
|
+
- primary paths/hunks plus the contract/risk to evaluate, and directed support references
|
|
71
|
+
- the instruction: use this explicit assignment, not a default whole-diff review; never assume `main`, and report material missing context instead of silently widening the audit
|
|
66
72
|
- when the orchestrator supplied one, the exact work context path verbatim — never a guessed or discovered alternative
|
|
67
73
|
|
|
68
74
|
Subagents and their triggers:
|
|
@@ -82,6 +88,8 @@ If none of a subagent's triggers are present, skip it and note that it was skipp
|
|
|
82
88
|
|
|
83
89
|
After the relevant subagents complete, synthesize their findings into a unified report. Use 4R internally (Reliability / Resilience / Readability / Risk) as a checklist while synthesizing; do not add a separate 4R section or taxonomy to the final report.
|
|
84
90
|
|
|
91
|
+
Reconcile duplicates and verify disputed premises before creating work. Distinguish a missed bug, a regression introduced by a fix and an optional suggestion. A new valid finding still needs triage; being new is not a reason to discard it. Record justified rejection of false positives, not backlog entries for them. Only valid work deliberately deferred belongs in the existing backlog, using its single-writer protocol.
|
|
92
|
+
|
|
85
93
|
- Review scope used (BASE/HEAD or working diff) and how it was chosen
|
|
86
94
|
- Subagents run vs skipped (with reason)
|
|
87
95
|
- Critical Issues (must fix)
|
|
@@ -89,3 +97,17 @@ After the relevant subagents complete, synthesize their findings into a unified
|
|
|
89
97
|
- Suggestions (nice to have)
|
|
90
98
|
- Changes already applied (comment fixes: committed to the branch, or left uncommitted for working-tree reviews)
|
|
91
99
|
- Positive Findings
|
|
100
|
+
|
|
101
|
+
## 7. Revalidate coverage and stop
|
|
102
|
+
|
|
103
|
+
Use the existing checkpoint/history for frozen refs, scopes actually reviewed, finding dispositions, verification and the reason prior coverage remains valid. No separate registry, duplicated task board or universal JSON fields are required.
|
|
104
|
+
|
|
105
|
+
- **Fix-check**: verify the original finding, its correction and the nearby regression risk. Prefer deterministic evidence; ask the relevant reviewer only when judgment is still needed.
|
|
106
|
+
- **Delta-review**: review changed hunks and affected contracts/dependencies when a fix invalidates coverage or introduces risk. Reopen only the relevant roles, including a previously clean role when its assumptions or dependencies changed.
|
|
107
|
+
- **Full review**: establish initial coverage or rebuild it when the effective diff/integration context has changed too broadly to retain reliable coverage. Select specialists conditionally; a material change calls for reassessment, not automatically the same full panel.
|
|
108
|
+
|
|
109
|
+
A role is neither exempt forever because it was clean nor mandatory forever because it found a bug. Prefer a bounded follow-up to an earlier reviewer when its context remains useful; fresh review can be appropriate when the required independence or coverage changes. Commits, readiness attempts and non-contractual typos do not by themselves trigger another panel.
|
|
110
|
+
|
|
111
|
+
After a base/parent change or retarget, recompute the effective diff and merge-base and reconsider integration assumptions; an unchanged head SHA alone does not preserve coverage. Before delivery, bind retained and new evidence to the current candidate and run the applicable checks. If code must change while ready, return to draft first.
|
|
112
|
+
|
|
113
|
+
Stop when no valid blocking findings remain, fixes are verified, coverage of the candidate is justified and no material uncertainty remains. Do not search indefinitely for zero suggestions. The existing task/criterion retry limit still applies: exhaustion requires replanning or a genuine blocker, never claiming success. Merge always requires explicit user approval.
|
|
@@ -49,7 +49,7 @@ Ask questions when something isn't clear instead of assuming it's correct.
|
|
|
49
49
|
- Make small, local, reviewable changes.
|
|
50
50
|
- Reuse existing repo patterns before introducing new ones.
|
|
51
51
|
- Do not add dependencies without explicit user approval.
|
|
52
|
-
- Update docs when
|
|
52
|
+
- Update affected docs when a change needs user or operational explanation, or makes existing claims incorrect; do not create prose for every internal edit.
|
|
53
53
|
- Run lint and typecheck after significant changes when available.
|
|
54
54
|
|
|
55
55
|
---
|
|
@@ -135,7 +135,7 @@ Every piece of information about a piece of work has exactly ONE home — never
|
|
|
135
135
|
- Keep the PR in draft while its code can still change. All subsequent commits and pushes happen while draft; never push to a ready PR.
|
|
136
136
|
- Before ready, complete all applicable preflight work: code, version bump, local tests, the project's quality command (`pnpm qa:quality` when defined), Vercel preview review when the project uses Vercel, final diff inspection, and the full PR review. React Doctor is manual/local, not a GitHub Actions gate.
|
|
137
137
|
- Mark the PR ready only once the current SHA is the candidate to merge: `gh pr ready <number>`. If the project has PR checks configured, wait for Quality Gates, run `gh pr checks <number>`, and verify the checks belong to the latest commit before reporting it mergeable. If no PR checks are configured, confirm that from project configuration such as workflows, rulesets or integrations, and record it; their absence does not block the merge. An empty `gh pr checks` result immediately after ready is not evidence that no checks are configured. Immediately before reporting or merging, compare `gh pr view --json headRefOid` with the recorded candidate SHA.
|
|
138
|
-
- If a ready PR needs any code or behavior change, first run `gh pr ready --undo <number>`, then modify and push while draft, repeat the full local verification and review, mark ready again, and wait for a fresh complete gate when PR checks are configured. Never push to a ready PR and merge without repeating the applicable cycle.
|
|
138
|
+
- If a ready PR needs any code or behavior change, first run `gh pr ready --undo <number>`, then modify and push while draft, repeat the full local verification and revalidate review coverage, mark ready again, and wait for a fresh complete gate when PR checks are configured. Review revalidation means fix-check, delta-review or full review according to affected contracts and dependencies, not automatically relaunching every reviewer. Reconsider the effective base and integration context even when head is unchanged. Never push to a ready PR and merge without repeating the applicable cycle.
|
|
139
139
|
- Merging a PR ALWAYS requires an explicit user request — no exceptions, in any flow.
|
|
140
140
|
- Before commit or push, review `git status`, `git diff`, and `git log --oneline -10`.
|
|
141
141
|
- Never add AI signatures, `Co-Authored-By`, or agent mentions.
|
|
@@ -164,7 +164,7 @@ Detect the real environment before running commands; don't assume a shell or OS.
|
|
|
164
164
|
|
|
165
165
|
## Documentation
|
|
166
166
|
|
|
167
|
-
-
|
|
167
|
+
- Keep documentation accurate for changed use, contracts and operations. Use the orchestrator's documentation rule to identify the needed surfaces and consolidate the specialist's pass; reopen only affected pages after later changes.
|
|
168
168
|
- Respect the separation between public and internal docs when it exists.
|
|
169
169
|
- Keep content, navigation, and metadata in sync when docs are structured that way.
|
|
170
170
|
- If docs are missing and needed, create the minimum useful documentation.
|