@hongmaple0820/scale-engine 0.27.1 → 0.29.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.
@@ -282,11 +282,15 @@ The promotion step must remain evidence-backed. Automatically generating rules w
282
282
 
283
283
  ### 6.1 Planning Principle
284
284
 
285
- The roadmap has two horizons:
285
+ The roadmap has release horizons plus a long-range vision:
286
286
 
287
287
  | Horizon | Purpose | Claim boundary |
288
288
  | --- | --- | --- |
289
- | One-week closure | deliver a runnable AI OS beta loop that can be tested in real repositories | "usable beta", not "stable final OS" |
289
+ | 0.27.x baseline | establish the AI OS Runtime primitives and adoption path | "runtime baseline", not "complete AI OS" |
290
+ | 0.28.0 closure | make planning, execution, verification, dashboard, benchmark, and adoption usable as a closed loop | "usable closed-loop beta", not "stable final OS" |
291
+ | 0.29.0 intelligence | make memory, context, and skill routing measurably smarter | "intelligence beta", not proven long-term cognition |
292
+ | 0.30.0 governance maturity | strengthen enterprise governance, upgrade, evaluator, and evolution controls | "governance maturity", not commercial stability |
293
+ | 1.0.0 beta | integrate the loop into a public AI Engineering OS beta | "public beta", backed by demos and benchmark evidence |
290
294
  | Long-range vision | keep SCALE moving toward an AI Engineering OS with memory, context, governance, and tool intelligence | directional until backed by eval data |
291
295
 
292
296
  The near-term work should be aggressive, but public wording must stay precise. SCALE can ship beta capabilities quickly; it should only claim stable, industry-leading AI OS behavior after repeated project evidence, benchmarks, and upgrade validation.
@@ -332,46 +336,68 @@ Exit criteria:
332
336
  - skill recommendations include why, when, and required proof: baseline implemented by skill execution plans
333
337
  - context pack generation reports token budget and omissions: baseline implemented by `context.pack.compiler`
334
338
 
335
- ### 6.3 0.27.x: One-Week AI OS Beta Closure
339
+ ### 6.3 0.27.x: Runtime Baseline and Adoption Path
340
+
341
+ Theme: make the AI OS Runtime installable, inspectable, and safe to adopt.
342
+
343
+ Current landing status:
344
+
345
+ - `scale ai-os plan` exists as the unified planning entry point for governance, context, memory, skill routing, adaptive workflow, and ROI.
346
+ - `scale ai-os run --dry-run` exists as the first beta execution slice.
347
+ - `scale ai-os run --mode guarded --verify "<command>"` executes explicit verification commands through the safe command runner, records each command as runtime evidence, and blocks the run when verification fails.
348
+ - `scale ai-os status --lang zh|en` checks runtime directories, plan/run evidence, guarded verification, dashboard health, benchmark evidence, and adoption evidence in one closed-loop readiness report; when verification evidence is missing, it recommends concrete guarded verification commands from `.scale/verification.json` or `package.json`.
349
+ - `scale ai-os dashboard` summarizes persisted run reports into ready/blocked counts, guarded verification health, pending evidence, failure learning candidates, and next recommendations.
350
+ - `scale ai-os benchmark` runs fixed beta scenarios and reports context token use, estimated savings, memory recall, skill steps, governance modes, and the current dashboard health snapshot.
351
+ - `scale ai-os migrate` creates or verifies the `.scale/ai-os` runtime directories and writes an idempotent migration report.
352
+ - `scale ai-os adopt` runs migrate, the first dry-run, benchmark, and doctor as one adoption path, then writes `.scale/ai-os/adoption.json`.
353
+ - `scale ai-os doctor --lang zh|en` checks AI OS runtime readiness without mutating the project and blocks adoption when required directories or dashboard health are broken.
354
+ - `scale upgrade check/plan` includes AI OS readiness, so existing projects see adoption, migration, and doctor steps through the normal upgrade workflow.
355
+ - The upgrade and adoption CLI surfaces now have human-facing Chinese and English output while preserving JSON for scripts, CI, and agent integrations.
356
+
357
+ Boundary:
358
+
359
+ - 0.27.x is the baseline. It proves the runtime surface and adoption path, but it does not yet prove autonomous source mutation, PR creation, long-term memory, or stable commercial AI OS behavior.
360
+
361
+ ### 6.4 0.28.0: Usable Closed-Loop Enhancement
336
362
 
