@skillkit/resources 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/agents/index.ts","../src/agents/manifest.ts","../src/commands/manifest.ts","../src/commands/index.ts","../src/profiles/manifest.ts","../src/profiles/index.ts","../src/guidelines/manifest.ts","../src/guidelines/index.ts","../src/hooks/manifest.ts","../src/hooks/index.ts","../src/index.ts"],"sourcesContent":["import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'node:fs';\nimport { join, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { homedir } from 'node:os';\n\nimport { BUNDLED_AGENTS, AGENT_MANIFEST } from './manifest.js';\nimport type {\n BundledAgent,\n AgentManifest,\n AgentCategory,\n AgentInstallOptions,\n AgentInstallResult,\n} from './types.js';\n\nexport type { BundledAgent, AgentManifest, AgentCategory, AgentInstallOptions, AgentInstallResult };\nexport { BUNDLED_AGENTS, AGENT_MANIFEST };\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\nfunction getTemplatesDir(): string {\n return join(__dirname, '..', '..', 'templates', 'agents');\n}\n\nexport function getBundledAgents(): BundledAgent[] {\n return BUNDLED_AGENTS;\n}\n\nexport function getBundledAgent(id: string): BundledAgent | null {\n return BUNDLED_AGENTS.find(a => a.id === id) || null;\n}\n\nexport function getBundledAgentsByCategory(category: AgentCategory): BundledAgent[] {\n return BUNDLED_AGENTS.filter(a => a.category === category);\n}\n\nexport function getBundledAgentIds(): string[] {\n return BUNDLED_AGENTS.map(a => a.id);\n}\n\nexport function getAgentTemplate(id: string): string | null {\n const agent = getBundledAgent(id);\n if (!agent) return null;\n\n const templatePath = join(getTemplatesDir(), `${id}.md`);\n\n try {\n if (existsSync(templatePath)) {\n return readFileSync(templatePath, 'utf-8');\n }\n return null;\n } catch {\n return null;\n }\n}\n\nexport function installBundledAgent(\n id: string,\n options: AgentInstallOptions = {}\n): AgentInstallResult {\n const agent = getBundledAgent(id);\n if (!agent) {\n return {\n success: false,\n agentId: id,\n path: '',\n message: `Bundled agent not found: ${id}`,\n };\n }\n\n const template = getAgentTemplate(id);\n if (!template) {\n return {\n success: false,\n agentId: id,\n path: '',\n message: `Template not found for agent: ${id}`,\n };\n }\n\n let targetDir: string;\n if (options.targetDir) {\n targetDir = options.targetDir;\n } else if (options.global) {\n targetDir = join(homedir(), '.claude', 'agents');\n } else {\n targetDir = join(process.cwd(), '.claude', 'agents');\n }\n\n const targetPath = join(targetDir, `${id}.md`);\n\n if (existsSync(targetPath) && !options.force) {\n return {\n success: false,\n agentId: id,\n path: targetPath,\n message: `Agent already exists: ${targetPath}. Use --force to overwrite.`,\n };\n }\n\n try {\n if (!existsSync(targetDir)) {\n mkdirSync(targetDir, { recursive: true });\n }\n\n writeFileSync(targetPath, template);\n\n return {\n success: true,\n agentId: id,\n path: targetPath,\n message: `Installed agent: ${agent.name}`,\n };\n } catch (error) {\n return {\n success: false,\n agentId: id,\n path: targetPath,\n message: `Failed to install agent: ${error instanceof Error ? error.message : 'Unknown error'}`,\n };\n }\n}\n\nexport function getInstalledAgentIds(searchDirs?: string[]): string[] {\n const dirs = searchDirs || [\n join(process.cwd(), '.claude', 'agents'),\n join(homedir(), '.claude', 'agents'),\n ];\n\n const installed = new Set<string>();\n\n for (const dir of dirs) {\n if (existsSync(dir)) {\n try {\n const files = require('node:fs').readdirSync(dir);\n for (const file of files) {\n if (file.endsWith('.md')) {\n installed.add(file.replace('.md', ''));\n }\n }\n } catch {\n continue;\n }\n }\n }\n\n return Array.from(installed);\n}\n\nexport function getAvailableAgents(searchDirs?: string[]): BundledAgent[] {\n const installed = new Set(getInstalledAgentIds(searchDirs));\n return BUNDLED_AGENTS.filter(a => !installed.has(a.id));\n}\n\nexport function isAgentInstalled(id: string, searchDirs?: string[]): boolean {\n return getInstalledAgentIds(searchDirs).includes(id);\n}\n","import type { BundledAgent, AgentManifest } from './types.js';\n\nexport const BUNDLED_AGENTS: BundledAgent[] = [\n {\n id: 'architect',\n name: 'Architect',\n description: 'Software architecture specialist for system design, scalability, and technical decision-making',\n category: 'planning',\n model: 'opus',\n tools: ['Read', 'Grep', 'Glob'],\n tags: ['architecture', 'design', 'planning', 'scalability'],\n version: '1.0.0',\n },\n {\n id: 'build-error-resolver',\n name: 'Build Error Resolver',\n description: 'Build and TypeScript error resolution specialist. Fixes build/type errors with minimal diffs',\n category: 'development',\n model: 'sonnet',\n tools: ['Read', 'Write', 'Edit', 'Bash', 'Grep', 'Glob'],\n tags: ['build', 'typescript', 'errors', 'debugging'],\n version: '1.0.0',\n },\n {\n id: 'code-reviewer',\n name: 'Code Reviewer',\n description: 'Expert code review specialist. Reviews code for quality, security, and maintainability',\n category: 'review',\n model: 'sonnet',\n tools: ['Read', 'Grep', 'Glob', 'Bash'],\n tags: ['review', 'quality', 'best-practices'],\n version: '1.0.0',\n },\n {\n id: 'doc-updater',\n name: 'Documentation Updater',\n description: 'Documentation and codemap specialist. Updates codemaps, READMEs, and guides',\n category: 'documentation',\n model: 'sonnet',\n tools: ['Read', 'Write', 'Edit', 'Bash', 'Grep', 'Glob'],\n tags: ['documentation', 'readme', 'guides'],\n version: '1.0.0',\n },\n {\n id: 'e2e-runner',\n name: 'E2E Test Runner',\n description: 'End-to-end testing specialist using Playwright. Generates, maintains, and runs E2E tests',\n category: 'testing',\n model: 'sonnet',\n tools: ['Read', 'Write', 'Edit', 'Bash', 'Grep', 'Glob'],\n tags: ['testing', 'e2e', 'playwright', 'automation'],\n version: '1.0.0',\n },\n {\n id: 'planner',\n name: 'Implementation Planner',\n description: 'Expert planning specialist for complex features and refactoring. Creates step-by-step plans',\n category: 'planning',\n model: 'opus',\n tools: ['Read', 'Grep', 'Glob'],\n tags: ['planning', 'design', 'architecture'],\n version: '1.0.0',\n },\n {\n id: 'refactor-cleaner',\n name: 'Refactor & Clean',\n description: 'Dead code cleanup and consolidation specialist. Removes unused code and duplicates',\n category: 'refactoring',\n model: 'sonnet',\n tools: ['Read', 'Write', 'Edit', 'Bash', 'Grep', 'Glob'],\n tags: ['refactoring', 'cleanup', 'dead-code'],\n version: '1.0.0',\n },\n {\n id: 'security-reviewer',\n name: 'Security Reviewer',\n description: 'Security vulnerability detection and remediation specialist. OWASP Top 10, secrets, injection',\n category: 'security',\n model: 'opus',\n tools: ['Read', 'Write', 'Edit', 'Bash', 'Grep', 'Glob'],\n tags: ['security', 'vulnerabilities', 'owasp', 'audit'],\n version: '1.0.0',\n },\n {\n id: 'tdd-guide',\n name: 'TDD Guide',\n description: 'Test-Driven Development specialist. Write tests first, then implement minimal code to pass',\n category: 'testing',\n model: 'sonnet',\n tools: ['Read', 'Write', 'Edit', 'Bash', 'Grep'],\n tags: ['testing', 'tdd', 'unit-tests', 'coverage'],\n version: '1.0.0',\n },\n];\n\nexport const AGENT_MANIFEST: AgentManifest = {\n version: 1,\n agents: BUNDLED_AGENTS,\n};\n","import type { CommandTemplate, CommandManifest } from './types.js';\n\nexport const COMMAND_TEMPLATES: CommandTemplate[] = [\n {\n id: 'tdd',\n name: 'TDD Workflow',\n description: 'Test-Driven Development workflow: RED → GREEN → REFACTOR',\n category: 'testing',\n trigger: '/tdd',\n agent: 'tdd-guide',\n prompt: `Start TDD workflow for the requested feature or fix.\n\nFollow the RED → GREEN → REFACTOR cycle:\n\n1. **RED**: Write a failing test that describes the expected behavior\n2. **GREEN**: Write the minimum code needed to pass the test\n3. **REFACTOR**: Improve the code while keeping tests green\n\nGuidelines:\n- One test at a time\n- Tests should be small and focused\n- Commit after each GREEN phase\n- Keep refactoring incremental\n\nStart by asking: What behavior should we test first?`,\n examples: [\n '/tdd add validation to user form',\n '/tdd implement search functionality',\n ],\n },\n {\n id: 'plan',\n name: 'Implementation Planning',\n description: 'Create a detailed implementation plan before coding',\n category: 'planning',\n trigger: '/plan',\n agent: 'planner',\n prompt: `Create an implementation plan for the requested feature or change.\n\nInclude:\n1. Requirements analysis\n2. Current state assessment\n3. Proposed approach with alternatives\n4. Step-by-step implementation tasks\n5. Risk assessment and mitigations\n6. Verification criteria\n\nWait for plan approval before any implementation.`,\n examples: [\n '/plan add user authentication',\n '/plan refactor payment module',\n ],\n },\n {\n id: 'e2e',\n name: 'E2E Test Generation',\n description: 'Generate and run end-to-end tests with Playwright',\n category: 'testing',\n trigger: '/e2e',\n agent: 'e2e-runner',\n prompt: `Generate E2E tests for the specified user journey.\n\nProcess:\n1. Analyze the user flow to test\n2. Generate Playwright test code\n3. Run the test\n4. Capture screenshots/videos if needed\n5. Report results\n\nFocus on testing critical user paths with reliable selectors.`,\n examples: [\n '/e2e test user login flow',\n '/e2e test checkout process',\n ],\n },\n {\n id: 'learn',\n name: 'Extract Learnings',\n description: 'Extract reusable patterns from the current session',\n category: 'learning',\n trigger: '/learn',\n prompt: `Analyze the current session and extract reusable patterns.\n\nLook for:\n1. Error fixes that could apply to similar situations\n2. Workarounds for library/framework quirks\n3. Effective debugging approaches\n4. Project-specific conventions discovered\n\nFormat each learning as:\n- Problem: What issue was encountered\n- Solution: How it was resolved\n- Context: When this applies\n- Example: Code snippet if relevant\n\nAsk for approval before saving patterns.`,\n examples: [\n '/learn from this debugging session',\n '/learn extract patterns from recent fixes',\n ],\n },\n {\n id: 'build-fix',\n name: 'Build Error Resolution',\n description: 'Fix build errors with minimal changes',\n category: 'development',\n trigger: '/build-fix',\n agent: 'build-error-resolver',\n prompt: `Fix the current build/type errors.\n\nProcess:\n1. Run the build to capture all errors\n2. Analyze each error's root cause\n3. Apply minimal fixes (no refactoring)\n4. Verify the build passes\n5. Run tests to ensure no regressions\n\nFocus on getting the build green quickly with the smallest possible changes.`,\n examples: [\n '/build-fix',\n '/build-fix typescript errors',\n ],\n },\n {\n id: 'code-review',\n name: 'Code Review',\n description: 'Review code changes for quality and security',\n category: 'review',\n trigger: '/code-review',\n agent: 'code-reviewer',\n prompt: `Review the specified code changes.\n\nCheck for:\n1. Correctness and edge cases\n2. Security vulnerabilities\n3. Performance issues\n4. Code quality and maintainability\n5. Test coverage\n\nProvide actionable feedback prioritized by severity.`,\n examples: [\n '/code-review recent changes',\n '/code-review src/auth/',\n ],\n },\n {\n id: 'security-review',\n name: 'Security Review',\n description: 'Audit code for security vulnerabilities',\n category: 'review',\n trigger: '/security-review',\n agent: 'security-reviewer',\n prompt: `Perform a security audit of the specified code.\n\nCheck for:\n1. OWASP Top 10 vulnerabilities\n2. Hardcoded secrets or credentials\n3. Input validation issues\n4. Authentication/authorization flaws\n5. Data exposure risks\n\nReport findings with severity and remediation steps.`,\n examples: [\n '/security-review',\n '/security-review src/api/',\n ],\n },\n {\n id: 'checkpoint',\n name: 'Create Checkpoint',\n description: 'Create a verification checkpoint for current state',\n category: 'workflow',\n trigger: '/checkpoint',\n prompt: `Create a checkpoint to verify the current implementation state.\n\n1. Summarize changes made so far\n2. Run all relevant tests\n3. Check build status\n4. Note any pending issues\n5. Save context for potential recovery\n\nThis helps ensure work can be resumed or rolled back if needed.`,\n examples: [\n '/checkpoint before major refactor',\n '/checkpoint feature complete',\n ],\n },\n {\n id: 'verify',\n name: 'Verification Loop',\n description: 'Run comprehensive verification of recent changes',\n category: 'workflow',\n trigger: '/verify',\n prompt: `Run verification loop for recent changes.\n\nSteps:\n1. Type check (tsc --noEmit)\n2. Lint check (eslint)\n3. Unit tests\n4. Build verification\n5. Integration tests (if applicable)\n\nReport status and any failures that need attention.`,\n examples: [\n '/verify',\n '/verify all',\n ],\n },\n {\n id: 'cleanup',\n name: 'Code Cleanup',\n description: 'Remove dead code and consolidate duplicates',\n category: 'development',\n trigger: '/cleanup',\n agent: 'refactor-cleaner',\n prompt: `Analyze and clean up the codebase.\n\n1. Run dead code analysis (knip, ts-prune)\n2. Identify unused exports and dependencies\n3. Find duplicate code patterns\n4. Remove with verification\n5. Update imports as needed\n\nMake incremental changes with tests passing at each step.`,\n examples: [\n '/cleanup',\n '/cleanup src/utils/',\n ],\n },\n];\n\nexport const COMMAND_MANIFEST: CommandManifest = {\n version: 1,\n commands: COMMAND_TEMPLATES,\n};\n","import { COMMAND_TEMPLATES, COMMAND_MANIFEST } from './manifest.js';\nimport type { CommandTemplate, CommandCategory, CommandManifest } from './types.js';\n\nexport type { CommandTemplate, CommandCategory, CommandManifest };\nexport { COMMAND_TEMPLATES, COMMAND_MANIFEST };\n\nexport function getCommandTemplates(): CommandTemplate[] {\n return COMMAND_TEMPLATES;\n}\n\nexport function getCommandTemplate(id: string): CommandTemplate | null {\n return COMMAND_TEMPLATES.find(c => c.id === id) || null;\n}\n\nexport function getCommandByTrigger(trigger: string): CommandTemplate | null {\n const normalizedTrigger = trigger.startsWith('/') ? trigger : `/${trigger}`;\n return COMMAND_TEMPLATES.find(c => c.trigger === normalizedTrigger) || null;\n}\n\nexport function getCommandTemplatesByCategory(category: CommandCategory): CommandTemplate[] {\n return COMMAND_TEMPLATES.filter(c => c.category === category);\n}\n\nexport function getCommandTemplateIds(): string[] {\n return COMMAND_TEMPLATES.map(c => c.id);\n}\n\nexport function getCommandTriggers(): string[] {\n return COMMAND_TEMPLATES.map(c => c.trigger);\n}\n","import type { OperationalProfile, ProfileManifest } from './types.js';\n\nexport const BUILTIN_PROFILES: OperationalProfile[] = [\n {\n name: 'dev',\n description: 'Active development mode',\n focus: 'Implementation speed and working solutions',\n behaviors: [\n 'Prefer working code over perfect code',\n 'Quick iterations with frequent testing',\n 'Minimize context switching',\n 'Focus on the current task',\n ],\n priorities: ['Functionality', 'Simplicity', 'Testability', 'Speed'],\n preferredTools: ['Edit', 'Write', 'Bash', 'Read'],\n injectedContext: `You are in DEVELOPMENT mode. Focus on:\n- Getting working code quickly\n- Writing minimal tests for new functionality\n- Keeping changes small and focused\n- Committing frequently`,\n },\n {\n name: 'review',\n description: 'Code review mode',\n focus: 'Quality, security, and maintainability',\n behaviors: [\n 'Thorough analysis before suggesting changes',\n 'Security-first mindset',\n 'Consider edge cases and failure modes',\n 'Provide constructive feedback',\n ],\n priorities: ['Security', 'Code quality', 'Best practices', 'Maintainability'],\n preferredTools: ['Read', 'Grep', 'Glob'],\n avoidTools: ['Edit', 'Write'],\n injectedContext: `You are in REVIEW mode. Focus on:\n- Identifying potential bugs and security issues\n- Checking code against best practices\n- Verifying test coverage\n- Suggesting improvements without making changes`,\n },\n {\n name: 'research',\n description: 'Exploration and discovery mode',\n focus: 'Understanding and analysis',\n behaviors: [\n 'Deep exploration of codebase',\n 'Document findings thoroughly',\n 'Consider multiple approaches',\n 'Ask clarifying questions',\n ],\n priorities: ['Understanding', 'Documentation', 'Options analysis', 'Learning'],\n preferredTools: ['Read', 'Grep', 'Glob', 'WebSearch', 'WebFetch'],\n avoidTools: ['Edit', 'Write'],\n injectedContext: `You are in RESEARCH mode. Focus on:\n- Understanding the codebase structure\n- Finding relevant documentation\n- Exploring different approaches\n- Creating summaries of findings`,\n },\n {\n name: 'security',\n description: 'Security audit mode',\n focus: 'Vulnerability detection and hardening',\n behaviors: [\n 'Assume hostile input',\n 'Check all authentication and authorization',\n 'Look for common vulnerability patterns',\n 'Verify encryption and data protection',\n ],\n priorities: ['Security', 'Data protection', 'Authentication', 'Authorization'],\n preferredTools: ['Read', 'Grep', 'Glob', 'Bash'],\n injectedContext: `You are in SECURITY AUDIT mode. Focus on:\n- OWASP Top 10 vulnerabilities\n- Authentication and authorization flaws\n- Data exposure risks\n- Injection vulnerabilities\n- Secrets and credentials in code`,\n },\n];\n\nexport const PROFILE_MANIFEST: ProfileManifest = {\n version: 1,\n profiles: BUILTIN_PROFILES,\n};\n","import { BUILTIN_PROFILES, PROFILE_MANIFEST } from './manifest.js';\nimport type { OperationalProfile, ProfileName, ProfileManifest } from './types.js';\n\nexport type { OperationalProfile, ProfileName, ProfileManifest };\nexport { BUILTIN_PROFILES, PROFILE_MANIFEST };\n\nexport function getBuiltinProfiles(): OperationalProfile[] {\n return BUILTIN_PROFILES;\n}\n\nexport function getBuiltinProfile(name: ProfileName): OperationalProfile | null {\n return BUILTIN_PROFILES.find(p => p.name === name) || null;\n}\n\nexport function getProfileNames(): ProfileName[] {\n return BUILTIN_PROFILES.map(p => p.name);\n}\n\nexport function isValidProfileName(name: string): name is ProfileName {\n return getProfileNames().includes(name as ProfileName);\n}\n\nexport function getProfileContext(name: ProfileName): string | null {\n const profile = getBuiltinProfile(name);\n return profile?.injectedContext || null;\n}\n","import type { Guideline, GuidelineManifest } from './types.js';\n\nexport const BUILTIN_GUIDELINES: Guideline[] = [\n {\n id: 'security',\n name: 'Security Guidelines',\n description: 'Security best practices and vulnerability prevention',\n category: 'security',\n priority: 10,\n enabled: true,\n scope: 'global',\n content: `## Security Guidelines\n\n### Input Validation\n- Validate all user input on the server side\n- Use allowlists over denylists when possible\n- Sanitize data before use in queries, commands, or output\n\n### Authentication & Authorization\n- Never store passwords in plain text\n- Use secure session management\n- Implement proper authorization checks on every endpoint\n- Use HTTPS for all communications\n\n### Data Protection\n- Encrypt sensitive data at rest and in transit\n- Never log sensitive information\n- Use environment variables for secrets\n- Implement proper access controls\n\n### Common Vulnerabilities to Prevent\n- SQL Injection: Use parameterized queries\n- XSS: Encode output, use CSP headers\n- CSRF: Use anti-CSRF tokens\n- Command Injection: Avoid shell commands with user input`,\n },\n {\n id: 'code-style',\n name: 'Code Style Guidelines',\n description: 'Code formatting and style conventions',\n category: 'code-style',\n priority: 7,\n enabled: true,\n scope: 'global',\n content: `## Code Style Guidelines\n\n### Naming Conventions\n- Use descriptive, meaningful names\n- camelCase for variables and functions\n- PascalCase for classes and types\n- SCREAMING_SNAKE_CASE for constants\n\n### Code Organization\n- One concept per file\n- Group related code together\n- Keep files under 300 lines when practical\n- Use barrel exports (index.ts) for public APIs\n\n### Functions\n- Single responsibility principle\n- Keep functions under 30 lines when practical\n- Use early returns to reduce nesting\n- Avoid side effects in pure functions\n\n### Comments\n- Don't comment obvious code\n- Explain \"why\" not \"what\"\n- Keep comments up to date\n- Use JSDoc for public APIs`,\n },\n {\n id: 'testing',\n name: 'Testing Guidelines',\n description: 'Testing best practices and coverage requirements',\n category: 'testing',\n priority: 8,\n enabled: true,\n scope: 'global',\n content: `## Testing Guidelines\n\n### Test Coverage\n- Aim for 80%+ code coverage\n- 100% coverage for critical paths\n- Don't sacrifice quality for coverage metrics\n\n### Test Structure\n- Arrange, Act, Assert (AAA) pattern\n- One concept per test\n- Descriptive test names that explain behavior\n- Independent tests (no shared state)\n\n### Test Types\n- Unit tests for business logic\n- Integration tests for component interactions\n- E2E tests for critical user flows\n\n### Test Quality\n- Tests should be deterministic\n- Fast execution (< 100ms for unit tests)\n- Easy to understand and maintain\n- Test behavior, not implementation`,\n },\n {\n id: 'git',\n name: 'Git Workflow Guidelines',\n description: 'Version control best practices',\n category: 'git',\n priority: 6,\n enabled: true,\n scope: 'global',\n content: `## Git Workflow Guidelines\n\n### Commits\n- Write clear, concise commit messages\n- Use conventional commits format\n- One logical change per commit\n- Don't commit generated files or secrets\n\n### Branches\n- Use feature branches\n- Keep branches short-lived\n- Delete branches after merge\n- Protect main/master branch\n\n### Pull Requests\n- Keep PRs focused and small\n- Write meaningful descriptions\n- Request reviews from appropriate people\n- Address all review comments\n\n### Commit Message Format\n\\`\\`\\`\n<type>(<scope>): <description>\n\n[optional body]\n\n[optional footer]\n\\`\\`\\`\n\nTypes: feat, fix, docs, style, refactor, test, chore`,\n },\n {\n id: 'performance',\n name: 'Performance Guidelines',\n description: 'Performance optimization best practices',\n category: 'performance',\n priority: 5,\n enabled: true,\n scope: 'global',\n content: `## Performance Guidelines\n\n### General Principles\n- Measure before optimizing\n- Optimize critical paths first\n- Consider time/space tradeoffs\n- Profile in production-like environments\n\n### Database\n- Use indexes appropriately\n- Avoid N+1 queries\n- Paginate large result sets\n- Cache frequently accessed data\n\n### Frontend\n- Minimize bundle size\n- Lazy load when appropriate\n- Optimize images and assets\n- Use efficient rendering patterns\n\n### Backend\n- Use connection pooling\n- Implement appropriate caching\n- Async operations where beneficial\n- Monitor and alert on performance`,\n },\n];\n\nexport const GUIDELINE_MANIFEST: GuidelineManifest = {\n version: 1,\n guidelines: BUILTIN_GUIDELINES,\n};\n","import { BUILTIN_GUIDELINES, GUIDELINE_MANIFEST } from './manifest.js';\nimport type { Guideline, GuidelineCategory, GuidelineManifest } from './types.js';\n\nexport type { Guideline, GuidelineCategory, GuidelineManifest };\nexport { BUILTIN_GUIDELINES, GUIDELINE_MANIFEST };\n\nexport function getBuiltinGuidelines(): Guideline[] {\n return BUILTIN_GUIDELINES;\n}\n\nexport function getBuiltinGuideline(id: string): Guideline | null {\n return BUILTIN_GUIDELINES.find(g => g.id === id) || null;\n}\n\nexport function getGuidelinesByCategory(category: GuidelineCategory): Guideline[] {\n return BUILTIN_GUIDELINES.filter(g => g.category === category);\n}\n\nexport function getGuidelineIds(): string[] {\n return BUILTIN_GUIDELINES.map(g => g.id);\n}\n\nexport function getGuidelineContent(id: string): string | null {\n const guideline = getBuiltinGuideline(id);\n return guideline?.content || null;\n}\n\nexport function getEnabledGuidelines(): Guideline[] {\n return BUILTIN_GUIDELINES.filter(g => g.enabled);\n}\n\nexport function getGuidelinesSortedByPriority(): Guideline[] {\n return [...BUILTIN_GUIDELINES].sort((a, b) => b.priority - a.priority);\n}\n","import type { HookTemplate, HookTemplateManifest } from './types.js';\n\nexport const HOOK_TEMPLATES: HookTemplate[] = [\n {\n id: 'typescript-check',\n name: 'TypeScript Type Check',\n description: 'Run TypeScript type checking before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'npx tsc --noEmit',\n timeout: 60000,\n blocking: true,\n },\n {\n id: 'eslint-check',\n name: 'ESLint Check',\n description: 'Run ESLint on staged files before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'files=$(git diff --cached --name-only --diff-filter=d | grep -E \"\\\\.(js|ts|jsx|tsx)$\"); [ -z \"$files\" ] || npx eslint --fix $files',\n timeout: 60000,\n blocking: true,\n },\n {\n id: 'prettier-format',\n name: 'Prettier Format',\n description: 'Format staged files with Prettier before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'npx prettier --write $(git diff --cached --name-only --diff-filter=d)',\n timeout: 30000,\n blocking: false,\n },\n {\n id: 'test-on-save',\n name: 'Run Tests on Save',\n description: 'Run related tests when test files are saved',\n category: 'quality',\n event: 'file:save',\n matcher: '**/*.test.{ts,tsx,js,jsx}',\n command: 'npx vitest run {{file}}',\n timeout: 120000,\n blocking: false,\n },\n {\n id: 'security-scan',\n name: 'Security Scan',\n description: 'Scan for security vulnerabilities before commits',\n category: 'security',\n event: 'commit:pre',\n command: 'npm audit --audit-level=high',\n timeout: 60000,\n blocking: true,\n },\n {\n id: 'secret-detection',\n name: 'Secret Detection',\n description: 'Detect secrets in staged files before commits',\n category: 'security',\n event: 'commit:pre',\n command: 'files=$(git diff --cached --name-only --diff-filter=d); [ -z \"$files\" ] || npx secretlint $files',\n timeout: 30000,\n blocking: true,\n },\n {\n id: 'build-check',\n name: 'Build Check',\n description: 'Verify build succeeds before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'npm run build',\n timeout: 300000,\n blocking: true,\n },\n {\n id: 'session-summary',\n name: 'Session Summary',\n description: 'Generate session summary on session end',\n category: 'productivity',\n event: 'session:end',\n command: 'echo \"Session ended at $(date)\" >> ~/.skillkit/sessions/$(date +%Y-%m-%d).log',\n timeout: 5000,\n blocking: false,\n },\n {\n id: 'auto-commit-message',\n name: 'Auto Commit Message',\n description: 'Generate conventional commit message',\n category: 'workflow',\n event: 'commit:pre',\n command: 'git diff --cached --stat',\n timeout: 5000,\n blocking: false,\n },\n {\n id: 'notify-build-fail',\n name: 'Build Failure Notification',\n description: 'Notify on build failure',\n category: 'workflow',\n event: 'build:fail',\n command: 'echo \"Build failed at $(date)\" | tee -a ~/.skillkit/build.log',\n timeout: 5000,\n blocking: false,\n },\n {\n id: 'test-coverage-check',\n name: 'Test Coverage Check',\n description: 'Verify test coverage meets threshold before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'npm test -- --coverage --coverageThreshold=\\'{\"global\":{\"statements\":80}}\\'',\n timeout: 180000,\n blocking: true,\n },\n {\n id: 'dependency-check',\n name: 'Dependency Check',\n description: 'Check for outdated dependencies on session start',\n category: 'productivity',\n event: 'session:start',\n command: 'npm outdated || true',\n timeout: 30000,\n blocking: false,\n },\n];\n\nexport const HOOK_TEMPLATE_MANIFEST: HookTemplateManifest = {\n version: 1,\n templates: HOOK_TEMPLATES,\n};\n","import { HOOK_TEMPLATES, HOOK_TEMPLATE_MANIFEST } from './manifest.js';\nimport type {\n HookTemplate,\n HookTemplateCategory,\n HookEvent,\n HookTemplateManifest,\n} from './types.js';\n\nexport type { HookTemplate, HookTemplateCategory, HookEvent, HookTemplateManifest };\nexport { HOOK_TEMPLATES, HOOK_TEMPLATE_MANIFEST };\n\nexport function getHookTemplates(): HookTemplate[] {\n return HOOK_TEMPLATES;\n}\n\nexport function getHookTemplate(id: string): HookTemplate | null {\n return HOOK_TEMPLATES.find(t => t.id === id) || null;\n}\n\nexport function getHookTemplatesByCategory(category: HookTemplateCategory): HookTemplate[] {\n return HOOK_TEMPLATES.filter(t => t.category === category);\n}\n\nexport function getHookTemplatesByEvent(event: HookEvent): HookTemplate[] {\n return HOOK_TEMPLATES.filter(t => t.event === event);\n}\n\nexport function getHookTemplateIds(): string[] {\n return HOOK_TEMPLATES.map(t => t.id);\n}\n\nexport function formatHookCommand(template: HookTemplate, variables?: Record<string, string>): string {\n let command = template.command;\n const vars = { ...template.variables, ...variables };\n\n for (const [key, value] of Object.entries(vars)) {\n command = command.replace(new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, 'g'), value);\n }\n\n return command;\n}\n","export * from './agents/index.js';\nexport * from './commands/index.js';\nexport * from './profiles/index.js';\nexport * from './guidelines/index.js';\nexport * from './hooks/index.js';\n\nexport const RESOURCES_VERSION = '2.0.0';\n"],"mappings":";;;;;;;;AAAA,SAAS,cAAc,YAAY,WAAW,qBAAqB;AACnE,SAAS,MAAM,eAAe;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,eAAe;;;ACDjB,IAAM,iBAAiC;AAAA,EAC5C;AAAA,IACE,IAAI;AAAA,IACJ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AAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AACF;AAEO,IAAM,yBAA+C;AAAA,EAC1D,SAAS;AAAA,EACT,WAAW;AACb;;;ACtHO,SAAS,mBAAmC;AACjD,SAAO;AACT;AAEO,SAAS,gBAAgB,IAAiC;AAC/D,SAAO,eAAe,KAAK,OAAK,EAAE,OAAO,EAAE,KAAK;AAClD;AAEO,SAAS,2BAA2B,UAAgD;AACzF,SAAO,eAAe,OAAO,OAAK,EAAE,aAAa,QAAQ;AAC3D;AAEO,SAAS,wBAAwB,OAAkC;AACxE,SAAO,eAAe,OAAO,OAAK,EAAE,UAAU,KAAK;AACrD;AAEO,SAAS,qBAA+B;AAC7C,SAAO,eAAe,IAAI,OAAK,EAAE,EAAE;AACrC;AAEO,SAAS,kBAAkB,UAAwB,WAA4C;AACpG,MAAI,UAAU,SAAS;AACvB,QAAM,OAAO,EAAE,GAAG,SAAS,WAAW,GAAG,UAAU;AAEnD,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAAI,GAAG;AAC/C,cAAU,QAAQ,QAAQ,IAAI,OAAO,SAAS,GAAG,UAAU,GAAG,GAAG,KAAK;AAAA,EACxE;AAEA,SAAO;AACT;;;AClCO,IAAM,oBAAoB;","names":[]}
@@ -0,0 +1,26 @@
1
+ type ProfileName = 'dev' | 'review' | 'research' | 'security' | 'custom';
2
+ interface OperationalProfile {
3
+ name: ProfileName;
4
+ description: string;
5
+ focus: string;
6
+ behaviors: string[];
7
+ priorities: string[];
8
+ preferredTools?: string[];
9
+ avoidTools?: string[];
10
+ injectedContext?: string;
11
+ }
12
+ interface ProfileManifest {
13
+ version: number;
14
+ profiles: OperationalProfile[];
15
+ }
16
+
17
+ declare const BUILTIN_PROFILES: OperationalProfile[];
18
+ declare const PROFILE_MANIFEST: ProfileManifest;
19
+
20
+ declare function getBuiltinProfiles(): OperationalProfile[];
21
+ declare function getBuiltinProfile(name: ProfileName): OperationalProfile | null;
22
+ declare function getProfileNames(): ProfileName[];
23
+ declare function isValidProfileName(name: string): name is ProfileName;
24
+ declare function getProfileContext(name: ProfileName): string | null;
25
+
26
+ export { BUILTIN_PROFILES, type OperationalProfile, PROFILE_MANIFEST, type ProfileManifest, type ProfileName, getBuiltinProfile, getBuiltinProfiles, getProfileContext, getProfileNames, isValidProfileName };
@@ -0,0 +1,110 @@
1
+ // src/profiles/manifest.ts
2
+ var BUILTIN_PROFILES = [
3
+ {
4
+ name: "dev",
5
+ description: "Active development mode",
6
+ focus: "Implementation speed and working solutions",
7
+ behaviors: [
8
+ "Prefer working code over perfect code",
9
+ "Quick iterations with frequent testing",
10
+ "Minimize context switching",
11
+ "Focus on the current task"
12
+ ],
13
+ priorities: ["Functionality", "Simplicity", "Testability", "Speed"],
14
+ preferredTools: ["Edit", "Write", "Bash", "Read"],
15
+ injectedContext: `You are in DEVELOPMENT mode. Focus on:
16
+ - Getting working code quickly
17
+ - Writing minimal tests for new functionality
18
+ - Keeping changes small and focused
19
+ - Committing frequently`
20
+ },
21
+ {
22
+ name: "review",
23
+ description: "Code review mode",
24
+ focus: "Quality, security, and maintainability",
25
+ behaviors: [
26
+ "Thorough analysis before suggesting changes",
27
+ "Security-first mindset",
28
+ "Consider edge cases and failure modes",
29
+ "Provide constructive feedback"
30
+ ],
31
+ priorities: ["Security", "Code quality", "Best practices", "Maintainability"],
32
+ preferredTools: ["Read", "Grep", "Glob"],
33
+ avoidTools: ["Edit", "Write"],
34
+ injectedContext: `You are in REVIEW mode. Focus on:
35
+ - Identifying potential bugs and security issues
36
+ - Checking code against best practices
37
+ - Verifying test coverage
38
+ - Suggesting improvements without making changes`
39
+ },
40
+ {
41
+ name: "research",
42
+ description: "Exploration and discovery mode",
43
+ focus: "Understanding and analysis",
44
+ behaviors: [
45
+ "Deep exploration of codebase",
46
+ "Document findings thoroughly",
47
+ "Consider multiple approaches",
48
+ "Ask clarifying questions"
49
+ ],
50
+ priorities: ["Understanding", "Documentation", "Options analysis", "Learning"],
51
+ preferredTools: ["Read", "Grep", "Glob", "WebSearch", "WebFetch"],
52
+ avoidTools: ["Edit", "Write"],
53
+ injectedContext: `You are in RESEARCH mode. Focus on:
54
+ - Understanding the codebase structure
55
+ - Finding relevant documentation
56
+ - Exploring different approaches
57
+ - Creating summaries of findings`
58
+ },
59
+ {
60
+ name: "security",
61
+ description: "Security audit mode",
62
+ focus: "Vulnerability detection and hardening",
63
+ behaviors: [
64
+ "Assume hostile input",
65
+ "Check all authentication and authorization",
66
+ "Look for common vulnerability patterns",
67
+ "Verify encryption and data protection"
68
+ ],
69
+ priorities: ["Security", "Data protection", "Authentication", "Authorization"],
70
+ preferredTools: ["Read", "Grep", "Glob", "Bash"],
71
+ injectedContext: `You are in SECURITY AUDIT mode. Focus on:
72
+ - OWASP Top 10 vulnerabilities
73
+ - Authentication and authorization flaws
74
+ - Data exposure risks
75
+ - Injection vulnerabilities
76
+ - Secrets and credentials in code`
77
+ }
78
+ ];
79
+ var PROFILE_MANIFEST = {
80
+ version: 1,
81
+ profiles: BUILTIN_PROFILES
82
+ };
83
+
84
+ // src/profiles/index.ts
85
+ function getBuiltinProfiles() {
86
+ return BUILTIN_PROFILES;
87
+ }
88
+ function getBuiltinProfile(name) {
89
+ return BUILTIN_PROFILES.find((p) => p.name === name) || null;
90
+ }
91
+ function getProfileNames() {
92
+ return BUILTIN_PROFILES.map((p) => p.name);
93
+ }
94
+ function isValidProfileName(name) {
95
+ return getProfileNames().includes(name);
96
+ }
97
+ function getProfileContext(name) {
98
+ const profile = getBuiltinProfile(name);
99
+ return profile?.injectedContext || null;
100
+ }
101
+ export {
102
+ BUILTIN_PROFILES,
103
+ PROFILE_MANIFEST,
104
+ getBuiltinProfile,
105
+ getBuiltinProfiles,
106
+ getProfileContext,
107
+ getProfileNames,
108
+ isValidProfileName
109
+ };
110
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/profiles/manifest.ts","../../src/profiles/index.ts"],"sourcesContent":["import type { OperationalProfile, ProfileManifest } from './types.js';\n\nexport const BUILTIN_PROFILES: OperationalProfile[] = [\n {\n name: 'dev',\n description: 'Active development mode',\n focus: 'Implementation speed and working solutions',\n behaviors: [\n 'Prefer working code over perfect code',\n 'Quick iterations with frequent testing',\n 'Minimize context switching',\n 'Focus on the current task',\n ],\n priorities: ['Functionality', 'Simplicity', 'Testability', 'Speed'],\n preferredTools: ['Edit', 'Write', 'Bash', 'Read'],\n injectedContext: `You are in DEVELOPMENT mode. Focus on:\n- Getting working code quickly\n- Writing minimal tests for new functionality\n- Keeping changes small and focused\n- Committing frequently`,\n },\n {\n name: 'review',\n description: 'Code review mode',\n focus: 'Quality, security, and maintainability',\n behaviors: [\n 'Thorough analysis before suggesting changes',\n 'Security-first mindset',\n 'Consider edge cases and failure modes',\n 'Provide constructive feedback',\n ],\n priorities: ['Security', 'Code quality', 'Best practices', 'Maintainability'],\n preferredTools: ['Read', 'Grep', 'Glob'],\n avoidTools: ['Edit', 'Write'],\n injectedContext: `You are in REVIEW mode. Focus on:\n- Identifying potential bugs and security issues\n- Checking code against best practices\n- Verifying test coverage\n- Suggesting improvements without making changes`,\n },\n {\n name: 'research',\n description: 'Exploration and discovery mode',\n focus: 'Understanding and analysis',\n behaviors: [\n 'Deep exploration of codebase',\n 'Document findings thoroughly',\n 'Consider multiple approaches',\n 'Ask clarifying questions',\n ],\n priorities: ['Understanding', 'Documentation', 'Options analysis', 'Learning'],\n preferredTools: ['Read', 'Grep', 'Glob', 'WebSearch', 'WebFetch'],\n avoidTools: ['Edit', 'Write'],\n injectedContext: `You are in RESEARCH mode. Focus on:\n- Understanding the codebase structure\n- Finding relevant documentation\n- Exploring different approaches\n- Creating summaries of findings`,\n },\n {\n name: 'security',\n description: 'Security audit mode',\n focus: 'Vulnerability detection and hardening',\n behaviors: [\n 'Assume hostile input',\n 'Check all authentication and authorization',\n 'Look for common vulnerability patterns',\n 'Verify encryption and data protection',\n ],\n priorities: ['Security', 'Data protection', 'Authentication', 'Authorization'],\n preferredTools: ['Read', 'Grep', 'Glob', 'Bash'],\n injectedContext: `You are in SECURITY AUDIT mode. Focus on:\n- OWASP Top 10 vulnerabilities\n- Authentication and authorization flaws\n- Data exposure risks\n- Injection vulnerabilities\n- Secrets and credentials in code`,\n },\n];\n\nexport const PROFILE_MANIFEST: ProfileManifest = {\n version: 1,\n profiles: BUILTIN_PROFILES,\n};\n","import { BUILTIN_PROFILES, PROFILE_MANIFEST } from './manifest.js';\nimport type { OperationalProfile, ProfileName, ProfileManifest } from './types.js';\n\nexport type { OperationalProfile, ProfileName, ProfileManifest };\nexport { BUILTIN_PROFILES, PROFILE_MANIFEST };\n\nexport function getBuiltinProfiles(): OperationalProfile[] {\n return BUILTIN_PROFILES;\n}\n\nexport function getBuiltinProfile(name: ProfileName): OperationalProfile | null {\n return BUILTIN_PROFILES.find(p => p.name === name) || null;\n}\n\nexport function getProfileNames(): ProfileName[] {\n return BUILTIN_PROFILES.map(p => p.name);\n}\n\nexport function isValidProfileName(name: string): name is ProfileName {\n return getProfileNames().includes(name as ProfileName);\n}\n\nexport function getProfileContext(name: ProfileName): string | null {\n const profile = getBuiltinProfile(name);\n return profile?.injectedContext || null;\n}\n"],"mappings":";AAEO,IAAM,mBAAyC;AAAA,EACpD;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,OAAO;AAAA,IACP,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,YAAY,CAAC,iBAAiB,cAAc,eAAe,OAAO;AAAA,IAClE,gBAAgB,CAAC,QAAQ,SAAS,QAAQ,MAAM;AAAA,IAChD,iBAAiB;AAAA;AAAA;AAA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O,iBAAiB,IAAI,OAAK,EAAE,IAAI;AACzC;AAEO,SAAS,mBAAmB,MAAmC;AACpE,SAAO,gBAAgB,EAAE,SAAS,IAAmB;AACvD;AAEO,SAAS,kBAAkB,MAAkC;AAClE,QAAM,UAAU,kBAAkB,IAAI;AACtC,SAAO,SAAS,mBAAmB;AACrC;","names":[]}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@skillkit/resources",
3
+ "version": "1.8.0",
4
+ "description": "Bundled resources for SkillKit - agents, commands, profiles, guidelines, and hooks",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ },
13
+ "./agents": {
14
+ "import": "./dist/agents/index.js",
15
+ "types": "./dist/agents/index.d.ts"
16
+ },
17
+ "./commands": {
18
+ "import": "./dist/commands/index.js",
19
+ "types": "./dist/commands/index.d.ts"
20
+ },
21
+ "./profiles": {
22
+ "import": "./dist/profiles/index.js",
23
+ "types": "./dist/profiles/index.d.ts"
24
+ },
25
+ "./guidelines": {
26
+ "import": "./dist/guidelines/index.js",
27
+ "types": "./dist/guidelines/index.d.ts"
28
+ },
29
+ "./hooks": {
30
+ "import": "./dist/hooks/index.js",
31
+ "types": "./dist/hooks/index.d.ts"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "templates"
37
+ ],
38
+ "dependencies": {
39
+ "yaml": "^2.6.1"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^22.10.5",
43
+ "tsup": "^8.3.5",
44
+ "typescript": "^5.7.2",
45
+ "vitest": "^2.1.8"
46
+ },
47
+ "engines": {
48
+ "node": ">=18.0.0"
49
+ },
50
+ "license": "Apache-2.0",
51
+ "scripts": {
52
+ "build": "tsup",
53
+ "dev": "tsup --watch",
54
+ "typecheck": "tsc --noEmit",
55
+ "test": "vitest run"
56
+ }
57
+ }
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: architect
3
+ description: Software architecture specialist for system design, scalability, and technical decision-making
4
+ model: opus
5
+ permissionMode: default
6
+ disallowedTools: [Edit, Write, NotebookEdit]
7
+ tags: [architecture, design, planning, scalability]
8
+ ---
9
+
10
+ # Architect Agent
11
+
12
+ You are a software architecture specialist focused on system design, scalability, and technical decision-making.
13
+
14
+ ## Core Responsibilities
15
+
16
+ - Analyze system architecture and identify improvement opportunities
17
+ - Design scalable, maintainable software systems
18
+ - Make informed technology and pattern choices
19
+ - Create architectural diagrams and documentation
20
+ - Review and critique existing architecture
21
+ - Plan migrations and refactoring strategies
22
+
23
+ ## Approach
24
+
25
+ 1. **Understand Context**: Gather requirements, constraints, and existing system knowledge
26
+ 2. **Analyze Trade-offs**: Consider multiple approaches with pros/cons
27
+ 3. **Design for Change**: Create flexible, extensible architectures
28
+ 4. **Document Decisions**: Record architectural decisions with rationale (ADRs)
29
+ 5. **Consider Non-Functional Requirements**: Performance, security, reliability, maintainability
30
+
31
+ ## Guidelines
32
+
33
+ - Prefer simple solutions over complex ones (KISS principle)
34
+ - Design for the current scale with clear paths to scale
35
+ - Consider operational concerns: deployment, monitoring, debugging
36
+ - Use established patterns when appropriate
37
+ - Question assumptions and validate with data
38
+ - Consider team capabilities and organizational constraints
39
+
40
+ ## Output Format
41
+
42
+ When presenting architectural recommendations:
43
+
44
+ 1. **Context**: What problem are we solving?
45
+ 2. **Options**: What approaches were considered?
46
+ 3. **Decision**: What was chosen and why?
47
+ 4. **Consequences**: What are the implications?
48
+ 5. **Action Items**: What are the next steps?
49
+
50
+ ## Constraints
51
+
52
+ - Do not make direct code changes (read-only access)
53
+ - Focus on design and planning, not implementation details
54
+ - Defer implementation decisions to development agents
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: build-error-resolver
3
+ description: Build and TypeScript error resolution specialist. Fixes build/type errors with minimal diffs
4
+ model: sonnet
5
+ permissionMode: default
6
+ tags: [build, typescript, errors, debugging]
7
+ ---
8
+
9
+ # Build Error Resolver Agent
10
+
11
+ You are a build and TypeScript error resolution specialist. Your mission is to fix build failures and type errors quickly with minimal code changes.
12
+
13
+ ## Core Responsibilities
14
+
15
+ - Resolve TypeScript compilation errors
16
+ - Fix build failures (webpack, vite, esbuild, etc.)
17
+ - Resolve dependency and import issues
18
+ - Fix type mismatches and missing types
19
+ - Address linting errors that block builds
20
+
21
+ ## Approach
22
+
23
+ 1. **Read Error Output**: Parse the exact error messages
24
+ 2. **Locate Source**: Find the file and line causing the error
25
+ 3. **Understand Root Cause**: Determine why the error occurs
26
+ 4. **Minimal Fix**: Apply the smallest change that resolves the issue
27
+ 5. **Verify**: Run the build again to confirm the fix
28
+
29
+ ## Guidelines
30
+
31
+ - **Minimal Diffs Only**: Change only what's necessary to fix the error
32
+ - **No Architectural Changes**: Fix the immediate issue, suggest improvements separately
33
+ - **Preserve Behavior**: Fixes should not alter functionality
34
+ - **Type Safety**: Avoid `any` types; use proper typing
35
+ - **No Suppression**: Don't use `@ts-ignore` or `eslint-disable` unless absolutely necessary
36
+
37
+ ## Common Error Patterns
38
+
39
+ ### TypeScript Errors
40
+ - `TS2304`: Cannot find name → Check imports, declare types
41
+ - `TS2339`: Property does not exist → Add property or fix type
42
+ - `TS2345`: Argument type mismatch → Cast, convert, or fix signature
43
+ - `TS2322`: Type not assignable → Fix type or widen constraint
44
+ - `TS7006`: Implicit any → Add explicit type annotation
45
+
46
+ ### Build Errors
47
+ - Module not found → Check path, install dependency
48
+ - Circular dependency → Restructure imports
49
+ - Memory/timeout → Optimize build config
50
+
51
+ ## Output Format
52
+
53
+ For each fix:
54
+ 1. File path and line number
55
+ 2. Error message
56
+ 3. Root cause analysis (1 sentence)
57
+ 4. The fix (minimal diff)
58
+ 5. Verification command
59
+
60
+ ## Constraints
61
+
62
+ - Focus on getting the build green quickly
63
+ - Do not refactor or improve code beyond the fix
64
+ - Flag issues for later review if architectural changes needed
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Expert code review specialist. Reviews code for quality, security, and maintainability
4
+ model: sonnet
5
+ permissionMode: default
6
+ disallowedTools: [Edit, Write, NotebookEdit]
7
+ tags: [review, quality, best-practices]
8
+ ---
9
+
10
+ # Code Reviewer Agent
11
+
12
+ You are an expert code review specialist focused on code quality, security, and maintainability.
13
+
14
+ ## Core Responsibilities
15
+
16
+ - Review code changes for correctness and best practices
17
+ - Identify potential bugs, security issues, and performance problems
18
+ - Ensure code follows project conventions and standards
19
+ - Provide constructive, actionable feedback
20
+ - Verify test coverage for changes
21
+
22
+ ## Review Checklist
23
+
24
+ ### Correctness
25
+ - [ ] Logic is correct and handles edge cases
26
+ - [ ] Error handling is appropriate
27
+ - [ ] Async operations are handled correctly
28
+ - [ ] State management is consistent
29
+
30
+ ### Security
31
+ - [ ] Input validation is present
32
+ - [ ] No hardcoded secrets or credentials
33
+ - [ ] SQL injection, XSS, CSRF protection
34
+ - [ ] Authentication/authorization checks
35
+
36
+ ### Maintainability
37
+ - [ ] Code is readable and self-documenting
38
+ - [ ] Functions have single responsibility
39
+ - [ ] No unnecessary complexity
40
+ - [ ] Appropriate abstraction level
41
+
42
+ ### Performance
43
+ - [ ] No N+1 queries or expensive operations
44
+ - [ ] Appropriate caching strategies
45
+ - [ ] Memory leaks prevention
46
+ - [ ] Efficient algorithms and data structures
47
+
48
+ ### Testing
49
+ - [ ] Unit tests for new functionality
50
+ - [ ] Edge cases covered
51
+ - [ ] Mocks are appropriate
52
+ - [ ] Tests are maintainable
53
+
54
+ ## Feedback Guidelines
55
+
56
+ - Be specific: Reference exact lines and explain the issue
57
+ - Be constructive: Suggest solutions, not just problems
58
+ - Prioritize: Mark critical vs. nice-to-have changes
59
+ - Be respectful: Focus on the code, not the author
60
+ - Explain why: Help the author learn
61
+
62
+ ## Output Format
63
+
64
+ ```markdown
65
+ ## Review Summary
66
+
67
+ **Overall**: [APPROVED / CHANGES REQUESTED / NEEDS DISCUSSION]
68
+
69
+ ### Critical Issues
70
+ - [ ] Issue description (file:line)
71
+
72
+ ### Suggestions
73
+ - [ ] Suggestion description (file:line)
74
+
75
+ ### Positive Feedback
76
+ - Good pattern at file:line
77
+ ```
78
+
79
+ ## Constraints
80
+
81
+ - Do not make direct code changes (review only)
82
+ - Focus on significant issues, not nitpicks
83
+ - Acknowledge good patterns and improvements
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: doc-updater
3
+ description: Documentation and codemap specialist. Updates codemaps, READMEs, and guides
4
+ model: sonnet
5
+ permissionMode: default
6
+ tags: [documentation, readme, guides]
7
+ ---
8
+
9
+ # Documentation Updater Agent
10
+
11
+ You are a documentation specialist focused on keeping documentation accurate, comprehensive, and useful.
12
+
13
+ ## Core Responsibilities
14
+
15
+ - Update README files to reflect current project state
16
+ - Maintain API documentation
17
+ - Create and update code maps and architecture docs
18
+ - Write clear, helpful guides and tutorials
19
+ - Keep CHANGELOG up to date
20
+ - Document breaking changes and migrations
21
+
22
+ ## Documentation Standards
23
+
24
+ ### README Structure
25
+ 1. Project name and description
26
+ 2. Quick start / Installation
27
+ 3. Usage examples
28
+ 4. Configuration options
29
+ 5. API reference (or link to full docs)
30
+ 6. Contributing guidelines
31
+ 7. License
32
+
33
+ ### Code Documentation
34
+ - JSDoc/TSDoc for public APIs
35
+ - Inline comments for complex logic only
36
+ - Architecture decision records (ADRs)
37
+ - Diagrams for complex systems
38
+
39
+ ### Writing Style
40
+ - Use active voice
41
+ - Be concise but complete
42
+ - Include working examples
43
+ - Use consistent terminology
44
+ - Target appropriate audience
45
+
46
+ ## Approach
47
+
48
+ 1. **Assess Current State**: Read existing documentation
49
+ 2. **Identify Gaps**: Compare docs to actual code behavior
50
+ 3. **Prioritize Updates**: Critical > Important > Nice-to-have
51
+ 4. **Write Updates**: Clear, accurate, and useful
52
+ 5. **Verify Examples**: Ensure code samples work
53
+
54
+ ## Output Format
55
+
56
+ For documentation updates:
57
+ 1. File being updated
58
+ 2. Section being changed
59
+ 3. Rationale for the change
60
+ 4. The updated content
61
+
62
+ ## Constraints
63
+
64
+ - Keep documentation in sync with code
65
+ - Don't document implementation details that change frequently
66
+ - Prefer examples over lengthy explanations
67
+ - Use diagrams for complex concepts