Skip to content

fix(skill): harden phase delivery quality loop - #122

Merged
aryeko merged 4 commits into
mainfrom
fix/phase-delivery-quality-v2
Jul 31, 2026
Merged

fix(skill): harden phase delivery quality loop#122
aryeko merged 4 commits into
mainfrom
fix/phase-delivery-quality-v2

Conversation

@aryeko

@aryeko aryeko commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • route Jig semantic implementer/reviewer roles through global offload planning without redefining offload
  • require authority resolution and concrete must-cover proof mapping before candidate freeze
  • bound implementer/reviewer replacement chains while preserving same-pair progress
  • add focused eval coverage for routing, fallback, authority, proof, reviewer evidence, and continuity

Why

Phase 2 showed that reviewer preparation and grouped findings improved review quality, but planned Luna/high work could still run through fixed Terra/medium runtime types, incomplete proof claims could freeze candidates, authority gaps reached implementation, and pair replacements discarded useful story context.

Scope

  • repository-local orchestration skill, design, protocol, and evals only
  • no product API, package contract, delivery DAG, ledger schema, or global offload change
  • no new agent, artifact, verifier, approval stage, or mandatory planning document

Verification

  • pnpm check — passed, 18/18 tasks
  • pnpm delivery:check — passed, 48 stories / 7 phases
  • python3 .agents/skills/orchestrate-phase-delivery/scripts/validate_evals.py — passed, 3 output evals / 20 balanced trigger queries
  • open-skill validate_skill.py — passed
  • git diff --check — passed
  • independent exact-candidate Terra/high review — passed after one scoped correction

Summary by CodeRabbit

  • Documentation

    • Updated delivery guidance for runtime routing, risk-based effort selection, authority resolution, implementation proof, review preparation, and recovery.
    • Added requirements for complete must-cover evidence, stable candidate inputs, verification ownership, fallback handling, and bounded retries.
    • Clarified when delivery must stop before changes proceed, including unavailable routing support or unresolved authority.
  • Tests

    • Updated evaluation scenarios to cover routing, authority handling, proof completeness, reviewer continuity, and worktree recovery.
    • Expanded trigger examples for phase starts and review loops.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a1fd0ef-2561-4528-a475-c2c5f267a913

📥 Commits

Reviewing files that changed from the base of the PR and between fbc5d12 and 745a9ef.

📒 Files selected for processing (1)
  • .agents/skills/orchestrate-phase-delivery/evals/evals.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • .agents/skills/orchestrate-phase-delivery/evals/evals.json

📝 Walkthrough

Walkthrough

The phase-delivery workflow now requires global offload planning for semantic roles. It adds authority gates, stable-ID review requirements, concrete proof mapping, candidate-bound review evidence, and bounded recovery rules.

Changes

Phase delivery quality loop

