@hongmaple0820/scale-engine 0.17.0 → 0.19.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 +296 -237
- package/README.md +157 -63
- package/dist/api/cli.js +661 -33
- package/dist/api/cli.js.map +1 -1
- package/dist/api/doctor.d.ts +5 -1
- package/dist/api/doctor.js +130 -1
- package/dist/api/doctor.js.map +1 -1
- package/dist/api/quickstart.d.ts +3 -0
- package/dist/api/quickstart.js +12 -4
- package/dist/api/quickstart.js.map +1 -1
- package/dist/cli/phaseCommands.js +7 -0
- package/dist/cli/phaseCommands.js.map +1 -1
- package/dist/core/logger.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/memory/MemoryFabric.d.ts +118 -0
- package/dist/memory/MemoryFabric.js +281 -0
- package/dist/memory/MemoryFabric.js.map +1 -0
- package/dist/memory/MemoryLearning.d.ts +61 -0
- package/dist/memory/MemoryLearning.js +203 -0
- package/dist/memory/MemoryLearning.js.map +1 -0
- package/dist/memory/index.d.ts +2 -0
- package/dist/memory/index.js +3 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/output/HTMLArtifactLayer.d.ts +97 -0
- package/dist/output/HTMLArtifactLayer.js +576 -0
- package/dist/output/HTMLArtifactLayer.js.map +1 -0
- package/dist/output/index.d.ts +2 -0
- package/dist/output/index.js +1 -0
- package/dist/output/index.js.map +1 -1
- package/dist/prompts/VibeTemplateGallery.js +121 -121
- package/dist/runtime/FinalReportGuard.d.ts +16 -0
- package/dist/runtime/FinalReportGuard.js +14 -0
- package/dist/runtime/FinalReportGuard.js.map +1 -0
- package/dist/runtime/RuntimeDoctor.d.ts +23 -0
- package/dist/runtime/RuntimeDoctor.js +151 -0
- package/dist/runtime/RuntimeDoctor.js.map +1 -0
- package/dist/runtime/RuntimeEvidenceLedger.d.ts +50 -0
- package/dist/runtime/RuntimeEvidenceLedger.js +89 -0
- package/dist/runtime/RuntimeEvidenceLedger.js.map +1 -0
- package/dist/runtime/SessionLedger.d.ts +53 -0
- package/dist/runtime/SessionLedger.js +104 -0
- package/dist/runtime/SessionLedger.js.map +1 -0
- package/dist/runtime/index.d.ts +4 -0
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/skills/routing/SkillGate.js +26 -2
- package/dist/skills/routing/SkillGate.js.map +1 -1
- package/dist/skills/routing/SkillPolicy.js +2 -2
- package/dist/skills/routing/SkillPolicy.js.map +1 -1
- package/dist/tools/ToolCapabilityRegistry.d.ts +1 -1
- package/dist/tools/ToolCapabilityRegistry.js +4 -4
- package/dist/tools/ToolCapabilityRegistry.js.map +1 -1
- package/dist/tools/ToolOrchestrator.js +5 -1
- package/dist/tools/ToolOrchestrator.js.map +1 -1
- package/dist/workflow/EngineeringStandards.js +69 -66
- package/dist/workflow/EngineeringStandards.js.map +1 -1
- package/dist/workflow/GovernanceTemplatePacks.d.ts +1 -1
- package/dist/workflow/GovernanceTemplatePacks.js +137 -79
- package/dist/workflow/GovernanceTemplatePacks.js.map +1 -1
- package/dist/workflow/GovernanceTemplates.d.ts +1 -1
- package/dist/workflow/GovernanceTemplates.js +494 -199
- package/dist/workflow/GovernanceTemplates.js.map +1 -1
- package/dist/workflow/ResourceGovernance.js +29 -19
- package/dist/workflow/ResourceGovernance.js.map +1 -1
- package/dist/workflow/VerificationCommands.d.ts +11 -0
- package/dist/workflow/VerificationCommands.js +2 -0
- package/dist/workflow/VerificationCommands.js.map +1 -1
- package/dist/workflow/VerificationProfile.d.ts +2 -1
- package/dist/workflow/VerificationProfile.js +3 -0
- package/dist/workflow/VerificationProfile.js.map +1 -1
- package/dist/workflow/WorkflowArtifactWriter.js +2 -1
- package/dist/workflow/WorkflowArtifactWriter.js.map +1 -1
- package/dist/workflow/WorkflowEngine.js +4 -1
- package/dist/workflow/WorkflowEngine.js.map +1 -1
- package/dist/workflow/WorkspaceSafety.d.ts +9 -0
- package/dist/workflow/WorkspaceSafety.js +49 -0
- package/dist/workflow/WorkspaceSafety.js.map +1 -0
- package/dist/workflow/gates/GateSystem.d.ts +12 -1
- package/dist/workflow/gates/GateSystem.js +106 -0
- package/dist/workflow/gates/GateSystem.js.map +1 -1
- package/dist/workflow/types.d.ts +1 -1
- package/docs/MEMORY_FABRIC.md +107 -0
- package/docs/README.md +68 -0
- package/docs/RUNTIME_EVIDENCE.md +101 -0
- package/docs/start/README.md +42 -0
- package/docs/start/agent-governance-demo.md +107 -0
- package/docs/start/quickstart.md +127 -0
- package/examples/demo-projects/agent-governance-demo/README.md +37 -0
- package/examples/demo-projects/agent-governance-demo/package.json +16 -0
- package/examples/demo-projects/agent-governance-demo/src/oauth-state.ts +39 -0
- package/examples/demo-projects/agent-governance-demo/tests/oauth-state.test.ts +52 -0
- package/package.json +8 -3
package/README.en.md
CHANGED
|
@@ -1,237 +1,296 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="https://img.shields.io/badge/version-0.
|
|
3
|
-
<img src="https://img.shields.io/badge/platforms-16-blue?style=flat-square" alt="platforms" />
|
|
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
|
-
<img src="https://img.shields.io/badge/tests-
|
|
8
|
-
<img src="https://img.shields.io/badge/npm-0.
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
# SCALE Engine v0.
|
|
12
|
-
|
|
13
|
-
SCALE Engine
|
|
14
|
-
|
|
15
|
-
Repository: https://github.com/hongmaple0820/scale-engine
|
|
16
|
-
Mirror: https://gitee.com/hongmaple/scale-engine
|
|
17
|
-
npm: https://www.npmjs.com/package/@hongmaple0820/scale-engine
|
|
18
|
-
Language: [English](README.en.md) | [Chinese](README.md)
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
scale
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
##
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://img.shields.io/badge/version-0.18.0-orange?style=flat-square" alt="version" />
|
|
3
|
+
<img src="https://img.shields.io/badge/platforms-16-blue?style=flat-square" alt="platforms" />
|
|
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
|
+
<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.18.0-cb3837?style=flat-square&logo=npm" alt="npm" />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
# SCALE Engine v0.18.0
|
|
12
|
+
|
|
13
|
+
SCALE Engine makes AI coding agents follow engineering rules through executable workflow gates, evidence files, and review constraints 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
|
+
Repository: https://github.com/hongmaple0820/scale-engine
|
|
16
|
+
Mirror: https://gitee.com/hongmaple/scale-engine
|
|
17
|
+
npm: https://www.npmjs.com/package/@hongmaple0820/scale-engine
|
|
18
|
+
Language: [English](README.en.md) | [Chinese](README.md)
|
|
19
|
+
|
|
20
|
+
## What It Solves
|
|
21
|
+
|
|
22
|
+
AI coding becomes hard when agents must behave consistently across real teams and real repositories:
|
|
23
|
+
|
|
24
|
+
| Failure mode | SCALE mechanism |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| Agent says tests passed without running them | Verification profiles and evidence stores record actual commands and results |
|
|
27
|
+
| Agent skips discovery, design, TDD, or review | `scale context`, `scale diagnose`, `scale tdd`, and `scale status` produce required next actions |
|
|
28
|
+
| Agent stages unrelated files or edits the wrong repository | Review-gated shipping, MOE workspace rules, and child repository blockers control boundaries |
|
|
29
|
+
| Docs, screenshots, reports, scripts, and temporary files become unmaintainable | Resource governance classifies maintained assets, task evidence, temporary outputs, and forbidden commits |
|
|
30
|
+
| Noisy logs, secrets, ORM misuse, framework violations, or security risks slip through | Engineering standards and OWASP scans produce traceable findings |
|
|
31
|
+
| Long Markdown reports are not read | `scale artifact` renders traceable HTML reports from maintained Markdown sources |
|
|
32
|
+
|
|
33
|
+
## See It In 3 Minutes
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g @hongmaple0820/scale-engine
|
|
37
|
+
mkdir scale-demo && cd scale-demo
|
|
38
|
+
scale init --governance-pack standard
|
|
39
|
+
scale preflight --preflight-profile quick
|
|
40
|
+
scale status
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This generates governance files you can commit to a project:
|
|
44
|
+
|
|
45
|
+
- `.scale/verification.json`: service matrix and verification profiles
|
|
46
|
+
- `.scale/skills.json`: skill routing and evidence requirements
|
|
47
|
+
- `.scale/tools.json`: CLI/MCP/browser/desktop orchestration policy
|
|
48
|
+
- `docs/workflow/templates/`: Mini-PRD, plan, verification, review, and summary templates
|
|
49
|
+
- `docs/standards/`: engineering, Git collaboration, and resource governance rules
|
|
50
|
+
|
|
51
|
+
Continue with a full workflow loop:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
scale context init --name "Scale Demo"
|
|
55
|
+
scale context grill --task-id 2026-05-18-oauth-hardening --task "Harden OAuth callback"
|
|
56
|
+
scale diagnose plan --task-id 2026-05-18-oauth-hardening --symptom "callback returns 500 when state expires"
|
|
57
|
+
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
|
|
58
|
+
scale artifact render --task-id 2026-05-18-oauth-hardening --artifact-dir docs/worklog/tasks/2026-05-18-oauth-hardening
|
|
59
|
+
scale artifact doctor --artifact-dir docs/worklog/tasks/2026-05-18-oauth-hardening
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Read [Quickstart](docs/start/quickstart.md) and [Agent Governance Demo](docs/start/agent-governance-demo.md) for the complete walkthrough.
|
|
63
|
+
|
|
64
|
+
## Who It Is For
|
|
65
|
+
|
|
66
|
+
- Teams using Codex, Claude Code, Cursor, Gemini CLI, OpenCode, Aider, or similar agents on real projects.
|
|
67
|
+
- Teams with multi-service, multi-repository, MOE workspace, frontend/backend, or scaffold governance needs.
|
|
68
|
+
- Teams that want agents to actively use skills, MCPs, CLIs, browser automation, E2E checks, and HTML reports with safety boundaries.
|
|
69
|
+
- Project owners who feel AI code is fast but hard to review, verify, and maintain.
|
|
70
|
+
|
|
71
|
+
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.
|
|
72
|
+
|
|
73
|
+
## Core Capabilities
|
|
74
|
+
|
|
75
|
+
- Workflow Engine: `define -> plan -> build -> verify -> review -> ship` with persisted state.
|
|
76
|
+
- GateSystem: build, lint, test, coverage, security, TDD, review, and tool evidence gates.
|
|
77
|
+
- Governance Packs: `standard`, `project-scaffold`, `moe-workspace`, `resource-governance`, `go-service-matrix`, `node-library`, and `frontend-app`.
|
|
78
|
+
- Resource Governance: docs, media, reports, test scripts, temporary scripts, HTML artifacts, and local config lifecycle rules.
|
|
79
|
+
- Skill and Tool Orchestration: UI/UX, web research, browser E2E, Chrome DevTools MCP, desktop automation, and external agent CLIs.
|
|
80
|
+
- Engineering Standards: noisy logs, sensitive data, injection risks, ORM/database usage, framework boundaries, test rigor, and deployment risk.
|
|
81
|
+
- HTML Artifacts: Markdown remains the maintained source; HTML becomes the review, comparison, status, and release handoff layer.
|
|
82
|
+
|
|
83
|
+
## Installation
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install -g @hongmaple0820/scale-engine
|
|
87
|
+
scale --version
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Node.js 20 or newer is required.
|
|
91
|
+
|
|
92
|
+
## Governance Packs
|
|
93
|
+
|
|
94
|
+
Use `scale init` to install a governed workflow into an existing project:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
scale init --governance-pack standard
|
|
98
|
+
scale init --governance-pack project-scaffold
|
|
99
|
+
scale init --governance-pack moe-workspace
|
|
100
|
+
scale init --governance-pack resource-governance
|
|
101
|
+
scale init --governance-pack go-service-matrix
|
|
102
|
+
scale init --governance-pack node-library
|
|
103
|
+
scale init --governance-pack frontend-app
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Supported packs:
|
|
107
|
+
|
|
108
|
+
| Pack | Best fit |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| `standard` | General project governance with task artifacts, verification, metrics, resources, standards, and skills policy |
|
|
111
|
+
| `project-scaffold` | Reproducible engineering workflow scaffold and demo governance project |
|
|
112
|
+
| `moe-workspace` | Parent workspace with independent child repositories or MOE-style multi-repo development |
|
|
113
|
+
| `resource-governance` | Asset/document lifecycle policy for docs, reports, screenshots, scripts, media, and generated outputs |
|
|
114
|
+
| `go-service-matrix` | Go backend services with service-aware build/lint/test/security verification |
|
|
115
|
+
| `node-library` | Node/TypeScript package workflow, release, and verification governance |
|
|
116
|
+
| `frontend-app` | UI/UX, browser evidence, responsive checks, E2E, and visual review governance |
|
|
117
|
+
|
|
118
|
+
If you are unsure, start with `standard`. Use a specialized pack when the project shape is clear:
|
|
119
|
+
|
|
120
|
+
See [Getting Started](docs/start/README.md) for runnable tutorials and demo paths.
|
|
121
|
+
|
|
122
|
+
## Phase Workflow
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
scale define "Scoped release workflow" \
|
|
126
|
+
--description "Implement a TypeScript CLI workflow with verification evidence, review records, rollback constraints, and release safety checks." \
|
|
127
|
+
--success-criteria "verify evidence is persisted,review evidence is persisted,ship blocks unreviewed files"
|
|
128
|
+
|
|
129
|
+
scale plan <spec-id> --rollback "Revert the release commit and remove generated artifacts"
|
|
130
|
+
scale build <plan-id> --description "Implement scoped release workflow"
|
|
131
|
+
scale verify <task-id>
|
|
132
|
+
scale review <task-id>
|
|
133
|
+
scale ship <task-id> --message "feat(workflow): add scoped release workflow"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Use `scale ship <task-id> --no-commit` to generate the delivery report without creating a Git commit.
|
|
137
|
+
|
|
138
|
+
Strict TDD evidence can be enforced when needed:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
scale verify <task-id> --tdd-strict --tdd-evidence .scale/tdd/<task-id>.json
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The TDD evidence JSON must include `red`, `green`, `refactor`, and `testFirst` set to `true`.
|
|
145
|
+
|
|
146
|
+
## Evolution Self-Improve Loop
|
|
147
|
+
|
|
148
|
+
Extract lessons from session defects and promote to rules and hooks:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Extract Lessons from session
|
|
152
|
+
scale evolution extract <session-id>
|
|
153
|
+
|
|
154
|
+
# Run self-improve loop: Defect → Lesson → Rule → Hook
|
|
155
|
+
scale evolution improve <session-id>
|
|
156
|
+
|
|
157
|
+
# Show self-improve report
|
|
158
|
+
scale evolution report <session-id>
|
|
159
|
+
|
|
160
|
+
# View generated Hooks config
|
|
161
|
+
scale evolution hooks <session-id> --json
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Thresholds:
|
|
165
|
+
- Lesson → Rule: requires 3 verifications
|
|
166
|
+
- Rule → Active: requires 10 hits
|
|
167
|
+
- Rule → Hook: requires 20 hits
|
|
168
|
+
|
|
169
|
+
## Safety Model
|
|
170
|
+
|
|
171
|
+
SCALE Engine uses multiple enforcement layers:
|
|
172
|
+
|
|
173
|
+
| Layer | Purpose |
|
|
174
|
+
| --- | --- |
|
|
175
|
+
| FSM | Prevents invalid artifact lifecycle transitions |
|
|
176
|
+
| GateSystem | Runs build, lint, test, coverage, and security gates |
|
|
177
|
+
| EvidenceStore | Persists verification evidence for audit and release gating |
|
|
178
|
+
| ReviewStore | Persists deterministic review records |
|
|
179
|
+
| ReviewAnalyzer | Scans diffs for high-risk code, process debt, and missing security evidence |
|
|
180
|
+
| Detectors | Detects brute retry, premature completion, blame shifting, busy loops, and related failure modes |
|
|
181
|
+
| Ship gate | Requires passing verification and review evidence before release |
|
|
182
|
+
|
|
183
|
+
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.
|
|
184
|
+
|
|
185
|
+
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.
|
|
186
|
+
|
|
187
|
+
## Supported Platforms
|
|
188
|
+
|
|
189
|
+
SCALE Engine includes adapters for 16 agent platforms, including Claude Code, Codex CLI, OpenCode, Cursor, Gemini CLI, OpenClaw, Hermes, Trae, WorkBuddy, VS Code Copilot CLI, QCoder, DeepSeek-TUI, Aider, Windsurf, Kimi, and Doubao.
|
|
190
|
+
|
|
191
|
+
It also includes 12 professional agent profiles:
|
|
192
|
+
|
|
193
|
+
- frontend
|
|
194
|
+
- backend
|
|
195
|
+
- testing
|
|
196
|
+
- UI design
|
|
197
|
+
- operations
|
|
198
|
+
- product
|
|
199
|
+
- code review
|
|
200
|
+
- security
|
|
201
|
+
- database
|
|
202
|
+
- performance
|
|
203
|
+
- documentation
|
|
204
|
+
- architecture
|
|
205
|
+
|
|
206
|
+
## Project Layout
|
|
207
|
+
|
|
208
|
+
```text
|
|
209
|
+
src/api/cli.ts CLI entrypoint
|
|
210
|
+
src/cli/phaseCommands.ts DEFINE/PLAN/BUILD/VERIFY/REVIEW/SHIP
|
|
211
|
+
src/cli/evolutionCommands.ts L6 Evolution CLI commands
|
|
212
|
+
src/workflow/gates/ Quality gates and persisted evidence
|
|
213
|
+
src/workflow/ReviewAnalyzer.ts Deterministic review analysis
|
|
214
|
+
src/workflow/ReviewStore.ts Review record persistence
|
|
215
|
+
src/workflow/EvidenceStore.ts Gate evidence persistence
|
|
216
|
+
src/workflow/evolution/ LessonExtractor + SelfImproveEngine
|
|
217
|
+
src/workflow/qa/ BrowserQA + E2ETestRunner
|
|
218
|
+
src/artifact/ Artifact store and FSM definitions
|
|
219
|
+
src/guardrails/ Detector and gateway logic
|
|
220
|
+
src/guardrails/OWASPDetector.ts OWASP Top 10 security detection
|
|
221
|
+
src/capabilities/BrowserQACapability.ts Playwright MCP wrapper
|
|
222
|
+
src/evolution/ Defect/Lesson/Rule/Hook evolution layer
|
|
223
|
+
tests/ Vitest test suites
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Development
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npm install
|
|
230
|
+
npm run build
|
|
231
|
+
npx vitest run
|
|
232
|
+
npm pack --dry-run
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Targeted workflow tests:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
npx vitest run tests/workflow/phaseCli.test.ts
|
|
239
|
+
npx vitest run tests/workflow/reviewAnalyzer.test.ts tests/workflow/reviewStore.test.ts tests/workflow/gateSystem.test.ts
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Release Notes
|
|
243
|
+
|
|
244
|
+
### v0.18.0
|
|
245
|
+
|
|
246
|
+
- Governed HTML artifacts: `scale artifact render/doctor/settle/open`.
|
|
247
|
+
- Markdown remains the editable source of truth; generated HTML is traceable task evidence.
|
|
248
|
+
- Governance packs now include output policy and HTML artifact resource classification.
|
|
249
|
+
- Added tests for HTML artifact rendering, safety checks, settlement evidence, and generated template output.
|
|
250
|
+
|
|
251
|
+
### v0.17.0
|
|
252
|
+
|
|
253
|
+
- Added active workflow command gates: `scale context`, `scale diagnose`, `scale tdd`, and `scale status`.
|
|
254
|
+
- Added required next-action queues so agents cannot silently skip context, debugging, TDD, or verification work.
|
|
255
|
+
|
|
256
|
+
### v0.16.0
|
|
257
|
+
|
|
258
|
+
- Added governed skill repository, skill recommendation, install-safety checks, visual Vibe templates, and leadership presets.
|
|
259
|
+
- Strengthened tool orchestration and resource/engineering standards governance.
|
|
260
|
+
|
|
261
|
+
### v0.15.1
|
|
262
|
+
|
|
263
|
+
- Added UI/UX, web research, browser automation, desktop automation, and external Agent CLI routing contracts.
|
|
264
|
+
- Added resource governance and engineering standards governance for generated project packs.
|
|
265
|
+
|
|
266
|
+
### v0.11.1
|
|
267
|
+
|
|
268
|
+
- Phase Commands FSM blocking: `canTransition` + `process.exit(1)` for guard failures
|
|
269
|
+
- OWASP Top 10 Detector: 19 security detection patterns
|
|
270
|
+
- Browser QA Capability: Playwright MCP wrapper for E2E testing
|
|
271
|
+
- L6 Evolution: `Defect → Lesson → Rule → Hook` self-improve loop
|
|
272
|
+
- Evolution CLI: `scale evolution extract/improve/report/hooks`
|
|
273
|
+
- ReviewAnalyzer regex fix: avoid false positives on pattern definitions
|
|
274
|
+
- Vitest suite covered in release verification
|
|
275
|
+
|
|
276
|
+
### v0.10.1
|
|
277
|
+
|
|
278
|
+
- Hardened `ship` so release commits stage only files covered by passing review records.
|
|
279
|
+
- Added `ship --no-commit` delivery reports for reviewable output without creating a Git commit.
|
|
280
|
+
- Added optional strict TDD evidence verification with `--tdd-evidence` and `--tdd-strict`.
|
|
281
|
+
- Added richer command evidence metadata: working directory, timestamps, stdout/stderr tails, and output hashes.
|
|
282
|
+
- Hardened deterministic review scanning for empty `catch`, `@ts-ignore`, focused tests, dangerous shell/Git commands, and security-sensitive changes without G7 evidence.
|
|
283
|
+
- Hardened built-in G7 security scanning with explainable file/line evidence and compatibility vs strict blocking modes.
|
|
284
|
+
- Added CLI/unit regression tests for `review -> ship`, unreviewed-file blocking, and security-scanner false-positive boundaries.
|
|
285
|
+
- Verified `npm run build`, full Vitest suite, and `npm pack --dry-run` before release.
|
|
286
|
+
|
|
287
|
+
### v0.10.0
|
|
288
|
+
|
|
289
|
+
- Added phase-aligned workflow commands with FSM integration.
|
|
290
|
+
- Added persisted verification evidence and review records.
|
|
291
|
+
- Published `@hongmaple0820/scale-engine@0.10.0`.
|
|
292
|
+
- Verified `npm run build`, full Vitest suite, and `npm pack --dry-run` before release.
|
|
293
|
+
|
|
294
|
+
## License
|
|
295
|
+
|
|
296
|
+
MIT
|