@hongmaple0820/scale-engine 0.25.0 → 0.27.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 (171) hide show
  1. package/LICENSE +15 -15
  2. package/README.en.md +384 -346
  3. package/README.md +564 -529
  4. package/dist/adapters/AiderAdapter.js +52 -52
  5. package/dist/adapters/AntigravityAdapter.d.ts +4 -0
  6. package/dist/adapters/AntigravityAdapter.js +21 -0
  7. package/dist/adapters/AntigravityAdapter.js.map +1 -0
  8. package/dist/adapters/ClaudeCodeAdapter.d.ts +4 -1
  9. package/dist/adapters/ClaudeCodeAdapter.js +34 -34
  10. package/dist/adapters/ClaudeCodeAdapter.js.map +1 -1
  11. package/dist/adapters/ClineAdapter.d.ts +4 -0
  12. package/dist/adapters/ClineAdapter.js +20 -0
  13. package/dist/adapters/ClineAdapter.js.map +1 -0
  14. package/dist/adapters/CodexAdapter.js +28 -28
  15. package/dist/adapters/CursorAdapter.js +26 -26
  16. package/dist/adapters/DeepSeekTuiAdapter.js +97 -97
  17. package/dist/adapters/DoubaoAdapter.js +33 -33
  18. package/dist/adapters/GeminiAdapter.js +26 -26
  19. package/dist/adapters/GenericProjectAgentAdapter.d.ts +29 -0
  20. package/dist/adapters/GenericProjectAgentAdapter.js +204 -0
  21. package/dist/adapters/GenericProjectAgentAdapter.js.map +1 -0
  22. package/dist/adapters/HermesAdapter.js +26 -26
  23. package/dist/adapters/JCodeAdapter.d.ts +4 -0
  24. package/dist/adapters/JCodeAdapter.js +19 -0
  25. package/dist/adapters/JCodeAdapter.js.map +1 -0
  26. package/dist/adapters/KiloCodeAdapter.d.ts +4 -0
  27. package/dist/adapters/KiloCodeAdapter.js +20 -0
  28. package/dist/adapters/KiloCodeAdapter.js.map +1 -0
  29. package/dist/adapters/KimiAdapter.js +32 -32
  30. package/dist/adapters/KiroAdapter.js +26 -26
  31. package/dist/adapters/OpenClawAdapter.js +26 -26
  32. package/dist/adapters/OpenCodeAdapter.js +26 -26
  33. package/dist/adapters/QCoderAdapter.js +26 -26
  34. package/dist/adapters/QoderAdapter.d.ts +4 -0
  35. package/dist/adapters/QoderAdapter.js +21 -0
  36. package/dist/adapters/QoderAdapter.js.map +1 -0
  37. package/dist/adapters/TraeAdapter.js +26 -26
  38. package/dist/adapters/VSCAdapter.js +26 -26
  39. package/dist/adapters/WindsurfAdapter.js +32 -32
  40. package/dist/adapters/WorkBuddyAdapter.js +26 -26
  41. package/dist/adapters/index.d.ts +5 -0
  42. package/dist/adapters/index.js +15 -0
  43. package/dist/adapters/index.js.map +1 -1
  44. package/dist/api/cli.js +190 -56
  45. package/dist/api/cli.js.map +1 -1
  46. package/dist/api/doctor.js +10 -3
  47. package/dist/api/doctor.js.map +1 -1
  48. package/dist/api/quickstart.js +7 -1
  49. package/dist/api/quickstart.js.map +1 -1
  50. package/dist/artifact/sqliteStore.js +89 -89
  51. package/dist/artifact/types.d.ts +1 -1
  52. package/dist/cli/phaseCommands.js +53 -53
  53. package/dist/cli/phaseCommands.js.map +1 -1
  54. package/dist/context/AntiPatternRegistry.js +20 -20
  55. package/dist/context/ContextBudget.d.ts +14 -0
  56. package/dist/context/ContextBudget.js +50 -14
  57. package/dist/context/ContextBudget.js.map +1 -1
  58. package/dist/context/ContextBuilder.js +155 -155
  59. package/dist/context/ContextCompiler.d.ts +34 -0
  60. package/dist/context/ContextCompiler.js +120 -0
  61. package/dist/context/ContextCompiler.js.map +1 -0
  62. package/dist/eval/WorkflowEval.js +4 -6
  63. package/dist/eval/WorkflowEval.js.map +1 -1
  64. package/dist/evolution/EvolutionEngine.js +31 -31
  65. package/dist/evolution/EvolutionEvaluator.d.ts +2 -0
  66. package/dist/evolution/EvolutionEvaluator.js +7 -1
  67. package/dist/evolution/EvolutionEvaluator.js.map +1 -1
  68. package/dist/fsm/FSMAgentBridge.js +11 -11
  69. package/dist/governance/GovernanceRoi.d.ts +6 -1
  70. package/dist/governance/GovernanceRoi.js +32 -0
  71. package/dist/governance/GovernanceRoi.js.map +1 -1
  72. package/dist/guardrails/DependencyAuditor.js +38 -0
  73. package/dist/guardrails/DependencyAuditor.js.map +1 -1
  74. package/dist/hooks/HookGeneratorEnhanced.js +218 -218
  75. package/dist/index.d.ts +2 -1
  76. package/dist/index.js +3 -2
  77. package/dist/index.js.map +1 -1
  78. package/dist/knowledge/SQLiteKnowledgeBase.js +28 -28
  79. package/dist/memory/MemoryBrain.js +52 -52
  80. package/dist/output/GovernanceDashboard.js +44 -44
  81. package/dist/output/HTMLArtifactLayer.js +31 -31
  82. package/dist/prompts/VibeTemplateGallery.js +121 -121
  83. package/dist/runtime/AiOsRuntime.d.ts +53 -0
  84. package/dist/runtime/AiOsRuntime.js +142 -0
  85. package/dist/runtime/AiOsRuntime.js.map +1 -0
  86. package/dist/runtime/index.d.ts +1 -0
  87. package/dist/runtime/index.js +1 -0
  88. package/dist/runtime/index.js.map +1 -1
  89. package/dist/skills/SkillDiscovery.js +12 -1
  90. package/dist/skills/SkillDiscovery.js.map +1 -1
  91. package/dist/skills/routing/SkillPlanner.js +128 -40
  92. package/dist/skills/routing/SkillPlanner.js.map +1 -1
  93. package/dist/skills/routing/SkillRoutingTypes.d.ts +17 -0
  94. package/dist/tools/SafeCommandRunner.d.ts +16 -0
  95. package/dist/tools/SafeCommandRunner.js +83 -0
  96. package/dist/tools/SafeCommandRunner.js.map +1 -0
  97. package/dist/workflow/EngineeringStandards.js +62 -62
  98. package/dist/workflow/GovernanceTemplatePacks.d.ts +1 -1
  99. package/dist/workflow/GovernanceTemplatePacks.js +1990 -162
  100. package/dist/workflow/GovernanceTemplatePacks.js.map +1 -1
  101. package/dist/workflow/GovernanceTemplates.d.ts +2 -0
  102. package/dist/workflow/GovernanceTemplates.js +1012 -1001
  103. package/dist/workflow/GovernanceTemplates.js.map +1 -1
  104. package/dist/workflow/ResourceGovernance.js +16 -16
  105. package/dist/workflow/TaskArtifactScaffolder.js +10 -10
  106. package/dist/workflow/UpgradeManager.d.ts +3 -2
  107. package/dist/workflow/UpgradeManager.js +134 -49
  108. package/dist/workflow/UpgradeManager.js.map +1 -1
  109. package/dist/workflow/WorkspaceTopology.js +18 -15
  110. package/dist/workflow/WorkspaceTopology.js.map +1 -1
  111. package/dist/workflow/gates/GateSystem.js +3 -9
  112. package/dist/workflow/gates/GateSystem.js.map +1 -1
  113. package/docs/ACTIVE_SECURITY_VISUAL_GATES.md +87 -87
  114. package/docs/AI_ENGINEERING_OS_POSITIONING.md +462 -0
  115. package/docs/BACKGROUND_HUNTER.md +62 -62
  116. package/docs/CODE_INTELLIGENCE.md +138 -138
  117. package/docs/CONTEXT_BUDGET.md +155 -113
  118. package/docs/DEPENDENCY_AUDIT.md +118 -89
  119. package/docs/EVOLUTION_SHADOW_MODE.md +63 -63
  120. package/docs/EXTERNAL_REFERENCES.md +63 -58
  121. package/docs/GITLAB_FLOW.md +125 -125
  122. package/docs/GOVERNANCE_DASHBOARD.md +85 -85
  123. package/docs/MEMORY_BRAIN.md +104 -104
  124. package/docs/MEMORY_FABRIC.md +136 -134
  125. package/docs/README.md +102 -92
  126. package/docs/RUNTIME_EVIDENCE.md +101 -101
  127. package/docs/SKILL-REPOSITORY.md +57 -57
  128. package/docs/SKILL_RADAR.md +135 -122
  129. package/docs/THIRD_PARTY_SKILLS.md +57 -57
  130. package/docs/WORKFLOW_EVAL.md +151 -151
  131. package/docs/guides/DEVELOPMENT_WORKFLOW.md +80 -0
  132. package/docs/guides/GETTING_STARTED.md +50 -0
  133. package/docs/start/README.md +78 -72
  134. package/docs/start/agent-governance-demo.md +107 -107
  135. package/docs/start/quickstart.md +137 -127
  136. package/docs/start/workflow-upgrade.md +32 -8
  137. package/docs/workflow/README.md +67 -0
  138. package/docs/workflow/node-library.md +52 -0
  139. package/docs/workflow/templates/api-contract.md +29 -0
  140. package/docs/workflow/templates/architecture-review.md +23 -0
  141. package/docs/workflow/templates/db-change-plan.md +20 -0
  142. package/docs/workflow/templates/docs-impact.md +17 -0
  143. package/docs/workflow/templates/e2e-plan.md +20 -0
  144. package/docs/workflow/templates/explore.md +16 -0
  145. package/docs/workflow/templates/github-actions-scale-preflight.yml +32 -0
  146. package/docs/workflow/templates/mini-prd.md +16 -0
  147. package/docs/workflow/templates/plan.md +37 -0
  148. package/docs/workflow/templates/pre-push-scale-preflight.sh +8 -0
  149. package/docs/workflow/templates/product-smoke.md +61 -0
  150. package/docs/workflow/templates/reality-check.md +28 -0
  151. package/docs/workflow/templates/resource-cleanup.md +17 -0
  152. package/docs/workflow/templates/resource-impact.md +25 -0
  153. package/docs/workflow/templates/review.md +12 -0
  154. package/docs/workflow/templates/runtime.md +23 -0
  155. package/docs/workflow/templates/security-review.md +26 -0
  156. package/docs/workflow/templates/skill-evidence.md +33 -0
  157. package/docs/workflow/templates/skill-plan.md +39 -0
  158. package/docs/workflow/templates/spec.md +17 -0
  159. package/docs/workflow/templates/standards-impact.md +28 -0
  160. package/docs/workflow/templates/summary.md +16 -0
  161. package/docs/workflow/templates/tasks.md +8 -0
  162. package/docs/workflow/templates/ui-spec.md +29 -0
  163. package/docs/workflow/templates/verification.md +20 -0
  164. package/docs/workflow/templates/visual-review.md +20 -0
  165. package/examples/demo-projects/agent-governance-demo/CONTEXT.md +14 -14
  166. package/examples/demo-projects/agent-governance-demo/README.md +48 -48
  167. package/examples/demo-projects/agent-governance-demo/docs/CONTEXT-MAP.md +14 -14
  168. package/examples/demo-projects/agent-governance-demo/package.json +22 -21
  169. package/examples/demo-projects/agent-governance-demo/src/oauth-state.ts +39 -39
  170. package/examples/demo-projects/agent-governance-demo/tests/oauth-state.test.ts +52 -52
  171. package/package.json +95 -78
