-
Notifications
You must be signed in to change notification settings - Fork 1.2k
OPSX apply: infer target change #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTemplates and docs now infer a target change when no explicit name is provided, announce the inferred choice with “Using change: ”, validate via OpenSpec list/status, and only prompt the user if inference is ambiguous; docs add a note about using Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Skill as SkillTemplate\n(opsx command)
participant Context as Conversation\nInference
participant CLI as OpenSpec\n(list/status)
rect rgba(200,230,255,0.5)
User->>Skill: Invoke /opsx:apply (no name)
Skill->>Context: Attempt to infer target change
alt single confident inference
Context-->>Skill: inferred change name
Skill->>CLI: validate change (list/status)
CLI-->>Skill: validation result
Skill->>User: "Using change: <name>" (announce)
else ambiguous or no inference
Context-->>Skill: ambiguous / no candidate
Skill->>User: Prompt to choose from active/top-N changes
User-->>Skill: Selects change
Skill->>CLI: validate chosen change
CLI-->>Skill: validation result
end
Skill->>User: Proceed with apply (or show error)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Review CompleteYour review story is ready! Comment !reviewfast on this PR to re-generate the story. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/core/templates/skill-templates.ts`:
- Around line 502-516: Update the "Resolve the target change (infer → fallback)"
section to explicitly handle multiple or conflicting change-name mentions:
detect when more than one change name is referenced in the conversation and
treat that as ambiguous, then follow the existing fallback logic (run `openspec
list --json`, prefer most-recently modified change not blocked via `openspec
instructions apply --change "<name>" --json`, otherwise pick most-recently
modified and explain how to unblock) and always announce the chosen change with
the required phrasing ("Using change: <name>") plus how to override (e.g.,
`/opsx:apply <other>` or "Use change <other>"); apply the same clarification in
the duplicate section around lines 1274-1288.
f360ecd to
571c1eb
Compare
Update all change selection instructions across all opsx commands (apply, continue, sync, archive, verify, ff) to use consistent wording: "If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes." For apply specifically, also simplifies Step 1 from ~180 to ~60 words while preserving the same behavior: infer from conversation, auto-select if single change, prompt via AskUserQuestion if ambiguous, always announce. Removes micromanagement details (validation commands, recommendation markers, presentation specifics) and trusts the LLM to figure out reasonable defaults.
571c1eb to
e2b5142
Compare
* opsx: infer change for apply * opsx: prompt when apply ambiguous * opsx: use AskUserQuestion when ambiguous * Simplify opsx:apply change selection instructions Update all change selection instructions across all opsx commands (apply, continue, sync, archive, verify, ff) to use consistent wording: "If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes." For apply specifically, also simplifies Step 1 from ~180 to ~60 words while preserving the same behavior: infer from conversation, auto-select if single change, prompt via AskUserQuestion if ambiguous, always announce. Removes micromanagement details (validation commands, recommendation markers, presentation specifics) and trusts the LLM to figure out reasonable defaults.
Make /opsx:apply infer the target change from the conversation and fall back to the most recently modified change when ambiguous, while clearly announcing the selection. Clarify positional change-name usage in OPSX command templates and docs.
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.