feat: add canonical Relay agent skills - #32
Conversation
|
Warning Review limit reached
Next review available in: 21 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds canonical Relay agent skill documentation and fixtures, introduces comprehensive skill-asset validation, integrates it into repository validation, and adds unit tests covering policy, fixture, provenance, session-review, and canonical-source rules. ChangesCanonical agent skills
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Luna: step-by-step remediation plan for PR #32Address the review findings below in order. Keep the work strictly within issue #23 scope: canonical skills, deterministic fixtures, validators/tests, and supporting docs only. Do not add MCP/CLI implementation, lifecycle logic, vendor packaging, marketplace work, live-LLM tests, or a policy engine. Task 1 — Fix the Relay Capture provenance wordingProblem
This is ambiguous and conflicts with the actual Required changesEdit:
In the Capture procedure section, replace the broad instruction not to supply provenance fields with precise adapter-owned/caller-owned guidance. The resulting policy must explicitly state:
Suggested wording:
TestsUpdate/add focused tests in:
Add a regression test proving validation fails when the capture skill contains the old ambiguous wording or omits required caller-owned provenance guidance. Prefer validating policy concepts rather than one entire exact sentence. The test should require all of these concepts:
Acceptance criteria
Task 2 — Make session review unconditional before final completionProblemThe prohibited-behaviour wording currently says review must not be omitted "when captures may exist". That allows an agent to guess that no captures exist and skip the authoritative exact-session lookup. Issue #23 requires the agent to call the session-captures capability with the exact active session ID before final completion. An empty result is valid and authoritative. Required changesEdit:
Make the policy unambiguous:
Suggested wording for Prohibited behaviour:
Fixture updatesReview and, where useful, strengthen:
Add or update a negative case covering:
Use a stable issue-specific fixture ID such as:
Do not replace existing required fixture IDs. TestsUpdate/add tests in:
Add a regression test proving validation fails when the session-review skill makes the pre-completion lookup conditional, for example through phrases such as:
Keep the forbidden checks narrow enough to avoid false positives in explanatory examples. Acceptance criteria
Task 3 — Remove the fixture-coverage validation bypassProblem
if (cases.every((fixtureCase) => fixtureCase.id.startsWith('CASE-'))) return;This allows all required issue-specific fixtures to be replaced by arbitrary Required changesEdit:
Remove the Production validation must always enforce the required fixture IDs for each canonical fixture file. Do not add another content-based test-mode escape hatch. Test-fixture strategyIf unit tests currently depend on generic Recommended helper behaviour:
The helper may generate minimal valid case bodies, but it must not disable production invariants. TestsAdd a regression test proving:
Also retain or add a positive test proving the canonical required fixture set passes. Acceptance criteria
Task 4 — Add deterministic forbidden-policy checksProblemThe validator currently checks that required safe phrases exist, but it does not reject contradictory unsafe permissions elsewhere in the same skill. Example of a currently possible false pass:
Issue #23 requires forbidden vague or unsafe instructions to be absent. Required changesEdit:
Add a small, explicit validation layer for unsafe policy grants. Keep it deterministic and narrow. Do not attempt natural-language understanding or build a general policy engine. Suggested structure: function validateForbiddenPolicies(content: string, rules: readonly ForbiddenPolicyRule[]): voidEach rule should contain:
Minimum forbidden concepts to rejectFor
For
Important implementation constraintAvoid naive patterns that reject valid negative statements such as:
The forbidden patterns should target affirmative permission wording, for example combinations such as:
Keep the patterns inspectable and covered by focused tests. TestsUpdate:
Add table-driven tests for at least these contradictions:
Each test must fail for the unsafe contradiction, not merely because a required phrase was removed. Also include positive controls showing the canonical wording passes. Acceptance criteria
Task 5 — Review and strengthen fixture coverageReview all four canonical fixture files:
Ensure fixtures still cover every issue #23 requirement after the policy fixes. Capture positive coverageMust include:
Capture negative coverageMust include:
Session-review positive coverageMust include:
Session-review negative coverageMust include:
Keep fixtures concise and deterministic. They are policy examples, not executable end-to-end tests and not live-LLM evaluations. Task 6 — Update documentation only where policy changedReview:
Only change docs where needed to keep them consistent with the corrected canonical skills. The docs should state:
Do not duplicate detailed schemas or lifecycle rules into these docs. Task 7 — Diagnose and fix the current CI failureThe current PR workflow fails in the Required sequenceRun locally from a clean checkout of the PR branch: corepack enable
pnpm install --frozen-lockfile
pnpm verifyIf pnpm format:check
pnpm lint
pnpm typecheck
pnpm test
pnpm test:coverage
pnpm buildUse the actual Constraints
Required evidence in the PRUpdate the PR description or add a completion comment with:
Task 8 — Final self-review against issue #23Before requesting re-review, perform these human-readable checks:
pnpm verify
Completion checklistBefore marking this review addressed, all boxes must be true:
After completing the above, add a PR comment summarising each fix by task number and include the final verification result. |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@scripts/validate-repository-assets.ts`:
- Around line 201-209: Update the README validation loop in
scripts/validate-repository-assets.ts to parse Markdown link targets rather than
using readme.includes(requiredLink). Normalize each extracted target and compare
it against the required paths, so plain-text or code-block mentions do not
satisfy the check while valid links do.
In `@scripts/validate-skill-assets.ts`:
- Around line 295-302: Update the validation around canonicalSkillPaths and the
relay policy check to identify the applicable canonical skill from the asset’s
content or metadata, not its file path. Replace byte-for-byte comparison with
validation that the content contains an explicit link/reference to the selected
canonical source, allowing vendor skills to reference either Capture or Session
Review without requiring duplicated content.
- Around line 162-165: Update the exact-session lookup validation rule near the
pattern definition and its evaluation logic to recognize prohibition wording
such as “Do not skip…” and “must not omit…” as valid directives rather than
rejecting them. Require an affirmative permission or directive before reporting
this violation, and add regression cases covering both prohibition forms.
In `@skills/fixtures/session-review-negative.md`:
- Around line 97-111: Rename the duplicate fixture ID in
skills/fixtures/session-review-negative.md:97-111 to a unique canonical ID such
as REVIEW-GENERIC-MUTATION-007. Add the same ID to the required
session-review-negative coverage in scripts/validate-skill-assets.ts:91-99 and
to the generated valid fixture root in
tests/unit/scripts/validate-skill-assets.test.ts:47-53.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f0918de7-4373-4fa7-a86f-e8397b433a59
📒 Files selected for processing (14)
README.mddocs/agent-skills.mddocs/superpowers/plans/2026-07-28-issue-23-canonical-relay-skills.mddocs/superpowers/plans/2026-07-28-pr-32-review-remediation.mdscripts/validate-repository-assets.tsscripts/validate-skill-assets.tsskills/fixtures/capture-negative.mdskills/fixtures/capture-positive.mdskills/fixtures/session-review-negative.mdskills/fixtures/session-review-positive.mdskills/relay-capture/SKILL.mdskills/relay-session-review/SKILL.mdtests/unit/scripts/validate-repository-assets.test.tstests/unit/scripts/validate-skill-assets.test.ts
Summary
Validation
pnpm verifyVendor packaging and marketplace assets remain deferred to #24/#25.
Summary by CodeRabbit
Documentation
Validation
Tests