@hongmaple0820/scale-engine 0.24.0 → 0.26.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/LICENSE +15 -15
- package/README.en.md +336 -304
- package/README.md +500 -475
- package/dist/adapters/AiderAdapter.js +52 -52
- package/dist/adapters/AntigravityAdapter.d.ts +4 -0
- package/dist/adapters/AntigravityAdapter.js +21 -0
- package/dist/adapters/AntigravityAdapter.js.map +1 -0
- package/dist/adapters/ClaudeCodeAdapter.d.ts +4 -1
- package/dist/adapters/ClaudeCodeAdapter.js +34 -34
- package/dist/adapters/ClaudeCodeAdapter.js.map +1 -1
- package/dist/adapters/ClineAdapter.d.ts +4 -0
- package/dist/adapters/ClineAdapter.js +20 -0
- package/dist/adapters/ClineAdapter.js.map +1 -0
- package/dist/adapters/CodexAdapter.js +28 -28
- package/dist/adapters/CursorAdapter.js +26 -26
- package/dist/adapters/DeepSeekTuiAdapter.js +97 -97
- package/dist/adapters/DoubaoAdapter.js +33 -33
- package/dist/adapters/GeminiAdapter.js +26 -26
- package/dist/adapters/GenericProjectAgentAdapter.d.ts +29 -0
- package/dist/adapters/GenericProjectAgentAdapter.js +204 -0
- package/dist/adapters/GenericProjectAgentAdapter.js.map +1 -0
- package/dist/adapters/HermesAdapter.js +26 -26
- package/dist/adapters/JCodeAdapter.d.ts +4 -0
- package/dist/adapters/JCodeAdapter.js +19 -0
- package/dist/adapters/JCodeAdapter.js.map +1 -0
- package/dist/adapters/KiloCodeAdapter.d.ts +4 -0
- package/dist/adapters/KiloCodeAdapter.js +20 -0
- package/dist/adapters/KiloCodeAdapter.js.map +1 -0
- package/dist/adapters/KimiAdapter.js +32 -32
- package/dist/adapters/KiroAdapter.js +26 -26
- package/dist/adapters/OpenClawAdapter.js +26 -26
- package/dist/adapters/OpenCodeAdapter.js +26 -26
- package/dist/adapters/QCoderAdapter.js +26 -26
- package/dist/adapters/QoderAdapter.d.ts +4 -0
- package/dist/adapters/QoderAdapter.js +21 -0
- package/dist/adapters/QoderAdapter.js.map +1 -0
- package/dist/adapters/TraeAdapter.js +26 -26
- package/dist/adapters/VSCAdapter.js +26 -26
- package/dist/adapters/WindsurfAdapter.js +32 -32
- package/dist/adapters/WorkBuddyAdapter.js +26 -26
- package/dist/adapters/index.d.ts +5 -0
- package/dist/adapters/index.js +15 -0
- package/dist/adapters/index.js.map +1 -1
- package/dist/api/cli.js +226 -48
- package/dist/api/cli.js.map +1 -1
- package/dist/api/doctor.js +10 -3
- package/dist/api/doctor.js.map +1 -1
- package/dist/api/quickstart.js +7 -1
- package/dist/api/quickstart.js.map +1 -1
- package/dist/artifact/sqliteStore.js +89 -89
- package/dist/artifact/types.d.ts +1 -1
- package/dist/cli/phaseCommands.js +45 -45
- package/dist/context/AntiPatternRegistry.js +20 -20
- package/dist/context/ContextBuilder.js +155 -155
- package/dist/evolution/EvolutionEngine.js +31 -31
- package/dist/evolution/EvolutionEvaluator.d.ts +2 -0
- package/dist/evolution/EvolutionEvaluator.js +7 -1
- package/dist/evolution/EvolutionEvaluator.js.map +1 -1
- package/dist/fsm/FSMAgentBridge.js +11 -11
- package/dist/hooks/HookGeneratorEnhanced.js +218 -218
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/knowledge/SQLiteKnowledgeBase.js +28 -28
- package/dist/memory/MemoryBrain.d.ts +1 -0
- package/dist/memory/MemoryBrain.js +55 -52
- 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.js +44 -44
- package/dist/output/HTMLArtifactLayer.js +31 -31
- package/dist/prompts/VibeTemplateGallery.js +121 -121
- package/dist/skills/SkillDiscovery.js +12 -1
- package/dist/skills/SkillDiscovery.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/skills/routing/SkillPlanner.js +40 -40
- package/dist/workflow/EngineeringStandards.js +62 -62
- package/dist/workflow/GovernanceTemplatePacks.d.ts +1 -1
- package/dist/workflow/GovernanceTemplatePacks.js +1990 -162
- package/dist/workflow/GovernanceTemplatePacks.js.map +1 -1
- package/dist/workflow/GovernanceTemplates.d.ts +2 -0
- package/dist/workflow/GovernanceTemplates.js +1012 -1001
- package/dist/workflow/GovernanceTemplates.js.map +1 -1
- package/dist/workflow/ResourceGovernance.js +16 -16
- package/dist/workflow/TaskArtifactScaffolder.js +10 -10
- package/dist/workflow/UpgradeManager.d.ts +3 -2
- package/dist/workflow/UpgradeManager.js +134 -49
- package/dist/workflow/UpgradeManager.js.map +1 -1
- package/dist/workflow/WorkspaceTopology.js +18 -15
- package/dist/workflow/WorkspaceTopology.js.map +1 -1
- package/docs/CODE_INTELLIGENCE.md +138 -138
- package/docs/CONTEXT_BUDGET.md +81 -81
- package/docs/EXTERNAL_REFERENCES.md +63 -0
- package/docs/GITLAB_FLOW.md +125 -125
- package/docs/GOVERNANCE_DASHBOARD.md +64 -64
- package/docs/MEMORY_BRAIN.md +104 -104
- package/docs/MEMORY_FABRIC.md +134 -107
- package/docs/README.md +79 -68
- package/docs/RUNTIME_EVIDENCE.md +101 -101
- package/docs/SKILL-REPOSITORY.md +57 -0
- package/docs/SKILL_RADAR.md +122 -115
- package/docs/THIRD_PARTY_SKILLS.md +57 -0
- package/docs/WORKFLOW_EVAL.md +151 -151
- package/docs/guides/DEVELOPMENT_WORKFLOW.md +80 -0
- package/docs/guides/GETTING_STARTED.md +50 -0
- package/docs/start/README.md +78 -72
- package/docs/start/agent-governance-demo.md +107 -107
- package/docs/start/quickstart.md +137 -127
- package/docs/start/workflow-upgrade.md +32 -8
- package/docs/workflow/README.md +67 -0
- package/docs/workflow/node-library.md +52 -0
- package/docs/workflow/templates/api-contract.md +29 -0
- package/docs/workflow/templates/architecture-review.md +23 -0
- package/docs/workflow/templates/db-change-plan.md +20 -0
- package/docs/workflow/templates/docs-impact.md +17 -0
- package/docs/workflow/templates/e2e-plan.md +20 -0
- package/docs/workflow/templates/explore.md +16 -0
- package/docs/workflow/templates/github-actions-scale-preflight.yml +32 -0
- package/docs/workflow/templates/mini-prd.md +16 -0
- package/docs/workflow/templates/plan.md +37 -0
- package/docs/workflow/templates/pre-push-scale-preflight.sh +8 -0
- package/docs/workflow/templates/product-smoke.md +61 -0
- package/docs/workflow/templates/reality-check.md +28 -0
- package/docs/workflow/templates/resource-cleanup.md +17 -0
- package/docs/workflow/templates/resource-impact.md +25 -0
- package/docs/workflow/templates/review.md +12 -0
- package/docs/workflow/templates/runtime.md +23 -0
- package/docs/workflow/templates/security-review.md +26 -0
- package/docs/workflow/templates/skill-evidence.md +33 -0
- package/docs/workflow/templates/skill-plan.md +39 -0
- package/docs/workflow/templates/spec.md +17 -0
- package/docs/workflow/templates/standards-impact.md +28 -0
- package/docs/workflow/templates/summary.md +16 -0
- package/docs/workflow/templates/tasks.md +8 -0
- package/docs/workflow/templates/ui-spec.md +29 -0
- package/docs/workflow/templates/verification.md +20 -0
- package/docs/workflow/templates/visual-review.md +20 -0
- package/examples/demo-projects/agent-governance-demo/CONTEXT.md +14 -14
- package/examples/demo-projects/agent-governance-demo/README.md +48 -48
- package/examples/demo-projects/agent-governance-demo/docs/CONTEXT-MAP.md +14 -14
- package/examples/demo-projects/agent-governance-demo/package.json +22 -21
- package/examples/demo-projects/agent-governance-demo/src/oauth-state.ts +39 -39
- package/examples/demo-projects/agent-governance-demo/tests/oauth-state.test.ts +52 -52
- package/package.json +88 -75
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
# Code Intelligence
|
|
2
|
-
|
|
3
|
-
SCALE uses an adapter-first code intelligence layer. It can consume external code graph tools when they exist, read graph artifacts such as Graphify outputs, and fall back to a scoped internal source scan when no provider is available.
|
|
4
|
-
|
|
5
|
-
The goal is not to replace IDE indexing. The goal is to make exploration measurable:
|
|
6
|
-
|
|
7
|
-
- which provider answered the query
|
|
8
|
-
- whether fallback was used
|
|
9
|
-
- which files are likely relevant
|
|
10
|
-
- how many file reads were avoided
|
|
11
|
-
- what confidence the result has
|
|
12
|
-
|
|
13
|
-
## Quick Start
|
|
14
|
-
|
|
15
|
-
Create the optional provider configuration:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
scale codegraph init
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Inspect provider availability:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
scale codegraph status
|
|
25
|
-
scale codegraph status --json
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Query code intelligence:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
scale codegraph query "UserService.create"
|
|
32
|
-
scale codegraph impact --symbol UserService.create
|
|
33
|
-
scale codegraph context --symbol UserService.create --budget 2000
|
|
34
|
-
scale codegraph roi --symbol UserService.create
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Configuration
|
|
38
|
-
|
|
39
|
-
The configuration file lives at:
|
|
40
|
-
|
|
41
|
-
```text
|
|
42
|
-
.scale/code-intelligence.json
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Default shape:
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"version": "1.0",
|
|
50
|
-
"providers": [
|
|
51
|
-
{
|
|
52
|
-
"id": "codegraph",
|
|
53
|
-
"type": "external-cli",
|
|
54
|
-
"enabled": true,
|
|
55
|
-
"command": "codegraph",
|
|
56
|
-
"capabilities": ["symbols", "callers", "callees", "impact", "context"]
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"id": "graphify",
|
|
60
|
-
"type": "artifact",
|
|
61
|
-
"enabled": true,
|
|
62
|
-
"manifest": "graphify-out/GRAPH_REPORT.md",
|
|
63
|
-
"capabilities": ["summary", "module-map", "context"]
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
"fallback": {
|
|
67
|
-
"enabled": true,
|
|
68
|
-
"tools": ["internal-scan", "rg", "read"]
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Provider Types
|
|
74
|
-
|
|
75
|
-
| Type | Use |
|
|
76
|
-
| --- | --- |
|
|
77
|
-
| `external-cli` | Detects an installed external code graph command. SCALE does not auto-install it. The first version treats this as availability evidence until a stable command contract is configured. |
|
|
78
|
-
| `artifact` | Reads a local graph manifest or report file. JSON manifests can provide symbol impact data. |
|
|
79
|
-
| fallback | Uses a bounded internal source scan when providers are unavailable or return no hits. |
|
|
80
|
-
|
|
81
|
-
## JSON Artifact Provider
|
|
82
|
-
|
|
83
|
-
Artifact providers can point at a JSON manifest:
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"symbols": [
|
|
88
|
-
{
|
|
89
|
-
"name": "UserService.create",
|
|
90
|
-
"file": "src/user.ts",
|
|
91
|
-
"callers": ["src/api.ts"],
|
|
92
|
-
"callees": ["src/db.ts"]
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"files": [
|
|
96
|
-
{
|
|
97
|
-
"path": "src/user.ts",
|
|
98
|
-
"symbols": ["UserService.create"]
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
This allows SCALE to answer impact queries without reading the whole repository.
|
|
105
|
-
|
|
106
|
-
## ROI Metrics
|
|
107
|
-
|
|
108
|
-
Code intelligence reports include:
|
|
109
|
-
|
|
110
|
-
| Metric | Meaning |
|
|
111
|
-
| --- | --- |
|
|
112
|
-
| `graphHits` | Number of hits from graph providers. |
|
|
113
|
-
| `fallbackCount` | Whether fallback was needed. |
|
|
114
|
-
| `baselineFileReads` | Estimated broad exploration file reads. |
|
|
115
|
-
| `recommendedFileReads` | Scoped file reads recommended by the query result. |
|
|
116
|
-
| `fileReadsSaved` | Estimated avoided reads. |
|
|
117
|
-
| `toolCallsSaved` | Estimated avoided exploration tool calls. |
|
|
118
|
-
|
|
119
|
-
These numbers are deliberately conservative. They are a local signal for whether graph-assisted exploration is worth keeping default for a task class.
|
|
120
|
-
|
|
121
|
-
## Governance ROI
|
|
122
|
-
|
|
123
|
-
`scale governance roi` can include code intelligence:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
scale governance roi --symbol UserService.create
|
|
127
|
-
scale governance roi --code-query createUser
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
When a graph provider answers, the module is reported as measured evidence. When fallback is used, the module is reported as estimated and needs more evidence before becoming a stronger default.
|
|
131
|
-
|
|
132
|
-
## Policy
|
|
133
|
-
|
|
134
|
-
- SCALE must run when no code graph provider is installed.
|
|
135
|
-
- Missing providers must produce explicit fallback, not silent success.
|
|
136
|
-
- External tools are detected but not installed automatically.
|
|
137
|
-
- Source files are read only through a bounded fallback scan.
|
|
138
|
-
- Large generated graph outputs should stay outside default prompt context; use summaries and file paths.
|
|
1
|
+
# Code Intelligence
|
|
2
|
+
|
|
3
|
+
SCALE uses an adapter-first code intelligence layer. It can consume external code graph tools when they exist, read graph artifacts such as Graphify outputs, and fall back to a scoped internal source scan when no provider is available.
|
|
4
|
+
|
|
5
|
+
The goal is not to replace IDE indexing. The goal is to make exploration measurable:
|
|
6
|
+
|
|
7
|
+
- which provider answered the query
|
|
8
|
+
- whether fallback was used
|
|
9
|
+
- which files are likely relevant
|
|
10
|
+
- how many file reads were avoided
|
|
11
|
+
- what confidence the result has
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
Create the optional provider configuration:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
scale codegraph init
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Inspect provider availability:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
scale codegraph status
|
|
25
|
+
scale codegraph status --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Query code intelligence:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
scale codegraph query "UserService.create"
|
|
32
|
+
scale codegraph impact --symbol UserService.create
|
|
33
|
+
scale codegraph context --symbol UserService.create --budget 2000
|
|
34
|
+
scale codegraph roi --symbol UserService.create
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Configuration
|
|
38
|
+
|
|
39
|
+
The configuration file lives at:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
.scale/code-intelligence.json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Default shape:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"version": "1.0",
|
|
50
|
+
"providers": [
|
|
51
|
+
{
|
|
52
|
+
"id": "codegraph",
|
|
53
|
+
"type": "external-cli",
|
|
54
|
+
"enabled": true,
|
|
55
|
+
"command": "codegraph",
|
|
56
|
+
"capabilities": ["symbols", "callers", "callees", "impact", "context"]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "graphify",
|
|
60
|
+
"type": "artifact",
|
|
61
|
+
"enabled": true,
|
|
62
|
+
"manifest": "graphify-out/GRAPH_REPORT.md",
|
|
63
|
+
"capabilities": ["summary", "module-map", "context"]
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"fallback": {
|
|
67
|
+
"enabled": true,
|
|
68
|
+
"tools": ["internal-scan", "rg", "read"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Provider Types
|
|
74
|
+
|
|
75
|
+
| Type | Use |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `external-cli` | Detects an installed external code graph command. SCALE does not auto-install it. The first version treats this as availability evidence until a stable command contract is configured. |
|
|
78
|
+
| `artifact` | Reads a local graph manifest or report file. JSON manifests can provide symbol impact data. |
|
|
79
|
+
| fallback | Uses a bounded internal source scan when providers are unavailable or return no hits. |
|
|
80
|
+
|
|
81
|
+
## JSON Artifact Provider
|
|
82
|
+
|
|
83
|
+
Artifact providers can point at a JSON manifest:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"symbols": [
|
|
88
|
+
{
|
|
89
|
+
"name": "UserService.create",
|
|
90
|
+
"file": "src/user.ts",
|
|
91
|
+
"callers": ["src/api.ts"],
|
|
92
|
+
"callees": ["src/db.ts"]
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"files": [
|
|
96
|
+
{
|
|
97
|
+
"path": "src/user.ts",
|
|
98
|
+
"symbols": ["UserService.create"]
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
This allows SCALE to answer impact queries without reading the whole repository.
|
|
105
|
+
|
|
106
|
+
## ROI Metrics
|
|
107
|
+
|
|
108
|
+
Code intelligence reports include:
|
|
109
|
+
|
|
110
|
+
| Metric | Meaning |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| `graphHits` | Number of hits from graph providers. |
|
|
113
|
+
| `fallbackCount` | Whether fallback was needed. |
|
|
114
|
+
| `baselineFileReads` | Estimated broad exploration file reads. |
|
|
115
|
+
| `recommendedFileReads` | Scoped file reads recommended by the query result. |
|
|
116
|
+
| `fileReadsSaved` | Estimated avoided reads. |
|
|
117
|
+
| `toolCallsSaved` | Estimated avoided exploration tool calls. |
|
|
118
|
+
|
|
119
|
+
These numbers are deliberately conservative. They are a local signal for whether graph-assisted exploration is worth keeping default for a task class.
|
|
120
|
+
|
|
121
|
+
## Governance ROI
|
|
122
|
+
|
|
123
|
+
`scale governance roi` can include code intelligence:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
scale governance roi --symbol UserService.create
|
|
127
|
+
scale governance roi --code-query createUser
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
When a graph provider answers, the module is reported as measured evidence. When fallback is used, the module is reported as estimated and needs more evidence before becoming a stronger default.
|
|
131
|
+
|
|
132
|
+
## Policy
|
|
133
|
+
|
|
134
|
+
- SCALE must run when no code graph provider is installed.
|
|
135
|
+
- Missing providers must produce explicit fallback, not silent success.
|
|
136
|
+
- External tools are detected but not installed automatically.
|
|
137
|
+
- Source files are read only through a bounded fallback scan.
|
|
138
|
+
- Large generated graph outputs should stay outside default prompt context; use summaries and file paths.
|
package/docs/CONTEXT_BUDGET.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# Context Budget And Progressive Governance
|
|
2
|
-
|
|
3
|
-
Status: implemented baseline
|
|
4
|
-
Since: v0.20 development branch
|
|
5
|
-
|
|
6
|
-
This feature keeps SCALE from becoming its own context pollution source. It separates always-loaded rules from on-demand documents, runtime evidence, historical archives, and generated artifacts.
|
|
7
|
-
|
|
8
|
-
## Commands
|
|
9
|
-
|
|
1
|
+
# Context Budget And Progressive Governance
|
|
2
|
+
|
|
3
|
+
Status: implemented baseline
|
|
4
|
+
Since: v0.20 development branch
|
|
5
|
+
|
|
6
|
+
This feature keeps SCALE from becoming its own context pollution source. It separates always-loaded rules from on-demand documents, runtime evidence, historical archives, and generated artifacts.
|
|
7
|
+
|
|
8
|
+
## Commands
|
|
9
|
+
|
|
10
10
|
Report token cost by context category:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
@@ -19,58 +19,58 @@ Include provider-specific prompt cache policy:
|
|
|
19
19
|
scale context budget --provider anthropic --json
|
|
20
20
|
scale context budget --provider openai --json
|
|
21
21
|
```
|
|
22
|
-
|
|
23
|
-
Write the report to `.scale/context-budget.json`:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
scale context budget --write
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Check thresholds:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
scale context doctor --max-always 2500 --max-task 8000
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Build a lazy-loaded task context pack:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
scale context pack \
|
|
39
|
-
--task "Review frontend route with browser evidence" \
|
|
40
|
-
--level L \
|
|
41
|
-
--files src/routes/upload.tsx \
|
|
42
|
-
--budget 4000 \
|
|
43
|
-
--json
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Evaluate progressive governance mode:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
scale governance mode \
|
|
50
|
-
--task "Change auth permissions and database migration" \
|
|
51
|
-
--files src/auth/user.ts,migrations/001.sql \
|
|
52
|
-
--requested-mode minimal \
|
|
53
|
-
--json
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Report governance benefit and overhead:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
scale governance roi \
|
|
60
|
-
--task-id TASK-123 \
|
|
61
|
-
--task "Review frontend route with browser evidence" \
|
|
62
|
-
--files src/routes/upload.tsx \
|
|
63
|
-
--json
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Categories
|
|
67
|
-
|
|
68
|
-
| Category | Meaning | Loading Policy |
|
|
69
|
-
| --- | --- | --- |
|
|
70
|
-
| `always` | Tiny entrypoint rules and source-of-truth governance config | Keep under strict token budget |
|
|
71
|
-
| `on-demand` | Domain docs and governance guides | Load only when task trigger matches |
|
|
72
|
-
| `evidence` | Runtime evidence and task artifacts | Summarize and reference by path |
|
|
73
|
-
| `archive` | Historical plans and old roadmap context | Do not load unless explicitly requested |
|
|
22
|
+
|
|
23
|
+
Write the report to `.scale/context-budget.json`:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
scale context budget --write
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Check thresholds:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
scale context doctor --max-always 2500 --max-task 8000
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Build a lazy-loaded task context pack:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
scale context pack \
|
|
39
|
+
--task "Review frontend route with browser evidence" \
|
|
40
|
+
--level L \
|
|
41
|
+
--files src/routes/upload.tsx \
|
|
42
|
+
--budget 4000 \
|
|
43
|
+
--json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Evaluate progressive governance mode:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
scale governance mode \
|
|
50
|
+
--task "Change auth permissions and database migration" \
|
|
51
|
+
--files src/auth/user.ts,migrations/001.sql \
|
|
52
|
+
--requested-mode minimal \
|
|
53
|
+
--json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Report governance benefit and overhead:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
scale governance roi \
|
|
60
|
+
--task-id TASK-123 \
|
|
61
|
+
--task "Review frontend route with browser evidence" \
|
|
62
|
+
--files src/routes/upload.tsx \
|
|
63
|
+
--json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Categories
|
|
67
|
+
|
|
68
|
+
| Category | Meaning | Loading Policy |
|
|
69
|
+
| --- | --- | --- |
|
|
70
|
+
| `always` | Tiny entrypoint rules and source-of-truth governance config | Keep under strict token budget |
|
|
71
|
+
| `on-demand` | Domain docs and governance guides | Load only when task trigger matches |
|
|
72
|
+
| `evidence` | Runtime evidence and task artifacts | Summarize and reference by path |
|
|
73
|
+
| `archive` | Historical plans and old roadmap context | Do not load unless explicitly requested |
|
|
74
74
|
| `generated` | HTML reports, screenshots, graph outputs, generated artifacts | Keep manifest-only by default |
|
|
75
75
|
|
|
76
76
|
## Prompt Cache Policy
|
|
@@ -91,23 +91,23 @@ Provider behavior:
|
|
|
91
91
|
| Other | `usage-ledger-only` | normal input/output usage only |
|
|
92
92
|
|
|
93
93
|
The cache policy does not live in `ModelRouter`. `ModelRouter` selects a model; provider request builders or adapters apply provider-specific cache controls.
|
|
94
|
-
|
|
95
|
-
## Progressive Governance
|
|
96
|
-
|
|
97
|
-
SCALE now has a baseline risk classifier. It keeps low-risk documentation work in `minimal` mode and escalates risky tasks to `standard`, `expanded`, or `critical`.
|
|
98
|
-
|
|
99
|
-
Examples:
|
|
100
|
-
|
|
101
|
-
| Signal | Mode |
|
|
102
|
-
| --- | --- |
|
|
103
|
-
| README typo | `minimal` |
|
|
104
|
-
| normal implementation task | `standard` |
|
|
105
|
-
| UI, browser, E2E, public interface, or cross-module work | `expanded` |
|
|
106
|
-
| auth, permission, secret, database, migration, production config, release, or destructive operation | `critical` |
|
|
107
|
-
|
|
108
|
-
This is not a replacement for verification. It only decides which governance behavior should activate.
|
|
109
|
-
|
|
110
|
-
## Governance ROI
|
|
111
|
-
|
|
112
|
-
`scale governance roi` reports both benefit and overhead. Early ROI is estimated from context budget and risk signals. Later versions should replace estimates with measured eval data such as file reads saved, tool calls saved, fix iterations reduced, and human corrections avoided.
|
|
113
|
-
|
|
94
|
+
|
|
95
|
+
## Progressive Governance
|
|
96
|
+
|
|
97
|
+
SCALE now has a baseline risk classifier. It keeps low-risk documentation work in `minimal` mode and escalates risky tasks to `standard`, `expanded`, or `critical`.
|
|
98
|
+
|
|
99
|
+
Examples:
|
|
100
|
+
|
|
101
|
+
| Signal | Mode |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| README typo | `minimal` |
|
|
104
|
+
| normal implementation task | `standard` |
|
|
105
|
+
| UI, browser, E2E, public interface, or cross-module work | `expanded` |
|
|
106
|
+
| auth, permission, secret, database, migration, production config, release, or destructive operation | `critical` |
|
|
107
|
+
|
|
108
|
+
This is not a replacement for verification. It only decides which governance behavior should activate.
|
|
109
|
+
|
|
110
|
+
## Governance ROI
|
|
111
|
+
|
|
112
|
+
`scale governance roi` reports both benefit and overhead. Early ROI is estimated from context budget and risk signals. Later versions should replace estimates with measured eval data such as file reads saved, tool calls saved, fix iterations reduced, and human corrections avoided.
|
|
113
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
| [Qoder docs](https://docs.qoder.com/) | Qoder adapter target | adapter target reference | review-required | `QoderAdapter` |
|
|
44
|
+
| JCode | JCode adapter target; upstream source and license still need review | provisional adapter target reference | review-required | `JCodeAdapter` |
|
|
45
|
+
| [Cline docs](https://docs.cline.bot/) | Cline adapter target | adapter target reference | review-required | `ClineAdapter` |
|
|
46
|
+
| [Kilo Code docs](https://docs.kilocode.ai/) | Kilo Code adapter target | adapter target reference | review-required | `KiloCodeAdapter` |
|
|
47
|
+
| [Google Antigravity docs](https://antigravity.google/docs/) | Antigravity adapter target | adapter target reference | review-required | `AntigravityAdapter` |
|
|
48
|
+
| [openclaw-ai/openclaw](https://github.com/openclaw-ai/openclaw) | OpenClaw adapter target | adapter target reference | review-required | `OpenClawAdapter` |
|
|
49
|
+
| [hermes-ai/hermes](https://github.com/hermes-ai/hermes) | Hermes adapter target | adapter target reference | review-required | `HermesAdapter` |
|
|
50
|
+
| [Hmbown/deepseek-tui](https://github.com/Hmbown/deepseek-tui) | DeepSeek TUI adapter target | adapter target reference | review-required | `DeepSeekTuiAdapter` |
|
|
51
|
+
| [Aider-AI/aider](https://github.com/Aider-AI/aider) | Aider adapter target | adapter target reference | review-required | `AiderAdapter` |
|
|
52
|
+
|
|
53
|
+
## Required Maintenance
|
|
54
|
+
|
|
55
|
+
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.
|
|
56
|
+
|
|
57
|
+
Before promoting any `review-required` item to a declared license status, record:
|
|
58
|
+
|
|
59
|
+
1. upstream license file and revision
|
|
60
|
+
2. upstream copyright and NOTICE obligations
|
|
61
|
+
3. whether SCALE vendors code, adapts concepts, or only links to the project
|
|
62
|
+
4. modification notes for copied or derived files
|
|
63
|
+
5. installation, script, and permission review evidence
|