feat(domain): add skill injection system for feature worktrees#509
Open
feat(domain): add skill injection system for feature worktrees#509
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ctor Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ll-injector Covers 9 architecture decisions including file copy strategy (fs.cp), command execution (DI ExecFunction), timeout mechanism (AbortController), SQLite storage (JSON column), settings location (WorkflowConfig), port interface design, git tracking detection, idempotency check, and migration numbering. Includes library analysis, security considerations, and performance implications. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…injector Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Define SkillSourceType enum (local/remote), SkillSource model, and SkillInjectionConfig model in settings.tsp. Add optional skillInjection field to WorkflowConfig. Regenerate domain types and JSON schemas. Includes unit test verifying generated type exports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…put field Add ISkillInjectorService port interface with inject() method and SkillInjectionResult type (injected/skipped/failed arrays). Extend CreateFeatureInput with optional injectSkills boolean for CLI override. Export new types from services barrel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
add skill injector infrastructure service with local skill deep-copy via fs.cp, remote skill installation via npx with 30s abort timeout, skill.md idempotency checks, gitignore management with git tracking detection, and input validation against shell injection and path traversal. register in di container alongside worktree service. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… and mapper Add SQLite migration 050 for skill_injection_enabled and skill_injection_skills columns. Update settings mapper with serialization/deserialization including buildSkillInjectionFromRow helper. Populate createDefaultSettings() with 7 curated local skills (disabled by default). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nd cli Wire ISkillInjectorService into CreateFeatureUseCase via constructor injection. Add guarded injection call in initializeAndSpawn() after attachment processing and before feature record update. Guard with resolved injectSkills flag (input override ?? settings ?? false). Wrap in try/catch for NFR-3 error isolation. Add --inject-skills / --no-inject-skills CLI flags to feat new command following the --fast / --no-fast pattern. Pass resolved value as injectSkills on CreateFeatureInput. When neither flag is provided, leave undefined to fall through to settings default. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Windows CI uses backslash path separators, so regex assertions must accept both / and \ to avoid false negatives on windows-latest. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ISkillInjectorServiceport interface andSkillInjectorServiceinfrastructure implementation that copies curated local skills and installs remote skills (vianpx skills add) into feature worktrees during creationSkillInjectionConfig,SkillSource, andSkillSourceTypeadded tosettings.tspwith generated types, JSON schema output, and settings factory defaults (7 curated local skills,enabled: false)050-add-skill-injection-config) addsskill_injection_enabledandskill_injection_skillscolumns; settings mapper handles serialization/deserialization of the new configinjectSkillsinput override, with full error isolation (failures log warnings, never block feature creation)--inject-skills/--no-inject-skillsonshep feat newfor per-invocation override of the settings valueSKILL.mdexistence) are skipped; injected skills are appended to the worktree's.gitignore(only if not already git-tracked)execFileinstead ofexecto avoid shell interpolationpath.join()/path.resolve(); 30-second timeout per remote skill installationEvidence
Spec
specs/081-skill-injector/— 13 functional requirements, 9 non-functional requirements across 4 architecture layers (TypeSpec → domain → application → infrastructure → presentation).Test plan
pnpm test:unit)pnpm build)pnpm lint:fix)pnpm tsp:compile)Built with Shep 🐑 Shep Bot