337
363
  Theme: turn `ai-os plan` into a runnable beta loop.
338
364
 
339
- Target timebox: one week.
365
+ Target timebox: 2-3 weeks.
340
366
 
341
367
  Core work:
342
368
 
343
369
  | Module | Outcome |
344
370
  | --- | --- |
345
371
  | `scale ai-os run` | execute the unified plan through workflow, context, memory, skill routing, and verification steps |
346
- | Memory Provider Bridge | make gbrain, agentmemory, code memory, and local memory selectable through one provider contract |
372
+ | Runtime Status | show whether plan, run, verification, dashboard, benchmark, adoption, and doctor evidence exist for the project |
373
+ | Verification Recommendation | derive suggested verification commands from task level, changed files, project verification profile, and risk signals |
374
+ | Failure Learning Closure | convert failed guarded runs, gate failures, and missing evidence into reviewed lesson/rule candidates |
375
+ | Closed-Loop Demo Pack | provide repeatable docs and code task demos that exercise plan -> run -> verify -> dashboard -> benchmark |
376
+ | Memory Provider Bridge | keep gbrain, agentmemory, code memory, and local memory selectable through one provider contract |
347
377
  | Context Compiler v2 | merge task intent, risk level, files, memory recall, and role into one explainable context pack |
348
378
  | Skill Router v2 | create an execution graph for skills, MCP tools, CLIs, artifacts, and required evidence |
349
379
  | Adaptive Workflow Profiles | choose light, standard, or strict gates from risk and changed-file signals |
350
- | Failure Learning | convert failed gates, test failures, and missing evidence into lesson and rule candidates |
351
380
  | AI OS Dashboard CLI | summarize gate health, memory hits, context budget, skill evidence, and ROI |
352
381
  | Upgrade/Migration | migrate older `.scale` state and warn about incompatible local governance files |
353
- | AI OS Doctor | check runtime directories, run history, dashboard health, and benchmark freshness before adoption or release |
382
+ | AI OS Adoption and Doctor | keep one-command adoption and readiness checks aligned with the normal upgrade workflow |
354
383
  | Bilingual DX | keep key CLI help, errors, README guidance, and tutorials readable in Chinese and English |
355
384
  | Benchmark Pack | run fixed samples for token budget, recall, gate pass rate, and skill-routing evidence |
356
385
 
357
386
  Exit criteria:
358
387
 
359
388
  - `scale ai-os run` can complete at least one documentation task and one code task in dry-run or guarded execution mode
389
+ - `scale ai-os status` or equivalent doctor output shows what is missing for a closed loop
390
+ - verification recommendations are explainable and can be overridden by explicit `--verify` commands
360
391
  - execution output records context decisions, memory provider choices, skill decisions, gate results, and failure lessons
361
392
  - benchmark output compares context token budget against a full-load baseline
362
393
  - beta docs clearly state what is automated, what is proposed, and what still requires human approval
363
394
 
364
- Current landing status:
395
+ Current implementation status:
365
396
 
366
- - `scale ai-os run --dry-run` exists as the first beta slice.
367
- - It reuses `createAiOsPlan`, expands it into run steps, evidence requirements, next actions, and a persisted `.scale/ai-os/runs/<task-id>.json` report.
368
- - `scale ai-os run --mode guarded --verify "<command>"` executes explicit verification commands through the safe command runner, records each command as runtime evidence, and blocks the run when verification fails.
369
- - `scale ai-os dashboard` summarizes persisted run reports into ready/blocked counts, guarded verification health, pending evidence, failure learning candidates, and next recommendations.
370
- - `scale ai-os benchmark` runs fixed beta scenarios and reports context token use, estimated savings, memory recall, skill steps, governance modes, and the current dashboard health snapshot.
371
- - `scale ai-os migrate` creates or verifies the `.scale/ai-os` runtime directories and writes an idempotent migration report.
372
- - `scale ai-os doctor --lang zh|en` checks AI OS runtime readiness without mutating the project and blocks adoption when required directories or dashboard health are broken.
373
- - `scale upgrade check/plan` includes AI OS readiness, so existing projects see migration and doctor steps through the normal upgrade workflow.
374
- - It does not yet create PRs or mutate source files; richer skill execution remains the next implementation slice.
397
+ - In progress on the post-0.27.1 development branch.
398
+ - Runtime baseline, status visibility, verification recommendation, adoption, doctor, dashboard, benchmark, migration, upgrade integration, and bilingual adoption guidance are already landed.
399
+ - Remaining 0.28.0 work should focus on failure-learning closure and repeatable end-to-end demo evidence.
400
+ - It does not yet create PRs or mutate source files; richer skill execution remains a later implementation slice unless explicitly approved.
375
401
 
