Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 25, 2025

Plan: Skip Skills in Resume Mode

  • Understand the codebase and how resume mode works
  • Add check in discoverSkills() to skip skill discovery when resume mode is enabled (similar to findExecuteRuleFiles)
  • Write unit tests to verify skills are not discovered in resume mode
  • Run existing tests to ensure no regressions
  • Manual verification of the fix
  • Run full test suite to ensure all tests pass
Original prompt

When used in resume mode, skills (like tasks) should not be returned.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
@alexec alexec marked this pull request as ready for review December 25, 2025 01:20
Copilot AI review requested due to automatic review settings December 25, 2025 01:20
@alexec alexec merged commit cf03e46 into main Dec 25, 2025
1 check passed
@alexec alexec deleted the copilot/remove-skills-from-resume-mode branch December 25, 2025 01:20
Copilot AI requested a review from alexec December 25, 2025 01:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements the feature to skip skills in resume mode, ensuring that when the -r (resume) flag is used, skill discovery is disabled, consistent with how rule files are already handled in resume mode.

  • Adds early return in discoverSkills() method to skip skill discovery when resume mode is enabled
  • Implements comprehensive unit test to verify skills are not discovered in resume mode

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/codingcontext/context.go Adds resume mode check at the beginning of discoverSkills() to skip skill discovery when resume flag is enabled, mirroring the existing pattern used in findExecuteRuleFiles()
pkg/codingcontext/context_test.go Adds table-driven test case that creates a skill file and verifies it is not included in the result when resume mode is enabled

func (cc *Context) discoverSkills() error {
// Skip skill discovery if resume mode is enabled
// Check cc.resume directly first, then fall back to selector check for backward compatibility
if cc.resume || (cc.includes != nil && cc.includes.GetValue("resume", "true")) {
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nil check for cc.includes is unnecessary here. The includes field is always initialized to a non-nil value in the New() function (line 45: includes: make(selectors.Selectors)), so it can never be nil. The check cc.resume alone is sufficient, as the selector check is only needed for backward compatibility with external callers that might set the selector directly.

Since this matches the pattern in findExecuteRuleFiles() at line 501, you may want to remove the nil check in both locations for consistency and simplicity.

Suggested change
if cc.resume || (cc.includes != nil && cc.includes.GetValue("resume", "true")) {
if cc.resume || cc.includes.GetValue("resume", "true") {

Copilot uses AI. Check for mistakes.
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