peaks-cli 1.0.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.
Files changed (143) hide show
  1. package/LICENSE +52 -0
  2. package/README.md +417 -0
  3. package/bin/peaks.js +2 -0
  4. package/dist/src/cli/cli-helpers.d.ts +25 -0
  5. package/dist/src/cli/cli-helpers.js +78 -0
  6. package/dist/src/cli/commands/capability-commands.d.ts +5 -0
  7. package/dist/src/cli/commands/capability-commands.js +46 -0
  8. package/dist/src/cli/commands/capability-worker-config-sc-commands.d.ts +3 -0
  9. package/dist/src/cli/commands/capability-worker-config-sc-commands.js +10 -0
  10. package/dist/src/cli/commands/config-commands.d.ts +3 -0
  11. package/dist/src/cli/commands/config-commands.js +212 -0
  12. package/dist/src/cli/commands/core-artifact-commands.d.ts +3 -0
  13. package/dist/src/cli/commands/core-artifact-commands.js +200 -0
  14. package/dist/src/cli/commands/sc-commands.d.ts +3 -0
  15. package/dist/src/cli/commands/sc-commands.js +37 -0
  16. package/dist/src/cli/commands/worker-commands.d.ts +3 -0
  17. package/dist/src/cli/commands/worker-commands.js +52 -0
  18. package/dist/src/cli/commands/workflow-commands.d.ts +3 -0
  19. package/dist/src/cli/commands/workflow-commands.js +257 -0
  20. package/dist/src/cli/index.d.ts +1 -0
  21. package/dist/src/cli/index.js +14 -0
  22. package/dist/src/cli/program.d.ts +4 -0
  23. package/dist/src/cli/program.js +13 -0
  24. package/dist/src/services/artifacts/artifact-service.d.ts +43 -0
  25. package/dist/src/services/artifacts/artifact-service.js +97 -0
  26. package/dist/src/services/artifacts/workspace-service.d.ts +33 -0
  27. package/dist/src/services/artifacts/workspace-service.js +254 -0
  28. package/dist/src/services/config/config-service.d.ts +29 -0
  29. package/dist/src/services/config/config-service.js +501 -0
  30. package/dist/src/services/config/config-types.d.ts +63 -0
  31. package/dist/src/services/config/config-types.js +16 -0
  32. package/dist/src/services/config/model-routing.d.ts +4 -0
  33. package/dist/src/services/config/model-routing.js +15 -0
  34. package/dist/src/services/doctor/doctor-service.d.ts +18 -0
  35. package/dist/src/services/doctor/doctor-service.js +68 -0
  36. package/dist/src/services/memory/project-memory-service.d.ts +79 -0
  37. package/dist/src/services/memory/project-memory-service.js +306 -0
  38. package/dist/src/services/profiles/profile-service.d.ts +6 -0
  39. package/dist/src/services/profiles/profile-service.js +19 -0
  40. package/dist/src/services/providers/minimax-provider-service.d.ts +24 -0
  41. package/dist/src/services/providers/minimax-provider-service.js +143 -0
  42. package/dist/src/services/providers/minimax-worker-service.d.ts +21 -0
  43. package/dist/src/services/providers/minimax-worker-service.js +80 -0
  44. package/dist/src/services/proxy/proxy-service.d.ts +7 -0
  45. package/dist/src/services/proxy/proxy-service.js +31 -0
  46. package/dist/src/services/rd/rd-service.d.ts +88 -0
  47. package/dist/src/services/rd/rd-service.js +370 -0
  48. package/dist/src/services/recommendations/capability-availability.d.ts +5 -0
  49. package/dist/src/services/recommendations/capability-availability.js +40 -0
  50. package/dist/src/services/recommendations/capability-map-service.d.ts +7 -0
  51. package/dist/src/services/recommendations/capability-map-service.js +131 -0
  52. package/dist/src/services/recommendations/capability-seed-items.d.ts +2 -0
  53. package/dist/src/services/recommendations/capability-seed-items.js +131 -0
  54. package/dist/src/services/recommendations/capability-seed-mappings.d.ts +2 -0
  55. package/dist/src/services/recommendations/capability-seed-mappings.js +42 -0
  56. package/dist/src/services/recommendations/capability-seed-sources.d.ts +2 -0
  57. package/dist/src/services/recommendations/capability-seed-sources.js +35 -0
  58. package/dist/src/services/recommendations/recommendation-service.d.ts +8 -0
  59. package/dist/src/services/recommendations/recommendation-service.js +106 -0
  60. package/dist/src/services/recommendations/recommendation-types.d.ts +129 -0
  61. package/dist/src/services/recommendations/recommendation-types.js +1 -0
  62. package/dist/src/services/recommendations/seed-capability-catalog.d.ts +3 -0
  63. package/dist/src/services/recommendations/seed-capability-catalog.js +3 -0
  64. package/dist/src/services/refactor/refactor-service.d.ts +9 -0
  65. package/dist/src/services/refactor/refactor-service.js +33 -0
  66. package/dist/src/services/sc/index.d.ts +1 -0
  67. package/dist/src/services/sc/index.js +1 -0
  68. package/dist/src/services/sc/sc-service.d.ts +79 -0
  69. package/dist/src/services/sc/sc-service.js +223 -0
  70. package/dist/src/services/skills/skill-registry.d.ts +17 -0
  71. package/dist/src/services/skills/skill-registry.js +40 -0
  72. package/dist/src/services/standards/project-standards-service.d.ts +82 -0
  73. package/dist/src/services/standards/project-standards-service.js +383 -0
  74. package/dist/src/services/tech/tech-service.d.ts +69 -0
  75. package/dist/src/services/tech/tech-service.js +236 -0
  76. package/dist/src/services/workflow/workflow-autonomous-service.d.ts +99 -0
  77. package/dist/src/services/workflow/workflow-autonomous-service.js +526 -0
  78. package/dist/src/services/workflow/workflow-router-service.d.ts +85 -0
  79. package/dist/src/services/workflow/workflow-router-service.js +213 -0
  80. package/dist/src/shared/change-id.d.ts +15 -0
  81. package/dist/src/shared/change-id.js +76 -0
  82. package/dist/src/shared/frontmatter.d.ts +6 -0
  83. package/dist/src/shared/frontmatter.js +47 -0
  84. package/dist/src/shared/fs-utils.d.ts +4 -0
  85. package/dist/src/shared/fs-utils.js +16 -0
  86. package/dist/src/shared/fs.d.ts +4 -0
  87. package/dist/src/shared/fs.js +26 -0
  88. package/dist/src/shared/path-utils.d.ts +13 -0
  89. package/dist/src/shared/path-utils.js +56 -0
  90. package/dist/src/shared/paths.d.ts +6 -0
  91. package/dist/src/shared/paths.js +40 -0
  92. package/dist/src/shared/planner-response.d.ts +21 -0
  93. package/dist/src/shared/planner-response.js +26 -0
  94. package/dist/src/shared/platform.d.ts +6 -0
  95. package/dist/src/shared/platform.js +11 -0
  96. package/dist/src/shared/process.d.ts +5 -0
  97. package/dist/src/shared/process.js +12 -0
  98. package/dist/src/shared/result.d.ts +13 -0
  99. package/dist/src/shared/result.js +32 -0
  100. package/package.json +49 -0
  101. package/schemas/approval-record.schema.json +14 -0
  102. package/schemas/artifact-manifest.schema.json +16 -0
  103. package/schemas/artifact-retention-report.schema.json +17 -0
  104. package/schemas/artifact-workspace.schema.json +22 -0
  105. package/schemas/capability-availability.schema.json +36 -0
  106. package/schemas/capability-item.schema.json +37 -0
  107. package/schemas/capability-source.schema.json +30 -0
  108. package/schemas/change-impact.schema.json +15 -0
  109. package/schemas/context-capsule.schema.json +16 -0
  110. package/schemas/recommendation-plan.schema.json +37 -0
  111. package/schemas/refactor-slice-spec.schema.json +19 -0
  112. package/scripts/clean-dist.mjs +8 -0
  113. package/scripts/install-skills.mjs +76 -0
  114. package/scripts/watch.mjs +389 -0
  115. package/skills/peaks-prd/SKILL.md +42 -0
  116. package/skills/peaks-prd/references/artifact-contracts.md +3 -0
  117. package/skills/peaks-prd/references/command-migration.md +3 -0
  118. package/skills/peaks-prd/references/workflow.md +11 -0
  119. package/skills/peaks-qa/SKILL.md +45 -0
  120. package/skills/peaks-qa/references/artifact-contracts.md +3 -0
  121. package/skills/peaks-qa/references/command-migration.md +3 -0
  122. package/skills/peaks-qa/references/regression-gates.md +16 -0
  123. package/skills/peaks-rd/SKILL.md +56 -0
  124. package/skills/peaks-rd/references/artifact-contracts.md +3 -0
  125. package/skills/peaks-rd/references/command-migration.md +3 -0
  126. package/skills/peaks-rd/references/refactor-workflow.md +31 -0
  127. package/skills/peaks-sc/SKILL.md +30 -0
  128. package/skills/peaks-sc/references/artifact-contracts.md +3 -0
  129. package/skills/peaks-sc/references/artifact-retention.md +14 -0
  130. package/skills/peaks-sc/references/command-migration.md +3 -0
  131. package/skills/peaks-solo/SKILL.md +63 -0
  132. package/skills/peaks-solo/references/artifact-contracts.md +3 -0
  133. package/skills/peaks-solo/references/command-migration.md +3 -0
  134. package/skills/peaks-solo/references/refactor-mode.md +22 -0
  135. package/skills/peaks-solo/references/workflow.md +14 -0
  136. package/skills/peaks-txt/SKILL.md +48 -0
  137. package/skills/peaks-txt/references/artifact-contracts.md +3 -0
  138. package/skills/peaks-txt/references/command-migration.md +3 -0
  139. package/skills/peaks-txt/references/context-capsule.md +20 -0
  140. package/skills/peaks-ui/SKILL.md +35 -0
  141. package/skills/peaks-ui/references/artifact-contracts.md +3 -0
  142. package/skills/peaks-ui/references/command-migration.md +3 -0
  143. package/skills/peaks-ui/references/workflow.md +11 -0