376
402
  Explicitly deferred:
377
403
 
@@ -380,10 +406,12 @@ Explicitly deferred:
380
406
  - full VLM visual judgment beyond screenshot capture and interface placeholders
381
407
  - claims of human-level long-term memory or fully autonomous engineering
382
408
 
383
- ### 6.4 0.29.0: Memory, Context, and Skill Intelligence
409
+ ### 6.5 0.29.0: Memory, Context, and Skill Intelligence
384
410
 
385
411
  Theme: make the beta loop measurably smarter rather than only broader.
386
412
 
413
+ Target timebox: 4-6 weeks.
414
+
387
415
  Core work:
388
416
 
389
417
  | Module | Outcome |
@@ -394,6 +422,12 @@ Core work:
394
422
  | Skill Strategy Learning | learn preferred tools from successful evidence, failures, and user overrides |
395
423
  | Workflow Eval Integration | turn benchmark results into release-gate evidence |
396
424
 
425
+ Current first slice:
426
+
427
+ - `scale ai-os status --json` now includes an `intelligence` report with `memory-recall`, `context-savings`, `skill-routing`, and `benchmark-intelligence` signals; memory recall includes a quality score based on confidence, relevance, and evidence-backed items.
428
+ - Context intelligence now reports `contextQuality` with omitted sections, total omitted tokens, compression risk, and evidence-loss warnings when runtime evidence is dropped by budget constraints.
429
+ - Human `scale ai-os status --lang zh|en` output surfaces the same intelligence readiness summary so release reviewers can see whether 0.29.0 memory/context/skill gains are backed by run and benchmark evidence.
430
+
397
431
  Exit criteria:
398
432
 
399
433
  - memory recall has acceptance/rejection feedback
@@ -401,10 +435,12 @@ Exit criteria:
401
435
  - skill routing decisions can be compared against outcome quality
402
436
  - release notes include measured deltas instead of aspirational percentages
403
437
 
404
- ### 6.5 0.30.0: Enterprise Governance and Upgrade Maturity
438
+ ### 6.6 0.30.0: Enterprise Governance and Upgrade Maturity
405
439
 
406
440
  Theme: deepen adaptive governance beyond the v0.27.0 baseline.
407
441
 
442
+ Target timebox: 6-10 weeks.
443
+
408
444
  Core work:
409
445
 
410
446
  | Module | Outcome |
@@ -421,10 +457,12 @@ Exit criteria:
421
457
  - reasoning-heavy tasks get critique/evaluator gates
422
458
  - evolution proposals can be traced to failure evidence and validation results
423
459
 
424
- ### 6.6 1.0.0 Beta: AI Engineering OS
460
+ ### 6.7 1.0.0 Beta: AI Engineering OS
425
461
 
426
462
  Theme: integrate governance, memory, context, and tools into an operating layer.
427
463
 
464
+ Target timebox: 8-12 weeks.
465
+
428
466
  Target capabilities:
429
467
 
430
468
  - unified agent workspace policy
@@ -442,9 +480,9 @@ Release criteria:
442
480
  - bilingual docs explain the core workflow without requiring maintainer context
443
481
  - public claims are tied to `WORKFLOW_EVAL`, benchmark output, or release evidence
444
482
 
445
- ### 6.7 Long-Range Vision: 3-12 Months
483
+ ### 6.8 1.0.0 Stable and Long-Range Vision
446
484
 
