project-tiny-context-harness 0.8.12 → 0.8.16
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.md +62 -28
- package/assets/README.md +98 -45
- package/assets/README.zh-CN.md +68 -32
- package/assets/agents/AGENTS_CORE.md +10 -6
- package/assets/agents/long-task-implementation.toml +1 -1
- package/assets/skills/context_development_engineer/SKILL.md +9 -1
- package/assets/skills/design-resource-authoring/SKILL.md +7 -5
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +2 -2
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +22 -2
- package/assets/skills/design-resource-authoring/references/recovery-and-writeback.md +199 -0
- package/assets/skills/design-resource-authoring/references/resource-selection.md +2 -2
- package/assets/skills/long-task-workflow/SKILL.md +14 -12
- package/assets/skills/long-task-workflow/agents/openai.yaml +1 -1
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +1 -1
- package/assets/skills/long-task-workflow/references/contract-authoring.md +27 -22
- package/assets/skills/long-task-workflow/references/evidence-design.md +49 -32
- package/assets/skills/long-task-workflow/references/source-authoring.md +2 -2
- package/dist/commands/design-resource-recovery.d.ts +1 -0
- package/dist/commands/design-resource-recovery.js +152 -0
- package/dist/commands/design-resource.js +20 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/long-task-revision.js +4 -4
- package/dist/lib/design-resource-reconciliation-codec.d.ts +2 -0
- package/dist/lib/design-resource-reconciliation-codec.js +174 -0
- package/dist/lib/design-resource-reconciliation-types.d.ts +62 -0
- package/dist/lib/design-resource-reconciliation-types.js +1 -0
- package/dist/lib/design-resource-reconciliation.d.ts +3 -0
- package/dist/lib/design-resource-reconciliation.js +224 -0
- package/dist/lib/design-resource-recovery-authority-policy.d.ts +8 -0
- package/dist/lib/design-resource-recovery-authority-policy.js +123 -0
- package/dist/lib/design-resource-recovery-catalog-resources.d.ts +6 -0
- package/dist/lib/design-resource-recovery-catalog-resources.js +121 -0
- package/dist/lib/design-resource-recovery-catalog-shape.d.ts +3 -0
- package/dist/lib/design-resource-recovery-catalog-shape.js +104 -0
- package/dist/lib/design-resource-recovery-catalog.d.ts +9 -0
- package/dist/lib/design-resource-recovery-catalog.js +103 -0
- package/dist/lib/design-resource-recovery-cleanup.d.ts +2 -0
- package/dist/lib/design-resource-recovery-cleanup.js +11 -0
- package/dist/lib/design-resource-recovery-codec-primitives.d.ts +19 -0
- package/dist/lib/design-resource-recovery-codec-primitives.js +92 -0
- package/dist/lib/design-resource-recovery-codec.d.ts +4 -0
- package/dist/lib/design-resource-recovery-codec.js +93 -0
- package/dist/lib/design-resource-recovery-current.d.ts +9 -0
- package/dist/lib/design-resource-recovery-current.js +41 -0
- package/dist/lib/design-resource-recovery-delta-policy.d.ts +5 -0
- package/dist/lib/design-resource-recovery-delta-policy.js +108 -0
- package/dist/lib/design-resource-recovery-files.d.ts +37 -0
- package/dist/lib/design-resource-recovery-files.js +204 -0
- package/dist/lib/design-resource-recovery-final-disposition-shape.d.ts +2 -0
- package/dist/lib/design-resource-recovery-final-disposition-shape.js +47 -0
- package/dist/lib/design-resource-recovery-patch-types.d.ts +54 -0
- package/dist/lib/design-resource-recovery-patch-types.js +1 -0
- package/dist/lib/design-resource-recovery-replay.d.ts +7 -0
- package/dist/lib/design-resource-recovery-replay.js +112 -0
- package/dist/lib/design-resource-recovery-repository-bindings.d.ts +9 -0
- package/dist/lib/design-resource-recovery-repository-bindings.js +49 -0
- package/dist/lib/design-resource-recovery-schema.d.ts +5 -0
- package/dist/lib/design-resource-recovery-schema.js +5 -0
- package/dist/lib/design-resource-recovery-shape.d.ts +10 -0
- package/dist/lib/design-resource-recovery-shape.js +184 -0
- package/dist/lib/design-resource-recovery-source-authority.d.ts +5 -0
- package/dist/lib/design-resource-recovery-source-authority.js +219 -0
- package/dist/lib/design-resource-recovery-text.d.ts +17 -0
- package/dist/lib/design-resource-recovery-text.js +186 -0
- package/dist/lib/design-resource-recovery-types.d.ts +197 -0
- package/dist/lib/design-resource-recovery-types.js +1 -0
- package/dist/lib/design-resource-recovery-writeback-policy.d.ts +5 -0
- package/dist/lib/design-resource-recovery-writeback-policy.js +326 -0
- package/dist/lib/design-resource-recovery-writeback-shape.d.ts +6 -0
- package/dist/lib/design-resource-recovery-writeback-shape.js +155 -0
- package/dist/lib/design-resource-recovery.d.ts +44 -0
- package/dist/lib/design-resource-recovery.js +216 -0
- package/dist/lib/long-task-acceptance-shape.js +8 -2
- package/dist/lib/long-task-activation-validation.js +13 -3
- package/dist/lib/long-task-admitted-observation-records.d.ts +25 -0
- package/dist/lib/long-task-admitted-observation-records.js +40 -0
- package/dist/lib/long-task-admitted-observation.d.ts +93 -0
- package/dist/lib/long-task-admitted-observation.js +201 -0
- package/dist/lib/long-task-artifacts.d.ts +1 -0
- package/dist/lib/long-task-artifacts.js +1 -0
- package/dist/lib/long-task-authority-material-diff.js +1 -0
- package/dist/lib/long-task-authority-policy.d.ts +2 -0
- package/dist/lib/long-task-authority-policy.js +2 -0
- package/dist/lib/long-task-authority-revision-brief.js +3 -1
- package/dist/lib/long-task-authority-revision-details.js +3 -1
- package/dist/lib/long-task-authority-revision-summary.js +6 -2
- package/dist/lib/long-task-authority-revision-types.d.ts +2 -0
- package/dist/lib/long-task-authority.js +2 -1
- package/dist/lib/long-task-check-execution-policy.js +5 -0
- package/dist/lib/long-task-check-runner.d.ts +2 -2
- package/dist/lib/long-task-check-runner.js +440 -23
- package/dist/lib/long-task-claims.d.ts +18 -0
- package/dist/lib/long-task-claims.js +35 -0
- package/dist/lib/long-task-compact-structure-targets.js +1 -0
- package/dist/lib/long-task-conformance-policy.js +3 -1
- package/dist/lib/long-task-counterfactual-claim-policy.d.ts +3 -4
- package/dist/lib/long-task-counterfactual-claim-policy.js +11 -3
- package/dist/lib/long-task-counterfactual-sandbox.js +1 -0
- package/dist/lib/long-task-counterfactual-types.d.ts +2 -0
- package/dist/lib/long-task-delivery-compiler.js +2 -0
- package/dist/lib/long-task-design-resource-method-binding.js +8 -2
- package/dist/lib/long-task-evidence-capability-policy.d.ts +3 -2
- package/dist/lib/long-task-evidence-capability-policy.js +114 -8
- package/dist/lib/long-task-evidence-capability-runtime.d.ts +5 -2
- package/dist/lib/long-task-evidence-capability-runtime.js +149 -5
- package/dist/lib/long-task-evidence-sensitivity-policy.d.ts +9 -0
- package/dist/lib/long-task-evidence-sensitivity-policy.js +31 -1
- package/dist/lib/long-task-evidence-v2.d.ts +4 -4
- package/dist/lib/long-task-evidence-v2.js +321 -43
- package/dist/lib/long-task-exact-comparison.d.ts +16 -0
- package/dist/lib/long-task-exact-comparison.js +28 -0
- package/dist/lib/long-task-execution-observation.d.ts +24 -0
- package/dist/lib/long-task-execution-observation.js +332 -0
- package/dist/lib/long-task-explain-acceptance-link.d.ts +4 -0
- package/dist/lib/long-task-explain-acceptance-link.js +4 -0
- package/dist/lib/long-task-explain-claim-links.d.ts +2 -0
- package/dist/lib/long-task-explain-claim-links.js +2 -0
- package/dist/lib/long-task-explain-source-links.d.ts +6 -0
- package/dist/lib/long-task-final-v2.js +7 -4
- package/dist/lib/long-task-git.d.ts +26 -0
- package/dist/lib/long-task-git.js +130 -0
- package/dist/lib/long-task-json-pointer-observation.d.ts +59 -0
- package/dist/lib/long-task-json-pointer-observation.js +184 -0
- package/dist/lib/long-task-observation-artifact.d.ts +8 -0
- package/dist/lib/long-task-observation-artifact.js +58 -0
- package/dist/lib/long-task-observation-authority.d.ts +17 -0
- package/dist/lib/long-task-observation-authority.js +348 -0
- package/dist/lib/long-task-paths.js +2 -2
- package/dist/lib/long-task-process-observation.d.ts +6 -0
- package/dist/lib/long-task-process-observation.js +117 -0
- package/dist/lib/long-task-process-runtime-closure.d.ts +13 -0
- package/dist/lib/long-task-process-runtime-closure.js +207 -0
- package/dist/lib/long-task-progress.js +2 -0
- package/dist/lib/long-task-protected-files.d.ts +1 -1
- package/dist/lib/long-task-protected-files.js +1 -30
- package/dist/lib/long-task-risk.js +8 -3
- package/dist/lib/long-task-root-shape.js +10 -1
- package/dist/lib/long-task-runner-environment.d.ts +1 -1
- package/dist/lib/long-task-runner-environment.js +4 -4
- package/dist/lib/long-task-runner-freeze.d.ts +4 -2
- package/dist/lib/long-task-runner-freeze.js +128 -28
- package/dist/lib/long-task-runtime-types.d.ts +111 -0
- package/dist/lib/long-task-scoped-binding.d.ts +13 -0
- package/dist/lib/long-task-scoped-binding.js +11 -0
- package/dist/lib/long-task-semantic-contract-types.d.ts +1 -0
- package/dist/lib/long-task-semantic-fact-contract-closure.js +3 -3
- package/dist/lib/long-task-semantic-fact-evidence.d.ts +3 -3
- package/dist/lib/long-task-semantic-fact-evidence.js +75 -58
- package/dist/lib/long-task-source-claim-validation.js +4 -1
- package/dist/lib/long-task-source-target-continuity.d.ts +2 -2
- package/dist/lib/long-task-source-target-continuity.js +35 -2
- package/dist/lib/long-task-source-target-index.d.ts +3 -0
- package/dist/lib/long-task-source-target-index.js +19 -0
- package/dist/lib/long-task-stage-policy.js +10 -4
- package/dist/lib/long-task-static-observation-freeze.d.ts +83 -0
- package/dist/lib/long-task-static-observation-freeze.js +428 -0
- package/dist/lib/long-task-status-projection.js +5 -1
- package/dist/lib/long-task-target-policy.d.ts +1 -1
- package/dist/lib/long-task-target-policy.js +3 -0
- package/dist/lib/long-task-verifier-authority.js +2 -0
- package/dist/lib/long-task-verifier-dependency-closure.js +7 -3
- package/dist/lib/long-task-verifier-v2.js +70 -9
- package/dist/lib/long-task-workspace-manifest.d.ts +8 -0
- package/dist/lib/long-task-workspace-manifest.js +173 -0
- package/dist/lib/long-task-workspace-snapshot.d.ts +8 -0
- package/dist/lib/long-task-workspace-snapshot.js +176 -0
- package/dist/lib/long-task-workspace.d.ts +5 -26
- package/dist/lib/long-task-workspace.js +4 -444
- package/dist/lib/repository-path-safety.d.ts +14 -0
- package/dist/lib/repository-path-safety.js +126 -0
- package/dist/long-task-hook.js +12 -3
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +53 -8
- package/migrations/README.md +77 -0
- package/package.json +1 -1
package/assets/README.zh-CN.md
CHANGED
|
@@ -73,9 +73,9 @@ ty-context enable long-task
|
|
|
73
73
|
|
|
74
74
|
1. **只启用一次 Long-Task。** 选择工作流 Skill 前先运行 `ty-context enable long-task`。
|
|
75
75
|
2. **仅在需要时建立 Design Authority。** 如果项目尚未采用 Design Authority,且本次工作属于 style-bearing 范围,显式选择 `$design-system-authoring`,生成、选择并采用规范 `DESIGN.md`、token source 和 provider binding。项目已经配置 Design Authority 时跳过这一步。
|
|
76
|
-
3. **准备一份可写的初始方案。** 将项目原生的产品/技术方案放在明确路径,例如 `docs/initial-proposal.md`。它可以由用户、外部服务或显式请求的适用方案能力编写。`design-resource-authoring` 不负责初始方案 authoring
|
|
76
|
+
3. **准备一份可写的初始方案。** 将项目原生的产品/技术方案放在明确路径,例如 `docs/initial-proposal.md`。它可以由用户、外部服务或显式请求的适用方案能力编写。`design-resource-authoring` 不负责初始方案 authoring,也不要求经过独立的中间 authoring 阶段。
|
|
77
77
|
4. **生成并选择设计资源。** 选择 `$design-resource-authoring`,传入初始方案路径、精确开发范围和目标。它会输出一份完成一次性回改的修订方案、选定的不可变规范资源及其 manifest 和 dependencies,以及通过校验的残余 `design-resource-handoff-v1`。
|
|
78
|
-
5. **启动 Single-Goal 交付。** 选择 `$long-task-workflow`,传入修订方案、已校验 handoff 和选定规范资源集合的精确路径。该 Skill 会建立 Source-bound Contract Draft;第一次 Compile/Authority Lock 必须在实现前无条件结束当前回合,并输出
|
|
78
|
+
5. **启动 Single-Goal 交付。** 选择 `$long-task-workflow`,传入修订方案、已校验 handoff 和选定规范资源集合的精确路径。该 Skill 会建立 Source-bound Contract Draft;第一次 Compile/Authority Lock 必须在实现前无条件结束当前回合,并输出 `处理好模型更换后,请仅回复:模型切换卡点解除,继续`。普通“继续”不满足 managed prompt protocol;此前任何模型策略文字都不能跳过该边界,Harness 也不能观察下一条宿主消息或模型是否真的改变。用户恢复后,父 Goal 先识别合格的有界工作包,再判断 profile/capacity;没有用户或宿主显式禁止时,合格集合必须实际调用多个精确 `long_task_implementation`,由宿主结果进入六理由 zero-start 或 partial delegation。数量保持动态,禁止 generic 替代项;Source、Contract、Authority、架构、Context、工作包选择、集成、当前候选检查、正式验证、Final Gate、close 与 completion 始终只由父 Goal 持有。
|
|
79
79
|
|
|
80
80
|
一组可以直接改写使用的调用顺序如下:
|
|
81
81
|
|
|
@@ -98,7 +98,7 @@ $long-task-workflow 将 docs/initial-proposal.md、<handoff.md> 以及选定的
|
|
|
98
98
|
- **交付前确实需要设计资源:** 按上面的设计优先顺序执行,再根据恢复与完成权威需求,把修订方案、已校验 handoff 和选定的不可变规范资源集合交给默认 Workflow Contract 或 `long-task-workflow`。
|
|
99
99
|
- **只需要设计资源:** 在 `design-resource-authoring` 完成后结束;除非还明确选择了实现交付,否则不创建 Long-Task Contract。
|
|
100
100
|
|
|
101
|
-
设计系统通常在项目冷启动时确定,但该 Skill 只由用户选择,`init`、`sync` 与下游 Skill 都不会自动执行。`design-resource-authoring` 只对高保真、品牌化、视觉处理等 style-bearing 资源设门禁;低保真结构、IA
|
|
101
|
+
设计系统通常在项目冷启动时确定,但该 Skill 只由用户选择,`init`、`sync` 与下游 Skill 都不会自动执行。`design-resource-authoring` 只对高保真、品牌化、视觉处理等 style-bearing 资源设门禁;低保真结构、IA/流程与纯语义状态研究不受此门禁。已有计划或提案文档仍是普通 Source,但不再是推荐中间服务。
|
|
102
102
|
|
|
103
103
|
## Minimal Context 与默认工作流
|
|
104
104
|
|
|
@@ -175,6 +175,8 @@ Context: no durable fact change
|
|
|
175
175
|
|
|
176
176
|
Shared Engineering Quality 在不增加工作流的前提下扩展原有架构义务。每个实现需求都在第一处实现编辑前,对用户可见地完成一次 `Architecture Deliberation`;风险改变深度,不取消这个环节。小修改要指出具体 owner / 当前 extension point、未改变的耐久边界、适用质量属性的 preservation,以及为何没有新增或加重技术债。material 工作还要覆盖唯一 source of truth、dependency 与 interface/state/resource lifecycle 边界、选中和拒绝的方案、至少一个合理未来变化及其扩展点、触达的技术债、forbidden shortcuts、项目原生可执行检查和触发的 failure/load/threat 场景。correctness/invariant 与 maintainability/changeability 至少给出 preservation;reliability/resource lifecycle、concurrency/consistency、performance/capacity/cost、security/privacy/safety、compatibility/migration/rollout、operability/observability/testability 只在 material 时激活。
|
|
177
177
|
|
|
178
|
+
当工作新增基础设施、实现成熟协议/安全边界、引入依赖或共享抽象,或遇到邻近 extension point 时,Architecture Deliberation 会按风险增加 Build / Reuse / Buy 判断。它记录 allowed solution set、prohibited failure modes 与 required rationale/evidence,而不指定唯一库或抽象。复用现有 owner、标准能力、已安装依赖、成熟且兼容的外部库、小型有界自研和有意不抽象都可能合法;重复 owner 规则、绕过 extension point、无依据重依赖、不完整安全能力自研、许可证/平台不兼容、强行抽象与第二 source of truth 均不允许。这里不增加强制开源/DRY 规则、通用评分、阶段或 Gate。
|
|
179
|
+
|
|
178
180
|
实现顺序、方法和反馈节奏仍由 Goal 决定。轻量纪律只要求复用 owning service/facade/adapter 与唯一 source of truth,做最小而完整的变化,保留明确 failure/resource 语义,并仅为稳定概念或有证据的变化轴增加抽象。精确产品/技术谓词继续由 Semantic Facts 拥有,精确选定 UI/UX 值由 selected-design closure 拥有。
|
|
179
181
|
|
|
180
182
|
实现和项目验证之后,`Engineering Quality Conformance` 包含 `Architecture Conformance`,对当前候选快照检查 scope/path escape、owner/dependency 违规或 bypass、重复 truth、未声明 boundary/lifecycle 变化、silent failure、适用 resource/concurrency/security/compatibility/operability 缺陷、无证据性能声称、缺失声明检查和新增/加重技术债。性能声称必须绑定 workload、metric、baseline 或 budget、environment、comparator/tolerance 和项目原生 benchmark/probe;静态形状不证明运行时性能。候选或 controlling input 再变化就使结果失效。默认路线把它放在 Contract Conformance 内;Long-Task 用已有 Source-backed obligation/constraint/forbidden shortcut、owner/path/Binding、executable Check,以及功能 pass 时仍可能独立失败的 Assertion 表达不变量。Final Gate 是唯一 Long-Task carrier,只证明该声明、可证伪、项目检查绑定的集合,不证明整体代码质量;同一候选不会执行两套 carrier。
|
|
@@ -221,17 +223,21 @@ provider-neutral handoff 是残余语义与绑定层,不是 CSS 文本副本
|
|
|
221
223
|
|
|
222
224
|
容量优化发生在生成表示上,不是生成后拆分。写 Markdown 前,DSA 冻结明确的 canonical manifest 路径集合、target/scope identity、文件 SHA-256 与每个 collection 的精确 count/identity digest,并声明实际 UTF-8 上限;随后直接生成一 target 一份的小型 manifest-backed draft,其中不再复制 axes/conditions/subjects/variations/properties/lineage/Fact Cells/Facts/evidence/proofs/Oracles/environments/assets/blockers。共享含义用唯一 key 的 target-attributed Source Fact 保留原 predicate 与 provenance。`ty-context design-resource bundle` 对完整 draft/manifest 集合逐 target 做单快照 preflight,拒绝嵌入式全量数组、多 target draft、超限 descriptor、target 缺失/多出/重复及任何 manifest/digest/语义漂移,再用同卷临时目录把整组原子发布到此前不存在的最终目录。失败只删除命令自己的临时目录,不覆盖、拆分或改写 draft/已采纳 handoff。字节检查只是防止生成器违约或后续突变,不是 post-hoc split;真实 residual 数据若无法满足所选上限,就判定该上限不兼容并 fail closed,绝不拆 target、抽样、截断、粗化 Fact 或扩大 exclusion。Long-Task 只在既有读取接缝逐 target 消费规范化对象,不改变 Contract、Authority、Outcome、Final Gate、状态恢复或完成判定。
|
|
223
225
|
|
|
224
|
-
这些输入仍是 Source。默认 Workflow 打开受影响的 exact target/constraint 及其声明条件,把它们路由到生产 owner 和冷启动旅程,在最终候选运行适用的视觉、交互、无障碍或 runtime 检查,并报告检查未建立的条件;它不重建完整 UI Fact Cell universe 或逐 Fact×method 生产结果账本。Long-Task 把精确 universe 投影进已有 Claims/Assertions/Checks/Bindings:每个 method/condition cell 保存精确 `fact_refs`,每个 Fact/proof obligation 有一个 `fact_expectations` row
|
|
226
|
+
这些输入仍是 Source。默认 Workflow 打开受影响的 exact target/constraint 及其声明条件,把它们路由到生产 owner 和冷启动旅程,在最终候选运行适用的视觉、交互、无障碍或 runtime 检查,并报告检查未建立的条件;它不重建完整 UI Fact Cell universe 或逐 Fact×method 生产结果账本。Long-Task 把精确 expected universe 投影进已有 Claims/Assertions/Checks/Bindings:每个 method/condition cell 保存精确 `fact_refs`,每个 Fact/proof obligation 有一个 `fact_expectations` row。只有 package-admitted observer 提供 Actual 且由 Harness 完成 comparison 时,当前 `fact_results` row 才能关闭该 cell;否则保留阻断性 External Confirmation,Final Gate 不会伪造 result。当前 slice 不准入 UI layout/pixel/accessibility/motion、browser/native/device、protected 或 tolerance/mask observation。两种 carrier 互斥。生成成功、截图、hash、Census 与 preflight 只证明输入完整性/完整性,不证明生产一致性。
|
|
225
227
|
|
|
226
228
|
默认 Workflow 会在 material 产品、设计、实现或验收判断前执行 UI Authority Closure 和条件式 Design Authority Check。它沿稳定 key 到 exactly-one canonical adoption record,再主动打开每个受影响的 selected `exact-target`/`constraint`;只看到 registry 或 handoff index 不算已消费。项目/系统/component-family target 由 `DESIGN.md` canonical 记录,单 screen/interaction target 由 owning Screen Contract 记录;该 record 独占 interpretation、selection basis、immutable locator/digest、condition coverage 和 editable upstream/update route,其他层只保留 stable key、owner/anchor 和 local applicability。缺失、不可读、过期或冲突时 fail closed;更新必须产生新 immutable version,不能覆盖旧基线。未配置 starter、候选稿、只有风格文字或灵感图都不能授权 agent 发明生产布局。明确的设计系统采纳请求路由到 `design-system-authoring`,独立资源生成请求路由到 `design-resource-authoring`;已有充分权威的实现、局部样式修复和 throwaway prototype 仍保持轻量。
|
|
227
229
|
|
|
228
230
|
只要是已经选定、准备进入实现的设计资源,DSA 先用 `ty-context design-resource bundle` 发布精确 target 集;两种开发路径再对每个已发布 handoff 运行 `ty-context design-resource preflight <handoff.md>`。取得不完整、缺少或多出未声明依赖/target、target 重复、不安全路径、manifest/文件 digest 过期、虚构 locator、Census 未冻结/不完整、生成被抽样/截断、轴值被聚合、Expected/Canonical/Handoff Fact 集不相等、required method 缺失、comparator/Oracle/environment 绑定无效、design-system lineage 未解析、适用 cell 未覆盖、exact target 缺 full-target layout/pixel Fact、证据不受支持或含义未决都 fail closed。preflight 只证明设计输入语义完整且资源身份正确;开发流程仍必须打开真实资源,并从生产入口证明当前实现。
|
|
229
231
|
|
|
232
|
+
Long-Task 投影继续要求每个 Claim-bearing Assertion 只绑定一个 Claim。对每个 selected-design verification method,target 的 root conformance Assertion 与该方法的独立 Assertion 以并集覆盖其 Fact/Rule 引用的 Source Claims;该并集只补齐覆盖,不合并方法 capability、证据、结果或失败归因。
|
|
233
|
+
|
|
234
|
+
repository pattern 只把圆括号作为经过转义的 route-group 字面字符,不把它们解释成正则分组或 extglob;现有 `*`、`**`、`?` 语义保持不变,`[]`/`{}` 仍不受支持。
|
|
235
|
+
|
|
230
236
|
对 material 工作,`context_uiux_design` 应用上面的投影规则并让风险比例化 coverage reasoning 保持 task-local。`context_development_engineer` 用稳定 surface/control key 把每个受影响的 selected target 和声明 condition 追踪到生产 route/component owner、冷启动真实用户旅程及适用的渲染/交互检查。第一个有价值的可运行纵向切片只是建议性的真实入口反馈点,不是实现门禁;最终候选仍必须重跑受影响的冷启动旅程。Source 已明确要求的组合不能静默删减,但默认路线应报告未被证据建立的条件,而不是声称精确机器闭包。资源哈希、manifest 和数量只证明资源完整性,实现截图既不能成为自己的目标,也不能单独证明实现一致性。
|
|
231
237
|
|
|
232
|
-
显式 Long-Task
|
|
238
|
+
显式 Long-Task 是同一共享义务的强权威载体。它在 Compile 前解决缺失/冲突的 UI 权威,并用 `field_coverage` 闭合每个真实 Product Control 的全部 22 个 canonical 字段;这条产品语义投影与更细的 design Fact universe 相互独立,绝不构成粒度上限。选定 target 冻结 canonical manifest identity/digest,并把每个原子 Fact/required-method 对投影为一个 `fact_expectations` row,其中包含 subject/target/condition/variation/property identity、expected located-value digest、comparator/parameter/tolerance/mask、Oracle identity/capability、environment 和 sensitivity。只有 package-admitted observer 能提供匹配的 `fact_results` Actual/comparison row。当前 slice 中,项目 `design_conformance`、`design_method` 与 `fact_results` record 只作诊断;受影响的 UI/design obligation 必须保留阻断性 External Confirmation,不能成为 machine proof。Product `surface_bindings`、Control Claims/relations 与 root-entry journey 继续承载产品语义,已有 Claim、Assertion、Check、Stage、Binding、revision 与 Final Gate 仍是唯一 Long-Task 生命周期和 closure。每个 blocker 保留精确 Source-item/method/capability lineage,不能在 Contract 内自行豁免;缩减范围必须修订 Source/Contract 权威。
|
|
233
239
|
|
|
234
|
-
combined design-and-implementation 可以先用普通 Outcome/Stage 生成候选,但 candidate/planned target 不能解锁 fidelity implementation;选定结果必须先成为真实 marked Context-reachable Source,并由 owning Context/`DESIGN.md` reference 连接,Authority Lock 后再通过 Authority Revision 采用。浏览器视觉 AC
|
|
240
|
+
combined design-and-implementation 可以先用普通 Outcome/Stage 生成候选,但 candidate/planned target 不能解锁 fidelity implementation;选定结果必须先成为真实 marked Context-reachable Source,并由 owning Context/`DESIGN.md` reference 连接,Authority Lock 后再通过 Authority Revision 采用。浏览器视觉 AC 可使用 `ui_browser` 做诊断定位,但当前 machine closure 仍是 External Confirmation;浏览器代理、独立 route 或深链接不能证明可独立失败的原生/root 旅程。资源完整性和 `visual_render` 不能替代选定目标的实现一致性。冻结 baseline 是 verifier input,生成的 actual render/diff 是当前 artifact,主观批准保持外部。这不新增 `uiux_delivery`、视觉 Claim type、resource registry、risk level、lifecycle state、Gate、必需设计目录、逐控件截图矩阵或通用像素阈值。
|
|
235
241
|
|
|
236
242
|
`ty-context doctor` 保留兼容的项目级 `missing | unconfigured | configured` 状态,并增加 Design Authority Index、token source 和已分类 reference 的 advisory 信号。它明确不推断页面实现就绪;material surface 仍需 owning Screen/Control meaning、selected target/constraints 与项目自己的验证路径。
|
|
237
243
|
|
|
@@ -245,10 +251,12 @@ combined design-and-implementation 可以先用普通 Outcome/Stage 生成候选
|
|
|
245
251
|
|
|
246
252
|
### 可选 Design Resource Authoring
|
|
247
253
|
|
|
248
|
-
只有在用户明确要求生成、迭代、准备独立设计资源、为一段明确开发内容准备设计资源或使用 Open Design 时,才使用 `design-resource-authoring`。输入可以是零散笔记或初始方案、产品/技术方案、专门视觉 brief
|
|
254
|
+
只有在用户明确要求生成、迭代、准备独立设计资源、为一段明确开发内容准备设计资源或使用 Open Design 时,才使用 `design-resource-authoring`。输入可以是零散笔记或初始方案、产品/技术方案、专门视觉 brief、截图、已有资源或其他已有计划文档。独立的中间 authoring 文档不是前置项,也不再是推荐步骤。
|
|
249
255
|
|
|
250
256
|
Skill 把明确输出或开发内容当作硬 scope ceiling。局部功能只可带上定位它所需的周边上下文;再丰富的背景也不能把生成范围扩成页面其余部分或整个产品。面向实现 handoff 时,Skill 要覆盖范围内所有材料性的 UI/UX 含义:surface/flow 与 region 结构、视觉和内容呈现、控件结构/尺寸/变体、静态与动态状态、交互/反馈/恢复/动效、响应式/平台/输入方式、可访问性及必要资产;先扣除已有 selected Source 明确覆盖的条件,再发现 Open Design 当前 agent/model、functional skill、rendering template、design system、plugin 与 export route,并把每种候选资源说明为 `selected`、`optional`、`not-needed`、`unavailable` 或 `decision-required`。
|
|
251
257
|
|
|
258
|
+
正式首次生成、重大设计修订和关键重新生成使用实时发现后满足工具、视觉/上下文能力、认证与数据边界的最高能力模型,以及该模型实际支持的最高 reasoning effort。排序只能依据 provider 明确的能力等级、推荐替换关系或唯一且有版本依据的 provider-local fallback;不得从价格、模型名、发布时间或列表顺序猜测。多个 eligible model 无法排序时以 `highest_performance_unverified` fail closed;provider 不可控制或不能回报实际 model/effort 时也必须保留同一限定,不能声称已执行最高档。该策略不创建 model registry、scheduler 或持久 routing state。
|
|
259
|
+
|
|
252
260
|
正式 Web/App implementation output 中,“完整”默认就是上文的范围内最细可观察 Fact 粒度。Skill 在委托生成前先构造 Expected Fact Universe 与冻结 Inspector/Census 义务,把它们连同已采纳 design-system identity 一起传给 Open Design,并要求返回的 canonical source/manifest 表达每个适用 cell;不能等下游实现时才发现或自行补设计 anatomy-part、状态、响应式/平台/text-scale、动效、无障碍或资产事实。
|
|
253
261
|
|
|
254
262
|
Skill 会先分类 visual-style dependency。高保真/品牌化输出、视觉方向、字体/颜色/密度、组件视觉处理和 production-style prototype 属于 style-bearing:若 `DESIGN.md` 未配置或没有唯一 authored token source/direction,Skill 必须在创建 provider project/run 前停下,并提示用户显式选择 `design-system-authoring`,绝不自动初始化。低保真结构、IA/flow topology 和纯语义 behavior/state study 属于 non-fidelity。style-bearing 工作必须把已采纳 provider ID 传给 MCP `create_project.designSystem`,并用 `get_project.designSystemId` 验证一致。
|
|
@@ -257,15 +265,17 @@ Skill 只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)
|
|
|
257
265
|
|
|
258
266
|
面向 Web/App 实现时,Skill 必须取得上文所述完整 canonical entry/dependency set 与可寻址事实。Figma 适合已经存在的设计团队权威,需要原生 Components/Variables/Variants、共享库、Dev Mode 或 Code Connect 的场景;Penpot 适合明确需要开放、自托管多人设计基础设施的场景;OpenPencil 可作为本地静态布局 sidecar,但当前 prototype/motion 模型仍不完整。把完整 Open Design Source 默认转换为另一种表示会增加同步和运维成本,却不会关闭新的 enforcement gap,因此三者都不是默认依赖。
|
|
259
267
|
|
|
260
|
-
探索模式只做最小完整性检查并尽快展示指定候选,不需要 handoff schema。明确或受托最终选择且资源将进入实现时,Skill 只做一次合并、幂等的初始方案回改,并在任意获准的项目路径按 target 写 provider-neutral、带 Source marker、且只含一个严格 manifest-backed `design-resource-handoff-v1` block 的 Markdown。canonical manifest 保留完整 Inspector/Census/Fact/proof universe;小 YAML 只记录其不可变 resource/target 绑定及 residual 产品/coverage/Source/proposal 含义。共享 preflight 还原同一个完整校验对象,不能把取得不完整、不可寻址、`decision_required`、`unavailable`、证据不成立或过期的输入称为 ready。这里没有固定目录、provider pack 或逐控件一份稿;适配器只是普通 Source,不是 Design Authority
|
|
268
|
+
探索模式只做最小完整性检查并尽快展示指定候选,不需要 handoff schema。明确或受托最终选择且资源将进入实现时,Skill 只做一次合并、幂等的初始方案回改,并在任意获准的项目路径按 target 写 provider-neutral、带 Source marker、且只含一个严格 manifest-backed `design-resource-handoff-v1` block 的 Markdown。canonical manifest 保留完整 Inspector/Census/Fact/proof universe;小 YAML 只记录其不可变 resource/target 绑定及 residual 产品/coverage/Source/proposal 含义。共享 preflight 还原同一个完整校验对象,不能把取得不完整、不可寻址、`decision_required`、`unavailable`、证据不成立或过期的输入称为 ready。这里没有固定目录、provider pack 或逐控件一份稿;适配器只是普通 Source,不是 Design Authority 或验收结果。除唯一被明确授权的 Proposal 写回目标外,Skill 不会修改调用方已有计划/提案 Source、`project_context/**`、`DESIGN.md`、生产代码或 Delivery Contract。
|
|
269
|
+
|
|
270
|
+
材料性的 DRA 修订循环只从绑定 raw-byte digest 的 Base 与完整有序 Delta 语义重放。确定性 accepted authority 还必须在同一个、受文本 digest 覆盖的 marked Source Item 内提供严格 `ty-dra-authority-v1` 投影:explicit choice 精确绑定 target/kind/origin/meaning digest,delegation 只绑定其选择范围,绝不会自动成为非视觉 meaning Source。每个 semantic target 最多只有一个 active accepted Delta owner;rejected、unresolved 与 superseded Delta 组成精确 leakage 全集。单一 v3 audit-expectations catalog 冻结 changed/unchanged/resource-decision/blast-radius/leakage rows 与 selected-resource conditions,当前审计必须 set-equal 且不得有重复 identity。exact-patch-v2 把每个 active non-preserve `Delta × target` 恰好一次绑定到 Proposal 文本区间与语义 digest;每个 binding 恰有一个 `proposal-written` owner,或一个结构化且仓库可读取的 `resource-owned-exact-visual` owner。只有真实跨中断需求才可显式 `create` 一个 ignored、任务局部、非权威 checkpoint;`update` 只能通过调用方给出的 checkpoint digest CAS 替换,`inspect`/`preview` 重新派生当前状态。`apply` 使用写前/写后 raw-byte CAS 与写后重读对账,只报告 applied、idempotent、blocked 或 external-resource revalidation pending,而不报告 handoff readiness。`remove` 仅在目录清单证明其中只有 digest 匹配的 helper checkpoint 时完整删除;否则返回 `partial` 并保留非 helper 内容。简单 preview 不创建 checkpoint、持久字节、暂停、Provider run、正式 handoff、Proposal 写回或 helper transaction。checkpoint 与 reconciliation 只是上游恢复/诊断数据,绝不是 Design Authority、Long-Task Source/Evidence 或完成证明。
|
|
261
271
|
|
|
262
272
|
实际生成仍由已配置的 Open Design/Product Design、Figma、图片生成、原型工具或人工设计流程负责。这些输出以普通 external Source 进入默认 Workflow 或 Long-Task。candidate 与 inspiration 不授权 fidelity;adopted exact target/constraint 作为 Context-reachable Source,由 owning Context/`DESIGN.md` 把稳定 key 连接到覆盖条件、不可变身份/digest 和 editable upstream owner/locator/update route。`context_uiux_design` 在下游执行 UI Authority Closure,只把耐久事实采纳到 Context/`DESIGN.md`;实现截图与 diff 仍是证据 artifact,不能自我授权为目标。
|
|
263
273
|
|
|
264
274
|
维护者可以设置 `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` 与可选 `TY_CONTEXT_OPEN_DESIGN_MCP_ARGS_JSON`,运行 `npm run smoke:open-design` 做显式启用、只读的 discovery smoke。正常测试使用本地 mock MCP,不依赖 Open Design、登录、付费能力或不确定的设计输出。
|
|
265
275
|
|
|
266
|
-
###
|
|
276
|
+
### 退役独立 Authoring 兼容
|
|
267
277
|
|
|
268
|
-
|
|
278
|
+
退役的独立 authoring 指针不再安装或由 package 管理。升级迁移只删除字节完全等于原 package 内容的副本;同名但已修改的内容保留并要求人工处理,普通 sync 不维护 tombstone 或盲删规则。`long-task-workflow` 从入口立即打开非权威 Contract Draft,并让完整 input inventory、混合输入综合/细化、稳定 Key、Product Control 级语义、偏好/调研/委托溯源、Source marker/provenance、acceptance/risk 与 Contract 映射在同一循环中收敛。这里的 Control 语义投影不限制另一条选定资源“完整可观察设计事实”清单的粒度。已有计划或提案文档仍是有效普通 Source,但不再创建独立或内部 Source-authoring 阶段、handoff、Schema、Gate、State 或第二份计划。
|
|
269
279
|
|
|
270
280
|
## Single-Goal Rolling Delivery
|
|
271
281
|
|
|
@@ -275,16 +285,24 @@ Skill 只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)
|
|
|
275
285
|
- 一个用户选定的仓库与最终验证/收敛 worktree;
|
|
276
286
|
- 一次完整选定交付、一个 Contract、一个 Final Gate;
|
|
277
287
|
- Outcome 依赖只表示验收与中间证明就绪关系,不限制实现顺序,也不表示 Worker 调度;
|
|
278
|
-
- 第一次 Authority Lock 后、正式实现前有一次无条件的宿主模型更换检查点;Agent
|
|
279
|
-
- 当前 Goal
|
|
288
|
+
- 第一次 Authority Lock 后、正式实现前有一次无条件的宿主模型更换检查点;Agent 结束当前回合,用户处理后只回复 `模型切换卡点解除,继续`,普通“继续”不满足 package-managed prompt protocol,Harness 不观察或验证模型是否改变;
|
|
289
|
+
- 当前 Goal 自主选择实现顺序、局部计划、工具、具体工作包分解与动态 Worker 数量;满足正向默认谓词时必须实际调用多个精确 `long_task_implementation`,否则声明一个许可的 solo 理由并由父 Goal 执行。Harness 不负责分配、调度、重试或恢复,agent 报告不是 Progress 或证明,所有结果必须汇入同一验证 worktree;Frontier 只提供验收/验证建议;
|
|
280
290
|
- targeted verify 是可选反馈与修复证据,永远不能 accepted,也不构成继续实现或进入 Final Gate 的门禁;
|
|
281
291
|
- scope-only revision 可先做无状态候选诊断,机械边界内的修复自动采用;只有稳定且确需用户决策的候选才至多询问一次精确 identity;
|
|
282
292
|
- Final Gate 在一个当前快照上重跑全部 Check;
|
|
283
293
|
- Stop Hook 在结果 stale 时阻止完成。
|
|
284
294
|
|
|
285
|
-
它的证明命题有明确前提:Source
|
|
295
|
+
它的证明命题有明确前提:Source 在声明观察粒度下完整且准确、Source→Contract 投影保持语义、所有实际适用单元被展开;在这些前提下,只有每个机器义务同时具有冻结 Expected 权威、package-admitted 当前 Actual、Harness 计算的 comparison/verdict、可归因静态生产载体或直接 process observation、因果 Counterfactual 与当前 Final Gate 快照证明时,fresh `machine_accepted` 且无待定 External Confirmation 的 `AcceptedDeliveryTerminal` 才推出声明内机器可观察漂移为空。`machine_accepted_external_pending` 只证明已准入机器范围,完整交付仍未完成。Harness 无法发现未声明要求,也不声称任意物理/外部观察绝对可靠。
|
|
296
|
+
|
|
297
|
+
Compile 为每个机器 Claim 或 Fact × required-method obligation 派生内部 `CompiledObservationAuthority`,它不是新的 Contract Authority、状态或 registry。首版只有两条机器路径:`package_static_json_exact` 读取 runner 前快照中已存在、runner 后 no-follow 文件 identity/digest 不变、匹配生产 Binding 且不属于 Source/Context/Contract/expected/evidence/report/status/verifier output 的 UTF-8 JSON 静态结构;prepare-all mutation observation 与逐文件 pre/post identity/hash 共同拒绝 transient/persistent swap,它只证明静态内容,不证明运行时消费。`package_process_json_exact` 只支持 Source-backed 的 `runtime_family: process`、`role: product` 目标,以及 target 和完整 argv 与该权威一致的直接 root `project_binary`。每个 required target 都由一项 canonical Source technical obligation 精确覆盖 key、role、family、root、完整 argv 和 capabilities。Compile 生成声明稳定的 process runtime closure:精确 Source-backed root、当前 Claim/Counterfactual production carriers,以及由有限 argv→production Binding 匹配得到的路径。每个 `root_argv` 数组成员始终是 child-visible exact token;分类器不拆空格、不去引号、不重写反斜杠。封闭语法只检查独立 token 或一个显式 `--name=value`,支持的 standalone switch 是 label,其他 compound form 不获得机器闭包;raw token 与派生 locator 分离。quote、POSIX/UNC absolute、drive-prefixed、slash/backslash 平台歧义、除精确小写十进制 `node:<number>` 外的所有 scheme-shaped colon prefix 和 unsupported compound 在执行前 fail closed,除非显式转到既有 external TCB/External Confirmation。parent segment 先结合声明 `cwd` 解析,再判断是否真实越出仓库,因此仓库内 `..` 合法,真实 escape 才失败。exact/pattern Binding 支持 glob、无扩展名和含空格单 token 文件;安全 unmatched 以及精确小写十进制 `node:<number>` 和纯数字 `<hours>:<minutes>` 两种 colon scalar 允许但不复制。Compile 不广域扫描或复制全部 `input_paths`,角色分离只检查实际 closure 成员。Global Check 将 Outcome Binding 投影成内部 `{ outcome_key, local_key, binding_ref, binding }`,并复用 `<outcome>.<binding>`:逻辑 ref 保持独立,相同物理路径可只复制一次,不改变 authored Contract 或建立 registry。Exact planned closure member 可以到 Final Gate 才 materialize。Harness 仅复制这份 closure,把其 identity 绑定到 host attestation,并把未修改的 raw argv 传给 child。兼容的 Cross-Check 与 implicit-preserved Facts 共享一个受限 stdout `ty-context-product-observation-v1` envelope,同时保留独立 result identity。无法显式 production-bind 的嵌入式依赖或无法直接绑定 root 输出面的 Claim 必须 External Confirmation。项目 payload 继续使用 v3,不发布 v4,也不建设 shell/URI/dependency parser 或通用 UI/native observer。
|
|
298
|
+
|
|
299
|
+
项目自报的 v3 actual/value digest、comparison、`passed`、verdict 与 capability record 只作兼容诊断,不能提供 Actual 或完成权威。当前 package 可派生范围只有 exact/presence 与 host-derived `target_runtime`;`interaction_trace`、`state_delta`、`design_conformance` 以及其他尚无 package derivation 的 capability 即使有项目 record 也必须保留阻断性 External Confirmation。custom/`named_external_tcb` Oracle、间接 wrapper、browser/native/device session、layout/pixel/accessibility/motion、protected observation、tolerance/mask 与 custom locator 同样不能关闭 machine obligation。每个机器 Counterfactual 都要有 package-admitted baseline/mutated observation、相同 compiled closure identity、属于 production carrier 集合的 mutation target、affected/preserved/allowed-fan-out 精确集合与相同 obligation universe,并在适用时保持 host-derived process liveness;没有 admitted observation 时不得跳过。旧 Contract 不会被静默改写,target/closure TCB 变化会使旧 Active Authority、Progress、Evidence 与 Receipt 失去验收效力。
|
|
300
|
+
|
|
301
|
+
诚实声明为不支持的 Contract 不需要伪造 verifier。现有 External Confirmation 可通过 `impact_claims` 覆盖精确的普通 Outcome/Global Claim 与 Semantic Fact Claim,而每个 Semantic Fact proof 仍保留显式 `confirmation_ref`。完全 external 的 Outcome 设置 `success_path_required: false`;Stage Gate 只有在 `blocks_target: true` 的 confirmation 明确影响该 gate 的 result Claim 时才可不声明 machine Check。缺少 result lineage、非阻断 confirmation 或声明了机器 success path 却没有真实 success Check 都会使 Preflight/Compile 失败。合法的 external-only 路径最终只能得到 `blocked_external`,不会得到任何 machine-accepted 状态。
|
|
302
|
+
|
|
303
|
+
Direct-process observer 提供的是受限 containment,不是针对恶意代码的绝对 sandbox。它的 TCB 包括 host OS/文件系统/进程 API、Node runtime、快照复制与 no-follow/digest 校验、stdout 捕获/解码、timeout、进程树检查和清理。冻结的 subtraction controls 表明移除 watcher/pre-post 或 containment/cleanup 会重新打开 transient/persistent swap 或 descendant/timeout leak,因此保留这些既有责任,不新增 edge mechanism。它不声称能阻止蓄意恶意 executable 逃出复制闭包、访问环境中的机器/网络资源或规避所有 OS 进程树机制。需要这类对手边界的 workload 必须使用外部 sandbox 或 External Confirmation。
|
|
286
304
|
|
|
287
|
-
原始/修订方案、选定设计资源和混合附件会立即进入一个 Source-bound Contract Draft 循环;完整 input inventory、稳定 Key、Product Control 级含义、选定资源设计事实、acceptance/risk、direct/derived/delegated/evidence-backed 溯源、Source 归属与 Contract 映射一起收敛。声明为 Source 的 Markdown 中,每一行非空文本都必须属于一个 Material `ty-source-item` 块、唯一且通过 schema 校验的 `design-resource-handoff-v1` formal block,或满足封闭语法的 background:`markdown-structure` 只能包含不承载自然语言的锚点/分隔线,`provenance` 只能包含固定 `input`、`mode`、条件式 `source` 与可选 `sha256` 字段的 `ty-source-provenance` 注释;有文字的标题或自由说明字段可能表达权威含义,因此不能放进 background。任意背景说明文字和其他未分类文本都 fail closed。每次交付至少有一个标注 `aspect=architecture` 的 technical obligation Source Item,并映射到可独立证明的架构 obligation。若未知偏好会实质改变调研或选型,Preflight/Compile 成功前必须先询问;标准明确后,有依据的推荐才写入真实 Source,不能只藏在 YAML。方案委托不授权真实高危外部动作;输入冲突、用户保留、偏好缺失或无可靠推荐仍为 `decision_required
|
|
305
|
+
原始/修订方案、选定设计资源和混合附件会立即进入一个 Source-bound Contract Draft 循环;完整 input inventory、稳定 Key、Product Control 级含义、选定资源设计事实、acceptance/risk、direct/derived/delegated/evidence-backed 溯源、Source 归属与 Contract 映射一起收敛。声明为 Source 的 Markdown 中,每一行非空文本都必须属于一个 Material `ty-source-item` 块、唯一且通过 schema 校验的 `design-resource-handoff-v1` formal block,或满足封闭语法的 background:`markdown-structure` 只能包含不承载自然语言的锚点/分隔线,`provenance` 只能包含固定 `input`、`mode`、条件式 `source` 与可选 `sha256` 字段的 `ty-source-provenance` 注释;有文字的标题或自由说明字段可能表达权威含义,因此不能放进 background。任意背景说明文字和其他未分类文本都 fail closed。每次交付至少有一个标注 `aspect=architecture` 的 technical obligation Source Item,并映射到可独立证明的架构 obligation。若未知偏好会实质改变调研或选型,Preflight/Compile 成功前必须先询问;标准明确后,有依据的推荐才写入真实 Source,不能只藏在 YAML。方案委托不授权真实高危外部动作;输入冲突、用户保留、偏好缺失或无可靠推荐仍为 `decision_required`。已有计划文档的旧结构本身不构成阻塞。
|
|
288
306
|
|
|
289
307
|
第一次正式 Compile 成功前,`delivery-contract.yaml` 是同一份非权威 Contract Draft。`long-task-workflow` 从入口开始,跨 Source 细化、仓库/Context 读取、映射和 Preflight 修复持续修改它,不要求一次响应生成完整 Contract。Source 完备性是 Preflight/Compile 的收敛条件,不是前置阶段。不存在单独 Contract Draft Skill、Draft Receipt 或 Authoring State。
|
|
290
308
|
|
|
@@ -296,32 +314,48 @@ Skill 只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)
|
|
|
296
314
|
"required": true,
|
|
297
315
|
"phase": "post_authority_lock_pre_implementation",
|
|
298
316
|
"action": "change_model_in_host_then_continue",
|
|
299
|
-
"resume_token": "continue",
|
|
317
|
+
"resume_token": "model checkpoint cleared, continue",
|
|
300
318
|
"turn_boundary": "end_current_turn",
|
|
301
319
|
"blocked_until_resume": ["product_implementation", "file_edits", "build", "test_execution"],
|
|
302
320
|
"model_change_owner": "host_or_user",
|
|
303
321
|
"model_change_observable_by_harness": false,
|
|
304
|
-
"generic_continue_satisfies":
|
|
305
|
-
"message": "
|
|
322
|
+
"generic_continue_satisfies": false,
|
|
323
|
+
"message": "处理好模型更换后,请仅回复:模型切换卡点解除,继续"
|
|
306
324
|
}
|
|
307
325
|
}
|
|
308
326
|
```
|
|
309
327
|
|
|
310
|
-
这是无条件的终止当前回合边界。Agent 在该结果后不得继续产品实现、文件编辑、构建或测试,必须输出
|
|
328
|
+
这是无条件的终止当前回合边界。Agent 在该结果后不得继续产品实现、文件编辑、构建或测试,必须输出 `处理好模型更换后,请仅回复:模型切换卡点解除,继续` 并结束当前回合;用户此前写过任何模型策略都不能跳过,普通“继续”不满足 managed prompt protocol。它仍是人工宿主提示,不是 Harness 强制执行的解锁:Harness 不观察下一条宿主消息,也不验证模型是否改变。后续 `compile --revise` 返回 `required: false`,不会重复暂停。Harness 不会自动切换模型,也不持久化 acknowledgement、model route 或 checkpoint state;该检查点不是验收证据。
|
|
311
329
|
|
|
312
|
-
锁定后的修订把“Authority 有变化”和“需要用户决策”分开:单调增强、锁定 Claims/targets/proof obligations 不变的 Source/Context snapshot 更新、Runner/input 实装修复、repo-bound scope 扩展、风险增强,以及 carrier、mutation、Check 相同且 Claim/预期失败断言覆盖不减少的等价 Counterfactual 覆盖可自动采用;产品/Source Claim/target/external-confirmation 变化,丢失 scenario/Claim/Evidence Capability/失败拦截,移除 forbidden/owner Context,runner type/effect、verifier kernel 或未知 reason 则只预览并等待精确 identity
|
|
330
|
+
锁定后的修订把“Authority 有变化”和“需要用户决策”分开:单调增强、锁定 Claims/targets/proof obligations 不变的 Source/Context snapshot 更新、Runner/input 实装修复、repo-bound scope 扩展、风险增强,以及 carrier、mutation、Check 相同且 Claim/预期失败断言覆盖不减少的等价 Counterfactual 覆盖可自动采用;产品/Source Claim/target/external-confirmation 变化,丢失 scenario/Claim/Evidence Capability/失败拦截,移除 forbidden/owner Context,runner type/effect、verifier kernel 或未知 reason 则只预览并等待精确 identity,风险降级直接拒绝。verifier 内容 identity 变化会使旧证据失效;没有旧 Authority 或可信发布来源提供的独立保持证明时仍保持 fail-closed,但 digest 变化本身不再被误报为已经证实的 acceptance/proof reduction,brief 会列出变化文件并明确“语义保持尚未独立建立”。`diagnose-revision` 无副作用,撤回/替换候选只在同一 `delivery-contract.yaml` 合并,不产生询问。最终 pending brief 先解释 Authority Revision 是什么,再区分 `user_decision_reasons` 与机械边界变化。必须先展示 brief;若当前任务已有明确指令精确覆盖全部决策 reason,可机械转录而不二次询问,泛化“继续”、一揽子批准、建议或 Agent 推断不算。每次采用都保留 exact identity、旧 Authority 连续性、证据失效和完整 Final Gate,并返回滚动实现,绝不表示完成。
|
|
313
331
|
|
|
314
332
|
Long-Task Skill 采用渐进读取:主 `SKILL.md` 只保留目标、硬边界和路由;Draft 输入/Contract Authoring、Evidence Design 与 Authority Lifecycle 细节按当前活动读取一层 reference,其中 Draft 输入与 Contract mapping 同时进行。这只是指令组织,不产生第二权威。共享 Architecture Deliberation 与适用质量路由在 Source-bound Draft authoring 中完成;material 且可独立证伪的架构/工程质量不变量使用已有 Source-backed obligations/constraints/forbidden shortcuts、owner/path/Binding、项目原生 executable Checks,以及功能行为可独立通过时的单独 Assertion。Final Gate 是唯一的 Long-Task Engineering Quality/Architecture Conformance 承载点,只证明该声明、项目检查绑定的集合。
|
|
315
333
|
|
|
316
|
-
Draft Outcome 只是 Authority Lock 前的 Outcome。Outcome 按可独立观察、判断、纵向闭环和定向验证的结果拆分,用于投影 acceptance/verification-ready 工作集、定位失败、恢复 finding 并精确失效旧局部结果。`depends_on` 只表示 acceptance 与中间证明 readiness,不授权或禁止实现编辑。每个 Outcome 属于一个有序 Stage;Stage gate 传递依赖同 Stage 其余 Outcome,后续 Stage 依赖前置 gate。Rolling Frontier 和 Stage 状态都由普通 Outcome Progress 临时派生,只是建议性验证/诊断投影。当前 Goal 可按代码现实跨 Outcome/Stage
|
|
334
|
+
Draft Outcome 只是 Authority Lock 前的 Outcome。Outcome 按可独立观察、判断、纵向闭环和定向验证的结果拆分,用于投影 acceptance/verification-ready 工作集、定位失败、恢复 finding 并精确失效旧局部结果。`depends_on` 只表示 acceptance 与中间证明 readiness,不授权或禁止实现编辑。每个 Outcome 属于一个有序 Stage;Stage gate 传递依赖同 Stage 其余 Outcome,后续 Stage 依赖前置 gate。Rolling Frontier 和 Stage 状态都由普通 Outcome Progress 临时派生,只是建议性验证/诊断投影。当前 Goal 可按代码现实跨 Outcome/Stage 实现、检查或返工,并应用上述正向默认精确 Worker 规则;Harness 不创建 delegation scheduler、不把委派当证明,所有结果必须汇入选定验证 worktree。Outcome 不是 Worker、scheduler task、queue 或并行单元,Stage 也没有 Receipt 或第二个 Gate。Outcome 拆分诊断和证明归属,不拆分完成权威,因此最终仍必须在当前最终快照运行一次完整 Final Gate。
|
|
317
335
|
|
|
318
|
-
Contract 声明一个有界 target profile、非空 required product target refs,以及每个 target 的 runtime family、root entrypoint 和显式 capabilities
|
|
336
|
+
Contract 声明一个有界 target profile、非空 required product target refs,以及每个 target 的 runtime family、root entrypoint、完整 root argv 和显式 capabilities。每个 required target 还必须通过 Source Claim disposition 映射到一项相同 identity 的 canonical Source technical obligation;process root 与有限 exact/pattern 匹配实际准入的每个 argv 路径同时属于 production owner 与 production Binding。Compile 只从 root、已匹配 argv 路径与必需 carriers 生成声明稳定的 runtime closure,不复制或广域扫描全部 `input_paths` 或 manifest sibling。安全但未匹配的相对参数不是依赖;绝对、逃逸、file-URL 或网络引用 fail closed,除非显式进入外部边界。已匹配路径可以是 `planned` 并在 Preflight/Compile 时尚不存在,但 Final Gate 必须在当前 candidate 中看到它们;仅 materialize 不改变 Authority identity。Web/process 代理不能代替单独要求的 Native/desktop 目标。当前机器 `target_runtime` 只有 Harness 直接启动该 Source-backed process product root 才能成立;browser/native/desktop/device 要求保留阻断性 External Confirmation。每个 `critical_user_path` Outcome 和 Stage gate 都必须通过 admitted root proof 或对应 External Confirmation 处理每个 required target。
|
|
319
337
|
|
|
320
|
-
|
|
338
|
+
如果声明结果可能在代理表面通过、却在目标运行时独立失败,最早 owning Outcome 必须使用 admitted direct-process root Check 或阻断性 External Confirmation。项目 payload、仓库内状态报告、截图、二进制、日志、历史运行、新 session id 和代理表面都不是 runtime Authority。Check 仍声明精确 Given/When、journey 与 applicability,所有 Claim/证明单元仍独立可归因;项目 capability record 只作兼容诊断,只有当前准入的 exact/presence 与 host `target_runtime` 结果能满足对应 all-of cell,其余 capability 继续 external。每个行为型 machine Assertion 的同 Check Counterfactual 必须观察 affected Facts 变化、preserved Facts/liveness 不变、其他变化属于显式 fan-out,并保持相同 obligation universe 与 compiled process-closure identity。Binding 或路径不是 production reachability:静态 mutation 只证明该结构,runtime 必须经过 `Harness mutation of compiled production carrier → direct Source-backed product-root execution → package-observed Actual change`;Authority/verification/evidence/status/report/Receipt/verifier input 都不能进入 closure。既有最小失效范围、targeted feedback 与当前 Final Gate 规则不变,不新增通用 reachability scanner、实现 Gate、调度器或状态。
|
|
321
339
|
|
|
322
|
-
长程任务工作流的“防劣化保障”同时保护当前因果链的真实性、跨版本的漂移拦截强度,以及相邻的 `F = 实现自由边界(Implementation Freedom Boundary)`。Context 对“当前实现”的描述必须与索引到的真实代码/运行逻辑一致;当前实现必须继续承担“需求/架构意义表达”和“fail-closed 识别、返工、最终快照复验”两项共同必要职责,并在明确的 Source 完整性、语义绑定、可观察性和可信边界下推出“不错误完成”的设计目的。`F` 是效率与反流程膨胀边界,不是第三项机制职责或无漂移定理前提:在 Source/Contract
|
|
340
|
+
长程任务工作流的“防劣化保障”同时保护当前因果链的真实性、跨版本的漂移拦截强度,以及相邻的 `F = 实现自由边界(Implementation Freedom Boundary)`。Context 对“当前实现”的描述必须与索引到的真实代码/运行逻辑一致;当前实现必须继续承担“需求/架构意义表达”和“fail-closed 识别、返工、最终快照复验”两项共同必要职责,并在明确的 Source 完整性、语义绑定、可观察性和可信边界下推出“不错误完成”的设计目的。`F` 是效率与反流程膨胀边界,不是第三项机制职责或无漂移定理前提:在 Source/Contract、架构、安全、禁止捷径、不可逆影响与外部动作边界内,实现顺序、方法、局部反馈节奏、具体工作包分解与动态 Worker 数量由当前 Goal 决定;当前正向默认规则只在上述有界谓词成立时要求多个精确 Worker,否则要求一个许可的 solo 理由。Harness 不建立开发阶段/方法 Gate、逐编辑强制验证、固定分配、agent 调度/状态或委派证明。设计目的、关键逻辑、两项职责、成立边界和 `F` 都属于受保护设计不变量;弱化或替换它们必须由项目 owner 显式作出设计目的变更决策并给出替代证明,不能由 Agent 推断、文档/代码/测试同步改写或成本理由暗中授权。新增开发期限制还必须解决 Final Gate 或更轻项目检查无法覆盖的独立风险,并在全部安全/证明硬约束之后证明正的净 ROI——具体表现为有证据的高 total-cost ROI 与高效率;“高”表示显著、稳定余量,不是全局或局部最优。目的有效性、相对非劣化、must-allow、结构成本和适用的实测总成本阈值闭合后即停止扩建,除非出现新的真实反例、反复出现的重大成本热点或显著额外净收益证据。该保障复用现有 Context、索引、测试、关键哨兵、路由和一致性门禁,不新增第二 Authority、Gate 或状态;它也不能补出未表达/不可观察的需求,或对拥有全部修改权限者的蓄意联合弱化提供绝对不可变保证。
|
|
323
341
|
|
|
324
|
-
|
|
342
|
+
因此机制开发和发布结论只使用四级证据措辞:已设计、已实现、已建立声明中的已知反例保护、在明确 TCB 内高水准实现。当前 observer 修订保持 Level 3。R9/R10 各自保留三层不可互换证明:未消费的非闭包 evidence/verification 输入 must-allow;产品尝试读取非闭包文件时由运行隔离阻止接受;显式 production-bound 的 argv closure 成员若兼任 evidence/verification 角色则 Compile-reject。后续 raw argv 分类反例由 owner regression、完整 current-candidate lifecycle matrix 与独立审计证明;历史 real-process ROI workload 不证明该反例,也不新增 `CASE_ID`。Compile owner diagnostic 绑定完整已提交攻击候选;stale-Authority 防复用另由 legal-neighbor Authority 后在同一攻击候选上触发 Final-Gate freshness 拒绝证明,`active_task_missing`、dirty candidate 或 fresh Compile rejection 均不能替代。当前 machine report 持有准确 attack/control 集合与 terminal,不新增 registry。Level 4 仍要求未改变的完整 total-cost ROI 定理、无开放 critical false acceptance 的独立能力审计和项目所有者单独明确批准。prose 审计、测试数量、fresh-Agent 实验、observed lifecycle 胜出和脱敏 fixture 都不能单独提升等级或证明真实事故代表性。
|
|
343
|
+
|
|
344
|
+
真实 process ROI 的实现 owner 是 `examples/delivery-benchmark/real-process-workload/**`、real-process runner/policy/scoring、唯一 package materializer、formal acquisition modules 与 `tools/verify_long_task_real_process_roi.mjs`。它冻结 8 个 Fact、normal/degraded modes、两个 Counterfactual、独立 semantic gold、A/B/C 角色及每个 fixture 的已提交候选 identity。Real-process v5 总是采集五组 A/B/C repeat;前三组结果只作诊断。唯一 materializer 负责 detached checkout、`npm ci`、build、source parity 与禁用 scripts 的 pack,并绑定 exact commit/tree/lockfile/runtime/clean status。Workload、collection、summary、aggregate 与 attestation 只拥有 immutable raw 或可重算 `observed_lifecycle_*`,formal status 只能是 `not_evaluated`;formal-v2 packet 只声明一对一路径。顶层 verifier 在验证实际 manifest-v2 run set 后构造 immutable artifact index,并继续是 evidence admission、normalized exclusive ownership、`total_roi_supported`、`total_roi_positive` 与 formal status 的唯一 owner;packet 自报 bytes、digest、role、verified、normalized value、事故货币总额、event ID 或结论都会被拒绝。Verifier 绑定 A/B/C commit/tree/materialized-package、benchmark implementation、acquisition runtime/TCB、scenario、collector、precollection、retention 与 redaction identities。本轮口径仍为 1 NCU=CNY 1、active/wait 每小时 CNY 200/50、十次交付周期、repeatable cost 的五组中位数投影、maintenance/recovery 每周期一次、introduction/adoption/migration 一次性、以及一个事故 benefit 中位数。Provider/compute/storage 只从 prelocked 实际账单或官方价格材料换算,事故 benefit 从 raw time/usage 重算;benefit 至少为正增量成本 1.25 倍、至少 4/5 paired net 为正且 sample CV 不超过 20%,成本下降另报。缺失证据即 unsupported。Provider-event v1-v2、其他已列 formal v1 schema、real-process v1-v4 与 manifest v1 均须重新采集;机器测量、独立审计与 owner promotion 保持分离。
|
|
345
|
+
|
|
346
|
+
当前精确 schema 矩阵为:accounting-policy、evidence-packet、precollection-plan、raw-event、scenario-catalog 和 source-manifest 为 v2;Provider event 为 v3;real-process 为 v5;run-set manifest 为 v2。Provider-event v1-v2、其他已列 formal v1 schema、real-process v1-v4 和 manifest v1 均须重新采集;`next` 未分配。
|
|
347
|
+
|
|
348
|
+
Formal collection 的 11-scenario catalog 是 scenario/source/zero policy 的唯一 owner;collector 只声明 capabilities,所有 source 只能是 `required|forbidden`。Human time 来自 runner contemporaneous interaction recorder,compute 来自 Job-contained 完整 process tree,State 来自 runner exact payload/ledger 与预冻结 retention,Provider usage 来自 invocation-bound Provider correlation。Module-private branded acquisition runtime 自行构造 recorder、Windows Job supervisor、固定 Provider bridge 与 State capture;缺失 source、sampling/default-zero proxy、普通 spawn fallback 或 stream overflow 均 fail closed。`invocation_id` 在 spawn 前派生,record SHA 与 `execution_id` 在 tree close 后派生;human/process/wall/Provider clock 各有独立 ID,250ms 与 5000ms 容差不能替代因果 correlation。 Parent 捕获 exact prompt,并只用 `process.execPath`、空 `execArgv`、`shell:false`、bounded pipes 和 allowlist 环境启动 candidate-owned isolated Provider worker;proxy、自定义 CA 与 Node preload/loader 不受支持并 fail closed。单一 protocol owner 冻结 request/result shape、endpoint、prompt/response/stdout/stderr/deadline/abort/output-token limits 与 error code。Worker 单独拥有 `node:https`、bounded streaming 和固定 parser,四个 create-new/no-follow 临时文件在 worker/bridge 完全关闭后必须整体删除且不进入 run-set。Provider event 绑定未保留 response 的 digest、parser 与 worker identity;verifier 校验 acquisition TCB,但不声称独立重解析未保留的 response bytes。
|
|
349
|
+
|
|
350
|
+
Catalog 派生 86 次 execution 与 586 个 formal artifact:516 个 base file、30 个 compute record、10 个 State ledger 加 10 个 payload、10 个 prompt 加 10 个 Provider event。Formal fuse 为 650 files/364.625 MiB,完整 run-set fuse 为 4,379 files/974.3125 MiB。Evidence Candidate 冻结全部 code/schema/Context/test/package-version/protocol bytes;Promotion Commit 必须是其直接子提交,只新增四个 package-/TCB-external governance record,并保持 materialized-package、benchmark 与 runtime/TCB identities 不变,否则重新采集与审计。 Runtime TCB v2 绑定 clean Node launch、executable path/hash、worker/protocol、parser/transport 与 limits。Benchmark implementation identity 纳入 `npm_command_spec.mjs`、Provider protocol/worker 与有限 local-dependency closure checker;working-tree、Git object、collection 与 Promotion 路径都重算闭包并绑定实际执行源码根。
|
|
351
|
+
|
|
352
|
+
真实采集当前为 `external_pending`:Starward-derived fixture 缺少获授权的原始事故 design/runtime evidence、完整 original-to-sanitized mapping 及 retention/publication authorization;本轮也没有可保留的 invocation-bound Provider usage/price material 或 State-retention Source。Synthetic control 只能证明结构,不能作为 formal-positive evidence。完成这些真实外部输入、唯一 verifier 的完整正向报告、独立审计与 owner promotion 前,能力保持 Level 3。Package 0.8.15 是历史冻结的 Evidence Candidate identity;Package 0.8.16 是当前 Level-3 package candidate,不继承其 package、benchmark 或 runtime/TCB evidence。`capability_level=level_3`、`level_4_claimed=false`,没有 formal-positive 或实际 Promotion。Provider readiness 只表示本地配置、credential presence 与 clean worker launch envelope 足以发起一次有界尝试;public `independent_evidence_admitted` 只表示 packet structure/source binding,完整证据与正 ROI 仍分别由 `total_roi_supported`、`total_roi_positive` 表示。
|
|
353
|
+
|
|
354
|
+
Formal collection 还会在执行前锁定一个固定 scenario catalog,覆盖十类成本和一个 controlled incident 的 exact task/gold bytes。每个 event 绑定唯一 raw output:成本 B/C 都必须命中共同 gold;事故 B 必须错误而 C 必须命中它。这样只提交时间/usage 不能制造 purpose benefit,也不会新增通用 scenario registry。
|
|
355
|
+
|
|
356
|
+
本机制自己的 Final-Gate Oracle 读取固定 test-id 的 machine report,并对完整 wrong-candidate 与 correct-control workflow status 做对照。runtime capability 必须通过真实生命周期得到 `wrong candidate != machine_accepted` 且 `correct candidate == machine_accepted`;“命令 exit 0 + token/string 存在”只能证明文档一致。ROI 由独立 verifier 计算,绝不进入 safety Fact verdict。
|
|
357
|
+
|
|
358
|
+
工作流机制变更按字典序准入:Safety/Coverage → Semantic Granularity → Proof Strength/TCB 与不可绕过 Authority/fail-closed/当前最终快照证明 → Structural Closure Cost Non-Degradation → Total-cost ROI。其效率目标是 **Fine-Grained Semantic Purpose-Fulfillment Efficiency**:以有证据的高效率和高 total-cost ROI 完整达到细粒度语义与证明效果,同时在声明机制边界内消除与独立语义单元、必要证明、可信边界或适配器无关的成本。逻辑 Fact/obligation 粒度可以细于持久化粒度;无关笛卡尔轴、可推导重复与共享元数据复制不是合法的长期成本来源。等价效果下,Source/Contract/evidence bytes、DAG、Compile/Preflight/Final Gate、峰值 RSS、默认 Context 读取量和单 Fact revision blast radius 不得因这类结构原因增长。任何成本下降都不能补偿粒度、证明或漂移识别能力下降。“高”要求完整已验证成本集上的显著稳定余量,不要求穷举比较或证明最优;它只使候选进入考虑集,并受上述充分性停止规则约束,不代表自动采用,也不新增 Authority、Gate、状态或固定执行流程。
|
|
325
359
|
|
|
326
360
|
package-owned 的非 UI Compact Carrier 在不新增 Authority、状态或 Gate 的前提下实现“逻辑粒度细于持久化粒度”。共享 catalogs、selectors、Fact sets、proof templates、projections 和显式 exceptions 物化后继续进入既有 validator 与唯一 Final Gate。Fact 与 obligation 分别保持独立 exact-set 闭包;typed result 先绑定稳定 `obligation_key + obligation_revision_digest`,再投影到稳定 `fact_key + fact_revision_digest`。Fact revision 覆盖规范化 Fact 语义及其全部显式关联的当前输入 revision,obligation revision 覆盖规范化证明语义及当前 Fact revision,因而 Source 语义不能藏在不变的 identity pair 后。实现只可用有界数组和 `Map` 索引物化已测量集合,不能构造理论 ground universe。expanded 输入仍可兼容读取,但每份已采用的 Source/Contract 只能持久化一种表示,迁移会删除等价机械展开而不保留影子 Authority。
|
|
327
361
|
|
|
@@ -373,7 +407,7 @@ Contract 顶层包含:
|
|
|
373
407
|
- `global`:非目标、owner boundary、技术约束、禁止路径/捷径和全局 Check;
|
|
374
408
|
- `outcomes`:可独立判断并可定向验证的纵向结果、所属 Stage、依赖、明确 success/degradation 要求、REQ、产品/控件状态与位置、稳定技术义务和命名 AC。
|
|
375
409
|
|
|
376
|
-
Runner
|
|
410
|
+
Runner 声明仍支持 `package_script`、`project_binary`、`node_oracle`、`playwright_test`,proof surface 与 execution-target family 名称也保持兼容;但 runner type 只决定执行与 payload decode,不决定观察权威。当前 machine admission 仅允许 runner 前冻结的静态 JSON exact structure,以及 Harness 直接启动的 `project_binary` process product root;browser/native/desktop/device 与 project Oracle observation 必须进入阻断性 External Confirmation。
|
|
377
411
|
|
|
378
412
|
### 一个 Contract 与 Source Claim
|
|
379
413
|
|
|
@@ -393,17 +427,19 @@ active Long-Task 内部原有 `risk.requested_level: auto | standard | strict` p
|
|
|
393
427
|
|
|
394
428
|
## Evidence 与完成权威
|
|
395
429
|
|
|
396
|
-
最终接受来自当前可执行证据,不来自 Agent 文本。
|
|
430
|
+
最终接受来自当前可执行证据,不来自 Agent 文本。Runner kind 仍选择 `playwright_json_v1` 或 `structured_json_v2` decode,项目 capability payload 仍是 `long-task-check-result-v3`,但 decode 不是 Actual Authority。Compile 必须把每个 machine obligation 分配到 `package_static_json_exact` 或 `package_process_json_exact`;不支持的义务保留阻断性 External Confirmation。admitted adapter 及 expected/actual/comparison identities 进入 acceptance、Raw Execution、compiled、Progress 与 Receipt identity。
|
|
431
|
+
|
|
432
|
+
每个 Check 仍声明精确 scenario、journey、applicability 与 all-of Evidence Capabilities,但项目提交的 capability record 只作兼容数据。Harness 当前从 admitted static/process observation 派生 exact/presence,并仅对直接 process root 派生 host `target_runtime`;项目副本缺失不削弱这些 package proof,存在但不一致时 fail closed。`interaction_trace`、`state_delta`、`design_conformance` 与其他没有 package derivation 的 capability 必须保留阻断性 External Confirmation,不能制造 machine row。
|
|
397
433
|
|
|
398
|
-
每个
|
|
434
|
+
每个 Outcome 至少有一个非 Result 原子 Claim,且 `required_proof_surfaces` 必须 all-of 全覆盖。Claim-bearing Assertion 使用显式 Expected 比较;`truthy/falsy` 禁止,`exists` 仅允许 admitted 静态 `implementation_structure`。V1 ground、V2 symbolic、non-UI、static 与 process exact 全部调用同一个 Harness evaluator:actual≠expected 直接失败,tolerance/mask 不准入,result identity 由 Harness 重算,submitted pass/verdict 不参与计算。Playwright/aggregate decoder 字段只作诊断,不能证明 browser/UI Claim。
|
|
399
435
|
|
|
400
|
-
|
|
436
|
+
Outcome/Global Counterfactual 的 Binding/path 本身不是生产可达性证明。静态 Counterfactual 只证明冻结结构对象;runtime Counterfactual 必须由 Harness 修改声明的生产 carrier、直接运行相同 process product root 并通过 package 观察 Actual 变化。每个 machine witness 声明 affected、preserved 与 allowed-fan-out Facts,保持 obligation universe 和 host-derived liveness;缺少 admitted baseline/mutated observation 时直接失败。Source/Context/expected、status/report/evidence/Receipt/verifier output 都不是 mutation carrier。
|
|
401
437
|
|
|
402
|
-
Targeted verify、Progress、status、Receipt 与 compiled cache 都不是完成权威。Final Gate 要求 clean candidate commit
|
|
438
|
+
Targeted verify、Progress、status、Receipt 与 compiled cache 都不是完成权威。Final Gate 要求 clean candidate commit,从 Source 重编译 observer plan,在同一 Git-tree snapshot 上重跑全部 Check,并核对全部受保护身份。Direct-process 的内部 host attestation 还绑定 executable/root/argv equality、PID/times/exit、candidate snapshot digest、内部 execution nonce 与捕获的 stdout-envelope digest;这些 host 字段都不来自 child。nonce 不向 child 暴露,也不能单独认证产品语义。只有当前 Authority 与 observation chain 全部不变时才可生成 `machine_accepted` 或 `machine_accepted_external_pending`;后者仍列出阻断性外部确认,不属于完整无漂移定理的前件。
|
|
403
439
|
|
|
404
440
|
## 兼容与迁移
|
|
405
441
|
|
|
406
|
-
当前 V2 的语义保证闭包还要求 full Context、architecture-classified Source obligation、原子 applicability dimensions、显式 target capabilities
|
|
442
|
+
当前 V2 的语义保证闭包还要求 full Context、architecture-classified Source obligation、原子 applicability dimensions、显式 target/blocker capabilities、Control-relation closure、Population universe、Claim-local mutation 与 admitted observation chain。含 custom machine Oracle、不支持 method/family、wrapper root、缺失或未绑定 process argv,或缺少 admitted Counterfactual observation 的旧 V2 Contract 会收到精确人工迁移诊断;必须依据 Source 明确改成 static exact、direct-process exact 或阻断性 External Confirmation。Exact planned process root/argv/carrier 可以到 Final Gate 才存在,但 pattern 或未声明 runtime dependency 不能冒充它们。相关诊断包括 `machine_observer_not_admitted`、`unsupported_observer_requires_external_confirmation`、`custom_oracle_machine_completion_forbidden`、`static_observation_not_in_pre_run_snapshot`、`static_observation_changed_by_runner`、`process_observer_direct_root_required`、`process_observer_root_invocation_required`、`process_observer_root_argv_mismatch`、`process_root_production_binding_required`、`process_runtime_carrier_exact_path_required`、`process_runtime_input_missing`、`process_observation_input_changed_by_runner`、`legacy_target_runtime_non_authoritative`、`counterfactual_admitted_observation_required`、`counterfactual_runtime_reachability_unproven` 与 `project_submitted_verdict_disagrees_with_harness`。Upgrade 不会代选,也不会把旧 Active Authority、Progress/Receipt 当作通过证据;public result payload v3 保持兼容,但其自报证明字段不具权威。
|
|
407
443
|
|
|
408
444
|
## 开发与验证
|
|
409
445
|
|
|
@@ -435,9 +471,9 @@ make validate-harness
|
|
|
435
471
|
- 默认 Workflow 提供 model-led、证据边界内的符合性,不提供声明范围零漂移证明或机器完成权威;未验证和外部待确认范围必须显式保留。
|
|
436
472
|
- bounded Context keyword search 仍可能漏掉同义词或间接依赖,只能补充语义判断。
|
|
437
473
|
- Harness 不能切换 host 选择的模型,只能在第一次 Authority Lock 后要求一次用户选择。
|
|
438
|
-
- Tiny Context 不提供并行 mutation/delegation runtime
|
|
474
|
+
- Tiny Context 不提供并行 mutation/delegation runtime;package-managed Skill 的有界谓词成立时,平台 Goal 必须实际调用多个精确 `long_task_implementation`,但 Harness 不负责分配或持久化这些行为,也不把它们当证据。
|
|
439
475
|
- 它不观测平台 token 或模型调用数。
|
|
440
|
-
- Network policy 会约束传给 runner
|
|
476
|
+
- Network policy 会约束传给 runner 的代理环境。准入的 direct-process 路径还会运行冻结 runtime-closure 副本并监视/清理进程树,但两者都不是 OS 安全 sandbox,也不能证明恶意代码无法访问环境中的文件系统、网络或进程资源。
|
|
441
477
|
- 同用户/管理员文件篡改、系统级 Hook 绕过不在安全边界内。
|
|
442
478
|
- Git/PR/CI、部署与人工产品确认仍由外部系统负责。
|
|
443
479
|
|
|
@@ -6,6 +6,8 @@ This project uses Tiny Context. The Harness maintains durable Context and workfl
|
|
|
6
6
|
|
|
7
7
|
Before the first implementation edit, every delivery surfaces one externally observable, repository-bound `Architecture Deliberation`. Depth is risk-proportional, but the checkpoint always names affected owners, the current extension point/source of truth, dependency and state/lifecycle boundaries, the selected design and material alternatives, one plausible future-change challenge, touched technical debt and its disposition, forbidden shortcuts, project-owned checks and triggered engineering-quality attributes or their concrete preservation basis. Correctness/invariants and maintainability/changeability always receive at least a preservation judgment; reliability/resource lifecycle, concurrency/consistency, performance/capacity/cost, security/privacy/safety, compatibility/migration/rollout and operability/observability/testability activate only when the change or an explicit claim makes them material. Exact product/technical predicates remain owned by Semantic Facts and exact selected UI/UX values by selected-design closure. Refresh the checkpoint when scope, ownership, selected design, quality applicability or debt disposition materially changes.
|
|
8
8
|
|
|
9
|
+
When foundational machinery, a mature protocol/security boundary, a dependency/shared abstraction or a nearby extension point makes sourcing material, include a risk-triggered `Build / Reuse / Buy` judgment. Record an allowed solution set, prohibited failure modes and required rationale/evidence; do not prescribe one library or abstraction. Reusing an owner, the standard library, an installed dependency, a mature compatible external library, a bounded self-implementation and intentional non-abstraction may all be valid. Enumerate every materially supported member before selection; choosing one never removes another supported member from the allowed set or turns it into a prohibited failure. Judge the task's viable set, not one rejected proposal: when at least one supported allowed choice exists, allow and select one; block only when no supported allowed choice exists, and reserve decision-required for a genuine external choice. Reject duplicate owner-held rules, extension-point bypass, unjustified heavy dependencies, plainly incomplete security-sensitive reinvention, license/platform incompatibility, forced abstraction over merely similar semantics and a second source of truth. This adds no mandatory open-source/DRY rule, quality score, stage or Gate.
|
|
10
|
+
|
|
9
11
|
Implementation order, method and feedback cadence remain Goal-owned. Reuse the owning service/facade/adapter and one source of truth, keep the change minimal but complete, preserve explicit failure and resource-lifecycle semantics, and add abstraction only for a stable concept or evidenced change axis. These are guardrails, not a phase, per-edit mandate or proof that code is globally clean.
|
|
10
12
|
|
|
11
13
|
After implementation and project verification, perform one current-candidate `Engineering Quality Conformance` that includes `Architecture Conformance` and every triggered falsifiable invariant. Default work embeds it in Contract Conformance; an active Long-Task embeds it only in Final Gate through existing Source-backed obligations/constraints/forbidden shortcuts, owner/path/Bindings, executable Checks and independent Assertions when functional behavior could pass separately. Never schedule both carriers, and recheck after any candidate or controlling-input change. Final Gate proves only that declared project-check-bound set, not overall code quality. A performance claim additionally requires a workload, metric, baseline or budget, environment, comparator/tolerance and project-owned measurement; static shape is not runtime proof. New/worsened debt, duplicate truth, wrong dependency direction, owner bypass, silent failure, resource-lifecycle defect, scope escape, unsupported quality claim or forbidden shortcut blocks handoff unless a bounded project-owned exception records owner, rationale, tracking and removal condition. This creates no quality artifact, matrix, second Authority, Contract field/aspect/Claim/risk type, Gate, workflow state or generic analyzer.
|
|
@@ -31,11 +33,13 @@ Both routes preserve Source authority: explicit product, business, API, data, st
|
|
|
31
33
|
|
|
32
34
|
An active Long-Task owns the exact non-UI semantic carrier instead. Its package-managed Skill and progressive references preserve the complete Source inventory/Census, standard plus custom semantic families, atomic Fact and condition identities, Fact×required-method obligations, comparison authority, current typed results and sole Final-Gate equality. Never run a nested default semantic closure. Durable meaning still belongs in its existing owning Context; Source remains task authority, code remains implementation truth and Contract stores bindings rather than copied values. Neither route can discover unexpressed intent or prove an arbitrary Oracle semantically sound.
|
|
33
35
|
|
|
36
|
+
Every machine-closing Long-Task Claim or Fact×method obligation must compile to a package-admitted current-Actual channel. The first bounded slice is plain exact JSON only: either a static implementation/configuration carrier that existed in the pre-run snapshot and is byte/identity unchanged after the runner, or a `process` product root directly spawned and observed by Harness through one temporary `ty-context-product-observation-v1` envelope. Harness owns comparison/result identity/verdict and process-runtime derivation. Custom/named project Oracles, wrappers, project actual/pass/verdict/runtime/interaction/state rows, historical sessions, browser/native/device/layout/pixel/accessibility/motion, protected values, tolerance/mask and custom locators cannot machine-close the obligation and require blocking External Confirmation. A machine Counterfactual without admitted baseline/mutated actual fails; static structure never proves runtime reachability. Public project results remain v3, and this compiled projection adds no Contract Authority, Gate, state or Observer registry.
|
|
37
|
+
|
|
34
38
|
## Selected-Design Conformance Obligation
|
|
35
39
|
|
|
36
40
|
This obligation activates only for a selected implementation handoff. Run `ty-context design-resource preflight <handoff.md>` before UI Authority Closure. A formal Web/App target needs one completely acquired machine-readable canonical entry, its exact dependency closure and one frozen-Inspector observable-Fact manifest. Authoring derives the complete scoped `subject × target × condition × variation × atomic property` Expected Fact Universe before generation; complete Census, axis/combination/property expansion, explicit N/A/exclusions and non-sampling/non-truncation must prove `Expected Fact Universe = Canonical Resource Facts = Handoff Indexed Facts`. Product Control and eight-dimension roll-ups are not the Fact ceiling. Preserve exact located values and design-system lineage in canonical resources, every property-required Fact × method obligation, comparator/tolerance/mask, Oracle/environment and sensitive-observation policy; an exact target also needs full-target layout and pixel Facts for every condition. Deliberately partial input remains a constraint or blocking unresolved. Incomplete acquisition, aggregate labels, unreadable Census/locators, missing/extra Fact Cells or proofs, unresolved conflicts/blockers, unsupported evidence or stale digests fail closed. Preflight proves input completeness/integrity relative to the named Inspector/Oracle TCB, never production conformance.
|
|
37
41
|
|
|
38
|
-
UI symbolic V2 is explicit opt-in; V1 remains the default. A V2 target must preserve the complete extensional `subject/relation × target × reachable condition/variation × applicable atomic property × population/quantifier` denotation, with constant located Rule values, mutually exclusive exhaustive regions and distinct Fact Rule, proof-obligation and set-valued certificate identities. Applicability may retain exact physical remainder partitions or use package-owned subject property profiles plus frozen Inspector custom-property closure and explicit unique instance exceptions; every logical subject-property point still has exactly one disposition. An omitted axis requires both Source-side and production-side proof through frozen closed-world static dependency closure, restricted-IR exact equivalence or finite complete-domain exhaustive equivalence; dynamic/reflected/unfrozen/external or sampled dependencies block. One Contract may mix V1 and V2 targets; bind V1 to exact Fact results and V2 to exact Rule-method-region plus freshly recomputed certificate results in the existing sole Final Gate. V1 admission uses stat/bounded-prefix capacity checks and fails rather than truncating or silently switching. Purpose-fulfillment efficiency non-degradation is a package mechanism-change admission property, not an AcceptedDeliveryTerminal condition. Non-UI symbolic admission and
|
|
42
|
+
UI symbolic V2 is explicit opt-in; V1 remains the default. A V2 target must preserve the complete extensional `subject/relation × target × reachable condition/variation × applicable atomic property × population/quantifier` denotation, with constant located Rule values, mutually exclusive exhaustive regions and distinct Fact Rule, proof-obligation and set-valued certificate identities. Applicability may retain exact physical remainder partitions or use package-owned subject property profiles plus frozen Inspector custom-property closure and explicit unique instance exceptions; every logical subject-property point still has exactly one disposition. An omitted axis requires both Source-side and production-side proof through frozen closed-world static dependency closure, restricted-IR exact equivalence or finite complete-domain exhaustive equivalence; dynamic/reflected/unfrozen/external or sampled dependencies block. One Contract may mix V1 and V2 targets; bind V1 to exact Fact results and V2 to exact Rule-method-region plus freshly recomputed certificate results in the existing sole Final Gate. V1 admission uses stat/bounded-prefix capacity checks and fails rather than truncating or silently switching. Purpose-fulfillment efficiency non-degradation is a package mechanism-change admission property, not an AcceptedDeliveryTerminal condition. Non-UI symbolic admission remains out of scope; machine-observer and verifier/runner trust-boundary closure is mandatory rather than deferred Provider/P0 work.
|
|
39
43
|
|
|
40
44
|
Every non-interference proof needs a digest-identified frozen executable Oracle with the exact `symbolic_noninterference.<side>.<method>` capability. Source proof uses one canonical package-owned restricted Source IR in the complete current Inspector inputs; the package binds its current bytes to target/certificate/Rule scope and derives the DAG, predicate or complete finite-domain evaluation itself. Submitted graph/predicate/evaluation/pass fields and the immutable artifact are cache/bindings only: preflight requires current recomputation, artifact bytes and proof cache to agree, while excluding the artifact from semantic inputs. Executable/CSS/implicit-DOM/template/dynamic/reflected/computed/unfrozen/external Source blocks. Production remains limited to the package-parsed static HTML plus inert JSON subset. Both sides bind implementation closure/version/capability, environment, exact current inputs, side snapshot, scopes, omitted axes, method result, artifact and witness; their proof digests bind the existing current Final-Gate certificate result. Extraction outside admitted representations remains an explicit TCB boundary.
|
|
41
45
|
|
|
@@ -59,22 +63,22 @@ Route by required assurance, not task size. Select Long-Task when stable machine
|
|
|
59
63
|
|
|
60
64
|
The loaded Skill and its progressive references own Source/Contract authoring, Control/applicability closure, selected-design projection, evidence design, protected revision, rolling repair and lifecycle commands. Do not duplicate those low-frequency rules in this startup router. During Draft/proof/lifecycle work, read the applicable Skill reference and use `ty-context long-task help` for CLI syntax.
|
|
61
65
|
|
|
62
|
-
After the first Authority Lock, `execution_model_checkpoint.required: true` is an unconditional terminal-turn boundary. Stop before product implementation, edits, builds or tests even when an earlier message stated a model strategy. Tell a Chinese-speaking user exactly
|
|
66
|
+
After the first Authority Lock, `execution_model_checkpoint.required: true` is an unconditional terminal-turn boundary. Stop before product implementation, edits, builds or tests even when an earlier message stated a model strategy. Tell a Chinese-speaking user exactly `处理好模型更换后,请仅回复:模型切换卡点解除,继续`; use `After handling the model change, reply exactly: model checkpoint cleared, continue` in English. A generic continuation does not satisfy the package-managed prompt protocol. Harness cannot observe the next host message or verify the host model change; later revisions do not repeat the pause and no acknowledgement, model route or checkpoint state is recorded.
|
|
63
67
|
|
|
64
68
|
Long-Task Final Gate is the sole `Engineering Quality Conformance`, `Architecture Conformance` and selected-design closure owner. It source-recompiles and reruns every declared Check on one current snapshot; targeted Progress, prose, historical tests, Receipts, compiled cache or Agent judgment never create acceptance. It proves the declared falsifiable project-check-bound invariants, not overall code quality. Exactly fresh `machine_accepted` with no pending External Confirmation is the complete declared-machine terminal; qualified/external-pending results never complete the platform-native Goal.
|
|
65
69
|
|
|
66
|
-
The `F = Implementation Freedom Boundary` keeps implementation order, methods
|
|
70
|
+
The `F = Implementation Freedom Boundary` keeps implementation order, methods, local feedback cadence, concrete packet decomposition and dynamic worker count Goal-owned within Source/Contract, architecture, safety, forbidden-shortcut and external-action boundaries. After the checkpoint, follow the loaded Skill's packet-first positive-default policy: a qualifying packet set requires actual calls for multiple exact fixed-profile workers; zero-start and partial-delegation outcomes use its admitted reason and integration rules. Harness creates no development method Gate, per-edit mandate, fixed agent allocation, scheduler/delegation state or proof from delegated reports; all proof-bearing output converges into the selected verification workspace.
|
|
67
71
|
|
|
68
|
-
Long-Task Anti-Degradation Assurance requires mechanism changes to preserve or strengthen coverage, false-negative resistance, fail-closed Authority and final-snapshot proof before
|
|
72
|
+
Long-Task Anti-Degradation Assurance requires mechanism changes to preserve or strengthen coverage, false-negative resistance, fail-closed Authority and final-snapshot proof before total-cost ROI matters. Admission targets evidenced high ROI and high efficiency with a significant stable margin, not a global/local optimum; the complete formal cost theorem is unchanged and `observed_lifecycle_*` facts have no admission meaning. Once validity, relative non-degradation, must-allow behavior, structural-cost limits and applicable measured total-cost thresholds close, construction stops unless a new real counterexample, repeated material cost hot spot or significant additional-benefit evidence appears. Replacing the controlling purpose requires an explicit project-owner design-purpose decision plus replacement proof.
|
|
69
73
|
|
|
70
|
-
Tiny Context does not create or restore platform Goals, invoke models, spawn agents, call an App Server, create branches/worktrees, merge, push, open PRs, deploy or manage process trees. `ty-context enable long-task` installs the sole Long-Task Workflow Skill and package-owned lifecycle Hooks; an exact `.codex` root may also receive the optional fixed Codex worker profile.
|
|
74
|
+
Tiny Context does not create or restore platform Goals, invoke models, spawn agents, call an App Server, create branches/worktrees, merge, push, open PRs, deploy or manage process trees. `ty-context enable long-task` installs the sole Long-Task Workflow Skill and package-owned lifecycle Hooks; an exact `.codex` root may also receive the optional fixed Codex worker profile. Retired standalone authoring pointers are not installed. `design-system-authoring` is explicit-only.
|
|
71
75
|
|
|
72
76
|
## Durable Facts And Generated Surfaces
|
|
73
77
|
|
|
74
78
|
- Context is intended ownership/boundary/contract truth; code is current implementation truth. Treat disagreement as drift, missing work or stale Context.
|
|
75
79
|
- Long-term facts live only in `project_context/**` or `DESIGN.md`. Selected targets remain Context-reachable Source/verifier inputs; generated screenshots/diffs/logs/raw evidence/runtime state/Receipts do not become Context.
|
|
76
80
|
- Managed `AGENTS.md` blocks, `<harnessRoot>/ty-context-managed/**` and package-managed Skills are generated and sync-overwritten.
|
|
77
|
-
- Explicit upgrades use `context_harness_upgrade`; package sync never imports retired
|
|
81
|
+
- Explicit upgrades use `context_harness_upgrade`; package sync never imports retired orchestration or development-period authority state.
|
|
78
82
|
|
|
79
83
|
## Verification
|
|
80
84
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ty-context:managed:long-task-implementation-worker
|
|
2
2
|
name = "long_task_implementation"
|
|
3
|
-
description = "
|
|
3
|
+
description = "Package-owned implementation worker for bounded Long-Task rolling code and repair after the parent Goal satisfies the execution-model checkpoint."
|
|
4
4
|
model = "gpt-5.6-luna"
|
|
5
5
|
model_reasoning_effort = "max"
|
|
6
6
|
developer_instructions = """
|
|
@@ -18,7 +18,7 @@ When a valid Long-Task binding is active, `long-task-workflow` alone owns Source
|
|
|
18
18
|
1. Read the core/default Context required by `AGENTS.md`, then the owners implicated by the proposed architecture. Before `Context Delta`, run the bounded high-signal Context search already required by the default Workflow; widen only when dependency or semantic ownership demands it.
|
|
19
19
|
2. State the problem, success boundary and non-goals. Separate intended Source/Context requirements from current-code behavior; code cannot silently redefine missing authority.
|
|
20
20
|
3. Identify the existing source of truth and extension point, affected owners, dependency direction, public/internal interfaces, state and lifecycle, failure/recovery boundaries, compatibility constraints and project-native verification entries.
|
|
21
|
-
4. Compare the smallest material alternatives. Prefer the existing owner/facade/adapter when it carries the stable concept; introduce an abstraction only for an evidenced change axis or durable boundary with positive net value.
|
|
21
|
+
4. Compare the smallest material alternatives. Prefer the existing owner/facade/adapter when it carries the stable concept; introduce an abstraction only for an evidenced change axis or durable boundary with positive net value. When foundational machinery, a mature protocol/security boundary, a dependency/shared abstraction or a nearby extension point makes sourcing material, add the risk-triggered Build / Reuse / Buy judgment below.
|
|
22
22
|
5. Surface one externally observable, repository-bound `Architecture Deliberation` before implementation edits. Include the selected design, rejected material alternatives, one plausible future-change challenge, touched technical debt and disposition, forbidden shortcuts, checks and triggered quality attributes or concrete preservation basis.
|
|
23
23
|
6. Decide exactly one `Context Delta: none|required`. Durable ownership, architecture, API/schema/data, state/recovery, dependency, compatibility, verification/deployment or rationale changes are `required` and update the smallest owning Context before code. A task-local design that preserves those facts is `none`.
|
|
24
24
|
7. Hand the design to the current Goal for implementation under the existing Workflow Contract. After current-candidate project checks, include Engineering/Architecture Conformance in the default Contract Conformance and run the separate Context drift check. Do not add another gate or proof ledger.
|
|
@@ -45,6 +45,14 @@ Correctness/invariants and maintainability/changeability always receive at least
|
|
|
45
45
|
|
|
46
46
|
Refresh the deliberation if scope, ownership, dependency direction, selected design, quality applicability or debt disposition materially changes.
|
|
47
47
|
|
|
48
|
+
### Risk-triggered Build / Reuse / Buy
|
|
49
|
+
|
|
50
|
+
Express the judgment as an `allowed solution set`, `prohibited failure modes` and `required rationale/evidence`, never a single required library or abstraction. Allowed choices may include the owning repository service/facade/adapter, standard library, installed dependency, mature compatible external library, a small bounded self-implementation or intentional non-abstraction.
|
|
51
|
+
|
|
52
|
+
Enumerate every materially supported member before selecting one; selection never removes another supported member from the allowed set. Judge the task's viable set, not its first proposal. If one member has current support, allow and select it while keeping every unselected but legal member as an alternative. Only a choice which actually exhibits a prohibited failure mode belongs in the prohibited list. Use `block` only when no member is supported or safety/compatibility evidence is missing; use `decision-required` only for a genuine user/product/external choice, never for multiple implementation-equivalent options.
|
|
53
|
+
|
|
54
|
+
Reject duplicate owner-held rules, extension-point bypass, an unjustified heavy dependency, plainly incomplete reinvention of mature security-sensitive behavior, incompatible license/platform support, forced abstraction over structurally similar but semantically different code and a second source of truth for one stable rule. Do not add a mandatory open-source preference, DRY rule, generic quality score, artifact, stage or Gate. Conformance asks only whether the selected choice is in the allowed set, avoids prohibited failures and has risk-proportional current evidence.
|
|
55
|
+
|
|
48
56
|
## Boundary routing
|
|
49
57
|
|
|
50
58
|
- Product goals, business/user rules, flows and acceptance meaning belong to `context_product_plan`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-resource-authoring
|
|
3
|
-
description: Use when the user explicitly asks to generate, author, commission or
|
|
3
|
+
description: Use when the user explicitly asks to generate, author, commission, iterate or recover design resources; use Open Design; create a scoped wireframe, prototype, visual candidate, component/control state study or implementation handoff; or asks to 生成设计资源, 使用 Open Design, 生成原型图, 生成高保真/低保真设计, 为开发准备设计资源, 恢复设计资源任务, or 先看一个控件/页面效果 in a Minimal Context Harness project. Do not trigger for generic design discussion, UX audits, ordinary UI implementation, local CSS fixes, durable Design Authority adoption, initial product-proposal authoring or Long-Task execution.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Design Resource Authoring
|
|
@@ -9,14 +9,14 @@ Commission the smallest sufficient resource set for the user's explicit output/d
|
|
|
9
9
|
|
|
10
10
|
## Hard boundaries
|
|
11
11
|
|
|
12
|
-
- A raw proposal, plan, brief, screenshot or existing resource is valid input. Never require
|
|
12
|
+
- A raw proposal, plan, brief, screenshot or existing resource is valid input. Never require or create a special intermediary planning format, and never rewrite caller-owned Source except for the one explicitly selected proposal reconciliation.
|
|
13
13
|
- The explicit output/development scope is a hard ceiling. Necessary surrounding context may orient the slice but cannot expand it.
|
|
14
14
|
- Candidates are ordinary external Source. They do not select themselves, become `exact-target`, update `DESIGN.md`/Context or prove implementation acceptance.
|
|
15
15
|
- Keep candidate effects in a task-local buffer. Only after explicit selection or explicitly delegated selection may accepted decisions be reconciled once and idempotently into the initial proposal; never write rejected/unresolved meaning as accepted.
|
|
16
16
|
- Never mutate `project_context/**`, `DESIGN.md`, a Delivery Contract, production code or tests as a resource-authoring side effect.
|
|
17
17
|
- Do not require a prototype, fidelity pair, provider-native file, fixed directory, variant count, resource pack or one artifact per control. Reuse selected component families and group repeated controls.
|
|
18
18
|
- Visual resources may express user-visible interaction/presentation but cannot invent or become sole owner of business, data, permission or algorithmic rules.
|
|
19
|
-
- Do not install/configure MCP, plugins, authentication or disclosure paths without separate authorization. Create no provider registry, workflow state, authority lifecycle, scheduler or acceptance record.
|
|
19
|
+
- Do not install/configure MCP, plugins, authentication or disclosure paths without separate authorization. Create no provider registry, global workflow state, authority lifecycle, scheduler or acceptance record.
|
|
20
20
|
|
|
21
21
|
## Progressive references
|
|
22
22
|
|
|
@@ -25,6 +25,8 @@ Commission the smallest sufficient resource set for the user's explicit output/d
|
|
|
25
25
|
3. Read [downstream-handoff.md](references/downstream-handoff.md) only when selection, proposal reconciliation or downstream handoff is material. A simple unselected preview may stop without it.
|
|
26
26
|
4. Read [formal-selected-web-app-handoff.md](references/formal-selected-web-app-handoff.md) completely only for an explicitly final selected Web/App implementation handoff. Exploration, unselected previews, reference-only resources and non-Web/App commissions never load this reference.
|
|
27
27
|
|
|
28
|
+
For simple-preview overhead accounting, the requested preview is neither additional Provider generation nor an added tool action.
|
|
29
|
+
|
|
28
30
|
## Workflow
|
|
29
31
|
|
|
30
32
|
1. Name in-scope surfaces/flows/regions/component families/unique controls, conditions, necessary context, exclusions and intent: `exploration`, `handoff` or `selected-source-preparation`.
|
|
@@ -32,8 +34,8 @@ Commission the smallest sufficient resource set for the user's explicit output/d
|
|
|
32
34
|
3. Classify the commission `style-bearing` or `non-fidelity`. Style-bearing means high fidelity/brand/visual direction/typography/color/density/component treatment/production-style prototype. IA/flow topology, low-fidelity structure and semantics-only state studies are non-fidelity.
|
|
33
35
|
4. For style-bearing work, read configured Design Authority and its exact-value token source. If unconfigured, stop before provider project/run creation and route the user to explicit `$design-system-authoring`; never invoke it automatically. Non-fidelity work remains allowed.
|
|
34
36
|
A combined explicit request authorizes running `$design-system-authoring` first and then resuming this Skill.
|
|
35
|
-
5. Discover only the live provider capabilities needed by the bounded commission. Give every considered resource one disposition—`selected`, `optional`, `not-needed`, `unavailable` or `decision-required`—with a reason. Ask only when a missing preference materially changes the result.
|
|
36
|
-
6. Bind style-bearing provider work to the adopted design-system identity, send only the scoped product/resource commission and keep provider execution, artifact readiness, design suitability, final selection and authority adoption distinct.
|
|
37
|
+
5. Discover only the live provider capabilities needed by the bounded commission. For a formal generation, major revision or critical regeneration, apply the provider reference's `highest_available_capability + highest_supported_reasoning_effort` policy and fail closed when eligible candidates cannot be authoritatively ranked; never infer rank from price, name, release date or list order, and never claim an effective model/effort the run cannot confirm. Give every considered resource one disposition—`selected`, `optional`, `not-needed`, `unavailable` or `decision-required`—with a reason. Ask only when a missing preference materially changes the result.
|
|
38
|
+
6. Bind style-bearing provider work to the adopted design-system identity, send only the scoped product/resource commission and keep provider execution, model-selection verification, artifact readiness, design suitability, final selection and authority adoption distinct.
|
|
37
39
|
7. Iterate within scope. Exploration returns a visible candidate after minimal sanity review. Do not burden it with handoff schema, hashes, complete Fact closure or downstream validation.
|
|
38
40
|
8. After final selection, preserve immutable identity and editable-upstream provenance; reconcile accepted proposal effects once. If an implementation handoff was requested, use the applicable downstream reference—and the formal reference only for selected Web/App targets.
|
|
39
41
|
|
|
@@ -18,7 +18,7 @@ Design resources may show user-visible triggers, transitions, states, feedback a
|
|
|
18
18
|
|
|
19
19
|
## Reconcile the initial proposal once
|
|
20
20
|
|
|
21
|
-
During iteration, keep a task-local buffer of selection basis, selected immutable/editable identities, accepted decisions, rejected alternatives, unresolved choices and affected product/surface/control/state/interaction/visual keys. This is reasoning, not a schema or required file.
|
|
21
|
+
During a simple iteration, keep a task-local buffer of selection basis, selected immutable/editable identities, accepted decisions, rejected alternatives, unresolved choices and affected product/surface/control/state/interaction/visual keys. This is reasoning, not a schema or required file. If the loop is material enough to require replayable Delta, a file writeback or interruption recovery, stop and read [recovery-and-writeback.md](recovery-and-writeback.md); do not approximate safe recovery/CAS from this lightweight reference.
|
|
22
22
|
|
|
23
23
|
After final selection:
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ After final selection:
|
|
|
30
30
|
6. make reruns idempotent by updating the existing decision/reference;
|
|
31
31
|
7. edit the authorized writable initial-proposal file, or return one complete revised proposal when it exists only in conversation.
|
|
32
32
|
|
|
33
|
-
Never mutate
|
|
33
|
+
Never mutate other caller-owned Source, Context, `DESIGN.md`, Contract, production code or tests. If no selection occurs, return candidates and the pending delta without changing the proposal.
|
|
34
34
|
|
|
35
35
|
Small requests may complete generation, selection and reconciliation in one turn; “once” describes the semantic writeback, not a required pause.
|
|
36
36
|
|