@hongmaple0820/scale-engine 0.23.0 → 0.25.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.
- package/README.en.md +45 -35
- package/README.md +61 -55
- package/dist/api/cli.js +285 -2
- package/dist/api/cli.js.map +1 -1
- package/dist/dashboard/MetricsAggregator.d.ts +38 -0
- package/dist/dashboard/MetricsAggregator.js +99 -0
- package/dist/dashboard/MetricsAggregator.js.map +1 -0
- package/dist/dashboard/index.d.ts +2 -0
- package/dist/dashboard/index.js +1 -0
- package/dist/dashboard/index.js.map +1 -1
- package/dist/dashboard/server.js +1 -1
- package/dist/dashboard/server.js.map +1 -1
- package/dist/evolution/AutoDefectCreator.d.ts +11 -2
- package/dist/evolution/AutoDefectCreator.js +46 -2
- package/dist/evolution/AutoDefectCreator.js.map +1 -1
- package/dist/evolution/EvolutionEngine.d.ts +3 -0
- package/dist/evolution/EvolutionEngine.js +18 -2
- package/dist/evolution/EvolutionEngine.js.map +1 -1
- package/dist/evolution/RuleMaturity.d.ts +39 -0
- package/dist/evolution/RuleMaturity.js +70 -0
- package/dist/evolution/RuleMaturity.js.map +1 -0
- package/dist/guardrails/ActiveRedTeam.d.ts +46 -0
- package/dist/guardrails/ActiveRedTeam.js +203 -0
- package/dist/guardrails/ActiveRedTeam.js.map +1 -0
- package/dist/guardrails/DependencyAuditor.d.ts +68 -0
- package/dist/guardrails/DependencyAuditor.js +331 -0
- package/dist/guardrails/DependencyAuditor.js.map +1 -0
- package/dist/hooks/HookGeneratorEnhanced.js +18 -18
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/memory/MemoryBrain.d.ts +1 -0
- package/dist/memory/MemoryBrain.js +3 -0
- package/dist/memory/MemoryBrain.js.map +1 -1
- package/dist/memory/MemoryFabric.d.ts +13 -1
- package/dist/memory/MemoryFabric.js +35 -0
- package/dist/memory/MemoryFabric.js.map +1 -1
- package/dist/memory/MemoryProviders.d.ts +111 -0
- package/dist/memory/MemoryProviders.js +385 -0
- package/dist/memory/MemoryProviders.js.map +1 -0
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.js +1 -0
- package/dist/memory/index.js.map +1 -1
- package/dist/output/GovernanceDashboard.d.ts +2 -0
- package/dist/output/GovernanceDashboard.js +31 -0
- package/dist/output/GovernanceDashboard.js.map +1 -1
- package/dist/routing/PromptCachePolicy.d.ts +37 -0
- package/dist/routing/PromptCachePolicy.js +97 -0
- package/dist/routing/PromptCachePolicy.js.map +1 -0
- package/dist/runtime/ModelUsageLedger.d.ts +50 -0
- package/dist/runtime/ModelUsageLedger.js +92 -0
- package/dist/runtime/ModelUsageLedger.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/skills/SkillRadar.js +20 -0
- package/dist/skills/SkillRadar.js.map +1 -1
- package/dist/skills/SkillRepository.d.ts +9 -1
- package/dist/skills/SkillRepository.js +70 -0
- package/dist/skills/SkillRepository.js.map +1 -1
- package/dist/workflow/autonomous/BackgroundHunter.d.ts +74 -0
- package/dist/workflow/autonomous/BackgroundHunter.js +220 -0
- package/dist/workflow/autonomous/BackgroundHunter.js.map +1 -0
- package/dist/workflow/autonomous/index.d.ts +1 -0
- package/dist/workflow/autonomous/index.js +1 -0
- package/dist/workflow/autonomous/index.js.map +1 -1
- package/dist/workflow/gates/GateSystem.d.ts +10 -0
- package/dist/workflow/gates/GateSystem.js +62 -0
- package/dist/workflow/gates/GateSystem.js.map +1 -1
- package/dist/workflow/gates/VisualGate.d.ts +41 -0
- package/dist/workflow/gates/VisualGate.js +174 -0
- package/dist/workflow/gates/VisualGate.js.map +1 -0
- package/dist/workflow/index.d.ts +1 -0
- package/dist/workflow/index.js +1 -0
- package/dist/workflow/index.js.map +1 -1
- package/docs/ACTIVE_SECURITY_VISUAL_GATES.md +87 -0
- package/docs/BACKGROUND_HUNTER.md +62 -0
- package/docs/CONTEXT_BUDGET.md +26 -0
- package/docs/DEPENDENCY_AUDIT.md +89 -0
- package/docs/EVOLUTION_SHADOW_MODE.md +63 -0
- package/docs/EXTERNAL_REFERENCES.md +58 -0
- package/docs/GOVERNANCE_DASHBOARD.md +16 -0
- package/docs/MEMORY_FABRIC.md +27 -0
- package/docs/README.md +12 -0
- package/docs/SKILL-REPOSITORY.md +57 -0
- package/docs/SKILL_RADAR.md +7 -0
- package/docs/THIRD_PARTY_SKILLS.md +57 -0
- package/package.json +16 -9
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Dependency Audit
|
|
2
|
+
|
|
3
|
+
Dependency Audit is the G7 dependency sub-gate for SCALE Engine.
|
|
4
|
+
It adds supply-chain checks without introducing a separate gate number such as `G6.8`.
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
The auditor is intentionally bounded:
|
|
9
|
+
|
|
10
|
+
- reads `package-lock.json`
|
|
11
|
+
- audits direct dependencies by default
|
|
12
|
+
- supports `--changed-packages` for lockfile-diff workflows
|
|
13
|
+
- scans only selected package roots under `node_modules`
|
|
14
|
+
- caps package count and files per package
|
|
15
|
+
- does not contact the registry by default
|
|
16
|
+
- does not run install scripts
|
|
17
|
+
|
|
18
|
+
This keeps local verification usable while still catching high-risk dependency behavior.
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
scale dependency audit
|
|
24
|
+
scale dependency audit --json
|
|
25
|
+
scale dependency audit --mode strict
|
|
26
|
+
scale dependency audit --changed-packages left-pad,@scope/tool --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The command exits non-zero when the active mode has blocking findings.
|
|
30
|
+
|
|
31
|
+
## G7 Integration
|
|
32
|
+
|
|
33
|
+
`SecurityGate` now emits two first-class evidence sources:
|
|
34
|
+
|
|
35
|
+
- `built-in-security-scan`: source code security scan
|
|
36
|
+
- `dependency-audit`: dependency supply-chain scan
|
|
37
|
+
|
|
38
|
+
Both remain under `G7 Security`.
|
|
39
|
+
|
|
40
|
+
## Policy
|
|
41
|
+
|
|
42
|
+
Policy lives at `.scale/security/dependency-policy.json`:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"version": 1,
|
|
47
|
+
"mode": "compatibility",
|
|
48
|
+
"maxPackages": 50,
|
|
49
|
+
"maxPackageFiles": 25,
|
|
50
|
+
"allowPackages": [],
|
|
51
|
+
"baselineFindings": []
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Modes:
|
|
56
|
+
|
|
57
|
+
- `compatibility`: blocks `CRITICAL`
|
|
58
|
+
- `strict`: blocks `CRITICAL` and `HIGH`
|
|
59
|
+
- `offline`: keeps local-only behavior; current offline findings follow compatibility blocking
|
|
60
|
+
|
|
61
|
+
Use `baselineFindings` for accepted legacy dependency risk:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"baselineFindings": [
|
|
66
|
+
{
|
|
67
|
+
"packageName": "legacy-tool",
|
|
68
|
+
"version": "1.2.3",
|
|
69
|
+
"ruleId": "dependency.install-script",
|
|
70
|
+
"reason": "Pinned and reviewed during migration window."
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Prefer a baseline over `allowPackages` when only one finding is accepted. `allowPackages` suppresses all findings for that package.
|
|
77
|
+
|
|
78
|
+
## Current Findings
|
|
79
|
+
|
|
80
|
+
The first implementation detects:
|
|
81
|
+
|
|
82
|
+
- install lifecycle scripts
|
|
83
|
+
- executable bin scripts
|
|
84
|
+
- deprecated packages from lockfile metadata
|
|
85
|
+
- dynamic code execution: `eval`, `new Function`
|
|
86
|
+
- shell execution patterns
|
|
87
|
+
- suspicious network access patterns
|
|
88
|
+
|
|
89
|
+
Future network-backed checks can add npm registry metadata and `npm audit --json` ingestion, but they should stay optional and evidence-backed.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Evolution Shadow Mode
|
|
2
|
+
|
|
3
|
+
SCALE V2 keeps self-evolution useful without letting one-off failures become hard blockers too early.
|
|
4
|
+
|
|
5
|
+
## Flow
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
Gate Failure
|
|
9
|
+
-> Defect
|
|
10
|
+
-> Lesson
|
|
11
|
+
-> Proposed Rule
|
|
12
|
+
-> Shadow Rule
|
|
13
|
+
-> Candidate Hook
|
|
14
|
+
-> Approved Blocking Hook
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Gate Failure To Defect
|
|
18
|
+
|
|
19
|
+
`GateSystem` emits `gate.failed` for failed gate results. `AutoDefectCreator` tracks consecutive failures per session and gate stage.
|
|
20
|
+
|
|
21
|
+
Default behavior:
|
|
22
|
+
|
|
23
|
+
- three consecutive failures create one `Defect`
|
|
24
|
+
- a passing `gate.executed` event resets the streak
|
|
25
|
+
- defect payload uses `rootCauseCategory=gate_failure`
|
|
26
|
+
- the original blockers, evidence, evidence record id, stage, and streak count are stored in defect context
|
|
27
|
+
|
|
28
|
+
This is evidence capture only. It does not change source code or generate a hook.
|
|
29
|
+
|
|
30
|
+
## Rule Maturity
|
|
31
|
+
|
|
32
|
+
New rules start in `shadow` mode. Shadow rules can record hits, but they do not block development.
|
|
33
|
+
|
|
34
|
+
Promotion requires:
|
|
35
|
+
|
|
36
|
+
- shadow hits >= 10
|
|
37
|
+
- at least one defect evidence id
|
|
38
|
+
- rollback method present
|
|
39
|
+
- false positive rate within threshold
|
|
40
|
+
- explicit approval before a blocking hook is allowed
|
|
41
|
+
|
|
42
|
+
`RuleMaturity` exposes:
|
|
43
|
+
|
|
44
|
+
- `createShadowRuleMaturity`
|
|
45
|
+
- `recordShadowHit`
|
|
46
|
+
- `evaluateRulePromotion`
|
|
47
|
+
- `approveRuleMaturity`
|
|
48
|
+
|
|
49
|
+
## Hook Boundary
|
|
50
|
+
|
|
51
|
+
`HookGenerator` still requires `rule.approved === true`.
|
|
52
|
+
|
|
53
|
+
For V2 rules that carry maturity metadata, it also requires:
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
rule.maturity.stage === "approved-blocking"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
That means proposed or shadow rules can be observed and improved, but cannot become blocking hooks until explicitly promoted.
|
|
60
|
+
|
|
61
|
+
## Current Scope
|
|
62
|
+
|
|
63
|
+
This release slice wires the core library path and gate events. CLI approval commands and persistent rule-maturity storage can be added later without changing the safety model.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# External Reference Inventory
|
|
2
|
+
|
|
3
|
+
This inventory is the source of truth for external projects, community skills, MCP servers, CLIs, and adapter targets referenced by SCALE. It complements [Third-Party Skills and External References](THIRD_PARTY_SKILLS.md).
|
|
4
|
+
|
|
5
|
+
The inventory is intentionally conservative:
|
|
6
|
+
|
|
7
|
+
- A row here is an acknowledgement and governance record, not a claim that upstream code is vendored.
|
|
8
|
+
- License is only marked when it has been explicitly reviewed in this repository. Unknown or unverified projects stay `review-required`.
|
|
9
|
+
- Any future vendoring, source copying, modified redistribution, bundled assets, logos, examples, or generated derivatives must preserve upstream license text, copyright notices, NOTICE files, source URL, pinned revision, and modification notes.
|
|
10
|
+
- External services and memory providers remain disabled or read-only by default until privacy, retention, credential, and deletion boundaries are reviewed.
|
|
11
|
+
|
|
12
|
+
## Current References
|
|
13
|
+
|
|
14
|
+
| Upstream | Role in SCALE | Usage status | License status | Primary source surface |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| [OthmanAdi/planning-with-files](https://github.com/OthmanAdi/planning-with-files) | File-backed planning workflow reference | adapted concept, not vendored | MIT | `SkillRepository`, README, `THIRD_PARTY_SKILLS` |
|
|
17
|
+
| [rohitg00/agentmemory](https://github.com/rohitg00/agentmemory) | Optional external memory provider | external provider, read-only by default | Apache-2.0 | `MemoryProviders`, `SkillRepository`, README |
|
|
18
|
+
| [garrytan/gbrain](https://github.com/garrytan/gbrain) | Optional graph memory provider | external provider, read-only by default | MIT | `MemoryProviders`, `SkillRepository`, README |
|
|
19
|
+
| [anthropics/skills](https://github.com/anthropics/skills) | Frontend and webapp testing skill references | external skill reference | review-required | `SkillRepository`, `SkillCatalog`, `ToolCapabilityRegistry` |
|
|
20
|
+
| [anthropics/claude-code](https://github.com/anthropics/claude-code) | Graphify and playwright-interactive skill references | optional discovery reference | review-required | `SkillDiscovery` |
|
|
21
|
+
| [VoltAgent/awesome-design-md](https://github.com/VoltAgent/awesome-design-md) | Design system and DESIGN.md guidance | external skill reference | review-required | `SkillRepository`, `ExternalSkills`, `SkillDoctor` |
|
|
22
|
+
| [nextlevelbuilder/ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) | UI/UX design intelligence reference | external skill reference | review-required | `SkillRepository`, `ExternalSkills`, `ToolCapabilityRegistry` |
|
|
23
|
+
| [eze-is/web-access](https://github.com/eze-is/web-access) | Web research and browser automation skill | external skill reference | review-required | `SkillRepository`, `ExternalSkills`, `SkillDoctor` |
|
|
24
|
+
| [vercel-labs/agent-browser](https://github.com/vercel-labs/agent-browser) | Browser automation CLI | external CLI reference | review-required | `SkillRepository`, `ExternalSkills`, `ToolCapabilityRegistry` |
|
|
25
|
+
| [ChromeDevTools/chrome-devtools-mcp](https://github.com/ChromeDevTools/chrome-devtools-mcp) | Chrome DevTools MCP integration | MCP reference | review-required | `SkillRepository`, `ExternalSkills`, `ToolCapabilityRegistry` |
|
|
26
|
+
| [trycua/cua](https://github.com/trycua/cua) | Desktop computer-use automation | restricted external automation reference | review-required | `SkillRepository`, `ExternalSkills`, `ToolCapabilityRegistry` |
|
|
27
|
+
| [microsoft/playwright](https://github.com/microsoft/playwright) | Browser automation and validation | optional discovery reference | review-required | `SkillDiscovery` |
|
|
28
|
+
| [google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli) | Gemini CLI and community skill examples | external CLI and skill reference | review-required | `SkillRepository`, `SkillCatalog`, adapters |
|
|
29
|
+
| [openai/codex](https://github.com/openai/codex) | Codex CLI adapter and external reviewer | external CLI reference | review-required | `SkillRepository`, `ExternalSkills`, adapters |
|
|
30
|
+
| [sst/opencode](https://github.com/sst/opencode) | OpenCode CLI reference used by routing | external CLI reference | review-required | `SkillRepository`, `ExternalSkills`, `SkillDoctor` |
|
|
31
|
+
| [opencode-ai/opencode](https://github.com/opencode-ai/opencode) | OpenCode adapter source comment | adapter target reference | review-required | `OpenCodeAdapter` |
|
|
32
|
+
| [facebook/react](https://github.com/facebook/react) | React fix skill example | external skill reference | review-required | `SkillRepository`, `SkillCatalog` |
|
|
33
|
+
| [vercel/next.js](https://github.com/vercel/next.js) | Next.js documentation update skill example | external skill reference | review-required | `SkillRepository`, `SkillCatalog` |
|
|
34
|
+
| [vercel-labs/skills](https://github.com/vercel-labs/skills) | Skill discovery example | external skill reference | review-required | `SkillRepository`, `SkillCatalog` |
|
|
35
|
+
| [Shubhamsaboo/awesome-llm-apps](https://github.com/Shubhamsaboo/awesome-llm-apps) | Full-stack agent skill example | external skill reference | review-required | `SkillCatalog` |
|
|
36
|
+
| [jnMetaCode/agency-agents-zh](https://github.com/jnMetaCode/agency-agents-zh) | Chinese role preset reference | external preset reference | review-required | `SkillRepository` |
|
|
37
|
+
| [yizhiyanhua-ai/fireworks-tech-graph](https://github.com/yizhiyanhua-ai/fireworks-tech-graph) | Diagram skill discovery and installer reference | optional install reference | review-required | `ExternalSkills`, `SkillDiscovery`, `SkillInstaller` |
|
|
38
|
+
| [github/awesome-copilot](https://github.com/github/awesome-copilot) | Excalidraw diagram skill source | optional install reference | review-required | `ExternalSkills`, `SkillInstaller`, installation workflow doc |
|
|
39
|
+
| [Cocoon-AI/architecture-diagram-generator](https://github.com/Cocoon-AI/architecture-diagram-generator) | Architecture diagram skill reference | optional install reference | review-required | `ExternalSkills`, `SkillDiscovery`, `SkillInstaller` |
|
|
40
|
+
| [heygen-com/hyperframes](https://github.com/heygen-com/hyperframes) | Video generation CLI reference | optional install reference | review-required | `ExternalSkills`, `SkillDiscovery`, `SkillInstaller` |
|
|
41
|
+
| [op7418/guizang-ppt-skill](https://github.com/op7418/guizang-ppt-skill) | PPT generation skill reference | optional install reference | review-required | `ExternalSkills`, `SkillDiscovery`, `SkillInstaller` |
|
|
42
|
+
| [QwenLM/qwen-code](https://github.com/QwenLM/qwen-code) | QCoder adapter target | adapter target reference | review-required | `QCoderAdapter` |
|
|
43
|
+
| [openclaw-ai/openclaw](https://github.com/openclaw-ai/openclaw) | OpenClaw adapter target | adapter target reference | review-required | `OpenClawAdapter` |
|
|
44
|
+
| [hermes-ai/hermes](https://github.com/hermes-ai/hermes) | Hermes adapter target | adapter target reference | review-required | `HermesAdapter` |
|
|
45
|
+
| [Hmbown/deepseek-tui](https://github.com/Hmbown/deepseek-tui) | DeepSeek TUI adapter target | adapter target reference | review-required | `DeepSeekTuiAdapter` |
|
|
46
|
+
| [Aider-AI/aider](https://github.com/Aider-AI/aider) | Aider adapter target | adapter target reference | review-required | `AiderAdapter` |
|
|
47
|
+
|
|
48
|
+
## Required Maintenance
|
|
49
|
+
|
|
50
|
+
When a new GitHub upstream is referenced from `src/skills`, `src/tools`, `src/adapters`, or current tool orchestration docs, update this inventory in the same change. `tests/docs/externalReferences.test.ts` scans those surfaces and fails if a referenced upstream is missing from this file.
|
|
51
|
+
|
|
52
|
+
Before promoting any `review-required` item to a declared license status, record:
|
|
53
|
+
|
|
54
|
+
1. upstream license file and revision
|
|
55
|
+
2. upstream copyright and NOTICE obligations
|
|
56
|
+
3. whether SCALE vendors code, adapts concepts, or only links to the project
|
|
57
|
+
4. modification notes for copied or derived files
|
|
58
|
+
5. installation, script, and permission review evidence
|
|
@@ -34,10 +34,26 @@ The dashboard reads existing local evidence:
|
|
|
34
34
|
| --- | --- |
|
|
35
35
|
| Runtime evidence | `.scale/evidence/runtime/` |
|
|
36
36
|
| Workflow eval | `.scale/evals/runs/` and `.scale/evals/failures/` |
|
|
37
|
+
| Workflow metrics | `.scale/metrics/tasks.jsonl` |
|
|
38
|
+
| Gate evidence | `.scale/evidence/GATE-*.json` |
|
|
39
|
+
| Command runs | `.scale/evidence/command-runs/` |
|
|
40
|
+
| Model usage | `.scale/model-usage/usage.jsonl` |
|
|
37
41
|
| Memory Brain | `.scale/memory/brain.sqlite` |
|
|
38
42
|
| Resource Governance | workspace files plus `.scale/resource-policy.json` and `.scale/assets.json` |
|
|
39
43
|
| HTML artifacts | task artifact manifests and rendered HTML files |
|
|
40
44
|
|
|
45
|
+
## Aggregated Metrics
|
|
46
|
+
|
|
47
|
+
V2.0 adds `MetricsAggregator` as the dashboard aggregation layer. It keeps the dashboard read-only and derives the following metrics from existing evidence:
|
|
48
|
+
|
|
49
|
+
- recent task count and first-pass rate
|
|
50
|
+
- average fix iterations
|
|
51
|
+
- gate failure distribution
|
|
52
|
+
- command output compression token savings
|
|
53
|
+
- model usage and prompt-cache savings
|
|
54
|
+
|
|
55
|
+
Each number must trace back to local JSON/JSONL evidence. If a source is absent, the dashboard reports zero rather than inventing values.
|
|
56
|
+
|
|
41
57
|
## Status Model
|
|
42
58
|
|
|
43
59
|
- Runtime evidence failures are blocking.
|
package/docs/MEMORY_FABRIC.md
CHANGED
|
@@ -105,3 +105,30 @@ runtime evidence -> memory pack -> memory settle -> 人审 -> knowledge/docs/rul
|
|
|
105
105
|
- 当前版本不内置向量数据库;如果项目配置了 SQLite knowledge base,会使用现有召回接口。
|
|
106
106
|
- 当前版本只检测 Graphify 产物是否存在并生成摘要,不主动运行 Graphify。
|
|
107
107
|
- HTML 可视化报告适合后续加在 context pack 之上;Memory Fabric 的核心产物先保持 JSON/Markdown,方便 diff、测试和 CLI 集成。
|
|
108
|
+
|
|
109
|
+
## Memory Provider Router
|
|
110
|
+
|
|
111
|
+
SCALE now treats strong memory systems as providers instead of rebuilding them inside the workflow engine.
|
|
112
|
+
|
|
113
|
+
Default provider order:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
agentmemory -> gbrain -> scale-local
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Commands:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
scale memory provider init
|
|
123
|
+
scale memory provider status --json
|
|
124
|
+
scale memory provider recall "OAuth callback Redis state" --json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Provider rules:
|
|
128
|
+
|
|
129
|
+
- `agentmemory` and `gbrain` are external providers and start disabled until endpoint, privacy, retention, and delete boundaries are reviewed.
|
|
130
|
+
- External providers are read-only by default. Writes require an explicit provider policy change.
|
|
131
|
+
- `scale-local` remains the fallback provider through Memory Brain and only promotes reviewed, evidence-backed memory.
|
|
132
|
+
- `memory pack` automatically includes a `provider-memory` section when provider recall returns relevant active memories.
|
|
133
|
+
|
|
134
|
+
This keeps agents flexible: they can ask the router for memory before planning, verification, review, or release, while SCALE still records which provider was used and why fallback was required.
|
package/docs/README.md
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
| --- | --- |
|
|
19
19
|
| [RESOURCE_GOVERNANCE.md](RESOURCE_GOVERNANCE.md) | 文档、报告、媒体、脚本、临时产物的生命周期治理 |
|
|
20
20
|
| [ENGINEERING_STANDARDS.md](ENGINEERING_STANDARDS.md) | 日志、安全、ORM、框架、测试、部署等工程规范 |
|
|
21
|
+
| [BACKGROUND_HUNTER.md](BACKGROUND_HUNTER.md) | Background Hunter 只读主动巡检、诊断交接和 ignore baseline |
|
|
22
|
+
| [DEPENDENCY_AUDIT.md](DEPENDENCY_AUDIT.md) | 供应链依赖审计、G7 dependency 子门禁和 dependency policy |
|
|
21
23
|
| [TOOL_ORCHESTRATION.md](TOOL_ORCHESTRATION.md) | skills、MCP、CLI、浏览器、桌面自动化的编排策略 |
|
|
22
24
|
| [RUNTIME_EVIDENCE.md](RUNTIME_EVIDENCE.md) | 会话 ledger、运行时证据和最终交付检查 |
|
|
23
25
|
| [MEMORY_FABRIC.md](MEMORY_FABRIC.md) | Runtime evidence、session events、knowledge recall 和 graph status 的预算化上下文包 |
|
|
@@ -26,6 +28,8 @@
|
|
|
26
28
|
| [CODE_INTELLIGENCE.md](CODE_INTELLIGENCE.md) | CodeGraph、Graphify 和显式 fallback 的代码智能与探索 ROI |
|
|
27
29
|
| [WORKFLOW_EVAL.md](WORKFLOW_EVAL.md) | Workflow Eval、pass@k 指标、Failure Replay 和改进候选 |
|
|
28
30
|
| [SKILL_RADAR.md](SKILL_RADAR.md) | Skill Radar、能力置信度、证据要求和供应链安全检查 |
|
|
31
|
+
| [THIRD_PARTY_SKILLS.md](THIRD_PARTY_SKILLS.md) | 第三方 skill 致谢、授权边界、引用方式和 vendoring 策略 |
|
|
32
|
+
| [EXTERNAL_REFERENCES.md](EXTERNAL_REFERENCES.md) | 外部项目、skills、MCP、CLI 和适配器引用的完整清单 |
|
|
29
33
|
| [UPGRADE_MANAGEMENT.md](UPGRADE_MANAGEMENT.md) | SCALE CLI、governance pack、skills、MCP 和 CLI 工具的安全升级流程 |
|
|
30
34
|
| [GOVERNANCE_DASHBOARD.md](GOVERNANCE_DASHBOARD.md) | Runtime、eval、memory、resource、HTML artifact 的统一治理面板 |
|
|
31
35
|
| [RELEASE_READINESS.md](RELEASE_READINESS.md) | 发版前质量门槛、官方 demo 和真实项目落地验收 |
|
|
@@ -35,6 +39,14 @@
|
|
|
35
39
|
| [VIBE-TEMPLATES.md](VIBE-TEMPLATES.md) | 可复制的 Vibe Coding 提示词模板 |
|
|
36
40
|
| [LEADERSHIP-PRESETS.md](LEADERSHIP-PRESETS.md) | CEO、CTO、PM、Architect 等内置领导者角色预设 |
|
|
37
41
|
|
|
42
|
+
## 当前规划与执行蓝图
|
|
43
|
+
|
|
44
|
+
这些文档描述计划中的架构演进,不代表当前 CLI 已全部实现。进入实现前应按文档中的验收标准和红线逐项拆分任务。
|
|
45
|
+
|
|
46
|
+
| 文档 | 说明 |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| [plans/2026-05-20-scale-engine-v2-final-architecture-plan.md](plans/2026-05-20-scale-engine-v2-final-architecture-plan.md) | SCALE Engine V2.0 最终架构落地方案:Prompt Cache、Dashboard 聚合、Background Hunter、供应链门禁、动态/视觉验证和 Evolution Shadow Mode |
|
|
49
|
+
|
|
38
50
|
## 架构与参考
|
|
39
51
|
|
|
40
52
|
| 文档 | 说明 |
|
|
@@ -0,0 +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. |
|
package/docs/SKILL_RADAR.md
CHANGED
|
@@ -55,6 +55,8 @@ The score is not a promise that the tool will work. It is a routing signal. Any
|
|
|
55
55
|
| `externalCli` | Codex, Gemini, OpenCode, external agent CLI | disabled by default; dry-run and output evidence |
|
|
56
56
|
| `review` | PR, merge, release, code review | reviewer skills, severity findings |
|
|
57
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 |
|
|
58
60
|
| `discovery` | skill, MCP, tool, capability discovery | find-skills plus safety review |
|
|
59
61
|
|
|
60
62
|
## Evidence Contract
|
|
@@ -66,6 +68,8 @@ Each recommendation carries required evidence. Examples:
|
|
|
66
68
|
- Desktop work: `operator-boundary`, `desktop-screenshot`, `affected-app`
|
|
67
69
|
- External CLI work: `cli-version-check`, `command`, `exit-code`, `output-summary`
|
|
68
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`
|
|
69
73
|
|
|
70
74
|
If evidence is missing, the final delivery should list the capability as unverified rather than claiming it was used successfully.
|
|
71
75
|
|
|
@@ -78,9 +82,12 @@ If evidence is missing, the final delivery should list the capability as unverif
|
|
|
78
82
|
- destructive install patterns
|
|
79
83
|
- npm/npx lifecycle script review
|
|
80
84
|
- required source, license, and revision checks
|
|
85
|
+
- third-party attribution and NOTICE checks
|
|
81
86
|
|
|
82
87
|
This is intentionally conservative. Third-party skills should start in review-required mode and be promoted only after inspection.
|
|
83
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
|
+
|
|
84
91
|
## Policy Integration
|
|
85
92
|
|
|
86
93
|
Skill Radar reads `.scale/tools.json` through the Tool Policy layer. Defaults:
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Third-Party Skills and External References
|
|
2
|
+
|
|
3
|
+
This document records external skill projects that SCALE may learn from, recommend, or integrate with. It is a governance boundary, not a vendoring manifest. The complete cross-repo inventory is maintained in [External Reference Inventory](EXTERNAL_REFERENCES.md).
|
|
4
|
+
|
|
5
|
+
## Policy
|
|
6
|
+
|
|
7
|
+
- Do not vendor third-party skill code, images, logos, examples, or marketing copy unless the license review explicitly allows redistribution.
|
|
8
|
+
- Preserve upstream license text, copyright notices, NOTICE files, source URL, and source revision before any vendored or modified redistribution.
|
|
9
|
+
- Mark modified files and document what changed from upstream.
|
|
10
|
+
- Treat optional external services as review-required until privacy, retention, credential, and delete boundaries are reviewed.
|
|
11
|
+
- `scale skill doctor --supply-chain` must include license, attribution, script, and pinned-revision checks for third-party skills.
|
|
12
|
+
- Community skills start as `review-required`; promotion requires real installation evidence and a recorded safety decision.
|
|
13
|
+
|
|
14
|
+
## Highlighted External References
|
|
15
|
+
|
|
16
|
+
| Project | License | Upstream | SCALE usage | Redistribution status |
|
|
17
|
+
| --- | --- | --- | --- | --- |
|
|
18
|
+
| Planning with Files | MIT | [OthmanAdi/planning-with-files](https://github.com/OthmanAdi/planning-with-files) | Adapt concepts for file-backed plans, findings, progress logs, active-plan routing, and plan attestation. | Not vendored. |
|
|
19
|
+
| agentmemory | Apache-2.0 | [rohitg00/agentmemory](https://github.com/rohitg00/agentmemory) | Optional external memory provider via REST or MCP for teams that need cross-agent persistent memory beyond local SCALE Memory Brain. | Not vendored. |
|
|
20
|
+
| GBrain | MIT | [garrytan/gbrain](https://github.com/garrytan/gbrain) | Optional graph memory provider for brain repos, hybrid search, entity relationships, MCP, and background maintenance. | Not vendored. |
|
|
21
|
+
|
|
22
|
+
Other referenced skills, MCP servers, CLIs, discovery candidates, and adapter targets are listed in [External Reference Inventory](EXTERNAL_REFERENCES.md). Unknown licenses stay `review-required`; do not treat a repository link as redistribution permission.
|
|
23
|
+
|
|
24
|
+
## Acknowledgements
|
|
25
|
+
|
|
26
|
+
SCALE acknowledges these upstream projects and contributors:
|
|
27
|
+
|
|
28
|
+
- `OthmanAdi/planning-with-files`, Copyright (c) 2026 Ahmad Adi.
|
|
29
|
+
- `rohitg00/agentmemory` and its upstream contributors.
|
|
30
|
+
- `garrytan/gbrain` and its upstream contributors.
|
|
31
|
+
- All upstream projects listed in [External Reference Inventory](EXTERNAL_REFERENCES.md) according to their licenses and contribution histories.
|
|
32
|
+
|
|
33
|
+
The current SCALE implementation records these projects as external references or adapted concepts. It does not copy their source code into this repository.
|
|
34
|
+
|
|
35
|
+
## Vendoring Checklist
|
|
36
|
+
|
|
37
|
+
If SCALE later vendors or modifies any third-party skill, the change must include:
|
|
38
|
+
|
|
39
|
+
1. Full upstream license text in the distributed package.
|
|
40
|
+
2. Upstream copyright and NOTICE material.
|
|
41
|
+
3. Source repository URL and pinned revision.
|
|
42
|
+
4. Modification notes for every copied or changed file.
|
|
43
|
+
5. Tests or doctor checks proving the attribution metadata is present.
|
|
44
|
+
6. README and generated skill repository documentation updates.
|
|
45
|
+
|
|
46
|
+
## Runtime Boundaries
|
|
47
|
+
|
|
48
|
+
External memory providers must not be enabled silently. Before use, record:
|
|
49
|
+
|
|
50
|
+
- provider endpoint and health check evidence
|
|
51
|
+
- project data scope
|
|
52
|
+
- credential boundary
|
|
53
|
+
- retention and deletion policy
|
|
54
|
+
- whether data leaves the local machine or team-controlled infrastructure
|
|
55
|
+
- whether provider writes are disabled, candidate-only, or explicitly enabled
|
|
56
|
+
|
|
57
|
+
External planning skills must not replace SCALE task evidence. They can improve the plan artifact shape, but final delivery still requires verification output, changed-file evidence, and explicit unverified-risk notes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hongmaple0820/scale-engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Executable AI agent governance with workflow gates, evidence, skill/tool orchestration, and traceable HTML artifacts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,18 +19,25 @@
|
|
|
19
19
|
"docs/README.md",
|
|
20
20
|
"docs/CODE_INTELLIGENCE.md",
|
|
21
21
|
"docs/CONTEXT_BUDGET.md",
|
|
22
|
+
"docs/BACKGROUND_HUNTER.md",
|
|
23
|
+
"docs/DEPENDENCY_AUDIT.md",
|
|
24
|
+
"docs/ACTIVE_SECURITY_VISUAL_GATES.md",
|
|
25
|
+
"docs/EVOLUTION_SHADOW_MODE.md",
|
|
22
26
|
"docs/WORKFLOW_EVAL.md",
|
|
23
27
|
"docs/SKILL_RADAR.md",
|
|
28
|
+
"docs/SKILL-REPOSITORY.md",
|
|
29
|
+
"docs/THIRD_PARTY_SKILLS.md",
|
|
30
|
+
"docs/EXTERNAL_REFERENCES.md",
|
|
24
31
|
"docs/MEMORY_BRAIN.md",
|
|
25
32
|
"docs/GOVERNANCE_DASHBOARD.md",
|
|
26
|
-
"docs/GITLAB_FLOW.md",
|
|
27
|
-
"docs/MEMORY_FABRIC.md",
|
|
28
|
-
"docs/RUNTIME_EVIDENCE.md",
|
|
29
|
-
"docs/RESOURCE_GOVERNANCE.md",
|
|
30
|
-
"docs/start",
|
|
31
|
-
"image",
|
|
32
|
-
"examples/demo-projects/agent-governance-demo"
|
|
33
|
-
],
|
|
33
|
+
"docs/GITLAB_FLOW.md",
|
|
34
|
+
"docs/MEMORY_FABRIC.md",
|
|
35
|
+
"docs/RUNTIME_EVIDENCE.md",
|
|
36
|
+
"docs/RESOURCE_GOVERNANCE.md",
|
|
37
|
+
"docs/start",
|
|
38
|
+
"image",
|
|
39
|
+
"examples/demo-projects/agent-governance-demo"
|
|
40
|
+
],
|
|
34
41
|
"publishConfig": {
|
|
35
42
|
"access": "public"
|
|
36
43
|
},
|