447
- This is the strategic north star, not the one-week beta promise.
485
+ This is the strategic north star, not the 0.28.0 closed-loop promise.
448
486
 
449
487
  | Time horizon | Target state | Evidence required before public claim |
450
488
  | --- | --- | --- |
package/docs/README.md CHANGED
@@ -36,7 +36,7 @@
36
36
  | [CODE_INTELLIGENCE.md](CODE_INTELLIGENCE.md) | CodeGraph、Graphify 和显式 fallback 的代码智能与探索 ROI |
37
37
  | [WORKFLOW_EVAL.md](WORKFLOW_EVAL.md) | Workflow Eval、pass@k 指标、Failure Replay 和改进候选 |
38
38
  | [SKILL_RADAR.md](SKILL_RADAR.md) | Skill Radar、能力置信度、证据要求和供应链安全检查 |
39
- | [AI_ENGINEERING_OS_POSITIONING.md](AI_ENGINEERING_OS_POSITIONING.md) | Agent Governance Runtime / AI Engineering OS 方向、`scale ai-os plan/run/dashboard/benchmark/migrate/doctor` runtime 入口、一周 beta 闭环和 3-12 个月远景路线 |
39
+ | [AI_ENGINEERING_OS_POSITIONING.md](AI_ENGINEERING_OS_POSITIONING.md) | Agent Governance Runtime / AI Engineering OS 方向、`scale ai-os plan/run/status/dashboard/benchmark/migrate/adopt/doctor` runtime 入口、`0.28.0` 可用闭环增强和 3-12 个月远景路线 |
40
40
  | [THIRD_PARTY_SKILLS.md](THIRD_PARTY_SKILLS.md) | 第三方 skill 致谢、授权边界、引用方式和 vendoring 策略 |
41
41
  | [EXTERNAL_REFERENCES.md](EXTERNAL_REFERENCES.md) | 外部项目、skills、MCP、CLI 和适配器引用的完整清单 |
42
42
  | [UPGRADE_MANAGEMENT.md](UPGRADE_MANAGEMENT.md) | SCALE CLI、governance pack、skills、MCP 和 CLI 工具的安全升级流程 |
@@ -71,8 +71,9 @@ scale status
71
71
  | 多仓库/MOE 工作区 | `scale init --governance-pack moe-workspace` |
72
72
  | 文档、报告、截图、脚本混乱 | `scale init --governance-pack resource-governance` |
73
73
  | 工作流或第三方能力要升级 | `scale upgrade check --lang zh && scale upgrade plan --html --lang zh` |
74
+ | 已有项目接入 AI OS runtime | `scale ai-os adopt --task "接入 AI OS runtime" --lang zh` |
74
75
 
75
76
 
76
77
  ## 工作流升级短路径
77
78
 
78
- 已有项目先看 [SCALE 工作流升级指南](workflow-upgrade.md)。它说明 `scale init --interactive`、`scale upgrade check/plan/apply/rollback`、`--lang zh/en` 双语输出、仓库本地 `make workflow-upgrade-*` 入口,以及生成文件更新和项目级验证之间的边界。
79
+ 已有项目先看 [SCALE 工作流升级指南](workflow-upgrade.md)。它说明 `scale init --interactive`、`scale upgrade check/plan/apply/rollback`、`scale ai-os adopt`、`--lang zh/en` 双语输出、仓库本地 `make workflow-upgrade-*` / `make workflow-aios-adopt` 入口,以及生成文件更新和项目级验证之间的边界。
@@ -131,6 +131,12 @@ scale upgrade plan --dir . --html --lang zh
131
131
  scale upgrade apply --dir . --confirm --lang zh
132
132
  ```
133
133
 
134
+ 如果升级计划提示 AI OS runtime 尚未接入,用一键接入命令生成运行态目录、首份 dry-run、benchmark 和 doctor 报告:
135
+
136
+ ```bash
137
+ scale ai-os adopt --dir . --task "接入 AI OS runtime" --lang zh
138
+ ```
139
+
134
140
  需要英文输出时把 `--lang zh` 换成 `--lang en`。干净的 SCALE 受管文件可以自动刷新;已有本地改动的文件会进入人工审阅,不会被自动覆盖。
135
141
 
136
142
  继续阅读 [官方 Demo Walkthrough](agent-governance-demo.md),看一个真实任务如何从需求到验证证据。
@@ -60,6 +60,18 @@ scale upgrade apply --dir . --confirm
60
60
  scale preflight --dir . --service all --preflight-profile quick
61
61
  ```
