@hongmaple0820/scale-engine 0.21.0 → 0.21.2
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 +7 -5
- package/README.md +10 -11
- package/dist/api/cli.js +7 -0
- package/dist/api/cli.js.map +1 -1
- package/dist/cli/phaseCommands.js +3 -0
- package/dist/cli/phaseCommands.js.map +1 -1
- package/dist/workflow/GovernanceTemplatePacks.js +2 -2
- package/dist/workflow/GovernanceTemplates.d.ts +1 -1
- package/dist/workflow/GovernanceTemplates.js +106 -22
- package/dist/workflow/GovernanceTemplates.js.map +1 -1
- package/dist/workflow/ResourceGovernance.js +10 -1
- package/dist/workflow/ResourceGovernance.js.map +1 -1
- package/dist/workflow/TaskArtifactScaffolder.js +43 -5
- package/dist/workflow/TaskArtifactScaffolder.js.map +1 -1
- 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/docs/GITLAB_FLOW.md +125 -0
- package/docs/README.md +1 -0
- package/docs/RESOURCE_GOVERNANCE.md +92 -0
- package/package.json +3 -1
package/README.en.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.21.2-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.
|
|
8
|
+
<img src="https://img.shields.io/badge/npm-0.21.2-cb3837?style=flat-square&logo=npm" alt="npm" />
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
# SCALE Engine v0.
|
|
11
|
+
# SCALE Engine v0.21.2
|
|
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
|
|
|
@@ -55,8 +55,8 @@ scale context init --name "Scale Demo"
|
|
|
55
55
|
scale context grill --task-id 2026-05-18-oauth-hardening --task "Harden OAuth callback"
|
|
56
56
|
scale diagnose plan --task-id 2026-05-18-oauth-hardening --symptom "callback returns 500 when state expires"
|
|
57
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
|
|
59
|
-
scale artifact doctor --artifact-dir
|
|
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
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Read [Quickstart](docs/start/quickstart.md) and [Agent Governance Demo](docs/start/agent-governance-demo.md) for the complete walkthrough.
|
|
@@ -182,6 +182,8 @@ SCALE Engine uses multiple enforcement layers:
|
|
|
182
182
|
|
|
183
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
184
|
|
|
185
|
+
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).
|
|
186
|
+
|
|
185
187
|
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
188
|
|
|
187
189
|
## Supported Platforms
|
package/README.md
CHANGED
|
@@ -1,34 +1,31 @@
|
|
|
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.21.2-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.
|
|
8
|
+
<img src="https://img.shields.io/badge/npm-0.21.2-cb3837?style=flat-square&logo=npm" alt="npm" />
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
# SCALE Engine v0.
|
|
11
|
+
# SCALE Engine v0.21.2
|
|
12
12
|
|
|
13
|
-
SCALE Engine 让 AI Agent 不再只靠“自觉”遵守工程规范。它把探索、规划、实现、验证、评审、发版这些要求变成可执行的命令、门禁和证据文件,让人类可以看见 Agent
|
|
13
|
+
SCALE Engine 让 AI Agent 不再只靠“自觉”遵守工程规范。它把探索、规划、实现、验证、评审、发版这些要求变成可执行的命令、门禁和证据文件,让人类可以看见 Agent 做了什么、跳过了什么、为什么能交付或不能交付。
|
|
14
14
|
|
|
15
15
|
源码仓库:https://github.com/hongmaple0820/scale-engine
|
|
16
16
|
国内镜像:https://gitee.com/hongmaple/scale-engine
|
|
17
17
|
npm:https://www.npmjs.com/package/@hongmaple0820/scale-engine
|
|
18
18
|
语言:[中文](README.md) | [English](README.en.md)
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## 社区与推广
|
|
21
21
|
|
|
22
22
|
### 链接
|
|
23
23
|
|
|
24
24
|
| 平台 | 链接 | 说明 |
|
|
25
25
|
|------|------|------|
|
|
26
|
-
|
|
|
27
|
-
| 📦 **GitHub** | [https://github.com/hongmaple0820/scale-os](https://github.com/hongmaple0820/scale-os) | 源码 + Issues + PR |
|
|
26
|
+
| 📦 **GitHub** | [https://github.com/hongmaple0820/scale-engine](https://github.com/hongmaple0820/scale-engine) | 源码 + Issues + PR |
|
|
28
27
|
| 🔧 **Gitee** | [https://gitee.com/hongmaple/scale-engine](https://gitee.com/hongmaple/scale-engine) | 国内镜像 |
|
|
29
28
|
| 📦 **npm** | [https://www.npmjs.com/package/@hongmaple0820/scale-engine](https://www.npmjs.com/package/@hongmaple0820/scale-engine) | 包下载 |
|
|
30
|
-
| 🧰 **项目脚手架** | [https://github.com/hongmaple0820/project-scaffold](https://github.com/hongmaple0820/project-scaffold) | 工程化工作流实践脚手架 |
|
|
31
|
-
|
|
32
29
|
## 它解决什么问题
|
|
33
30
|
|
|
34
31
|
AI 编码真正难的不是“写代码”,而是持续稳定地遵守工程纪律:
|
|
@@ -67,8 +64,8 @@ scale context init --name "Scale Demo"
|
|
|
67
64
|
scale context grill --task-id 2026-05-18-oauth-hardening --task "加固 OAuth callback"
|
|
68
65
|
scale diagnose plan --task-id 2026-05-18-oauth-hardening --symptom "callback 在 state 过期时返回 500"
|
|
69
66
|
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
|
|
71
|
-
scale artifact doctor --artifact-dir
|
|
67
|
+
scale artifact render --task-id 2026-05-18-oauth-hardening --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
68
|
+
scale artifact doctor --artifact-dir .planning/tasks/2026-05-18-oauth-hardening
|
|
72
69
|
```
|
|
73
70
|
|
|
74
71
|
完整教程见 [3 分钟快速开始](docs/start/quickstart.md) 和 [官方 Demo Walkthrough](docs/start/agent-governance-demo.md)。
|
|
@@ -372,6 +369,8 @@ scale evolution hooks <session-id> --json
|
|
|
372
369
|
|
|
373
370
|
`ship` 不再执行 `git add .`。它只会暂存已通过 review 记录覆盖的文件;如果 review 后出现新的可 review 变更,`ship` 会阻断并要求重新 review。
|
|
374
371
|
|
|
372
|
+
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)。
|
|
373
|
+
|
|
375
374
|
G7 `SecurityGate` 内置轻量安全扫描,覆盖硬编码密钥、私钥、TLS 校验关闭、`eval`/`Function`、原始 HTML 注入、危险 shell 命令、shell 执行和空 `catch` 等模式。兼容模式只阻断 CRITICAL;严格模式会同时阻断 HIGH。
|
|
376
375
|
|
|
377
376
|
## 支持的平台与角色
|
package/dist/api/cli.js
CHANGED
|
@@ -1722,9 +1722,14 @@ function printWorkspaceLifecycle(report) {
|
|
|
1722
1722
|
console.log(` Branch: ${report.root.branch ?? '(detached)'}`);
|
|
1723
1723
|
console.log(` Linked worktree: ${report.root.isLinkedWorktree ? 'yes' : 'no'}`);
|
|
1724
1724
|
console.log(` Root status: ${report.root.clean ? 'clean' : 'dirty'}`);
|
|
1725
|
+
console.log(` Branch policy: ${report.branchPolicy.mode} role=${report.branchPolicy.role} ship=${report.branchPolicy.shipAllowed ? 'allowed' : 'blocked'}`);
|
|
1726
|
+
console.log(` Integration: ${report.branchPolicy.integrationBranch}`);
|
|
1727
|
+
console.log(` Production: ${report.branchPolicy.productionBranch}`);
|
|
1725
1728
|
if (!report.root.clean) {
|
|
1726
1729
|
console.log(` staged=${report.root.staged} unstaged=${report.root.unstaged} untracked=${report.root.untracked}`);
|
|
1727
1730
|
}
|
|
1731
|
+
for (const blocker of report.branchPolicy.shipBlockers)
|
|
1732
|
+
console.log(` [SHIP BLOCKER] ${blocker}`);
|
|
1728
1733
|
if (report.childRepositories.length) {
|
|
1729
1734
|
console.log('\n Child repositories:');
|
|
1730
1735
|
for (const child of report.childRepositories) {
|
|
@@ -1767,6 +1772,7 @@ function printWorkspaceSummary(report) {
|
|
|
1767
1772
|
console.log(` Status: ${status}`);
|
|
1768
1773
|
console.log(` Topology: ${report.topology.topology}${report.topology.configured ? '' : ' (default)'}`);
|
|
1769
1774
|
console.log(` Root: ${rootStatus}`);
|
|
1775
|
+
console.log(` Branch: ${report.root.branch ?? '(detached)'} (${report.branchPolicy.role}, ship ${report.branchPolicy.shipAllowed ? 'allowed' : 'blocked'})`);
|
|
1770
1776
|
console.log(` Children: ${report.childRepositories.length} total, ${dirtyChildren.length} dirty, ${unpushedChildren.length} unpushed, ${noUpstreamChildren.length} no upstream`);
|
|
1771
1777
|
if (dirtyChildren.length > 0)
|
|
1772
1778
|
console.log(` Dirty child repositories: ${compactList(dirtyChildren)}`);
|
|
@@ -1882,6 +1888,7 @@ const workspaceFinish = defineCommand({
|
|
|
1882
1888
|
root: report.root,
|
|
1883
1889
|
childRepositories: report.childRepositories,
|
|
1884
1890
|
topology: report.topology,
|
|
1891
|
+
branchPolicy: report.branchPolicy,
|
|
1885
1892
|
finish: report.finish,
|
|
1886
1893
|
};
|
|
1887
1894
|
if (args.json) {
|