@@ -0,0 +1,2 @@
1
+ import type { CapabilityItem } from './recommendation-types.js';
2
+ export declare const seedCapabilityItems: CapabilityItem[];
@@ -0,0 +1,131 @@
1
+ export const seedCapabilityItems = [
2
+ {
3
+ capabilityId: 'everything-claude-code.code-review-agent',
4
+ sourceId: 'everything-claude-code',
5
+ name: 'Code Review Agent',
6
+ itemType: 'agent',
7
+ category: 'code-review',
8
+ workflows: ['code-refactor', 'development-complete'],
9
+ audience: ['engineer'],
10
+ riskLevel: 'low',
11
+ inputContract: 'git-diff or changed-file summary',
12
+ outputContract: 'review-report',
13
+ fallback: { mode: 'built-in-review-checklist', qualityImpact: 'lower', nextAction: 'Use Peaks built-in code review checklist if the external agent is unavailable.' },
14
+ presentation: { displayName: { en: 'Code Review Agent', 'zh-CN': '代码评审代理' }, description: { en: 'Reviews code changes for quality, maintainability, tests, and risks.', 'zh-CN': '用于在代码改动后检查质量、可维护性、测试和风险。' } }
15
+ },
16
+ {
17
+ capabilityId: 'everything-claude-code.security-review-agent',
18
+ sourceId: 'everything-claude-code',
19
+ name: 'Security Review Agent',
20
+ itemType: 'agent',
21
+ category: 'security-review',
22
+ workflows: ['code-refactor', 'development-complete'],
23
+ audience: ['engineer'],
24
+ riskLevel: 'medium',
25
+ inputContract: 'git-diff or changed-file summary',
26
+ outputContract: 'security-review-report',
27
+ fallback: { mode: 'built-in-security-checklist', qualityImpact: 'lower', nextAction: 'Use Peaks built-in security checklist if the external agent is unavailable.' },
28
+ presentation: { displayName: { en: 'Security Review Agent', 'zh-CN': '安全评审代理' }, description: { en: 'Checks auth, user input, filesystem, external calls, and secret-handling risks.', 'zh-CN': '检查认证、用户输入、文件系统、外部调用和密钥处理风险。' } }
29
+ },
30
+ {
31
+ capabilityId: 'everything-claude-code.language-standards',
32
+ sourceId: 'everything-claude-code',
33
+ name: 'Language Coding Standards',
34
+ itemType: 'rule',
35
+ category: 'coding-standards',
36
+ workflows: ['code-refactor', 'development-start', 'project-standards'],
37
+ audience: ['engineer'],
38
+ riskLevel: 'low',
39
+ inputContract: 'project-language and existing project standards',
40
+ outputContract: 'project-local rules baseline',
41
+ fallback: { mode: 'peaks-built-in-standards', qualityImpact: 'same', nextAction: 'Use Peaks curated baseline and preserve existing project conventions.' },
42
+ presentation: { displayName: { en: 'Language Coding Standards', 'zh-CN': '语言编码规范' }, description: { en: 'Provides language coding standards for project-local Peaks rules.', 'zh-CN': '为项目内 Peaks 规则提供语言编码规范来源。' } }
43
+ },
44
+ {
45
+ capabilityId: 'everything-claude-code.code-review-guidance',
46
+ sourceId: 'everything-claude-code',
47
+ name: 'Code Review Guidance',
48
+ itemType: 'rule',
49
+ category: 'code-review',
50
+ workflows: ['code-refactor', 'development-complete', 'project-standards'],
51
+ audience: ['engineer', 'qa'],
52
+ riskLevel: 'low',
53
+ inputContract: 'project-local diff and test evidence',
54
+ outputContract: 'code-review rules baseline',
55
+ fallback: { mode: 'peaks-built-in-review-checklist', qualityImpact: 'same', nextAction: 'Use Peaks curated code review baseline if the external source is unavailable.' },
56
+ presentation: { displayName: { en: 'Code Review Guidance', 'zh-CN': '代码评审指导' }, description: { en: 'Provides review guidance for project-local Peaks rules and QA preflight.', 'zh-CN': '为项目内 Peaks 规则和 QA preflight 提供代码评审指导。' } }
57
+ },
58
+ {
59
+ capabilityId: 'everything-claude-code.security-review-guidance',
60
+ sourceId: 'everything-claude-code',
61
+ name: 'Security Review Guidance',
62
+ itemType: 'rule',
63
+ category: 'security-review',
64
+ workflows: ['code-refactor', 'development-complete', 'project-standards'],
65
+ audience: ['engineer', 'qa'],
66
+ riskLevel: 'low',
67
+ inputContract: 'project-local diff and sensitive-boundary summary',
68
+ outputContract: 'security-review rules baseline',
69
+ fallback: { mode: 'peaks-built-in-security-checklist', qualityImpact: 'same', nextAction: 'Use Peaks curated security baseline if the external source is unavailable.' },
70
+ presentation: { displayName: { en: 'Security Review Guidance', 'zh-CN': '安全评审指导' }, description: { en: 'Provides security review guidance for project-local Peaks rules and QA preflight.', 'zh-CN': '为项目内 Peaks 规则和 QA preflight 提供安全评审指导。' } }
71
+ },
72
+ {
73
+ capabilityId: 'context7.docs-lookup',
74
+ sourceId: 'context7',
75
+ name: 'Context7 Docs Lookup',
76
+ itemType: 'mcp',
77
+ category: 'docs-lookup',
78
+ workflows: ['code-refactor', 'product-refactor', 'frontend-design'],
79
+ audience: ['engineer', 'product'],
80
+ riskLevel: 'low',
81
+ inputContract: 'library or API documentation request',
82
+ outputContract: 'documentation-summary',
83
+ fallback: { mode: 'manual-docs-input', qualityImpact: 'lower', nextAction: 'Ask the user to provide the relevant documentation link or pasted excerpt.' },
84
+ presentation: { displayName: { en: 'Documentation Lookup', 'zh-CN': '文档查询能力' }, description: { en: 'Fetches current library and API documentation for implementation planning.', 'zh-CN': '用于获取当前库和 API 文档,辅助实现规划。' } }
85
+ },
86
+ capability('playwright-mcp.browser-validation', 'playwright-mcp', 'Playwright MCP Browser Validation', 'mcp', 'browser-validation', ['engineer', 'qa'], 'medium', 'manual-browser-test', 'Use local Playwright or manual browser verification.', 'Playwright Browser Validation', 'Playwright 浏览器验证', 'Validates UI flows through controlled browser automation.', '通过受控浏览器自动化验证 UI 流程。'),
87
+ capability('chrome-devtools-mcp.browser-debug', 'chrome-devtools-mcp', 'Chrome DevTools Browser Debug', 'mcp', 'browser-debug', ['engineer', 'qa'], 'medium', 'manual-devtools-inspection', 'Use browser screenshots, console logs, and network traces supplied by the user.', 'Chrome DevTools Debug', 'Chrome DevTools 调试', 'Inspects runtime UI, console, network, and performance behavior.', '检查运行时 UI、控制台、网络和性能行为。'),
88
+ capability('figma-context-mcp.design-context', 'figma-context-mcp', 'Figma Design Context', 'mcp', 'design-context', ['designer', 'engineer'], 'medium', 'manual-design-input', 'Ask the user for screenshots, tokens, or exported design notes.', 'Figma Design Context', 'Figma 设计上下文', 'Reads design context for UI implementation planning.', '读取设计上下文以辅助 UI 实现规划。'),
89
+ capability('searchcode-mcp.code-search', 'searchcode-mcp', 'SearchCode MCP', 'mcp', 'code-search', ['engineer'], 'medium', 'local-code-search', 'Use local Grep/Glob and ask before sending private code externally.', 'External Code Search', '外部代码搜索', 'Searches code examples or repositories outside the current workspace.', '搜索当前工作区外部的代码示例或仓库。'),
90
+ capability('mysql-mcp.database-inspection', 'mysql-mcp-server', 'MySQL Database Inspection', 'mcp', 'database-inspection', ['engineer'], 'high', 'schema-excerpt-input', 'Ask the user for schema excerpts or sanitized query plans.', 'MySQL Inspection', 'MySQL 检查', 'Inspects MySQL schema and data through an MCP boundary.', '通过 MCP 边界检查 MySQL schema 与数据。'),
91
+ capability('agent-browser.browser-agent', 'agent-browser', 'Agent Browser', 'agent', 'browser-agent', ['engineer', 'qa'], 'medium', 'manual-browser-walkthrough', 'Use screenshots and manual test steps if agent browser is unavailable.', 'Agent Browser', '浏览器代理', 'Supports browser-based validation and interaction planning.', '支持基于浏览器的验证和交互规划。'),
92
+ capability('minimax-skills.worker-guidance', 'minimax-skills', 'MiniMax Worker Guidance', 'skill', 'worker-guidance', ['engineer'], 'medium', 'peaks-worker-contract', 'Use Peaks built-in minimax-worker contract and review handoff.', 'MiniMax Worker Guidance', 'MiniMax Worker 指南', 'Guides MiniMax coding/test worker delegation.', '指导 MiniMax 编码/测试 worker 委托。'),
93
+ capability('claude-mem.memory-persistence', 'claude-mem', 'Claude Memory Persistence', 'skill', 'memory', ['engineer'], 'medium', 'peaks-txt-context-capsule', 'Use peaks-txt context capsules without storing secrets.', 'Memory Persistence', '记忆持久化', 'Persists reusable context when explicitly approved.', '在明确授权时持久化可复用上下文。'),
94
+ capability('shadcn-ui.component-system', 'shadcn-ui', 'shadcn/ui Component System', 'doc', 'ui-components', ['engineer', 'designer'], 'low', 'project-local-ui-patterns', 'Use existing project components and design tokens.', 'Component System Reference', '组件系统参考', 'Provides component and design-system references for UI planning.', '为 UI 规划提供组件和设计系统参考。'),
95
+ capability('openspec.spec-workflow', 'openspec', 'OpenSpec Workflow', 'workflow', 'spec-workflow', ['product', 'engineer'], 'low', 'peaks-prd-rd-qa-artifacts', 'Use Peaks built-in PRD/RD/QA artifact flow.', 'OpenSpec Workflow', 'OpenSpec 规格流程', 'Supports spec-first product and engineering governance.', '支持规格优先的产品与工程治理。'),
96
+ capability('gitnexus.repo-intelligence', 'gitnexus', 'GitNexus Repository Intelligence', 'cli', 'repo-intelligence', ['engineer'], 'medium', 'local-repo-scan', 'Use local project scanning through Peaks RD.', 'Repository Intelligence', '仓库智能分析', 'Repository intelligence should be proxied through Peaks before use.', '仓库智能分析应先通过 Peaks 代理边界再使用。'),
97
+ capability('claude-code-best-practice.workflow-guidance', 'claude-code-best-practice', 'Claude Code Best Practice', 'doc', 'workflow-guidance', ['engineer'], 'low', 'peaks-built-in-rules', 'Use Peaks built-in workflow and review rules.', 'Claude Code Best Practice', 'Claude Code 最佳实践', 'Guidance for Claude Code engineering workflows.', 'Claude Code 工程工作流指导。'),
98
+ capability('superpowers.workflow-methodology', 'superpowers', 'Superpowers Methodology', 'workflow', 'workflow-methodology', ['product', 'engineer'], 'low', 'peaks-workflow-route', 'Use Peaks route/autonomous plans.', 'Superpowers Methodology', 'Superpowers 方法论', 'Workflow and artifact methodology reference.', '工作流与 artifact 方法论参考。'),
99
+ capability('penpot.design-source', 'penpot', 'Penpot Design Source', 'doc', 'design-source', ['designer', 'engineer'], 'medium', 'manual-design-input', 'Ask for exported design notes or screenshots.', 'Penpot Design Source', 'Penpot 设计来源', 'Design-source reference for UI planning.', '用于 UI 规划的设计来源参考。'),
100
+ capability('gstack.product-stack-guidance', 'gstack', 'Product Stack Guidance', 'doc', 'product-guidance', ['product'], 'low', 'peaks-prd', 'Use peaks-prd for product goals and non-goals.', 'Product Stack Guidance', '产品栈指导', 'Product and startup stack guidance reference.', '产品与创业栈指导参考。'),
101
+ capability('awesome-design-md.design-reference', 'awesome-design-md', 'Design Markdown Reference', 'doc', 'design-reference', ['designer', 'engineer'], 'low', 'peaks-ui-visual-direction', 'Use peaks-ui to define visual direction and interaction constraints.', 'Design Reference', '设计参考', 'Design markdown examples and inspiration.', '设计 markdown 示例与灵感。'),
102
+ capability('reactbits.ui-reference', 'reactbits', 'React Bits UI Reference', 'doc', 'ui-reference', ['engineer', 'designer'], 'low', 'project-local-ui-patterns', 'Use project-local UI patterns and accessibility checks.', 'React UI Reference', 'React UI 参考', 'React UI and motion reference for frontend design.', 'React UI 与动效参考。'),
103
+ capability('context-mode.context-management', 'context-mode', 'Context Management', 'mcp', 'context-management', ['engineer'], 'medium', 'peaks-txt-context-capsule', 'Use peaks-txt context capsules and avoid saving secrets.', 'Context Management', '上下文管理', 'Manages reusable context across workflows.', '管理跨工作流可复用上下文。'),
104
+ capability('ruflo-access-repo.workflow-reference', 'ruflo-access-repo', 'Ruflo Workflow Reference', 'doc', 'workflow-reference', ['engineer'], 'medium', 'peaks-autonomous-planning', 'Use Peaks autonomous planning references without executing external code.', 'Workflow Reference', '工作流参考', 'Catalog-only workflow orchestration reference.', '仅作为目录化的工作流编排参考。'),
105
+ capability('modelcontextprotocol-servers.collection', 'modelcontextprotocol-servers', 'MCP Server Collection', 'doc', 'mcp-collection', ['engineer'], 'medium', 'future-peaks-mcp-catalog', 'Use future Peaks MCP catalog review before selecting individual servers.', 'MCP Collection', 'MCP 集合', 'Catalog-only MCP server collection reference.', '仅作为目录化的 MCP server 集合参考。'),
106
+ capability('andrej-karpathy-skills.guidance', 'andrej-karpathy-skills', 'Engineering Guidance', 'doc', 'engineering-guidance', ['engineer'], 'low', 'project-local-standards', 'Use project-local standards before external guidance.', 'Engineering Guidance', '工程指导', 'External engineering guidance reference.', '外部工程指导参考。'),
107
+ capability('mattpocock-skills.typescript-guidance', 'mattpocock-skills', 'TypeScript Guidance', 'doc', 'typescript-guidance', ['engineer'], 'low', 'project-local-typescript-standards', 'Use project-local TypeScript standards first.', 'TypeScript Guidance', 'TypeScript 指导', 'External TypeScript guidance reference.', '外部 TypeScript 指导参考。'),
108
+ capability('impeccable.quality-guidance', 'impeccable', 'Quality Guidance', 'doc', 'quality-guidance', ['engineer'], 'low', 'peaks-review-gates', 'Use Peaks review gates as authoritative.', 'Quality Guidance', '质量指导', 'Quality reference catalog entry.', '质量参考目录项。'),
109
+ capability('vercel-agent-skills.skill-pack', 'vercel-agent-skills', 'Vercel Agent Skills Pack', 'skill', 'skill-pack', ['engineer'], 'medium', 'external-skill-catalog', 'Inspect individual skills before use.', 'Agent Skills Pack', '代理技能包', 'Catalog-only external skill pack.', '仅作为目录化的外部技能包。'),
110
+ capability('darwin-skill.external-skill', 'darwin-skill', 'Darwin Skill', 'skill', 'external-skill', ['engineer'], 'medium', 'external-skill-catalog', 'Inspect for project fit and safety before use.', 'Darwin Skill', 'Darwin 技能', 'Catalog-only external skill reference.', '仅作为目录化的外部技能参考。'),
111
+ capability('taste-skill.design-critique', 'taste-skill', 'Design Critique', 'skill', 'design-critique', ['designer', 'engineer'], 'low', 'peaks-ui-constraints', 'Use Peaks UI constraints as authoritative.', 'Design Critique', '设计品味评审', 'External design critique reference.', '外部设计评审参考。'),
112
+ capability('ui-ux-pro-max-skill.design-guidance', 'ui-ux-pro-max-skill', 'UI/UX Guidance', 'skill', 'design-guidance', ['designer', 'engineer'], 'medium', 'peaks-ui-constraints', 'Clarify product goals and accessibility constraints first.', 'UI/UX Guidance', 'UI/UX 指导', 'External UI/UX guidance reference.', '外部 UI/UX 指导参考。'),
113
+ capability('ruflo-mcp-server.workflow-reference', 'ruflo-mcp-server', 'Ruflo Workflow Reference', 'doc', 'workflow-reference', ['engineer'], 'medium', 'peaks-autonomous-planning', 'Use as orchestration inspiration only.', 'Workflow Reference', '工作流参考', 'Catalog-only workflow orchestration reference.', '仅作为目录化的工作流编排参考。'),
114
+ capability('anthropic-skills.skill-pack', 'anthropic-skills', 'Anthropic Skills Pack', 'skill', 'skill-pack', ['engineer'], 'medium', 'external-skill-catalog', 'Inspect individual skills before use.', 'Skills Pack', '技能包', 'Catalog-only external skill pack.', '仅作为目录化的外部技能包。'),
115
+ capability('vercel-skills.skill-pack', 'vercel-skills', 'Vercel Skills Pack', 'skill', 'skill-pack', ['engineer'], 'medium', 'external-skill-catalog', 'Inspect individual skills before use.', 'Skills Pack', '技能包', 'Catalog-only external skill pack.', '仅作为目录化的外部技能包。'),
116
+ capability('azure-skills.cloud-skill-pack', 'azure-skills', 'Azure Skills Pack', 'skill', 'cloud-skill-pack', ['engineer'], 'high', 'cloud-capability-catalog', 'Require explicit confirmation and credentials for cloud actions.', 'Azure Skills Pack', 'Azure 技能包', 'Catalog-only cloud skill pack.', '仅作为目录化的云技能包。')
117
+ ];
118
+ function capability(capabilityId, sourceId, name, itemType, category, audience, riskLevel, fallbackMode, nextAction, displayNameEn, displayNameZh, descriptionEn, descriptionZh) {
119
+ return {
120
+ capabilityId,
121
+ sourceId,
122
+ name,
123
+ itemType,
124
+ category,
125
+ workflows: ['capability-map'],
126
+ audience,
127
+ riskLevel,
128
+ fallback: { mode: fallbackMode, qualityImpact: fallbackMode.startsWith('peaks-') ? 'same' : 'lower', nextAction },
129
+ presentation: { displayName: { en: displayNameEn, 'zh-CN': displayNameZh }, description: { en: descriptionEn, 'zh-CN': descriptionZh } }
130
+ };
131
+ }
@@ -0,0 +1,2 @@
1
+ import type { CapabilityLandingMapping } from './recommendation-types.js';
2
+ export declare const seedCapabilityLandingMappings: CapabilityLandingMapping[];
@@ -0,0 +1,42 @@
1
+ export const seedCapabilityLandingMappings = [
2
+ mapping({ capabilityId: 'ruflo-access-repo.workflow-reference', sourceId: 'ruflo-access-repo', sourceGroup: 'access-repo', landingKind: 'catalog', target: 'peaks autonomous planning reference', guidance: 'Use as workflow orchestration inspiration only; Peaks owns execution boundaries.' }),
3
+ mapping({ capabilityId: 'context7.docs-lookup', sourceId: 'context7', sourceGroup: 'access-repo', landingKind: 'cli', target: 'peaks recommend', commandPreview: 'peaks recommend --workflow code-refactor --json', guidance: 'Use for current library/API documentation lookup through approved MCP access.' }),
4
+ mapping({ capabilityId: 'playwright-mcp.browser-validation', sourceId: 'playwright-mcp', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-qa', skillName: 'peaks-qa', guidance: 'Use for browser and E2E validation after user-approved app targets are available.' }),
5
+ mapping({ capabilityId: 'chrome-devtools-mcp.browser-debug', sourceId: 'chrome-devtools-mcp', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use for runtime UI, console, network, and performance inspection.' }),
6
+ mapping({ capabilityId: 'context-mode.context-management', sourceId: 'context-mode', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-txt', skillName: 'peaks-txt', guidance: 'Use only for explicit context management; durable memory requires user opt-in.' }),
7
+ mapping({ capabilityId: 'modelcontextprotocol-servers.collection', sourceId: 'modelcontextprotocol-servers', sourceGroup: 'access-repo', landingKind: 'catalog', target: 'future peaks mcp catalog', guidance: 'Treat as an unscanned MCP collection; do not auto-install unknown servers.' }),
8
+ mapping({ capabilityId: 'searchcode-mcp.code-search', sourceId: 'searchcode-mcp', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Use for external code discovery only after confirming queries do not expose secrets or private code.' }),
9
+ mapping({ capabilityId: 'mysql-mcp.database-inspection', sourceId: 'mysql-mcp-server', sourceGroup: 'access-repo', landingKind: 'catalog', target: 'database capability boundary', guidance: 'Database access requires explicit credentials and confirmation before any write query.' }),
10
+ mapping({ capabilityId: 'figma-context-mcp.design-context', sourceId: 'figma-context-mcp', sourceGroup: 'access-repo', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use for design-to-code context only with user-authorized Figma access.' }),
11
+ mapping({ capabilityId: 'everything-claude-code.code-review-agent', sourceId: 'everything-claude-code', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Use as code review capability after local diff and test evidence exist.' }),
12
+ mapping({ capabilityId: 'everything-claude-code.code-review-guidance', sourceId: 'everything-claude-code', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-qa', skillName: 'peaks-qa', guidance: 'Use as project-local code review standards guidance during QA preflight.' }),
13
+ mapping({ capabilityId: 'everything-claude-code.language-standards', sourceId: 'everything-claude-code', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Use as curated language standards source during RD standards preflight.' }),
14
+ mapping({ capabilityId: 'everything-claude-code.security-review-agent', sourceId: 'everything-claude-code', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Use as security review capability after local diff and test evidence exist.' }),
15
+ mapping({ capabilityId: 'everything-claude-code.security-review-guidance', sourceId: 'everything-claude-code', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-qa', skillName: 'peaks-qa', guidance: 'Use as project-local security review standards guidance during QA preflight.' }),
16
+ mapping({ capabilityId: 'andrej-karpathy-skills.guidance', sourceId: 'andrej-karpathy-skills', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Use as engineering guidance inspiration after project-local standards are scanned.' }),
17
+ mapping({ capabilityId: 'mattpocock-skills.typescript-guidance', sourceId: 'mattpocock-skills', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Use as TypeScript guidance only when it fits project-local conventions.' }),
18
+ mapping({ capabilityId: 'impeccable.quality-guidance', sourceId: 'impeccable', sourceGroup: 'mcp-server', landingKind: 'catalog', target: 'quality reference catalog', guidance: 'Use as quality inspiration; Peaks review gates remain authoritative.' }),
19
+ mapping({ capabilityId: 'vercel-agent-skills.skill-pack', sourceId: 'vercel-agent-skills', sourceGroup: 'mcp-server', landingKind: 'catalog', target: 'external skill catalog', guidance: 'Catalog only until individual skills are inspected and approved.' }),
20
+ mapping({ capabilityId: 'agent-browser.browser-agent', sourceId: 'agent-browser', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-qa', skillName: 'peaks-qa', guidance: 'Use for browser validation; never submit forms or mutate authenticated state without explicit permission.' }),
21
+ mapping({ capabilityId: 'minimax-skills.worker-guidance', sourceId: 'minimax-skills', sourceGroup: 'mcp-server', landingKind: 'cli', target: 'peaks minimax-worker', commandPreview: 'peaks minimax-worker --json', guidance: 'Use Peaks worker command only after reviewing inputs; add --confirm manually when explicit external-provider approval exists.' }),
22
+ mapping({ capabilityId: 'claude-mem.memory-persistence', sourceId: 'claude-mem', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-txt', skillName: 'peaks-txt', guidance: 'Use only with explicit durable-memory consent and never store secrets.' }),
23
+ mapping({ capabilityId: 'shadcn-ui.component-system', sourceId: 'shadcn-ui', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use as a component-system reference, not as an unreviewed generated UI default.' }),
24
+ mapping({ capabilityId: 'darwin-skill.external-skill', sourceId: 'darwin-skill', sourceGroup: 'mcp-server', landingKind: 'catalog', target: 'external skill catalog', guidance: 'Catalog only until inspected for project fit and safety.' }),
25
+ mapping({ capabilityId: 'claude-code-best-practice.workflow-guidance', sourceId: 'claude-code-best-practice', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-rd', skillName: 'peaks-rd', guidance: 'Use as Claude Code workflow reference while preserving Peaks gates.' }),
26
+ mapping({ capabilityId: 'openspec.spec-workflow', sourceId: 'openspec', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-prd', skillName: 'peaks-prd', guidance: 'Use for spec-first product and engineering artifact structure.' }),
27
+ mapping({ capabilityId: 'gitnexus.repo-intelligence', sourceId: 'gitnexus', sourceGroup: 'mcp-server', landingKind: 'fallback', target: 'future peaks mcp gitnexus proxy', guidance: 'Do not install globally; future use should be proxied through Peaks.' }),
28
+ mapping({ capabilityId: 'taste-skill.design-critique', sourceId: 'taste-skill', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use as design critique inspiration, with Peaks UI constraints staying authoritative.' }),
29
+ mapping({ capabilityId: 'ui-ux-pro-max-skill.design-guidance', sourceId: 'ui-ux-pro-max-skill', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use as UI/UX guidance after product goals and accessibility constraints are clear.' }),
30
+ mapping({ capabilityId: 'ruflo-mcp-server.workflow-reference', sourceId: 'ruflo-mcp-server', sourceGroup: 'mcp-server', landingKind: 'catalog', target: 'peaks autonomous planning reference', guidance: 'Use as orchestration inspiration only; Peaks owns execution boundaries.' }),
31
+ mapping({ capabilityId: 'superpowers.workflow-methodology', sourceId: 'superpowers', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-prd', skillName: 'peaks-prd', guidance: 'Use as workflow methodology reference for artifact sequencing.' }),
32
+ mapping({ capabilityId: 'penpot.design-source', sourceId: 'penpot', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use as design-source context only with user-authorized project access.' }),
33
+ mapping({ capabilityId: 'gstack.product-stack-guidance', sourceId: 'gstack', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-prd', skillName: 'peaks-prd', guidance: 'Use as product-stack guidance, not as a substitute for user goals.' }),
34
+ mapping({ capabilityId: 'awesome-design-md.design-reference', sourceId: 'awesome-design-md', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use as visual/reference material while preserving product-specific design direction.' }),
35
+ mapping({ capabilityId: 'anthropic-skills.skill-pack', sourceId: 'anthropic-skills', sourceGroup: 'mcp-server', landingKind: 'catalog', target: 'external skill catalog', guidance: 'Catalog only until individual skills are inspected and approved.' }),
36
+ mapping({ capabilityId: 'vercel-skills.skill-pack', sourceId: 'vercel-skills', sourceGroup: 'mcp-server', landingKind: 'catalog', target: 'external skill catalog', guidance: 'Catalog only until individual skills are inspected and approved.' }),
37
+ mapping({ capabilityId: 'reactbits.ui-reference', sourceId: 'reactbits', sourceGroup: 'mcp-server', landingKind: 'skill', target: 'peaks-ui', skillName: 'peaks-ui', guidance: 'Use as UI and motion inspiration after checking license, accessibility, and performance.' }),
38
+ mapping({ capabilityId: 'azure-skills.cloud-skill-pack', sourceId: 'azure-skills', sourceGroup: 'mcp-server', landingKind: 'catalog', target: 'cloud capability catalog', guidance: 'Cloud actions can affect cost and infrastructure; require explicit confirmation and credentials.' })
39
+ ];
40
+ function mapping(input) {
41
+ return { ...input, dryRunOnly: true };
42
+ }
@@ -0,0 +1,2 @@
1
+ import type { CapabilitySource } from './recommendation-types.js';
2
+ export declare const seedCapabilitySources: CapabilitySource[];
@@ -0,0 +1,35 @@
1
+ export const seedCapabilitySources = [
2
+ { sourceId: 'ruflo-access-repo', sourceType: 'repo', sourceGroup: 'access-repo', title: 'Ruflo', url: 'https://github.com/ruvnet/ruflo', trustSignals: { notes: ['Workflow orchestration reference; do not execute or install from the capability map.'] }, discoveryStatus: 'unscanned', items: ['ruflo-access-repo.workflow-reference'] },
3
+ { sourceId: 'context7', sourceType: 'repo', sourceGroup: 'access-repo', title: 'Context7', url: 'https://github.com/upstash/context7', trustSignals: { sourceReputation: 'commonly used docs lookup MCP capability' }, discoveryStatus: 'indexed', items: ['context7.docs-lookup'] },
4
+ { sourceId: 'playwright-mcp', sourceType: 'repo', sourceGroup: 'access-repo', title: 'Playwright MCP', url: 'https://github.com/microsoft/playwright-mcp', trustSignals: { sourceReputation: 'Microsoft browser automation MCP server' }, discoveryStatus: 'indexed', items: ['playwright-mcp.browser-validation'] },
5
+ { sourceId: 'chrome-devtools-mcp', sourceType: 'website', sourceGroup: 'access-repo', title: 'Chrome DevTools MCP', url: 'https://www.pulsemcp.com/servers/chrome-devtools', trustSignals: { notes: ['Browser inspection and performance debugging capability.'] }, discoveryStatus: 'indexed', items: ['chrome-devtools-mcp.browser-debug'] },
6
+ { sourceId: 'context-mode', sourceType: 'repo', sourceGroup: 'access-repo', title: 'Context Mode', url: 'https://github.com/mksglu/context-mode', trustSignals: { notes: ['Context and memory management reference.'] }, discoveryStatus: 'indexed', items: ['context-mode.context-management'] },
7
+ { sourceId: 'modelcontextprotocol-servers', sourceType: 'mcp-collection', sourceGroup: 'access-repo', title: 'Model Context Protocol Servers', url: 'https://github.com/modelcontextprotocol/servers', trustSignals: { sourceReputation: 'official MCP server collection' }, discoveryStatus: 'unscanned', items: ['modelcontextprotocol-servers.collection'] },
8
+ { sourceId: 'searchcode-mcp', sourceType: 'website', sourceGroup: 'access-repo', title: 'SearchCode MCP', url: 'https://www.pulsemcp.com/servers/searchcode', trustSignals: { notes: ['External code search capability; avoid sending secrets or private snippets without approval.'] }, discoveryStatus: 'indexed', items: ['searchcode-mcp.code-search'] },
9
+ { sourceId: 'mysql-mcp-server', sourceType: 'repo', sourceGroup: 'access-repo', title: 'MySQL MCP Server', url: 'https://github.com/designcomputer/mysql_mcp_server', trustSignals: { notes: ['Database access requires explicit credentials and write-query confirmation.'] }, discoveryStatus: 'indexed', items: ['mysql-mcp.database-inspection'] },
10
+ { sourceId: 'figma-context-mcp', sourceType: 'repo', sourceGroup: 'access-repo', title: 'Figma Context MCP', url: 'https://github.com/glips/figma-context-mcp', trustSignals: { notes: ['Design context extraction requires explicit user-authorized design access.'] }, discoveryStatus: 'indexed', items: ['figma-context-mcp.design-context'] },
11
+ { sourceId: 'everything-claude-code', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'everything-claude-code', url: 'https://github.com/affaan-m/everything-claude-code', trustSignals: { sourceReputation: 'hackathon-winning Claude Code resource collection', notes: ['Treat as a source bundle; deep indexing is required before broad automatic use.'] }, discoveryStatus: 'indexed', items: ['everything-claude-code.code-review-agent', 'everything-claude-code.code-review-guidance', 'everything-claude-code.language-standards', 'everything-claude-code.security-review-agent', 'everything-claude-code.security-review-guidance'] },
12
+ { sourceId: 'andrej-karpathy-skills', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'andrej-karpathy-skills', url: 'https://github.com/multica-ai/andrej-karpathy-skills', discoveryStatus: 'unscanned', items: ['andrej-karpathy-skills.guidance'] },
13
+ { sourceId: 'mattpocock-skills', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'mattpocock/skills', url: 'https://github.com/mattpocock/skills', discoveryStatus: 'unscanned', items: ['mattpocock-skills.typescript-guidance'] },
14
+ { sourceId: 'impeccable', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'impeccable', url: 'https://github.com/pbakaus/impeccable', discoveryStatus: 'unscanned', items: ['impeccable.quality-guidance'] },
15
+ { sourceId: 'vercel-agent-skills', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'Vercel Agent Skills', url: 'https://github.com/vercel-labs/agent-skills', discoveryStatus: 'unscanned', items: ['vercel-agent-skills.skill-pack'] },
16
+ { sourceId: 'agent-browser', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'Agent Browser', url: 'https://github.com/vercel-labs/agent-browser', discoveryStatus: 'indexed', items: ['agent-browser.browser-agent'] },
17
+ { sourceId: 'minimax-skills', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'MiniMax Skills', url: 'https://github.com/MiniMax-AI/skills', discoveryStatus: 'indexed', items: ['minimax-skills.worker-guidance'] },
18
+ { sourceId: 'claude-mem', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'claude-mem', url: 'https://github.com/thedotmack/claude-mem', discoveryStatus: 'indexed', items: ['claude-mem.memory-persistence'] },
19
+ { sourceId: 'shadcn-ui', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'shadcn/ui', url: 'https://github.com/shadcn-ui/ui', discoveryStatus: 'indexed', items: ['shadcn-ui.component-system'] },
20
+ { sourceId: 'darwin-skill', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'darwin-skill', url: 'https://github.com/alchaincyf/darwin-skill', discoveryStatus: 'unscanned', items: ['darwin-skill.external-skill'] },
21
+ { sourceId: 'claude-code-best-practice', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'Claude Code Best Practice', url: 'https://github.com/shanraisshan/claude-code-best-practice', discoveryStatus: 'indexed', items: ['claude-code-best-practice.workflow-guidance'] },
22
+ { sourceId: 'openspec', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'OpenSpec', url: 'https://github.com/Fission-AI/OpenSpec', discoveryStatus: 'indexed', items: ['openspec.spec-workflow'] },
23
+ { sourceId: 'gitnexus', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'GitNexus', url: 'https://github.com/abhigyanpatwari/GitNexus', discoveryStatus: 'unscanned', items: ['gitnexus.repo-intelligence'] },
24
+ { sourceId: 'taste-skill', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'taste-skill', url: 'https://github.com/Leonxlnx/taste-skill', discoveryStatus: 'unscanned', items: ['taste-skill.design-critique'] },
25
+ { sourceId: 'ui-ux-pro-max-skill', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'ui-ux-pro-max-skill', url: 'https://github.com/nextlevelbuilder/ui-ux-pro-max-skill', discoveryStatus: 'unscanned', items: ['ui-ux-pro-max-skill.design-guidance'] },
26
+ { sourceId: 'ruflo-mcp-server', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'Ruflo', url: 'https://github.com/ruvnet/ruflo', discoveryStatus: 'unscanned', items: ['ruflo-mcp-server.workflow-reference'] },
27
+ { sourceId: 'superpowers', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'Superpowers', url: 'https://github.com/obra/superpowers', discoveryStatus: 'indexed', items: ['superpowers.workflow-methodology'] },
28
+ { sourceId: 'penpot', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'Penpot', url: 'https://github.com/penpot/penpot', discoveryStatus: 'indexed', items: ['penpot.design-source'] },
29
+ { sourceId: 'gstack', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'gstack', url: 'https://github.com/garrytan/gstack', discoveryStatus: 'indexed', items: ['gstack.product-stack-guidance'] },
30
+ { sourceId: 'awesome-design-md', sourceType: 'repo', sourceGroup: 'mcp-server', title: 'awesome-design-md', url: 'https://github.com/VoltAgent/awesome-design-md', discoveryStatus: 'indexed', items: ['awesome-design-md.design-reference'] },
31
+ { sourceId: 'anthropic-skills', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'Anthropic Skills', url: 'https://github.com/anthropics/skills', discoveryStatus: 'unscanned', items: ['anthropic-skills.skill-pack'] },
32
+ { sourceId: 'vercel-skills', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'Vercel Skills', url: 'https://github.com/vercel-labs/skills', discoveryStatus: 'unscanned', items: ['vercel-skills.skill-pack'] },
33
+ { sourceId: 'reactbits', sourceType: 'website', sourceGroup: 'mcp-server', title: 'React Bits', url: 'https://reactbits.dev/', discoveryStatus: 'indexed', items: ['reactbits.ui-reference'] },
34
+ { sourceId: 'azure-skills', sourceType: 'skills-package', sourceGroup: 'mcp-server', title: 'Azure Skills', url: 'https://github.com/microsoft/azure-skills', trustSignals: { notes: ['Cloud operations require explicit user confirmation and credential boundaries.'] }, discoveryStatus: 'unscanned', items: ['azure-skills.cloud-skill-pack'] }
35
+ ];
@@ -0,0 +1,8 @@
1
+ import type { RecommendationPlan } from './recommendation-types.js';
2
+ export type RecommendationWorkflow = 'code-refactor' | 'product-refactor' | 'frontend-design';
3
+ export type CreateRecommendationPlanOptions = {
4
+ workflow: RecommendationWorkflow;
5
+ language?: string;
6
+ installedCapabilityIds?: string[];
7
+ };
8
+ export declare function createRecommendationPlan(options: CreateRecommendationPlanOptions): RecommendationPlan;
@@ -0,0 +1,106 @@
1
+ import { resolveCapabilityAvailability } from './capability-availability.js';
2
+ import { seedCapabilityItems } from './seed-capability-catalog.js';
3
+ function getWorkflowItems(workflow) {
4
+ return seedCapabilityItems.filter((item) => item.workflows.includes(workflow));
5
+ }
6
+ function localize(language, zh, en) {
7
+ return language.startsWith('zh') ? zh : en;
8
+ }
9
+ function getWorkflowSummary(workflow, language) {
10
+ if (workflow === 'code-refactor') {
11
+ return localize(language, '建议先为代码重构准备代码评审和文档查询能力;缺失能力会以 fallback 方式显式展示。', 'Prepare code review and documentation lookup capabilities for code refactor; missing capabilities are shown with explicit fallbacks.');
12
+ }
13
+ if (workflow === 'product-refactor') {
14
+ return localize(language, '建议先围绕产品理解成本、交互路径和验收标准生成推荐计划。', 'Prepare a recommendation plan around product comprehension cost, interaction flow, and acceptance criteria.');
15
+ }
16
+ return localize(language, '建议先准备前端设计、浏览器验证和文档查询能力。', 'Prepare frontend design, browser validation, and documentation lookup capabilities.');
17
+ }
18
+ function getPreferredCapabilityId(workflow) {
19
+ if (workflow === 'code-refactor') {
20
+ return 'everything-claude-code.code-review-agent';
21
+ }
22
+ return 'context7.docs-lookup';
23
+ }
24
+ function toFallbackActionId(capabilityId) {
25
+ return `use-fallback-${capabilityId.replaceAll('.', '-')}`;
26
+ }
27
+ function getNextActions(workflow, availability) {
28
+ const preferredCapabilityId = getPreferredCapabilityId(workflow);
29
+ const preferredAvailability = availability.find((item) => item.capabilityId === preferredCapabilityId);
30
+ const fallbackActions = availability
31
+ .filter((item) => item.status !== 'available')
32
+ .map((item) => ({
33
+ id: toFallbackActionId(item.capabilityId),
34
+ type: 'use-fallback',
35
+ capabilityId: item.capabilityId,
36
+ requiresApproval: true,
37
+ riskLevel: item.risk
38
+ }));
39
+ if (preferredAvailability?.status !== 'available') {
40
+ return fallbackActions;
41
+ }
42
+ const invokeAction = workflow === 'code-refactor'
43
+ ? {
44
+ id: 'run-code-review',
45
+ type: 'invoke-capability',
46
+ capabilityId: preferredCapabilityId,
47
+ requiresApproval: false,
48
+ riskLevel: preferredAvailability.risk
49
+ }
50
+ : {
51
+ id: 'lookup-docs',
52
+ type: 'invoke-capability',
53
+ capabilityId: preferredCapabilityId,
54
+ requiresApproval: false,
55
+ riskLevel: preferredAvailability.risk
56
+ };
57
+ return [...fallbackActions, invokeAction];
58
+ }
59
+ export function createRecommendationPlan(options) {
60
+ const language = options.language ?? 'en';
61
+ const workflowItems = getWorkflowItems(options.workflow);
62
+ const availabilityOptions = options.installedCapabilityIds
63
+ ? { installedCapabilityIds: options.installedCapabilityIds }
64
+ : {};
65
+ const availability = resolveCapabilityAvailability(workflowItems, availabilityOptions);
66
+ const missingCapabilities = availability.filter((item) => item.status !== 'available');
67
+ const requiredCapabilities = workflowItems.map((item) => item.capabilityId);
68
+ const recommendedOption = {
69
+ id: 'recommended-foundation-route',
70
+ label: 'foundation-route',
71
+ why: 'Use available capabilities and expose missing ones before execution.',
72
+ requiredCapabilities,
73
+ ...(missingCapabilities.length > 0 ? { fallbackPath: 'explicit-fallback' } : {})
74
+ };
75
+ return {
76
+ intent: options.workflow,
77
+ workflow: options.workflow,
78
+ profile: 'solo-guided-auto',
79
+ audience: ['engineer'],
80
+ options: [recommendedOption],
81
+ requiredCapabilities,
82
+ availability,
83
+ fallbacks: missingCapabilities.map((item) => item.fallback),
84
+ decisionRequired: missingCapabilities.length > 0,
85
+ machine: {
86
+ nextActions: getNextActions(options.workflow, availability),
87
+ constraints: ['do-not-install-capabilities', 'do-not-mutate-remote-state'],
88
+ stopConditions: ['missing-required-capability-without-fallback']
89
+ },
90
+ presentation: {
91
+ language,
92
+ summary: getWorkflowSummary(options.workflow, language),
93
+ options: [
94
+ {
95
+ id: 'recommended-foundation-route',
96
+ label: localize(language, '使用推荐基础路线', 'Use recommended foundation route'),
97
+ why: localize(language, '先检查能力是否可用,再决定执行或降级,避免模型发散。', 'Check capability availability before execution or fallback to avoid model drift.')
98
+ }
99
+ ],
100
+ warnings: missingCapabilities.map((item) => localize(language, `缺少能力:${item.capabilityId},将使用 fallback。`, `Missing capability: ${item.capabilityId}; fallback will be used.`)),
101
+ explanations: [
102
+ localize(language, '机器层保持稳定英文契约,给人看的摘要跟随当前语言。', 'The machine layer keeps stable English contracts while human summaries follow the selected language.')
103
+ ]
104
+ }
105
+ };
106
+ }
@@ -0,0 +1,129 @@
1
+ export type CapabilitySourceType = 'repo' | 'skills-package' | 'mcp-collection' | 'website' | 'local-install';
2
+ export type CapabilityItemType = 'skill' | 'agent' | 'mcp' | 'rule' | 'hook' | 'template' | 'workflow' | 'doc' | 'cli';
3
+ export type CapabilityAvailabilityStatus = 'available' | 'installable' | 'disabled' | 'unknown';
4
+ export type RiskLevel = 'low' | 'medium' | 'high';
5
+ export type CapabilitySourceGroup = 'access-repo' | 'mcp-server';
6
+ export type CapabilityLandingKind = 'cli' | 'skill' | 'catalog' | 'fallback';
7
+ export type CapabilityMapSourceFilter = CapabilitySourceGroup | 'all';
8
+ export type LocalizedText = Record<string, string>;
9
+ export type CapabilityFallback = {
10
+ mode: string;
11
+ qualityImpact: string;
12
+ nextAction?: string;
13
+ };
14
+ export type CapabilitySource = {
15
+ sourceId: string;
16
+ sourceType: CapabilitySourceType;
17
+ sourceGroup?: CapabilitySourceGroup;
18
+ title: string;
19
+ url: string;
20
+ trustSignals?: {
21
+ sourceReputation?: string;
22
+ stars?: number;
23
+ installs?: number;
24
+ maintainer?: string;
25
+ notes?: string[];
26
+ };
27
+ discoveryStatus: 'unscanned' | 'indexed' | 'verified' | 'deprecated';
28
+ items: string[];
29
+ };
30
+ export type CapabilityItem = {
31
+ capabilityId: string;
32
+ sourceId: string;
33
+ name: string;
34
+ itemType: CapabilityItemType;
35
+ category: string;
36
+ workflows: string[];
37
+ audience: string[];
38
+ riskLevel: RiskLevel;
39
+ inputContract?: string;
40
+ outputContract?: string;
41
+ fallback: CapabilityFallback;
42
+ presentation: {
43
+ displayName: LocalizedText;
44
+ description: LocalizedText;
45
+ };
46
+ };
47
+ export type CapabilityAvailability = {
48
+ capabilityId: string;
49
+ type: 'skill' | 'mcp' | 'cli' | 'agent' | 'profile';
50
+ status: CapabilityAvailabilityStatus;
51
+ requiredFor: string[];
52
+ installPlan?: {
53
+ available: boolean;
54
+ commandPreview?: string;
55
+ requiresApproval: boolean;
56
+ };
57
+ fallback: CapabilityFallback;
58
+ risk: RiskLevel;
59
+ };
60
+ export type CapabilityLandingMapping = {
61
+ capabilityId: string;
62
+ sourceId: string;
63
+ sourceGroup: CapabilitySourceGroup;
64
+ landingKind: CapabilityLandingKind;
65
+ target: string;
66
+ commandPreview?: string;
67
+ skillName?: string;
68
+ guidance: string;
69
+ dryRunOnly: boolean;
70
+ };
71
+ export type CapabilityMapPlan = {
72
+ dryRunOnly: true;
73
+ executionPolicy: {
74
+ allowInstall: false;
75
+ allowClone: false;
76
+ allowConfigWrite: false;
77
+ allowSecretExfiltration: false;
78
+ };
79
+ proxyPolicy?: {
80
+ requiredForExternalAccess: true;
81
+ httpProxy: string;
82
+ };
83
+ sources: CapabilitySource[];
84
+ items: CapabilityItem[];
85
+ mappings: CapabilityLandingMapping[];
86
+ availability: CapabilityAvailability[];
87
+ constraints: string[];
88
+ warnings: string[];
89
+ };
90
+ export type RecommendationOption = {
91
+ id: string;
92
+ label: string;
93
+ why: string;
94
+ requiredCapabilities: string[];
95
+ fallbackPath?: string;
96
+ };
97
+ export type RecommendationPlan = {
98
+ intent: string;
99
+ workflow: string;
100
+ profile: string;
101
+ audience: string[];
102
+ options: RecommendationOption[];
103
+ requiredCapabilities: string[];
104
+ availability: CapabilityAvailability[];
105
+ fallbacks: CapabilityFallback[];
106
+ decisionRequired: boolean;
107
+ machine: {
108
+ nextActions: Array<{
109
+ id: string;
110
+ type: 'invoke-capability' | 'use-fallback';
111
+ capabilityId?: string;
112
+ requiresApproval: boolean;
113
+ riskLevel: RiskLevel;
114
+ }>;
115
+ constraints: string[];
116
+ stopConditions: string[];
117
+ };
118
+ presentation: {
119
+ language: string;
120
+ summary: string;
121
+ options: Array<{
122
+ id: string;
123
+ label: string;
124
+ why: string;
125
+ }>;
126
+ warnings: string[];
127
+ explanations: string[];
128
+ };
129
+ };
@@ -0,0 +1,3 @@
1
+ export { seedCapabilityItems } from './capability-seed-items.js';
2
+ export { seedCapabilityLandingMappings } from './capability-seed-mappings.js';
3
+ export { seedCapabilitySources } from './capability-seed-sources.js';
@@ -0,0 +1,3 @@
1
+ export { seedCapabilityItems } from './capability-seed-items.js';
2
+ export { seedCapabilityLandingMappings } from './capability-seed-mappings.js';
3
+ export { seedCapabilitySources } from './capability-seed-sources.js';
@@ -0,0 +1,9 @@
1
+ export type RefactorMode = 'solo' | 'rd';
2
+ export type RefactorDryRun = {
3
+ mode: RefactorMode;
4
+ implementationAllowed: false;
5
+ hardGates: string[];
6
+ requiredArtifacts: string[];
7
+ nextActions: string[];
8
+ };
9
+ export declare function createRefactorDryRun(mode: RefactorMode): RefactorDryRun;
@@ -0,0 +1,33 @@
1
+ export function createRefactorDryRun(mode) {
2
+ return {
3
+ mode,
4
+ implementationAllowed: false,
5
+ hardGates: [
6
+ 'Understand the project before changes',
7
+ 'Prefer existing project standards over Peaks built-ins',
8
+ 'Require UT coverage >= 95%',
9
+ 'Treat missing, unknown, or unverifiable coverage as failing',
10
+ 'Coverage success only allows analysis and spec generation',
11
+ 'Split broad refactors into minimal functional slices',
12
+ 'Generate strict verifiable spec before each slice',
13
+ 'Require peaks-prd and peaks-qa artifacts even for direct peaks-rd refactor',
14
+ 'Require 100% acceptance for each slice',
15
+ 'Commit code and intermediate artifacts before the next slice'
16
+ ],
17
+ requiredArtifacts: [
18
+ 'project-scan.md',
19
+ 'coverage-report.md',
20
+ 'feature-slice-map.md',
21
+ 'slice-spec.md',
22
+ 'acceptance-spec.md',
23
+ 'validation-report.md',
24
+ 'artifact-retention-report.md',
25
+ 'commit-required.md'
26
+ ],
27
+ nextActions: [
28
+ 'Run doctor checks',
29
+ 'Initialize or link the remote artifact repository',
30
+ 'Generate the first refactor slice spec before implementation'
31
+ ]
32
+ };
33
+ }
@@ -0,0 +1 @@
1
+ export * from './sc-service.js';
@@ -0,0 +1 @@
1
+ export * from './sc-service.js';