Layer / File(s) Summary
Offload routing and reviewer preparation
.agents/skills/orchestrate-phase-delivery/README.md, .agents/skills/orchestrate-phase-delivery/SKILL.md, .agents/skills/orchestrate-phase-delivery/implementer-review-design.md, .agents/skills/orchestrate-phase-delivery/references/phase-protocol.md, .agents/skills/orchestrate-phase-delivery/evals/*
Story admission requires global offload planning. Dispatch records route metadata. Effort classification includes non-local correctness factors. Reviewer preparation returns stable-ID must-cover bullets and authority status.
Proof mapping and candidate freeze
.agents/skills/orchestrate-phase-delivery/SKILL.md, .agents/skills/orchestrate-phase-delivery/implementer-review-design.md, .agents/skills/orchestrate-phase-delivery/references/phase-protocol.md, .agents/skills/orchestrate-phase-delivery/evals/*
Candidate freeze requires concrete mappings for every must-cover item. Mappings include implementation, type or test locations, sibling searches, and verification evidence. Reviewers inspect recorded evidence without rerunning checks.
Candidate review and bounded recovery
.agents/skills/orchestrate-phase-delivery/SKILL.md, .agents/skills/orchestrate-phase-delivery/implementer-review-design.md, .agents/skills/orchestrate-phase-delivery/references/phase-protocol.md, .agents/skills/orchestrate-phase-delivery/evals/evals.json
Candidate reviews receive exact inputs and report grouped findings, affected siblings, evidence gaps, and re-review scope. Replacement rules cover non-progress, route incompatibility, boundary violations, mutation, unavailability, and repeated root defects.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant PhaseDelivery
  participant offload
  participant Reviewer
  participant Implementer
  participant CandidateReview
  PhaseDelivery->>offload: plan semantic implementer and reviewer routes
  offload-->>PhaseDelivery: return compatible route metadata
  PhaseDelivery->>Reviewer: request must-cover bullets and authority result
  Reviewer-->>PhaseDelivery: return stable-ID bullets
  PhaseDelivery->>Implementer: pass route, bullets, and authority
  Implementer-->>PhaseDelivery: return proof mappings and verification evidence
  PhaseDelivery->>CandidateReview: provide exact candidate and recorded evidence
  CandidateReview-->>PhaseDelivery: return grouped findings and re-review scope
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: strengthening the phase delivery quality loop in the orchestration skill.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/phase-delivery-quality-v2

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 950ad97fb0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/orchestrate-phase-delivery/SKILL.md
Comment thread .agents/skills/orchestrate-phase-delivery/SKILL.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/orchestrate-phase-delivery/evals/evals.json:
- Around line 6-13: Update the evaluation’s expected_output and related
assertions so offload resolves only model, effort, compatible runtime type,
isolated context, budget, and fallback routing; require the local Jig workflow
to assign and record verification ownership in the dispatch trace. Remove
verification ownership from global offload planning while preserving all other
risk classification, authority, fallback, and admission requirements.

In @.agents/skills/orchestrate-phase-delivery/SKILL.md:
- Around line 45-55: The workflow must block all writes for an admitted story
when required authority is unresolved. In
.agents/skills/orchestrate-phase-delivery/SKILL.md lines 45-55, remove
permission for mixed-scope bookkeeping after OWNER_DECISION_REQUIRED; in
implementer-review-design.md lines 195-198, allow authorized bookkeeping only
when no required authority remains unresolved; in references/phase-protocol.md
lines 55-65, make OWNER_DECISION_REQUIRED stop every write for that story while
allowing independent ready stories to continue; and in evals/evals.json lines
5-18, require the GF-020-like story to stop until authority is resolved or scope
is explicitly reauthorized.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5443ea9f-bca0-4297-8e7f-25e77c4884d9

📥 Commits

Reviewing files that changed from the base of the PR and between a480923 and 950ad97.

📒 Files selected for processing (6)
  • .agents/skills/orchestrate-phase-delivery/README.md
  • .agents/skills/orchestrate-phase-delivery/SKILL.md
  • .agents/skills/orchestrate-phase-delivery/evals/evals.json
  • .agents/skills/orchestrate-phase-delivery/evals/trigger_queries.json
  • .agents/skills/orchestrate-phase-delivery/implementer-review-design.md
  • .agents/skills/orchestrate-phase-delivery/references/phase-protocol.md

Comment thread .agents/skills/orchestrate-phase-delivery/evals/evals.json Outdated
Comment thread .agents/skills/orchestrate-phase-delivery/SKILL.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.agents/skills/orchestrate-phase-delivery/evals/evals.json (2)

41-54: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve the full OWNER_DECISION_REQUIRED contract.

The protocol also allows material scope, dependency, realization, provider-reachability, and accepted-trade-off decisions. The phrase “only for a material authority decision” is narrower than that contract. State that this scenario has no such decision, or list the full allowed decision categories.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/orchestrate-phase-delivery/evals/evals.json around lines 41 -
54, Update the expected_output and related assertions for worktree recovery to
preserve the full OWNER_DECISION_REQUIRED contract: state that this scenario
contains no material authority decision, or explicitly include material scope,
dependency, realization, provider-reachability, and accepted-trade-off decisions
alongside authority decisions. Do not narrow the contract to authority decisions
alone.

41-50: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Scope incompatible-route replacement to implementers.

The protocol permits implementer replacement for an incompatible runtime route. Reviewer replacement is limited to repeated boundary breach, mutation, evidence writing, or loss of availability. The unqualified route condition here can authorize reviewer replacement for a route mismatch. Mark this condition as implementer-only, or update the protocol and design together if reviewer route mismatch is intended.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/skills/orchestrate-phase-delivery/evals/evals.json around lines 41 -
50, Update the incompatible approved runtime route replacement condition in the
protocol represented by the eval prompt and assertions so it applies only to
implementers, not reviewers. Preserve reviewer replacement eligibility
exclusively for repeated boundary breaches, mutation, evidence writing, or loss
of availability, and keep the existing implementer replacement behavior
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/orchestrate-phase-delivery/evals/evals.json:
- Around line 6-7: The expected output and its matching assertion should
distinguish runtime agent type from planned model and effort: reject fixed
runtime type Codex because it forces the incompatible Terra model at medium
effort, rather than describing Terra/medium as the fixed type. Preserve the
separate planned_model Luna and high-effort requirements.
- Around line 6-7: Update the evaluation prompt to provide explicit offload
route and fallback inputs for semantic reviewer roles, not only risky
implementers, before asserting that global offload plans every implementer and
reviewer. Preserve the expected requirement that both roles use planned model,
effort, compatible runtime type, isolated context, budget, and fallback routing.

---

Outside diff comments:
In @.agents/skills/orchestrate-phase-delivery/evals/evals.json:
- Around line 41-54: Update the expected_output and related assertions for
worktree recovery to preserve the full OWNER_DECISION_REQUIRED contract: state
that this scenario contains no material authority decision, or explicitly
include material scope, dependency, realization, provider-reachability, and
accepted-trade-off decisions alongside authority decisions. Do not narrow the
contract to authority decisions alone.
- Around line 41-50: Update the incompatible approved runtime route replacement
condition in the protocol represented by the eval prompt and assertions so it
applies only to implementers, not reviewers. Preserve reviewer replacement
eligibility exclusively for repeated boundary breaches, mutation, evidence
writing, or loss of availability, and keep the existing implementer replacement
behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 65eda84c-45b7-49d0-9c10-be15f76337d3

📥 Commits

Reviewing files that changed from the base of the PR and between 950ad97 and fbc5d12.

📒 Files selected for processing (5)
  • .agents/skills/orchestrate-phase-delivery/README.md
  • .agents/skills/orchestrate-phase-delivery/SKILL.md
  • .agents/skills/orchestrate-phase-delivery/evals/evals.json
  • .agents/skills/orchestrate-phase-delivery/implementer-review-design.md
  • .agents/skills/orchestrate-phase-delivery/references/phase-protocol.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .agents/skills/orchestrate-phase-delivery/README.md

Comment thread .agents/skills/orchestrate-phase-delivery/evals/evals.json Outdated
@aryeko
aryeko merged commit aea51ea into main Jul 31, 2026
2 checks passed
@aryeko
aryeko deleted the fix/phase-delivery-quality-v2 branch July 31, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant