Skip to content

WIP: Update CLI to capture skills update made locally and submit then…#127

Closed
cteyton wants to merge 16 commits intomainfrom
124-capture-cp-skills
Closed

WIP: Update CLI to capture skills update made locally and submit then…#127
cteyton wants to merge 16 commits intomainfrom
124-capture-cp-skills

Conversation

@cteyton
Copy link
Copy Markdown
Contributor

@cteyton cteyton commented Feb 14, 2026

… to packmind

Explanation

Relates to #

Type of Change

  • Bug fix
  • New feature
  • Improvement/Enhancement
  • Refactoring
  • Documentation
  • Breaking change

Affected Components

  • Domain packages affected:
  • Frontend / Backend / Both:
  • Breaking changes (if any):

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing completed
  • Test coverage maintained or improved

Test Details:

TODO List

  • CHANGELOG Updated
  • Documentation Updated

Reviewer Notes

cteyton and others added 9 commits February 13, 2026 17:56
- Guard skillFileId with early return and use createSkillFileId consistently
- Centralize serializeSkillMetadata in @packmind/node-utils
- Fix strategy abstraction leak by adding diffNewFiles to IDiffStrategy
- Remove as unknown as casts in CreateChangeProposalUseCase tests
- Add validation for updateSkillFileContent in SkillChangeProposalValidator
- Make modeToPermissionString non-exported
- Rename NonSkillDiffStrategy to CommandDiffStrategy

#127

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SkillFileOutput type to packages/types/src/deployments/FileUpdates.ts
- Replace inline type definitions in ClaudeDeployer, CopilotDeployer, CursorDeployer
- Remove leftover console.log debug statements in CursorDeployer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add DiffContext type with skillFolders to IDiffStrategy
- Prefix skillFolders with relativePath in DiffArtefactsUseCase
- Use computeRelativePath() to dynamically resolve skill-relative paths
- Fix nested path support (e.g. src/frontend/.cursor/skills/slug/)
- Restrict CommandDiffStrategy to command artifact type only
- Add tests for Copilot skill paths and nested relativePath scenarios

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lidator

- Add SkillVersionNotFoundError and SkillFileNotFoundError error classes
- Throw SkillVersionNotFoundError when skill version is null
- Throw SkillFileNotFoundError when target file is not found
- Add validateDeleteFile method for deleteSkillFile type
- Add tests for all validation failure scenarios

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract mockPull typed variable to avoid repeated casts on Gateway function type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add error logging in BatchCreateChangeProposalsUseCase catch block for diagnosability
- Fix hardcoded 'read' permission in addSkillFile to use actual POSIX permissions from filesystem
- Extract resolveSkillFile() with path-based fallback for stale file IDs across skill versions
- Exclude null metadata fields in SkillChangeProposalValidator to match CLI serialization

#124

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread apps/cli/src/infra/commands/diffArtefactsHandler.ts
cteyton and others added 7 commits February 15, 2026 22:59
Replace random UUID with file relative path in SkillDiffStrategy.diffNewFiles()
so that server-side duplicate detection correctly skips already-pending proposals
on repeated `diff --submit` runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deduplicate identical changes across agent folders so content/diff lines
show once, and implement proper submit summary with counts for submitted,
already submitted, and errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Split vulnerable regex into two non-backtracking replacements and use localeCompare for deterministic string sorting.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backport improvements from main: replace O(n²) subGroupByChangeContent
with Map-based O(n) approach, remove skipped artifact logging, guard
empty summary parts, and extract changeCount variable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace /\/+$/ regex flagged by SonarQube for super-linear backtracking
with safe startsWith/endsWith while-loop approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

cteyton added a commit that referenced this pull request Feb 16, 2026
- Guard skillFileId with early return and use createSkillFileId consistently
- Centralize serializeSkillMetadata in @packmind/node-utils
- Fix strategy abstraction leak by adding diffNewFiles to IDiffStrategy
- Remove as unknown as casts in CreateChangeProposalUseCase tests
- Add validation for updateSkillFileContent in SkillChangeProposalValidator
- Make modeToPermissionString non-exported
- Rename NonSkillDiffStrategy to CommandDiffStrategy

#127

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cteyton cteyton closed this Feb 16, 2026
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.

1 participant