@@ -1,101 +1,101 @@
1
- # Runtime Evidence
2
-
3
- Runtime Evidence 是 SCALE 用来记录 Agent 实际做过什么的运行时证据层。它的目标很直接:没有真实命令、工具、浏览器、skill 或人工验证证据时,Agent 不能声称任务已经完成。
4
-
5
- 它和现有证据层的关系:
6
-
7
- - Gate evidence:回答 build、lint、test、security、review 等门禁是否通过。
8
- - Tool evidence:回答必需的 skill、MCP、浏览器、桌面自动化或 CLI 工具是否执行过。
9
- - Runtime evidence:回答当前会话是否具备可信的最终交付证据。
10
-
11
- ## 存储位置
12
-
13
- Runtime 数据写入 SCALE 已忽略的本地运行时目录:
14
-
15
- ```text
16
- .scale/
17
- ├── events/
18
- │ ├── current-session.json
19
- │ └── sessions/<session-id>.jsonl
20
- └── evidence/
21
- └── runtime/<evidence-id>.json
22
- ```
23
-
24
- 这些文件默认是本地运行时产物,不应该提交到 Git。需要长期保留时,应把摘要沉淀到任务 summary、ADR、README 或模块文档中,而不是直接提交原始日志。
25
-
26
- ## 基本流程
27
-
28
- 启动会话:
29
-
30
- ```bash
31
- scale runtime start \
32
- --session-id 2026-05-18-runtime-evidence \
33
- --task-id 2026-05-18-runtime-evidence \
34
- --level M \
35
- --agent codex
36
- ```
37
-
38
- 在真实命令、门禁、浏览器验证、skill 执行、MCP 调用或人工检查之后记录证据:
39
-
40
- ```bash
41
- scale runtime record \
42
- --title "build" \
43
- --kind command \
44
- --status passed \
45
- --command "npm run build" \
46
- --exit-code 0 \
47
- --summary "TypeScript build passed"
48
- ```
49
-
50
- 检查是否允许最终交付:
51
-
52
- ```bash
53
- scale runtime final-check \
54
- --task-id 2026-05-18-runtime-evidence \
55
- --session-id 2026-05-18-runtime-evidence \
56
- --level M
57
- ```
58
-
59
- 检查运行时健康状态:
60
-
61
- ```bash
62
- scale runtime doctor --level M
63
- scale doctor
64
- ```
65
-
66
- ## 完成规则
67
-
68
- M、L、CRITICAL 任务在最终交付前必须满足:
69
-
70
- - 当前 task/session 范围内至少有一条 `passed` runtime evidence。
71
- - 当前 task/session 范围内不能存在 `failed` runtime evidence。
72
-
73
- S 级任务可以保持轻量,但一旦存在失败证据,仍然不能声称完成。
74
-
75
- ## 脱敏规则
76
-
77
- Runtime evidence 复用 tool evidence 的脱敏模型。写入 JSON 前会处理命令、摘要、artifact 路径和 metadata 中的敏感字段:
78
-
79
- - password
80
- - token
81
- - secret
82
- - authorization
83
- - cookie
84
- - credential
85
- - api key
86
- - private key
87
-
88
- 这样可以保留有用证据,同时避免把 token、cookie、密钥等内容写进运行时文件。
89
-
90
- ## 推荐使用场景
91
-
92
- 适合记录 runtime evidence 的场景:
93
-
94
- - 最终交付检查。
95
- - 长会话或多阶段任务。
96
- - 跨 Agent 或外部 CLI review。
97
- - 浏览器、桌面自动化、MCP、skill 验证。
98
- - 发版前 preflight。
99
- - 需要进入后续学习闭环的失败、修复和重试记录。
100
-
101
- 不要用 runtime evidence 替代长期维护文档。Runtime evidence 是“操作证明”,PRD、ADR、架构文档、README、模块文档才是长期项目契约。
1
+ # Runtime Evidence
2
+
3
+ Runtime Evidence 是 SCALE 用来记录 Agent 实际做过什么的运行时证据层。它的目标很直接:没有真实命令、工具、浏览器、skill 或人工验证证据时,Agent 不能声称任务已经完成。
4
+
5
+ 它和现有证据层的关系:
6
+
7
+ - Gate evidence:回答 build、lint、test、security、review 等门禁是否通过。
8
+ - Tool evidence:回答必需的 skill、MCP、浏览器、桌面自动化或 CLI 工具是否执行过。
9
+ - Runtime evidence:回答当前会话是否具备可信的最终交付证据。
10
+
11
+ ## 存储位置
12
+
13
+ Runtime 数据写入 SCALE 已忽略的本地运行时目录:
14
+
15
+ ```text
16
+ .scale/
17
+ ├── events/
18
+ │ ├── current-session.json
19
+ │ └── sessions/<session-id>.jsonl
20
+ └── evidence/
21
+ └── runtime/<evidence-id>.json
22
+ ```
23
+
24
+ 这些文件默认是本地运行时产物,不应该提交到 Git。需要长期保留时,应把摘要沉淀到任务 summary、ADR、README 或模块文档中,而不是直接提交原始日志。
25
+
26
+ ## 基本流程
27
+
28
+ 启动会话:
29
+
30
+ ```bash
31
+ scale runtime start \
32
+ --session-id 2026-05-18-runtime-evidence \
33
+ --task-id 2026-05-18-runtime-evidence \
34
+ --level M \
35
+ --agent codex
36
+ ```
37
+
38
+ 在真实命令、门禁、浏览器验证、skill 执行、MCP 调用或人工检查之后记录证据:
39
+
40
+ ```bash
41
+ scale runtime record \
42
+ --title "build" \
43
+ --kind command \
44
+ --status passed \
45
+ --command "npm run build" \
46
+ --exit-code 0 \
47
+ --summary "TypeScript build passed"
48
+ ```
49
+
50
+ 检查是否允许最终交付:
51
+
52
+ ```bash
53
+ scale runtime final-check \
54
+ --task-id 2026-05-18-runtime-evidence \
55
+ --session-id 2026-05-18-runtime-evidence \
56
+ --level M
57
+ ```
58
+
59
+ 检查运行时健康状态:
60
+
61
+ ```bash
62
+ scale runtime doctor --level M
63
+ scale doctor
64
+ ```
65
+
66
+ ## 完成规则
67
+
68
+ M、L、CRITICAL 任务在最终交付前必须满足:
69
+
70
+ - 当前 task/session 范围内至少有一条 `passed` runtime evidence。
71
+ - 当前 task/session 范围内不能存在 `failed` runtime evidence。
72
+
73
+ S 级任务可以保持轻量,但一旦存在失败证据,仍然不能声称完成。
74
+
75
+ ## 脱敏规则
76
+
77
+ Runtime evidence 复用 tool evidence 的脱敏模型。写入 JSON 前会处理命令、摘要、artifact 路径和 metadata 中的敏感字段:
78
+
79
+ - password
80
+ - token
81
+ - secret
82
+ - authorization
83
+ - cookie
84
+ - credential
85
+ - api key
86
+ - private key
87
+
88
+ 这样可以保留有用证据,同时避免把 token、cookie、密钥等内容写进运行时文件。
89
+
90
+ ## 推荐使用场景
91
+
92
+ 适合记录 runtime evidence 的场景:
93
+
94
+ - 最终交付检查。
95
+ - 长会话或多阶段任务。
96
+ - 跨 Agent 或外部 CLI review。
97
+ - 浏览器、桌面自动化、MCP、skill 验证。
98
+ - 发版前 preflight。
99
+ - 需要进入后续学习闭环的失败、修复和重试记录。
100
+
101
+ 不要用 runtime evidence 替代长期维护文档。Runtime evidence 是“操作证明”,PRD、ADR、架构文档、README、模块文档才是长期项目契约。
@@ -1,57 +1,57 @@
1
- # SCALE Skill 仓库
2
-
3
- 这个仓库视图用于让 Agent 按任务渐进式发现、激活和编排 skills/MCP/CLI,而不是一次性把所有能力塞进上下文。
4
-
5
- ## 渐进式披露
6
-
7
- 1. 启动时只读取 Skill 元数据和一句话描述。
8
- 2. 任务命中时才读取完整 SKILL.md。
9
- 3. scripts、references、assets 只在明确需要时懒加载。
10
-
11
- ## 安全安装
12
-
13
- - 安装前必须执行安全扫描,阻断 `curl | bash`、`Invoke-Expression`、危险删除和非 HTTPS 来源。
14
- - npm/npx 来源必须补充 `npm audit signatures`、来源仓库、许可证和版本/commit 固定检查。
15
- - 任何第三方 Skill 都先进入隔离审查,再写入项目或全局 skills 目录。
16
-
17
- ## 供应链防护清单
18
-
19
- - review-skill-frontmatter
20
- - inspect-scripts-directory
21
- - verify-license-and-source
22
- - verify-attribution-and-notice
23
- - pin-source-revision
24
- - npm-audit-signatures
25
-
26
- ## Skill 目录
27
-
28
- | ID | 类别 | 信任 | 主要用途 | 组合建议 |
29
- | --- | --- | --- | --- | --- |
30
- | `planning-with-files` | planning | community | Use persistent planning files, progress logs, findings, active-plan selection, and plan attestation for long-running agent work. | memory-brain, web-access, code-reviewer |
31
- | `agentmemory` | memory | community | Use as an optional external memory provider via REST or MCP when teams want cross-agent persistent memory beyond SCALE local Memory Brain. | memory-brain, mcp-chrome-devtools, codex-cli |
32
- | `gbrain` | memory | community | Use as an optional graph-backed memory provider for long-running project knowledge, entity relationships, and background memory maintenance. | memory-brain, agentmemory, codegraph |
33
- | `frontend-design` | ui | official | UI 视觉方向、布局、组件状态和前端实现约束。 | awesome-design-md, ui-ux-pro-max, webapp-testing |
34
- | `awesome-design-md` | ui | ecosystem | 建立产品级设计规范和视觉语言。 | ui-ux-pro-max, frontend-design |
35
- | `ui-ux-pro-max` | ui | ecosystem | 补齐体验策略、交互状态和 UI 验收维度。 | awesome-design-md, webapp-testing |
36
- | `webapp-testing` | testing | official | 验证页面点击、表单、控制台、截图和端到端行为。 | agent-browser, mcp-chrome-devtools |
37
- | `web-access` | browser | ecosystem | 获取一手资料、动态页面内容、网页证据和来源引用。 | agent-browser, mcp-chrome-devtools |
38
- | `agent-browser` | browser | ecosystem | 与 Web 页面真实交互,补齐手工验收证据。 | web-access, webapp-testing, mcp-chrome-devtools |
39
- | `mcp-chrome-devtools` | browser | ecosystem | 调试控制台错误、网络请求、页面状态和性能问题。 | agent-browser, webapp-testing |
40
- | `cua` | desktop | ecosystem | 操作桌面应用并收集端侧截图、状态和副作用边界证据。 | web-access, agent-browser |
41
- | `code-reviewer` | review | official | 合并前分级审查缺陷、安全、可维护性和测试风险。 | security-and-hardening, update-docs |
42
- | `fix` | review | official | 提交前清理格式和 lint 问题。 | code-reviewer |
43
- | `pr-creator` | review | official | 生成标准 PR 描述和合并前说明。 | code-reviewer, update-docs |
44
- | `update-docs` | docs | official | 发现并更新受代码变更影响的长期文档。 | documentation-and-adrs |
45
- | `find-skills` | discovery | ecosystem | 按任务意图搜索合适 Skill,再进入安全扫描。 | web-access |
46
- | `codex-cli` | agent-cli | official | 外部 CLI 审查和命令级证据。 | gemini-cli, opencode-cli |
47
- | `gemini-cli` | agent-cli | official | 外部 CLI 审查和命令级证据。 | codex-cli, opencode-cli |
48
- | `opencode-cli` | agent-cli | ecosystem | 外部 CLI 审查和命令级证据。 | codex-cli, gemini-cli |
49
- | `agency-agents-zh` | role-library | community | 提供 CEO、CTO、工程、设计、产品等角色预设参考。 | skill-safety-scan |
50
-
51
- ## Third-Party Attribution
52
-
53
- | ID | License | Usage | Notice |
54
- | --- | --- | --- | --- |
55
- | `planning-with-files` | MIT | adapted-concept | Inspired by and compatible with OthmanAdi/planning-with-files. SCALE should not copy upstream files unless the MIT license text and attribution are included. |
56
- | `agentmemory` | Apache-2.0 | external-reference | Optional external integration only. Do not vendor agentmemory code into SCALE without preserving Apache-2.0 license text, modification notices, and any upstream NOTICE obligations. |
57
- | `gbrain` | MIT | external-reference | Optional external provider only. Do not vendor GBrain code into SCALE without preserving MIT license text, source revision, and modification notices. |
1
+ # SCALE Skill 仓库
2
+
3
+ 这个仓库视图用于让 Agent 按任务渐进式发现、激活和编排 skills/MCP/CLI,而不是一次性把所有能力塞进上下文。
4
+
5
+ ## 渐进式披露
6
+
7
+ 1. 启动时只读取 Skill 元数据和一句话描述。
8
+ 2. 任务命中时才读取完整 SKILL.md。
9
+ 3. scripts、references、assets 只在明确需要时懒加载。
10
+
11
+ ## 安全安装
12
+
13
+ - 安装前必须执行安全扫描,阻断 `curl | bash`、`Invoke-Expression`、危险删除和非 HTTPS 来源。
14
+ - npm/npx 来源必须补充 `npm audit signatures`、来源仓库、许可证和版本/commit 固定检查。
15
+ - 任何第三方 Skill 都先进入隔离审查,再写入项目或全局 skills 目录。
16
+
17
+ ## 供应链防护清单
18
+
19
+ - review-skill-frontmatter
20
+ - inspect-scripts-directory
21
+ - verify-license-and-source
22
+ - verify-attribution-and-notice
23
+ - pin-source-revision
24
+ - npm-audit-signatures
25
+
26
+ ## Skill 目录
27
+
28
+ | ID | 类别 | 信任 | 主要用途 | 组合建议 |
29
+ | --- | --- | --- | --- | --- |
30
+ | `planning-with-files` | planning | community | Use persistent planning files, progress logs, findings, active-plan selection, and plan attestation for long-running agent work. | memory-brain, web-access, code-reviewer |
31
+ | `agentmemory` | memory | community | Use as an optional external memory provider via REST or MCP when teams want cross-agent persistent memory beyond SCALE local Memory Brain. | memory-brain, mcp-chrome-devtools, codex-cli |
32
+ | `gbrain` | memory | community | Use as an optional graph-backed memory provider for long-running project knowledge, entity relationships, and background memory maintenance. | memory-brain, agentmemory, codegraph |
33
+ | `frontend-design` | ui | official | UI 视觉方向、布局、组件状态和前端实现约束。 | awesome-design-md, ui-ux-pro-max, webapp-testing |
34
+ | `awesome-design-md` | ui | ecosystem | 建立产品级设计规范和视觉语言。 | ui-ux-pro-max, frontend-design |
35
+ | `ui-ux-pro-max` | ui | ecosystem | 补齐体验策略、交互状态和 UI 验收维度。 | awesome-design-md, webapp-testing |
36
+ | `webapp-testing` | testing | official | 验证页面点击、表单、控制台、截图和端到端行为。 | agent-browser, mcp-chrome-devtools |
37
+ | `web-access` | browser | ecosystem | 获取一手资料、动态页面内容、网页证据和来源引用。 | agent-browser, mcp-chrome-devtools |
38
+ | `agent-browser` | browser | ecosystem | 与 Web 页面真实交互,补齐手工验收证据。 | web-access, webapp-testing, mcp-chrome-devtools |
39
+ | `mcp-chrome-devtools` | browser | ecosystem | 调试控制台错误、网络请求、页面状态和性能问题。 | agent-browser, webapp-testing |
40
+ | `cua` | desktop | ecosystem | 操作桌面应用并收集端侧截图、状态和副作用边界证据。 | web-access, agent-browser |
41
+ | `code-reviewer` | review | official | 合并前分级审查缺陷、安全、可维护性和测试风险。 | security-and-hardening, update-docs |
42
+ | `fix` | review | official | 提交前清理格式和 lint 问题。 | code-reviewer |
43
+ | `pr-creator` | review | official | 生成标准 PR 描述和合并前说明。 | code-reviewer, update-docs |
44
+ | `update-docs` | docs | official | 发现并更新受代码变更影响的长期文档。 | documentation-and-adrs |
45
+ | `find-skills` | discovery | ecosystem | 按任务意图搜索合适 Skill,再进入安全扫描。 | web-access |
46
+ | `codex-cli` | agent-cli | official | 外部 CLI 审查和命令级证据。 | gemini-cli, opencode-cli |
47
+ | `gemini-cli` | agent-cli | official | 外部 CLI 审查和命令级证据。 | codex-cli, opencode-cli |
48
+ | `opencode-cli` | agent-cli | ecosystem | 外部 CLI 审查和命令级证据。 | codex-cli, gemini-cli |
49
+ | `agency-agents-zh` | role-library | community | 提供 CEO、CTO、工程、设计、产品等角色预设参考。 | skill-safety-scan |
50
+
51
+ ## Third-Party Attribution
52
+
53
+ | ID | License | Usage | Notice |
54
+ | --- | --- | --- | --- |
55
+ | `planning-with-files` | MIT | adapted-concept | Inspired by and compatible with OthmanAdi/planning-with-files. SCALE should not copy upstream files unless the MIT license text and attribution are included. |
56
+ | `agentmemory` | Apache-2.0 | external-reference | Optional external integration only. Do not vendor agentmemory code into SCALE without preserving Apache-2.0 license text, modification notices, and any upstream NOTICE obligations. |
57
+ | `gbrain` | MIT | external-reference | Optional external provider only. Do not vendor GBrain code into SCALE without preserving MIT license text, source revision, and modification notices. |
@@ -1,122 +1,135 @@
1
- # Skill Radar
2
-
3
- Skill Radar is the active capability selection layer for SCALE. It does not auto-install or blindly run skills. It scores relevant skills, MCP servers, browser tools, desktop automation, and external CLIs against the current task, then returns:
4
-
5
- - why the capability matches
6
- - confidence score
7
- - safety level
8
- - required evidence
9
- - fallback path
10
- - supply-chain checks before installation or promotion
11
-
12
- The goal is to make agents actively use useful tools without turning the project into an unsafe prompt or tool bundle.
13
-
14
- ## Commands
15
-
16
- ```bash
17
- scale skill radar --task "Design upload UI and run browser E2E checks" --files src/pages/upload.tsx
18
- scale skill radar --task "Automate WPS desktop workflow with CUA" --json
19
- scale skill radar --task "Review release PR" --phase review --level L --output docs/worklog/tasks/release/skill-radar.md
20
- scale skill doctor --supply-chain
21
- scale skill doctor --supply-chain --json
22
- ```
23
-
24
- ## Safety Levels
25
-
26
- | Level | Meaning | Default action |
27
- | --- | --- | --- |
28
- | `trusted` | Official or low-risk capability with policy enabled | May be recommended when confidence is high |
29
- | `review-required` | Third-party or ecosystem capability | Require source, license, scripts, and revision review |
30
- | `restricted` | Browser, desktop, or external execution boundary | Require explicit evidence and side-effect boundaries |
31
- | `blocked` | Disabled by policy or failed safety review | Do not run; use fallback |
32
-
33
- ## Confidence
34
-
35
- Skill Radar combines:
36
-
37
- - task keywords and workflow phase
38
- - changed file patterns
39
- - local skill installation
40
- - tool availability
41
- - trust level
42
- - policy status
43
- - frontend/package evidence
44
- - safety penalties
45
-
46
- The score is not a promise that the tool will work. It is a routing signal. Any recommendation still needs real evidence before the agent can claim success.
47
-
48
- ## Default Domains
49
-
50
- | Domain | Typical triggers | Recommended capability types |
51
- | --- | --- | --- |
52
- | `ui` | UI, UX, frontend, component, visual, layout | design skills, visual review, screenshot evidence |
53
- | `browserAutomation` | browser, E2E, Playwright, Chrome, DevTools | web access, browser automation, DevTools evidence |
54
- | `desktopAutomation` | desktop, GUI, WPS, WeChat, CUA | disabled by default; manual operator fallback |
55
- | `externalCli` | Codex, Gemini, OpenCode, external agent CLI | disabled by default; dry-run and output evidence |
56
- | `review` | PR, merge, release, code review | reviewer skills, severity findings |
57
- | `docs` | docs, README, ADR, governance asset | doc impact and source-of-truth evidence |
58
- | `planning` | plans, task_plan, findings, progress, long-running work | file-backed planning, progress logs, plan attestation |
59
- | `memory` | memory, recall, knowledge, persistent memory, agentmemory, gbrain | provider-routed memory through agentmemory, gbrain, or scale-local fallback |
60
- | `discovery` | skill, MCP, tool, capability discovery | find-skills plus safety review |
61
-
62
- ## Evidence Contract
63
-
64
- Each recommendation carries required evidence. Examples:
65
-
66
- - UI work: `ui-spec`, `design-rationale`, `screenshot`, `visual-review`
67
- - Browser work: `browser-evidence`, `console-summary`, `network-summary`, `scenario-result`
68
- - Desktop work: `operator-boundary`, `desktop-screenshot`, `affected-app`
69
- - External CLI work: `cli-version-check`, `command`, `exit-code`, `output-summary`
70
- - Review work: `review-report`, `finding-list`, `severity`
71
- - Planning work: `task-plan`, `findings-log`, `progress-log`, `plan-attestation`
72
- - Memory work: `memory-provider-health`, `privacy-boundary`, `data-retention-policy`, `query-result`
73
-
74
- If evidence is missing, the final delivery should list the capability as unverified rather than claiming it was used successfully.
75
-
76
- ## Supply-Chain Doctor
77
-
78
- `scale skill doctor --supply-chain` reviews known skill sources and install commands for:
79
-
80
- - HTTPS source requirement
81
- - `curl | bash`, `wget | sh`, `Invoke-Expression`, and `iex` blocking
82
- - destructive install patterns
83
- - npm/npx lifecycle script review
84
- - required source, license, and revision checks
85
- - third-party attribution and NOTICE checks
86
-
87
- This is intentionally conservative. Third-party skills should start in review-required mode and be promoted only after inspection.
88
-
89
- External skill references and acknowledgements are tracked in [Third-Party Skills and External References](THIRD_PARTY_SKILLS.md) and the full [External Reference Inventory](EXTERNAL_REFERENCES.md). SCALE should not vendor community skill code unless the license text, source revision, copyright notice, and modification notes are preserved.
90
-
91
- ## Policy Integration
92
-
93
- Skill Radar reads `.scale/tools.json` through the Tool Policy layer. Defaults:
94
-
95
- - UI and browser capabilities are enabled but evidence-required.
96
- - Desktop CUA is disabled by default.
97
- - External agent CLIs are disabled by default.
98
- - Browser tools require captured evidence and should stay in approved domains.
99
-
100
- Use Tool Policy to enable a restricted capability deliberately rather than relying on an agent's assumption.
101
-
102
- ## Fallback Rule
103
-
104
- Every recommendation must include a fallback. This prevents tool theater:
105
-
106
- ```text
107
- If the capability is missing, unsafe, low-confidence, or policy-blocked,
108
- the agent must use the fallback and record why the capability was not used.
109
- ```
110
-
111
- ## Artifact Lifecycle
112
-
113
- Skill Radar reports can be written into task artifacts:
114
-
115
- ```bash
116
- scale skill radar \
117
- --task "Refactor upload page and verify browser flow" \
118
- --files src/pages/upload.tsx \
119
- --output docs/worklog/tasks/2026-05-19-upload-refactor/skill-radar.md
120
- ```
121
-
122
- Keep the report when it is evidence for an M/L/CRITICAL task. Do not commit transient local detection output unless it is part of the reviewed task artifact set.
1
+ # Skill Radar
2
+
3
+ Skill Radar is the active capability selection layer for SCALE. It does not auto-install or blindly run skills. It scores relevant skills, MCP servers, browser tools, desktop automation, and external CLIs against the current task, then returns:
4
+
5
+ - why the capability matches
6
+ - confidence score
7
+ - safety level
8
+ - required evidence
9
+ - fallback path
10
+ - supply-chain checks before installation or promotion
11
+
12
+ The goal is to make agents actively use useful tools without turning the project into an unsafe prompt or tool bundle.
13
+
14
+ ## Commands
15
+
16
+ ```bash
17
+ scale skill radar --task "Design upload UI and run browser E2E checks" --files src/pages/upload.tsx
18
+ scale skill radar --task "Automate WPS desktop workflow with CUA" --json
19
+ scale skill radar --task "Review release PR" --phase review --level L --output docs/worklog/tasks/release/skill-radar.md
20
+ scale skill doctor --supply-chain
21
+ scale skill doctor --supply-chain --json
22
+ scale ai-os plan --task "Design upload UI and run browser E2E checks" --files src/pages/upload.tsx --json
23
+ ```
24
+
25
+ ## Safety Levels
26
+
27
+ | Level | Meaning | Default action |
28
+ | --- | --- | --- |
29
+ | `trusted` | Official or low-risk capability with policy enabled | May be recommended when confidence is high |
30
+ | `review-required` | Third-party or ecosystem capability | Require source, license, scripts, and revision review |
31
+ | `restricted` | Browser, desktop, or external execution boundary | Require explicit evidence and side-effect boundaries |
32
+ | `blocked` | Disabled by policy or failed safety review | Do not run; use fallback |
33
+
34
+ ## Confidence
35
+
36
+ Skill Radar combines:
37
+
38
+ - task keywords and workflow phase
39
+ - changed file patterns
40
+ - local skill installation
41
+ - tool availability
42
+ - trust level
43
+ - policy status
44
+ - frontend/package evidence
45
+ - safety penalties
46
+
47
+ The score is not a promise that the tool will work. It is a routing signal. Any recommendation still needs real evidence before the agent can claim success.
48
+
49
+ ## Default Domains
50
+
51
+ | Domain | Typical triggers | Recommended capability types |
52
+ | --- | --- | --- |
53
+ | `ui` | UI, UX, frontend, component, visual, layout | design skills, visual review, screenshot evidence |
54
+ | `browserAutomation` | browser, E2E, Playwright, Chrome, DevTools | web access, browser automation, DevTools evidence |
55
+ | `desktopAutomation` | desktop, GUI, WPS, WeChat, CUA | disabled by default; manual operator fallback |
56
+ | `externalCli` | Codex, Gemini, OpenCode, external agent CLI | disabled by default; dry-run and output evidence |
57
+ | `review` | PR, merge, release, code review | reviewer skills, severity findings |
58
+ | `docs` | docs, README, ADR, governance asset | doc impact and source-of-truth evidence |
59
+ | `planning` | plans, task_plan, findings, progress, long-running work | file-backed planning, progress logs, plan attestation |
60
+ | `memory` | memory, recall, knowledge, persistent memory, agentmemory, gbrain | provider-routed memory through agentmemory, gbrain, or scale-local fallback |
61
+ | `discovery` | skill, MCP, tool, capability discovery | find-skills plus safety review |
62
+
63
+ ## Evidence Contract
64
+
65
+ Each recommendation carries required evidence. Examples:
66
+
67
+ - UI work: `ui-spec`, `design-rationale`, `screenshot`, `visual-review`
68
+ - Browser work: `browser-evidence`, `console-summary`, `network-summary`, `scenario-result`
69
+ - Desktop work: `operator-boundary`, `desktop-screenshot`, `affected-app`
70
+ - External CLI work: `cli-version-check`, `command`, `exit-code`, `output-summary`
71
+ - Review work: `review-report`, `finding-list`, `severity`
72
+ - Planning work: `task-plan`, `findings-log`, `progress-log`, `plan-attestation`
73
+ - Memory work: `memory-provider-health`, `privacy-boundary`, `data-retention-policy`, `query-result`
74
+
75
+ If evidence is missing, the final delivery should list the capability as unverified rather than claiming it was used successfully.
76
+
77
+ ## Skill Execution Plan
78
+
79
+ In v0.27.0, `createSkillPlan` and `scale ai-os plan` return an `executionPlan`:
80
+
81
+ - `strategy`: currently `intent-evidence-graph-v1`
82
+ - `steps`: ordered skill, artifact, and verification actions
83
+ - `reason`: why the step was selected from task intents
84
+ - `evidenceRequired`: what proof must be recorded
85
+ - `fallback`: what to do when the skill, MCP, CLI, or verification path is unavailable
86
+
87
+ This turns skill routing from a recommendation list into an auditable execution graph. Required steps still need concrete evidence or an explicit skipped/fallback record; recommended steps may be skipped with a reason.
88
+
89
+ ## Supply-Chain Doctor
90
+
91
+ `scale skill doctor --supply-chain` reviews known skill sources and install commands for:
92
+
93
+ - HTTPS source requirement
94
+ - `curl | bash`, `wget | sh`, `Invoke-Expression`, and `iex` blocking
95
+ - destructive install patterns
96
+ - npm/npx lifecycle script review
97
+ - required source, license, and revision checks
98
+ - third-party attribution and NOTICE checks
99
+
100
+ This is intentionally conservative. Third-party skills should start in review-required mode and be promoted only after inspection.
101
+
102
+ External skill references and acknowledgements are tracked in [Third-Party Skills and External References](THIRD_PARTY_SKILLS.md) and the full [External Reference Inventory](EXTERNAL_REFERENCES.md). SCALE should not vendor community skill code unless the license text, source revision, copyright notice, and modification notes are preserved.
103
+
104
+ ## Policy Integration
105
+
106
+ Skill Radar reads `.scale/tools.json` through the Tool Policy layer. Defaults:
107
+
108
+ - UI and browser capabilities are enabled but evidence-required.
109
+ - Desktop CUA is disabled by default.
110
+ - External agent CLIs are disabled by default.
111
+ - Browser tools require captured evidence and should stay in approved domains.
112
+
113
+ Use Tool Policy to enable a restricted capability deliberately rather than relying on an agent's assumption.
114
+
115
+ ## Fallback Rule
116
+
117
+ Every recommendation must include a fallback. This prevents tool theater:
118
+
119
+ ```text
120
+ If the capability is missing, unsafe, low-confidence, or policy-blocked,
121
+ the agent must use the fallback and record why the capability was not used.
122
+ ```
123
+
124
+ ## Artifact Lifecycle
125
+
126
+ Skill Radar reports can be written into task artifacts:
127
+
128
+ ```bash
129
+ scale skill radar \
130
+ --task "Refactor upload page and verify browser flow" \
131
+ --files src/pages/upload.tsx \
132
+ --output docs/worklog/tasks/2026-05-19-upload-refactor/skill-radar.md
133
+ ```
134
+
135
+ Keep the report when it is evidence for an M/L/CRITICAL task. Do not commit transient local detection output unless it is part of the reviewed task artifact set.