Skip to content

fix: make apply blocked-state guidance profile-agnostic#1096

Open
mvanhorn wants to merge 2 commits into
Fission-AI:mainfrom
mvanhorn:fix/963-openspec-apply-blocked-state-core-profile
Open

fix: make apply blocked-state guidance profile-agnostic#1096
mvanhorn wants to merge 2 commits into
Fission-AI:mainfrom
mvanhorn:fix/963-openspec-apply-blocked-state-core-profile

Conversation

@mvanhorn
Copy link
Copy Markdown

@mvanhorn mvanhorn commented May 15, 2026

Summary

The blocked-state branch of getApplyChangeSkillTemplate suggested running openspec-continue-change, which is only available on the full profile. Users on the core profile (no continue-change skill) saw a dead suggestion when their change was blocked by missing artifacts. Change the guidance to ask the user to continue the missing artifacts before re-running apply, which works on every profile.

Why this matters

#963 reports the dead suggestion on the core profile. The skill template is the same source for both profiles, so any profile-specific suggestion creates this asymmetry. The replacement text is plain language and works on full profile too (since the suggestion is "continue the missing artifacts," which is what openspec-continue-change does anyway). Updated parity test enforces the new text and asserts the core-only skill name is gone.

Fixes #963

AI was used for assistance.

Summary by CodeRabbit

  • Bug Fixes

    • Improved apply workflow guidance when apply is blocked by missing artifacts: users are now instructed to continue work on those artifacts before re-running apply, removing references to unavailable actions.
  • Tests

    • Updated tests to reflect the new blocked-state guidance and verify profile-agnostic messaging.
  • Chores

    • Recorded a patch release documenting the fix.

Review Change Stack

@mvanhorn mvanhorn requested a review from TabishB as a code owner May 15, 2026 23:08
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5b126bc2-2112-45aa-a234-7f983b2038c4

📥 Commits

Reviewing files that changed from the base of the PR and between 70bc33f and 8f99bd8.

📒 Files selected for processing (2)
  • src/core/templates/workflows/apply-change.ts
  • test/core/templates/skill-templates-parity.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/core/templates/workflows/apply-change.ts
  • test/core/templates/skill-templates-parity.test.ts

📝 Walkthrough

Walkthrough

This PR fixes a bug where the core profile's apply-change workflow incorrectly suggested openspec-continue-change when a change was blocked due to missing artifacts. The guidance now instructs users to continue work on the missing artifacts before re-running apply. Tests and hash baselines were updated.

Changes

Apply-change blocked guidance fix

Layer / File(s) Summary
Guidance implementation and release notes
src/core/templates/workflows/apply-change.ts, .changeset/fix-apply-blocked-guidance.md
Blocked-state guidance updated to recommend continuing work on missing artifacts instead of suggesting openspec-continue-change. Changeset records the patch fix.
Test hash baselines and blocked-state assertion
test/core/templates/skill-templates-parity.test.ts
Parity test hashes updated for getApplyChangeSkillTemplate and generated openspec-apply-change content. New test asserts blocked-state guidance contains the updated message and excludes openspec-continue-change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • TabishB
  • alfred-openspec

Poem

🐰 In a patch where guidance led astray,
A rabbit hopped in to clear the way.
"Finish the missing bits, then run apply,"
No phantom skill—just sensible sky. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing profile-specific skill references from blocked-state guidance to make it profile-agnostic.
Linked Issues check ✅ Passed All code requirements from issue #963 are met: the guidance replaces openspec-continue-change with concept-based instructions, applies this to both skill template and opsx command, updates parity tests to prevent regressions, and ensures core profile templates are self-sufficient.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing issue #963: updating apply-change workflow guidance, refreshing test hashes, and adding a regression-prevention test case.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/core/templates/workflows/apply-change.ts (1)

210-210: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Update line 210 to use profile-agnostic guidance consistent with line 50.

Line 50 in getApplyChangeSkillTemplate() was updated to "suggest continuing work on the missing artifacts before re-running apply", but line 210 in getOpsxApplyCommandTemplate() still suggests using /opsx:continue. Since both templates are generated for the core profile (which includes the 'apply' workflow), and /opsx:continue is not available in core profile, this creates a user-facing inconsistency where the command template recommends a command that doesn't exist. Update line 210 to match the profile-agnostic guidance.

🤖 Prompt for 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.

