Repository navigation
feat: add adaptive workflow routing - #5
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds an adaptive routing directive and makes routing-first the initial workflow step; it adds YAML frontmatter metadata to many directives and skills for conditional loading; refines TDD to apply by default only to behavior-changing work; and updates templates and self-audit output to follow routed selections. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Agent as Agent
participant Router as Adaptive Router
participant Catalog as Directives/Skills Catalog
participant Executor as Executor (implement/tests/verify)
rect rgba(200,200,255,0.5)
User->>Agent: submit task
Agent->>Router: load adaptive-routing directive
Router->>Catalog: evaluate triggers / risk / evidence
Catalog-->>Router: selected path + directives/skills
Router-->>Agent: route (path, selected directives/skills)
end
rect rgba(200,255,200,0.5)
Agent->>Executor: load selected directives/skills
Executor->>Executor: perform implementation / tests / checks
Executor->>Agent: results, evidence, confirmations
Agent->>User: deliver output & ask clarifying question if needed
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@directives/task-framing.md`:
- Around line 23-25: The load sentence in directives/task-framing.md dropped the
explicit "high-risk tasks" condition; update the sentence loaded by
directives/adaptive-routing.md to explicitly include "high-risk tasks" (e.g.,
"Load this directive when selected by directives/adaptive-routing.md before
high-risk or non-trivial tasks — new features, cross-cutting refactors,
ambiguous requests, or anything affecting repo-wide conventions.") so the
trigger criteria remain consistent with the examples and routing decisions.
In `@templates/copilot-instructions.md`:
- Around line 54-56: The "Use when: ≤2 files changed" constraint in
templates/copilot-instructions.md conflicts with
directives/adaptive-routing.md's behavior-based Light Path definition; update
templates/copilot-instructions.md by either removing the "≤2 files changed"
file-count constraint entirely or adding a clear precedence note stating that
adaptive-routing.md's behavior-based classification (see
directives/adaptive-routing.md, Light Path rules around risk/behavior types)
overrides the file-count heuristic so routing decisions remain authoritative and
unambiguous.
🪄 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
Run ID: 7257edad-4ca3-4da7-addc-bb9357905115
📒 Files selected for processing (21)
README.mddirectives/adaptive-routing.mddirectives/architecture-boundaries.mddirectives/codebase-navigation.mddirectives/error-memory.mddirectives/exploration-mode.mddirectives/session-decisions.mddirectives/specification-driven-development.mddirectives/task-framing.mddirectives/test-driven-development.mddirectives/type-driven-development.mddirectives/verification.mdskills/architecture-boundary-reviewer/SKILL.mdskills/codebase-health-reviewer/SKILL.mdskills/self-audit/SKILL.mdskills/spec-reviewer/SKILL.mdskills/systematic-debugging/SKILL.mdskills/test-reviewer/SKILL.mdtemplates/AGENTS.mdtemplates/CLAUDE.mdtemplates/copilot-instructions.md
There was a problem hiding this comment.
Pull request overview
This PR introduces an “adaptive routing” directive that selects the lightest safe workflow (Light/Full + specialized paths) and updates templates/directives/skills to support conditional loading via machine-readable frontmatter.
Changes:
- Add
directives/adaptive-routing.mdand update templates to load it first (instead of loading every directive by default). - Add YAML frontmatter metadata (
name,description,version, routing hints) across directives and skills. - Adjust TDD/verification wording to apply strict RED/GREEN primarily to behavior-changing work and add quality-gate feedback guidance.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| templates/copilot-instructions.md | Route-first guidance and Light/Full path workflow wording for Copilot instructions |
| templates/CLAUDE.md | Route-first guidance and updated “routed sequences” framing |
| templates/AGENTS.md | Route-first guidance and directive table now includes adaptive routing |
| skills/test-reviewer/SKILL.md | Add version + routing metadata frontmatter |
| skills/systematic-debugging/SKILL.md | Add version + routing metadata frontmatter |
| skills/spec-reviewer/SKILL.md | Add version + routing metadata frontmatter |
| skills/self-audit/SKILL.md | Add version + routing metadata; refine PR self-audit output guidance |
| skills/codebase-health-reviewer/SKILL.md | Add version + routing metadata frontmatter |
| skills/architecture-boundary-reviewer/SKILL.md | Add version + routing metadata frontmatter |
| directives/verification.md | Add frontmatter + “Quality Gate Feedback” guidance |
| directives/type-driven-development.md | Add frontmatter + routing metadata |
| directives/test-driven-development.md | Add frontmatter + narrow strict TDD wording to behavior-changing work |
| directives/task-framing.md | Add frontmatter + routing metadata; align loading to adaptive routing |
| directives/specification-driven-development.md | Add frontmatter + routing metadata |
| directives/session-decisions.md | Add frontmatter + routing metadata |
| directives/exploration-mode.md | Add frontmatter + routing metadata |
| directives/error-memory.md | Add frontmatter + routing metadata |
| directives/codebase-navigation.md | Add frontmatter + routing metadata; clarify when routing may skip it |
| directives/architecture-boundaries.md | Add frontmatter + routing metadata; add guidance on inferred boundary changes |
| directives/adaptive-routing.md | New router directive defining paths, risk escalation, and required evidence |
| README.md | Document adaptive routing as a first-class directive and explain frontmatter hints |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| For detailed guidance on each workflow rule, load `adaptive-routing.md` first, | ||
| then load only the selected directive from the `directives/` directory: | ||
|
|
||
| - `adaptive-routing.md` — Selects workflow path and required directives/skills | ||
| - `codebase-navigation.md` — SAFE exploration pattern |
There was a problem hiding this comment.
In this template the routing references drop the directives/ prefix (e.g., adaptive-routing.md). Elsewhere in the repo/templates the canonical path is directives/adaptive-routing.md; using bare filenames makes it ambiguous where to load from. Update these references (and the bullet list) to use directives/... consistently.
|
Addressed the current review comments in
Verification: |
Summary
directives/adaptive-routing.mdto select the lightest safe workflow based on task intent, risk, and touched surfaces.Verification
git diff --checkpassed.name,description,version, YAML parse, body present).Notes
This is cohesive enough for one PR: the router, frontmatter metadata, and wording adjustments depend on each other. I did not split into multiple PRs because the template changes need the new router and metadata context to make sense.
Summary by CodeRabbit
New Features
Updates