Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 19, 2026

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

    • Change selection now infers the target from conversation context, announces “Using change: ”, and only prompts when ambiguous; you can override by specifying the change name (e.g., /opsx:apply ). Recent changes are surfaced with recommendations for quick selection.
  • Documentation

    • Workflow docs clarified to explain inference behavior, announcement messaging, ambiguity prompts, and override options.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Warning

Rate limit exceeded

@TabishB has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between f360ecd and 4526ae3.

📒 Files selected for processing (1)
  • src/core/templates/skill-templates.ts
📝 Walkthrough

Walkthrough

Templates 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 /opsx:apply <name> when juggling multiple changes.

Changes

Cohort / File(s) Summary
Documentation
docs/experimental-workflow.md
Added sentence instructing use of /opsx:apply <name> when juggling multiple changes; clarified behavior when no change name is provided (inference → announce inferred target → prompt only if ambiguous).
Skill & Slash Command Templates
src/core/templates/skill-templates.ts
Updated text in OpenSpec SkillTemplate/CommandTemplate providers to remove the hard prompt requirement: templates now attempt to infer the target change from conversation, announce “Using change: ” when inferred, validate via OpenSpec list/status, and fall back to prompting only on ambiguity. No public signatures changed.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 I hop through lines and sniff a name,
I pick the change and call its frame,
If trails are thin or paths collide,
I pause and ask which step to guide,
Hooray — a clever hop and stride! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'OPSX apply: infer target change' directly reflects the main change in the pull request, which updates the opsx:apply command to infer the target change from conversation context rather than requiring explicit prompts.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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.

❤️ Share

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

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.

@TabishB TabishB force-pushed the TabishB/opsx-changeid-doc branch from f360ecd to 571c1eb Compare January 19, 2026 03:31
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.
@TabishB TabishB force-pushed the TabishB/opsx-changeid-doc branch from 571c1eb to e2b5142 Compare January 19, 2026 03:35
@TabishB TabishB merged commit dd53fb7 into main Jan 19, 2026
8 checks passed
@TabishB TabishB deleted the TabishB/opsx-changeid-doc branch January 19, 2026 03:44
StrayDragon pushed a commit to StrayDragon/OpenSpec that referenced this pull request Jan 20, 2026
* 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.
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.

2 participants