@namewta/speculo 0.8.9 → 0.8.11
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/dist/src/structured.js +186 -0
- package/dist/src/structured.js.map +1 -1
- package/package.json +1 -1
- package/template/canonical/canonical-specdev-goal-plan.md +14 -4
- package/template/canonical/canonical-specdev-orchestrate-implementation.md +27 -7
- package/template/canonical/canonical-specdev-tickets.md +5 -2
- package/template/commands/archive-and-consolidate.md +9 -0
- package/template/commands/status.md +3 -3
- package/template/workflows/ops/A-archive-and-learn/A-archive-and-learn.md +64 -0
- package/template/workflows/ops/A-archive-and-learn/promotion-plan-template.md +41 -0
- package/template/workflows/ops/A-archive-and-learn/retrospective-template.md +53 -0
- package/template/workflows/ops/E-execute-and-stabilize/E-execute-and-stabilize.md +75 -0
- package/template/workflows/ops/E-execute-and-stabilize/attempt-summary-template.md +44 -0
- package/template/workflows/ops/E-execute-and-stabilize/diagnosis-template.md +24 -0
- package/template/workflows/ops/E-execute-and-stabilize/handoff-template.md +32 -0
- package/template/workflows/ops/E-execute-and-stabilize/rollback-template.md +26 -0
- package/template/workflows/ops/E-execute-and-stabilize/verification-state-template.json +30 -0
- package/template/workflows/ops/E-execute-and-stabilize/verification-template.md +55 -0
- package/template/workflows/ops/I-intake-and-assess/I-intake-and-assess.md +66 -0
- package/template/workflows/ops/I-intake-and-assess/change-status-template.json +26 -0
- package/template/workflows/ops/I-intake-and-assess/collector-catalog.md +28 -0
- package/template/workflows/ops/I-intake-and-assess/deployment-dossier-template.md +62 -0
- package/template/workflows/ops/I-intake-and-assess/global-change-status-template.json +26 -0
- package/template/workflows/ops/I-intake-and-assess/project-detection.md +38 -0
- package/template/workflows/ops/I-intake-and-assess/request-template.md +44 -0
- package/template/workflows/ops/I-intake-and-assess/system-report-template.md +34 -0
- package/template/workflows/ops/I-intake-and-assess/target-profile-template.json +24 -0
- package/template/workflows/ops/INDEX.md +30 -0
- package/template/workflows/ops/P-plan-and-approve/P-plan-and-approve.md +65 -0
- package/template/workflows/ops/P-plan-and-approve/plan-review-template.md +78 -0
- package/template/workflows/ops/README.md +120 -0
- package/template/workflows/ops/_state/archive/.gitkeep +1 -0
- package/template/workflows/ops/_state/changes/.gitkeep +1 -0
- package/template/workflows/ops/_state/status.json +6 -0
- package/template/workflows/ops/common/rules/artifact-contract.md +37 -0
- package/template/workflows/ops/common/rules/closure-and-learning.md +25 -0
- package/template/workflows/ops/common/rules/evidence-and-redaction.md +22 -0
- package/template/workflows/ops/common/rules/execution-loop.md +27 -0
- package/template/workflows/ops/common/rules/path-and-scope-contract.md +21 -0
- package/template/workflows/ops/common/rules/plan-and-approval.md +25 -0
- package/template/workflows/ops/common/rules/project-and-change-scope.md +20 -0
- package/template/workflows/ops/common/rules/target-profile-and-release-gates.md +44 -0
- package/template/workflows/ops/common/schemas/approval.schema.json +28 -0
- package/template/workflows/ops/common/schemas/attempt.schema.json +42 -0
- package/template/workflows/ops/common/schemas/change-status.schema.json +43 -0
- package/template/workflows/ops/common/schemas/deployment-model.schema.json +26 -0
- package/template/workflows/ops/common/schemas/implementation-plan.schema.json +221 -0
- package/template/workflows/ops/common/schemas/inventory-snapshot.schema.json +31 -0
- package/template/workflows/ops/common/schemas/journal-event.schema.json +22 -0
- package/template/workflows/ops/common/schemas/project.schema.json +19 -0
- package/template/workflows/ops/common/schemas/promotion-approval.schema.json +20 -0
- package/template/workflows/ops/common/schemas/promotion-manifest.schema.json +22 -0
- package/template/workflows/ops/common/schemas/status.schema.json +30 -0
- package/template/workflows/ops/common/schemas/target-profile.schema.json +32 -0
- package/template/workflows/ops/common/schemas/verification-state.schema.json +30 -0
- package/template/workflows/ops/common/tools/close-change.mjs +177 -0
- package/template/workflows/ops/common/tools/validate-ops.mjs +992 -0
- package/template/workflows/ops/runtime-contract.json +14 -0
- package/template/workflows/specdev/I-implement/I-implement.md +6 -3
- package/template/workflows/specdev/I-implement/evidence-template.md +13 -0
- package/template/workflows/specdev/O-orchestrate-implementation/execution-loop.md +3 -2
- package/template/workflows/specdev/P-goal-plan/completion-control.md +3 -0
- package/template/workflows/specdev/P-goal-plan/lead-orchestration.md +6 -2
- package/template/workflows/specdev/common/skills/dev-worktree/references/finalize.md +5 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ops/archive-and-learn
|
|
3
|
+
type: workflow-entry
|
|
4
|
+
workflow: ops
|
|
5
|
+
name: 复盘、沉淀并归档
|
|
6
|
+
description: 从 completed change 的全部 attempts 生成完整复盘,经用户确认后合并项目 SOP 与全局知识,并事务化归档到所属 scope。
|
|
7
|
+
keywords: [复盘, 错误教训, SOP, 知识合并, 项目归档]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 复盘、沉淀并归档
|
|
11
|
+
|
|
12
|
+
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/ops/README.md</Path>`,再执行本入口。
|
|
13
|
+
|
|
14
|
+
A 是 RETROSPECTIVE、知识提升和 scope-aware 归档的唯一 owner。它保留完整失败历史,但只把有证据、仍有效且对后续工作有用的结论合并为现役知识。
|
|
15
|
+
|
|
16
|
+
## 流程
|
|
17
|
+
|
|
18
|
+
### 1. 验证完成证据
|
|
19
|
+
|
|
20
|
+
选择用户指定或唯一 completed change,读取 request、inventory、deployment/target profile、全部 plan/approval、全部 attempts、typed journals、verification states、HANDOFF、LOG、CONTEXT 和 ADR,并加载 `<Path>{roots.workflows}/ops/common/rules/closure-and-learning.md</Path>`。状态不是 completed、outcome pending、最终验证缺失、存在 blocker 或目标未知时停止。
|
|
21
|
+
|
|
22
|
+
旧 plan v2 与 attempt v1 只读保留,不在 A 中迁移、补字段或重释为新合同证据。若 completed 候选只有旧 attempt,没有最终 verification-only attempt v2 及其 verification state/HANDOFF,则停止归档并返回 E 补验;在此之前不得通过 pre-close/pre-archive,也不得把旧摘要提升为现役知识。
|
|
23
|
+
|
|
24
|
+
### 2. 生成完整复盘
|
|
25
|
+
|
|
26
|
+
使用 `<Path>{roots.workflows}/ops/A-archive-and-learn/retrospective-template.md</Path>` 生成 change 根 `RETROSPECTIVE.md`。穷尽每个 attempt,记录时间线、target profile/identity 漂移、Gate 结果、脱敏错误 signature、确认/排除的假设、根因 confidence、计划偏差、尝试过的动作、数据保护、保留/恢复资产、最终有效步骤、回滚、验证、残余风险和教训。
|
|
27
|
+
|
|
28
|
+
成功步骤必须能回链到 journal 与 verification;失败实验不能伪装成 SOP。succeeded 可提升已验证部署 SOP,rolled_back 只提升恢复 SOP和故障规避,abandoned 只提升已确认约束/根因/注意事项。
|
|
29
|
+
|
|
30
|
+
### 3. 生成知识提升计划
|
|
31
|
+
|
|
32
|
+
使用 `<Path>{roots.workflows}/ops/A-archive-and-learn/promotion-plan-template.md</Path>` 写 `promotion/plan.md`,并生成符合 `<Path>{roots.workflows}/ops/common/schemas/promotion-manifest.schema.json</Path>` 的 `promotion/manifest.json` 与 staging 文件。
|
|
33
|
+
|
|
34
|
+
默认将知识留在 project scope:稳定配置/拓扑进入项目 context,重要权衡进入项目 ADR,成功步骤和已确认错误处理进入项目 runbooks。只有跨项目/宿主机/运行时/容器平台事实有明确适用范围和证据时,才进入根级 global context/ADR/runbooks。原始日志、瞬时状态、未确认推断和一次性命令全部 archive-only。
|
|
35
|
+
|
|
36
|
+
同一 SOP 按 project + environment + deployment method + component 的 stable key 执行 create/merge/supersede,不简单追加。冲突事实、删除现役步骤或缩小恢复能力必须作为 blocker 交给用户。
|
|
37
|
+
|
|
38
|
+
### 4. Dry-run 与批量确认
|
|
39
|
+
|
|
40
|
+
运行 close tool 的 dry-run 和 validator `--stage pre-archive`,展示完整 retrospective 摘要、每项 project/global/archive-only 分类、目标 diff、索引变化、移动目标和 rollback manifest。未确认时不写永久知识、不移动 change。
|
|
41
|
+
|
|
42
|
+
用户一次确认精确 manifest 后,创建 `promotion/approval.json`,绑定规范化 manifest SHA-256、决定摘要和时间。不得从最初“部署”请求推断归档或永久知识改写批准。
|
|
43
|
+
|
|
44
|
+
### 5. 事务应用与重读
|
|
45
|
+
|
|
46
|
+
调用 `<Path>{roots.workflows}/ops/common/tools/close-change.mjs</Path>`,传入 state root、scope、project/change 和批准摘要。工具验证 staging/target hash,备份既有目标,自叶到根原子应用知识,更新 status,并移动到 scope 对应 archive;失败时按 rollback evidence 恢复。
|
|
47
|
+
|
|
48
|
+
完成后运行 validator `--stage complete`,确认 active 源不存在、archive 完整、tuple 索引一致、永久知识 hash 与 manifest 相同。归档只读;后续修正创建同项目或 global scope 的 follow-up change。
|
|
49
|
+
|
|
50
|
+
## 完成标准
|
|
51
|
+
|
|
52
|
+
- RETROSPECTIVE 覆盖全部 attempts、错误、根因、错误假设、最终路径和教训;
|
|
53
|
+
- 最终 attempt v2 的 verification state 与无密钥 HANDOFF 已通过,legacy 证据未被改写或冒充新验证;
|
|
54
|
+
- SOP 只包含成功验证步骤,故障知识标明 evidence/confidence/last_verified;
|
|
55
|
+
- project 与 global 提升边界明确,无项目特有内容污染全局知识;
|
|
56
|
+
- 用户批准绑定精确 promotion manifest,dry-run 前零永久写入;
|
|
57
|
+
- change 移入所属项目或 global archive,状态和内容重读一致;
|
|
58
|
+
- complete validator 无 error。
|
|
59
|
+
|
|
60
|
+
## 子文件引用
|
|
61
|
+
|
|
62
|
+
- 复盘模板:`<Path>{roots.workflows}/ops/A-archive-and-learn/retrospective-template.md</Path>`
|
|
63
|
+
- 提升计划模板:`<Path>{roots.workflows}/ops/A-archive-and-learn/promotion-plan-template.md</Path>`
|
|
64
|
+
- 关闭与知识规则:`<Path>{roots.workflows}/ops/common/rules/closure-and-learning.md</Path>`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Ops Knowledge Promotion and Archive Plan
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| Scope / project | {scope} / {project_id} |
|
|
6
|
+
| Change | {change} |
|
|
7
|
+
| Outcome | succeeded / rolled_back / abandoned |
|
|
8
|
+
| Retrospective | RETROSPECTIVE.md |
|
|
9
|
+
| Manifest digest | {manifest_digest} |
|
|
10
|
+
| Archive target | {archive_path} |
|
|
11
|
+
| Mode | dry-run |
|
|
12
|
+
|
|
13
|
+
## Completion and Retrospective Gate
|
|
14
|
+
|
|
15
|
+
## Project Promotions
|
|
16
|
+
|
|
17
|
+
| Stable key | Source evidence | Target | Action | Last verified | Conflict |
|
|
18
|
+
| --- | --- | --- | --- | --- | --- |
|
|
19
|
+
|
|
20
|
+
## Global Promotions
|
|
21
|
+
|
|
22
|
+
| Stable key | Source evidence | Target | Applicability | Action | Conflict |
|
|
23
|
+
| --- | --- | --- | --- | --- | --- |
|
|
24
|
+
|
|
25
|
+
## SOP and Troubleshooting Merge
|
|
26
|
+
|
|
27
|
+
说明 create/merge/supersede,禁止简单追加或把失败步骤写成现役 SOP。
|
|
28
|
+
|
|
29
|
+
## ADR Promotions
|
|
30
|
+
|
|
31
|
+
## Archive-only Evidence
|
|
32
|
+
|
|
33
|
+
## Index Updates
|
|
34
|
+
|
|
35
|
+
## Move and Status Changes
|
|
36
|
+
|
|
37
|
+
## Rollback Manifest
|
|
38
|
+
|
|
39
|
+
## Confirmation
|
|
40
|
+
|
|
41
|
+
未修改永久知识或 change 位置。请只在核对以上精确 manifest 后一次性批准执行。
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Ops Change Retrospective
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| Scope / project | {scope} / {project_id} |
|
|
6
|
+
| Change | {change} |
|
|
7
|
+
| Outcome | succeeded / rolled_back / abandoned |
|
|
8
|
+
| Attempts reviewed | {attempt_ids} |
|
|
9
|
+
| Final verification | {verification_path} |
|
|
10
|
+
| Final verification state | {verification_state_path} |
|
|
11
|
+
| Final handoff | {handoff_path} |
|
|
12
|
+
| Completed at | {completed_at} |
|
|
13
|
+
|
|
14
|
+
## Requested Outcome and Final State
|
|
15
|
+
|
|
16
|
+
## Attempt Timeline
|
|
17
|
+
|
|
18
|
+
| Attempt | Schema | Kind | Plan | Result | Failure signature / effective result | Evidence |
|
|
19
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
20
|
+
|
|
21
|
+
旧 plan v2/attempt v1 保持只读并标记 legacy;最终关闭证据必须来自补充的 verification-only attempt v2,不得把旧摘要重写成新验证。
|
|
22
|
+
|
|
23
|
+
## Errors and Failure Signatures
|
|
24
|
+
|
|
25
|
+
## Confirmed Root Causes
|
|
26
|
+
|
|
27
|
+
每项写 evidence、confidence 和适用边界。
|
|
28
|
+
|
|
29
|
+
## Rejected Hypotheses and Why
|
|
30
|
+
|
|
31
|
+
## Plan Deviations and Rework
|
|
32
|
+
|
|
33
|
+
## Target Identity and Gate Drift
|
|
34
|
+
|
|
35
|
+
## Final Effective Deployment or Recovery Sequence
|
|
36
|
+
|
|
37
|
+
## Verification and Stability Evidence
|
|
38
|
+
|
|
39
|
+
## Data Protection, Recovery and Retained Assets
|
|
40
|
+
|
|
41
|
+
## Handoff Completeness and Redaction
|
|
42
|
+
|
|
43
|
+
## Lessons and Cautions
|
|
44
|
+
|
|
45
|
+
## SOP and Troubleshooting Candidates
|
|
46
|
+
|
|
47
|
+
## Project Knowledge Candidates
|
|
48
|
+
|
|
49
|
+
## Global Knowledge Candidates
|
|
50
|
+
|
|
51
|
+
## Archive-only Evidence
|
|
52
|
+
|
|
53
|
+
## Remaining Risks and Unknowns
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ops/execute-and-stabilize
|
|
3
|
+
type: workflow-entry
|
|
4
|
+
workflow: ops
|
|
5
|
+
name: 执行、诊断并稳定部署
|
|
6
|
+
description: 以不可覆盖 attempt 执行批准计划或只读验证,在失败时诊断并路由重新规划或回滚,最终用稳定性证据完成 change。
|
|
7
|
+
keywords: [执行, attempt, 调试, 诊断, 回滚, 验证, 稳定性]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 执行、诊断并稳定部署
|
|
11
|
+
|
|
12
|
+
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/ops/README.md</Path>`,再执行本入口。
|
|
13
|
+
|
|
14
|
+
E 是正常部署、批准回滚、attempt 诊断、验证和 completed 转换的唯一 owner。它不补写计划或批准,也不把命令退出零当作部署完成。
|
|
15
|
+
|
|
16
|
+
## 模式
|
|
17
|
+
|
|
18
|
+
- `deploy`:执行当前批准计划;
|
|
19
|
+
- `remediation`:执行失败 attempt 触发并重新批准的修订计划;
|
|
20
|
+
- `rollback`:执行当前计划已批准的恢复批次或 automatic trigger;
|
|
21
|
+
- `verification-only`:global inventory-only change 的定向只读重读,不伪造部署 run。
|
|
22
|
+
|
|
23
|
+
## 流程
|
|
24
|
+
|
|
25
|
+
### 1. 恢复与预检
|
|
26
|
+
|
|
27
|
+
读取所有既有 attempts、当前 status、request、inventory、deployment model、target profile、plan/approval、`<Path>{roots.workflows}/ops/common/rules/execution-loop.md</Path>` 与 `<Path>{roots.workflows}/ops/common/rules/target-profile-and-release-gates.md</Path>`。除 verification-only 外必须通过 `--stage pre-execute`,重建 plan/profile 摘要、source、target、路径包含、整体控制面身份、权限、容量、端口、Gate、数据保护、preview 和 rollback material。
|
|
28
|
+
|
|
29
|
+
在第一条 mutation 前重采集 identity assertions 并按 exact/ordered-list/set/digest 比较。任何 profile/identity/构件漂移、新 mutation、新权限或计划外写入都会零 mutation 停止,令 approval invalidated 并返回 I/P。发现同一 target/deployment root 正被另一 change 执行时阻塞。
|
|
30
|
+
|
|
31
|
+
旧 plan v2 与 attempt v1 只读,不得追加 journal、补写字段或作为新 pre-execute/pre-close 证据。需要继续或关闭此类 change 时,保留旧工件,由 I/P 在需要 mutation 时生成 plan v3;无新增 mutation 时创建绑定当前 target profile 的 verification-only attempt v2。只有该 v2 attempt 的 verification state 与 HANDOFF 通过,change 才能重新进入 pre-close/pre-archive。
|
|
32
|
+
|
|
33
|
+
### 2. 创建 Attempt
|
|
34
|
+
|
|
35
|
+
分配最小未占用 ATTEMPT-NNN,创建 `execution/attempts/{attempt-id}/`,从 `<Path>{roots.workflows}/ops/E-execute-and-stabilize/attempt-summary-template.md</Path>` 初始化 summary,并写符合 attempt v2 schema 的 `attempt.json`。创建 append-only `journal.jsonl`,每一行独立符合 `<Path>{roots.workflows}/ops/common/schemas/journal-event.schema.json</Path>`;先持久化 attempt-start,再设置 phase=executing/latest_attempt_id。
|
|
36
|
+
|
|
37
|
+
每个 required Gate 通过后才能开始其约束的 batch。每个 operation 先写 intent/precondition,再执行 apply,随后写 exit、脱敏摘要、postcondition 和 evidence。Gate failed/blocked 后立即停止新 operation,后续 Gate 只记 skipped;不得提升活动指针或删除候选。恢复会话时先核对连续 journal sequence 和真实 postcondition;无法证明幂等则停止。
|
|
38
|
+
|
|
39
|
+
### 3. 失败诊断与循环
|
|
40
|
+
|
|
41
|
+
operation、postcondition 或验证失败时立即停止后续 batch,使用 `<Path>{roots.workflows}/ops/E-execute-and-stabilize/diagnosis-template.md</Path>` 写 `diagnosis.md`:记录错误 signature、现场、假设、证据、确认/排除根因、已尝试动作和建议修复。
|
|
42
|
+
|
|
43
|
+
只读、scope 内、不会写 cache/产生业务负载的诊断可继续并写 journal。任何修复 mutation、命令、write set、权限或事故半径变化都把 phase 设为 diagnosing,返回 `<Path>{roots.workflows}/ops/P-plan-and-approve/P-plan-and-approve.md</Path>` 创建新计划并批量批准。不得临场修改旧计划。
|
|
44
|
+
|
|
45
|
+
### 4. 回滚
|
|
46
|
+
|
|
47
|
+
仅当 rollback 已在当前批准 batch 内,或 operation rollback mode=automatic 且触发条件确定命中时执行。使用 `<Path>{roots.workflows}/ops/E-execute-and-stabilize/rollback-template.md</Path>` 记录 checkpoint、反向依赖顺序、数据/流量影响和恢复后状态;数据恢复仍需计划中的独立授权。未批准恢复动作返回 P,不以紧急为由扩大权限。
|
|
48
|
+
|
|
49
|
+
### 5. 验证与完成
|
|
50
|
+
|
|
51
|
+
所有 mutation attempt 完成后设置 phase=stabilizing,从 `<Path>{roots.workflows}/ops/E-execute-and-stabilize/verification-state-template.json</Path>` 生成 `verification-state.json` v1,并按 `<Path>{roots.workflows}/ops/common/schemas/verification-state.schema.json</Path>` 校验。它穷尽 identity results、required Gates、目标端构件摘要、服务状态/restart/runtime digest、逐 probe 预期 HTTP/业务码/认证要求、收敛组、稳定窗口、数据保护、恢复兼容、previous release、rollback material、保留候选和风险。verification-only 还证明 snapshot scope、target identity、关键关联、容量和零 mutation。
|
|
52
|
+
|
|
53
|
+
使用 `<Path>{roots.workflows}/ops/E-execute-and-stabilize/verification-template.md</Path>` 投影 `verification.md`,并从 `<Path>{roots.workflows}/ops/E-execute-and-stabilize/handoff-template.md</Path>` 生成无密钥 `HANDOFF.md`;Markdown 不得成为结构化状态的替代事实源。production data mutation 的 protection 必须 verified,任何 waiver 都失败;local waiver 必须与 plan 的精确授权和完整 preflight 一致。
|
|
54
|
+
|
|
55
|
+
全部 required Gate/verification 通过且 HANDOFF 无密钥时,将 attempt 标记 succeeded,按实际结果设置 outcome=succeeded 或 rolled_back;用户明确终止、证明没有未受控 mutation并接受残余风险时可 abandoned。随后原子设置 change_status=completed、phase=ready_to_archive、completed_at,清空 blockers/current_work,运行 `--stage pre-close` 并返回 A。
|
|
56
|
+
|
|
57
|
+
## 完成标准
|
|
58
|
+
|
|
59
|
+
- 每次执行、诊断、回滚或只读验证都有独立 attempt,旧 attempt 未覆盖;
|
|
60
|
+
- 新 attempt 为 v2,journal 每行符合 journal-event v1,verification state/HANDOFF 与 attempt locator 一致;
|
|
61
|
+
- 每个 mutation 有有效批次批准、前后条件和脱敏 evidence;
|
|
62
|
+
- Gate 失败后未推进后续 operation,production 数据保护不存在 waiver;
|
|
63
|
+
- 失败后停止,新增修复动作通过 P 重新规划而非临场执行;
|
|
64
|
+
- 最终验证覆盖所有 required 条件和稳定窗口;
|
|
65
|
+
- 未知或失败状态没有 completed;
|
|
66
|
+
- completed change 通过 pre-close validator并路由 A。
|
|
67
|
+
|
|
68
|
+
## 子文件引用
|
|
69
|
+
|
|
70
|
+
- Attempt 摘要:`<Path>{roots.workflows}/ops/E-execute-and-stabilize/attempt-summary-template.md</Path>`
|
|
71
|
+
- 失败诊断:`<Path>{roots.workflows}/ops/E-execute-and-stabilize/diagnosis-template.md</Path>`
|
|
72
|
+
- 验证矩阵:`<Path>{roots.workflows}/ops/E-execute-and-stabilize/verification-template.md</Path>`
|
|
73
|
+
- 回滚记录:`<Path>{roots.workflows}/ops/E-execute-and-stabilize/rollback-template.md</Path>`
|
|
74
|
+
- 结构化验证与交接:`<Path>{roots.workflows}/ops/E-execute-and-stabilize/verification-state-template.json</Path>`、`<Path>{roots.workflows}/ops/E-execute-and-stabilize/handoff-template.md</Path>`
|
|
75
|
+
- Attempt、journal 与验证 schema:`<Path>{roots.workflows}/ops/common/schemas/attempt.schema.json</Path>`、`<Path>{roots.workflows}/ops/common/schemas/journal-event.schema.json</Path>`、`<Path>{roots.workflows}/ops/common/schemas/verification-state.schema.json</Path>`
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Ops Attempt Summary
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| Scope / project | {scope} / {project_id} |
|
|
6
|
+
| Change / attempt | {change} / {attempt_id} |
|
|
7
|
+
| Kind | deploy / remediation / rollback / verification-only |
|
|
8
|
+
| Triggered by | {triggered_by} |
|
|
9
|
+
| Plan / digest | {plan_path} / {plan_digest} |
|
|
10
|
+
| Approval | {approval_path} |
|
|
11
|
+
| Target profile / digest | {target_profile_path} / {target_profile_digest} |
|
|
12
|
+
| Verification state | {verification_state_path} |
|
|
13
|
+
| Handoff | {handoff_path} |
|
|
14
|
+
| Started / ended | {started_at} / pending |
|
|
15
|
+
| Result | running |
|
|
16
|
+
|
|
17
|
+
## Preflight
|
|
18
|
+
|
|
19
|
+
记录 profile/plan/approval 摘要、控制面 identity 重采集、protected targets、deployment root、数据保护和恢复资产;不得回显 secret。
|
|
20
|
+
|
|
21
|
+
## Gate Results
|
|
22
|
+
|
|
23
|
+
| Sequence | Gate | Status | Required verification | Evidence |
|
|
24
|
+
| --- | --- | --- | --- | --- |
|
|
25
|
+
|
|
26
|
+
## Batch and Operation Results
|
|
27
|
+
|
|
28
|
+
## Actual Mutations
|
|
29
|
+
|
|
30
|
+
所有事实事件逐行写入 append-only `journal.jsonl`,每行使用 journal-event v1;本摘要不替代 typed journal。
|
|
31
|
+
|
|
32
|
+
## Diagnostics Performed
|
|
33
|
+
|
|
34
|
+
## Failed and Not-run Operations
|
|
35
|
+
|
|
36
|
+
## Redactions
|
|
37
|
+
|
|
38
|
+
## Deviations and Residual Risk
|
|
39
|
+
|
|
40
|
+
## Data Protection and Recovery Assets
|
|
41
|
+
|
|
42
|
+
## Verification or Next Route
|
|
43
|
+
|
|
44
|
+
terminal attempt 引用 `verification-state.json`;成功、回滚或 completed abandoned 还必须引用无密钥 `HANDOFF.md`。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Attempt Diagnosis
|
|
2
|
+
|
|
3
|
+
## Failure Signature
|
|
4
|
+
|
|
5
|
+
提供稳定、脱敏、可检索的错误特征,不复制 secret 或无界原始日志。
|
|
6
|
+
|
|
7
|
+
## Target State and Evidence
|
|
8
|
+
|
|
9
|
+
## Hypotheses
|
|
10
|
+
|
|
11
|
+
| Hypothesis | Evidence for | Evidence against | Verdict |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
|
|
14
|
+
## Confirmed or Suspected Root Cause
|
|
15
|
+
|
|
16
|
+
明确 confidence 和仍缺失的证据。
|
|
17
|
+
|
|
18
|
+
## Actions Already Tried
|
|
19
|
+
|
|
20
|
+
## Proposed Remediation or Rollback
|
|
21
|
+
|
|
22
|
+
## Plan Delta Required
|
|
23
|
+
|
|
24
|
+
列出新增或改变的 mutation、command、write set、privilege、external target、验证和恢复;无变化时明确 `none`。
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Ops Deployment Handoff
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| Scope / project | {scope} / {project_id} |
|
|
6
|
+
| Change / attempt | {change} / {attempt_id} |
|
|
7
|
+
| Mode / environment | {operation_mode} / {environment_class} |
|
|
8
|
+
| Plan / approval | {plan_path} / {approval_path} |
|
|
9
|
+
| Verification state | {verification_state_path} |
|
|
10
|
+
| Verdict | passed / failed / blocked |
|
|
11
|
+
|
|
12
|
+
## Target and Control-plane Identity
|
|
13
|
+
|
|
14
|
+
只列非敏感 identity assertion、匹配结果与 evidence locator。
|
|
15
|
+
|
|
16
|
+
## Source and Immutable Artifacts
|
|
17
|
+
|
|
18
|
+
## Gate Results
|
|
19
|
+
|
|
20
|
+
## Services and Runtime Convergence
|
|
21
|
+
|
|
22
|
+
## Semantic Probes and Stability Windows
|
|
23
|
+
|
|
24
|
+
## Data Protection
|
|
25
|
+
|
|
26
|
+
## Recovery and Previous Release
|
|
27
|
+
|
|
28
|
+
## Retained Candidates and Rollback Assets
|
|
29
|
+
|
|
30
|
+
## Remaining Risks and Operator Follow-up
|
|
31
|
+
|
|
32
|
+
不得包含密码、token、私钥、cookie、完整连接串或 secret 值。凭据仅记录 provider/受控 locator、版本和 presence 状态。
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Attempt Rollback
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| Change / attempt | {change} / {attempt_id} |
|
|
6
|
+
| Failed attempt | {triggered_by} |
|
|
7
|
+
| Plan / approval | {plan_path} / {approval_path} |
|
|
8
|
+
| Restore checkpoint | {checkpoint} |
|
|
9
|
+
| Started / ended | {started_at} / pending |
|
|
10
|
+
|
|
11
|
+
## Trigger and Authorization
|
|
12
|
+
|
|
13
|
+
## Pre-rollback Target State
|
|
14
|
+
|
|
15
|
+
## Restore Operations
|
|
16
|
+
|
|
17
|
+
| Operation | Expected restore | Actual | Result | Evidence |
|
|
18
|
+
| --- | --- | --- | --- | --- |
|
|
19
|
+
|
|
20
|
+
## Data and Traffic Effects
|
|
21
|
+
|
|
22
|
+
## Post-rollback Target State
|
|
23
|
+
|
|
24
|
+
## Failed or Manual Recovery Items
|
|
25
|
+
|
|
26
|
+
## Residual Risks and Verification
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"artifact": "ops-verification-state",
|
|
4
|
+
"scope": "project",
|
|
5
|
+
"project_id": "{project_id}",
|
|
6
|
+
"change": "{change}",
|
|
7
|
+
"attempt_id": "{attempt_id}",
|
|
8
|
+
"captured_at": "{captured_at}",
|
|
9
|
+
"target_profile_path": "deployment/target-profile.json",
|
|
10
|
+
"target_profile_digest": "{target_profile_digest}",
|
|
11
|
+
"identity_results": [],
|
|
12
|
+
"gates": [],
|
|
13
|
+
"artifacts": [],
|
|
14
|
+
"services": [],
|
|
15
|
+
"probes": [],
|
|
16
|
+
"convergence": [],
|
|
17
|
+
"data_protection": [],
|
|
18
|
+
"recovery": {
|
|
19
|
+
"strategy": "not-applicable",
|
|
20
|
+
"previous_release_ref": null,
|
|
21
|
+
"rollback_operation_refs": [],
|
|
22
|
+
"material_refs": [],
|
|
23
|
+
"compatibility_verified": false,
|
|
24
|
+
"data_restore_authorized": null,
|
|
25
|
+
"evidence": []
|
|
26
|
+
},
|
|
27
|
+
"retained_artifacts": [],
|
|
28
|
+
"risks": [],
|
|
29
|
+
"verdict": "blocked"
|
|
30
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Attempt Verification
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| Change / attempt | {change} / {attempt_id} |
|
|
6
|
+
| Target | {target} |
|
|
7
|
+
| Target profile / digest | {target_profile_path} / {target_profile_digest} |
|
|
8
|
+
| Verification state | {verification_state_path} |
|
|
9
|
+
| Started / ended | {started_at} / pending |
|
|
10
|
+
| Outcome | pending |
|
|
11
|
+
|
|
12
|
+
## Target Re-read
|
|
13
|
+
|
|
14
|
+
## Identity Assertion Results
|
|
15
|
+
|
|
16
|
+
| Assertion | Comparison | Expected | Actual | Matched | Evidence |
|
|
17
|
+
| --- | --- | --- | --- | --- | --- |
|
|
18
|
+
|
|
19
|
+
## Gate Results
|
|
20
|
+
|
|
21
|
+
| Sequence | Gate | Status | Evidence |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
|
|
24
|
+
## Verification Matrix
|
|
25
|
+
|
|
26
|
+
| Check | Required | Method/environment | Expected | Actual | Result | Evidence |
|
|
27
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
28
|
+
|
|
29
|
+
## Immutable Artifacts and Target-side Digests
|
|
30
|
+
|
|
31
|
+
## Health, Ports and Dependencies
|
|
32
|
+
|
|
33
|
+
## Smoke and Business Signals
|
|
34
|
+
|
|
35
|
+
每个 probe 使用自身允许的 HTTP 状态、业务码与认证要求;记录瞬时失败和连续成功数。
|
|
36
|
+
|
|
37
|
+
## Restart and Persistence
|
|
38
|
+
|
|
39
|
+
## Resource and Stability Window
|
|
40
|
+
|
|
41
|
+
## Multi-instance Convergence
|
|
42
|
+
|
|
43
|
+
## Data and Migration
|
|
44
|
+
|
|
45
|
+
记录每个 protection id 的 backup/waiver/not-required/failed、evidence digest、readability 和 restore 验证。production 不允许 waiver;local waiver 必须与 plan 的精确授权一致。
|
|
46
|
+
|
|
47
|
+
## Recovery, Previous Release and Retained Assets
|
|
48
|
+
|
|
49
|
+
## Logs, Monitoring and Alerts
|
|
50
|
+
|
|
51
|
+
## Deviations and Residual Risks
|
|
52
|
+
|
|
53
|
+
## Completion Decision
|
|
54
|
+
|
|
55
|
+
本文件是 `verification-state.json` v1 的无密钥 Markdown 投影。结构化 state 缺失、摘要不匹配、required Gate/verification 未通过或 HANDOFF 含 secret 时不得 completed。
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ops/intake-and-assess
|
|
3
|
+
type: workflow-entry
|
|
4
|
+
workflow: ops
|
|
5
|
+
name: 摄入并评估运维目标
|
|
6
|
+
description: 初始化 Ops,识别全局或项目 scope,创建或恢复 change,并用系统盘点、项目分析和目标身份形成可规划部署档案。
|
|
7
|
+
keywords: [摄入, change, 项目识别, 系统盘点, 部署分析, target profile]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 摄入并评估运维目标
|
|
11
|
+
|
|
12
|
+
> 激活本 Work 后,先读取 `<Path>{roots.workflows}/ops/README.md</Path>`,再执行本入口。
|
|
13
|
+
|
|
14
|
+
I 是初始化、scope/project/change 选择、部署模型和 target profile 的唯一 owner。它回答“当前工作属于哪里、目标现在是什么、项目需要怎样部署、现场身份与授权边界是什么、是否已经可以规划”,不构建、安装、启动服务或修改目标。
|
|
15
|
+
|
|
16
|
+
## 流程
|
|
17
|
+
|
|
18
|
+
### 1. 初始化与确定 Scope
|
|
19
|
+
|
|
20
|
+
读取 `<Path>{roots.workflows}/ops/common/rules/project-and-change-scope.md</Path>`。缺少状态时以 schema v2 seed 原子创建 `status.json`,并创建不存在的全局 `changes/`、`archive/`、`context/`、`adr/`、`runbooks/` 和 `projects/`;已有内容只验证,不覆盖或猜测迁移。
|
|
21
|
+
|
|
22
|
+
系统基线、Docker/宿主机通用配置或跨项目文档使用 `scope=global`。指定项目的部署、修复、扩容、升级和回滚使用 `scope=project`。项目 scope 必须解析或创建 `<Path>{roots.state}/ops/projects/{project_id}/project.json</Path>`,对照 `<Path>{roots.workflows}/ops/common/schemas/project.schema.json</Path>` 验证稳定 id、显示名、aliases 和无凭据 identity。
|
|
23
|
+
|
|
24
|
+
### 2. 创建或恢复 Change
|
|
25
|
+
|
|
26
|
+
在 scope 根选择用户指定 change、唯一 active change 或新 change;多个候选一次性消歧。新 change 使用 `YYYY-MM-DD-<topic>[-NN]`:project scope 从 `<Path>{roots.workflows}/ops/I-intake-and-assess/change-status-template.json</Path>` 创建 `.status.json`,global scope 从 `<Path>{roots.workflows}/ops/I-intake-and-assess/global-change-status-template.json</Path>` 创建;随后用 `<Path>{roots.workflows}/ops/I-intake-and-assess/request-template.md</Path>` 初始化 request、LOG、CONTEXT 和 ADR。
|
|
27
|
+
|
|
28
|
+
先原子写 change,再将 `{scope, project_id, change}` 加入全局 active。归档历史只读;继续历史时创建 follow-up,并记录 `derived_from` 的完整 scope locator。项目 change 根必须是 `<Path>{roots.state}/ops/projects/{project_id}/changes/{change}/</Path>`,不得使用全局 flat change 目录。
|
|
29
|
+
|
|
30
|
+
### 3. 盘点目标系统
|
|
31
|
+
|
|
32
|
+
读取 `<Path>{roots.workflows}/ops/common/rules/path-and-scope-contract.md</Path>` 和 `<Path>{roots.workflows}/ops/common/rules/evidence-and-redaction.md</Path>`,按 `<Path>{roots.workflows}/ops/I-intake-and-assess/collector-catalog.md</Path>` 运行适用 L0/L1 collectors。L2 只针对用户一次批准的根列表。
|
|
33
|
+
|
|
34
|
+
把不可覆盖快照写入 change `inventory/snapshots/{snapshot-id}.json`,并从 `<Path>{roots.workflows}/ops/I-intake-and-assess/system-report-template.md</Path>` 更新 `inventory/system-report.md`。瞬时 Docker/进程/端口状态只留在 change;稳定系统事实在 A 阶段才可提升为全局 context。
|
|
35
|
+
|
|
36
|
+
### 4. 分析项目部署与目标身份
|
|
37
|
+
|
|
38
|
+
global inventory-only 请求跳过 deployment model,但仍为 verification-only 目标生成非 mutation target profile;global 配置变更则以 `project=null` 建立系统配置 deployment model。project scope 读取真实项目指令和 `<Path>{roots.workflows}/ops/I-intake-and-assess/project-detection.md</Path>`,穷尽实际 manifest、lockfile、容器、CI/CD、配置、服务、集群、数据、健康和恢复线索;结构化格式使用 parser。
|
|
39
|
+
|
|
40
|
+
读取 `<Path>{roots.workflows}/ops/common/rules/target-profile-and-release-gates.md</Path>`,从 `<Path>{roots.workflows}/ops/I-intake-and-assess/target-profile-template.json</Path>` 生成 `deployment/target-profile.json` v1,并按 `<Path>{roots.workflows}/ops/common/schemas/target-profile.schema.json</Path>` 验证。profile 选择 `audit | takeover | fresh | release | upgrade | rollback`,记录 environment class、唯一 deployment root、existing state、不可拆分 identity assertions、owned/protected/unknown targets、差异分类和 secret provider/locator 元数据。
|
|
41
|
+
|
|
42
|
+
只要存在持久目录、控制面资源、数据、路由或服务,就使用 takeover;现场为 present 或 unknown 时不得选择 fresh。fresh 只在目标为空、归属明确且 protected/unknown targets 为空时 Ready。mutation 模式必须有整体 identity confirmation;ownership-conflict、unknown difference、未确认身份或不明 deployment root 都使 profile blocked。
|
|
43
|
+
|
|
44
|
+
会联网、执行项目代码、写 cache 或下载依赖的动态 probe 只登记,不在 I 执行。写入 `deployment/deployment-model.json`、`deployment/target-profile.json` 和 `deployment/deployment-dossier.md`,分别对照 schema 与 `<Path>{roots.workflows}/ops/I-intake-and-assess/deployment-dossier-template.md</Path>`。配置和 secret requirement 只记录 key、scope、provider/受控 source ref、version/presence,不保存值。
|
|
45
|
+
|
|
46
|
+
### 5. 验证与路由
|
|
47
|
+
|
|
48
|
+
运行 validator 并重读工件。全局 inventory-only 在快照完整且 audit profile 有效时将 phase 设为 assessment,路由 `<Path>{roots.workflows}/ops/E-execute-and-stabilize/E-execute-and-stabilize.md</Path>` 的 verification-only 分支。项目部署或全局 mutation 只有 deployment model 与 target profile 都 Ready 才进入 `<Path>{roots.workflows}/ops/P-plan-and-approve/P-plan-and-approve.md</Path>`;blocking unknown 保持 blocked,并一次列出 owner 和所需决定。
|
|
49
|
+
|
|
50
|
+
## 完成标准
|
|
51
|
+
|
|
52
|
+
- scope/project/change tuple 唯一且与实际目录、全局索引一致;
|
|
53
|
+
- 项目身份不会因目录同名误合并,也不包含凭据;
|
|
54
|
+
- target profile v1 固定 operation mode、environment、deployment root、控制面身份、ownership 与差异分类;
|
|
55
|
+
- present/unknown 现场没有被误判为 fresh,mutation profile 已显式确认整体身份;
|
|
56
|
+
- 适用 collector 全部得到 observed/partial/unavailable/denied/failed 结论;
|
|
57
|
+
- 项目评估穷尽实际部署入口且未把推断伪装为观测;
|
|
58
|
+
- 未发生构建、安装、目标写入或外部 mutation;
|
|
59
|
+
- validator 通过并返回唯一下一路由。
|
|
60
|
+
|
|
61
|
+
## 子文件引用
|
|
62
|
+
|
|
63
|
+
- 状态与请求模板:`<Path>{roots.workflows}/ops/I-intake-and-assess/change-status-template.json</Path>`、`<Path>{roots.workflows}/ops/I-intake-and-assess/global-change-status-template.json</Path>`、`<Path>{roots.workflows}/ops/I-intake-and-assess/request-template.md</Path>`
|
|
64
|
+
- 盘点分支:`<Path>{roots.workflows}/ops/I-intake-and-assess/collector-catalog.md</Path>`、`<Path>{roots.workflows}/ops/I-intake-and-assess/system-report-template.md</Path>`
|
|
65
|
+
- 项目分支:`<Path>{roots.workflows}/ops/I-intake-and-assess/project-detection.md</Path>`、`<Path>{roots.workflows}/ops/I-intake-and-assess/deployment-dossier-template.md</Path>`
|
|
66
|
+
- Target profile:`<Path>{roots.workflows}/ops/I-intake-and-assess/target-profile-template.json</Path>`、`<Path>{roots.workflows}/ops/common/schemas/target-profile.schema.json</Path>`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 2,
|
|
3
|
+
"artifact": "ops-change-status",
|
|
4
|
+
"scope": "project",
|
|
5
|
+
"project_id": "{project_id}",
|
|
6
|
+
"change": "{change}",
|
|
7
|
+
"change_status": "active",
|
|
8
|
+
"phase": "intake",
|
|
9
|
+
"current_work": null,
|
|
10
|
+
"works_run": [],
|
|
11
|
+
"created_at": "{created_at}",
|
|
12
|
+
"updated_at": "{updated_at}",
|
|
13
|
+
"completed_at": null,
|
|
14
|
+
"archived_at": null,
|
|
15
|
+
"archive_path": null,
|
|
16
|
+
"source_revision": null,
|
|
17
|
+
"target_fingerprint": null,
|
|
18
|
+
"plan_path": null,
|
|
19
|
+
"plan_digest": null,
|
|
20
|
+
"approval_path": null,
|
|
21
|
+
"approval_status": "not_requested",
|
|
22
|
+
"approved_batches": [],
|
|
23
|
+
"latest_attempt_id": null,
|
|
24
|
+
"outcome": "pending",
|
|
25
|
+
"blockers": []
|
|
26
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# 系统盘点 Collector 目录
|
|
2
|
+
|
|
3
|
+
只选择当前目标适用且已存在的工具。以下命令族是发现候选,不是强制执行清单;运行前检查帮助、版本、权限和输出敏感性。
|
|
4
|
+
|
|
5
|
+
## L0
|
|
6
|
+
|
|
7
|
+
| Category | Unix/Linux candidates | macOS candidates | Required result |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| Host | `uname`, `/etc/os-release`, `hostname`, `uptime` | `uname`, `sw_vers`, `hostname`, `uptime` | OS、架构、稳定目标标识、时间 |
|
|
10
|
+
| Capacity | `nproc`, `free`, `df`, `df -i`, `mount`, `lsblk` | `sysctl`, `vm_stat`, `df`, `mount`, `diskutil` | CPU、内存、挂载点、容量和 inode |
|
|
11
|
+
| Runtimes | 查询已安装 Java/Go/Node/Python/Docker/包管理器版本 | 同左 | executable、版本、来源;不安装 |
|
|
12
|
+
|
|
13
|
+
## L1
|
|
14
|
+
|
|
15
|
+
| Category | Candidates | Required result |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| Services | `systemctl list-units/show`;macOS `launchctl` | 名称、状态、unit/plist、ExecStart、WorkingDirectory |
|
|
18
|
+
| Processes | `ps`、受限 `/proc/<pid>`、`lsof` 或 osquery | PID 仅作瞬时证据;关联 executable、cwd、user |
|
|
19
|
+
| Network | `ss`、`lsof -i`、`netstat` | listener、address、port、process;不扫描外部网络 |
|
|
20
|
+
| Docker | `docker info/ps/compose ls/system df` 和必要 inspect | context、daemon、container/image/volume/network、compose 与 bind path |
|
|
21
|
+
| Kubernetes | current-context 和 scoped `get` | context、namespace、workload、service、ingress;不切换 context |
|
|
22
|
+
| Project locations | 从 service cwd、compose labels、bind mounts 和明确 roots 反查 | 只报告证据支持的路径 |
|
|
23
|
+
|
|
24
|
+
Docker inspect、Compose config、进程环境和 Kubernetes Secret 可能泄露敏感值。默认不读取进程完整环境或 Secret data,保存前按 evidence-and-redaction 处理。
|
|
25
|
+
|
|
26
|
+
## L2
|
|
27
|
+
|
|
28
|
+
只对批准根执行受限深度的容量、权限、文件类型、最大文件或 inode 热点分析。记录根、排除项、超时和实际边界;不得跟随符号链接越界或读取文件正文来判断占用。
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Deployment Dossier
|
|
2
|
+
|
|
3
|
+
| Field | Value |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| Project / change | {project_id} / {change} |
|
|
6
|
+
| Source root | {source_root} |
|
|
7
|
+
| Source revision | {source_revision} |
|
|
8
|
+
| Target snapshot | {snapshot_path} |
|
|
9
|
+
| Target profile / digest | deployment/target-profile.json / {target_profile_digest} |
|
|
10
|
+
| Operation mode | audit / takeover / fresh / release / upgrade / rollback |
|
|
11
|
+
| Environment class | local / shared-nonprod / production |
|
|
12
|
+
| Existing state | absent / present / unknown |
|
|
13
|
+
| Identity confirmed | true / false |
|
|
14
|
+
| Deployment root | {deployment_root} |
|
|
15
|
+
| Existing project SOP | {runbook_paths} |
|
|
16
|
+
| Readiness | blocked / ready |
|
|
17
|
+
|
|
18
|
+
## Requested Outcome and Constraints
|
|
19
|
+
|
|
20
|
+
## Component and Runtime Map
|
|
21
|
+
|
|
22
|
+
## Build, Artifact, Start and Restart
|
|
23
|
+
|
|
24
|
+
## Middleware and External Dependencies
|
|
25
|
+
|
|
26
|
+
## Configuration Matrix
|
|
27
|
+
|
|
28
|
+
仅记录 key、scope、required、secret 和 source reference。
|
|
29
|
+
|
|
30
|
+
## Ports, Exposure and Health
|
|
31
|
+
|
|
32
|
+
## Data, Volumes, Migration and Backup
|
|
33
|
+
|
|
34
|
+
## Deployment Options and Tradeoffs
|
|
35
|
+
|
|
36
|
+
## Selected Method and Target Fit
|
|
37
|
+
|
|
38
|
+
## Target and Control-plane Identity
|
|
39
|
+
|
|
40
|
+
逐项列出 provider、key、comparison、非敏感 expected 与 evidence。Compose project、有序 files、env file、services、labels/image identity 和 bind host 不得折叠成单一目录名判断。
|
|
41
|
+
|
|
42
|
+
## Ownership and Difference Classification
|
|
43
|
+
|
|
44
|
+
列出 owned/protected/unknown targets;每项差异只能是 expected、safe-reconcile、requires-backup、ownership-conflict 或 unknown。
|
|
45
|
+
|
|
46
|
+
## Immutable Artifacts, Staging and Activation
|
|
47
|
+
|
|
48
|
+
## Required Gates and Stability Expectations
|
|
49
|
+
|
|
50
|
+
## Security and Required Privileges
|
|
51
|
+
|
|
52
|
+
## Secret Requirements
|
|
53
|
+
|
|
54
|
+
只记录 key、provider/受控 source reference、version 和 presence requirement,不保存值。
|
|
55
|
+
|
|
56
|
+
## Prior SOP, Known Failures and Applicable ADRs
|
|
57
|
+
|
|
58
|
+
## Unknowns and Dynamic Probes
|
|
59
|
+
|
|
60
|
+
## Planning Preconditions
|
|
61
|
+
|
|
62
|
+
## Evidence Sources
|