project-tiny-context-harness 0.7.4 → 0.7.6
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 +25 -7
- package/assets/README.md +25 -7
- package/assets/README.zh-CN.md +26 -4
- package/assets/agents/AGENTS_CORE.md +5 -3
- package/assets/context_templates/product-surface-contract.md +7 -0
- package/assets/context_templates/screen-contract.md +180 -0
- package/assets/skills/context_development_engineer/SKILL.md +3 -1
- package/assets/skills/context_product_plan/SKILL.md +3 -2
- package/assets/skills/context_surface_contract/SKILL.md +15 -0
- package/assets/skills/context_uiux_design/SKILL.md +27 -10
- package/assets/skills/design-resource-authoring/SKILL.md +65 -0
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +126 -0
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +112 -0
- package/assets/skills/design-resource-authoring/references/resource-selection.md +124 -0
- package/assets/skills/long-task-workflow/SKILL.md +3 -2
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +2 -0
- package/assets/skills/long-task-workflow/references/contract-authoring.md +6 -2
- package/assets/skills/long-task-workflow/references/evidence-design.md +2 -0
- package/assets/skills/source-plan-authoring/SKILL.md +3 -0
- package/dist/lib/design-md.d.ts +7 -0
- package/dist/lib/design-md.js +47 -6
- package/dist/lib/doctor.js +19 -4
- package/dist/lib/long-task-authority-material-diff.js +28 -0
- package/dist/lib/long-task-authority-materials.js +14 -0
- package/dist/lib/long-task-authority-policy.d.ts +14 -0
- package/dist/lib/long-task-authority-policy.js +14 -0
- package/dist/lib/long-task-authority-types.d.ts +14 -0
- package/dist/lib/long-task-claim-definitions.js +14 -0
- package/dist/lib/long-task-contract-types.d.ts +14 -0
- package/dist/lib/long-task-product-shape.js +28 -0
- package/dist/lib/long-task-source-target-index.js +14 -0
- package/dist/lib/profiles.js +1 -0
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,13 +79,13 @@ npx --yes project-tiny-context-harness ty-context validate-context
|
|
|
79
79
|
npx --yes project-tiny-context-harness ty-context doctor
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
Default profiles are `core-portable` and `workflow-default`. Explicitly enable long-task support:
|
|
82
|
+
Default profiles are `core-portable` and `workflow-default`; the base managed set includes `/design-resource-authoring`. Explicitly enable long-task support:
|
|
83
83
|
|
|
84
84
|
```powershell
|
|
85
85
|
ty-context enable long-task
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Enabling Long-Task additionally installs `/source-plan-authoring`, `/long-task-workflow` and the completion Hook. Disable only those Long-Task-owned surfaces with `ty-context disable long-task`; the base `/design-resource-authoring` remains. Tiny Context does not install Open Design or another design-generation runtime.
|
|
89
89
|
|
|
90
90
|
## Positioning
|
|
91
91
|
|
|
@@ -137,7 +137,7 @@ npm ci
|
|
|
137
137
|
npm run smoke:quickstart
|
|
138
138
|
npm run preview:pack
|
|
139
139
|
cd /path/to/your/test-repo
|
|
140
|
-
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.7.
|
|
140
|
+
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.7.6.tgz
|
|
141
141
|
npx --no-install ty-context init --adopt
|
|
142
142
|
make validate-context
|
|
143
143
|
```
|
|
@@ -187,15 +187,33 @@ Newly generated Harness configs default to `strict_except_generated`. Generated/
|
|
|
187
187
|
|
|
188
188
|
### Product Surface Contract
|
|
189
189
|
|
|
190
|
-
`context_surface_contract` compiles durable screen/page/CLI responsibility using
|
|
190
|
+
`context_surface_contract` compiles durable screen/page/CLI responsibility using existing `contract`, area/subdomain and verification roles. `product-surface-contract.md` owns cross-surface/main-versus-drilldown responsibility; optional on-demand `screen-contract.md` goes deeper for one screen's entry/exit/shared state, information hierarchy, semantic regions, navigation/variants, material controls and target/verification references. This workflow must not add a new Context role or claim product-quality proof, and local style fixes do not require a Screen Contract.
|
|
191
|
+
|
|
192
|
+
For material UI, **UI Authority Closure** reconciles each stable surface/control/target key as covered by existing Context, requiring a Context update, task-local, explicitly out of scope or genuinely decision-required. Product Surface Context owns cross-surface responsibility, Screen/interaction Context owns durable hierarchy and behavior, `DESIGN.md` owns visual-system/reference semantics, authored targets own concrete declared composition and the Delivery Contract only binds/proves this delivery. Conflicts fail closed; current code, timestamps, YAML or implementation screenshots do not silently win.
|
|
191
193
|
|
|
192
194
|
### Visual Delivery Guidance
|
|
193
195
|
|
|
194
|
-
The default Workflow performs a conditional Design Authority Check before material production UI. It reads the owning
|
|
196
|
+
The default Workflow performs UI Authority Closure and a conditional Design Authority Check before material production UI. It reads the owning Surface/Screen/Control Context, `DESIGN.md`, one authored exact token source/generation direction and selected design references. Each reference is `exact-target`, `constraint` or `inspiration`; an unconfigured starter, candidate, style-only prose or inspiration does not authorize invented production layout, and a configured project visual system does not claim every page is implementation-ready. Explicit standalone resource generation routes to `/design-resource-authoring`, which commissions external Open Design capabilities without adopting authority; downstream durable adoption/repair routes through `context_uiux_design`. Ordinary implementation with sufficient authority, local style fixes and throwaway prototypes remain lightweight.
|
|
195
197
|
|
|
196
198
|
For material work, `context_uiux_design` keeps a task-local risk-proportional Visual Coverage Set; durable interaction facts remain in `project_context/**`, durable visual semantics and the design-reference registry remain in `DESIGN.md`, and versioned targets stay at project-native paths. `context_development_engineer` binds that intent to production routes and reports only combinations actually rendered and checked. An implementation screenshot cannot become its own target.
|
|
197
199
|
|
|
198
|
-
An explicit Long-Task resolves missing/conflicting
|
|
200
|
+
An explicit Long-Task resolves missing/conflicting UI authority before Compile, then preserves every applicable Control field through the existing projection: surface, region/location, type/label, user task, visibility/availability, trigger/input/validation/default, interaction/navigation, loading/empty/success/failure/recovery/permission/feedback and accessibility. Each non-empty field is an independent Source-backed Control Claim and protected product semantic; omitted fields create no Claim. Existing Requirement, Control, Assertion, Stage, Binding, proof-surface, verification-input, revision and `external_confirmation` mechanisms remain the only lifecycle.
|
|
201
|
+
|
|
202
|
+
Combined design-and-implementation work may author candidates in ordinary Outcomes/Stages, but a candidate or planned target cannot authorize fidelity implementation. Selection must become real marked Source plus the owning registry/target input and, after Authority Lock, an adopted protected revision. Browser visual ACs use `ui_browser`; a browser proxy cannot prove an independently failing native target, so native proof remains a project-owned current-execution Check when representable or an external confirmation. Frozen screenshot baselines are verifier inputs, generated screenshots/diffs are review artifacts, and subjective approval remains external. No `uiux_delivery` block, visual Claim type, risk level, lifecycle state, Gate, required design directory or universal pixel threshold is added.
|
|
203
|
+
|
|
204
|
+
`ty-context doctor` keeps its compatible `missing | unconfigured | configured` project-level status and adds advisory Design Authority Index, token-source and classified-reference signals. It explicitly does not infer surface implementation readiness; that requires the owning Screen/Control meaning, selected target/constraints and project-owned verification.
|
|
205
|
+
|
|
206
|
+
### Optional Design Resource Authoring
|
|
207
|
+
|
|
208
|
+
Use `/design-resource-authoring` only for an explicit request to generate, iterate or prepare standalone design resources, or to use Open Design. It accepts raw notes or an initial proposal, product/technical plans, a visual brief, screenshots, existing resources or an optional Source Plan. Source Plan authoring is not a prerequisite; both Skills consume raw inputs independently and neither invokes the other.
|
|
209
|
+
|
|
210
|
+
The Skill enforces the requested scope ceiling, discovers current Open Design capabilities and assigns every considered resource a reasoned `selected`, `optional`, `not-needed`, `unavailable` or `decision-required` disposition. It commissions only the smallest sufficient set through structured MCP with bounded fallback. No prototype, low/high-fidelity pair, component board, Figma handoff, artifact count or directory is mandatory, and Tiny Context copies no provider prompt/template or catalogue.
|
|
211
|
+
|
|
212
|
+
Exploration returns a visible scoped candidate after minimal sanity review; handoff adds provenance, explicit entry, declared coverage and limitations; selected-source preparation requires explicit human selection and immutable identity. Iteration stays task-local. A final consolidated accepted/rejected/unresolved delta may inform a separately owned proposal revision, but the Skill never edits that proposal, Context, `DESIGN.md`, production code or a Delivery Contract and creates no Design Authority.
|
|
213
|
+
|
|
214
|
+
Actual generation remains with configured Open Design/Product Design, Figma, image-generation, prototype or human systems. Their outputs enter the default Workflow or Long-Task as ordinary external Source. Candidates and inspiration authorize no fidelity. A selected exact target controls only its declared conditions and needs stable immutable identity before it can affect a `verification_input`. `context_uiux_design` performs downstream UI Authority Closure; implementation renders and diffs remain evidence rather than self-authorizing targets.
|
|
215
|
+
|
|
216
|
+
Maintainers may set `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` plus optional `TY_CONTEXT_OPEN_DESIGN_MCP_ARGS_JSON` and run `npm run smoke:open-design` for an opt-in, read-only discovery smoke. Normal tests use a local mock MCP and do not depend on Open Design or nondeterministic output.
|
|
199
217
|
|
|
200
218
|
### Optional Source Plan Authoring
|
|
201
219
|
|
|
@@ -320,7 +338,7 @@ make validate-harness
|
|
|
320
338
|
|
|
321
339
|
The modularity gate is `ty-context check-modularity`. Scoped waivers require `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
|
|
322
340
|
|
|
323
|
-
The synchronized local preview tarball is named `project-tiny-context-harness-0.7.
|
|
341
|
+
The synchronized local preview tarball is named `project-tiny-context-harness-0.7.6.tgz`.
|
|
324
342
|
|
|
325
343
|
## Community And Further Reading
|
|
326
344
|
|
package/assets/README.md
CHANGED
|
@@ -77,7 +77,7 @@ It does not launch or switch models, spawn agents, create branches or worktrees,
|
|
|
77
77
|
2. **Workflow Contract** — Context-first default engineering behavior using the platform's internal plan; no required plan artifact.
|
|
78
78
|
3. **Long-Task Workflow** — explicit Single-Goal Rolling Delivery with `long-task-delivery-v2`, compiled Claim Coverage and a verifier-owned Live Final Gate.
|
|
79
79
|
|
|
80
|
-
The opt-in long-task profile
|
|
80
|
+
The base managed set also provides `/design-resource-authoring`, an explicitly triggered thin commissioner for task-local Open Design resources rather than a generation engine or authority layer. The opt-in long-task profile additionally provides `/source-plan-authoring`, an upstream Source-quality helper.
|
|
81
81
|
|
|
82
82
|
Default profiles are `core-portable` and `workflow-default`. Enable the opt-in profile with:
|
|
83
83
|
|
|
@@ -85,7 +85,7 @@ Default profiles are `core-portable` and `workflow-default`. Enable the opt-in p
|
|
|
85
85
|
ty-context enable long-task
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
This installs `/source-plan-authoring`, `/long-task-workflow` and the completion Hook.
|
|
88
|
+
This additionally installs `/source-plan-authoring`, `/long-task-workflow` and the completion Hook. `/design-resource-authoring` is already in the base managed set. Tiny Context does not install Open Design, an agent runtime, model worker, scheduler, Git orchestration assets or another design-generation runtime.
|
|
89
89
|
|
|
90
90
|
## Try It In 60 Seconds
|
|
91
91
|
|
|
@@ -137,7 +137,7 @@ The smoke packs the local workspace, installs it into a disposable repo and vali
|
|
|
137
137
|
|
|
138
138
|
```sh
|
|
139
139
|
cd /path/to/your/test-repo
|
|
140
|
-
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.7.
|
|
140
|
+
npm install -D /path/to/project-tiny-context-harness/tmp/ty-context/source-preview/package/project-tiny-context-harness-0.7.6.tgz
|
|
141
141
|
npx --no-install ty-context init --adopt
|
|
142
142
|
make validate-context
|
|
143
143
|
```
|
|
@@ -208,15 +208,33 @@ Newly generated Harness configs default to `strict_except_generated`. Generated/
|
|
|
208
208
|
|
|
209
209
|
### Product Surface Contract
|
|
210
210
|
|
|
211
|
-
`context_surface_contract` compiles durable screen/page/CLI responsibility using
|
|
211
|
+
`context_surface_contract` compiles durable screen/page/CLI responsibility using existing `contract`, area/subdomain and verification roles. `product-surface-contract.md` owns cross-surface/main-versus-drilldown responsibility; optional on-demand `screen-contract.md` goes deeper for one screen's entry/exit/shared state, information hierarchy, semantic regions, navigation/variants, material controls and target/verification references. This workflow must not add a new Context role or claim product-quality proof, and local style fixes do not require a Screen Contract.
|
|
212
|
+
|
|
213
|
+
For material UI, **UI Authority Closure** reconciles each stable surface/control/target key as covered by existing Context, requiring a Context update, task-local, explicitly out of scope or genuinely decision-required. Product Surface Context owns cross-surface responsibility, Screen/interaction Context owns durable hierarchy and behavior, `DESIGN.md` owns visual-system/reference semantics, authored targets own concrete declared composition and the Delivery Contract only binds/proves this delivery. Conflicts fail closed; current code, timestamps, YAML or implementation screenshots do not silently win.
|
|
212
214
|
|
|
213
215
|
### Visual Delivery Guidance
|
|
214
216
|
|
|
215
|
-
The default Workflow now performs a conditional Design Authority Check before material production UI: new/redesigned screens, primary layout/navigation/theme/component-system work, high-fidelity implementation and substantial visual polish. It reads the owning
|
|
217
|
+
The default Workflow now performs UI Authority Closure and a conditional Design Authority Check before material production UI: new/redesigned screens, primary layout/navigation/theme/component-system work, high-fidelity implementation and substantial visual polish. It reads the owning Surface/Screen/Control Context, `DESIGN.md`, one authored exact token source/generation direction and selected design references. Each reference is `exact-target`, `constraint` or `inspiration`; an unconfigured starter, candidate, style-only prose or inspiration does not authorize invented production layout. A configured project visual system is not a claim that every page is implementation-ready. Explicit standalone resource generation routes to `/design-resource-authoring`, which commissions external Open Design capabilities without adopting authority; downstream durable adoption/repair routes through `context_uiux_design`. Ordinary implementation with sufficient authority, local style fixes and throwaway prototypes remain lightweight.
|
|
216
218
|
|
|
217
219
|
For material work, `context_uiux_design` keeps a task-local risk-proportional Visual Coverage Set across production surfaces/components, viewports, themes/modes, states, content stress and accessibility/motion conditions. Durable surface/interaction facts remain in `project_context/**`; durable visual semantics and the design-reference registry remain in `DESIGN.md`; versioned targets stay at project-native paths. `context_development_engineer` binds that intent to production routes and reports only combinations actually rendered and checked. An implementation screenshot cannot become its own target.
|
|
218
220
|
|
|
219
|
-
An explicit Long-Task resolves missing/conflicting
|
|
221
|
+
An explicit Long-Task resolves missing/conflicting UI authority before Compile, then preserves every applicable Control field through the existing projection: surface, region/location, type/label, user task, visibility/availability, trigger/input/validation/default, interaction/navigation, loading/empty/success/failure/recovery/permission/feedback and accessibility. Each non-empty field is an independent Source-backed Control Claim and protected product semantic; omitted fields create no Claim. Existing Requirement, Control, Assertion, Stage, Binding, proof-surface, verification-input, revision and `external_confirmation` mechanisms remain the only lifecycle.
|
|
222
|
+
|
|
223
|
+
Combined design-and-implementation work may author candidates in ordinary Outcomes/Stages, but a candidate or planned target cannot authorize fidelity implementation. The selection must become real marked Source plus the owning registry/target input and, after Authority Lock, an adopted protected revision. Browser visual ACs use `ui_browser`; a browser proxy cannot prove a native target that can fail independently, so native target proof remains a project-owned current-execution Check when representable or an external confirmation. Frozen screenshot baselines are verifier inputs, generated screenshots/diffs are review artifacts, and subjective approval remains external. This adds no `uiux_delivery` block, visual Claim type, risk level, lifecycle state, Gate, required design directory or universal pixel threshold.
|
|
224
|
+
|
|
225
|
+
`ty-context doctor` keeps its compatible `missing | unconfigured | configured` project-level status and adds advisory Design Authority Index, token-source and classified-reference signals. It explicitly does not infer surface implementation readiness; that requires the owning Screen/Control meaning, selected target/constraints and project-owned verification.
|
|
226
|
+
|
|
227
|
+
### Optional Design Resource Authoring
|
|
228
|
+
|
|
229
|
+
Use `/design-resource-authoring` only when explicitly asking to generate, iterate or prepare standalone design resources, or to use Open Design. Inputs may be raw notes or an initial proposal, product/technical plans, a specialized visual brief, screenshots, existing resources or an optional Source Plan. Source Plan authoring is not a prerequisite: both Skills can consume raw inputs independently and neither invokes the other.
|
|
230
|
+
|
|
231
|
+
The Skill fixes the requested output as a hard scope ceiling, discovers current Open Design agents/models, functional skills, rendering templates, design systems, plugins and export routes, then gives every considered resource a reasoned `selected`, `optional`, `not-needed`, `unavailable` or `decision-required` disposition. It commissions only the smallest sufficient set through structured MCP, with bounded CLI/daemon and UI fallback. A prototype, low/high-fidelity pair, component board, Figma handoff, variant count or directory is never universally required, and Tiny Context never copies Open Design prompts/templates or vendors a provider catalogue.
|
|
232
|
+
|
|
233
|
+
Exploration returns the requested visible candidate after minimal sanity review. Handoff adds project/run/capability provenance, explicit entry, declared coverage and known limitations. Selected-source preparation requires a real human selection basis and immutable hash or approved snapshot, but still creates no Design Authority. Candidate iterations stay task-local; the Skill may return one final consolidated accepted/rejected/unresolved delta for a separately owned proposal revision, but never edits the proposal, `project_context/**`, `DESIGN.md`, production code or a Delivery Contract.
|
|
234
|
+
|
|
235
|
+
The actual generation remains with configured Open Design/Product Design, Figma, image-generation, prototype or human systems. Their outputs enter the default Workflow or Long-Task as ordinary external Source. Candidates and inspiration authorize no fidelity. A selected exact target controls only its declared surface/viewport/mode/state/content conditions and needs stable immutable identity before it can affect a `verification_input`. `context_uiux_design` performs downstream UI Authority Closure and adopts only durable facts into Context/`DESIGN.md`; implementation renders and diffs remain evidence artifacts rather than self-authorizing targets.
|
|
236
|
+
|
|
237
|
+
Maintainers may set `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` plus optional `TY_CONTEXT_OPEN_DESIGN_MCP_ARGS_JSON` and run `npm run smoke:open-design` for an opt-in, read-only discovery smoke. Normal tests use a local mock MCP and never require Open Design, login, paid access or nondeterministic design output.
|
|
220
238
|
|
|
221
239
|
### Optional Source Plan Authoring
|
|
222
240
|
|
|
@@ -498,7 +516,7 @@ make validate-harness
|
|
|
498
516
|
|
|
499
517
|
The modularity gate is `ty-context check-modularity`. Scoped waivers require `owner`, `introduced_at`, `reason`, `tracking_issue` and `expiry_condition`.
|
|
500
518
|
|
|
501
|
-
`npm run preview:pack` produces a local preview named `project-tiny-context-harness-0.7.
|
|
519
|
+
`npm run preview:pack` produces a local preview named `project-tiny-context-harness-0.7.6.tgz` under the preview output directory.
|
|
502
520
|
|
|
503
521
|
## Community And Further Reading
|
|
504
522
|
|
package/assets/README.zh-CN.md
CHANGED
|
@@ -38,13 +38,13 @@ 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`。显式启用长程能力:
|
|
41
|
+
默认 Profile 是 `core-portable` 与 `workflow-default`,基础 managed set 已包含 `/design-resource-authoring`。显式启用长程能力:
|
|
42
42
|
|
|
43
43
|
```powershell
|
|
44
44
|
ty-context enable long-task
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
启用长程能力会额外安装 `/source-plan-authoring`、`/long-task-workflow` 与完成 Hook;`ty-context disable long-task` 只移除这些 Long-Task-owned surfaces,并保留基础 `/design-resource-authoring`。Tiny Context 不安装 Open Design、模型 Worker、Agent runtime、调度器、Git 编排资产或其他设计生成 runtime。
|
|
48
48
|
|
|
49
49
|
## Minimal Context 与默认工作流
|
|
50
50
|
|
|
@@ -103,13 +103,35 @@ Context: no durable fact change
|
|
|
103
103
|
|
|
104
104
|
Harness 只路由仓库原生 lint/AST/dependency/contract check,不实现跨语言通用架构分析器。`check-modularity` 的语句数/分支风险会定位到最高风险函数和行号。
|
|
105
105
|
|
|
106
|
+
### Product Surface 与 Screen Contract
|
|
107
|
+
|
|
108
|
+
`context_surface_contract` 继续使用现有 `contract`、area/subdomain 和 verification 角色。`product-surface-contract.md` 负责跨页面、主层/下钻与共享职责;可选且按需读取的 `screen-contract.md` 负责单屏 entry/exit/shared state、信息层级、语义区域、导航/变体、material controls 和 target/verification 引用。它们不新增 `design`、`screen` 或 product-surface Context role,局部样式修复也不要求补建 Screen Contract。
|
|
109
|
+
|
|
110
|
+
material UI 在实现前执行 **UI Authority Closure**:每个稳定 surface/control/target key 必须归类为现有 Context 已覆盖、需要 Context 更新、task-local、显式 out-of-scope 或真正 decision-required。Surface Context 负责跨页面职责,Screen/interaction Context 负责稳定层级和行为,`DESIGN.md` 负责视觉系统与引用解释,authored target 负责具体构图,Delivery Contract 只绑定并证明本次交付。出现冲突时 fail closed;当前代码、时间戳、YAML 或实现截图不能静默胜出。
|
|
111
|
+
|
|
106
112
|
### 视觉交付指导
|
|
107
113
|
|
|
108
|
-
默认 Workflow 现在会在 material production UI
|
|
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。明确的独立设计资源生成请求路由到 `/design-resource-authoring`,由它委托外部 Open Design 能力但不采纳权威;进入开发流程后的耐久权威采纳/修复路由到 `context_uiux_design`。已有充分权威的普通实现、局部样式修复和 throwaway prototype 仍保持轻量。
|
|
109
115
|
|
|
110
116
|
对 material 工作,`context_uiux_design` 在任务内部维护风险比例化的 Visual Coverage Set;耐久 surface/interaction 事实属于 `project_context/**`,耐久视觉语义和设计引用 registry 属于 `DESIGN.md`,versioned target 保留在项目原生路径。`context_development_engineer` 把这些意图绑定到生产组件/真实 route,只报告真正渲染和检查过的组合;实现截图不能成为它自己的目标。
|
|
111
117
|
|
|
112
|
-
显式 Long-Task 会在 Compile
|
|
118
|
+
显式 Long-Task 会在 Compile 前解决缺失/冲突的 UI 权威,并把每个 applicable Control 的 surface、region/location、type/label、user task、visibility/availability、trigger/input/validation/default、interaction/navigation、loading/empty/success/failure/recovery/permission/feedback/accessibility 完整投影为独立 Source-backed Control Claim 和受保护产品语义;空字段不生成 Claim。仍只复用现有 Requirement、Control、Assertion、Stage、Binding、proof surface、verification input、revision 与 `external_confirmation`。
|
|
119
|
+
|
|
120
|
+
combined design-and-implementation 可以先用普通 Outcome/Stage 生成候选,但 candidate/planned target 不能解锁 fidelity implementation;选定结果必须先进入真实 marked Source 与 owning registry/target,并在 Authority Lock 后通过现有 protected revision 采用。浏览器视觉 AC 使用 `ui_browser`;浏览器代理不能证明可独立失败的原生目标,因此原生 proof 只能使用项目自己的 current-execution target Check,无法真实表达时保留为外部确认。冻结截图 baseline 是 verifier input,生成截图/diff 是 review artifact,主观批准保持外部。这不新增 `uiux_delivery`、视觉 Claim type、risk level、lifecycle state、Gate、必需设计目录或通用像素阈值。
|
|
121
|
+
|
|
122
|
+
`ty-context doctor` 保留兼容的项目级 `missing | unconfigured | configured` 状态,并增加 Design Authority Index、token source 和已分类 reference 的 advisory 信号。它明确不推断页面实现就绪;material surface 仍需 owning Screen/Control meaning、selected target/constraints 与项目自己的验证路径。
|
|
123
|
+
|
|
124
|
+
### 可选 Design Resource Authoring
|
|
125
|
+
|
|
126
|
+
只有在用户明确要求生成、迭代、准备独立设计资源或使用 Open Design 时,才使用 `/design-resource-authoring`。输入可以是零散笔记或初版方案、产品/技术方案、专门视觉 brief、截图、已有资源或可选 Source Plan。Source Plan 不是前置项:两个 Skill 都可以独立读取原始输入,互不调用。
|
|
127
|
+
|
|
128
|
+
Skill 先把明确输出当作硬 scope ceiling,再实时发现 Open Design 当前 agent/model、functional skill、rendering template、design system、plugin 与 export route,并把每种候选资源说明为 `selected`、`optional`、`not-needed`、`unavailable` 或 `decision-required`。它只通过结构化 MCP(必要时有限使用 CLI/daemon/UI fallback)委托最小充分资源集;原型、低/高保真组合、组件板、Figma handoff、变体数量和目录都不是全局必选项。Tiny Context 不复制 Open Design 的 prompt/template,也不内置 provider catalogue。
|
|
129
|
+
|
|
130
|
+
探索模式只做最小完整性检查并尽快展示指定候选;handoff 增加 project/run/capability provenance、明确 entry、声明覆盖与已知限制;selected-source preparation 要求真实人工选择依据和不可变 hash 或已批准 snapshot,但仍不产生 Design Authority。候选迭代保持任务内;Skill 可以在方向最终确定后返回一份合并的 accepted/rejected/unresolved 差异供独立方案步骤处理,但不会修改初版方案、`project_context/**`、`DESIGN.md`、生产代码或 Delivery Contract。
|
|
131
|
+
|
|
132
|
+
实际生成仍由已配置的 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,不能自我授权为目标。
|
|
133
|
+
|
|
134
|
+
维护者可以设置 `TY_CONTEXT_OPEN_DESIGN_MCP_COMMAND` 与可选 `TY_CONTEXT_OPEN_DESIGN_MCP_ARGS_JSON`,运行 `npm run smoke:open-design` 做显式启用、只读的 discovery smoke。正常测试使用本地 mock MCP,不依赖 Open Design、登录、付费能力或不确定的设计输出。
|
|
113
135
|
|
|
114
136
|
### 可选 Source Plan Authoring
|
|
115
137
|
|
|
@@ -10,13 +10,15 @@ Unless an active Long-Task binding exists:
|
|
|
10
10
|
|
|
11
11
|
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
12
|
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;
|
|
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 design resources, `design-resource-authoring` may commission the smallest sufficient set from live Open Design capabilities without changing Context, code or Contract. Its output and other externally authored resources remain ordinary Source until this workflow uses `context_uiux_design` when needed to adopt or repair durable Design Authority. Local style fixes and explicit non-fidelity prototypes remain lightweight.
|
|
14
14
|
4. 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`.
|
|
15
15
|
5. Use the agent/platform internal plan. For high-risk work 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.
|
|
16
16
|
6. Implement precisely, run project-owned verification, perform Contract Conformance and a Context drift check, then report implementation, verification, Context status and blockers.
|
|
17
17
|
|
|
18
18
|
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
19
|
|
|
20
|
+
Externally authored design resources such as Figma frames, images, prototypes, token exports and component specifications are ordinary Source. Their authoring does not update `project_context/**` or `DESIGN.md`, edit production implementation, create a Delivery Contract or claim acceptance. The consuming workflow owns UI Authority Closure, `Context Delta`, durable adoption, implementation and project verification; candidates authorize no fidelity, while selected targets control only their declared surface/viewport/mode/state coverage.
|
|
21
|
+
|
|
20
22
|
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.
|
|
21
23
|
|
|
22
24
|
## Long-Task Routing
|
|
@@ -27,7 +29,7 @@ Do not infer long-task mode from duration, complexity, file count or agent prefe
|
|
|
27
29
|
2. Explicit `/long-task-workflow` authors or resumes exactly one complete `long-task-delivery-v2` Contract for the selected delivery.
|
|
28
30
|
3. `/normal-long-task` is a retirement pointer. Otherwise remain on the default Workflow Contract, even when work is long.
|
|
29
31
|
|
|
30
|
-
Contract Draft authoring belongs inside `long-task-workflow`: continuously revise the same non-authoritative `delivery-contract.yaml` until the first successful formal Compile creates Authority Lock. An optional Source Plan
|
|
32
|
+
Contract Draft authoring belongs inside `long-task-workflow`: continuously revise the same non-authoritative `delivery-contract.yaml` until the first successful formal Compile creates Authority Lock. An optional Source Plan and externally authored design resources are ordinary upstream Source guidance, not a Contract Draft or required input protocol. Candidate design resources authorize no fidelity Claim; selected targets and acceptance-affecting resources enter real marked Source and existing verification inputs, and after Authority Lock use protected revision.
|
|
31
33
|
|
|
32
34
|
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.
|
|
33
35
|
|
|
@@ -42,7 +44,7 @@ Tiny Context does not create or restore platform Goals, invoke models, spawn age
|
|
|
42
44
|
## Durable Facts And Generated Surfaces
|
|
43
45
|
|
|
44
46
|
- Context is intended ownership/boundary/contract truth; code is current implementation truth. Treat disagreement as drift, missing work or stale Context.
|
|
45
|
-
- Long-term facts live only in `project_context/**` or `DESIGN.md`; versioned authored design targets
|
|
47
|
+
- Long-term facts live only in `project_context/**` or `DESIGN.md`; versioned authored design targets remain upstream project Source/verifier inputs until the consuming workflow adopts durable meaning, while generated implementation screenshots/diffs, logs, raw evidence, secrets, runtime state and receipts do not become Context.
|
|
46
48
|
- Managed `AGENTS.md` blocks, `<harnessRoot>/ty-context-managed/**` and package-managed Skills are generated and sync-overwritten.
|
|
47
49
|
- Explicit upgrades use `context_harness_upgrade`; package sync never imports retired Campaign or development-period authority state.
|
|
48
50
|
|
|
@@ -28,6 +28,12 @@ Write only project-specific facts that should guide future implementation. Do no
|
|
|
28
28
|
|
|
29
29
|
- `<durable project-specific rule>`
|
|
30
30
|
|
|
31
|
+
## Screen Contract Routing
|
|
32
|
+
|
|
33
|
+
Keep this file at cross-surface responsibility depth. When one material screen needs durable entry/exit/shared-state, information hierarchy, semantic region order, fixed/scroll/overlay ownership, navigation, variants, material controls or design-target references, create an on-demand Screen Contract from `screen-contract.md` using an existing area/subdomain role (or `contract` only for a true cross-area interface).
|
|
34
|
+
|
|
35
|
+
Link by stable surface/control/target keys. Do not duplicate the Screen Contract here, copy exact visual tokens from `DESIGN.md`, or embed authored target binaries and test evidence.
|
|
36
|
+
|
|
31
37
|
## Registration Example
|
|
32
38
|
|
|
33
39
|
Use the existing `contract` role for cross-surface or cross-area contracts:
|
|
@@ -52,6 +58,7 @@ Update this Context when:
|
|
|
52
58
|
- A durable main/drilldown/diagnostic ownership rationale, rejected alternative or tradeoff will guide future changes.
|
|
53
59
|
- A repeated UI/product rule becomes reusable.
|
|
54
60
|
- A platform-specific interaction rule becomes stable.
|
|
61
|
+
- Cross-surface ownership changes which Screen Contract owns a detail.
|
|
55
62
|
|
|
56
63
|
Do not update this Context for:
|
|
57
64
|
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Screen Contract
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This optional on-demand Context records durable responsibility, information hierarchy and interaction semantics for one user-facing screen/surface when a Product Surface Contract is too coarse for future implementation and verification.
|
|
6
|
+
|
|
7
|
+
A screen may be a Web route, mobile screen, desktop window, game HUD/menu scene, CLI/TUI view, extension panel, kiosk or embedded-device interface. Use only the relevant sections. Do not create a Screen Contract for a semantics-preserving CSS/style fix, one-off UI bug or explicit throwaway prototype.
|
|
8
|
+
|
|
9
|
+
Write project-specific facts only. Do not copy visual token values, binary targets, implementation screenshots, test logs, raw payloads, implementation summaries or secrets into this file.
|
|
10
|
+
|
|
11
|
+
## Authority Boundary
|
|
12
|
+
|
|
13
|
+
- Product Surface Contract owns cross-surface responsibility, main/drilldown placement and shared invariants.
|
|
14
|
+
- This Screen Contract owns stable screen hierarchy, regions, state/navigation behavior and durable material-control semantics.
|
|
15
|
+
- `DESIGN.md` owns visual-system semantics, the authored token source/generation direction and durable target interpretations.
|
|
16
|
+
- Versioned authored design targets own their declared concrete composition for named viewport/mode/state/content conditions.
|
|
17
|
+
- Verification Context owns repeatable proof paths. Code is current implementation evidence, not silent design authority.
|
|
18
|
+
|
|
19
|
+
If these owners conflict, update the stale owner or retain a genuine decision. Do not resolve a conflict from file order, current code shape or an implementation-generated screenshot.
|
|
20
|
+
|
|
21
|
+
## Screen Identity
|
|
22
|
+
|
|
23
|
+
- Surface Key:
|
|
24
|
+
- Surface / Route / Command:
|
|
25
|
+
- Platform:
|
|
26
|
+
- Owning Product Domain:
|
|
27
|
+
- Primary User Question:
|
|
28
|
+
- In-Scope User Tasks:
|
|
29
|
+
- Explicit Non-Goals:
|
|
30
|
+
|
|
31
|
+
## Entry, Exit And Shared State
|
|
32
|
+
|
|
33
|
+
- Entry Context / Preconditions:
|
|
34
|
+
- Entry Points / Deep Links:
|
|
35
|
+
- Inherited Shared State:
|
|
36
|
+
- Locally Editable State:
|
|
37
|
+
- Committed State Changes:
|
|
38
|
+
- Exit Outcomes / Destinations:
|
|
39
|
+
- Back / Cancel / Interruption Behavior:
|
|
40
|
+
- Focus / Selection Restoration:
|
|
41
|
+
|
|
42
|
+
## Information Hierarchy
|
|
43
|
+
|
|
44
|
+
Record semantic order and responsibility, not pixel coordinates.
|
|
45
|
+
|
|
46
|
+
1. Primary judgment:
|
|
47
|
+
2. Primary action:
|
|
48
|
+
3. Supporting information:
|
|
49
|
+
4. Secondary actions:
|
|
50
|
+
5. Drilldown / evidence / diagnostics:
|
|
51
|
+
6. Information forbidden from permanent main-surface placement:
|
|
52
|
+
|
|
53
|
+
## Layout Contract
|
|
54
|
+
|
|
55
|
+
### Regions
|
|
56
|
+
|
|
57
|
+
| Region Key | Order | Responsibility | Fixed / Scroll / Overlay | Visibility Conditions |
|
|
58
|
+
|---|---:|---|---|---|
|
|
59
|
+
| `<region-key>` | 1 | | | |
|
|
60
|
+
|
|
61
|
+
### Spatial And Container Ownership
|
|
62
|
+
|
|
63
|
+
- Safe-area / system-chrome ownership:
|
|
64
|
+
- Fixed or sticky elements:
|
|
65
|
+
- Scroll owner and restoration:
|
|
66
|
+
- Overlay / modal / sheet owner:
|
|
67
|
+
- Map / canvas / media visible-area contract:
|
|
68
|
+
- Keyboard / input-method behavior:
|
|
69
|
+
- Gesture competition / pointer ownership:
|
|
70
|
+
|
|
71
|
+
## Control Inventory
|
|
72
|
+
|
|
73
|
+
Each material control has a stable semantic key. Fill only applicable fields; do not add generic filler for non-applicable states.
|
|
74
|
+
|
|
75
|
+
### `<control-key>`
|
|
76
|
+
|
|
77
|
+
- Surface:
|
|
78
|
+
- Region:
|
|
79
|
+
- Location:
|
|
80
|
+
- Control Type:
|
|
81
|
+
- Label / Content:
|
|
82
|
+
- User Task:
|
|
83
|
+
- Visibility:
|
|
84
|
+
- Availability:
|
|
85
|
+
- Trigger:
|
|
86
|
+
- Input:
|
|
87
|
+
- Validation:
|
|
88
|
+
- Default Value / Restored State:
|
|
89
|
+
- Interaction / Commit / Cancel:
|
|
90
|
+
- Navigation / Result:
|
|
91
|
+
- Loading State:
|
|
92
|
+
- Empty / No-Result State:
|
|
93
|
+
- Success State:
|
|
94
|
+
- Failure / Degraded State:
|
|
95
|
+
- Recovery / Retry / Interruption:
|
|
96
|
+
- Permission / Denial Path:
|
|
97
|
+
- Feedback:
|
|
98
|
+
- Accessibility / Keyboard / Focus / Motion Alternative:
|
|
99
|
+
|
|
100
|
+
## Screen State Variants
|
|
101
|
+
|
|
102
|
+
Describe composition or responsibility changes, not one-off screenshots.
|
|
103
|
+
|
|
104
|
+
- Initial / loading:
|
|
105
|
+
- Empty / no results:
|
|
106
|
+
- Partial / stale / degraded:
|
|
107
|
+
- Error / unavailable:
|
|
108
|
+
- Permission denied:
|
|
109
|
+
- Disabled / saving / mutating:
|
|
110
|
+
- Success / confirmation:
|
|
111
|
+
- Offline / recovery when applicable:
|
|
112
|
+
|
|
113
|
+
## Responsive, Mode And Content Variants
|
|
114
|
+
|
|
115
|
+
- Viewport / size-class boundaries:
|
|
116
|
+
- Orientation / window-resize behavior:
|
|
117
|
+
- Theme / product-mode differences:
|
|
118
|
+
- Text scaling / localization / long-content behavior:
|
|
119
|
+
- Reduced motion / contrast / input-mode differences:
|
|
120
|
+
- Other explicitly unsupported combinations:
|
|
121
|
+
|
|
122
|
+
## Navigation And Interaction Contract
|
|
123
|
+
|
|
124
|
+
- Forward navigation and committed state:
|
|
125
|
+
- Back / system-back / predictive-back behavior:
|
|
126
|
+
- Deep-link behavior:
|
|
127
|
+
- Modal / sheet / popover lifecycle:
|
|
128
|
+
- Gesture ownership and accessible alternative:
|
|
129
|
+
- Cancellation, interruption and recovery:
|
|
130
|
+
- Cross-surface state/version consistency:
|
|
131
|
+
|
|
132
|
+
## Design Target References
|
|
133
|
+
|
|
134
|
+
Reference project-native targets; do not embed binary content.
|
|
135
|
+
|
|
136
|
+
| Target ID | Interpretation | Path / Immutable URI | Viewport / Platform | Theme / Mode | State / Content Coverage | Selection Basis |
|
|
137
|
+
|---|---|---|---|---|---|---|
|
|
138
|
+
| `<stable-target-id>` | `exact-target` / `constraint` / `inspiration` | | | | | |
|
|
139
|
+
|
|
140
|
+
An `exact-target` authorizes fidelity comparison only for its declared conditions. A `constraint` governs only its named rule. `inspiration` does not authorize reproduction. An implementation screenshot cannot register itself as its own target.
|
|
141
|
+
|
|
142
|
+
## Verification
|
|
143
|
+
|
|
144
|
+
- Semantic / information-hierarchy check:
|
|
145
|
+
- Control behavior / state check:
|
|
146
|
+
- Visual target / layout check:
|
|
147
|
+
- Accessibility / focus / motion check:
|
|
148
|
+
- Cross-surface shared-state check:
|
|
149
|
+
- Target-runtime / native-device check:
|
|
150
|
+
- Human or external confirmation boundary:
|
|
151
|
+
- Known unproved combinations:
|
|
152
|
+
|
|
153
|
+
## Stable Design Rationale
|
|
154
|
+
|
|
155
|
+
- Decision:
|
|
156
|
+
- Reason:
|
|
157
|
+
- Rejected alternative when still decision-relevant:
|
|
158
|
+
- Tradeoff that must guide future changes:
|
|
159
|
+
|
|
160
|
+
Do not invent rationale from current implementation shape. Record a rejected alternative or tradeoff only when it is durable enough to constrain future screen decisions.
|
|
161
|
+
|
|
162
|
+
## Registration Example
|
|
163
|
+
|
|
164
|
+
Use an existing role. A screen owned by one domain normally uses `subdomain` (or the owning `area` file when small); use `contract` only when the screen itself is a cross-area interface.
|
|
165
|
+
|
|
166
|
+
```toml
|
|
167
|
+
[[context]]
|
|
168
|
+
path = "project_context/areas/<area>/screens/<screen>.md"
|
|
169
|
+
role = "subdomain"
|
|
170
|
+
triggers = ["<surface-key>", "<route>", "<screen name>", "<material control key>"]
|
|
171
|
+
read_policy = "on-demand"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Do not introduce `screen`, `design`, `surface-contract` or another custom role.
|
|
175
|
+
|
|
176
|
+
## Maintenance Rules
|
|
177
|
+
|
|
178
|
+
Update this Context when durable screen responsibility, hierarchy, region ownership, navigation/shared-state behavior, responsive/mode semantics or reusable material-control behavior changes.
|
|
179
|
+
|
|
180
|
+
Do not update it for CSS-only fixes, one-off screenshot findings, generated diffs, temporary audit notes, test logs, command output, implementation summaries, PR notes or rationale inferred only from current code.
|
|
@@ -66,6 +66,7 @@ sample provider / interface / page 证据不能替代 all-provider / all-interfa
|
|
|
66
66
|
涉及 Web/移动/桌面/游戏 UI、CLI/TUI、表单、配置、输入、选择、搜索、筛选、调度、预算/配额/限流或状态反馈时:
|
|
67
67
|
|
|
68
68
|
- 对照已有 Product Surface / Surface Contract、页面职责和控件任务,而不是只确认字段已暴露;
|
|
69
|
+
- 对 material screen 同时读取 owning Screen/interaction Context(若存在),并用稳定 surface/control/target key 绑定真实 route/component、设计 target 和测试;产品方案只有粗粒度时,把缺失字段路由到 Context update、task-local Source 或 genuine decision,不能在代码里形成唯一隐藏事实源;
|
|
69
70
|
- 内部保持 Surface Contract Hit、main allows/forbids、drilldown ownership、long-task state requirement、implementation drift 和 verification;
|
|
70
71
|
- 缺失 durable surface responsibility 时设置 `Context Delta: required`,先用 `context_surface_contract` 或 owning Context 建立职责;
|
|
71
72
|
- 收尾用简短 `Contract Conformance` 说明命中的 Context、实现满足方式、未满足项和验证入口。
|
|
@@ -81,9 +82,10 @@ For material production UI, first confirm Design Authority readiness; then carry
|
|
|
81
82
|
- preserve approved semantic tokens and component APIs; do not bypass them with undeclared raw color, spacing, typography or motion values merely to match one screenshot;
|
|
82
83
|
- implement the declared Visual Coverage Set across the applicable viewport, theme/mode, state, content-stress and accessibility/motion combinations, while avoiding an unrequested full Cartesian expansion;
|
|
83
84
|
- run project-owned rendered/component/browser verification and report only the combinations actually checked. Static analysis, generated kits and screenshot artifacts are supporting review material rather than proof of every visual or behavioral claim.
|
|
85
|
+
- For each applicable material control, preserve region/location, type/label, user task, visibility/availability, trigger/input/validation/default, interaction/navigation, loading/empty/success/failure/recovery/permission/feedback and accessibility semantics. An omitted field is not permission to invent durable product behavior; resolve it through UI Authority Closure.
|
|
84
86
|
- never promote the implementation's own generated screenshot/diff into its target; exact targets and acceptance-affecting baselines are selected Source/verifier inputs before comparison.
|
|
85
87
|
|
|
86
|
-
If an active Long-Task applies, express material visual expectations through its existing Requirement, Control, Assertion, Check and external-confirmation mechanisms. Do not introduce a second visual plan, acceptance document or lifecycle.
|
|
88
|
+
If an active Long-Task applies, express material visual expectations through its existing Requirement, full Control projection, Assertion, Check, Stage, Binding and external-confirmation mechanisms. A design candidate or planned target cannot unlock fidelity implementation: selection must become real Source/registry authority and an adopted protected revision first. Do not introduce a second visual plan, acceptance document or lifecycle.
|
|
87
89
|
|
|
88
90
|
## Modularity Check
|
|
89
91
|
|
|
@@ -21,7 +21,8 @@ Project-specific product planning rules belong in a separate project-local Skill
|
|
|
21
21
|
2. 和用户澄清或整理:目标用户、产品/页面定位、核心问题、用户需要什么、产品需要提供的内容/能力/反馈、主要流程、验收信号、非目标、约束、风险和受影响模块。
|
|
22
22
|
3. 涉及 Product Surface(Web 页面、移动/桌面屏幕、游戏 UI/HUD/菜单、CLI/TUI 输出、扩展或设备界面)、前端布局、UI/UX、产品模块边界或信息放置时,把产品/页面定位检查作为前置动作:用户在这个 surface 要完成的判断、产品必须提供的信息/动作/反馈、不应常驻的信息、主层/下钻/运维/诊断/详情归属、布局和信息密度是否匹配任务。多 surface、多平台或多模块归属不清时,先读取相关 Context 并搜索入口,必要时使用 `context_surface_contract` 做 Surface Contract Audit,再收窄到具体实现。该检查是下一步变更分类的输入;只有形成长期产品归属、surface 职责、信息架构或模块边界结论时才更新 Context。
|
|
23
23
|
- 若存在 Product Surface Contract,读取并对齐 primary user question、main allows/forbids、drilldown ownership、long-task state 和 verification。
|
|
24
|
-
-
|
|
24
|
+
- 若产品方案只到 surface/流程粒度而 material screen 的实现、验收需要更深事实,不要宣称已有控件级权威。使用稳定 surface/control key 将缺口分类为已有 Screen/interaction Context 覆盖、需要 Context 更新、task-local、out-of-scope 或 decision required;按需从 `screen-contract.md` 提炼 durable hierarchy/regions/navigation/variants/control semantics,视觉系统和 target 仍由 `DESIGN.md`/authored target 所有。
|
|
25
|
+
- 若缺失且本任务改变 durable surface responsibility,将唯一 `Context Delta` 设为 `required`,把具体答案写入 `project_context/**`,跨 surface 或跨 area 使用现有 `contract` role,不新增 surface-specific role。
|
|
25
26
|
4. 涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或加载/空态/错误态等 UI 控件时,用“控件任务框架”重新理解用户任务和产品反馈;这只是通用判断框架,不是业务处方库。
|
|
26
27
|
5. 当一个产品对象、能力或接口的增删改需要跨多个页面、模块、Context 或产品域同步调整时,将该影响范围视为产品边界复核信号;先判断它是否应沉淀为独立能力、subdomain 或 area,并明确对外契约、所有权和消费方边界,避免通过手工清单长期维护各消费面的重复映射。
|
|
27
28
|
6. 产品意图、模块职责、边界和验收口径以 `project_context/**` 为准;代码和搜索结果只说明当前实现状态。Context 决定“应该是什么”,代码揭示“现在是什么”,代码不能静默重定义 Context。
|
|
@@ -42,7 +43,7 @@ Project-specific product planning rules belong in a separate project-local Skill
|
|
|
42
43
|
## 内部执行约束与 Conformance
|
|
43
44
|
|
|
44
45
|
- `Context Delta` 只能是 `none` 或 `required`。`required` 先把足以指导实现的长期事实写入 owning Context;`none` 直接按现有 Context 工作,不制造 Context 噪音。
|
|
45
|
-
- Agent 内部计划应保持目标、用户任务、信息 / 动作 / 状态 / 反馈、边界、非目标、验收信号和验证入口清晰。触及 Product Surface 时,同时保持 surface platform、primary user question、main allows/forbids、drilldown ownership 和 long-task state requirement
|
|
46
|
+
- Agent 内部计划应保持目标、用户任务、信息 / 动作 / 状态 / 反馈、边界、非目标、验收信号和验证入口清晰。触及 Product Surface 时,同时保持 surface platform、primary user question、main allows/forbids、drilldown ownership 和 long-task state requirement 清晰;material controls 还应覆盖 applicable 的 region/location、type/label、task、visibility/availability、trigger/input/validation/default、interaction/navigation、states/recovery/permission/feedback/accessibility,而不是由开发时临时猜测。
|
|
46
47
|
- 外部来源的每项重要约束都在内部分类为 Context 已覆盖、Context 已更新、task-local、显式 out-of-scope 或需要用户决策;存在未处理项时不能声称全量完成。
|
|
47
48
|
- 默认流程不要求或验证固定 `plan.md`、Task Contract 文件、Source-to-Context 表、Context-to-Implementation 表、matrix、verdict 或 evidence ledger;可选 scratch 没有固定名称或权威。
|
|
48
49
|
- `Contract Conformance` 直接检查 controlling Context 是否到达正确产品域、surface、API、状态与验证路径并避开 forbidden shortcut。实现偏差修实现;缺少长期事实则返回 `Context Delta: required`,先更新 Context 再重新对齐。
|
|
@@ -17,6 +17,8 @@ Help agents turn broad product/UI principles into concrete, project-owned Produc
|
|
|
17
17
|
|
|
18
18
|
A Product Surface is any user-facing interface where users make judgments, take actions and receive feedback. Covered platforms include Web apps, dashboards, admin or operations UI, mobile screens, desktop windows, game UI/HUD/menu scenes, CLI/TUI output, browser extension or plugin UI, and embedded, kiosk or device UI.
|
|
19
19
|
|
|
20
|
+
Use two depths without creating new roles: Product Surface Contract for cross-surface/main-versus-drilldown ownership, and an optional on-demand Screen Contract when one screen needs stable entry/exit/shared-state, information hierarchy, layout regions, navigation, variants or material-control semantics. Start from managed `product-surface-contract.md` or `screen-contract.md`; do not require both for every task.
|
|
21
|
+
|
|
20
22
|
## Context Roles
|
|
21
23
|
|
|
22
24
|
Do not add a new `context_role`.
|
|
@@ -33,6 +35,8 @@ Forbidden roles include `surface-contract`, `product-surface`, `web-contract`, `
|
|
|
33
35
|
|
|
34
36
|
Use `DESIGN.md` only for visual identity, visual tokens and visual rationale. Do not put surface responsibility, main/drilldown ownership or diagnostic placement into `DESIGN.md`.
|
|
35
37
|
|
|
38
|
+
Keep one meaning owner: Surface Context owns cross-surface responsibility, Screen/interaction Context owns durable screen/control behavior, `DESIGN.md` owns visual-system semantics and target interpretations, authored targets own concrete declared composition, and verification Context owns repeatable proof paths. Link them with stable surface/control/target keys instead of copying facts.
|
|
39
|
+
|
|
36
40
|
## Mode Selection
|
|
37
41
|
|
|
38
42
|
Use the narrowest mode that matches the request:
|
|
@@ -128,6 +132,16 @@ For each touched surface, answer only what is relevant:
|
|
|
128
132
|
- What validation path can prove conformance?
|
|
129
133
|
- If this came from an external plan/source, which source constraints are covered by existing Context, require new Context, are task-local only, are explicitly out of scope, need user decision or remain under-scoped?
|
|
130
134
|
|
|
135
|
+
When screen depth is material, also answer only the applicable questions:
|
|
136
|
+
|
|
137
|
+
- What stable surface/route key, entry context, exit outcome, inherited state and committed state identify the screen?
|
|
138
|
+
- What is the semantic information order and which regions are fixed, scrolling or overlay-owned?
|
|
139
|
+
- Which navigation, back/cancel, focus restoration, interruption and responsive/mode/state variants are durable?
|
|
140
|
+
- For each material stable control key, what are its region/location, type/label, user task, visibility/availability, trigger/input/validation/default, interaction/navigation, loading/empty/success/failure/recovery/permission/feedback and accessibility semantics?
|
|
141
|
+
- Which exact-target/constraint/inspiration IDs govern which declared conditions, and which verification path proves each independent claim?
|
|
142
|
+
|
|
143
|
+
Before applying material UI facts, perform UI Authority Closure: classify each item as Context-covered, Context update, task-local, out of scope or decision-required. Conflicting controlling owners fail closed; current code, timestamps and Contract YAML do not silently win.
|
|
144
|
+
|
|
131
145
|
## Repo-Local Task Block Candidate
|
|
132
146
|
|
|
133
147
|
When the user wants project-local enforcement, propose a separate project-local Skill block like this and tailor only the project-specific answers:
|
|
@@ -173,4 +187,5 @@ Conformance must internally confirm that every important external-source constra
|
|
|
173
187
|
- Do not treat current backend fields, enums, JSON, screenshots or terminal output as product intent.
|
|
174
188
|
- Do not invent rationale; rejected alternatives or tradeoffs belong in Context only when they are stable enough to affect future surface decisions.
|
|
175
189
|
- Do not add a surface-specific validator, edit-order gate, plan-contract validator or package-level mandatory Surface Contract gate.
|
|
190
|
+
- Do not create a `design`/`screen` Context role, per-surface readiness state, UI/UX Contract lifecycle or required Screen Contract for local fixes.
|
|
176
191
|
- Do not include business-domain examples in this package-managed Skill.
|