Compare commits
2
Commits
a42120b1aa
...
3bca64c258
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bca64c258 | ||
|
|
b2146510af |
No files matched your search
@@ -17,7 +17,7 @@ description: >-
|
|||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
1. **Pin the fixed point and scope.** Resolve the base ref and record exact base and head commit SHAs (`git rev-parse <base> HEAD`). Inspect working-tree state (`git status --short`, unstaged `git diff`, staged `git diff --cached`, and relevant untracked files) alongside committed history (`git diff <base>...HEAD` and `git log <base>..HEAD --oneline`). Record the covered revisions and working-tree diff state (for example, clean tree or diff fingerprint) so downstream tools can verify whether the reviewed diff remained unchanged, and distinguish findings across committed, staged, and unstaged changes.
|
1. **Pin the fixed point and scope.** Resolve the base ref and record exact base and head commit SHAs (`git rev-parse <base> HEAD`). Inspect working-tree state (`git status --short`, unstaged `git diff`, staged `git diff --cached`, and relevant untracked files) alongside committed history (`git diff <base>...HEAD` and `git log <base>..HEAD --oneline`). Record the covered revisions and working-tree diff state (for example, clean tree or diff fingerprint) so downstream tools can verify whether the reviewed diff remained unchanged, and distinguish findings across committed, staged, and unstaged changes.
|
||||||
2. **Select execution tier.** Match the change to the risk tiers from [axes](references/axes.md) (`Lightweight`, `Standard`, or `High-Assurance`). Single-agent sequential pass for Lightweight; independent review passes for Standard; isolated subagents per axis for High-Assurance.
|
2. **Select execution tier.** Match the change to the risk tiers from [axes](references/axes.md) (`Lightweight`, `Standard`, or `High-Assurance`). Single-agent sequential pass for `Lightweight`; independent review passes for `Standard`; for `High-Assurance`, never run `Sequential` or a single combined subagent: spawn a dedicated isolated Axis 3 (`Seam & Test Integrity`) subagent separate from Axes 1/2/4 and record both subagent IDs in `Execution Mode`.
|
||||||
3. **Inspect the four axes.** Evaluate the diff against each axis independently using [axes](references/axes.md):
|
3. **Inspect the four axes.** Evaluate the diff against each axis independently using [axes](references/axes.md):
|
||||||
- **Spec & Scope**: originating requirements satisfied, aligned with canonical project direction (`ARCHITECTURE.md`, `ROADMAP.md`, ADRs, active milestone) when present, minimal shared-file footprint, zero scope creep.
|
- **Spec & Scope**: originating requirements satisfied, aligned with canonical project direction (`ARCHITECTURE.md`, `ROADMAP.md`, ADRs, active milestone) when present, minimal shared-file footprint, zero scope creep.
|
||||||
- **Standards & Smells**: repository rules and Fowler smell diagnostics from [smell-heuristics](references/smell-heuristics.md) (evaluated as confirmed violations, potential smells, or contextual trade-offs).
|
- **Standards & Smells**: repository rules and Fowler smell diagnostics from [smell-heuristics](references/smell-heuristics.md) (evaluated as confirmed violations, potential smells, or contextual trade-offs).
|
||||||
@@ -27,11 +27,11 @@ description: >-
|
|||||||
5. **Aggregate without silent resolution.** When multiple reviewers or passes disagree, keep the disagreement visible under `Unresolved` until evidence settles it.
|
5. **Aggregate without silent resolution.** When multiple reviewers or passes disagree, keep the disagreement visible under `Unresolved` until evidence settles it.
|
||||||
6. **Emit executable runtime checks.** For stateful or high-risk paths that static inspection cannot prove, emit runnable fenced shell commands for `verify-slice` following the Step 6 contract in [finding-schema](references/finding-schema.md) (stating purpose, `local` vs. `live-infra` scope classification, explicit pass condition, and explicit failure signal).
|
6. **Emit executable runtime checks.** For stateful or high-risk paths that static inspection cannot prove, emit runnable fenced shell commands for `verify-slice` following the Step 6 contract in [finding-schema](references/finding-schema.md) (stating purpose, `local` vs. `live-infra` scope classification, explicit pass condition, and explicit failure signal).
|
||||||
7. **Present the review summary.** Group findings by axis and apply the decision matrix from [axes](references/axes.md): `Needs Rework` (confirmed defects require changes), `Blocked` (unresolved Critical/High risks or unestablished scope), or `Ready` (all four axes completed, no confirmed or unresolved blocking findings remain, and exact covered revisions plus working-tree state are recorded). Static review establishes static provenance for that diff only; never authorize release.
|
7. **Present the review summary.** Group findings by axis and apply the decision matrix from [axes](references/axes.md): `Needs Rework` (confirmed defects require changes), `Blocked` (unresolved Critical/High risks or unestablished scope), or `Ready` (all four axes completed, no confirmed or unresolved blocking findings remain, and exact covered revisions plus working-tree state are recorded). Static review establishes static provenance for that diff only; never authorize release.
|
||||||
8. **Draft the PR comment block.** When the target is an open pull request, draft `review-body.md` (and `inline-comments.json` when inline findings exist) per section 4 of [finding-schema](references/finding-schema.md), including the compact 4-axis pass block on clean `Ready` reviews. Never post to Gitea yourself: hand the block to `gitea-pr`.
|
8. **Draft and publish the PR review block (standalone open PR only).** Keep the codebase strictly read-only (never edit repo files or mutate project boards). When invoked standalone on an open PR, draft `review-body.md` (and `inline-comments.json` when inline findings exist) per section 4 of [finding-schema](references/finding-schema.md), including the compact 4-axis pass block on clean `Ready` reviews. Show the draft for owner approval; once approved, publish one `--comment` review pinned with `--commit <reviewed-head-sha>` (passing `head_sha` and duplicate/pending guards, and creating any `issue`-routed follow-ups via `gitea-plan` first). Skip PR publishing when delegated inside `implement-slice`.
|
||||||
|
|
||||||
## Your call
|
## Your call
|
||||||
- **Handling findings**: decide whether confirmed findings block merge, trigger a rework loop, or become tracked follow-up issues.
|
- **Handling findings**: decide whether confirmed findings block merge, trigger a rework loop, or become tracked follow-up issues.
|
||||||
- **Publishing findings**: decide whether the PR comment block is posted, and confirm each finding's placement and follow-up route.
|
- **Publishing findings**: approve the drafted review body, inline list, and follow-up routes before `code-review` posts to the PR.
|
||||||
- **Adjudicating unresolved disagreements**: resolve conflicting reviewer perspectives or accepted architectural trade-offs.
|
- **Adjudicating unresolved disagreements**: resolve conflicting reviewer perspectives or accepted architectural trade-offs.
|
||||||
- **Authorizing release**: verification and review evidence inform decisions, but the human owner remains the sole release authority.
|
- **Authorizing release**: verification and review evidence inform decisions, but the human owner remains the sole release authority.
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ The final review summary presented to the user must follow this structure:
|
|||||||
- **Base Commit**: `<base-ref>` (`<base-commit-sha>`) -> `<HEAD>` (`<head-commit-sha>`)
|
- **Base Commit**: `<base-ref>` (`<base-commit-sha>`) -> `<HEAD>` (`<head-commit-sha>`)
|
||||||
- **Covered Working-Tree State**: `Clean` | Staged, unstaged, and relevant untracked summary plus content fingerprint (covering staged changes, unstaged changes, and relevant untracked file contents so downstream tools can verify zero state drift)
|
- **Covered Working-Tree State**: `Clean` | Staged, unstaged, and relevant untracked summary plus content fingerprint (covering staged changes, unstaged changes, and relevant untracked file contents so downstream tools can verify zero state drift)
|
||||||
- **Assigned Risk Tier**: `Lightweight` | `Standard` | `High-Assurance`
|
- **Assigned Risk Tier**: `Lightweight` | `Standard` | `High-Assurance`
|
||||||
- **Execution Mode**: `Sequential` | `Independent Passes` | `Subagent Reviewers`
|
- **Execution Mode**: `Sequential` (`Lightweight` only) | `Independent Passes` (`Standard`) | `Subagent Reviewers` (`High-Assurance` mandatory: Axes 1/2/4 subagent `<id>`, Dedicated Axis 3 Tests subagent `<id>`)
|
||||||
|
|
||||||
## Findings Ledger
|
## Findings Ledger
|
||||||
|
|
||||||
@@ -95,9 +95,9 @@ systemctl reload app-daemon.service && systemctl is-active --quiet app-daemon.se
|
|||||||
- **Suggested Next Step**: `/<skill> <args>` (emit one concrete command matched to the recommendation on standalone turns; omit when running inside a delegated subagent).
|
- **Suggested Next Step**: `/<skill> <args>` (emit one concrete command matched to the recommendation on standalone turns; omit when running inside a delegated subagent).
|
||||||
```
|
```
|
||||||
|
|
||||||
## 4. PR Comment Block (Drafted Here, Published by `gitea-pr`)
|
## 4. PR Review Block (Drafted and Published Here After Owner Approval)
|
||||||
|
|
||||||
When the review target is an open pull request, `code-review` also drafts a PR comment block so the findings stay attached to the change they describe. `code-review` never posts it and never mutates Gitea project boards: it hands the block to `gitea-pr` (or `implement-slice`), which publishes the review and ensures the issue card sits in `Review` when the verdict is `Ready`.
|
`code-review` is strictly read-only regarding the codebase (never modifies repository files, commits, or Gitea project boards), and owns publishing comment-only PR reviews when invoked standalone on an open pull request. When running as a delegated subagent inside `implement-slice`, skip PR posting and return the compact report to the orchestrator.
|
||||||
|
|
||||||
### What goes in
|
### What goes in
|
||||||
- Every finding except `Rejected` ones (those stay in the local ledger only).
|
- Every finding except `Rejected` ones (those stay in the local ledger only).
|
||||||
@@ -157,3 +157,26 @@ No non-rejected findings.
|
|||||||
```
|
```
|
||||||
|
|
||||||
Every inline entry also appears in the body table, so the record stays complete if inline placement is rejected and the entry moves to the body.
|
Every inline entry also appears in the body table, so the record stays complete if inline placement is rejected and the entry moves to the body.
|
||||||
|
|
||||||
|
### Publishing via `gt pr review` (After Owner Approval)
|
||||||
|
If any finding is routed `follow-up: issue`, create the tracked issue via `gitea-plan` first so the comment links to it. Then verify guards and publish one comment-only review pinned to the reviewed commit:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Staleness: the PR head must equal the reviewed head SHA. Mismatch: stop, re-run code-review.
|
||||||
|
gt pr view <number> --json head_sha -q .head_sha
|
||||||
|
|
||||||
|
# 2. Duplicates and pending state: stop if any review is PENDING (posting would publish its
|
||||||
|
# inline comments too) or if a review already exists for the reviewed SHA from this block.
|
||||||
|
gt pr review list <number> --json id,state,commit,body
|
||||||
|
|
||||||
|
# 3. After owner approval: one comment-only review, pinned to the reviewed commit.
|
||||||
|
gt pr review <number> --comment --commit <reviewed-head-sha> \
|
||||||
|
-F review-body.md --comments-file inline-comments.json --json id,url
|
||||||
|
|
||||||
|
# Body-only block (no inline entries): omit --comments-file.
|
||||||
|
```
|
||||||
|
|
||||||
|
- Never pass `--approve` or `--request-changes`: the verdict in the body is informational, and merge authority stays with the owner (Gitea also refuses approval on your own PR).
|
||||||
|
- Never pass `--yes`: it exists to publish a pending review, which step 2 already rules out.
|
||||||
|
- If Gitea rejects an inline entry (line outside a diff hunk), confirm with step 2 that no review was created, move that entry into the body, and retry once.
|
||||||
|
- Record the returned review `id` and `url`. Later fixes use `gt pr review reply` with `Fixed in <sha>` and `gt pr review resolve` via `gitea-pr`.
|
||||||
@@ -30,12 +30,12 @@ description: >-
|
|||||||
with test seams and falsifiable acceptance criteria (Context, Solution, Criteria),
|
with test seams and falsifiable acceptance criteria (Context, Solution, Criteria),
|
||||||
grouping TDD test seams vertically by submodule or capability rather than a single
|
grouping TDD test seams vertically by submodule or capability rather than a single
|
||||||
monolithic upfront test block across all modules.
|
monolithic upfront test block across all modules.
|
||||||
4. **Run independent reproducibility audit.** Spawn clean-room subagent with raw
|
4. **Run independent reproducibility audit (`Medium`/`Large` mandatory).** For `Medium`
|
||||||
input manifest (commit SHA, specs, proposed issue markdown). Review 5-section
|
and `Large` plans, spawn a clean-room subagent with raw input manifest (commit SHA,
|
||||||
evaluation to resolve material ambiguities before human gate.
|
specs, proposed issue markdown) to resolve material ambiguities before the human gate.
|
||||||
5. **Present decomposition for approval.** Present proposed milestone, board,
|
5. **Present decomposition for approval.** Emit `### Reproducibility Audit: <Passed|Remediated> (Subagent: <id> | Omitted: Small tier)`
|
||||||
issues, and any proposed repository `AGENTS.md` planning-contract diff with
|
alongside proposed milestone, board, issues, and any `AGENTS.md` contract diff. Stop
|
||||||
audit disposition. Stop for approval before mutating Gitea entities or `AGENTS.md`.
|
for approval before mutating Gitea entities or `AGENTS.md`.
|
||||||
6. **Execute Gitea operations via `gt` CLI.** Use verified commands from `gt-usage`:
|
6. **Execute Gitea operations via `gt` CLI.** Use verified commands from `gt-usage`:
|
||||||
- Milestones: `gt milestone create "<title>" -d "<desc>" --json id,url`.
|
- Milestones: `gt milestone create "<title>" -d "<desc>" --json id,url`.
|
||||||
- Projects: create with `gt project create "<title>" --template none --json id,url` if
|
- Projects: create with `gt project create "<title>" --template none --json id,url` if
|
||||||
|
|||||||
@@ -50,16 +50,17 @@ Never mechanically mirror or silently mutate state. Instead, detect and report s
|
|||||||
| **Medium** | Vertical feature slice, multi-step refactor, performance spike (2 to 5 issues) | 1 Milestone + 2 to 5 Issues | **Recommended** (5-column Kanban: *Backlog*, *Ready*, *Work in Progress*, *Review*, *Completed*) | Each issue has its own branch and PR. All issues include explicit numbered acceptance criteria and test seams. |
|
| **Medium** | Vertical feature slice, multi-step refactor, performance spike (2 to 5 issues) | 1 Milestone + 2 to 5 Issues | **Recommended** (5-column Kanban: *Backlog*, *Ready*, *Work in Progress*, *Review*, *Completed*) | Each issue has its own branch and PR. All issues include explicit numbered acceptance criteria and test seams. |
|
||||||
| **Large** | Architectural epic, platform cutover, multi-service evolution | Roadmap Doc + Rolling Milestones + Deliverable Issues | **Required** (Board coordinates rolling horizons) | Source of truth remains in repo docs (`ARCHITECTURE.md`, `ROADMAP.md`, ADRs). Gitea coordinates rolling execution. |
|
| **Large** | Architectural epic, platform cutover, multi-service evolution | Roadmap Doc + Rolling Milestones + Deliverable Issues | **Required** (Board coordinates rolling horizons) | Source of truth remains in repo docs (`ARCHITECTURE.md`, `ROADMAP.md`, ADRs). Gitea coordinates rolling execution. |
|
||||||
|
|
||||||
**Deterministic Output Header**: Every planning proposal must explicitly state:
|
**Deterministic Output Headers**: Every planning proposal must explicitly state both headers before asking for approval:
|
||||||
```markdown
|
```markdown
|
||||||
### Project Board Policy: <Omitted|Recommended|Required> (Rationale)
|
### Project Board Policy: <Omitted|Recommended|Required> (Rationale)
|
||||||
|
### Reproducibility Audit: <Passed | Remediated> (Subagent: `<conversation-id>` | `Omitted: Small tier`)
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 4. Independent Zero-Context Reproducibility Audit
|
## 4. Independent Zero-Context Reproducibility Audit (`Medium` and `Large` Mandatory)
|
||||||
|
|
||||||
Before finalizing decomposition for approval, run a clean-room audit subagent to verify plan reproducibility without conversational context:
|
Before presenting a `Medium` or `Large` decomposition for approval (Step 5), spawn a clean-room audit subagent to verify plan reproducibility without conversational context and record its `<conversation-id>` in the `### Reproducibility Audit:` header:
|
||||||
|
|
||||||
### Input Manifest (Strict Clean-Room)
|
### Input Manifest (Strict Clean-Room)
|
||||||
The auditor receives strictly raw artifacts and pinned repository state:
|
The auditor receives strictly raw artifacts and pinned repository state:
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ description: >-
|
|||||||
- Opening or updating a pull request on Gitea after implementing an issue or feature.
|
- Opening or updating a pull request on Gitea after implementing an issue or feature.
|
||||||
- Synthesizing static code review and runtime verification evidence into a reviewable PR.
|
- Synthesizing static code review and runtime verification evidence into a reviewable PR.
|
||||||
- Tracking review comments, requested changes, and CI checks toward merge readiness.
|
- Tracking review comments, requested changes, and CI checks toward merge readiness.
|
||||||
- Publishing a `code-review` PR comment block (findings and nits) onto an open pull request.
|
- Not for static code inspection or publishing PR review blocks: use `code-review`.
|
||||||
- Not for static code inspection: use `code-review`.
|
|
||||||
- Not for runtime behavioral verification: use `verify-slice`.
|
- Not for runtime behavioral verification: use `verify-slice`.
|
||||||
- Not for branch creation, committing, rebasing, or local history integration: use `git-manager`.
|
- Not for branch creation, committing, rebasing, or local history integration: use `git-manager`.
|
||||||
|
|
||||||
@@ -43,22 +42,16 @@ description: >-
|
|||||||
`gt pr create -t "<title>" -B "<base>" -H "<branch>" -F <body-file> --json number,url`.
|
`gt pr create -t "<title>" -B "<base>" -H "<branch>" -F <body-file> --json number,url`.
|
||||||
Pass `--draft` if work remains in progress. Extract verified PR number and URL, and ensure
|
Pass `--draft` if work remains in progress. Extract verified PR number and URL, and ensure
|
||||||
the linked issue card is in `Review` (`Work in Progress -> Review`) on the project board.
|
the linked issue card is in `Review` (`Work in Progress -> Review`) on the project board.
|
||||||
6. **Publish review findings (when a `code-review` comment block exists).** Follow
|
6. **Track review feedback, merge on owner approval, and move card `Review -> Completed`.**
|
||||||
[references/gt-pulls.md](references/gt-pulls.md) section 3: confirm the remote PR head equals
|
|
||||||
the reviewed head SHA (else stop and re-run `code-review`), confirm no pending review and no
|
|
||||||
prior review for that SHA exists, show the body and inline list for approval, then post one
|
|
||||||
`--comment` review pinned with `--commit`. Never `--approve` or `--request-changes`. Findings
|
|
||||||
routed `issue` get their issue (via `gitea-plan`) before posting so the comment links to it.
|
|
||||||
7. **Track review feedback, merge on owner approval, and move card `Review -> Completed`.**
|
|
||||||
Inspect status checks (`gt pr checks <number>`), mergeability
|
Inspect status checks (`gt pr checks <number>`), mergeability
|
||||||
(`gt pr view <number> --json mergeable,review_decision`), and review comments
|
(`gt pr view <number> --json mergeable,review_decision`), and review comments
|
||||||
(`gt pr review comments <number>`). When all checks pass and review feedback is resolved,
|
(`gt pr review comments <number>`). If the current PR head lacks a published `code-review`
|
||||||
report `Ready for Merge`. Never merge automatically: once the human owner explicitly
|
comment, hand off to `code-review`. When checks pass and feedback is resolved, report
|
||||||
authorizes merge, run `gt pr merge <number>` and move the linked issue card `Review -> Completed`.
|
`Ready for Merge`. Once the owner explicitly authorizes merge, run `gt pr merge <number>`
|
||||||
|
and move the linked issue card `Review -> Completed`.
|
||||||
|
|
||||||
## Your call
|
## Your call
|
||||||
- **PR title and description approval**: review and approve the draft PR content and issue linkage.
|
- **PR title and description approval**: review and approve the draft PR content and issue linkage.
|
||||||
- **Publishing review findings**: approve the comment block and each finding's placement and follow-up route before it is posted.
|
|
||||||
- **Review feedback triage**: decide how to address review comments (rework, clarification, deferral).
|
- **Review feedback triage**: decide how to address review comments (rework, clarification, deferral).
|
||||||
- **Merge and release authorization**: decide when to merge the PR into the target base branch.
|
- **Merge and release authorization**: decide when to merge the PR into the target base branch.
|
||||||
|
|
||||||
@@ -67,10 +60,9 @@ description: >-
|
|||||||
review and mergeability status is reported to the user.
|
review and mergeability status is reported to the user.
|
||||||
|
|
||||||
## Hands off to
|
## Hands off to
|
||||||
- `code-review`: if review packet is missing/stale (`Suggested Next Step: /code-review <base>..HEAD`).
|
- `code-review`: if the PR head lacks a static review comment or the diff changed (`Suggested Next Step: /code-review <pr-number>`).
|
||||||
- `verify-slice`: if runtime QA packet is missing/stale (`Suggested Next Step: /verify-slice`).
|
- `verify-slice`: if new code requires runtime verification (`Suggested Next Step: /verify-slice`).
|
||||||
- `gitea-plan`: to create follow-up issues routed `issue` (`Suggested Next Step: /gitea-plan`).
|
|
||||||
- `reconcile-docs`: after merge when docs/milestones shift (`Suggested Next Step: /reconcile-docs`).
|
- `reconcile-docs`: after merge when docs/milestones shift (`Suggested Next Step: /reconcile-docs`).
|
||||||
- `implement-slice`: after merge when next issue is queued (`Suggested Next Step: /implement-slice #<next-issue>`).
|
- `implement-slice`: after merge when next issue is queued (`Suggested Next Step: /implement-slice #<next-issue>`).
|
||||||
- `git-manager`: to commit review fixes, rebase, or update against base.
|
- `git-manager`: to commit review fixes, rebase, or update against base.
|
||||||
- Emit one outcome-matched `Suggested Next Step` per [skeleton](../build-skill/references/skeleton.md).
|
- Emit one outcome-matched `Suggested Next Step` on every standalone turn (including when CI is pending after PR creation: `/code-review <pr-number>` or `/gitea-pr <pr-number>`) per [skeleton](../build-skill/references/skeleton.md).
|
||||||
@@ -86,28 +86,7 @@ gt pr review resolve <comment-id>
|
|||||||
gt pr review unresolve <comment-id>
|
gt pr review unresolve <comment-id>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Publish a `code-review` Comment Block
|
*(Publishing new `code-review` PR review blocks is owned by `code-review` in `skills/code-review/references/finding-schema.md`.)*
|
||||||
Input: `review-body.md` and `inline-comments.json` drafted by `code-review` (section 4 of its `finding-schema.md`), plus the reviewed head SHA from the block header.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. Staleness: the PR head must equal the reviewed head SHA. Mismatch: stop, re-run code-review.
|
|
||||||
gt pr view <number> --json head_sha -q .head_sha
|
|
||||||
|
|
||||||
# 2. Duplicates and pending state: stop if any review is PENDING (posting would publish its
|
|
||||||
# inline comments too) or if a review already exists for the reviewed SHA from this block.
|
|
||||||
gt pr review list <number> --json id,state,commit,body
|
|
||||||
|
|
||||||
# 3. After owner approval: one comment-only review, pinned to the reviewed commit.
|
|
||||||
gt pr review <number> --comment --commit <reviewed-head-sha> \
|
|
||||||
-F review-body.md --comments-file inline-comments.json --json id,url
|
|
||||||
|
|
||||||
# Body-only block (no inline entries): omit --comments-file.
|
|
||||||
```
|
|
||||||
|
|
||||||
- Never pass `--approve` or `--request-changes`: the verdict in the body is informational, and merge authority stays with the owner (Gitea also refuses approval on your own PR).
|
|
||||||
- Never pass `--yes`: it exists to publish a pending review, which step 2 already rules out.
|
|
||||||
- If Gitea rejects an inline entry (line outside a diff hunk), confirm with step 2 that no review was created, move that entry into the body, and retry once.
|
|
||||||
- Record the returned review `id` and `url`. Later fixes use `gt pr review reply` with `Fixed in <sha>` and `gt pr review resolve`, per the triage workflow in `pr-lifecycle.md`.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ Never relay "QA failed" blindly. Classify each non-passing outcome and route to
|
|||||||
|
|
||||||
## 9. Project Board Card Transitions Owned by `implement-slice`
|
## 9. Project Board Card Transitions Owned by `implement-slice`
|
||||||
|
|
||||||
When the repository tracks a Gitea Project Board (resolved from the `AGENTS.md` planning contract or `gt project list`), `implement-slice` owns moving the target issue's card across the pipeline using the `gt-usage` move recipe (`POST /repos/{owner}/{repo}/projects/<project-id>/issues/<global-issue-id>/move -F column_id=<target-col-id>`):
|
When the repository tracks a Gitea Project Board (resolved from the `AGENTS.md` planning contract or `gt project list`), `implement-slice` owns moving the target issue's card across the pipeline using the `gt-usage` move recipe (`POST /repos/{owner}/{repo}/projects/<project-id>/issues/<global-issue-id>/move -F column_id=<target-col-id>` for repo boards, or `POST /orgs/<org>/projects/<project-id>/issues/<global-issue-id>/move -F column_id=<target-col-id>` for organization-level boards):
|
||||||
|
|
||||||
| Step | Transition | Condition |
|
| Step | Transition | Condition |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ These boundaries hold across every slice size and risk tier:
|
|||||||
| :--- | :--- | :--- | :--- |
|
| :--- | :--- | :--- | :--- |
|
||||||
| **`Small` x `Lightweight`** | 1 implementation worker subagent on slice branch (`tdd` where applicable + `git-manager` checkpoint commit + self-audit). | Skip separate mid-slice QA subagent if deterministic worker evidence satisfies the pre-committed rubric; run final-`HEAD` `verify-slice` Lightweight checks. | Single-pass `code-review` (`Lightweight`) + final-`HEAD` `verify-slice` confirmation. |
|
| **`Small` x `Lightweight`** | 1 implementation worker subagent on slice branch (`tdd` where applicable + `git-manager` checkpoint commit + self-audit). | Skip separate mid-slice QA subagent if deterministic worker evidence satisfies the pre-committed rubric; run final-`HEAD` `verify-slice` Lightweight checks. | Single-pass `code-review` (`Lightweight`) + final-`HEAD` `verify-slice` confirmation. |
|
||||||
| **`Small`/`Medium` x `Standard`** | Sequential worker subagent(s) per task/chunk on slice branch (or isolated worktrees only if tasks are genuinely independent). | Spawn independent rubric QA subagent (`verify-slice` `Standard`) at chunk boundary or slice completion when stateful/UI/API behavior warrants separation. | Independent `code-review` (`Standard`, including strategic alignment) + final-`HEAD` `verify-slice` packet. |
|
| **`Small`/`Medium` x `Standard`** | Sequential worker subagent(s) per task/chunk on slice branch (or isolated worktrees only if tasks are genuinely independent). | Spawn independent rubric QA subagent (`verify-slice` `Standard`) at chunk boundary or slice completion when stateful/UI/API behavior warrants separation. | Independent `code-review` (`Standard`, including strategic alignment) + final-`HEAD` `verify-slice` packet. |
|
||||||
| **Any Size x `High-Assurance`** (or `Large` multi-chunk slice) | Sequential tasks on slice branch or isolated per-task worktrees for independent tracks; strict checkpoint boundaries. | Spawn clean black-box QA subagent (`verify-slice` `High-Assurance`), withholding diff narrative and worker self-audit per `verify-slice` Step 3. | Isolated multi-axis `code-review` (`High-Assurance`) + final-`HEAD` `verify-slice` packet (including any emitted `RV-*` checks). |
|
| **Any Size x `High-Assurance`** (or `Large` multi-chunk slice) | Sequential tasks on slice branch or isolated per-task worktrees for independent tracks; strict checkpoint boundaries. | Spawn clean black-box QA subagent (`verify-slice` `High-Assurance`), withholding diff narrative and worker self-audit per `verify-slice` Step 3. | Spawn isolated `code-review` subagents (`High-Assurance`: dedicated Axis 3 `Seam & Test Integrity` subagent + Axes 1/2/4 subagent) + final-`HEAD` `verify-slice` packet (including any emitted `RV-*` checks). |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+26
-10
@@ -17,6 +17,7 @@ Verifies:
|
|||||||
11. Project board 5-column reconciliation, semantic hex colors, and transition ownership
|
11. Project board 5-column reconciliation, semantic hex colors, and transition ownership
|
||||||
12. reconcile-docs read-only Gitea ingestion and bidirectional hooks with gitea-plan / implement-slice
|
12. reconcile-docs read-only Gitea ingestion and bidirectional hooks with gitea-plan / implement-slice
|
||||||
13. Polyglot TDD hardening (Mode A/B, 5 languages, 5 empirical invariants), code-review Axis 3 binding, and Suggested Next Step soft-chaining
|
13. Polyglot TDD hardening (Mode A/B, 5 languages, 5 empirical invariants), code-review Axis 3 binding, and Suggested Next Step soft-chaining
|
||||||
|
14. Subagent provenance output-slot guards for High-Assurance code-review and gitea-plan reproducibility audit
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@@ -365,22 +366,16 @@ class TestSkillsBehavioralContracts(unittest.TestCase):
|
|||||||
self.assertEqual(initial_commit, current_commit)
|
self.assertEqual(initial_commit, current_commit)
|
||||||
|
|
||||||
def test_review_comment_publishing_ownership(self):
|
def test_review_comment_publishing_ownership(self):
|
||||||
"""Proves code-review only drafts the PR comment block and gitea-pr alone posts it, guarded."""
|
"""Proves code-review stays codebase-read-only while owning guarded PR review publishing, and gitea-pr delegates it."""
|
||||||
cr_dir = REPO_ROOT / "skills" / "code-review"
|
cr_dir = REPO_ROOT / "skills" / "code-review"
|
||||||
cr_text = "\n".join(p.read_text() for p in cr_dir.rglob("*.md"))
|
cr_text = "\n".join(p.read_text() for p in cr_dir.rglob("*.md"))
|
||||||
# code-review drafts the block (including clean Ready reviews) but never contains a posting command
|
|
||||||
self.assertIn("review-body.md", cr_text)
|
self.assertIn("review-body.md", cr_text)
|
||||||
self.assertIn("inline-comments.json", cr_text)
|
self.assertIn("inline-comments.json", cr_text)
|
||||||
self.assertIn("No non-rejected findings.", cr_text)
|
self.assertIn("No non-rejected findings.", cr_text)
|
||||||
self.assertIsNone(
|
self.assertIn("read-only regarding the codebase", cr_text)
|
||||||
re.search(r"gt pr (comment|review)\s+<", cr_text),
|
|
||||||
"code-review must not contain gt posting commands; gitea-pr owns publishing",
|
|
||||||
)
|
|
||||||
|
|
||||||
pr_skill = (REPO_ROOT / "skills" / "gitea-pr" / "SKILL.md").read_text()
|
schema = (cr_dir / "references" / "finding-schema.md").read_text()
|
||||||
recipes = (REPO_ROOT / "skills" / "gitea-pr" / "references" / "gt-pulls.md").read_text()
|
publish = schema.split("### Publishing via `gt pr review`", 1)[1]
|
||||||
self.assertIn("Publish review findings", pr_skill)
|
|
||||||
publish = recipes.split("### Publish a `code-review` Comment Block", 1)[1].split("\n## ", 1)[0]
|
|
||||||
post_cmd = re.search(r"gt pr review <number> --comment[^\n]*\n[^\n]*", publish).group(0)
|
post_cmd = re.search(r"gt pr review <number> --comment[^\n]*\n[^\n]*", publish).group(0)
|
||||||
# pinned to the reviewed commit, comment-only, no blanket confirmation
|
# pinned to the reviewed commit, comment-only, no blanket confirmation
|
||||||
self.assertIn("--commit <reviewed-head-sha>", post_cmd)
|
self.assertIn("--commit <reviewed-head-sha>", post_cmd)
|
||||||
@@ -390,6 +385,13 @@ class TestSkillsBehavioralContracts(unittest.TestCase):
|
|||||||
self.assertLess(publish.index("head_sha"), publish.index(post_cmd))
|
self.assertLess(publish.index("head_sha"), publish.index(post_cmd))
|
||||||
self.assertLess(publish.index("gt pr review list"), publish.index(post_cmd))
|
self.assertLess(publish.index("gt pr review list"), publish.index(post_cmd))
|
||||||
|
|
||||||
|
# gitea-pr no longer owns PR review block publishing (no duplicate recipe)
|
||||||
|
pr_skill = (REPO_ROOT / "skills" / "gitea-pr" / "SKILL.md").read_text()
|
||||||
|
pr_pulls = (REPO_ROOT / "skills" / "gitea-pr" / "references" / "gt-pulls.md").read_text()
|
||||||
|
self.assertNotIn("Publish review findings", pr_skill)
|
||||||
|
self.assertNotIn("### Publish a `code-review` Comment Block", pr_pulls)
|
||||||
|
self.assertIn("/orgs/<org>/projects/<project-id>/issues/<global-issue-id>/move", (REPO_ROOT / "skills" / "implement-slice" / "references" / "handoff-contracts.md").read_text())
|
||||||
|
|
||||||
def test_project_board_reconciliation_and_card_transitions(self):
|
def test_project_board_reconciliation_and_card_transitions(self):
|
||||||
"""Proves 5-column board reconciliation, Deep Signal colors, and card transition ownership."""
|
"""Proves 5-column board reconciliation, Deep Signal colors, and card transition ownership."""
|
||||||
tiers_text = (REPO_ROOT / "skills" / "gitea-plan" / "references" / "decomposition-tiers.md").read_text()
|
tiers_text = (REPO_ROOT / "skills" / "gitea-plan" / "references" / "decomposition-tiers.md").read_text()
|
||||||
@@ -546,6 +548,20 @@ class TestSkillsBehavioralContracts(unittest.TestCase):
|
|||||||
resolved = (skill_path.parent / rel_link).resolve()
|
resolved = (skill_path.parent / rel_link).resolve()
|
||||||
self.assertTrue(resolved.exists(), f"{skill_name} has broken relative link: {rel_link} -> {resolved}")
|
self.assertTrue(resolved.exists(), f"{skill_name} has broken relative link: {rel_link} -> {resolved}")
|
||||||
|
|
||||||
|
def test_subagent_provenance_output_slot_guards(self):
|
||||||
|
"""Proves High-Assurance code-review and Medium/Large gitea-plan require subagent provenance slots in output templates."""
|
||||||
|
cr_skill = (REPO_ROOT / "skills" / "code-review" / "SKILL.md").read_text()
|
||||||
|
cr_schema = (REPO_ROOT / "skills" / "code-review" / "references" / "finding-schema.md").read_text()
|
||||||
|
impl_tiers = (REPO_ROOT / "skills" / "implement-slice" / "references" / "orchestration-tiers.md").read_text()
|
||||||
|
plan_skill = (REPO_ROOT / "skills" / "gitea-plan" / "SKILL.md").read_text()
|
||||||
|
plan_tiers = (REPO_ROOT / "skills" / "gitea-plan" / "references" / "decomposition-tiers.md").read_text()
|
||||||
|
|
||||||
|
self.assertIn("record both subagent IDs in `Execution Mode`", cr_skill)
|
||||||
|
self.assertIn("Dedicated Axis 3 Tests subagent `<id>`", cr_schema)
|
||||||
|
self.assertIn("dedicated Axis 3 `Seam & Test Integrity` subagent + Axes 1/2/4 subagent", impl_tiers)
|
||||||
|
self.assertIn("### Reproducibility Audit:", plan_skill)
|
||||||
|
self.assertIn("### Reproducibility Audit:", plan_tiers)
|
||||||
|
|
||||||
def test_skill_inventory_and_skeletons(self):
|
def test_skill_inventory_and_skeletons(self):
|
||||||
"""Proves all 16 active skills meet line count (<= 80), em-dash, and path portability rules."""
|
"""Proves all 16 active skills meet line count (<= 80), em-dash, and path portability rules."""
|
||||||
for skill_name in EXPECTED_SKILLS:
|
for skill_name in EXPECTED_SKILLS:
|
||||||
|
|||||||
Reference in new issue
Block a user