@hongmaple0820/scale-engine 0.33.0 → 0.38.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 +86 -376
- package/README.md +89 -549
- package/dist/api/cli.js +185 -12
- package/dist/api/cli.js.map +1 -1
- package/dist/api/doctor.d.ts +38 -3
- package/dist/api/doctor.js +269 -44
- package/dist/api/doctor.js.map +1 -1
- package/dist/api/mcp.js +2 -2
- package/dist/api/mcp.js.map +1 -1
- package/dist/api/quickstart.d.ts +34 -4
- package/dist/api/quickstart.js +90 -73
- package/dist/api/quickstart.js.map +1 -1
- package/dist/bootstrap/DependencyBootstrap.d.ts +89 -0
- package/dist/bootstrap/DependencyBootstrap.js +441 -0
- package/dist/bootstrap/DependencyBootstrap.js.map +1 -0
- package/dist/capabilities/InstalledSkillsIntegration.js +14 -6
- package/dist/capabilities/InstalledSkillsIntegration.js.map +1 -1
- package/dist/codegraph/CodeIntelligence.d.ts +12 -0
- package/dist/codegraph/CodeIntelligence.js +251 -30
- package/dist/codegraph/CodeIntelligence.js.map +1 -1
- package/dist/config/profiles.d.ts +12 -0
- package/dist/config/profiles.js +39 -4
- package/dist/config/profiles.js.map +1 -1
- package/dist/core/ExternalCommand.d.ts +9 -0
- package/dist/core/ExternalCommand.js +56 -0
- package/dist/core/ExternalCommand.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/knowledge/CerebrumManager.d.ts +2 -2
- package/dist/knowledge/CerebrumManager.js.map +1 -1
- package/dist/knowledge/GraphifyKnowledgeBase.d.ts +38 -0
- package/dist/knowledge/GraphifyKnowledgeBase.js +409 -0
- package/dist/knowledge/GraphifyKnowledgeBase.js.map +1 -0
- package/dist/memory/MemoryFabric.js +1 -0
- package/dist/memory/MemoryFabric.js.map +1 -1
- package/dist/memory/MemoryIntelligence.d.ts +42 -0
- package/dist/memory/MemoryIntelligence.js +215 -0
- package/dist/memory/MemoryIntelligence.js.map +1 -0
- package/dist/memory/MemoryProviders.d.ts +22 -0
- package/dist/memory/MemoryProviders.js +138 -5
- package/dist/memory/MemoryProviders.js.map +1 -1
- 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/runtime/AiOsRuntime.d.ts +2 -0
- package/dist/runtime/AiOsRuntime.js +2 -0
- package/dist/runtime/AiOsRuntime.js.map +1 -1
- package/dist/runtime/ExecutionLedger.d.ts +46 -0
- package/dist/runtime/ExecutionLedger.js +71 -0
- package/dist/runtime/ExecutionLedger.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/SkillRepository.js +5 -5
- package/dist/skills/SkillRepository.js.map +1 -1
- package/dist/skills/routing/SkillPolicy.js +2 -2
- package/dist/skills/routing/SkillPolicy.js.map +1 -1
- package/dist/tools/RtkRuntime.d.ts +9 -0
- package/dist/tools/RtkRuntime.js +43 -0
- package/dist/tools/RtkRuntime.js.map +1 -0
- package/dist/tools/ToolCapabilityRegistry.d.ts +1 -0
- package/dist/tools/ToolCapabilityRegistry.js +68 -11
- package/dist/tools/ToolCapabilityRegistry.js.map +1 -1
- package/dist/tools/ToolOrchestrator.js +6 -4
- package/dist/tools/ToolOrchestrator.js.map +1 -1
- package/dist/tools/ToolPolicy.js +16 -1
- package/dist/tools/ToolPolicy.js.map +1 -1
- package/dist/workflow/AdaptiveWorkflowRouter.d.ts +1 -0
- package/dist/workflow/AdaptiveWorkflowRouter.js +3 -0
- package/dist/workflow/AdaptiveWorkflowRouter.js.map +1 -1
- package/dist/workflow/CommitDiscipline.d.ts +68 -0
- package/dist/workflow/CommitDiscipline.js +327 -0
- package/dist/workflow/CommitDiscipline.js.map +1 -0
- package/dist/workflow/CrossRepoOrchestrator.d.ts +92 -0
- package/dist/workflow/CrossRepoOrchestrator.js +400 -0
- package/dist/workflow/CrossRepoOrchestrator.js.map +1 -0
- package/dist/workflow/GovernanceRoi.d.ts +52 -0
- package/dist/workflow/GovernanceRoi.js +204 -0
- package/dist/workflow/GovernanceRoi.js.map +1 -0
- package/dist/workflow/GovernanceTemplates.js +2 -2
- package/dist/workflow/McpGovernance.d.ts +63 -0
- package/dist/workflow/McpGovernance.js +198 -0
- package/dist/workflow/McpGovernance.js.map +1 -0
- package/dist/workflow/SessionCoordinator.d.ts +103 -0
- package/dist/workflow/SessionCoordinator.js +401 -0
- package/dist/workflow/SessionCoordinator.js.map +1 -0
- package/dist/workflow/TaskDependencyGraph.d.ts +73 -0
- package/dist/workflow/TaskDependencyGraph.js +245 -0
- package/dist/workflow/TaskDependencyGraph.js.map +1 -0
- package/dist/workflow/WorkflowTemplates.d.ts +38 -0
- package/dist/workflow/WorkflowTemplates.js +371 -0
- package/dist/workflow/WorkflowTemplates.js.map +1 -0
- package/dist/workflow/WorkspacePolicy.d.ts +46 -0
- package/dist/workflow/WorkspacePolicy.js +141 -0
- package/dist/workflow/WorkspacePolicy.js.map +1 -0
- package/dist/workflow/gates/GateSystem.js +12 -9
- package/dist/workflow/gates/GateSystem.js.map +1 -1
- package/dist/workflow/index.d.ts +7 -0
- package/dist/workflow/index.js +7 -0
- package/dist/workflow/index.js.map +1 -1
- package/docs/CODE_INTELLIGENCE.md +22 -5
- package/docs/EXTERNAL_REFERENCES.md +5 -2
- package/docs/MEMORY_FABRIC.md +7 -3
- package/docs/SKILL-REPOSITORY.md +3 -3
- package/docs/start/quickstart.md +11 -0
- package/docs/workflow/templates/skill-plan.md +1 -1
- package/package.json +3 -2
package/README.en.md
CHANGED
|
@@ -1,142 +1,33 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-0.
|
|
2
|
+
<img src="https://img.shields.io/badge/version-0.38.0-orange?style=flat-square" alt="version" />
|
|
3
3
|
<img src="https://img.shields.io/badge/platforms-22-blue?style=flat-square" alt="platforms" />
|
|
4
4
|
<img src="https://img.shields.io/badge/agents-12-blue?style=flat-square" alt="agents" />
|
|
5
|
-
<img src="https://img.shields.io/badge/workflows-10-green?style=flat-square" alt="workflows" />
|
|
6
|
-
<img src="https://img.shields.io/badge/detectors-19-red?style=flat-square" alt="detectors" />
|
|
7
5
|
<img src="https://img.shields.io/badge/tests-verified-brightgreen?style=flat-square" alt="tests" />
|
|
8
|
-
<img src="https://img.shields.io/badge/npm-0.
|
|
6
|
+
<img src="https://img.shields.io/badge/npm-0.38.0-cb3837?style=flat-square&logo=npm" alt="npm" />
|
|
9
7
|
</p>
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
[](https://repostars.dev/?repos=hongmaple0820%2Fscale-engine&theme=copper)
|
|
12
10
|
|
|
13
|
-
SCALE Engine
|
|
11
|
+
# SCALE Engine
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
SCALE Engine turns AI-agent engineering discipline into executable commands, gates, and evidence files instead of relying on prompt discipline alone. It helps humans see what the agent explored, planned, verified, skipped, and why a task is or is not ready to ship.
|
|
14
|
+
|
|
15
|
+
Source: https://github.com/hongmaple0820/scale-engine
|
|
16
16
|
Mirror: https://gitee.com/hongmaple/scale-engine
|
|
17
17
|
npm: https://www.npmjs.com/package/@hongmaple0820/scale-engine
|
|
18
|
-
Language: [
|
|
19
|
-
|
|
20
|
-
## 0.27.0 AI OS Runtime
|
|
21
|
-
|
|
22
|
-
0.27.0 turns the AI Engineering OS direction into one executable entry point: `scale ai-os plan`. It creates a unified task plan with progressive governance mode, Context Compiler budget output, Memory Provider recall, Skill Routing execution steps, and Governance ROI. An agent can see which context to load, which capabilities to use, what evidence is required, and which risks escalate gates before it starts the task.
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
scale ai-os plan \
|
|
26
|
-
--task-id TASK-123 \
|
|
27
|
-
--task "Fix OAuth callback auth token handling and verify browser callback flow" \
|
|
28
|
-
--level L \
|
|
29
|
-
--files src/auth/oauth.ts,src/ui/callback.tsx \
|
|
30
|
-
--budget 8000 \
|
|
31
|
-
--json
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
This is not a claim that SCALE replaces human judgment. It is the first testable, explainable, and measurable runtime planning layer for the AI Engineering OS direction.
|
|
35
|
-
|
|
36
|
-
The near-term target is `0.28.0` as a usable closed-loop enhancement: connect `ai-os plan`, `ai-os run`, verification recommendations, failure learning, dashboard, benchmark, migration, and adoption into one verifiable loop. The long-range target is an AI Engineering OS beta in 8-12 weeks, a stable governance runtime in 3-6 months, and a cross-agent engineering operating layer in 6-12 months. See the full roadmap in [AI Engineering OS Strategic Positioning](docs/AI_ENGINEERING_OS_POSITIONING.md).
|
|
37
|
-
|
|
38
|
-
The first 0.30.0 governance-maturity slice adds Evaluator Intelligence and Tool Strategy Planner to the AI OS runtime. `scale ai-os plan` now detects reasoning-heavy architecture, root-cause, security, and release work, then adds critique, threat-model, release-readiness, and uncertainty decision-log gates to the adaptive workflow. It also turns skill/artifact/verification steps into a cost, retry, fallback, side-effect, and evidence graph. `scale ai-os status` surfaces evaluator gate count, uncertainty, tool-strategy cost, and fallback coverage so reviewers can see whether reasoning and tool risks were governed instead of hidden in prose.
|
|
39
|
-
|
|
40
|
-
The current 0.27.0 beta runtime now includes the controlled run entry point: `scale ai-os run --dry-run` reuses the unified plan, produces execution steps, evidence requirements, next actions, and writes the run report to `.scale/ai-os/runs/`. When real verification is required, use guarded mode with explicit `--verify` commands. Commands run through the safe runner by default and are recorded as runtime evidence; failed verification returns a `blocked` JSON report and a non-zero CLI exit code.
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
scale ai-os run \
|
|
44
|
-
--task-id TASK-123 \
|
|
45
|
-
--task "Fix OAuth callback auth token handling and verify browser callback flow" \
|
|
46
|
-
--level L \
|
|
47
|
-
--files src/auth/oauth.ts,src/ui/callback.tsx \
|
|
48
|
-
--dry-run \
|
|
49
|
-
--json
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
scale ai-os run \
|
|
54
|
-
--task-id TASK-123 \
|
|
55
|
-
--task "Fix OAuth callback auth token handling and verify browser callback flow" \
|
|
56
|
-
--level L \
|
|
57
|
-
--files src/auth/oauth.ts,src/ui/callback.tsx \
|
|
58
|
-
--mode guarded \
|
|
59
|
-
--verify "npm test -- tests/auth/oauth.test.ts" \
|
|
60
|
-
--json
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
After multiple runs, use the dashboard to summarize ready/blocked runs, verification commands, pending evidence, and failure learning:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
scale ai-os status --lang en
|
|
67
|
-
scale ai-os dashboard --json
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
`status` is the 0.28.0 closed-loop visibility entry point. It checks runtime directories, plan/run evidence, guarded verification, dashboard health, benchmark evidence, and the adoption report in one place.
|
|
71
|
-
For the 0.29.0 intelligence track, `status` also reports memory recall, memory quality, context savings, context compression risk, skill routing, and benchmark intelligence signals from persisted runs and benchmark evidence.
|
|
72
|
-
When guarded verification evidence is missing, it also recommends concrete commands from `.scale/verification.json` or `package.json` scripts so an agent can choose the next governed `--verify` step without guessing.
|
|
73
|
-
|
|
74
|
-
Before a release or milestone review, run the fixed benchmark scenarios to compare context, memory, skill, governance, and dashboard metrics:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
scale ai-os benchmark --json
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Before adopting the AI OS beta runtime in an existing project, create or verify the AI OS runtime state directories:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
scale ai-os migrate --json
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
You can also use the one-command adoption path. It runs migrate, the first dry-run, benchmark, and doctor in order, then writes the adoption report to `.scale/ai-os/adoption.json`:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
scale ai-os adopt \
|
|
90
|
-
--task "Adopt AI OS runtime and generate the first governance evidence" \
|
|
91
|
-
--files "README.md,src/runtime/AiOsRuntime.ts" \
|
|
92
|
-
--json
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
For project-level readiness, run the AI OS doctor. It checks runtime directories, run history, dashboard health, benchmark freshness, and prints the next required action in English or Chinese:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
scale ai-os doctor --lang en --json
|
|
99
|
-
scale ai-os doctor --lang zh
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
The standard upgrade path also surfaces this readiness. `scale upgrade check --json` now includes the AI OS doctor result, and `scale upgrade plan --json` adds explicit `ai-os adopt`, `ai-os migrate`, and `ai-os doctor` steps when a project has not yet adopted the runtime state. Human-facing `scale upgrade check/plan --lang en` prints localized next commands; keep `--json` for scripts, CI, and agent integrations.
|
|
103
|
-
|
|
104
|
-
## Community
|
|
105
|
-
|
|
106
|
-
SCALE Engine is an engineering workflow governance project for real AI-agent delivery. Contributions, issues, PRs, governance-pack ideas, and field reports are welcome through the source repositories. Chinese users can also follow the WeChat public account for updates, examples, and community entry points.
|
|
107
|
-
|
|
108
|
-
| Platform | Link | Purpose |
|
|
109
|
-
| --- | --- | --- |
|
|
110
|
-
| GitHub | [https://github.com/hongmaple0820/scale-engine](https://github.com/hongmaple0820/scale-engine) | Source, issues, and PRs |
|
|
111
|
-
| Gitee | [https://gitee.com/hongmaple/scale-engine](https://gitee.com/hongmaple/scale-engine) | China mirror and feedback |
|
|
112
|
-
| npm | [https://www.npmjs.com/package/@hongmaple0820/scale-engine](https://www.npmjs.com/package/@hongmaple0820/scale-engine) | CLI package |
|
|
113
|
-
|
|
114
|
-
<p align="center">
|
|
115
|
-
<img src="image/wechat-public.jpg" alt="SCALE Engine WeChat public account" width="220" />
|
|
116
|
-
</p>
|
|
117
|
-
|
|
118
|
-
## Sponsorship
|
|
119
|
-
|
|
120
|
-
If SCALE Engine saves engineering governance time for your team, or helps move AI-agent work into a verifiable, reviewable, and releasable loop, voluntary sponsorship is welcome. Sponsorship supports maintenance, examples, documentation, test coverage, and community support. It is not a commercial support contract and does not change issue or PR priority.
|
|
121
|
-
|
|
122
|
-
<p align="center">
|
|
123
|
-
<img src="image/wxPay.jpg" alt="Sponsor with WeChat Pay" width="220" />
|
|
124
|
-
|
|
125
|
-
<img src="image/zfb.jpg" alt="Sponsor with Alipay" width="220" />
|
|
126
|
-
</p>
|
|
18
|
+
Language: [Chinese](README.md) | [English](README.en.md)
|
|
19
|
+
Changelog: [CHANGELOG.md](CHANGELOG.md)
|
|
127
20
|
|
|
128
21
|
## What It Solves
|
|
129
22
|
|
|
130
|
-
AI coding becomes hard when agents must behave consistently across real teams and real repositories:
|
|
131
|
-
|
|
132
23
|
| Failure mode | SCALE mechanism |
|
|
133
24
|
| --- | --- |
|
|
134
25
|
| Agent says tests passed without running them | Verification profiles and evidence stores record actual commands and results |
|
|
135
26
|
| Agent skips discovery, design, TDD, or review | `scale context`, `scale diagnose`, `scale tdd`, and `scale status` produce required next actions |
|
|
136
|
-
| Agent
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
27
|
+
| Agent accumulates uncommitted changes | Commit Discipline monitors git state with dual-threshold alerts and file grouping suggestions |
|
|
28
|
+
| Agent stages unrelated files or edits wrong repo | Review-gated shipping, MOE workspace rules, and child repo blockers control boundaries |
|
|
29
|
+
| Multi-session parallel work causes conflicts | Session Coordinator detects file overlaps, records conflicts, resolves dependency ordering |
|
|
30
|
+
| Multi-repo Git workflow is chaotic | Cross-Repo Orchestrator coordinates branches, merge plans, and ship pipelines across repos |
|
|
140
31
|
|
|
141
32
|
## See It In 3 Minutes
|
|
142
33
|
|
|
@@ -159,35 +50,13 @@ This generates governance files you can commit to a project:
|
|
|
159
50
|
Continue with a full workflow loop:
|
|
160
51
|
|
|
161
52
|
```bash
|
|
162
|
-
scale context
|
|
163
|
-
scale
|
|
164
|
-
scale
|
|
165
|
-
scale tdd slice --task-id 2026-05-18-oauth-hardening --behavior "reject expired OAuth state" --public-interface "GET /oauth/callback" --failing-test "expired state returns 401" --test-file tests/oauth.test.ts --impl-files src/oauth.ts
|
|
166
|
-
scale artifact render --task-id 2026-05-18-oauth-hardening --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
167
|
-
scale artifact doctor --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
53
|
+
scale context grill --task-id TASK-001 --task "Harden OAuth callback"
|
|
54
|
+
scale diagnose plan --task-id TASK-001 --symptom "callback returns 500 when state expires"
|
|
55
|
+
scale tdd slice --task-id TASK-001 --behavior "reject expired OAuth state" --failing-test "expired state returns 401"
|
|
168
56
|
```
|
|
169
57
|
|
|
170
58
|
Read [Quickstart](docs/start/quickstart.md) and [Agent Governance Demo](docs/start/agent-governance-demo.md) for the complete walkthrough.
|
|
171
59
|
|
|
172
|
-
## Who It Is For
|
|
173
|
-
|
|
174
|
-
- Teams using Codex, Claude Code, Cursor, Gemini CLI, OpenCode, Aider, or similar agents on real projects.
|
|
175
|
-
- Teams with multi-service, multi-repository, MOE workspace, frontend/backend, or scaffold governance needs.
|
|
176
|
-
- Teams that want agents to actively use skills, MCPs, CLIs, browser automation, E2E checks, and HTML reports with safety boundaries.
|
|
177
|
-
- Project owners who feel AI code is fast but hard to review, verify, and maintain.
|
|
178
|
-
|
|
179
|
-
It is not optimized for toy projects that only want one minimal prompt file and do not need gates, collaboration rules, or long-term maintainability.
|
|
180
|
-
|
|
181
|
-
## Core Capabilities
|
|
182
|
-
|
|
183
|
-
- Workflow Engine: `define -> plan -> build -> verify -> review -> ship` with persisted state.
|
|
184
|
-
- GateSystem: build, lint, test, coverage, security, TDD, review, and tool evidence gates.
|
|
185
|
-
- Governance Packs: `standard`, `project-scaffold`, `moe-workspace`, `resource-governance`, `go-service-matrix`, `node-library`, and `frontend-app`.
|
|
186
|
-
- Resource Governance: docs, media, reports, test scripts, temporary scripts, HTML artifacts, and local config lifecycle rules.
|
|
187
|
-
- Skill and Tool Orchestration: UI/UX, web research, browser E2E, Chrome DevTools MCP, desktop automation, and external agent CLIs.
|
|
188
|
-
- Engineering Standards: noisy logs, sensitive data, injection risks, ORM/database usage, framework boundaries, test rigor, and deployment risk.
|
|
189
|
-
- HTML Artifacts: Markdown remains the maintained source; HTML becomes the review, comparison, status, and release handoff layer.
|
|
190
|
-
|
|
191
60
|
## Installation
|
|
192
61
|
|
|
193
62
|
```bash
|
|
@@ -197,262 +66,103 @@ scale --version
|
|
|
197
66
|
|
|
198
67
|
Node.js 20 or newer is required.
|
|
199
68
|
|
|
200
|
-
##
|
|
201
|
-
|
|
202
|
-
Use `scale init` to install a governed workflow into an existing project:
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
scale init --governance-pack standard
|
|
206
|
-
scale init --governance-pack project-scaffold
|
|
207
|
-
scale init --governance-pack moe-workspace
|
|
208
|
-
scale init --governance-pack resource-governance
|
|
209
|
-
scale init --governance-pack go-service-matrix
|
|
210
|
-
scale init --governance-pack node-library
|
|
211
|
-
scale init --governance-pack frontend-app
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Supported packs:
|
|
215
|
-
|
|
216
|
-
| Pack | Best fit |
|
|
217
|
-
| --- | --- |
|
|
218
|
-
| `standard` | General project governance with task artifacts, verification, metrics, resources, standards, and skills policy |
|
|
219
|
-
| `project-scaffold` | Reproducible engineering workflow scaffold and demo governance project |
|
|
220
|
-
| `moe-workspace` | Parent workspace with independent child repositories or MOE-style multi-repo development |
|
|
221
|
-
| `resource-governance` | Asset/document lifecycle policy for docs, reports, screenshots, scripts, media, and generated outputs |
|
|
222
|
-
| `go-service-matrix` | Go backend services with service-aware build/lint/test/security verification |
|
|
223
|
-
| `node-library` | Node/TypeScript package workflow, release, and verification governance |
|
|
224
|
-
| `frontend-app` | UI/UX, browser evidence, responsive checks, E2E, and visual review governance |
|
|
225
|
-
|
|
226
|
-
If you are unsure, start with `standard`. Use a specialized pack when the project shape is clear:
|
|
227
|
-
|
|
228
|
-
See [Getting Started](docs/start/README.md) for runnable tutorials and demo paths.
|
|
229
|
-
|
|
230
|
-
## Workflow Upgrade
|
|
231
|
-
|
|
232
|
-
Do not rerun `scale init` as a blind upgrade command in existing projects. Use the guarded upgrade flow:
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
scale upgrade check --dir . --lang en
|
|
236
|
-
scale upgrade plan --dir . --html --lang en
|
|
237
|
-
scale upgrade apply --dir . --confirm --lang en
|
|
238
|
-
scale upgrade rollback --dir . --lang en
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
If the upgrade plan says the AI OS runtime has not been adopted yet, run:
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
scale ai-os adopt --dir . --task "Adopt AI OS runtime" --lang en
|
|
245
|
-
```
|
|
69
|
+
## Who It Is For
|
|
246
70
|
|
|
247
|
-
|
|
71
|
+
- Teams using Codex, Claude Code, Cursor, Gemini CLI, OpenCode, Aider, or similar agents on real projects.
|
|
72
|
+
- Teams with multi-service, multi-repository, MOE workspace, or frontend/backend needs.
|
|
73
|
+
- Teams that want agents to actively use skills, MCPs, CLIs, and browser automation with safety boundaries.
|
|
74
|
+
- Project owners who feel AI code is fast but hard to review, verify, and maintain.
|
|
248
75
|
|
|
249
|
-
|
|
76
|
+
## Core Capabilities
|
|
250
77
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
78
|
+
| Capability | Description |
|
|
79
|
+
|------|------|
|
|
80
|
+
| **Workflow Engine** | `define -> plan -> build -> verify -> review -> ship` phased delivery FSM |
|
|
81
|
+
| **Gate System** | build, lint, test, coverage, security, TDD, review gates |
|
|
82
|
+
| **AI OS Runtime** | `scale ai-os plan/run/status` — task planning, governed execution, dashboard |
|
|
83
|
+
| **Commit Discipline** | Monitors git state, dual-threshold alerts, auto-groups uncommitted files |
|
|
84
|
+
| **Session Coordinator** | Multi-session parallel coordination, file overlap detection, conflict recording |
|
|
85
|
+
| **Cross-Repo Orchestrator** | Multi-repo Git workflow orchestration, coordinated branch/merge/ship |
|
|
86
|
+
| **Task Dependency Graph** | DAG dependency declaration, topological sort, cycle detection |
|
|
87
|
+
| **Ship Pipeline** | 8-step ship closure with dry-run, skip, version bump |
|
|
88
|
+
| **Security Audit** | OWASP Top 10 + STRIDE security audit engine |
|
|
89
|
+
| **Role Skills** | 6 role-based review perspectives (eng-manager, security-reviewer, qa-lead, etc.) |
|
|
90
|
+
| **Memory Intelligence** | 6-signal quality scoring, cross-provider conflict detection, freshness decay |
|
|
91
|
+
| **Governance ROI** | End-to-end governance ROI — token cost vs quality vs gate friction |
|
|
255
92
|
|
|
256
|
-
|
|
93
|
+
## AI OS Runtime
|
|
257
94
|
|
|
258
|
-
|
|
95
|
+
AI OS Runtime is SCALE's core runtime planning layer. `scale ai-os plan` generates governance mode, Context Compiler budget, Memory Provider recall, Skill Routing execution plan, and Governance ROI in one command — so the agent knows what context to load, what capabilities to use, and what evidence to collect before starting.
|
|
259
96
|
|
|
260
97
|
```bash
|
|
261
|
-
scale
|
|
262
|
-
--
|
|
263
|
-
--
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
scale review <task-id>
|
|
269
|
-
scale ship <task-id> --message "feat(workflow): add scoped release workflow"
|
|
98
|
+
scale ai-os plan \
|
|
99
|
+
--task-id TASK-123 \
|
|
100
|
+
--task "Fix OAuth callback auth token handling and verify browser callback flow" \
|
|
101
|
+
--level L \
|
|
102
|
+
--files src/auth/oauth.ts,src/ui/callback.tsx \
|
|
103
|
+
--budget 8000 \
|
|
104
|
+
--json
|
|
270
105
|
```
|
|
271
106
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
Strict TDD evidence can be enforced when needed:
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
scale verify <task-id> --tdd-strict --tdd-evidence .scale/tdd/<task-id>.json
|
|
278
|
-
```
|
|
107
|
+
See [AI OS Runtime docs](docs/AI_ENGINEERING_OS_POSITIONING.md) for the full command reference.
|
|
279
108
|
|
|
280
|
-
|
|
109
|
+
## Learning Path
|
|
281
110
|
|
|
282
|
-
|
|
111
|
+
| Goal | Entry point | What you learn |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| Get running | [Quickstart](docs/start/quickstart.md) | Install CLI, init governance files, run preflight |
|
|
114
|
+
| See full loop | [Demo Walkthrough](docs/start/agent-governance-demo.md) | Context, diagnosis, TDD, artifact, and verification evidence |
|
|
115
|
+
| Adopt in existing project | [Workflow Upgrade Guide](docs/start/workflow-upgrade.md) | `init`, `upgrade check/plan/apply`, local `make` wrappers |
|
|
116
|
+
| Choose governance pack | [Governance Pack docs](docs/start/README.md) | Which pack fits your project shape |
|
|
117
|
+
| Maintain or extend SCALE | [docs/README.md](docs/README.md) | Documentation map, internal modules, long-term maintenance |
|
|
118
|
+
| Develop this repo | [docs/guides/GETTING_STARTED.md](docs/guides/GETTING_STARTED.md) | `scale-engine` repo's own engineering workflow |
|
|
283
119
|
|
|
284
|
-
|
|
120
|
+
## Workflow Upgrade
|
|
285
121
|
|
|
286
122
|
```bash
|
|
287
|
-
|
|
288
|
-
scale
|
|
289
|
-
|
|
290
|
-
# Run self-improve loop: Defect → Lesson → Rule → Hook
|
|
291
|
-
scale evolution improve <session-id>
|
|
292
|
-
|
|
293
|
-
# Show self-improve report
|
|
294
|
-
scale evolution report <session-id>
|
|
295
|
-
|
|
296
|
-
# View generated Hooks config
|
|
297
|
-
scale evolution hooks <session-id> --json
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
Thresholds:
|
|
301
|
-
- Lesson → Rule: requires 3 verifications
|
|
302
|
-
- Rule → Active: requires 10 hits
|
|
303
|
-
- Rule → Hook: requires 20 hits
|
|
304
|
-
|
|
305
|
-
## Safety Model
|
|
306
|
-
|
|
307
|
-
SCALE Engine uses multiple enforcement layers:
|
|
308
|
-
|
|
309
|
-
| Layer | Purpose |
|
|
310
|
-
| --- | --- |
|
|
311
|
-
| FSM | Prevents invalid artifact lifecycle transitions |
|
|
312
|
-
| GateSystem | Runs build, lint, test, coverage, and security gates |
|
|
313
|
-
| EvidenceStore | Persists verification evidence for audit and release gating |
|
|
314
|
-
| ReviewStore | Persists deterministic review records |
|
|
315
|
-
| ReviewAnalyzer | Scans diffs for high-risk code, process debt, and missing security evidence |
|
|
316
|
-
| Detectors | Detects brute retry, premature completion, blame shifting, busy loops, and related failure modes |
|
|
317
|
-
| Ship gate | Requires passing verification and review evidence before release |
|
|
318
|
-
|
|
319
|
-
The `ship` command no longer stages the whole workspace. It stages only files covered by passing review records and blocks if new reviewable files appear after review.
|
|
320
|
-
|
|
321
|
-
Git branch governance follows a GitLab Flow variant: short branches merge into `dev`, verified releases land on `master`, and production publishing is triggered by user-created `vX.Y.Z` tags on `master`. `scale ship` blocks direct governed commits on `dev`, `master`, `main`, or detached HEAD, and temporary worktree cleanup is blocked when the branch still has unpushed or unmerged commits. See [docs/GITLAB_FLOW.md](docs/GITLAB_FLOW.md).
|
|
322
|
-
|
|
323
|
-
G7 `SecurityGate` includes a lightweight built-in scan for hardcoded secrets, private keys, disabled TLS verification, `eval`/`Function`, raw HTML injection, dangerous shell commands, shell execution, and empty `catch` blocks. Compatibility mode blocks CRITICAL findings; strict mode also blocks HIGH findings.
|
|
324
|
-
|
|
325
|
-
## Skill and Tool Governance
|
|
326
|
-
|
|
327
|
-
Skill Radar recommends skills, MCP servers, browser automation, desktop automation, planning workflows, memory providers, and external CLIs by task intent. It returns confidence, safety level, evidence requirements, attribution metadata, and fallback behavior.
|
|
328
|
-
|
|
329
|
-
Third-party skills stay review-required until source, scripts, license, attribution, and pinned revision are checked. `OthmanAdi/planning-with-files` (MIT), `rohitg00/agentmemory` (Apache-2.0), and `garrytan/gbrain` (MIT) have explicit attribution records; other external skills, MCP servers, CLIs, adapters, and discovery candidates are tracked in the [External Reference Inventory](docs/EXTERNAL_REFERENCES.md) with unknown licenses kept `review-required`. SCALE records them as governed references, optional integrations, or adapted concepts; it does not vendor upstream source code.
|
|
330
|
-
|
|
331
|
-
Memory is provider-routed rather than expanded as a built-in Memory OS. Agents can use `scale memory provider status` and `scale memory provider recall` to select `agentmemory`, `gbrain`, or `scale-local` under policy; external providers are read-only by default and fall back to local evidence-backed memory.
|
|
332
|
-
|
|
333
|
-
See [Skill Radar](docs/SKILL_RADAR.md), [Third-Party Skills](docs/THIRD_PARTY_SKILLS.md), and [External Reference Inventory](docs/EXTERNAL_REFERENCES.md).
|
|
334
|
-
|
|
335
|
-
## Supported Platforms
|
|
336
|
-
|
|
337
|
-
SCALE Engine includes adapters for 22 agent platforms, including Claude Code, Codex CLI, OpenCode, Cursor, Gemini CLI, OpenClaw, Hermes, Trae, WorkBuddy, VS Code Copilot CLI, QCoder, Qoder, JCode, DeepSeek-TUI, Aider, Windsurf, Kiro, Cline, Kilo Code, Antigravity, Kimi, and Doubao.
|
|
338
|
-
|
|
339
|
-
It also includes 12 professional agent profiles:
|
|
340
|
-
|
|
341
|
-
- frontend
|
|
342
|
-
- backend
|
|
343
|
-
- testing
|
|
344
|
-
- UI design
|
|
345
|
-
- operations
|
|
346
|
-
- product
|
|
347
|
-
- code review
|
|
348
|
-
- security
|
|
349
|
-
- database
|
|
350
|
-
- performance
|
|
351
|
-
- documentation
|
|
352
|
-
- architecture
|
|
353
|
-
|
|
354
|
-
## Project Layout
|
|
355
|
-
|
|
356
|
-
```text
|
|
357
|
-
src/api/cli.ts CLI entrypoint
|
|
358
|
-
src/cli/phaseCommands.ts DEFINE/PLAN/BUILD/VERIFY/REVIEW/SHIP
|
|
359
|
-
src/cli/evolutionCommands.ts L6 Evolution CLI commands
|
|
360
|
-
src/workflow/gates/ Quality gates and persisted evidence
|
|
361
|
-
src/workflow/ReviewAnalyzer.ts Deterministic review analysis
|
|
362
|
-
src/workflow/ReviewStore.ts Review record persistence
|
|
363
|
-
src/workflow/EvidenceStore.ts Gate evidence persistence
|
|
364
|
-
src/workflow/evolution/ LessonExtractor + SelfImproveEngine
|
|
365
|
-
src/workflow/qa/ BrowserQA + E2ETestRunner
|
|
366
|
-
src/artifact/ Artifact store and FSM definitions
|
|
367
|
-
src/guardrails/ Detector and gateway logic
|
|
368
|
-
src/guardrails/OWASPDetector.ts OWASP Top 10 security detection
|
|
369
|
-
src/capabilities/BrowserQACapability.ts Playwright MCP wrapper
|
|
370
|
-
src/evolution/ Defect/Lesson/Rule/Hook evolution layer
|
|
371
|
-
tests/ Vitest test suites
|
|
123
|
+
scale upgrade check --dir . --lang en
|
|
124
|
+
scale upgrade plan --dir . --html --lang en
|
|
125
|
+
scale upgrade apply --dir . --confirm --lang en
|
|
372
126
|
```
|
|
373
127
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
```bash
|
|
377
|
-
npm install
|
|
378
|
-
npm run build
|
|
379
|
-
npx vitest run
|
|
380
|
-
npm pack --dry-run
|
|
381
|
-
```
|
|
128
|
+
SCALE splits upgrades into three layers: the CLI itself, generated governance pack files, and third-party skills/MCP/CLI capabilities. It only checks and generates plans by default — it never auto-overwrites user-edited files. See [Workflow Upgrade Guide](docs/start/workflow-upgrade.md).
|
|
382
129
|
|
|
383
|
-
|
|
130
|
+
## Developing This Repo
|
|
384
131
|
|
|
385
132
|
```bash
|
|
386
|
-
|
|
387
|
-
|
|
133
|
+
make preflight
|
|
134
|
+
make gate-workflow
|
|
135
|
+
make gate-quality
|
|
136
|
+
make verify PROFILE=default
|
|
388
137
|
```
|
|
389
138
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
- Added Context Budget and Progressive Governance so low-risk S tasks stay lightweight while auth, data, security, deployment, and cross-module changes escalate automatically.
|
|
395
|
-
- Added Code Intelligence with adapter-first CodeGraph / Graphify support, explicit fallback, impact analysis, context recommendations, and exploration ROI.
|
|
396
|
-
- Added Workflow Eval, Failure Replay, and improvement candidates with pass@k, fix iterations, tool-call counts, token estimates, and human-correction metrics.
|
|
397
|
-
- Added Skill Radar for intent-based skills, MCP, browser, desktop automation, and external CLI recommendations with confidence, safety level, and evidence requirements.
|
|
398
|
-
- Added Memory Brain for evidence-backed long-term memory candidates, contradiction detection, dream maintenance, explicit promotion, and failure replay ingestion.
|
|
399
|
-
- Added Governance Dashboard to summarize runtime, eval, memory, resource, and HTML artifact evidence in a local HTML review surface.
|
|
400
|
-
- Fixed new `--dir` aware commands so relative `.scale` state resolves inside the target project instead of the caller workspace.
|
|
401
|
-
|
|
402
|
-
### v0.19.0
|
|
403
|
-
|
|
404
|
-
- Added product smoke gates, runtime evidence learning settlement, memory context packs, workspace conflict blockers, and release-readiness demo coverage.
|
|
139
|
+
Entry docs:
|
|
140
|
+
- [docs/guides/GETTING_STARTED.md](docs/guides/GETTING_STARTED.md) — 15-minute onboarding
|
|
141
|
+
- [docs/guides/DEVELOPMENT_WORKFLOW.md](docs/guides/DEVELOPMENT_WORKFLOW.md) — daily dev loop
|
|
142
|
+
- [docs/workflow/README.md](docs/workflow/README.md) — gates, branch policy, upgrade entry
|
|
405
143
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
- Governed HTML artifacts: `scale artifact render/doctor/settle/open`.
|
|
409
|
-
- Markdown remains the editable source of truth; generated HTML is traceable task evidence.
|
|
410
|
-
- Governance packs now include output policy and HTML artifact resource classification.
|
|
411
|
-
- Added tests for HTML artifact rendering, safety checks, settlement evidence, and generated template output.
|
|
412
|
-
|
|
413
|
-
### v0.17.0
|
|
414
|
-
|
|
415
|
-
- Added active workflow command gates: `scale context`, `scale diagnose`, `scale tdd`, and `scale status`.
|
|
416
|
-
- Added required next-action queues so agents cannot silently skip context, debugging, TDD, or verification work.
|
|
417
|
-
|
|
418
|
-
### v0.16.0
|
|
419
|
-
|
|
420
|
-
- Added governed skill repository, skill recommendation, install-safety checks, visual Vibe templates, and leadership presets.
|
|
421
|
-
- Strengthened tool orchestration and resource/engineering standards governance.
|
|
422
|
-
|
|
423
|
-
### v0.15.1
|
|
424
|
-
|
|
425
|
-
- Added UI/UX, web research, browser automation, desktop automation, and external Agent CLI routing contracts.
|
|
426
|
-
- Added resource governance and engineering standards governance for generated project packs.
|
|
427
|
-
|
|
428
|
-
### v0.11.1
|
|
144
|
+
## Community
|
|
429
145
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
-
|
|
435
|
-
- ReviewAnalyzer regex fix: avoid false positives on pattern definitions
|
|
436
|
-
- Vitest suite covered in release verification
|
|
146
|
+
| Platform | Link | Purpose |
|
|
147
|
+
| --- | --- | --- |
|
|
148
|
+
| GitHub | https://github.com/hongmaple0820/scale-engine | Source, issues, and PRs |
|
|
149
|
+
| Gitee | https://gitee.com/hongmaple/scale-engine | China mirror and feedback |
|
|
150
|
+
| npm | https://www.npmjs.com/package/@hongmaple0820/scale-engine | CLI package |
|
|
437
151
|
|
|
438
|
-
|
|
152
|
+
<p align="center">
|
|
153
|
+
<img src="image/wechat-public.jpg" alt="SCALE Engine WeChat public account" width="220" />
|
|
154
|
+
</p>
|
|
439
155
|
|
|
440
|
-
|
|
441
|
-
- Added `ship --no-commit` delivery reports for reviewable output without creating a Git commit.
|
|
442
|
-
- Added optional strict TDD evidence verification with `--tdd-evidence` and `--tdd-strict`.
|
|
443
|
-
- Added richer command evidence metadata: working directory, timestamps, stdout/stderr tails, and output hashes.
|
|
444
|
-
- Hardened deterministic review scanning for empty `catch`, `@ts-ignore`, focused tests, dangerous shell/Git commands, and security-sensitive changes without G7 evidence.
|
|
445
|
-
- Hardened built-in G7 security scanning with explainable file/line evidence and compatibility vs strict blocking modes.
|
|
446
|
-
- Added CLI/unit regression tests for `review -> ship`, unreviewed-file blocking, and security-scanner false-positive boundaries.
|
|
447
|
-
- Verified `npm run build`, full Vitest suite, and `npm pack --dry-run` before release.
|
|
156
|
+
## Sponsorship
|
|
448
157
|
|
|
449
|
-
|
|
158
|
+
If SCALE Engine saves engineering governance time for your team, or helps move AI-agent work into a verifiable, reviewable, and releasable loop, voluntary sponsorship is welcome. Sponsorship supports maintenance, examples, documentation, test coverage, and community support.
|
|
450
159
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
160
|
+
<p align="center">
|
|
161
|
+
<img src="image/wxPay.jpg" alt="Sponsor with WeChat Pay" width="220" />
|
|
162
|
+
|
|
163
|
+
<img src="image/zfb.jpg" alt="Sponsor with Alipay" width="220" />
|
|
164
|
+
</p>
|
|
455
165
|
|
|
456
166
|
## License
|
|
457
167
|
|
|
458
|
-
MIT
|
|
168
|
+
[MIT](LICENSE)
|