@hongmaple0820/scale-engine 0.21.1 → 0.23.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 +39 -13
- package/README.md +61 -31
- package/dist/api/cli.js +291 -4
- package/dist/api/cli.js.map +1 -1
- package/dist/api/doctor.d.ts +1 -0
- package/dist/api/doctor.js +83 -0
- package/dist/api/doctor.js.map +1 -1
- package/dist/artifact/types.d.ts +1 -1
- package/dist/artifact/types.js.map +1 -1
- package/dist/cli/phaseCommands.js +25 -6
- package/dist/cli/phaseCommands.js.map +1 -1
- package/dist/cli/runCommand.d.ts +39 -0
- package/dist/cli/runCommand.js +113 -0
- package/dist/cli/runCommand.js.map +1 -0
- package/dist/config/profiles.d.ts +52 -0
- package/dist/config/profiles.js +162 -0
- package/dist/config/profiles.js.map +1 -0
- package/dist/context/ContextBudget.d.ts +25 -1
- package/dist/context/ContextBudget.js +72 -7
- package/dist/context/ContextBudget.js.map +1 -1
- package/dist/context/ProjectAnatomy.d.ts +18 -0
- package/dist/context/ProjectAnatomy.js +287 -0
- package/dist/context/ProjectAnatomy.js.map +1 -0
- package/dist/dashboard/DashboardServer.d.ts +3 -0
- package/dist/dashboard/DashboardServer.js +114 -0
- package/dist/dashboard/DashboardServer.js.map +1 -1
- package/dist/hooks/BugPatternDetector.d.ts +36 -0
- package/dist/hooks/BugPatternDetector.js +207 -0
- package/dist/hooks/BugPatternDetector.js.map +1 -0
- package/dist/hooks/HookGeneratorEnhanced.js +301 -5
- package/dist/hooks/HookGeneratorEnhanced.js.map +1 -1
- package/dist/hooks/WorkflowHooksManager.js +24 -0
- package/dist/hooks/WorkflowHooksManager.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/knowledge/CerebrumManager.d.ts +25 -0
- package/dist/knowledge/CerebrumManager.js +127 -0
- package/dist/knowledge/CerebrumManager.js.map +1 -0
- package/dist/knowledge/SQLiteKnowledgeBase.d.ts +1 -0
- package/dist/knowledge/SQLiteKnowledgeBase.js +31 -3
- package/dist/knowledge/SQLiteKnowledgeBase.js.map +1 -1
- package/dist/knowledge/TfidfIndex.d.ts +50 -0
- package/dist/knowledge/TfidfIndex.js +177 -0
- package/dist/knowledge/TfidfIndex.js.map +1 -0
- package/dist/skills/SkillDiscovery.js +1 -1
- package/dist/skills/SkillDiscovery.js.map +1 -1
- package/dist/tools/CommandOutputCompressor.d.ts +28 -0
- package/dist/tools/CommandOutputCompressor.js +242 -0
- package/dist/tools/CommandOutputCompressor.js.map +1 -0
- package/dist/tools/CommandRunLedger.d.ts +77 -0
- package/dist/tools/CommandRunLedger.js +111 -0
- package/dist/tools/CommandRunLedger.js.map +1 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/workflow/EngineeringStandards.js +91 -2
- package/dist/workflow/EngineeringStandards.js.map +1 -1
- package/dist/workflow/GovernanceTemplatePacks.js +2 -2
- package/dist/workflow/GovernanceTemplates.js +90 -89
- package/dist/workflow/GovernanceTemplates.js.map +1 -1
- package/dist/workflow/TaskLevelDetector.d.ts +41 -0
- package/dist/workflow/TaskLevelDetector.js +219 -0
- package/dist/workflow/TaskLevelDetector.js.map +1 -0
- package/dist/workflow/WorkflowOrchestrator.d.ts +59 -0
- package/dist/workflow/WorkflowOrchestrator.js +326 -0
- package/dist/workflow/WorkflowOrchestrator.js.map +1 -0
- package/dist/workflow/WorkspaceLifecycle.d.ts +19 -1
- package/dist/workflow/WorkspaceLifecycle.js +119 -3
- package/dist/workflow/WorkspaceLifecycle.js.map +1 -1
- package/dist/workflow/WorkspaceTopology.d.ts +6 -0
- package/dist/workflow/WorkspaceTopology.js +17 -6
- package/dist/workflow/WorkspaceTopology.js.map +1 -1
- package/dist/workflow/gates/GateSystem.d.ts +23 -6
- package/dist/workflow/gates/GateSystem.js +114 -25
- package/dist/workflow/gates/GateSystem.js.map +1 -1
- package/dist/workflow/gates/MetaGovernanceGates.d.ts +70 -0
- package/dist/workflow/gates/MetaGovernanceGates.js +617 -0
- package/dist/workflow/gates/MetaGovernanceGates.js.map +1 -0
- package/dist/workflow/types.d.ts +6 -1
- package/docs/GITLAB_FLOW.md +125 -0
- package/docs/README.md +3 -0
- package/docs/start/README.md +29 -3
- package/docs/start/artifact-lifecycle.md +326 -0
- package/docs/start/workflow-upgrade.md +150 -0
- package/image/wechat-public.jpg +0 -0
- package/image/wxPay.jpg +0 -0
- package/image/zfb.jpg +0 -0
- package/package.json +10 -8
package/README.en.md
CHANGED
|
@@ -1,23 +1,47 @@
|
|
|
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.23.0-orange?style=flat-square" alt="version" />
|
|
3
3
|
<img src="https://img.shields.io/badge/platforms-16-blue?style=flat-square" alt="platforms" />
|
|
4
4
|
<img src="https://img.shields.io/badge/agents-12-blue?style=flat-square" alt="agents" />
|
|
5
5
|
<img src="https://img.shields.io/badge/workflows-10-green?style=flat-square" alt="workflows" />
|
|
6
6
|
<img src="https://img.shields.io/badge/detectors-19-red?style=flat-square" alt="detectors" />
|
|
7
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.
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
# SCALE Engine v0.
|
|
8
|
+
<img src="https://img.shields.io/badge/npm-0.23.0-cb3837?style=flat-square&logo=npm" alt="npm" />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
# SCALE Engine v0.23.0
|
|
12
12
|
|
|
13
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
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
|
-
##
|
|
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
|
+
## Community
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
| Platform | Link | Purpose |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| GitHub | [https://github.com/hongmaple0820/scale-engine](https://github.com/hongmaple0820/scale-engine) | Source, issues, and PRs |
|
|
27
|
+
| Gitee | [https://gitee.com/hongmaple/scale-engine](https://gitee.com/hongmaple/scale-engine) | China mirror and feedback |
|
|
28
|
+
| npm | [https://www.npmjs.com/package/@hongmaple0820/scale-engine](https://www.npmjs.com/package/@hongmaple0820/scale-engine) | CLI package |
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="image/wechat-public.jpg" alt="SCALE Engine WeChat public account" width="220" />
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
## Sponsorship
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="image/wxPay.jpg" alt="Sponsor with WeChat Pay" width="220" />
|
|
40
|
+
|
|
41
|
+
<img src="image/zfb.jpg" alt="Sponsor with Alipay" width="220" />
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
## What It Solves
|
|
21
45
|
|
|
22
46
|
AI coding becomes hard when agents must behave consistently across real teams and real repositories:
|
|
23
47
|
|
|
@@ -55,8 +79,8 @@ scale context init --name "Scale Demo"
|
|
|
55
79
|
scale context grill --task-id 2026-05-18-oauth-hardening --task "Harden OAuth callback"
|
|
56
80
|
scale diagnose plan --task-id 2026-05-18-oauth-hardening --symptom "callback returns 500 when state expires"
|
|
57
81
|
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 .planning/tasks/2026-05-18-oauth-hardening
|
|
59
|
-
scale artifact doctor --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
82
|
+
scale artifact render --task-id 2026-05-18-oauth-hardening --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
83
|
+
scale artifact doctor --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
60
84
|
```
|
|
61
85
|
|
|
62
86
|
Read [Quickstart](docs/start/quickstart.md) and [Agent Governance Demo](docs/start/agent-governance-demo.md) for the complete walkthrough.
|
|
@@ -182,6 +206,8 @@ SCALE Engine uses multiple enforcement layers:
|
|
|
182
206
|
|
|
183
207
|
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
208
|
|
|
209
|
+
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).
|
|
210
|
+
|
|
185
211
|
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
212
|
|
|
187
213
|
## Supported Platforms
|
package/README.md
CHANGED
|
@@ -1,35 +1,61 @@
|
|
|
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.23.0-orange?style=flat-square" alt="version" />
|
|
3
3
|
<img src="https://img.shields.io/badge/platforms-16-blue?style=flat-square" alt="platforms" />
|
|
4
4
|
<img src="https://img.shields.io/badge/agents-12-blue?style=flat-square" alt="agents" />
|
|
5
5
|
<img src="https://img.shields.io/badge/workflows-10-green?style=flat-square" alt="workflows" />
|
|
6
6
|
<img src="https://img.shields.io/badge/detectors-19-red?style=flat-square" alt="detectors" />
|
|
7
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.
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
# SCALE Engine v0.
|
|
12
|
-
|
|
13
|
-
SCALE Engine 让 AI Agent 不再只靠“自觉”遵守工程规范。它把探索、规划、实现、验证、评审、发版这些要求变成可执行的命令、门禁和证据文件,让人类可以看见 Agent
|
|
14
|
-
|
|
15
|
-
源码仓库:https://github.com/hongmaple0820/scale-engine
|
|
16
|
-
国内镜像:https://gitee.com/hongmaple/scale-engine
|
|
17
|
-
npm:https://www.npmjs.com/package/@hongmaple0820/scale-engine
|
|
18
|
-
语言:[中文](README.md) | [English](README.en.md)
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
32
|
-
|
|
8
|
+
<img src="https://img.shields.io/badge/npm-0.23.0-cb3837?style=flat-square&logo=npm" alt="npm" />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
# SCALE Engine v0.23.0
|
|
12
|
+
|
|
13
|
+
SCALE Engine 让 AI Agent 不再只靠“自觉”遵守工程规范。它把探索、规划、实现、验证、评审、发版这些要求变成可执行的命令、门禁和证据文件,让人类可以看见 Agent 做了什么、跳过了什么、为什么能交付或不能交付。
|
|
14
|
+
|
|
15
|
+
源码仓库:https://github.com/hongmaple0820/scale-engine
|
|
16
|
+
国内镜像:https://gitee.com/hongmaple/scale-engine
|
|
17
|
+
npm:https://www.npmjs.com/package/@hongmaple0820/scale-engine
|
|
18
|
+
语言:[中文](README.md) | [English](README.en.md)
|
|
19
|
+
|
|
20
|
+
## 先怎么学
|
|
21
|
+
|
|
22
|
+
如果你第一次接触 SCALE,不要从完整命令列表开始读。按这个顺序更容易掌握:
|
|
23
|
+
|
|
24
|
+
| 目标 | 入口 | 你应该学会什么 |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| 先跑起来 | [3 分钟快速开始](docs/start/quickstart.md) | 安装 CLI、初始化治理文件、运行 preflight |
|
|
27
|
+
| 看完整闭环 | [官方 Demo Walkthrough](docs/start/agent-governance-demo.md) | 任务上下文、诊断、TDD、artifact 和验证证据如何串起来 |
|
|
28
|
+
| 接入已有项目 | [SCALE 工作流升级指南](docs/start/workflow-upgrade.md) | `init`、`upgrade check/plan/apply`、本地 `make` 包装入口怎么用 |
|
|
29
|
+
| 选择治理包 | 本文的 Governance Pack 章节 | 不同项目形态应该选哪个 pack |
|
|
30
|
+
| 维护或扩展 SCALE | [docs/README.md](docs/README.md) | 文档地图、内部模块和长期维护资料 |
|
|
31
|
+
|
|
32
|
+
一句话理解:SCALE 不是让 Agent 多写文档,而是让“做了什么、验证了什么、没验证什么”可追踪。
|
|
33
|
+
|
|
34
|
+
## 社区与推广
|
|
35
|
+
|
|
36
|
+
SCALE Engine 是一个面向真实工程交付的 Agent 工作流治理项目。欢迎通过源码仓库提交 Issue、PR、场景反馈和治理包改进建议;中文用户也可以关注公众号获取更新、示例和社区入口。
|
|
37
|
+
|
|
38
|
+
| 平台 | 链接 | 说明 |
|
|
39
|
+
|------|------|------|
|
|
40
|
+
| GitHub | [https://github.com/hongmaple0820/scale-engine](https://github.com/hongmaple0820/scale-engine) | 源码、Issues、PR |
|
|
41
|
+
| Gitee | [https://gitee.com/hongmaple/scale-engine](https://gitee.com/hongmaple/scale-engine) | 国内镜像与反馈 |
|
|
42
|
+
| npm | [https://www.npmjs.com/package/@hongmaple0820/scale-engine](https://www.npmjs.com/package/@hongmaple0820/scale-engine) | CLI 包下载 |
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<img src="image/wechat-public.jpg" alt="SCALE Engine 微信公众号" width="220" />
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
## 赞助与支持
|
|
49
|
+
|
|
50
|
+
如果 SCALE Engine 节省了你的工程治理时间,或帮助你的团队把 AI Agent 工作流落到可验证、可复盘、可发版的闭环里,欢迎自愿赞助。赞助用于持续维护、示例项目、文档、测试矩阵和社区支持,不构成商业支持承诺,也不会改变 Issue 或 PR 的处理优先级。
|
|
51
|
+
|
|
52
|
+
<p align="center">
|
|
53
|
+
<img src="image/wxPay.jpg" alt="微信赞助" width="220" />
|
|
54
|
+
|
|
55
|
+
<img src="image/zfb.jpg" alt="支付宝赞助" width="220" />
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
## 它解决什么问题
|
|
33
59
|
|
|
34
60
|
AI 编码真正难的不是“写代码”,而是持续稳定地遵守工程纪律:
|
|
35
61
|
|
|
@@ -67,8 +93,8 @@ scale context init --name "Scale Demo"
|
|
|
67
93
|
scale context grill --task-id 2026-05-18-oauth-hardening --task "加固 OAuth callback"
|
|
68
94
|
scale diagnose plan --task-id 2026-05-18-oauth-hardening --symptom "callback 在 state 过期时返回 500"
|
|
69
95
|
scale tdd slice --task-id 2026-05-18-oauth-hardening --behavior "拒绝过期 OAuth state" --public-interface "GET /oauth/callback" --failing-test "expired state returns 401" --test-file tests/oauth.test.ts --impl-files src/oauth.ts
|
|
70
|
-
scale artifact render --task-id 2026-05-18-oauth-hardening --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
71
|
-
scale artifact doctor --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
96
|
+
scale artifact render --task-id 2026-05-18-oauth-hardening --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
97
|
+
scale artifact doctor --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
72
98
|
```
|
|
73
99
|
|
|
74
100
|
完整教程见 [3 分钟快速开始](docs/start/quickstart.md) 和 [官方 Demo Walkthrough](docs/start/agent-governance-demo.md)。
|
|
@@ -124,9 +150,11 @@ scale skill outdated --dir .
|
|
|
124
150
|
- `scale tools outdated` 和 `scale skill outdated` 只列出更新面、来源、信任等级和安全策略,不做自动安装。
|
|
125
151
|
- 第三方社区来源默认人工评审,高权限桌面自动化默认阻断自动升级。
|
|
126
152
|
|
|
127
|
-
详细说明见 [升级管理](docs/UPGRADE_MANAGEMENT.md)。
|
|
128
|
-
|
|
129
|
-
|
|
153
|
+
详细说明见 [升级管理](docs/UPGRADE_MANAGEMENT.md)。
|
|
154
|
+
|
|
155
|
+
新用户和项目维护者可先看 [SCALE workflow upgrade guide](docs/start/workflow-upgrade.md),它把 `scale init --interactive`、`scale upgrade check/plan/apply/rollback` 和仓库本地 `make workflow-upgrade-*` 入口放在一条可执行路径里。
|
|
156
|
+
|
|
157
|
+
## Governance Pack
|
|
130
158
|
|
|
131
159
|
在已有项目中安装治理工作流:
|
|
132
160
|
|
|
@@ -372,6 +400,8 @@ scale evolution hooks <session-id> --json
|
|
|
372
400
|
|
|
373
401
|
`ship` 不再执行 `git add .`。它只会暂存已通过 review 记录覆盖的文件;如果 review 后出现新的可 review 变更,`ship` 会阻断并要求重新 review。
|
|
374
402
|
|
|
403
|
+
Git 分支采用 GitLab Flow 变体:短分支合入 `dev`,验证后进入 `master`,生产发布由 `master` 上的 `vX.Y.Z` tag 触发。`scale ship` 会阻断在 `dev`、`master`、`main` 或 detached HEAD 上直接创建治理提交,并在临时 worktree 存在未推送或未合并提交时阻断清理。完整规则见 [docs/GITLAB_FLOW.md](docs/GITLAB_FLOW.md)。
|
|
404
|
+
|
|
375
405
|
G7 `SecurityGate` 内置轻量安全扫描,覆盖硬编码密钥、私钥、TLS 校验关闭、`eval`/`Function`、原始 HTML 注入、危险 shell 命令、shell 执行和空 `catch` 等模式。兼容模式只阻断 CRITICAL;严格模式会同时阻断 HIGH。
|
|
376
406
|
|
|
377
407
|
## 支持的平台与角色
|