Repository navigation
Carry flow guidance in the catalogue instead of CLI skills - #1305
Conversation
Moves when-to-offer and how-to-drive knowledge from CLI skills into flow definitions, so operator-published flows are offered like the review built-ins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server plan is drafted here and executes on a kcap-server branch; the CLI plan works against old and new servers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude moves to the composite provider with guidelines off; its guidelines arrive with the SessionStart response. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
suggest-review-flow is pruned from installed skill trees, so an upgraded user is not offered review twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoOffer and drive flows using catalogue guidance
AI Description
Diagram
High-Level Assessment
Files changed (38)
|
Code Review by Qodo
1.
|
|
|
||
| namespace Capacitor.Cli.Tests.Unit.SessionStartMemory; | ||
|
|
||
| sealed class FixedScope(string? repo, string? machine) : ISessionStartMemoryScopeResolver { |
There was a problem hiding this comment.
5. Two test helpers share a mismatched file 📘 Rule violation ⚙ Maintainability
SessionStartStubs.cs declares FixedScope and Handler as separate top-level types, but its filename matches neither type. Both were added as reusable test helpers, and neither fits the rule’s permitted enum, hierarchy, or registry exceptions.
Agent Prompt
## Issue description
SessionStartStubs.cs contains two top-level test helpers and is named after neither.
## Fix Focus Areas
- test/Capacitor.Cli.Tests.Unit/SessionStartMemory/SessionStartStubs.cs[8-26]
## Recommended Fix
Move FixedScope and Handler into separate files named FixedScope.cs and Handler.cs, preserving their namespace and visibility.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Fixed in bdd2dd6: split into FixedScope.cs and Handler.cs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b02a65eda8
ℹ️ 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".
|
|
||
| ## Read the flow's guide first | ||
|
|
||
| Call `get_flow_definition(definition_id)` before `start_flow`. The guide is written by whoever published the flow: what to put in `context`, which target to name, how to iterate on its results and when to close. Where it differs from the generic rules below, follow the guide. A server that does not publish guides says so; then work from the definition's description and the rules below. |
There was a problem hiding this comment.
Exempt inline definitions from the guide lookup
When the agent follows the documented dynamic-flow path immediately below this section, start_flow receives definition_yaml and there is no catalog definition_id that get_flow_definition can read. Requiring this call before every start therefore makes the skill instruct agents to issue an invalid lookup—or prevents them from starting a dynamic flow at all. Limit the requirement to catalog-backed starts and direct dynamic starts to use the guide embedded in their YAML/generic rules.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 8682ddb: get_flow_definition is required for catalogue starts only.
| using var cts = CancellationTokenSource.CreateLinkedTokenSource(request.CancellationToken, expiry.Token); | ||
|
|
||
| // The flows lane ignores scope, so it starts before scope resolves and survives its failure. | ||
| var flowsTask = request.FlowsDisabled ? null : RunLaneAsync(() => flows.FetchAsync(request, cts.Token)); |
There was a problem hiding this comment.
Bypass scope lookup for flows-only requests
When both memory and guidelines are disabled but flows remain enabled, this scope-independent request is started and then still waits for repository/machine scope resolution. If repository detection consumes the hook budget, the shared cancellation token expires and the outer bounded hook wait can discard the flow result, so the explicitly supported flows-only configuration emits no offers even when the definitions endpoint responds promptly. Return the flows task directly when the other two lanes are disabled instead of performing scope resolution.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 6a532c1: flows-only requests return the flows result without resolving scope.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #1304 — AI-3468
What & why
Agents learned when to offer review flows and how to drive them from CLI skills, so a flow an operator publishes was never offered. The CLI now takes that from the catalogue:
list_flow_definitionsshows when to use each flow.get_flow_definitionreturns a flow's driver guide.offer: proactiveflows on every harness withkcap-flowsregistered.agent-flowsdrives any flow;suggest-review-flowis retired.The server half (guidance block, by-id endpoint, built-in guides) is planned in
docs/superpowers/plans/2026-10-03-catalogue-flow-guidance-server.md.Where to look
kcap-suggest-review-flowfolders are pruned on upgrade.Verification
dotnet build Capacitor.slnx: 0 warnings. AOT publish: no IL2xxx/IL3xxx.🤖 Generated with Claude Code