62
62
 
63
+ 如果升级计划提示 AI OS runtime 尚未接入,优先使用一键接入命令。它会创建运行态目录、生成首个 `dry-run` 运行报告、写入 benchmark,并用 doctor 复核就绪状态:
64
+
65
+ ```bash
66
+ scale ai-os adopt \
67
+ --dir . \
68
+ --task "接入 AI OS runtime 并生成首份治理证据" \
69
+ --files "README.md,AGENTS.md" \
70
+ --lang zh
71
+ ```
72
+
73
+ 接入完成后会写入 `.scale/ai-os/adoption.json`。后续真实任务再使用 `scale ai-os run --mode guarded` 生成受治理的执行证据。
74
+
63
75
  默认输出是中文。需要英文命令提示或英文 HTML 计划时加 `--lang en`:
64
76
 
65
77
  ```bash
@@ -67,12 +79,15 @@ scale upgrade check --dir . --lang en
67
79
  scale upgrade plan --dir . --html --lang en
68
80
  ```
69
81
 
82
+ 给人看的升级输出会使用当前语言生成下一步命令,例如中文场景会推荐 `scale ai-os adopt --task "接入 AI OS runtime" --lang zh`。只有脚本、CI 或 Agent 集成需要稳定结构时才使用 `--json`。
83
+
70
84
  如果仓库已有本地封装,优先使用本地命令,因为它们编码了项目默认值:
71
85
 
72
86
  ```bash
73
87
  make workflow-upgrade-check
74
88
  make workflow-upgrade-plan
75
89
  make workflow-upgrade-apply
90
+ make workflow-aios-adopt
76
91
  make workflow-upgrade-verify
77
92
  ```
78
93
 
@@ -160,6 +175,8 @@ workflow-upgrade-rollback:
160
175
  scale upgrade rollback --dir . --lang zh
161
176
  workflow-upgrade-verify:
162
177
  scale preflight --dir . --service all --preflight-profile quick
178
+ workflow-aios-adopt:
179
+ scale ai-os adopt --dir . --task "$(TASK)" --files "$(FILES)" --level "$(LEVEL)" --budget "$(BUDGET)" --lang zh
163
180
  ```
164
181
 
165
182
  如果 Windows 环境没有 `make`,提供等价 PowerShell 脚本,或在文档里写清原始 `scale` 命令。
@@ -62,6 +62,7 @@ feature/fix/docs/chore/codex -> dev -> master
62
62
  make bootstrap-scale
63
63
  make workflow-upgrade-check
64
64
  make workflow-upgrade-plan
65
+ make workflow-aios-adopt
65
66
  ```
66
67
 
67
- 先审计划,再决定是否 `make workflow-upgrade-apply`。
68
+ 先审计划,再决定是否 `make workflow-upgrade-apply`。如果计划提示 AI OS runtime 尚未接入,使用 `make workflow-aios-adopt` 生成运行态目录、首份 dry-run、benchmark 和 doctor 报告。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hongmaple0820/scale-engine",
3
- "version": "0.27.1",
3
+ "version": "0.29.0",
4
4
  "description": "Executable AI agent governance with workflow gates, evidence, skill/tool orchestration, and traceable HTML artifacts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -58,6 +58,7 @@
58
58
  "test": "vitest run --reporter dot --pool=forks --poolOptions.forks.maxForks=1 --poolOptions.forks.minForks=1",
59
59
  "typecheck": "tsc --noEmit",
60
60
  "lint": "eslint src/**/*.ts",
61
+ "release:check": "npm run typecheck && npm run lint && npm test && npm run build && npm audit --omit=dev && npm pack --dry-run",
61
62
  "mcp": "node dist/api/mcp.js",
62
63
  "serve": "node dist/api/http.js"
63
64
  },