project-tiny-context-harness 0.2.53 → 0.2.55
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 +122 -69
- package/assets/README.md +113 -62
- package/assets/README.zh-CN.md +8 -6
- package/assets/agents/AGENTS_CORE.md +17 -16
- package/assets/context_templates/product-surface-contract.md +60 -0
- package/assets/github/harness.yml +15 -11
- package/assets/make/ty-context.mk +48 -0
- package/assets/skills/context_development_engineer/SKILL.md +9 -6
- package/assets/skills/context_full_project_export/SKILL.md +13 -13
- package/assets/skills/context_harness_upgrade/SKILL.md +9 -9
- package/assets/skills/context_product_plan/SKILL.md +7 -4
- package/assets/skills/context_surface_contract/SKILL.md +168 -0
- package/assets/skills/context_uiux_design/SKILL.md +7 -4
- package/assets/skills/plan_acceptance_checklist_compiler/SKILL.md +427 -0
- package/assets/tools/validate_context.py +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/check-modularity.js +14 -6
- package/dist/commands/export-context.js +4 -4
- package/dist/commands/index.js +8 -5
- package/dist/commands/init.js +1 -1
- package/dist/commands/package-source.js +1 -1
- package/dist/commands/upgrade.js +1 -1
- package/dist/lib/config.js +7 -2
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/constants.js +1 -1
- package/dist/lib/context-export.js +5 -5
- package/dist/lib/harness-root.d.ts +5 -0
- package/dist/lib/harness-root.js +32 -4
- package/dist/lib/legacy-managed-scan.d.ts +2 -0
- package/dist/lib/legacy-managed-scan.js +79 -0
- package/dist/lib/legacy-sdlc-migration.d.ts +2 -0
- package/dist/lib/legacy-sdlc-migration.js +189 -0
- package/dist/lib/managed-file.d.ts +18 -12
- package/dist/lib/managed-file.js +25 -14
- package/dist/lib/migrations.js +4 -2
- package/dist/lib/modularity.d.ts +9 -0
- package/dist/lib/modularity.js +132 -8
- package/dist/lib/package-json-config.js +3 -3
- package/dist/lib/paths.d.ts +2 -2
- package/dist/lib/paths.js +2 -2
- package/dist/lib/sync-engine.js +33 -31
- package/dist/lib/types.d.ts +12 -0
- package/dist/lib/validators.js +37 -4
- package/package.json +5 -5
- package/source-mappings.yaml +13 -13
- package/assets/make/sdlc-harness.mk +0 -43
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ty-context:github-workflow:begin
|
|
2
2
|
name: Harness Gates
|
|
3
3
|
|
|
4
4
|
on:
|
|
@@ -14,24 +14,28 @@ on:
|
|
|
14
14
|
default: "validate-context"
|
|
15
15
|
type: choice
|
|
16
16
|
options:
|
|
17
|
-
- validate-context
|
|
18
|
-
- validate-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
- validate-context
|
|
18
|
+
- validate-code-modularity
|
|
19
|
+
- validate-harness
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
harness:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
24
25
|
- uses: actions/checkout@v6
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0
|
|
25
28
|
- uses: actions/setup-node@v6
|
|
26
29
|
with:
|
|
27
30
|
node-version: "24"
|
|
28
31
|
- name: Prepare source workspace CLI
|
|
29
|
-
if: ${{ hashFiles('packages/
|
|
32
|
+
if: ${{ hashFiles('packages/ty-context/package.json') != '' }}
|
|
30
33
|
run: |
|
|
31
34
|
npm ci
|
|
32
35
|
npm run build --workspace project-tiny-context-harness
|
|
33
36
|
- name: Run harness gate
|
|
34
37
|
run: make "${HARNESS_GATE}"
|
|
35
38
|
env:
|
|
36
|
-
HARNESS_GATE: ${{ github.event.inputs.gate || 'validate-
|
|
37
|
-
|
|
39
|
+
HARNESS_GATE: ${{ github.event.inputs.gate || 'validate-harness' }}
|
|
40
|
+
TY_CONTEXT_MODULARITY_BASE: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || github.event.before || '' }}
|
|
41
|
+
# ty-context:github-workflow:end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
PYTHON ?= python3
|
|
2
|
+
TY_CONTEXT ?= $(if $(wildcard packages/ty-context/dist/cli.js),node packages/ty-context/dist/cli.js,npx --yes --package project-tiny-context-harness@latest ty-context)
|
|
3
|
+
TY_CONTEXT_MODULARITY_SCOPE = $(if $(TY_CONTEXT_MODULARITY_BASE),--base $(TY_CONTEXT_MODULARITY_BASE),--touched)
|
|
4
|
+
|
|
5
|
+
.PHONY: help ty-context-doctor ty-context-sync ty-context-upgrade ty-context-check-modularity validate-context validate-code-modularity validate-harness lint test-current-domain test-all build
|
|
6
|
+
|
|
7
|
+
help:
|
|
8
|
+
@echo "Minimal Context Harness commands"
|
|
9
|
+
@echo " make ty-context-doctor Diagnose Harness root, core package and schema version"
|
|
10
|
+
@echo " make ty-context-sync Refresh managed assets; refuses when upgrade migrations are pending"
|
|
11
|
+
@echo " make ty-context-upgrade Run safe upgrade migrations, sync managed assets and doctor"
|
|
12
|
+
@echo " make ty-context-check-modularity Warn on oversized touched handwritten source files"
|
|
13
|
+
@echo " make validate-context Check whether project_context/** supports context recovery"
|
|
14
|
+
@echo " make validate-code-modularity Fail on oversized touched handwritten source files"
|
|
15
|
+
@echo " make validate-harness Run validate-context and validate-code-modularity"
|
|
16
|
+
@echo " make test-all Run the project regression suite after replacing this placeholder"
|
|
17
|
+
|
|
18
|
+
ty-context-doctor:
|
|
19
|
+
$(TY_CONTEXT) doctor
|
|
20
|
+
|
|
21
|
+
ty-context-sync:
|
|
22
|
+
$(TY_CONTEXT) sync
|
|
23
|
+
|
|
24
|
+
ty-context-upgrade:
|
|
25
|
+
$(TY_CONTEXT) upgrade
|
|
26
|
+
|
|
27
|
+
ty-context-check-modularity:
|
|
28
|
+
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE)
|
|
29
|
+
|
|
30
|
+
validate-context:
|
|
31
|
+
$(TY_CONTEXT) validate-context
|
|
32
|
+
|
|
33
|
+
validate-code-modularity:
|
|
34
|
+
$(TY_CONTEXT) check-modularity $(TY_CONTEXT_MODULARITY_SCOPE) --fail-on-warning
|
|
35
|
+
|
|
36
|
+
validate-harness: validate-context validate-code-modularity
|
|
37
|
+
|
|
38
|
+
lint:
|
|
39
|
+
@echo "No project lint command configured yet. Replace this target with your stack-specific lint command."
|
|
40
|
+
|
|
41
|
+
test-current-domain:
|
|
42
|
+
@echo "No domain test command configured yet. Replace this target with focused tests for the current change."
|
|
43
|
+
|
|
44
|
+
test-all:
|
|
45
|
+
@echo "No full test command configured yet. Replace this target with the project regression suite."
|
|
46
|
+
|
|
47
|
+
build:
|
|
48
|
+
@echo "No build command configured yet. Replace this target with the project build/package command."
|
|
@@ -7,9 +7,9 @@ description: Use when the user explicitly asks for 开发工程师, 软件工程
|
|
|
7
7
|
|
|
8
8
|
## Package-Managed Boundary
|
|
9
9
|
|
|
10
|
-
This Skill is generated by `
|
|
10
|
+
This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_development_engineer` Skill directly.
|
|
11
11
|
|
|
12
|
-
Project-specific engineering rules belong in a separate project-local Skill under `<harnessRoot>/skills/development_engineer/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and
|
|
12
|
+
Project-specific engineering rules belong in a separate project-local Skill under `<harnessRoot>/skills/development_engineer/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and Tiny Context guidance do not drift apart.
|
|
13
13
|
|
|
14
14
|
## 目标
|
|
15
15
|
|
|
@@ -29,13 +29,15 @@ Project-specific engineering rules belong in a separate project-local Skill unde
|
|
|
29
29
|
- Gap
|
|
30
30
|
- Proposed change
|
|
31
31
|
8. 涉及模块原则、模块逻辑、设计原因、API / Schema、状态语义、验证设计或 capability / metric / acceptance claim 时,先做 Module Principle / Design Gate:列出命中的模块设计上下文来源,说明这些原则 / 逻辑控制本次哪些实现或验证选择,再选择实现路径、验证 claim、probe 参数或 fallback。命令、probe 和当前实现形态是执行实例,不能反推或覆盖模块设计目标。
|
|
32
|
-
9. 涉及 UI
|
|
32
|
+
9. 涉及 Product Surface(Web 页面、移动/桌面屏幕、游戏 UI/HUD/菜单、CLI/TUI 输出、扩展或设备界面)、表单/配置、输入、选择、搜索、筛选、调度/时间、预算/配额/限流或状态反馈的实现方案时,检查当前代码是否只是暴露字段,还是满足了已有 Context、Surface Contract、页面职责和控件任务框架;实现收尾要能给出简短 Surface/Context Conformance 证据。
|
|
33
|
+
- 若存在 Product Surface Contract,Task Contract 必须包含 Surface Contract Hit、main allows/forbids、drilldown ownership、long-task state requirement、implementation drift 和 verification。
|
|
34
|
+
- 若缺失且本任务创建 durable surface responsibility,设置 `Context Delta: required`,先用 `context_surface_contract` 或项目 Context 写入具体 surface 职责,再继续实现。
|
|
33
35
|
10. 实现时保持精准修改,优先遵循仓库现有框架、接口、测试和代码风格。
|
|
34
36
|
11. 当用户明确要求 / 允许“多开agent”或使用 subagent,且当前会话存在可用 subagent 工具时,积极把可并行的探索、审查或实现拆分交给 subagent;使用前先复用已有相关 agent,没有合适 agent 或并行度不足时再新开。`wait_agent` 只表示取得结果,不释放资源;subagent 完成、空闲或不再需要时必须调用 `close_agent`,收尾前清理已完成 / 空闲 / 不再需要的 subagent,避免占满后续资源。
|
|
35
37
|
12. 当任务涉及新实现、重构、重复逻辑、模块边界或影响面控制时,先做轻量 abstraction / decomposition scan:
|
|
36
|
-
- 工程 / RFC / 实现类 Task Contract 包含 `Modularity Check: none|required|exception`;可用 `
|
|
38
|
+
- 工程 / RFC / 实现类 Task Contract 包含 `Modularity Check: none|required|exception`;可用 `ty-context check-modularity --file <path> --limit 300` 审计计划编辑文件,用 `make validate-code-modularity` 或 `ty-context check-modularity --touched --limit 300 --fail-on-warning` 做交付前硬审计。若项目本地 Skill 定义了不同 limit,使用项目本地值。
|
|
37
39
|
- 发现超限 touched file 后,不只记录行数;判断本次是否在该文件加入新职责,并回到本节拆分原则选择产品面、hook、model、adapter、component、service / facade 或 verification helper 等边界。避免只按行数机械拆分、但耦合和职责仍留在原处。
|
|
38
|
-
- 如果本次不拆,`Modularity Check` 取 `exception
|
|
40
|
+
- 如果本次不拆,`Modularity Check` 取 `exception`,必须有 `<harnessRoot>/config.yaml` 的 `modularity.waivers` 记录(`path`、收窄 `category`、`reason`、`future_split_boundary`);交付说明只能补充说明,不是机器豁免。若项目设置 `modularity.policy: strict_except_generated`,legacy waiver 不可用,超限手写源码必须拆分或停止触碰。已豁免历史债也不得继续塞新职责,除非本次任务就是拆分 / 迁移。
|
|
39
41
|
- 查找相似实现、重复逻辑、紧耦合模块或影响面异常扩散点。
|
|
40
42
|
- 当一个业务对象、能力或接口的变更需要跨多个 Context、产品域或实现层同步调整时,将该影响范围视为模块边界复核信号;优先评估是否应通过独立模块、服务、facade 或稳定接口收敛依赖,避免通过手工 manifest 长期复制实现暴露面。
|
|
41
43
|
- 将候选项分为局部重构与长期边界变化,后者按既有 Context-first 规则处理。
|
|
@@ -66,10 +68,11 @@ Project-specific engineering rules belong in a separate project-local Skill unde
|
|
|
66
68
|
- `none`:本次只是按既有 Context / 架构原则落地,不新增长期事实。
|
|
67
69
|
- `required`:说明长期事实类型、应写入的 Context / role、需要沉淀的事实,以及明确不写入 Context 的一次性内容。
|
|
68
70
|
- `Task Contract` 用短列表说明 capability、owner、upstream / downstream、allowed / forbidden dependency、input / output / state / persistence、failure / retry / timeout / degraded / recovery、observability、performance、security、non-goals 和 verification path。
|
|
71
|
+
- 触及 Product Surface 时,`Task Contract` 同时说明 surface platform、primary user question、main allows/forbids、drilldown ownership、long-task state requirement、implementation drift 和 conformance verification。
|
|
69
72
|
- 工程 / RFC / 实现类任务的 `Task Contract` 必须包含 `Modularity Check: none|required|exception`:
|
|
70
73
|
- `none`:没有超限计划 / touched 手写源码文件,或本次没有向超限文件增加新职责。
|
|
71
74
|
- `required`:拆分是本次验收条件,应按 abstraction / decomposition scan 的职责边界完成。
|
|
72
|
-
- `exception
|
|
75
|
+
- `exception`:本次触碰超限文件但暂不拆;只有默认 `modularity.policy: scoped_waivers` 允许此路径,且必须已有或同步新增 `<harnessRoot>/config.yaml` `modularity.waivers` 记录文件、收窄分类、原因和后续拆分边界。若项目设置 `modularity.policy: strict_except_generated`,不得用 legacy waiver 绕过超限手写源码,交付说明只记录本次是否新增职责以及为什么没有拆。
|
|
73
76
|
- `Applicable Module Design` 是高风险任务的前置字段:列出命中的 Context / Skill 来源、适用的 Principles、Design Logic 和 Design Rationale,以及它们控制的当前实现或验证选择。
|
|
74
77
|
- `Principle Decision Gate` 要写明首选执行路径、fallback / degraded path 的进入条件,以及什么证据不能证明本次目标。涉及 capability、metric 或 acceptance claim 时,先声明要证明的 claim,再选择命令或 probe。
|
|
75
78
|
- 对长任务、多模块、多 agent、容易发生 `Context Delta` 调头或多轮验证的任务,可以用 `plan.md` 或等价临时计划面暂存 `Context Delta`、`Task Contract`、`Implementation Steps` 和 `Contract Conformance`;它只是临时执行缓存。
|
|
@@ -7,7 +7,7 @@ description: Use when the user explicitly asks to 导出尽可能详细的项目
|
|
|
7
7
|
|
|
8
8
|
## Package-Managed Boundary
|
|
9
9
|
|
|
10
|
-
This Skill is generated by `
|
|
10
|
+
This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_full_project_export` Skill directly.
|
|
11
11
|
|
|
12
12
|
This Skill creates a temporary export artifact only. It does not author durable Context and does not change `project_context/context.toml`.
|
|
13
13
|
|
|
@@ -20,36 +20,36 @@ When the user needs a code-level implementation export, create one temporary Mar
|
|
|
20
20
|
## Workflow
|
|
21
21
|
|
|
22
22
|
1. Prefer the package CLI to generate both temporary artifacts in one command. Do not hand-write tracked export documents:
|
|
23
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
23
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context export-context --all`
|
|
24
24
|
2. Use `--full` when only the project Context bundle is needed:
|
|
25
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
25
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context export-context --full`
|
|
26
26
|
3. Use `--code` when only the code-level implementation snapshot is needed. It generates one Markdown file by default:
|
|
27
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
27
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context export-context --code`
|
|
28
28
|
4. Custom output paths are allowed only for single-artifact modes and must stay under the temporary export directory. `--all` does not accept `--output`:
|
|
29
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
30
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
29
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context export-context --full --output tmp/ty-context/context-exports/my-export.md`
|
|
30
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context export-context --code --output tmp/ty-context/context-exports/my-code-export.md`
|
|
31
31
|
5. Use dry-run mode to inspect planned sources before writing:
|
|
32
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
33
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
34
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
32
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context export-context --all --check`
|
|
33
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context export-context --full --check`
|
|
34
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context export-context --code --check`
|
|
35
35
|
6. After exporting, report artifact paths, source counts and warnings to the user. Do not summarize export contents back into Context.
|
|
36
36
|
|
|
37
37
|
## Output Boundaries
|
|
38
38
|
|
|
39
39
|
- Export artifacts must remain temporary export artifacts, not Context.
|
|
40
|
-
- `--full` defaults to `tmp/
|
|
41
|
-
- `--code` defaults to `tmp/
|
|
40
|
+
- `--full` defaults to `tmp/ty-context/context-exports/full-project-context-<timestamp>.md`.
|
|
41
|
+
- `--code` defaults to `tmp/ty-context/context-exports/code-level-implementation-<timestamp>/code-level-implementation.md`.
|
|
42
42
|
- `--all` generates both default artifacts with the same timestamp.
|
|
43
43
|
- `--all` does not accept `--output`; custom filenames are supported only for `--full` or `--code`.
|
|
44
44
|
- `--code` creates one Markdown file, not shards or `all.md`.
|
|
45
45
|
- Do not output to `project_context/**`.
|
|
46
46
|
- Do not modify `project_context/context.toml`.
|
|
47
47
|
- Do not register export artifacts as `[[context]]`, `implementation-index` or any Context graph node.
|
|
48
|
-
- Do not write tracked docs; if the user asks for an ordinary docs path, redirect to `tmp/
|
|
48
|
+
- Do not write tracked docs; if the user asks for an ordinary docs path, redirect to `tmp/ty-context/context-exports/**`.
|
|
49
49
|
- Export contents may include redaction warnings; do not bypass secret/token/cookie/password/api_key filtering.
|
|
50
50
|
|
|
51
51
|
## Handoff
|
|
52
52
|
|
|
53
53
|
- Report `Export: generated <path>` or `Export: check completed; no files written`.
|
|
54
|
-
- If the CLI rejects an output path, explain that this prevents temporary exports from polluting durable fact sources and suggest `tmp/
|
|
54
|
+
- If the CLI rejects an output path, explain that this prevents temporary exports from polluting durable fact sources and suggest `tmp/ty-context/context-exports/<name>.md`.
|
|
55
55
|
- Context drift check should be `Context: no durable project facts changed` unless the task also changes Harness rules.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context_harness_upgrade
|
|
3
|
-
description: Use when the user asks to upgrade Tiny Context, update Tiny Context, use the Tiny Context upgrade skill to upgrade this project, upgrade project-tiny-context-harness, run
|
|
3
|
+
description: Use when the user asks to upgrade Tiny Context, update Tiny Context, use the Tiny Context upgrade skill to upgrade this project, upgrade project-tiny-context-harness, run ty-context upgrade, run make ty-context-upgrade, Project Tiny Context Harness upgrade, 用 Tiny Context upgrade skill 升级这个项目, 升级 tiny context, 升级tiny context, or 更新 project-tiny-context-harness in a Minimal Context Harness project.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Context Harness Upgrade
|
|
7
7
|
|
|
8
8
|
## Package-Managed Boundary
|
|
9
9
|
|
|
10
|
-
This Skill is generated by `
|
|
10
|
+
This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_harness_upgrade` Skill directly.
|
|
11
11
|
|
|
12
12
|
This Skill handles Harness package upgrade and migration orchestration only. It does not author product facts, refactor business code, replace project tests or prove application quality.
|
|
13
13
|
|
|
@@ -24,20 +24,20 @@ When the user asks to upgrade Tiny Context / Project Tiny Context Harness in an
|
|
|
24
24
|
- `project_context/context.toml`
|
|
25
25
|
2. Inspect the working tree with `git status --short`. Do not revert unrelated user changes.
|
|
26
26
|
3. Prefer project wrappers when present:
|
|
27
|
-
- `make
|
|
28
|
-
- `make
|
|
27
|
+
- `make ty-context-upgrade`
|
|
28
|
+
- `make ty-context-doctor`
|
|
29
29
|
- `make validate-context`
|
|
30
30
|
4. If no wrapper exists, use the package CLI explicitly:
|
|
31
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
32
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
33
|
-
- `npx --yes --package project-tiny-context-harness@latest
|
|
31
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context upgrade --check`
|
|
32
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context upgrade`
|
|
33
|
+
- `npx --yes --package project-tiny-context-harness@latest ty-context doctor`
|
|
34
34
|
5. Do not run standalone `sync` before `upgrade`. `upgrade` is the default path after an npm package update because it plans migrations, applies safe migrations, refreshes managed assets and runs diagnostics.
|
|
35
35
|
6. Do not run standalone `sync` after a successful `upgrade` unless release notes say the update is `sync-only`, the project wrapper did not run sync, or the user explicitly asks for a managed-asset refresh.
|
|
36
36
|
7. If `upgrade --check` or `upgrade` reports only `safe_pending` items and the command succeeds, do not invent additional manual cleanup.
|
|
37
37
|
8. If the report includes `manual_required` or `blocked`, handle only the listed migration scope. Use `project_context/context.toml`, role placement scan and the existing area graph to decide placement. Do not guess product or business semantics.
|
|
38
38
|
9. If the report includes `blocked`, treat it as a write preflight failure: resolve the blocked migration scope and rerun `upgrade` before expecting safe migrations or managed asset sync to have been applied.
|
|
39
39
|
10. Run diagnostics after migration-scoped follow-up:
|
|
40
|
-
- `make
|
|
40
|
+
- `make ty-context-doctor` or the CLI `doctor`
|
|
41
41
|
- `make validate-context`
|
|
42
42
|
11. Report commands run, migration status, diagnostics, files changed and any remaining manual items. Use `Context: no durable project facts changed` unless the upgrade exposed or required a real long-term project fact change.
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ When the user asks to upgrade Tiny Context / Project Tiny Context Harness in an
|
|
|
45
45
|
|
|
46
46
|
- `manual_required` means the Harness detected a migration-scoped item but cannot safely choose the project meaning. Fix it only when the existing Context or file structure proves the intended placement.
|
|
47
47
|
- `blocked` means the safe target already exists or another conflict prevents a mechanical write. Do not overwrite. Compare source and target, preserve user content and ask for direction if the conflict cannot be resolved from project facts.
|
|
48
|
-
- Deprecated override Skills under `
|
|
48
|
+
- Deprecated override Skills under `ty-context-managed/override_skills/**` should be migrated to standalone project-local Skills only when their content is still relevant. Do not merge them into package-managed default Skills.
|
|
49
49
|
- Ambiguous Context roles should not be guessed from filenames like `api.md`, `notes.md` or `main.md` alone. Register a role only when the manifest, path convention or durable content makes it clear.
|
|
50
50
|
- If `upgrade` creates default `project_context/areas/main.md` or `project_context/areas/main/verification.md` but `project_context/context.toml` already declares real project areas and does not register `main`, remove those generated defaults instead of preserving them as durable project facts. If `main` is registered or contains user-authored facts, do not delete it automatically.
|
|
51
51
|
|
|
@@ -7,9 +7,9 @@ description: Use when the user explicitly asks for 产品方案, 产品经理,
|
|
|
7
7
|
|
|
8
8
|
## Package-Managed Boundary
|
|
9
9
|
|
|
10
|
-
This Skill is generated by `
|
|
10
|
+
This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_product_plan` Skill directly.
|
|
11
11
|
|
|
12
|
-
Project-specific product planning rules belong in a separate project-local Skill under `<harnessRoot>/skills/product_plan/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and
|
|
12
|
+
Project-specific product planning rules belong in a separate project-local Skill under `<harnessRoot>/skills/product_plan/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and Tiny Context guidance do not drift apart.
|
|
13
13
|
|
|
14
14
|
## 目标
|
|
15
15
|
|
|
@@ -19,7 +19,9 @@ Project-specific product planning rules belong in a separate project-local Skill
|
|
|
19
19
|
|
|
20
20
|
1. 先读取 `project_context/global.md` 和 `project_context/context.toml`,按 default area、triggers、read_when 选择相关 context。
|
|
21
21
|
2. 和用户澄清或整理:目标用户、产品/页面定位、核心问题、用户需要什么、产品需要提供的内容/能力/反馈、主要流程、验收信号、非目标、约束、风险和受影响模块。
|
|
22
|
-
3. 涉及 Web
|
|
22
|
+
3. 涉及 Product Surface(Web 页面、移动/桌面屏幕、游戏 UI/HUD/菜单、CLI/TUI 输出、扩展或设备界面)、前端布局、UI/UX、产品模块边界或信息放置时,把产品/页面定位检查作为前置动作:用户在这个 surface 要完成的判断、产品必须提供的信息/动作/反馈、不应常驻的信息、主层/下钻/运维/诊断/详情归属、布局和信息密度是否匹配任务。多 surface、多平台或多模块归属不清时,先读取相关 Context 并搜索入口,必要时使用 `context_surface_contract` 做 Surface Contract Audit,再收窄到具体实现。该检查是下一步变更分类的输入;只有形成长期产品归属、surface 职责、信息架构或模块边界结论时才更新 Context。
|
|
23
|
+
- 若存在 Product Surface Contract,读取并对齐 primary user question、main allows/forbids、drilldown ownership、long-task state 和 verification。
|
|
24
|
+
- 若缺失且本任务改变 durable surface responsibility,输出 `Surface Contract Delta: required`,把具体答案写入 `project_context/**`,跨 surface 或跨 area 使用现有 `contract` role,不新增 surface-specific role。
|
|
23
25
|
4. 涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或加载/空态/错误态等 UI 控件时,用“控件任务框架”重新理解用户任务和产品反馈;这只是通用判断框架,不是业务处方库。
|
|
24
26
|
5. 当一个产品对象、能力或接口的增删改需要跨多个页面、模块、Context 或产品域同步调整时,将该影响范围视为产品边界复核信号;先判断它是否应沉淀为独立能力、subdomain 或 area,并明确对外契约、所有权和消费方边界,避免通过手工清单长期维护各消费面的重复映射。
|
|
25
27
|
6. 产品意图、模块职责、边界和验收口径以 `project_context/**` 为准;代码和搜索结果只说明当前实现状态。Context 决定“应该是什么”,代码揭示“现在是什么”,代码不能静默重定义 Context。
|
|
@@ -43,7 +45,8 @@ Project-specific product planning rules belong in a separate project-local Skill
|
|
|
43
45
|
- `Context Delta` 必须先出现,取值为 `none` 或 `required`:
|
|
44
46
|
- `none`:本次只是按既有 Context / 原则落地,不新增长期事实。
|
|
45
47
|
- `required`:说明长期事实类型、应写入的 Context / role、需要沉淀的事实,以及明确不写入 Context 的一次性内容。
|
|
46
|
-
- `Task Contract` 用短列表说明本次产品实现必须满足的目标、用户任务、信息 / 动作 / 状态 / 反馈、边界、非目标和验收信号。
|
|
48
|
+
- `Task Contract` 用短列表说明本次产品实现必须满足的目标、用户任务、信息 / 动作 / 状态 / 反馈、边界、非目标和验收信号。
|
|
49
|
+
- 触及 Product Surface 时,`Task Contract` 同时说明 surface platform、primary user question、main allows/forbids、drilldown ownership、long-task state requirement 和 verification;业务特定答案进入项目 Context 或项目本地 Skill,不写进 package-managed Skill。
|
|
47
50
|
- 对长任务、多模块、多 agent、容易发生 `Context Delta` 调头或多轮验证的任务,可以用 `plan.md` 或等价临时计划面暂存 `Context Delta`、`Task Contract`、`Implementation Steps` 和 `Contract Conformance`;它只是临时执行缓存。
|
|
48
51
|
- `plan.md` 中出现的长期事实必须提炼回 `project_context/**`;否则不要把临时计划当作事实源、交付产物或后续引用依据。
|
|
49
52
|
- `Context Delta: required` 时先更新 `project_context/**`,再继续实现;`none` 时直接按 Task Contract 实现。
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: context_surface_contract
|
|
3
|
+
description: Use when the user asks for Product Surface Contract, Surface Contract, Screen Contract, product surface responsibility, surface responsibility audit, information architecture governance, main/drilldown ownership, UI product boundary, product surface compiler, 产品界面职责治理, 产品接触面, 用户接触面, 页面职责契约, 界面责任契约, 主层/下钻归属, or asks to turn broad UI/product principles into project Context in a Minimal Context Harness project. Do not trigger for ordinary CSS tweaks, one-off UI bug fixes, copy edits, or implementation-only tasks unless the user explicitly asks to define or repair durable product-surface responsibility or information architecture contracts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Context Surface Contract
|
|
7
|
+
|
|
8
|
+
## Package-Managed Boundary
|
|
9
|
+
|
|
10
|
+
This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_surface_contract` Skill directly.
|
|
11
|
+
|
|
12
|
+
Project-specific Product Surface responsibilities belong in `project_context/**` and optional project-local Skills such as `<harnessRoot>/skills/product_plan/SKILL.md`, `<harnessRoot>/skills/uiux_design/SKILL.md`, `<harnessRoot>/skills/development_engineer/SKILL.md` or `<harnessRoot>/skills/surface_contract/SKILL.md`. The package-managed Skill teaches the compiler workflow only; it must not contain business-specific page duties, provider facts, project names, raw payload schemas or product examples.
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
Help agents turn broad product/UI principles into concrete, project-owned Product Surface Contracts while keeping Minimal Context small.
|
|
17
|
+
|
|
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
|
+
|
|
20
|
+
## Context Roles
|
|
21
|
+
|
|
22
|
+
Do not add a new `context_role`.
|
|
23
|
+
|
|
24
|
+
Use existing roles:
|
|
25
|
+
|
|
26
|
+
- `contract` for cross-surface, cross-area or project-level Product Surface Contracts.
|
|
27
|
+
- `area` or `subdomain` for owning product-domain Screen Contracts.
|
|
28
|
+
- `verification` for repeatable UI, CLI, app or product-surface validation paths.
|
|
29
|
+
- `decision-rationale` for stable product-surface tradeoff reasons.
|
|
30
|
+
- `implementation-index` for code navigation only.
|
|
31
|
+
|
|
32
|
+
Forbidden roles include `surface-contract`, `product-surface`, `web-contract`, `app-contract` and `game-surface`.
|
|
33
|
+
|
|
34
|
+
## Mode Selection
|
|
35
|
+
|
|
36
|
+
Use the narrowest mode that matches the request:
|
|
37
|
+
|
|
38
|
+
- Audit Mode: inspect whether existing surfaces have clear responsibility.
|
|
39
|
+
- Compile Mode: turn audit findings or user decisions into Context candidates.
|
|
40
|
+
- Apply Mode: write durable Context only when the user explicitly allows durable writes.
|
|
41
|
+
- Conformance Mode: check implementation against an existing Product Surface Contract.
|
|
42
|
+
|
|
43
|
+
Do not run implementation, long validation, browser smoke, app smoke or CLI smoke unless the user explicitly asks for execution.
|
|
44
|
+
|
|
45
|
+
## Audit Mode
|
|
46
|
+
|
|
47
|
+
Use when the user asks to inspect, review or audit surface responsibility.
|
|
48
|
+
|
|
49
|
+
Output only:
|
|
50
|
+
|
|
51
|
+
- Surface list.
|
|
52
|
+
- Surface platform.
|
|
53
|
+
- Code, screenshot, CLI or app evidence inspected.
|
|
54
|
+
- Existing Context expectation.
|
|
55
|
+
- Drift, missing contract or backend complexity exposure.
|
|
56
|
+
- Candidate `Context Delta`.
|
|
57
|
+
- Suggested durable placement.
|
|
58
|
+
- Optional temporary audit path under `tmp/**` when useful.
|
|
59
|
+
|
|
60
|
+
Do not edit durable Context by default. Code, screenshots and CLI output are evidence of current implementation, not authority for product responsibility.
|
|
61
|
+
|
|
62
|
+
## Compile Mode
|
|
63
|
+
|
|
64
|
+
Use when turning audit findings or user decisions into Context candidates.
|
|
65
|
+
|
|
66
|
+
Output:
|
|
67
|
+
|
|
68
|
+
- Project-level Product Surface Contract candidate when responsibilities cross surfaces or areas.
|
|
69
|
+
- Area-level Screen Contract candidate when ownership belongs inside one domain.
|
|
70
|
+
- `context.toml` candidate registration with `role = "contract"` when durable registration is needed.
|
|
71
|
+
- `global.md#Context Index` candidate entry when a new Context file is added.
|
|
72
|
+
- Verification candidate for repeatable surface checks.
|
|
73
|
+
- Repo-local Skill task-block candidate when the user wants project-specific enforcement.
|
|
74
|
+
|
|
75
|
+
Do not assume business responsibilities from current code shape alone. Ask for confirmation if the candidate would silently choose between competing product or information-architecture meanings.
|
|
76
|
+
|
|
77
|
+
## Apply Mode
|
|
78
|
+
|
|
79
|
+
Use only when the user explicitly allows durable writes.
|
|
80
|
+
|
|
81
|
+
Allowed writes:
|
|
82
|
+
|
|
83
|
+
- `project_context/**`.
|
|
84
|
+
- `project_context/context.toml`.
|
|
85
|
+
- `project_context/global.md#Context Index`.
|
|
86
|
+
- Optional `verification` role Context.
|
|
87
|
+
- Optional separate project-local Skill files when the user explicitly wants project-local enforcement.
|
|
88
|
+
|
|
89
|
+
Forbidden writes:
|
|
90
|
+
|
|
91
|
+
- Package-managed generated Skills in a consumer project.
|
|
92
|
+
- `<harnessRoot>/ty-context-managed/**` in a consumer project.
|
|
93
|
+
- Business code unless the user also requested implementation.
|
|
94
|
+
- Generated files.
|
|
95
|
+
- `DESIGN.md`, except visual tokens or visual rationale that do not belong in a Product Surface Contract.
|
|
96
|
+
|
|
97
|
+
If `Surface Contract Hit` is `none` and the task creates durable surface responsibility, set `Context Delta: required` and update project Context before implementation alignment.
|
|
98
|
+
|
|
99
|
+
## Conformance Mode
|
|
100
|
+
|
|
101
|
+
Use after implementation or during review.
|
|
102
|
+
|
|
103
|
+
Output:
|
|
104
|
+
|
|
105
|
+
- Surface Contract Conformance.
|
|
106
|
+
- Remaining Drift.
|
|
107
|
+
- Missing Context.
|
|
108
|
+
- Implementation Drift.
|
|
109
|
+
- Verification run / not_run / failed.
|
|
110
|
+
|
|
111
|
+
Do not store one-off evidence, screenshots, logs, raw outputs or implementation summaries in Context.
|
|
112
|
+
|
|
113
|
+
## Compiler Questions
|
|
114
|
+
|
|
115
|
+
For each touched surface, answer only what is relevant:
|
|
116
|
+
|
|
117
|
+
- What surface is being touched?
|
|
118
|
+
- What platform shape does it have?
|
|
119
|
+
- What primary user question does it answer?
|
|
120
|
+
- What belongs on the main surface?
|
|
121
|
+
- What must move to drilldown, diagnostics, operations, evidence or technical detail?
|
|
122
|
+
- Which long-running or mutating actions require task id, progress, retry, import, recovery or history?
|
|
123
|
+
- Which empty, loading, stale, unavailable, fixture or fallback states matter?
|
|
124
|
+
- What validation path can prove conformance?
|
|
125
|
+
|
|
126
|
+
## Repo-Local Task Block Candidate
|
|
127
|
+
|
|
128
|
+
When the user wants project-local enforcement, propose a separate project-local Skill block like this and tailor only the project-specific answers:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
## Surface Contract Task Block
|
|
132
|
+
|
|
133
|
+
For any task touching user-facing surfaces, information placement, forms, filters, search, long-running UI actions, diagnostics, evidence, CLI/TUI output or main/drilldown ownership, answer before implementation:
|
|
134
|
+
|
|
135
|
+
- Surface Contract Hit: `<context file / none>`
|
|
136
|
+
- Surface: `<route / screen / window / panel / command / HUD / menu>`
|
|
137
|
+
- Surface Platform: `<web | mobile | desktop | game | cli-tui | extension | embedded | mixed>`
|
|
138
|
+
- Owning Product Domain: `<area / subdomain>`
|
|
139
|
+
- Primary User Question: `<one concrete user judgment>`
|
|
140
|
+
- Main Surface Allows: `<durable visible information and actions>`
|
|
141
|
+
- Main Surface Forbids: `<backend fields, raw payloads, diagnostics, debug ids, fake states, etc.>`
|
|
142
|
+
- Drilldown Ownership: `<details / evidence / operations / diagnostics / technical details>`
|
|
143
|
+
- Long Task State Requirement: `<run id, progress, retry, recovery, import, history, or none>`
|
|
144
|
+
- Context Delta: `<none | required>`
|
|
145
|
+
- Verification: `<view-model test / component test / browser smoke / CLI smoke / manual check>`
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Do not add this task block to package-managed default Skills as a universal gate. Projects opt in through separate project-local Skills.
|
|
149
|
+
|
|
150
|
+
## Implementation Alignment
|
|
151
|
+
|
|
152
|
+
When implementation is also requested, align code with the Product Surface Contract:
|
|
153
|
+
|
|
154
|
+
- View-models or presenters should expose user-facing states instead of raw backend payloads when that contract exists.
|
|
155
|
+
- Components or commands should render main-surface facts and move technical details to the owning drilldown.
|
|
156
|
+
- Long-running actions should persist or recover the required operation state.
|
|
157
|
+
- Tests should assert user-facing state semantics, not only backend field plumbing.
|
|
158
|
+
- Browser, app, CLI or game smoke checks should validate actual surface behavior when feasible.
|
|
159
|
+
|
|
160
|
+
Final handoff should include concise `Surface Contract Conformance`: contract source, implementation alignment, remaining drift and verification status.
|
|
161
|
+
|
|
162
|
+
## Output Boundaries
|
|
163
|
+
|
|
164
|
+
- Do not create PRDs, UI/UX handoff docs, ADRs, stage artifacts, lifecycle state or phase gates.
|
|
165
|
+
- Do not update Context for ordinary CSS tweaks, copy edits or one-off UI bug fixes unless durable surface responsibility changes.
|
|
166
|
+
- Do not treat current backend fields, enums, JSON, screenshots or terminal output as product intent.
|
|
167
|
+
- Do not add a validator, edit-order gate or package-level mandatory Surface Contract gate.
|
|
168
|
+
- Do not include business-domain examples in this package-managed Skill.
|
|
@@ -7,9 +7,9 @@ description: Use when the user explicitly asks for 设计稿, 重做设计, UI/U
|
|
|
7
7
|
|
|
8
8
|
## Package-Managed Boundary
|
|
9
9
|
|
|
10
|
-
This Skill is generated by `
|
|
10
|
+
This Skill is generated by `ty-context sync` and owned by the Harness package. Do not edit the generated `context_uiux_design` Skill directly.
|
|
11
11
|
|
|
12
|
-
Project-specific UI/UX and visual design rules belong in a separate project-local Skill under `<harnessRoot>/skills/uiux_design/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**` and `DESIGN.md`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and
|
|
12
|
+
Project-specific UI/UX and visual design rules belong in a separate project-local Skill under `<harnessRoot>/skills/uiux_design/SKILL.md`. When a project-local Skill and this package-managed Skill both apply, use the more specific project-local Skill as the primary instruction source while keeping durable conclusions in `project_context/**` and `DESIGN.md`. Keep the project-local Skill front matter `description` trigger keywords aligned with this package-managed Skill and the project `AGENTS.md` role-trigger rule; if the project adds or narrows trigger terms, update both places together so agent activation and Tiny Context guidance do not drift apart.
|
|
13
13
|
|
|
14
14
|
## 目标
|
|
15
15
|
|
|
@@ -20,7 +20,9 @@ Project-specific UI/UX and visual design rules belong in a separate project-loca
|
|
|
20
20
|
1. 先读取 `project_context/global.md` 和 `project_context/context.toml`,按 default area、triggers、read_when 选择相关 context。
|
|
21
21
|
2. 如果项目存在 `DESIGN.md`,先读取它;如果用户要求视觉体系、设计稿或界面风格,按 Google `@google/design.md` 的 DESIGN.md 格式创建或更新根目录 `DESIGN.md`。
|
|
22
22
|
3. 整理或生成:用户流程、页面/组件清单、关键状态、交互反馈、响应式边界、a11y 要求、视觉约束和设计 token。
|
|
23
|
-
4. 涉及 Web
|
|
23
|
+
4. 涉及 Product Surface(Web 页面、移动/桌面屏幕、游戏 UI/HUD/菜单、CLI/TUI 输出、扩展或设备界面)、前端布局、UI/UX、产品模块边界或信息放置时,把产品/页面定位检查作为前置动作:用户在这个 surface 要完成的判断、产品必须提供的信息/动作/反馈、不应常驻的信息、主层/下钻/运维/诊断/详情归属、布局和信息密度是否匹配任务。多 surface、多平台或多模块归属不清时,先读取相关 Context、搜索入口并结合已有 UI 代码/截图做信息架构 sweep,必要时使用 `context_surface_contract` 做 Surface Contract Check,再收窄到具体视觉或交互实现。该检查是下一步变更分类的输入;只有形成长期 surface 职责、信息架构、交互契约或模块边界结论时才更新 Context 或 `DESIGN.md`。
|
|
24
|
+
- 若存在 Product Surface Contract,读取并对齐 primary user question、main allows/forbids、drilldown ownership、long-task state 和 verification。
|
|
25
|
+
- 若缺失且本任务改变 durable surface responsibility,输出 `Surface Contract Delta: required`,把界面职责写入 `project_context/**`;视觉 token、颜色、字体、间距、圆角和视觉 rationale 仍写入 `DESIGN.md`。
|
|
24
26
|
5. 涉及输入、选择、搜索、筛选、表单/配置、调度/时间窗口、预算/配额/限流或加载/空态/错误态等 UI 控件时,用“控件交互框架”检查控件语义、反馈状态、校验、错误预防、可供性和信息密度;这只是通用判断框架,不是固定控件处方。
|
|
25
27
|
6. 界面职责、流程归属和长期交互契约以 `project_context/**` 为准;`DESIGN.md` 负责视觉 token 和视觉 rationale;代码、截图和搜索结果只说明当前实现状态。Context 决定“应该是什么”,代码和截图揭示“现在是什么”,代码不能静默重定义 Context。
|
|
26
28
|
7. 设计判断或第一处实现编辑前,若任务涉及页面职责、流程边界、信息架构、交互契约、状态或调度语义、可访问性约束、设计验证关键路径或部署关键路径,先编译当前任务契约;契约第一段用 `Context Delta: none|required` 完成唯一正式长期事实判断,再写本次 `Task Contract`。
|
|
@@ -44,7 +46,8 @@ Project-specific UI/UX and visual design rules belong in a separate project-loca
|
|
|
44
46
|
- `Context Delta` 必须先出现,取值为 `none` 或 `required`:
|
|
45
47
|
- `none`:本次只是按既有 Context / `DESIGN.md` / 设计原则落地,不新增长期事实。
|
|
46
48
|
- `required`:说明长期事实类型、应写入的 Context / role 或 `DESIGN.md` 位置、需要沉淀的事实,以及明确不写入 Context 的一次性内容。
|
|
47
|
-
- `Task Contract` 用短列表说明页面 / 组件任务、用户判断、主信息和辅助信息归属、动作层级、输入语义、loading / empty / no results / stale / error / degraded / success 状态、布局稳定性、非目标和验收入口。
|
|
49
|
+
- `Task Contract` 用短列表说明页面 / 组件任务、用户判断、主信息和辅助信息归属、动作层级、输入语义、loading / empty / no results / stale / error / degraded / success 状态、布局稳定性、非目标和验收入口。
|
|
50
|
+
- 触及 Product Surface 时,`Task Contract` 同时说明 surface platform、primary user question、main allows/forbids、drilldown ownership、long-task state requirement 和 verification;代码字段、枚举、JSON 或截图只是实现证据,不是产品职责来源。
|
|
48
51
|
- 对长任务、多页面/组件、多 agent、容易发生 `Context Delta` 调头或多轮截图 / 手动验证的任务,可以用 `plan.md` 或等价临时计划面暂存 `Context Delta`、`Task Contract`、`Implementation Steps` 和 `Contract Conformance`;它只是临时执行缓存。
|
|
49
52
|
- `plan.md` 中出现的长期界面、交互或视觉事实必须提炼回 `project_context/**` 或 `DESIGN.md`;否则不要把临时计划当作事实源、交付产物或后续引用依据。
|
|
50
53
|
- `Context Delta: required` 时先更新 `project_context/**` 或 `DESIGN.md`,再继续实现;`none` 时直接按 Task Contract 实现。
|