project-tiny-context-harness 0.7.7 → 0.7.9
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 +36 -22
- package/assets/README.md +40 -35
- package/assets/README.zh-CN.md +38 -33
- package/assets/agents/AGENTS_CORE.md +14 -8
- package/assets/skills/context_development_engineer/SKILL.md +29 -10
- package/assets/skills/context_uiux_design/SKILL.md +4 -3
- package/assets/skills/design-resource-authoring/SKILL.md +53 -41
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +61 -91
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +19 -2
- package/assets/skills/design-resource-authoring/references/resource-selection.md +11 -4
- package/assets/skills/design-system-authoring/SKILL.md +57 -0
- package/assets/skills/design-system-authoring/agents/openai.yaml +6 -0
- package/assets/skills/design-system-authoring/references/authority-adoption.md +47 -0
- package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -0
- package/assets/skills/long-task-workflow/SKILL.md +19 -12
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +1 -1
- package/assets/skills/long-task-workflow/references/contract-authoring.md +9 -6
- package/assets/skills/long-task-workflow/references/source-authoring.md +98 -0
- package/assets/skills/source-plan-authoring/SKILL.md +6 -477
- package/dist/commands/index.js +1 -1
- package/dist/lib/profiles.js +1 -0
- package/package.json +1 -1
package/assets/README.zh-CN.md
CHANGED
|
@@ -38,13 +38,22 @@ npx --yes project-tiny-context-harness ty-context sync
|
|
|
38
38
|
|
|
39
39
|
`upgrade` 先执行安全迁移再同步;资产刷新不会推断或覆盖用户编写的 Context、Source、Delivery Contract 或历史文件。
|
|
40
40
|
|
|
41
|
-
默认 Profile 是 `core-portable` 与 `workflow-default`,基础 managed set
|
|
41
|
+
默认 Profile 是 `core-portable` 与 `workflow-default`,基础 managed set 已包含显式调用的 `/design-system-authoring` 与 `/design-resource-authoring`。显式启用长程能力:
|
|
42
42
|
|
|
43
43
|
```powershell
|
|
44
44
|
ty-context enable long-task
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
启用长程能力会额外安装 `/source-plan-authoring
|
|
47
|
+
启用长程能力会额外安装 `/long-task-workflow`、退役兼容指引 `/source-plan-authoring` 与完成 Hook;`ty-context disable long-task` 只移除这些 Long-Task-owned surfaces,并保留两个基础设计 Skill。Tiny Context 不安装 Open Design、模型 Worker、Agent runtime、调度器、Git 编排资产或其他设计生成 runtime。
|
|
48
|
+
|
|
49
|
+
## 推荐用法
|
|
50
|
+
|
|
51
|
+
初始输入可以是一段产品意图,也可以是 Web GPT 等外部服务给出的详细初始方案。涉及独立设计资源时:
|
|
52
|
+
|
|
53
|
+
- **长程任务:** 初始方案 → 项目尚无设计系统时由用户显式调用 `/design-system-authoring` 生成、选择并采纳 → `/design-resource-authoring` 生成/选择资源,并在方向定稿后把接受的变更一次性回改初始方案 → 把“修订后的初始方案 + 选定且身份稳定的设计资源”交给 `/long-task-workflow`;Source 补全与 Contract Draft Authoring 在同一个原生 Goal 内继续。
|
|
54
|
+
- **非长程任务:** 使用同样的初始方案与设计资源步骤 → 把“修订后的初始方案 + 选定设计资源”直接交给 Codex 当前原生 Goal,按默认 Workflow Contract 执行。
|
|
55
|
+
|
|
56
|
+
设计系统通常在项目冷启动时确定,但该 Skill 只由用户调用,`init`、`sync` 与下游 Skill 都不会自动执行。`/design-resource-authoring` 只对高保真、品牌化、视觉处理等 style-bearing 资源设门禁;低保真结构、IA/流程与纯语义状态研究不受此门禁。旧 Source Plan 仍可作为普通输入,但不再是推荐中间服务。
|
|
48
57
|
|
|
49
58
|
## Minimal Context 与默认工作流
|
|
50
59
|
|
|
@@ -69,7 +78,7 @@ manifest/trigger 命中的少量 area/role Context
|
|
|
69
78
|
3. 合并两路候选,只读取真正相关的 Context;
|
|
70
79
|
4. 再判断 `Context Delta: none|required`。
|
|
71
80
|
|
|
72
|
-
这次搜索只补充语义判断,不会把所有关键词命中都当成 Authority,也不会创建向量/持久索引、缓存、Registry、search state
|
|
81
|
+
这次搜索只补充语义判断,不会把所有关键词命中都当成 Authority,也不会创建向量/持久索引、缓存、Registry、search state 或第二权威。它仍可能漏掉完全不同的同义词或间接依赖,因此每个实现需求仍要执行 Architecture Deliberation 与收尾 Conformance。
|
|
73
82
|
|
|
74
83
|
`ty-context doctor` 会报告确定性的默认 Context 文件/字节规模、单文件与总量软预算超限、字节完全相同的默认文件,以及 `DESIGN.md` 权威状态。这些只是维护提示,不是新验证 Gate 或运行时状态。
|
|
75
84
|
|
|
@@ -79,11 +88,12 @@ Context 负责耐久的意图和边界,代码负责当前实现,测试/CI/
|
|
|
79
88
|
|
|
80
89
|
1. 读取 core/default Context,收集 manifest 候选;
|
|
81
90
|
2. 在 `project_context/**` 做一次 bounded Context search;
|
|
82
|
-
3.
|
|
83
|
-
4.
|
|
91
|
+
3. 对用户可见地给出一次简洁、仓库事实绑定的 Architecture Deliberation;
|
|
92
|
+
4. 决定 `Context Delta: none|required`,耐久语义改变时先更新 owner Context;
|
|
84
93
|
5. 使用平台内部计划;
|
|
85
94
|
6. 实现并运行项目验证;
|
|
86
|
-
7. 执行 Contract Conformance
|
|
95
|
+
7. 执行 Contract Conformance,其中包含对当前候选快照的 Architecture Conformance;
|
|
96
|
+
8. 单独执行 Context drift check 后交付。
|
|
87
97
|
|
|
88
98
|
默认工作流不要求 `plan.md`、matrix、verdict、evidence ledger、持久检索索引或第二份执行计划。任务时长、文件数和复杂度不会自动激活长程状态。
|
|
89
99
|
|
|
@@ -97,11 +107,15 @@ Context: no durable fact change
|
|
|
97
107
|
|
|
98
108
|
### 架构与模块质量
|
|
99
109
|
|
|
100
|
-
|
|
110
|
+
技术架构能力是两条实现路径共享的 Workflow 义务。每个实现需求都在第一处实现编辑前,对用户可见地完成一次 `Architecture Deliberation`;风险改变深度,不取消这个环节。小修改要指出具体 owner / 当前 extension point、未改变的耐久边界,以及为何没有新增或加重技术债。material 工作还要覆盖唯一 source of truth、dependency 与 interface/state/lifecycle 边界、failure/recovery/compatibility、选中和拒绝的方案、至少一个合理未来变化及其扩展点、触达的技术债、forbidden shortcuts 和项目原生可执行检查。
|
|
101
111
|
|
|
102
|
-
|
|
112
|
+
实现和项目验证之后,`Architecture Conformance` 对当前候选快照检查 scope/path escape、owner 或 dependency direction 违规、service/facade 绕过、重复权威或第二 source of truth、未声明 API/Schema/state/persistence 变化、缺失架构检查和新增/加重技术债。候选再变化就使结果失效。普通任务把它放在 Contract Conformance 内;Long-Task 用已有 obligation/constraint/forbidden shortcut、owner/path/Binding 和 executable Check 表达不变量,只由 Final Gate 收口,同一候选不会执行两次。
|
|
103
113
|
|
|
104
|
-
|
|
114
|
+
Contract Conformance 主要检查当前 Source/Context 是否到达实现和验证;单独命名的 Context drift check 反向检查实现或新决策是否让耐久 Context 过时。新增或加重技术债默认阻塞,除非项目有带 owner、rationale、tracking 和 removal condition 的显式 bounded exception。无关 legacy debt 不自动扩张任务范围,但本次触达、依赖或加重的债不能隐藏。
|
|
115
|
+
|
|
116
|
+
`Architecture Context Hit`、`Decision Rationale Hit: existing|required|none` 和 `Modularity Check: none|required|exception` 仍是内部路由问题,不创建 Task Contract 或固定 `plan.md`。可见检查点证明“做过架构考量”,不暴露私有思维链,也不保证最佳设计或预知所有未知未来需求。
|
|
117
|
+
|
|
118
|
+
Harness 只路由仓库原生 lint/AST/dependency/contract check,不实现跨语言通用架构分析器或新增架构 artifact/state。`check-modularity` 的语句数/分支风险会定位到最高风险函数和行号。
|
|
105
119
|
|
|
106
120
|
### Product Surface 与 Screen Contract
|
|
107
121
|
|
|
@@ -111,7 +125,7 @@ material UI 在实现前执行 **UI Authority Closure**:每个稳定 surface/c
|
|
|
111
125
|
|
|
112
126
|
### 视觉交付指导
|
|
113
127
|
|
|
114
|
-
默认 Workflow 现在会在 material production UI 前执行 UI Authority Closure 和条件式 Design Authority Check,包括新建/重做页面、主要布局/导航/主题/组件体系、高保真实现和大幅 visual polish。它读取 owning Surface/Screen/Control Context、`DESIGN.md`、唯一 authored token source/generation direction 和选定设计引用。引用分为 `exact-target`、`constraint`、`inspiration`;未配置 starter、候选稿、只有风格文字或灵感图都不能授权 agent 自行发明生产布局;全局视觉系统 configured 也不等于每个页面 implementation-ready
|
|
128
|
+
默认 Workflow 现在会在 material production UI 前执行 UI Authority Closure 和条件式 Design Authority Check,包括新建/重做页面、主要布局/导航/主题/组件体系、高保真实现和大幅 visual polish。它读取 owning Surface/Screen/Control Context、`DESIGN.md`、唯一 authored token source/generation direction 和选定设计引用。引用分为 `exact-target`、`constraint`、`inspiration`;未配置 starter、候选稿、只有风格文字或灵感图都不能授权 agent 自行发明生产布局;全局视觉系统 configured 也不等于每个页面 implementation-ready。明确的项目设计系统初始化/采纳请求路由到 `/design-system-authoring`;明确的独立设计资源生成请求路由到 `/design-resource-authoring`,由它委托外部 Open Design 能力但不采纳权威。消费这些输入的开发 Workflow 与 `context_uiux_design` 仍负责 UI Authority Closure,以及设计系统冷启动/采纳之外的后续耐久修复。已有充分权威的普通实现、局部样式修复和 throwaway prototype 仍保持轻量。
|
|
115
129
|
|
|
116
130
|
对 material 工作,`context_uiux_design` 在任务内部维护风险比例化的 Visual Coverage Set;耐久 surface/interaction 事实属于 `project_context/**`,耐久视觉语义和设计引用 registry 属于 `DESIGN.md`,versioned target 保留在项目原生路径。`context_development_engineer` 把这些意图绑定到生产组件/真实 route,只报告真正渲染和检查过的组合;实现截图不能成为它自己的目标。
|
|
117
131
|
|
|
@@ -121,40 +135,31 @@ combined design-and-implementation 可以先用普通 Outcome/Stage 生成候选
|
|
|
121
135
|
|
|
122
136
|
`ty-context doctor` 保留兼容的项目级 `missing | unconfigured | configured` 状态,并增加 Design Authority Index、token source 和已分类 reference 的 advisory 信号。它明确不推断页面实现就绪;material surface 仍需 owning Screen/Control meaning、selected target/constraints 与项目自己的验证路径。
|
|
123
137
|
|
|
138
|
+
### 显式 Design System Authoring
|
|
139
|
+
|
|
140
|
+
只有用户明确要求初始化、生成、选择、采纳、替换或修复项目设计系统/设计风格时,才使用 `/design-system-authoring`。安装只让冷启动能力可用,不会自动运行。Skill 会发现 Open Design 当前真实 MCP resource/tool;若当前版本只通过 MCP 读取设计系统而没有创建 tool,则使用同一个已安装 Open Design daemon 的官方 generation/revision/accept API,不复制 provider prompt,也不把 daemon 调用冒充 MCP。
|
|
141
|
+
|
|
142
|
+
生成结果先是候选。必须有明确人工选择,或用户明确委托且选择标准已知,才会采纳到项目 canonical `DESIGN.md`、唯一 authored exact-value token source/generation direction,以及真正拥有 surface/interaction 耐久事实的 Context。Open Design provider ID、revision、digest 与 project binding 只是同步 provenance,不是第二权威。provider 执行成功、artifact ready、selected、authority adopted 与 `get_project.designSystemId` binding verified 会分开报告。
|
|
143
|
+
|
|
124
144
|
### 可选 Design Resource Authoring
|
|
125
145
|
|
|
126
|
-
只有在用户明确要求生成、迭代、准备独立设计资源、为一段明确开发内容准备设计资源或使用 Open Design 时,才使用 `/design-resource-authoring
|
|
146
|
+
只有在用户明确要求生成、迭代、准备独立设计资源、为一段明确开发内容准备设计资源或使用 Open Design 时,才使用 `/design-resource-authoring`。输入可以是零散笔记或初始方案、产品/技术方案、专门视觉 brief、截图、已有资源或历史 Source Plan。独立 Source Plan 不是前置项,也不再是推荐中间步骤。
|
|
127
147
|
|
|
128
148
|
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`。
|
|
129
149
|
|
|
150
|
+
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` 验证一致。
|
|
151
|
+
|
|
130
152
|
Skill 只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)委托最小充分资源集。一个可定位、可检查的大页面稿、原型或组件族 workbench 可以覆盖多个事项;重复控件映射到共享变体,只有仍缺少材料性含义的独特/复杂控件才需要专门状态或交互稿。静态/default 页面不能自动代表没展示的动态状态、交互、动效、响应式或可访问性。原型、低/高保真组合、组件板、Figma handoff、逐控件一份稿、变体数量和目录都不是全局必选项。设计资源可以表达用户可感知的交互语义和产品规则的呈现方式,但业务、数据、权限和算法逻辑仍由产品/技术 Source 所有。Tiny Context 不复制 Open Design 的 prompt/template,也不内置 provider catalogue。
|
|
131
153
|
|
|
132
|
-
探索模式只做最小完整性检查并尽快展示指定候选;面向实现的 handoff 还要增加 project/run/capability provenance、明确 entry、声明覆盖、已知限制,以及每个材料性 surface/flow/region/component/control 条件到已有/新资源或不适用/范围排除/未决项的简洁稳定 Key
|
|
154
|
+
探索模式只做最小完整性检查并尽快展示指定候选;面向实现的 handoff 还要增加 project/run/capability/design-system provenance、明确 entry、声明覆盖、已知限制,以及每个材料性 surface/flow/region/component/control 条件到已有/新资源或不适用/范围排除/未决项的简洁稳定 Key 映射。候选迭代期间,accepted/rejected/unresolved 影响只存在任务内 delta buffer。明确或受托最终选择后,Skill 只做一次合并、幂等的初始方案回改:有可写文件就更新该方案,只有对话输入就返回完整修订方案;拒绝和未决项不会写成需求。它不会修改 Source Plan、`project_context/**`、`DESIGN.md`、生产代码或 Delivery Contract。
|
|
133
155
|
|
|
134
156
|
实际生成仍由已配置的 Open Design/Product Design、Figma、图片生成、原型工具或人工设计流程负责。这些输出以普通 external Source 进入默认 Workflow 或 Long-Task。candidate 与 inspiration 不授权 fidelity;selected exact target 只控制其声明的 surface/viewport/mode/state/content 条件,并且需要稳定不可变身份后才能成为影响验收的 `verification_input`。`context_uiux_design` 在下游执行 UI Authority Closure,只把耐久事实采纳到 Context/`DESIGN.md`;实现截图与 diff 仍是证据 artifact,不能自我授权为目标。
|
|
135
157
|
|
|
136
158
|
维护者可以设置 `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` 与可选 `TY_CONTEXT_OPEN_DESIGN_MCP_ARGS_JSON`,运行 `npm run smoke:open-design` 做显式启用、只读的 discovery smoke。正常测试使用本地 mock MCP,不依赖 Open Design、登录、付费能力或不确定的设计输出。
|
|
137
159
|
|
|
138
|
-
###
|
|
139
|
-
|
|
140
|
-
用户明确要求初版方案、源方案、方案源稿、Source Plan,或要求综合、细化、审计后续实现与 Contract Authoring 的 Source 时,使用 `/source-plan-authoring`。输入既可以是一份接近完成的方案,也可以只是目标,加上零散笔记、产品/技术文档、截图、图表等混合附件。用户只需说明附件角色、产品目标、参考资料是精确目标还是灵感,以及希望 Skill 细化即可;不需要先填固定问卷或整理统一大纲。
|
|
141
|
-
|
|
142
|
-
它输出一份自包含 Markdown Source Plan:
|
|
143
|
-
|
|
144
|
-
- 为每份附件建立 Input Inventory,完整检查有实质含义的页面、画面与屏幕,未读内容或覆盖缺口必须显式报告,不能静默抽样;
|
|
145
|
-
- 保留直接要求及其限定条件;
|
|
146
|
-
- 必要推导必须标记并写明 `Derived From`;
|
|
147
|
-
- 在对比调研或实质性的产品、技术、架构、供应商选型前,先判断哪些用户取舍会改变调研范围、候选集或推荐;如果质量与性价比、交付速度、可靠性、隐私、供应商锁定、运维成本等关键偏好不明确,就先用简短、有针对性的问题询问用户,不重复询问已有偏好,也不打断推荐不会改变的局部可逆选择;
|
|
148
|
-
- 偏好边界明确后,再决定是否以及如何调研;外部能力、价格、额度、许可、兼容性、区域、安全与支持等时效性事实使用当前权威或一手来源。用户要求综合、细化、补全或自行判断时,默认委托方案层决策:形成有依据的合理推荐后,直接标记为 `delegated` 并记录委托语句、偏好/证据依据和准确含义,高影响方案语义本身不再触发批准;真实付款/签约、生产发布、生产数据破坏性修改、实际授权、敏感数据外发及必要法务/安全/人工审批仍保留为 `EXT`,只有输入冲突、用户明确保留、关键偏好仍缺失或无法形成可靠推荐时才进入 `DEC`/`decision_required`;
|
|
149
|
-
- Outcome 只按可独立判断的可观察结果拆分;
|
|
150
|
-
- 重要 Source 项使用稳定语义 Key 与显式 Anchor;
|
|
151
|
-
- 强制技术义务使用 `OBL`,非强制实现建议使用 `HINT`;
|
|
152
|
-
- 对交互产品,先穷举范围内的 surface,再细化到每个实质控件,分别记录页面/区域/类型/文案、位置、任务、可见与可用条件、触发/输入/校验/默认值、交互/跳转,以及 Loading、Empty、Success、Failure、Recovery、Permission、Feedback 和 Accessibility;
|
|
153
|
-
- 明确“不算完成”的 Source 含义使用 `NCOMP`;
|
|
154
|
-
- 每个 `RISK` 明确 Fact、单个 Affected Outcome、Basis 与 Consequence,无法确定时进入 `DEC`;Fact 精确使用 Runtime 的十个名称:`public_api_or_schema_change`、`persistent_data_change`、`data_migration`、`security_boundary_change`、`permission_boundary_change`、`irreversible_external_effect`、`critical_user_path`、`full_population_operation`、`multi_repository_change`、`weak_observability`;
|
|
155
|
-
- 每个 AC 只代表一个 Given/When/Then 可观察场景,显式列出对应 `REQ`/`CTRL`/`OBL`/`NCOMP` Key,不能首次偷渡新需求,并在文末报告是否已可交给 Contract Authoring。
|
|
160
|
+
### 退役 Source Plan 兼容入口
|
|
156
161
|
|
|
157
|
-
|
|
162
|
+
`/source-plan-authoring` 仅作为 long-task profile 的兼容指引保留。`/long-task-workflow` 已在同一个 Goal、同一个 Contract Draft 生命周期内负责完整 input inventory、混合输入综合/细化、稳定 Key、控件级语义、偏好/调研/委托溯源,以及 acceptance/risk 完整性。已有 Source Plan 仍是有效普通 Source,但不再创建独立 Source Plan handoff、Schema、Gate、State 或第二份计划。
|
|
158
163
|
|
|
159
164
|
## Single-Goal Rolling Delivery
|
|
160
165
|
|
|
@@ -171,7 +176,7 @@ Skill 只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)
|
|
|
171
176
|
- Final Gate 在一个当前快照上重跑全部 Check;
|
|
172
177
|
- Stop Hook 在结果 stale 时阻止完成。
|
|
173
178
|
|
|
174
|
-
Long-Task
|
|
179
|
+
Long-Task 会先在同一流程内把原始/修订方案、选定设计资源和混合附件补成自包含真实 Source:完整 input inventory、稳定 Key、控件级含义、acceptance/risk,以及 direct/derived/delegated/evidence-backed 溯源都在 Contract 映射前完成。若未知偏好会实质改变调研或选型,必须先询问;标准明确后,有依据的推荐才写入真实 Source,不能只藏在 YAML。方案委托不授权真实高危外部动作;输入冲突、用户保留、偏好缺失或无可靠推荐仍为 `decision_required`。旧 Source Plan 结构不构成阻塞,但激活前必须完成 Material Source Item 标记。
|
|
175
180
|
|
|
176
181
|
第一次正式 Compile 成功前,`delivery-contract.yaml` 是同一份非权威 Contract Draft。`/long-task-workflow` 可以跨多轮仓库/Context 读取和 Preflight 修复持续修改它,不要求一次响应生成完整 Contract。不存在单独 Contract Draft Skill、Draft Receipt 或 Authoring State。
|
|
177
182
|
|
|
@@ -191,7 +196,7 @@ Agent 此时在实现前只暂停一次,请用户选择:继续当前模型
|
|
|
191
196
|
|
|
192
197
|
锁定后的修订分三类:机器可证明的单调证据增强和机械安全变化自动采用;如果唯一的受保护原因只是扩大 owner、expected-change 或 allowed-support path(可以同时带有安全的单调增强),就能用 `diagnose-revision` 在不切换 Authority 的前提下运行原 Active Authority 已有且未更换的 Check;产品/Source/Acceptance 语义变化、证明弱化、verifier 内容或 runner 变化、风险上升只给摘要,不运行候选,风险降级则直接拒绝。滚动实现遇阻本身不是 External Confirmation,也不允许删除机器可验证范围;真正的范围变化必须先成为 marked Source。诊断结果不是 Progress 或 acceptance,也不会写 pending/approval、cache、Receipt 或 marker。相关修改只在同一份 `delivery-contract.yaml` 中累计,最终由一次 `compile --revise` 生成精确 hash 与包含语义字段、Source/Product Claim 缩减、proof 缩减和 external-confirmation key 的短摘要;`status`/`resume` 投影同一个待批决策。批准并原子采用后返回 `delivery_completed_by_this_event: false`,旧证据失效并回到滚动实现或修复,完整 Final Gate 仍必须重跑。
|
|
193
198
|
|
|
194
|
-
Long-Task Skill 采用渐进读取:主 `SKILL.md`
|
|
199
|
+
Long-Task Skill 采用渐进读取:主 `SKILL.md` 只保留目标、硬边界和阶段路由;Source Authoring、Contract Authoring、Evidence Design 与 Authority Lifecycle 细节只在对应阶段读取一层 reference。这只是指令组织,不产生第二权威。共享 Architecture Deliberation 在 Source/Contract authoring 中完成;material 架构不变量使用已有 obligations/constraints/forbidden shortcuts、owner/path/Binding 和项目原生 executable Checks,Final Gate 是唯一的 Long-Task Architecture Conformance 承载点。
|
|
195
200
|
|
|
196
201
|
Draft Outcome 只是 Authority Lock 前的 Outcome。Outcome 按可独立观察、判断、纵向闭环和定向验证的结果拆分,使当前 Goal 能缩小 dependency-ready 工作集、定向验证、定位失败、恢复 finding 并精确失效旧局部结果。`depends_on` 只表示 acceptance readiness。每个 Outcome 属于一个有序 Stage;Stage gate 传递依赖同 Stage 其余 Outcome,后续 Stage 依赖前置 gate。Rolling Frontier 和 Stage 状态都由普通 Outcome Progress 临时派生;Outcome 不是 Worker、scheduler task、queue 或并行单元,Stage 也没有 Receipt 或第二个 Gate。Outcome 拆分执行和诊断,不拆分完成权威,因此最终仍必须在当前最终快照运行一次完整 Final Gate。
|
|
197
202
|
|
|
@@ -4,20 +4,26 @@ This project uses Tiny Context. The Harness maintains durable Context and workfl
|
|
|
4
4
|
|
|
5
5
|
Tiny Context has three capabilities: Minimal Context, the default Workflow Contract, and the explicitly enabled Single-Goal Long-Task Workflow.
|
|
6
6
|
|
|
7
|
+
## Shared Architecture Quality Obligation
|
|
8
|
+
|
|
9
|
+
Every implementation delivery performs one externally observable, repository-bound `Architecture Deliberation` before the first implementation edit. Its depth is risk-proportional, but the occurrence is universal: identify affected owners and 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, and project-owned checks. A small change may conclude that existing architecture is preserved, but must name the concrete owner/extension point and why no new or worsened debt is introduced. Surface conclusions and repository evidence, not private chain-of-thought, and refresh the checkpoint if scope, ownership or the selected design materially changes.
|
|
10
|
+
|
|
11
|
+
After implementation and project verification, perform one `Architecture Conformance` closure on the current candidate snapshot. The default path embeds it in Contract Conformance; an active Long-Task embeds it only in Final Gate. Never schedule both. A changed candidate invalidates the closure and must be rechecked. New or worsened debt, an undeclared second source of truth, wrong dependency direction, owner bypass, scope escape or a forbidden shortcut blocks handoff unless an explicit project-owned bounded exception records owner, rationale, tracking and removal condition. This obligation creates no plan artifact, architecture document, second Authority, workflow state or generic architecture analyzer.
|
|
12
|
+
|
|
7
13
|
## Default Workflow Contract
|
|
8
14
|
|
|
9
15
|
Unless an active Long-Task binding exists:
|
|
10
16
|
|
|
11
17
|
1. Read `project_context/global.md`, `project_context/architecture.md`, `project_context/context.toml` and the default area root, then collect graph/trigger candidates.
|
|
12
18
|
2. Before deciding `Context Delta`, run one bounded text search over `project_context/**` using a small set of high-signal task terms such as explicit area/module names and API/schema/state/security/verification/deployment terms. Merge matching Context with manifest candidates and read only relevant files; search supplements rather than replaces semantic judgment.
|
|
13
|
-
3. For UI/product-surface work, confirm information/action/feedback ownership and use `context_surface_contract` when durable responsibility is unclear or changes; Product Surface Contracts own cross-surface interfaces and optional on-demand Screen Contracts use existing area/subdomain/contract/verification roles for deeper screen/control facts. Before material production UI implementation, reconcile each affected stable surface/control/target key as Context-covered, requiring a Context update, task-local, out of scope or decision-required, then read `DESIGN.md`, its token source and referenced design targets. An unconfigured starter, candidate, style-only guidance or inspiration does not authorize invented production layout; only a selected exact/constraint target with adequate declared coverage authorizes fidelity. For an explicit standalone request to generate or iterate
|
|
14
|
-
4.
|
|
15
|
-
5. Use the agent/platform internal plan.
|
|
16
|
-
6. Implement precisely, run project-owned verification, perform Contract Conformance
|
|
19
|
+
3. For UI/product-surface work, confirm information/action/feedback ownership and use `context_surface_contract` when durable responsibility is unclear or changes; Product Surface Contracts own cross-surface interfaces and optional on-demand Screen Contracts use existing area/subdomain/contract/verification roles for deeper screen/control facts. Before material production UI implementation, reconcile each affected stable surface/control/target key as Context-covered, requiring a Context update, task-local, out of scope or decision-required, then read `DESIGN.md`, its token source and referenced design targets. An unconfigured starter, candidate, style-only guidance or inspiration does not authorize invented production layout; only a selected exact/constraint target with adequate declared coverage authorizes fidelity. `design-system-authoring` is an explicit-only cold-start/repair capability that uses Open Design to generate/select/adopt project Design Authority; never infer or auto-run it. For an explicit standalone request to generate or iterate resources, `design-resource-authoring` keeps the requested output/development content as the hard ceiling. Style-bearing work stops on unconfigured Design Authority and points to the explicit design-system Skill; non-fidelity work remains lightweight. Configured style-bearing Open Design projects bind and verify the adopted provider design-system ID. After final selection, design-resource authoring may reconcile accepted decisions into the initial proposal exactly once, but it never changes Context, `DESIGN.md`, a Source Plan, code or Contract. Its resources remain ordinary Source until the consuming workflow adopts durable meaning.
|
|
20
|
+
4. Complete the shared `Architecture Deliberation`, then decide exactly one `Context Delta: none|required`. Update owning Context before code when durable product ownership, architecture, API/schema/data, state/recovery, dependency, security, product-surface responsibility or repeatable verification/deployment changes. Local fixes preserving durable semantics are `none`.
|
|
21
|
+
5. Use the agent/platform internal plan. Keep `Architecture Context Hit`, `Decision Rationale Hit: existing|required|none` and `Modularity Check: none|required|exception` as internal routing and maintenance questions, not artifacts or extra deltas.
|
|
22
|
+
6. Implement precisely, run project-owned verification, perform Contract Conformance including the shared `Architecture Conformance`, then run the separate Context drift check and report implementation, verification, architecture conformance, Context status and blockers.
|
|
17
23
|
|
|
18
24
|
The default workflow never requires a plan artifact, matrix, verdict, evidence ledger or result document. Optional scratch is not Context or completion proof. The bounded Context search creates no index, cache, state or second authority.
|
|
19
25
|
|
|
20
|
-
Externally authored design resources such as Figma frames, images, prototypes
|
|
26
|
+
Externally authored design resources such as Figma frames, images, prototypes and component specifications are ordinary Source. Resource authoring may reconcile a selected direction into the initial proposal once, but it does not update `project_context/**` or `DESIGN.md`, edit a Source Plan/Contract/production implementation or claim acceptance. Explicit `design-system-authoring` separately adopts a selected Open Design system into canonical `DESIGN.md`, one token source/direction and owning Context. The consuming development workflow still owns UI Authority Closure, implementation and verification; candidates authorize no fidelity.
|
|
21
27
|
|
|
22
28
|
For external product, architecture, technical or acceptance sources, internally classify every material constraint as covered by Context, requiring a Context update, task-local, explicitly out of scope or requiring a genuine user decision. Conformance must confirm controlling Context reached the correct modules, surfaces, APIs, state machines and verification paths without forbidden shortcuts or duplicate authority.
|
|
23
29
|
|
|
@@ -29,7 +35,7 @@ Do not infer long-task mode from duration, complexity, file count or agent prefe
|
|
|
29
35
|
2. Explicit `/long-task-workflow` authors or resumes exactly one complete `long-task-delivery-v2` Contract for the selected delivery.
|
|
30
36
|
3. `/normal-long-task` is a retirement pointer. Otherwise remain on the default Workflow Contract, even when work is long.
|
|
31
37
|
|
|
32
|
-
Contract Draft authoring
|
|
38
|
+
Source-quality authoring and Contract Draft authoring belong inside `long-task-workflow`: inventory and refine raw/revised proposals, selected design resources and mixed attachments into self-contained real Source, then continuously revise the same non-authoritative `delivery-contract.yaml` until formal Compile creates Authority Lock. No standalone Source Plan handoff is required; a legacy Source Plan remains ordinary input. Candidate resources authorize no fidelity Claim; selected targets enter marked Source and existing verification inputs, and after Authority Lock use protected revision.
|
|
33
39
|
|
|
34
40
|
The workflow uses one native Goal, one selected workspace, one Contract and one Final Gate. New authoring uses inline vertical Outcomes grouped by ordered Stages; existing `outcome_files` are physical compatibility only. Target profiles name required product targets and root runtimes; Checks declare Given/When journeys and all-of Evidence Capabilities. Stage/frontier state is derived from ordinary Progress and creates no second Gate, Receipt, scheduler or completion authority.
|
|
35
41
|
|
|
@@ -37,9 +43,9 @@ After the first Authority Lock, stop once before implementation and ask the user
|
|
|
37
43
|
|
|
38
44
|
Before authoring, proof design or authority lifecycle work, read the phase-specific references in the package-managed `long-task-workflow` Skill. Use `ty-context long-task help` for CLI syntax instead of treating this startup router as a command reference.
|
|
39
45
|
|
|
40
|
-
Final Gate, Stop and close recompile the source Contract and rerun every declared Check on one clean current snapshot. Required targets cannot substitute for one another; presence cannot prove behavior; success and degradation remain distinct; typed boundary effects require an observer. Targeted verify is repair evidence only. Status, progress, Stage/frontier projections, receipts and compiled cache are audit/recovery surfaces only; prose, historical tests or Agent judgment never create acceptance. An adopted Authority Revision returns to rolling execution and is never delivery completion. External confirmations remain typed and explicit; machine acceptance reports target/stage qualification but cannot by itself authorize completing the platform-native Goal, CI, deployment or human acceptance.
|
|
46
|
+
Final Gate, Stop and close recompile the source Contract and rerun every declared Check on one clean current snapshot. Final Gate is the Long-Task path's sole `Architecture Conformance` owner; do not run a second default-workflow closure. Required targets cannot substitute for one another; presence cannot prove behavior; success and degradation remain distinct; typed boundary effects require an observer. Targeted verify is repair evidence only. Status, progress, Stage/frontier projections, receipts and compiled cache are audit/recovery surfaces only; prose, historical tests or Agent judgment never create acceptance. An adopted Authority Revision returns to rolling execution and is never delivery completion. External confirmations remain typed and explicit; machine acceptance reports target/stage qualification but cannot by itself authorize completing the platform-native Goal, CI, deployment or human acceptance.
|
|
41
47
|
|
|
42
|
-
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
|
|
48
|
+
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 Long-Task Workflow Skill, the retired Source Plan compatibility pointer and package-owned completion Hook.
|
|
43
49
|
|
|
44
50
|
## Durable Facts And Generated Surfaces
|
|
45
51
|
|
|
@@ -21,14 +21,16 @@ When an active `/long-task-workflow` binding exists, that Skill owns lifecycle,
|
|
|
21
21
|
2. 在判断 `Context Delta` 前,用任务中明确的 area/module/API/Schema/state/security/verification/deployment 等少量高信号词,对 `project_context/**` 做一次 bounded text search;把命中的 Context 与 manifest 候选合并,只读取真正相关文件。搜索只补充语义判断,不创建索引、缓存或第二权威。
|
|
22
22
|
3. 确认目标、约束、成功标准、影响域、验证/部署路径和风险。能从代码或 Context 得到的事实不要重复询问。
|
|
23
23
|
4. Context 决定“应该是什么”;代码说明“现在是什么”;测试和运行证据证明行为。冲突是实现漂移、缺失工作或 stale Context,不能由代码静默重定义归属。
|
|
24
|
-
5.
|
|
25
|
-
6.
|
|
26
|
-
7.
|
|
27
|
-
8.
|
|
24
|
+
5. 第一处实现编辑前,完成并对用户可见地给出一次简洁、仓库事实绑定的 `Architecture Deliberation`。不输出私有思维链;输出结论及其 Context、模块/路径、symbol/extension point 和验证依据。风险只改变深度,不取消这个环节。
|
|
25
|
+
6. 根据架构考量决定唯一 `Context Delta: none|required`。影响 durable architecture boundary、module ownership、API / Schema / data contract、state / runtime semantics、dependency direction、verification / deployment semantics 或 durable rationale / tradeoff 时为 `required`,先更新 owning Context。不要创建 `plan.md`、Task Contract 文件或 Markdown 映射表。
|
|
26
|
+
7. 用 Agent 内部计划保持 goal、non-goals、owner、boundaries、implementation surfaces、risk 和 verification 清晰。默认流程不要求或验证固定 `plan.md`、matrix、verdict 或 evidence ledger。
|
|
27
|
+
8. 实现后先运行 project-owned verification,再在 `Contract Conformance` 中对当前候选快照执行 `Architecture Conformance`,随后单独做 Context drift check;报告实现、验证、架构符合性、Context 状态和 blockers。
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## 必经 Architecture Deliberation
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
每个实现需求都执行一次。small code task 可以得到“保持现有架构”的浅层结论,但必须具体指出当前 owner / extension point、未改变的 durable boundary、验证入口,以及为何没有引入或加重技术债,不能用“无需架构考虑”跳过。
|
|
32
|
+
|
|
33
|
+
出现下列任一情况时提高到完整深度:
|
|
32
34
|
|
|
33
35
|
- 新长期模块/能力/公共抽象;
|
|
34
36
|
- 公共 API、Schema、data contract、持久化或迁移;
|
|
@@ -37,7 +39,7 @@ When an active `/long-task-workflow` binding exists, that Skill owns lifecycle,
|
|
|
37
39
|
- security/permission、兼容性、降级、重试、并发或不可逆边界;
|
|
38
40
|
- 一个变化异常扩散到多个不相关模块,或现有扩展点无法承载。
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
对用户可见的简洁结论覆盖适用项:
|
|
41
43
|
|
|
42
44
|
- `Architecture Context Hit`:哪个现有 Context 控制本次架构判断;
|
|
43
45
|
- `Decision Rationale Hit: existing|required|none`:是否存在会改变未来选择的稳定原因;
|
|
@@ -45,10 +47,27 @@ When an active `/long-task-workflow` binding exists, that Skill owns lifecycle,
|
|
|
45
47
|
- 正确 dependency direction 与禁止 bypass;
|
|
46
48
|
- interface、input/output、state、persistence 和 lifecycle;
|
|
47
49
|
- failure/retry/timeout/degraded/recovery、compatibility/migration;
|
|
50
|
+
- 选择的设计与重要备选方案、拒绝原因;
|
|
51
|
+
- 至少一个合理的相邻未来变化会落到哪个 extension point,且不会形成第二 source of truth 或反向依赖;
|
|
52
|
+
- 触达的技术债:本次消除、保持隔离且不加重,或因缺少有 owner/reason/tracking/removal condition 的 bounded exception 而阻塞;
|
|
48
53
|
- 应复用的 extension point,或新抽象为何确有净收益;
|
|
49
54
|
- 哪个 project-owned lint/AST/dependency/contract test 能证明边界。
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
范围、owner、controlling Context、dependency direction 或选定设计发生实质变化时,原考量失效,继续实现前先更新。持久结论进入最小 owning Context;实现细节留在代码。不要把“代码更优雅”当作架构要求,也不要让 Harness 变成跨语言通用 dependency analyzer。
|
|
57
|
+
|
|
58
|
+
## Architecture Conformance
|
|
59
|
+
|
|
60
|
+
默认流程在项目验证之后,把架构符合性作为 `Contract Conformance` 的必检子项,只针对当前候选快照检查:
|
|
61
|
+
|
|
62
|
+
- 实际改动是否逃逸预期 capability/path;
|
|
63
|
+
- owner、dependency direction、service/facade/adapter 和唯一 source of truth 是否被绕过或复制;
|
|
64
|
+
- API/Schema/data/state/persistence/lifecycle/recovery 是否出现未声明变化;
|
|
65
|
+
- 是否命中 forbidden shortcut,是否运行了声明的 project-owned architecture/modularity checks;
|
|
66
|
+
- 是否新增或加重重复、职责膨胀、脆弱耦合或无依据抽象等技术债。
|
|
67
|
+
|
|
68
|
+
发现问题就返回实现并重跑受影响验证;候选代码或配置再变化,先前 closure 失效。新增或加重技术债默认阻塞交付,除非项目已有显式、收窄、带 owner/reason/tracking/removal condition 的例外。无关 legacy debt 不自动扩张任务范围,但本次触达、依赖或加重的债不能隐藏。
|
|
69
|
+
|
|
70
|
+
active Long-Task 下不再执行这个默认 closure;同一架构义务由 Contract 中现有 obligations/constraints/forbidden shortcuts、owners/paths/Bindings 和 executable Checks 表达,并只由 Final Gate 对最终快照收口。
|
|
52
71
|
|
|
53
72
|
## Capability-First Delivery Boundary
|
|
54
73
|
|
|
@@ -105,8 +124,8 @@ If an active Long-Task applies, express material visual expectations through its
|
|
|
105
124
|
|
|
106
125
|
- area/domain/subdomain:产品或包责任;contract:API/schema/event/workflow/interface;foundation:稳定概念;verification/deployment:可重复路径;implementation-index:导航;decision-rationale:会影响未来选择的稳定原因。
|
|
107
126
|
- 模块 Context 只保留 principles、design logic、rejected alternative/tradeoff 和长期约束;不编造 rationale,不复制实现摘要、命令输出、debug 过程、截图、日志、临时 JSON、raw payload、测试报告或 secrets。
|
|
108
|
-
- `Context Delta: none|required` 是唯一长期事实结果;`Architecture Context Hit`、`Decision Rationale Hit` 与 `Modularity Check` 仍只是内部路由问题。
|
|
127
|
+
- `Context Delta: none|required` 是唯一长期事实结果;`Architecture Deliberation` 是可见但 task-local 的流程检查点,`Architecture Context Hit`、`Decision Rationale Hit` 与 `Modularity Check` 仍只是内部路由问题。
|
|
109
128
|
|
|
110
129
|
## 输出边界
|
|
111
130
|
|
|
112
|
-
不默认创建 `.work_products/**`、tech plan、ADR、implementation doc、review/test/release 文档或 lifecycle phases
|
|
131
|
+
不默认创建 `.work_products/**`、tech plan、ADR、implementation doc、review/test/release 文档或 lifecycle phases。`Architecture Deliberation` 与 `Architecture Conformance` 通过工作更新和交付状态可见,不生成新的持久产物。用户明确要求独立开发/技术方案时可以临时生成;稳定结论仍提炼回 `project_context/**`。
|
|
@@ -24,10 +24,11 @@ Project-specific UI/UX and visual design rules belong in a separate project-loca
|
|
|
24
24
|
## External Design Resource Consumption / 外部设计资源消费
|
|
25
25
|
|
|
26
26
|
- `design-resource-authoring` 可以按明确请求在上游动态委托 Open Design 产生 flow、低保真、候选方向、组件族/独特复杂控件状态、交互原型或条件式 Figma handoff;它以明确输出/开发内容为上限,在范围内补齐材料性 UI/UX 含义但不要求逐控件一份稿,不复制 provider 的提示词/模板,也不把任何资源设为全局必选。
|
|
27
|
+
- `design-system-authoring` 是另一个仅显式调用的冷启动/修复 Skill:它用 Open Design 生成或选择候选,经过明确或受托选择后,把结果采纳到 canonical `DESIGN.md`、唯一 token source/direction 与 owning Context。缺少设计系统不会让本 Skill 或 `design-resource-authoring` 自动调用它。
|
|
27
28
|
- 本 Skill 不承担独立资源生产。只有进入默认开发流程或 Long-Task、需要采纳稳定结论时,本 Skill 才消费这些或其他外部设计 Source。
|
|
28
29
|
- 候选、灵感和未选定输出不是 Context readiness 或实现权威,不能写入 selected registry;选定目标仍必须完成 UI Authority Closure 和 `Context Delta`。
|
|
29
30
|
- 消费时核对产品 Source、Screen/Control Context、`DESIGN.md`、token owner、资源稳定身份及 exact-target 覆盖条件;只把长期稳定且无冲突的事实写入其唯一 owner,不要求统一 pack、目录或工具格式。
|
|
30
|
-
- 设计资源生成本身不改 `project_context/**`、`DESIGN.md` 或 production code
|
|
31
|
+
- 设计资源生成本身不改 `project_context/**`、`DESIGN.md` 或 production code;定稿后只可一次性回改初始方案。设计系统采纳则由显式 `design-system-authoring` 完成。下游实现与验证仍由当前 Workflow Contract 或 `long-task-workflow` 负责。
|
|
31
32
|
|
|
32
33
|
## 工作方式
|
|
33
34
|
|
|
@@ -106,7 +107,7 @@ Configured is system-level visual authority only, not surface implementation-rea
|
|
|
106
107
|
- Read the owning surface/interaction Context, `DESIGN.md`, the authored exact-value token source and generation direction, existing production components/routes and every material design reference.
|
|
107
108
|
- Classify each reference as `exact-target`, `constraint` or `inspiration`. Record the affected surface/route/component, project path or URI and relevant viewport/theme/mode/state. Exact targets authorize fidelity comparison only for those conditions; constraints authorize only their named rule; inspiration proves no reproduction claim.
|
|
108
109
|
- Treat a missing `DESIGN.md`, its package starter with Design authority status: `unconfigured`, style-only prose, an inspiration-only set or conflicting references as insufficient authority for invented production layout.
|
|
109
|
-
- If the user explicitly
|
|
110
|
+
- If the user explicitly asks to initialize/generate/select/adopt the project design system, use the explicit-only `design-system-authoring`; never infer it from a missing starter. If the user explicitly delegates standalone resource generation, use `design-resource-authoring`. Style-bearing resources must stop on unconfigured authority and bind the adopted Open Design system; low-fidelity/IA/semantics-only resources remain lightweight. After final selection, resource authoring may reconcile accepted decisions into the initial proposal once, but this downstream Skill adopts durable target meaning only after UI Authority Closure.
|
|
110
111
|
- Never use the implementation's own generated screenshot or diff as the target it claims to match. A target is selected Source; an implementation render is evidence. Baseline replacement requires deliberate review and cannot merely erase a failure.
|
|
111
112
|
- Do not require Figma, a fixed `docs/design/**` tree, an image for every local change or universal pixel-perfect thresholds. Use project-native design assets and the smallest authority sufficient for the claimed fidelity.
|
|
112
113
|
|
|
@@ -125,7 +126,7 @@ For material design-system, redesign, high-fidelity implementation or visual-pol
|
|
|
125
126
|
|
|
126
127
|
- 不默认创建 `.work_products/**`、UI/UX 独立文档、handoff matrix、review/test/release 文档。
|
|
127
128
|
- 不要求 lifecycle phase、plan task、phase gate 或阶段 Skill。
|
|
128
|
-
-
|
|
129
|
+
- 如果用户明确要求初始化/生成/选择/采纳项目设计系统,使用仅显式调用的 `design-system-authoring`;如果明确要求独立设计稿、mock、线框图、原型或 Figma handoff,使用 `design-resource-authoring`。本 Skill 只在后续开发流程中采纳其他长期事实。
|
|
129
130
|
- `DESIGN.md` 是视觉设计系统事实源;项目流程、模块契约和下一步动作仍以 `project_context/**` 为准。
|
|
130
131
|
- 如果普通页面实现已经有充分 Design Authority,或用户只要求修复 UI bug、局部改 CSS、换颜色、明确的 throwaway prototype,或只是泛泛提到“设计 / design / user experience”,不需要触发本 Skill;durable 视觉体系/Context 采纳,或 material production UI 缺失/冲突的 Design Authority 才使用。明确要求设计资源产物但尚未进入采纳/实现流程时使用 `design-resource-authoring`。
|
|
131
132
|
|
|
@@ -1,68 +1,80 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-resource-authoring
|
|
3
|
-
description: Use when the user explicitly asks to generate, author, plan, commission, or iterate design resources; use Open Design; create a scoped wireframe, prototype, visual candidate, component/control state study, implementation handoff, or the design resources needed for an explicitly named development scope from raw drafts, product/technical plans,
|
|
3
|
+
description: Use when the user explicitly asks to generate, author, plan, commission, or iterate design resources; use Open Design; create a scoped wireframe, prototype, visual candidate, component/control state study, implementation handoff, or the design resources needed for an explicitly named development scope from raw drafts, product/technical plans, visual briefs, screenshots, or existing design resources; or asks to “生成设计资源”, “使用 Open Design”, “生成原型图”, “生成高保真/低保真设计”, “为开发准备设计资源”, or “先看一个控件/页面效果” in a Minimal Context Harness project. Do not trigger for generic design discussion, UX audits, ordinary UI implementation without an explicit resource request, local CSS fixes, durable Design Authority adoption, initial-proposal authoring itself, or Long-Task execution.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Design Resource Authoring
|
|
7
7
|
|
|
8
|
-
Commission the smallest sufficient set of design resources for the explicitly requested output or development scope from
|
|
8
|
+
Commission the smallest sufficient set of design resources for the explicitly requested output or development scope from live Open Design capabilities. This Skill is a thin task-local planner, provider adapter, iteration guide, final proposal reconciler and handoff layer; Open Design owns generation logic and Tiny Context owns neither its prompts nor runtime.
|
|
9
9
|
|
|
10
10
|
## Hard boundaries
|
|
11
11
|
|
|
12
|
-
- A raw
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
- Never
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- Do not install or persistently configure MCP
|
|
22
|
-
- Do not create a
|
|
12
|
+
- A raw initial proposal is a valid input. Never require, invoke, regenerate or edit a Source Plan.
|
|
13
|
+
- During candidate iteration, keep accepted/rejected/unresolved proposal effects in a task-local delta buffer. Only after a direction is final may this Skill reconcile the initial proposal once. Never continuously rewrite it.
|
|
14
|
+
- Proposal reconciliation changes only the initial proposal: never mutate `project_context/**`, `DESIGN.md`, a Source Plan, Delivery Contract, production code or tests as a design-resource side effect.
|
|
15
|
+
- Never make a prototype, wireframe, high-fidelity candidate, design-system slice, Figma file, variant count or directory layout universally mandatory.
|
|
16
|
+
- Treat the user's explicit output/development scope as the hard ceiling. Include only the surrounding context needed to design that slice.
|
|
17
|
+
- Never require one artifact per control. Reuse selected component sources and group repeated controls by family; commission a dedicated study only for unique or complex uncovered meaning.
|
|
18
|
+
- Never infer that a page frame or prototype covers states, responsiveness, accessibility or interaction it does not explicitly specify or demonstrate.
|
|
19
|
+
- Design resources may express user-visible interaction and presentation, but must not invent or become sole owner of business, data, permission or algorithmic rules.
|
|
20
|
+
- Candidates are ordinary external Source. They do not select themselves, become `exact-target`, create Design Authority or prove acceptance.
|
|
21
|
+
- Do not install or persistently configure MCP, plugins, authentication or disclosure paths without separate authorization.
|
|
22
|
+
- Do not create a resource pack, provider registry, workflow state, Contract artifact, acceptance record or parallel authority lifecycle.
|
|
23
23
|
|
|
24
24
|
## Read the references
|
|
25
25
|
|
|
26
|
-
1. Always read [resource-selection.md](references/resource-selection.md) before deciding what to generate.
|
|
27
|
-
2. Read [open-design-provider.md](references/open-design-provider.md) before capability discovery, provider execution, recovery or Figma routing.
|
|
28
|
-
3. Read [downstream-handoff.md](references/downstream-handoff.md) before
|
|
26
|
+
1. Always read [resource-selection.md](references/resource-selection.md) before deciding what to generate or whether the request is style-bearing.
|
|
27
|
+
2. Read [open-design-provider.md](references/open-design-provider.md) before capability discovery, Design Authority gating, provider execution, recovery or Figma routing.
|
|
28
|
+
3. Read [downstream-handoff.md](references/downstream-handoff.md) before final selection, initial-proposal reconciliation, handoff or downstream use. A simple unselected non-fidelity preview may stop before this reference.
|
|
29
29
|
|
|
30
30
|
## Core workflow
|
|
31
31
|
|
|
32
|
-
1. **Fix the
|
|
33
|
-
2. **Inventory
|
|
34
|
-
3. **
|
|
35
|
-
4. **
|
|
36
|
-
5. **
|
|
37
|
-
6. **
|
|
38
|
-
7. **
|
|
39
|
-
8. **
|
|
40
|
-
9. **
|
|
32
|
+
1. **Fix the scope ceiling.** Name in-scope surfaces, flows, regions, component families, unique controls, conditions, necessary context, exclusions and whether the intent is exploration, handoff or selected-source preparation.
|
|
33
|
+
2. **Inventory inputs.** Accept initial proposals, notes, product/technical plans, visual briefs, screenshots, references and existing resources. Preserve each role as exact target, constraint, inspiration, current-implementation evidence or background; report unreadable/unused material.
|
|
34
|
+
3. **Classify visual-style dependency.** Mark the commission `style-bearing` when it materially expresses visual fidelity, brand, typography/color/density, component visual treatment or a production-style prototype. Mark it `non-fidelity` for IA/flow topology, low-fidelity structure, semantics-only behavior/state studies or an explicitly non-fidelity prototype. Mixed work is style-bearing unless split into an independent non-fidelity commission.
|
|
35
|
+
4. **Apply the conditional Design Authority gate.** For style-bearing work, read `DESIGN.md` and its token source. If authority is unconfigured, stop before project/run creation and tell the user to explicitly invoke `$design-system-authoring`; do not invoke it automatically. A combined explicit request authorizes running that Skill first and then resuming this one. Non-fidelity work remains allowed.
|
|
36
|
+
5. **Find design gaps.** For handoff, account for material in-scope structure, control anatomy/variants, content/visual treatment, states, interaction/feedback/motion, adaptation/input, accessibility and assets. Subtract only coverage explicitly supplied by selected Source.
|
|
37
|
+
6. **Discover live capabilities.** Inspect the current Open Design agent/model, skills, templates, design systems, plugins and export paths. Treat absent/non-enumerable capabilities honestly.
|
|
38
|
+
7. **Choose the minimum sufficient commission.** Give each considered resource `selected`, `optional`, `not-needed`, `unavailable` or `decision-required` with one reason. Ask only when a missing preference materially changes the commission.
|
|
39
|
+
8. **Bind and commission through Open Design.** For style-bearing work, create or verify the Open Design project with the adopted design-system ID and require `get_project.designSystemId` to match. Send a bounded product commission through structured MCP; use documented fallbacks only when required.
|
|
40
|
+
9. **Observe, inspect and iterate.** Keep provider execution, artifact readiness and design suitability separate. Iterate within scope. Keep proposal effects only in the delta buffer while candidates remain unsettled.
|
|
41
|
+
10. **Finalize selection and reconcile once.** After explicit human selection or explicit delegated selection, preserve immutable identity and consolidate accepted, rejected and unresolved effects. Apply only accepted decisions once to a writable initial-proposal file; if it exists only in conversation, return one complete revised proposal. Preserve original intent/provenance and make reruns idempotent. Do not write unresolved or rejected choices as requirements.
|
|
42
|
+
11. **Return an intent-sized result.** Exploration shows the artifact promptly. Handoff adds stable-key coverage, provenance, binding, limitations and immutable identity. Include the reconciled initial proposal or its updated path when final selection occurred.
|
|
41
43
|
|
|
42
|
-
##
|
|
44
|
+
## Conditional Design Authority gate
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
Unconfigured means `DESIGN.md` is missing, explicitly says `Design authority status: unconfigured`, remains a starter, contains only style prose/inspiration, or lacks one authored exact-value token source/generation direction. This gate applies only to style-bearing resource authoring; it is not a general project-init gate and configured system-level authority does not by itself prove surface-level implementation readiness.
|
|
47
|
+
|
|
48
|
+
The stop message must state:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
Style-bearing design resources require an adopted project design system. Explicitly invoke $design-system-authoring to generate/select/adopt one, then resume $design-resource-authoring. I will not initialize it automatically.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Initial-proposal reconciliation
|
|
55
|
+
|
|
56
|
+
The normal design-first loop is:
|
|
45
57
|
|
|
46
58
|
```text
|
|
47
|
-
|
|
48
|
-
-> bounded
|
|
49
|
-
->
|
|
50
|
-
-> explicit
|
|
51
|
-
->
|
|
52
|
-
->
|
|
53
|
-
->
|
|
59
|
+
initial proposal
|
|
60
|
+
-> bounded Open Design candidates
|
|
61
|
+
-> feedback and iteration with a task-local delta buffer
|
|
62
|
+
-> explicit or delegated final selection
|
|
63
|
+
-> one consolidated, idempotent initial-proposal reconciliation
|
|
64
|
+
-> revised proposal + selected immutable resources
|
|
65
|
+
-> default Goal execution or long-task-workflow
|
|
54
66
|
```
|
|
55
67
|
|
|
56
|
-
|
|
68
|
+
Small requests may complete generation, selection and reconciliation in one turn; the invariant is one final semantic writeback, not an artificial pause. Reconciliation may clarify product information, controls/states, interaction and visual constraints supported by the selected resource. It preserves original requirements and records selected resource keys/locators/digests without turning provider output into product authority. If selection never occurs, return candidates and the buffered delta only; do not rewrite.
|
|
57
69
|
|
|
58
70
|
## Stop and route elsewhere
|
|
59
71
|
|
|
60
|
-
- Route
|
|
61
|
-
- Route
|
|
62
|
-
- Route ordinary implementation with sufficient
|
|
63
|
-
- Route a complete explicit Single-Goal delivery to `long-task-workflow`.
|
|
64
|
-
- If no new resource is justified, say so
|
|
72
|
+
- Route explicit design-system initialization/adoption to `design-system-authoring`.
|
|
73
|
+
- Route broader durable UI/UX authority repair during development to `context_uiux_design`.
|
|
74
|
+
- Route ordinary implementation with sufficient authority to the default Workflow Contract and current native Goal.
|
|
75
|
+
- Route a complete explicit Single-Goal delivery, using the revised proposal plus selected resources, to `long-task-workflow`.
|
|
76
|
+
- If no new resource is justified, say so instead of generating filler.
|
|
65
77
|
|
|
66
78
|
## Completion response
|
|
67
79
|
|
|
68
|
-
Report
|
|
80
|
+
Report scope, necessary context/exclusions, style dependency and gate result; selected/omitted/unavailable resources; visible artifacts/locators; provider, project/run and design-system binding status; review and selection basis; immutable provenance; material coverage/unresolved decisions; proposal reconciliation status/path; and forbidden inferences.
|