In `@src/core/templates/workflows/apply-change.ts` at line 210, The message in
getOpsxApplyCommandTemplate() still tells users to run `/opsx:continue`, which
isn't available in the core profile; change the text to the profile-agnostic
guidance used in getApplyChangeSkillTemplate() — i.e., replace the
`/opsx:continue` suggestion with a recommendation to continue working on the
missing artifacts and re-run apply (phrase it like "suggest continuing work on
the missing artifacts before re-running apply") so both templates are
consistent.
🧹 Nitpick comments (1)
test/core/templates/skill-templates-parity.test.ts (1)

173-178: ⚡ Quick win

Consider: Test coverage should include command template consistency.

The new test verifies that getApplyChangeSkillTemplate() uses profile-agnostic guidance, but doesn't verify getOpsxApplyCommandTemplate(). If both templates should be profile-agnostic (as suggested by the PR objective to "make apply blocked-state guidance profile-agnostic"), consider adding a similar assertion for the command template.

🧪 Proposed test extension
   it('keeps apply blocked-state guidance profile-agnostic', () => {
     const content = generateSkillContent(getApplyChangeSkillTemplate(), 'PARITY-BASELINE');
 
     expect(content).toContain('suggest continuing work on the missing artifacts before re-running apply');
     expect(content).not.toContain('openspec-continue-change');
+
+    // Also verify command template consistency
+    const commandContent = getOpsxApplyCommandTemplate().content;
+    expect(commandContent).not.toContain('openspec-continue-change');
   });
🤖 Prompt for 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.

In `@test/core/templates/skill-templates-parity.test.ts` around lines 173 - 178,
The test currently checks that getApplyChangeSkillTemplate() is profile-agnostic
but misses getOpsxApplyCommandTemplate(); add a parallel assertion in
skill-templates-parity.test.ts that generates content from
getOpsxApplyCommandTemplate() with the same profile ('PARITY-BASELINE') and
asserts it contains the same blocked-state guidance text ('suggest continuing
work on the missing artifacts before re-running apply') and does not contain the
profile-specific marker ('openspec-continue-change'), using the same helper
generateSkillContent() to produce the content for the assertions.
🤖 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.

Outside diff comments:
In `@src/core/templates/workflows/apply-change.ts`:
- Line 210: The message in getOpsxApplyCommandTemplate() still tells users to
run `/opsx:continue`, which isn't available in the core profile; change the text
to the profile-agnostic guidance used in getApplyChangeSkillTemplate() — i.e.,
replace the `/opsx:continue` suggestion with a recommendation to continue
working on the missing artifacts and re-run apply (phrase it like "suggest
continuing work on the missing artifacts before re-running apply") so both
templates are consistent.

---

Nitpick comments:
In `@test/core/templates/skill-templates-parity.test.ts`:
- Around line 173-178: The test currently checks that
getApplyChangeSkillTemplate() is profile-agnostic but misses
getOpsxApplyCommandTemplate(); add a parallel assertion in
skill-templates-parity.test.ts that generates content from
getOpsxApplyCommandTemplate() with the same profile ('PARITY-BASELINE') and
asserts it contains the same blocked-state guidance text ('suggest continuing
work on the missing artifacts before re-running apply') and does not contain the
profile-specific marker ('openspec-continue-change'), using the same helper
generateSkillContent() to produce the content for the assertions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a2b2cee5-e820-42ba-a99a-b3bd776c745d

📥 Commits

Reviewing files that changed from the base of the PR and between 8498042 and 70bc33f.

📒 Files selected for processing (3)
  • .changeset/fix-apply-blocked-guidance.md
  • src/core/templates/workflows/apply-change.ts
  • test/core/templates/skill-templates-parity.test.ts

… template

Line 50 in getApplyChangeSkillTemplate was updated to profile-agnostic
phrasing; line 210 in getOpsxApplyCommandTemplate had the same /opsx:continue
suggestion. Update for consistency and refresh the parity-test hash.
@mvanhorn
Copy link
Copy Markdown
Author

Addressed in 8f99bd8:

  • apply-change.ts:210 (Major outside-diff) - getOpsxApplyCommandTemplate had the same /opsx:continue suggestion the SkillTemplate had at line 50. Changed both to the profile-agnostic phrasing so core profile users don't get a dead suggestion regardless of which template renders.
  • parity test hash updated to match.

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.

/opsx:apply suggests openspec-continue-change which is not installed on core profile

1 participant