project-tiny-context-harness 0.8.4 → 0.8.5

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.
Files changed (252) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +393 -371
  3. package/assets/README.md +573 -526
  4. package/assets/README.zh-CN.md +333 -311
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +44 -25
  7. package/assets/context_templates/architecture.md +28 -28
  8. package/assets/context_templates/area.md +34 -34
  9. package/assets/context_templates/context.toml +30 -30
  10. package/assets/context_templates/deployment.md +35 -35
  11. package/assets/context_templates/global.md +57 -57
  12. package/assets/context_templates/product-surface-contract.md +70 -70
  13. package/assets/context_templates/screen-contract.md +189 -189
  14. package/assets/context_templates/verification.md +32 -32
  15. package/assets/github/.gitkeep +1 -1
  16. package/assets/github/harness.yml +39 -39
  17. package/assets/make/.gitkeep +1 -1
  18. package/assets/make/ty-context.mk +48 -48
  19. package/assets/skills/context_development_engineer/SKILL.md +148 -125
  20. package/assets/skills/context_full_project_export/SKILL.md +28 -28
  21. package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
  22. package/assets/skills/context_product_plan/SKILL.md +99 -79
  23. package/assets/skills/context_surface_contract/SKILL.md +191 -191
  24. package/assets/skills/context_uiux_design/SKILL.md +171 -171
  25. package/assets/skills/design-resource-authoring/SKILL.md +86 -84
  26. package/assets/skills/design-resource-authoring/references/downstream-handoff.md +138 -123
  27. package/assets/skills/design-resource-authoring/references/open-design-provider.md +132 -127
  28. package/assets/skills/design-resource-authoring/references/resource-selection.md +181 -154
  29. package/assets/skills/design-system-authoring/SKILL.md +57 -57
  30. package/assets/skills/design-system-authoring/agents/openai.yaml +6 -6
  31. package/assets/skills/design-system-authoring/references/authority-adoption.md +48 -48
  32. package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -110
  33. package/assets/skills/long-task-workflow/SKILL.md +98 -92
  34. package/assets/skills/long-task-workflow/agents/openai.yaml +3 -1
  35. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +72 -72
  36. package/assets/skills/long-task-workflow/references/contract-authoring.md +122 -101
  37. package/assets/skills/long-task-workflow/references/evidence-design.md +82 -61
  38. package/assets/skills/long-task-workflow/references/source-authoring.md +109 -90
  39. package/assets/skills/source-plan-authoring/SKILL.md +14 -14
  40. package/assets/tools/validate_context.py +442 -442
  41. package/dist/commands/long-task-authoring.js +27 -2
  42. package/dist/lib/context-templates.js +1 -1
  43. package/dist/lib/design-resource-fact-enums.d.ts +20 -0
  44. package/dist/lib/design-resource-fact-enums.js +170 -0
  45. package/dist/lib/design-resource-fact-locator-extractors.d.ts +8 -0
  46. package/dist/lib/design-resource-fact-locator-extractors.js +108 -0
  47. package/dist/lib/design-resource-fact-locator-resolver.d.ts +3 -0
  48. package/dist/lib/design-resource-fact-locator-resolver.js +112 -0
  49. package/dist/lib/design-resource-fact-locator-validation.d.ts +5 -0
  50. package/dist/lib/design-resource-fact-locator-validation.js +16 -0
  51. package/dist/lib/design-resource-fact-manifest-catalog.d.ts +4 -0
  52. package/dist/lib/design-resource-fact-manifest-catalog.js +249 -0
  53. package/dist/lib/design-resource-fact-manifest-model.d.ts +91 -0
  54. package/dist/lib/design-resource-fact-manifest-model.js +21 -0
  55. package/dist/lib/design-resource-fact-manifest-shape-axes.d.ts +6 -0
  56. package/dist/lib/design-resource-fact-manifest-shape-axes.js +159 -0
  57. package/dist/lib/design-resource-fact-manifest-shape-evidence.d.ts +4 -0
  58. package/dist/lib/design-resource-fact-manifest-shape-evidence.js +59 -0
  59. package/dist/lib/design-resource-fact-manifest-shape-facts.d.ts +4 -0
  60. package/dist/lib/design-resource-fact-manifest-shape-facts.js +109 -0
  61. package/dist/lib/design-resource-fact-manifest-shape-inspector.d.ts +5 -0
  62. package/dist/lib/design-resource-fact-manifest-shape-inspector.js +144 -0
  63. package/dist/lib/design-resource-fact-manifest-shape.d.ts +7 -0
  64. package/dist/lib/design-resource-fact-manifest-shape.js +75 -0
  65. package/dist/lib/design-resource-fact-manifest-types.d.ts +3 -0
  66. package/dist/lib/design-resource-fact-manifest-types.js +3 -0
  67. package/dist/lib/design-resource-fact-manifest-universe.d.ts +5 -0
  68. package/dist/lib/design-resource-fact-manifest-universe.js +50 -0
  69. package/dist/lib/design-resource-fact-manifest-validation.d.ts +3 -0
  70. package/dist/lib/design-resource-fact-manifest-validation.js +106 -0
  71. package/dist/lib/design-resource-fact-policy.d.ts +18 -0
  72. package/dist/lib/design-resource-fact-policy.js +72 -1
  73. package/dist/lib/design-resource-fact-property-methods.d.ts +3 -0
  74. package/dist/lib/design-resource-fact-property-methods.js +158 -0
  75. package/dist/lib/design-resource-fact-shape-primitives.d.ts +3 -0
  76. package/dist/lib/design-resource-fact-shape-primitives.js +18 -0
  77. package/dist/lib/design-resource-fact-types.d.ts +164 -0
  78. package/dist/lib/design-resource-fact-types.js +1 -0
  79. package/dist/lib/design-resource-fact-universe-assets.d.ts +4 -0
  80. package/dist/lib/design-resource-fact-universe-assets.js +71 -0
  81. package/dist/lib/design-resource-fact-universe-catalog.d.ts +4 -0
  82. package/dist/lib/design-resource-fact-universe-catalog.js +151 -0
  83. package/dist/lib/design-resource-fact-universe-conditions.d.ts +2 -0
  84. package/dist/lib/design-resource-fact-universe-conditions.js +92 -0
  85. package/dist/lib/design-resource-fact-universe-facts.d.ts +4 -0
  86. package/dist/lib/design-resource-fact-universe-facts.js +108 -0
  87. package/dist/lib/design-resource-fact-universe-helpers.d.ts +30 -0
  88. package/dist/lib/design-resource-fact-universe-helpers.js +167 -0
  89. package/dist/lib/design-resource-fact-universe-inspector.d.ts +7 -0
  90. package/dist/lib/design-resource-fact-universe-inspector.js +119 -0
  91. package/dist/lib/design-resource-fact-universe-proof.d.ts +4 -0
  92. package/dist/lib/design-resource-fact-universe-proof.js +113 -0
  93. package/dist/lib/design-resource-fact-universe-subjects.d.ts +5 -0
  94. package/dist/lib/design-resource-fact-universe-subjects.js +97 -0
  95. package/dist/lib/design-resource-fact-universe-variations.d.ts +2 -0
  96. package/dist/lib/design-resource-fact-universe-variations.js +75 -0
  97. package/dist/lib/design-resource-fact-value-validation.d.ts +2 -0
  98. package/dist/lib/design-resource-fact-value-validation.js +80 -0
  99. package/dist/lib/design-resource-handoff-file-primitives.js +2 -0
  100. package/dist/lib/design-resource-handoff-file-validation.js +13 -100
  101. package/dist/lib/design-resource-handoff-policy.d.ts +1 -0
  102. package/dist/lib/design-resource-handoff-policy.js +118 -11
  103. package/dist/lib/design-resource-handoff-shape-evidence.js +46 -3
  104. package/dist/lib/design-resource-handoff-shape-primitives.d.ts +5 -0
  105. package/dist/lib/design-resource-handoff-shape-primitives.js +28 -0
  106. package/dist/lib/design-resource-handoff-shape-structure.js +143 -22
  107. package/dist/lib/design-resource-handoff-shape.js +25 -0
  108. package/dist/lib/design-resource-handoff-types.d.ts +97 -21
  109. package/dist/lib/design-resource-handoff-types.js +22 -0
  110. package/dist/lib/design-resource-handoff-validation-coverage.d.ts +1 -1
  111. package/dist/lib/design-resource-handoff-validation-coverage.js +145 -118
  112. package/dist/lib/design-resource-handoff-validation-fact-cells.d.ts +2 -0
  113. package/dist/lib/design-resource-handoff-validation-fact-cells.js +60 -0
  114. package/dist/lib/design-resource-handoff-validation-fact-records.d.ts +2 -0
  115. package/dist/lib/design-resource-handoff-validation-fact-records.js +90 -0
  116. package/dist/lib/design-resource-handoff-validation-facts.js +10 -94
  117. package/dist/lib/design-resource-handoff-validation-proofs.d.ts +2 -0
  118. package/dist/lib/design-resource-handoff-validation-proofs.js +67 -0
  119. package/dist/lib/design-resource-handoff-validation-resource-closure.d.ts +3 -0
  120. package/dist/lib/design-resource-handoff-validation-resource-closure.js +88 -0
  121. package/dist/lib/design-resource-handoff-validation-structure.js +43 -14
  122. package/dist/lib/design-resource-handoff-validation.js +32 -0
  123. package/dist/lib/design-resource-handoff-web-dependency-validation.d.ts +2 -1
  124. package/dist/lib/design-resource-handoff-web-dependency-validation.js +67 -7
  125. package/dist/lib/execution-target-capabilities.d.ts +1 -1
  126. package/dist/lib/execution-target-capabilities.js +14 -0
  127. package/dist/lib/long-task-activation-validation.js +6 -2
  128. package/dist/lib/long-task-applicability-shape.js +3 -3
  129. package/dist/lib/long-task-authoring-authority-preview.js +1 -0
  130. package/dist/lib/long-task-authority-policy.d.ts +1 -0
  131. package/dist/lib/long-task-authority-policy.js +1 -0
  132. package/dist/lib/long-task-authority.js +13 -0
  133. package/dist/lib/long-task-claim-definitions.js +13 -1
  134. package/dist/lib/long-task-claims.js +23 -1
  135. package/dist/lib/long-task-contract-types.d.ts +3 -0
  136. package/dist/lib/long-task-delivery-compiler.js +1 -0
  137. package/dist/lib/long-task-delivery-parser.js +11 -1
  138. package/dist/lib/long-task-delivery-types.d.ts +1 -0
  139. package/dist/lib/long-task-delivery-types.js +1 -0
  140. package/dist/lib/long-task-delivery-validation.js +17 -0
  141. package/dist/lib/long-task-design-resource-handoff.js +62 -38
  142. package/dist/lib/long-task-design-target-capabilities.d.ts +14 -0
  143. package/dist/lib/long-task-design-target-capabilities.js +126 -0
  144. package/dist/lib/long-task-evidence-capability-codec.d.ts +94 -0
  145. package/dist/lib/long-task-evidence-capability-codec.js +395 -22
  146. package/dist/lib/long-task-evidence-capability-policy.js +18 -0
  147. package/dist/lib/long-task-evidence-capability-runtime.js +78 -0
  148. package/dist/lib/long-task-evidence-capability-types.d.ts +114 -1
  149. package/dist/lib/long-task-outcome-parser.js +4 -0
  150. package/dist/lib/long-task-playwright-capability-records.d.ts +5 -0
  151. package/dist/lib/long-task-playwright-capability-records.js +146 -0
  152. package/dist/lib/long-task-playwright-case-evidence.d.ts +3 -2
  153. package/dist/lib/long-task-playwright-case-evidence.js +10 -79
  154. package/dist/lib/long-task-playwright-case-primitives.d.ts +28 -0
  155. package/dist/lib/long-task-playwright-case-primitives.js +143 -0
  156. package/dist/lib/long-task-playwright-evidence.d.ts +1 -1
  157. package/dist/lib/long-task-playwright-evidence.js +10 -75
  158. package/dist/lib/long-task-runner-freeze.d.ts +2 -2
  159. package/dist/lib/long-task-runner-freeze.js +15 -1
  160. package/dist/lib/long-task-runtime-types.d.ts +4 -1
  161. package/dist/lib/long-task-semantic-contract-types.d.ts +1 -1
  162. package/dist/lib/long-task-semantic-drift-migration.js +2 -2
  163. package/dist/lib/long-task-semantic-fact-binding-types.d.ts +57 -0
  164. package/dist/lib/long-task-semantic-fact-binding-types.js +1 -0
  165. package/dist/lib/long-task-semantic-fact-closure-primitives.d.ts +5 -0
  166. package/dist/lib/long-task-semantic-fact-closure-primitives.js +43 -0
  167. package/dist/lib/long-task-semantic-fact-closure.d.ts +13 -0
  168. package/dist/lib/long-task-semantic-fact-closure.js +48 -0
  169. package/dist/lib/long-task-semantic-fact-contract-closure.d.ts +4 -0
  170. package/dist/lib/long-task-semantic-fact-contract-closure.js +24 -0
  171. package/dist/lib/long-task-semantic-fact-contract-facts.d.ts +4 -0
  172. package/dist/lib/long-task-semantic-fact-contract-facts.js +30 -0
  173. package/dist/lib/long-task-semantic-fact-contract-proofs.d.ts +4 -0
  174. package/dist/lib/long-task-semantic-fact-contract-proofs.js +97 -0
  175. package/dist/lib/long-task-semantic-fact-evidence.d.ts +21 -0
  176. package/dist/lib/long-task-semantic-fact-evidence.js +165 -0
  177. package/dist/lib/long-task-semantic-fact-input-closure.d.ts +4 -0
  178. package/dist/lib/long-task-semantic-fact-input-closure.js +101 -0
  179. package/dist/lib/long-task-semantic-fact-provenance-closure.d.ts +4 -0
  180. package/dist/lib/long-task-semantic-fact-provenance-closure.js +140 -0
  181. package/dist/lib/long-task-semantic-fact-shape.d.ts +3 -0
  182. package/dist/lib/long-task-semantic-fact-shape.js +89 -0
  183. package/dist/lib/long-task-semantic-fact-value-closure.d.ts +3 -0
  184. package/dist/lib/long-task-semantic-fact-value-closure.js +110 -0
  185. package/dist/lib/long-task-shape-primitives.d.ts +2 -1
  186. package/dist/lib/long-task-shape-primitives.js +7 -0
  187. package/dist/lib/long-task-source-item-parser.js +25 -6
  188. package/dist/lib/long-task-source-target-continuity.js +4 -1
  189. package/dist/lib/long-task-source-target-index.d.ts +1 -1
  190. package/dist/lib/long-task-source-target-index.js +5 -1
  191. package/dist/lib/long-task-ui-design-policy.js +8 -4
  192. package/dist/lib/long-task-ui-surface-shape.js +83 -1
  193. package/dist/lib/long-task-ui-surface-types.d.ts +29 -0
  194. package/dist/lib/modularity.js +7 -1
  195. package/dist/lib/semantic-fact-base-types.d.ts +14 -0
  196. package/dist/lib/semantic-fact-base-types.js +1 -0
  197. package/dist/lib/semantic-fact-catalog.d.ts +8 -0
  198. package/dist/lib/semantic-fact-catalog.js +191 -0
  199. package/dist/lib/semantic-fact-condition-shape.d.ts +48 -0
  200. package/dist/lib/semantic-fact-condition-shape.js +111 -0
  201. package/dist/lib/semantic-fact-input-shape.d.ts +34 -0
  202. package/dist/lib/semantic-fact-input-shape.js +111 -0
  203. package/dist/lib/semantic-fact-inventory-types.d.ts +147 -0
  204. package/dist/lib/semantic-fact-inventory-types.js +1 -0
  205. package/dist/lib/semantic-fact-manifest-shape.d.ts +4 -0
  206. package/dist/lib/semantic-fact-manifest-shape.js +135 -0
  207. package/dist/lib/semantic-fact-manifest-types.d.ts +58 -0
  208. package/dist/lib/semantic-fact-manifest-types.js +19 -0
  209. package/dist/lib/semantic-fact-policy-authority.d.ts +8 -0
  210. package/dist/lib/semantic-fact-policy-authority.js +79 -0
  211. package/dist/lib/semantic-fact-policy-census.d.ts +2 -0
  212. package/dist/lib/semantic-fact-policy-census.js +80 -0
  213. package/dist/lib/semantic-fact-policy-condition-references.d.ts +7 -0
  214. package/dist/lib/semantic-fact-policy-condition-references.js +19 -0
  215. package/dist/lib/semantic-fact-policy-conditions.d.ts +2 -0
  216. package/dist/lib/semantic-fact-policy-conditions.js +105 -0
  217. package/dist/lib/semantic-fact-policy-facts.d.ts +3 -0
  218. package/dist/lib/semantic-fact-policy-facts.js +73 -0
  219. package/dist/lib/semantic-fact-policy-primitives.d.ts +26 -0
  220. package/dist/lib/semantic-fact-policy-primitives.js +169 -0
  221. package/dist/lib/semantic-fact-policy-proofs.d.ts +2 -0
  222. package/dist/lib/semantic-fact-policy-proofs.js +75 -0
  223. package/dist/lib/semantic-fact-policy-properties.d.ts +3 -0
  224. package/dist/lib/semantic-fact-policy-properties.js +84 -0
  225. package/dist/lib/semantic-fact-policy-units.d.ts +4 -0
  226. package/dist/lib/semantic-fact-policy-units.js +103 -0
  227. package/dist/lib/semantic-fact-policy.d.ts +17 -0
  228. package/dist/lib/semantic-fact-policy.js +41 -0
  229. package/dist/lib/semantic-fact-proof-shape.d.ts +51 -0
  230. package/dist/lib/semantic-fact-proof-shape.js +121 -0
  231. package/dist/lib/semantic-fact-proof-types.d.ts +74 -0
  232. package/dist/lib/semantic-fact-proof-types.js +1 -0
  233. package/dist/lib/semantic-fact-property-shape.d.ts +29 -0
  234. package/dist/lib/semantic-fact-property-shape.js +77 -0
  235. package/dist/lib/semantic-fact-shape-constants.d.ts +3 -0
  236. package/dist/lib/semantic-fact-shape-constants.js +38 -0
  237. package/dist/lib/semantic-fact-shape-primitives.d.ts +15 -0
  238. package/dist/lib/semantic-fact-shape-primitives.js +68 -0
  239. package/dist/lib/semantic-fact-source-parser.d.ts +9 -0
  240. package/dist/lib/semantic-fact-source-parser.js +46 -0
  241. package/dist/lib/semantic-fact-support-shape.d.ts +21 -0
  242. package/dist/lib/semantic-fact-support-shape.js +59 -0
  243. package/dist/lib/semantic-fact-types.d.ts +5 -0
  244. package/dist/lib/semantic-fact-types.js +5 -0
  245. package/dist/lib/semantic-fact-unit-shape.d.ts +34 -0
  246. package/dist/lib/semantic-fact-unit-shape.js +89 -0
  247. package/dist/lib/semantic-fact-value-shape.d.ts +12 -0
  248. package/dist/lib/semantic-fact-value-shape.js +39 -0
  249. package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +1339 -131
  250. package/migrations/README.md +15 -15
  251. package/package.json +84 -84
  252. package/source-mappings.yaml +25 -25
@@ -1,41 +1,41 @@
1
- # ty-context:github-workflow:begin
2
- name: Harness Gates
3
-
4
- on:
5
- pull_request:
6
- push:
7
- branches:
8
- - main
9
- workflow_dispatch:
10
- inputs:
11
- gate:
12
- description: "Make target to run"
13
- required: true
14
- default: "validate-context"
15
- type: choice
16
- options:
17
- - validate-context
18
- - validate-code-modularity
19
- - validate-harness
20
-
21
- jobs:
22
- harness:
23
- runs-on: ubuntu-latest
24
- steps:
1
+ # ty-context:github-workflow:begin
2
+ name: Harness Gates
3
+
4
+ on:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+ workflow_dispatch:
10
+ inputs:
11
+ gate:
12
+ description: "Make target to run"
13
+ required: true
14
+ default: "validate-context"
15
+ type: choice
16
+ options:
17
+ - validate-context
18
+ - validate-code-modularity
19
+ - validate-harness
20
+
21
+ jobs:
22
+ harness:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
25
  - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
26
- with:
27
- fetch-depth: 0
26
+ with:
27
+ fetch-depth: 0
28
28
  - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
29
- with:
30
- node-version: "24"
31
- - name: Prepare source workspace CLI
32
- if: ${{ hashFiles('packages/ty-context/package.json') != '' }}
33
- run: |
34
- npm ci
35
- npm run build --workspace project-tiny-context-harness
36
- - name: Run harness gate
37
- run: make "${HARNESS_GATE}"
38
- env:
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
29
+ with:
30
+ node-version: "24"
31
+ - name: Prepare source workspace CLI
32
+ if: ${{ hashFiles('packages/ty-context/package.json') != '' }}
33
+ run: |
34
+ npm ci
35
+ npm run build --workspace project-tiny-context-harness
36
+ - name: Run harness gate
37
+ run: make "${HARNESS_GATE}"
38
+ env:
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
@@ -1 +1 @@
1
-
1
+
@@ -1,48 +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; does not run migrations"
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."
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; does not run migrations"
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."
@@ -1,137 +1,160 @@
1
- ---
2
- name: context_development_engineer
3
- description: Use when the user explicitly asks for 开发工程师, 软件工程师, 研发工程师, 开发专家, 工程专家, 技术专家, 开发方案, 研发方案, 工程方案, 技术方案, 实现, 实现方案, 实施计划, 多开agent, subagent, software engineer, senior engineer, engineering expert, development plan, engineering plan, or technical implementation plan in a Minimal Context Harness project. Do not trigger for routine coding, bug fixes, small refactors, package/release work, or generic mentions of code, development, or engineering.
4
- ---
5
-
6
- # Context Development Engineer
7
-
8
- ## Package-Managed Boundary
9
-
10
- This generated Skill provides portable engineering judgment. Project-specific rules belong in `<harnessRoot>/skills/development_engineer/SKILL.md`; the repo-local Skill is more specific while durable conclusions still belong in `project_context/**`.
11
-
12
- When an active `/long-task-workflow` binding exists, that Skill owns lifecycle, the selected verification workspace, Goal-owned implementation/delegation boundary and Final Gate. This Skill contributes architecture and implementation judgment only; it must not create a second plan, delegation scheduler/state or acceptance path.
13
-
14
- ## 目标
15
-
16
- 以开发工程师 / 技术专家视角完成实现判断,保护可维护架构,并把真正长期的工程事实压缩进可恢复的 Minimal Context,而不是增加流程文档。
17
-
18
- ## 默认工作方式
19
-
20
- 1. 读取 `project_context/global.md`、`project_context/architecture.md`、`project_context/context.toml`、default area root,并按 triggers/read policy 收集相关 on-demand Context 候选。
21
- 2. 在判断 `Context Delta` 前,用任务中明确的 area/module/API/Schema/state/security/verification/deployment 等少量高信号词,对 `project_context/**` 做一次 bounded text search;把命中的 Context 与 manifest 候选合并,只读取真正相关文件。搜索只补充语义判断,不创建索引、缓存或第二权威。
22
- 3. 确认目标、约束、成功标准、影响域、验证/部署路径和风险。能从代码或 Context 得到的事实不要重复询问。
23
- 4. Context 决定“应该是什么”;代码说明“现在是什么”;测试和运行证据证明行为。冲突是实现漂移、缺失工作或 stale Context,不能由代码静默重定义归属。
24
- 5. 第一处实现编辑前,完成并对用户可见地给出一次简洁、仓库事实绑定的 `Architecture Deliberation`。不输出私有思维链;输出结论及其 Context、模块/路径、symbol/extension point 和验证依据。风险只改变深度,不取消这个环节。
25
- 6. 根据架构考量决定唯一 `Context Delta: none|required`。影响 durable architecture boundary、module ownership、API / Schema / data contract、state / runtime semantics、dependency direction、verification / deployment semantics 或 durable rationale / tradeoff 时为 `required`,先更新 owning Context。不要创建 `plan.md`、Task Contract 文件或 Markdown 映射表。
26
- 7. 用 Agent 内部计划保持 goal、non-goals、owner、boundaries、implementation surfaces、risk 和 verification 清晰。默认流程不要求或验证固定 `plan.md`、matrix、verdict 或 evidence ledger。
27
- 8. 实现后先运行 project-owned verification,再在 `Contract Conformance` 中对当前候选快照执行 `Architecture Conformance`,随后单独做 Context drift check;报告实现、验证、架构符合性、Context 状态和 blockers。
28
-
29
- ## 必经 Architecture Deliberation
30
-
31
- 每个实现需求都执行一次。small code task 可以得到“保持现有架构”的浅层结论,但必须具体指出当前 owner / extension point、未改变的 durable boundary、验证入口,以及为何没有引入或加重技术债,不能用“无需架构考虑”跳过。
32
-
33
- 出现下列任一情况时提高到完整深度:
34
-
35
- - 新长期模块/能力/公共抽象;
36
- - 公共 API、Schema、data contract、持久化或迁移;
37
- - source of truth、state ownership、runtime lifecycle 或 recovery 改变;
38
- - 跨 area/domain 修改或新的 dependency direction;
39
- - security/permission、兼容性、降级、重试、并发或不可逆边界;
40
- - 一个变化异常扩散到多个不相关模块,或现有扩展点无法承载。
41
-
42
- 对用户可见的简洁结论覆盖适用项:
43
-
44
- - `Architecture Context Hit`:哪个现有 Context 控制本次架构判断;
45
- - `Decision Rationale Hit: existing|required|none`:是否存在会改变未来选择的稳定原因;
46
- - owner 和唯一 source of truth;
47
- - 正确 dependency direction 与禁止 bypass;
48
- - interface、input/output、state、persistence 和 lifecycle;
49
- - failure/retry/timeout/degraded/recovery、compatibility/migration;
50
- - 选择的设计与重要备选方案、拒绝原因;
51
- - 至少一个合理的相邻未来变化会落到哪个 extension point,且不会形成第二 source of truth 或反向依赖;
52
- - 触达的技术债:本次消除、保持隔离且不加重,或因缺少有 owner/reason/tracking/removal condition 的 bounded exception 而阻塞;
53
- - 应复用的 extension point,或新抽象为何确有净收益;
54
- - 哪个 project-owned lint/AST/dependency/contract test 能证明边界。
55
-
56
- 范围、owner、controlling Context、dependency direction 或选定设计发生实质变化时,原考量失效,继续实现前先更新。持久结论进入最小 owning Context;实现细节留在代码。不要把“代码更优雅”当作架构要求,也不要让 Harness 变成跨语言通用 dependency analyzer。
57
-
58
- ## Architecture Conformance
59
-
60
- 默认流程在项目验证之后,把架构符合性作为 `Contract Conformance` 的必检子项,只针对当前候选快照检查:
61
-
62
- - 实际改动是否逃逸预期 capability/path;
63
- - owner、dependency direction、service/facade/adapter 和唯一 source of truth 是否被绕过或复制;
64
- - API/Schema/data/state/persistence/lifecycle/recovery 是否出现未声明变化;
65
- - 是否命中 forbidden shortcut,是否运行了声明的 project-owned architecture/modularity checks;
66
- - 是否新增或加重重复、职责膨胀、脆弱耦合或无依据抽象等技术债。
67
-
68
- 发现问题就返回实现并重跑受影响验证;候选代码或配置再变化,先前 closure 失效。新增或加重技术债默认阻塞交付,除非项目已有显式、收窄、带 owner/reason/tracking/removal condition 的例外。无关 legacy debt 不自动扩张任务范围,但本次触达、依赖或加重的债不能隐藏。
69
-
70
- active Long-Task 下不再执行这个默认 closure;同一架构义务由 Contract 中现有 obligations/constraints/forbidden shortcuts、owners/paths/Bindings 和 executable Checks 表达,并只由 Final Gate 对最终快照收口。
71
-
72
- ## Capability-First Delivery Boundary
73
-
74
- 对外部来源中的产品/架构/实现/验收约束做内部分类:Context 已覆盖、需要更新、task-local、显式 out-of-scope 或需要真实用户决策。对 delivery / acceptance scope 使用 capability-first delivery boundary,区分:
75
-
76
- - `system_capability_build`:形成可复用系统能力;
77
- - `representative_sample_validation`:仅验证代表性样本;
78
- - `full_population_operation`:权威范围内全量对象完成;
79
- - `full_population_not_required`:AC 明确不要求全量。
80
-
1
+ ---
2
+ name: context_development_engineer
3
+ description: Use when the user explicitly asks for 开发工程师, 软件工程师, 研发工程师, 开发专家, 工程专家, 技术专家, 开发方案, 研发方案, 工程方案, 技术方案, 实现, 实现方案, 实施计划, 多开agent, subagent, software engineer, senior engineer, engineering expert, development plan, engineering plan, or technical implementation plan in a Minimal Context Harness project. Do not trigger for routine coding, bug fixes, small refactors, package/release work, or generic mentions of code, development, or engineering.
4
+ ---
5
+
6
+ # Context Development Engineer
7
+
8
+ ## Package-Managed Boundary
9
+
10
+ This generated Skill provides portable engineering judgment. Project-specific rules belong in `<harnessRoot>/skills/development_engineer/SKILL.md`; the repo-local Skill is more specific while durable conclusions still belong in `project_context/**`.
11
+
12
+ When an active `long-task-workflow` binding exists, that Skill owns lifecycle, the selected verification workspace, Goal-owned implementation/delegation boundary and Final Gate. This Skill contributes architecture and implementation judgment only; it must not create a second plan, delegation scheduler/state or acceptance path.
13
+
14
+ ## 目标
15
+
16
+ 以开发工程师 / 技术专家视角完成实现判断,保护可维护架构,并把真正长期的工程事实压缩进可恢复的 Minimal Context,而不是增加流程文档。
17
+
18
+ ## 默认工作方式
19
+
20
+ 1. 读取 `project_context/global.md`、`project_context/architecture.md`、`project_context/context.toml`、default area root,并按 triggers/read policy 收集相关 on-demand Context 候选。
21
+ 2. 在判断 `Context Delta` 前,用任务中明确的 area/module/API/Schema/state/security/verification/deployment 等少量高信号词,对 `project_context/**` 做一次 bounded text search;把命中的 Context 与 manifest 候选合并,只读取真正相关文件。搜索只补充语义判断,不创建索引、缓存或第二权威。
22
+ 3. 确认目标、约束、成功标准、影响域、验证/部署路径和风险。能从代码或 Context 得到的事实不要重复询问。
23
+ 4. Context 决定“应该是什么”;代码说明“现在是什么”;测试和运行证据证明行为。冲突是实现漂移、缺失工作或 stale Context,不能由代码静默重定义归属。
24
+ 5. 第一处实现编辑前,完成并对用户可见地给出一次简洁、仓库事实绑定的 `Architecture Deliberation`。不输出私有思维链;输出结论及其 Context、模块/路径、symbol/extension point 和验证依据。风险只改变深度,不取消这个环节。
25
+ 6. 根据架构考量决定唯一 `Context Delta: none|required`。影响 durable architecture boundary、module ownership、API / Schema / data contract、state / runtime semantics、dependency direction、verification / deployment semantics 或 durable rationale / tradeoff 时为 `required`,先更新 owning Context。不要创建 `plan.md`、Task Contract 文件或 Markdown 映射表。
26
+ 7. 用 Agent 内部计划保持 goal、non-goals、owner、boundaries、implementation surfaces、risk 和 verification 清晰。默认流程不要求或验证固定 `plan.md`、matrix、verdict 或 evidence ledger。
27
+ 8. 实现后先运行 project-owned verification,再在 `Contract Conformance` 中对当前候选快照执行 `Architecture Conformance`,随后单独做 Context drift check;报告实现、验证、架构符合性、Context 状态和 blockers。
28
+
29
+ ## 必经 Architecture Deliberation
30
+
31
+ 每个实现需求都执行一次。small code task 可以得到“保持现有架构”的浅层结论,但必须具体指出当前 owner / extension point、未改变的 durable boundary、验证入口,以及为何没有引入或加重技术债,不能用“无需架构考虑”跳过。
32
+
33
+ 出现下列任一情况时提高到完整深度:
34
+
35
+ - 新长期模块/能力/公共抽象;
36
+ - 公共 API、Schema、data contract、持久化或迁移;
37
+ - source of truth、state ownership、runtime lifecycle 或 recovery 改变;
38
+ - 跨 area/domain 修改或新的 dependency direction;
39
+ - security/permission、兼容性、降级、重试、并发或不可逆边界;
40
+ - 一个变化异常扩散到多个不相关模块,或现有扩展点无法承载。
41
+
42
+ 对用户可见的简洁结论覆盖适用项:
43
+
44
+ - `Architecture Context Hit`:哪个现有 Context 控制本次架构判断;
45
+ - `Decision Rationale Hit: existing|required|none`:是否存在会改变未来选择的稳定原因;
46
+ - owner 和唯一 source of truth;
47
+ - 正确 dependency direction 与禁止 bypass;
48
+ - interface、input/output、state、persistence 和 lifecycle;
49
+ - failure/retry/timeout/degraded/recovery、compatibility/migration;
50
+ - 选择的设计与重要备选方案、拒绝原因;
51
+ - 至少一个合理的相邻未来变化会落到哪个 extension point,且不会形成第二 source of truth 或反向依赖;
52
+ - 触达的技术债:本次消除、保持隔离且不加重,或因缺少有 owner/reason/tracking/removal condition 的 bounded exception 而阻塞;
53
+ - 应复用的 extension point,或新抽象为何确有净收益;
54
+ - 哪个 project-owned lint/AST/dependency/contract test 能证明边界。
55
+
56
+ 范围、owner、controlling Context、dependency direction 或选定设计发生实质变化时,原考量失效,继续实现前先更新。持久结论进入最小 owning Context;实现细节留在代码。不要把“代码更优雅”当作架构要求,也不要让 Harness 变成跨语言通用 dependency analyzer。
57
+
58
+ ## Architecture Conformance
59
+
60
+ 默认流程在项目验证之后,把架构符合性作为 `Contract Conformance` 的必检子项,只针对当前候选快照检查:
61
+
62
+ - 实际改动是否逃逸预期 capability/path;
63
+ - owner、dependency direction、service/facade/adapter 和唯一 source of truth 是否被绕过或复制;
64
+ - API/Schema/data/state/persistence/lifecycle/recovery 是否出现未声明变化;
65
+ - 是否命中 forbidden shortcut,是否运行了声明的 project-owned architecture/modularity checks;
66
+ - 是否新增或加重重复、职责膨胀、脆弱耦合或无依据抽象等技术债。
67
+
68
+ 发现问题就返回实现并重跑受影响验证;候选代码或配置再变化,先前 closure 失效。新增或加重技术债默认阻塞交付,除非项目已有显式、收窄、带 owner/reason/tracking/removal condition 的例外。无关 legacy debt 不自动扩张任务范围,但本次触达、依赖或加重的债不能隐藏。
69
+
70
+ active Long-Task 下不再执行这个默认 closure;同一架构义务由 Contract 中现有 obligations/constraints/forbidden shortcuts、owners/paths/Bindings 和 executable Checks 表达,并只由 Final Gate 对最终快照收口。
71
+
72
+ ## Capability-First Delivery Boundary
73
+
74
+ 对外部来源中的产品/架构/实现/验收约束做内部分类:Context 已覆盖、需要更新、task-local、显式 out-of-scope 或需要真实用户决策。对 delivery / acceptance scope 使用 capability-first delivery boundary,区分:
75
+
76
+ - `system_capability_build`:形成可复用系统能力;
77
+ - `representative_sample_validation`:仅验证代表性样本;
78
+ - `full_population_operation`:权威范围内全量对象完成;
79
+ - `full_population_not_required`:AC 明确不要求全量。
80
+
81
81
  sample provider / interface / page 证据不能替代 all-provider / all-interface / all-platform 或全量完成。来源要求全量而当前只能交付框架/样本时标记 `scope_conflict_requires_decision`;权威范围未收窄前不得声称完成。
82
82
 
83
- ## Product Surface
84
-
85
- 涉及 Web/移动/桌面/游戏 UI、CLI/TUI、表单、配置、输入、选择、搜索、筛选、调度、预算/配额/限流或状态反馈时:
86
-
87
- - 对照已有 Product Surface / Surface Contract、页面职责和控件任务,而不是只确认字段已暴露;
88
- - 对 material screen 同时读取 owning Screen/interaction Context(若存在),并用稳定 surface/control/target key 绑定真实 route/component、设计 target 和测试;产品方案只有粗粒度时,把缺失字段路由到 Context update、task-local Source 或 genuine decision,不能在代码里形成唯一隐藏事实源;
89
- - 内部保持 Surface Contract Hit、main allows/forbids、drilldown ownership、long-task state requirement、implementation drift 和 verification;
90
- - 缺失 durable surface responsibility 时设置 `Context Delta: required`,先用 `context_surface_contract` 或 owning Context 建立职责;
91
- - 收尾用简短 `Contract Conformance` 说明命中的 Context、实现满足方式、未满足项和验证入口。
92
-
93
- ## Visual Delivery Implementation / 视觉交付实现
83
+ ## Non-UI Semantic Implementation / 非 UI 语义实现
94
84
 
95
- For material production UI, first confirm Design Authority readiness; then carry declared Context, `DESIGN.md` and Source intent into the real implementation without creating another workflow:
85
+ 产品方案和技术方案都默认下钻到范围内最细、可独立判断的语义 Fact。该义务不只覆盖产品文字,也覆盖后端与架构实现:API/schema/data、状态机与时序、事务/一致性/并发/幂等、错误/降级/恢复、配置/兼容/迁移、性能/容量/可靠性、隐私/安全/审计、集成/部署/运维/可观测性、商业、硬件、AI/ML 及项目自定义域。Requirement、模块、接口名、宽泛状态列表和当前代码结构都不是粒度上限。
96
86
 
97
- - when a selected implementation handoff exists, run `ty-context design-resource preflight <handoff.md>` before fidelity implementation. Open the strict residual block and every indexed exact/constraint resource. Its default unit is every complete observable design fact exposed by the acquired resources and supported inspector/oracle capability, not merely one Product Control: preserve addressable images, text, icons, component parts, smaller primitives, exact layout/style/content/state/behavior facts and their declared conditions. Keep one exact task-local accounting of fact/Source/method/blocker/target/condition sets; route every applicable item to the production owner, cold-start journey and a project-owned check whose failure remains attributable. Exact targets require full-target layout and pixel proof per condition; partial input remains a constraint. Missing facts/resource closure/applicability cells, unsupported evidence, unresolvable typed locators, incomplete/truncated implementation source, unresolved rows or stale digests fail closed. Provider retrieval and preflight prove input completeness/integrity only, not the implementation;
98
- - treat an unconfigured starter, style-only guidance, inspiration-only references or conflicting targets as insufficient authority for invented production layout; route explicit design authoring through `context_uiux_design` or return for a genuine material decision;
99
- - classify referenced targets as `exact-target`, `constraint` or `inspiration`; for every affected selected exact target/constraint, traverse its stable key from owning Context through `DESIGN.md` and open the immutable adopted locator/digest before deciding or coding—a registry mention alone is not consumption. Bind fidelity claims only to the named conditions;
100
- - resolve the editable upstream owner/locator/update route before changing a design resource. Missing, unreadable, stale or conflicting adopted resources fail closed for the affected claim. If the immutable target is readable but upstream editing is unavailable, implementation may consume it but a resource change remains a named manual/external boundary. Never overwrite an adopted baseline; use a new immutable version and update the owning reference;
101
- - identify the production token source, its generation direction, the owning components/routes and any project-local UI/UX Skill before choosing implementation values;
102
- - reuse production components and real product routes for states/specimens instead of building a detached static imitation as the acceptance target;
103
- - trace each selected target and declared viewport/mode/state condition through a stable surface/control key to its production route/component owner, cold-start real-user entry journey and project-owned rendered/interactive Check;
104
- - 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;
105
- - implement the declared Visual Coverage Set across every applicable viewport, theme/mode, state, content-stress and accessibility/motion combination. Do not synthesize unrequested dimensions, but never prune a declared/applicable combination or replace its coverage with risk-only or pairwise sampling unless authoritative Source explicitly narrows the requirement or a project-owned proof establishes equivalence;
106
- - use the first useful runnable vertical slice as a recommended real-production-entry feedback point when its expected early-localization value exceeds the run cost; it is not an implementation gate. Always rerun the affected cold-start journey on the final candidate;
107
- - run project-owned rendered/component/browser verification and report only the combinations actually checked. Design file hashes, registry membership and counts prove resource integrity; static analysis, generated kits and screenshot artifacts are supporting review material rather than implementation-conformance proof.
108
- - 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.
109
- - 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.
87
+ 实现前,把所有 material Source/Context/attachment/spec/external/repository-preservation meaning 路由为:
110
88
 
111
- Without an active Long-Task, final-current-candidate Contract Conformance confirms every accounted fact/item is read, mapped, implemented, resolved, executed and passing. One project check may cover several methods only when each method and covered fact remains independently attributable on failure. A selected-target, fact inventory, implementation or declared check-input change stales closure. Any unread, unsupported, unresolved, unmapped, unimplemented, unexecuted, stale or indistinguishable applicable fact blocks a complete selected-design-conformance claim; report the checked scope and exact gaps. Do not persist the accounting as a matrix, Claim set, readiness state or Gate.
89
+ - 稳定 `subject | relation | population` 身份与 owner;
90
+ - 每个适用 actor/role/tenant/version/environment/state/input/boundary/locale/time/concurrency/dependency/failure/migration/rollout/threat/custom condition 的原子值与精确组合;
91
+ - 每个适用 atomic property 的 typed expected predicate、单位/边界/量词/空值与缺失语义、Source locator/digest 和 direct/derived/delegated/evidence-backed provenance;
92
+ - 每个 Fact 的全部 required proof methods、furthest independently failing boundary、comparator/parameters/tolerance/mask、Oracle、environment、observer 和 protected-value policy。
112
93
 
113
- If an active Long-Task applies, do not run the preceding default closure. Express material visual expectations through its existing Requirement, full Control projection, Product `surface_bindings`, Assertion, Check, Stage, Technical Binding and external-confirmation mechanisms. Include the validated residual handoff in real `task.source_paths` and every declared immutable resource in target verification inputs; make target keys/conditions/files equal the handoff. Map covered Source Items into the root conformance Assertion and one independent Assertion per declared verification method; every method × condition evidence cell and current typed record must carry the exact handoff `fact_refs`, whose union equals the complete target fact set. Bind each handoff blocker with the same Source Items and methods. Bind every Control to a required production target and root-entry journey; bind selected exact/constraint targets to typed `design_conformance` actual/comparison evidence. Final Gate is the sole Long-Task carrier. A blocker cannot be dismissed in-band, and scope removal requires revised Source/Contract authority. A design candidate or planned target cannot unlock fidelity implementation: selection must become real Context-reachable Source with one canonical adoption record and an adopted Authority Revision first. Do not introduce a second visual plan, value copy, acceptance document or lifecycle.
94
+ 标准 family/property/condition catalogue 是完整性下限;Source 或仓库结构暴露的领域概念必须作为 custom extension 进入集合。N/A/exclusion 必须列出准确对象、basis rationale;持续域用范围/分段/公式,动态 population 用确定的 universe/enumeration/partition/exclusion。禁止 `all-states`、逗号串、默认路径、代表/抽样/pairwise、实现自产 expected、一个 aggregate pass 或近端 proxy 冒充若干 Fact。
114
95
 
115
- ## Modularity Check
96
+ 默认 Workflow 只在任务内保持:
116
97
 
117
- 新实现、重构、重复逻辑、模块边界或影响面控制需要内部记录 `Modularity Check: none|required|exception`。
98
+ `Expected Semantic Facts = Source Indexed Facts = implementation/acceptance accounted Facts`
118
99
 
119
- - 可用 `ty-context check-modularity --file <path> --limit 300` 做计划编辑审计,用 `make validate-code-modularity` `ty-context check-modularity --touched --limit 300 --fail-on-warning` 做交付前硬审计;项目本地 Skill 的 limit 优先。
120
- - 同时检查物理行数、单函数语句数、分支复杂度、导出数、状态转换和职责;压成一行不能规避。
121
- - 风险点按 product surface、hook、model、adapter、component、service / facade 或 verification helper 等稳定边界判断,优先复用现有 extension point。
122
- - 只实施高收益、低风险、语义稳定的抽象;不为一次性代码、不稳定语义或视觉整洁做抽象。
123
- - `exception` 必须由 `<harnessRoot>/config.yaml` 中 lifecycle-complete waiver 授权,至少包含收窄的 `path`/`category`、`owner`、`introduced_at`、`reason`、`tracking_issue`、`expiry_condition`。交付说明不是机器豁免,已有债务不得继续接收新职责。
100
+ `Fact × required-method obligations = attributable current-candidate result rows`
124
101
 
125
- ## 自动化机会
102
+ Contract Conformance 对每个结果保留 actual observation/environment、冻结的 expected/comparison/tolerance/mask、Oracle 与 verdict,并从真实 production owner/target 到最远独立失败边界执行。任何未读、缺失、额外、重复、未决、不可用、未映射、未实现、未执行、过期、失败、proxy-only、复用或不可区分项阻止完整结论;protected observation 只持久化允许的 digest/redaction。这个 accounting 不落盘成 matrix/registry/Gate。
126
103
 
127
- 人工流程重复、确定、易漏步骤或顺序影响正确性时,评估 repo-local tool/script。脚本放在 owning module 的工具目录并有测试;可恢复入口、参数约束和适用边界写入 verification/deployment Context。不要把模块命令、provider idartifact 路径或一次性结果写进本 Skill。
104
+ 显式 Long-Task 不再运行上述默认 carrier;把同一全集写入 Source `semantic-fact-manifest-v1`,通过现有 semantic Fact Claims、单 Fact AssertionsChecks、typed `semantic_fact` results 和唯一 Final Gate 精确闭包。值留在 Source/Context,Contract 只保留身份和比较权威。真正缺失的产品、法律、安全、商业、外部权限或物理世界决策保持 `decision_required`/External Confirmation;不能因为实现困难而改成外部,也不能由工程师发明。
128
105
 
129
- ## Context 写入边界
130
-
131
- - area/domain/subdomain:产品或包责任;contract:API/schema/event/workflow/interface;foundation:稳定概念;verification/deployment:可重复路径;implementation-index:导航;decision-rationale:会影响未来选择的稳定原因。
132
- - 模块 Context 只保留 principles、design logic、rejected alternative/tradeoff 和长期约束;不编造 rationale,不复制实现摘要、命令输出、debug 过程、截图、日志、临时 JSON、raw payload、测试报告或 secrets。
133
- - `Context Delta: none|required` 是唯一长期事实结果;`Architecture Deliberation` 是可见但 task-local 的流程检查点,`Architecture Context Hit`、`Decision Rationale Hit` 与 `Modularity Check` 仍只是内部路由问题。
134
-
135
- ## 输出边界
136
-
137
- 不默认创建 `.work_products/**`、tech plan、ADR、implementation doc、review/test/release 文档或 lifecycle phases。`Architecture Deliberation` 与 `Architecture Conformance` 通过工作更新和交付状态可见,不生成新的持久产物。用户明确要求独立开发/技术方案时可以临时生成;稳定结论仍提炼回 `project_context/**`。
106
+ ## Product Surface
107
+
108
+ 涉及 Web/移动/桌面/游戏 UI、CLI/TUI、表单、配置、输入、选择、搜索、筛选、调度、预算/配额/限流或状态反馈时:
109
+
110
+ - 对照已有 Product Surface / Surface Contract、页面职责和控件任务,而不是只确认字段已暴露;
111
+ - 对 material screen 同时读取 owning Screen/interaction Context(若存在),并用稳定 surface/control/target key 绑定真实 route/component、设计 target 和测试;产品方案只有粗粒度时,把缺失字段路由到 Context update、task-local Source 或 genuine decision,不能在代码里形成唯一隐藏事实源;
112
+ - 内部保持 Surface Contract Hit、main allows/forbids、drilldown ownership、long-task state requirement、implementation drift 和 verification;
113
+ - 缺失 durable surface responsibility 时设置 `Context Delta: required`,先用 `context_surface_contract` 或 owning Context 建立职责;
114
+ - 收尾用简短 `Contract Conformance` 说明命中的 Context、实现满足方式、未满足项和验证入口。
115
+
116
+ ## Visual Delivery Implementation / 视觉交付实现
117
+
118
+ For material production UI, first confirm Design Authority readiness; then carry declared Context, `DESIGN.md` and Source intent into the real implementation without creating another workflow:
119
+
120
+ - when a selected implementation handoff exists, run `ty-context design-resource preflight <handoff.md>` before fidelity implementation. Open the strict residual block, canonical Fact manifest and every indexed exact/constraint resource. A formal Web/App target must prove `Expected Fact Universe = Canonical Resource Facts = Handoff Indexed Facts`; its default unit is one `subject × target × condition × variation × atomic property` Fact Cell, not a Product Control, page, broad dimension or screenshot. Preserve component instances/Anatomy Parts/relations, dynamic populations, all applicable condition/variation combinations, exact geometry/style/content/behavior values and design-system lineage, explicit N/A/exclusions, every property-required Fact × method obligation and asset binding. Keep one exact task-local accounting of Fact Cell/Fact/proof/Source/blocker/target/condition sets; route every applicable item to the production owner, cold-start journey and a project-owned check whose failure remains attributable per Fact. Exact targets require full-target layout and pixel proof per condition; partial input remains a constraint. Missing Census/Facts/proofs/resource closure, aggregate labels, sampling/truncation, unsupported evidence, unresolvable located digests, incomplete dependency acquisition, unresolved conflicts/blockers or stale identities fail closed. Provider retrieval and preflight prove input completeness/integrity relative to the named Inspector/Oracle TCB only, not the implementation;
121
+ - treat an unconfigured starter, style-only guidance, inspiration-only references or conflicting targets as insufficient authority for invented production layout; route explicit design authoring through `context_uiux_design` or return for a genuine material decision;
122
+ - classify referenced targets as `exact-target`, `constraint` or `inspiration`; for every affected selected exact target/constraint, traverse its stable key from owning Context through `DESIGN.md` and open the immutable adopted locator/digest before deciding or coding—a registry mention alone is not consumption. Bind fidelity claims only to the named conditions;
123
+ - resolve the editable upstream owner/locator/update route before changing a design resource. Missing, unreadable, stale or conflicting adopted resources fail closed for the affected claim. If the immutable target is readable but upstream editing is unavailable, implementation may consume it but a resource change remains a named manual/external boundary. Never overwrite an adopted baseline; use a new immutable version and update the owning reference;
124
+ - identify the production token source, its generation direction, the owning components/routes and any project-local UI/UX Skill before choosing implementation values;
125
+ - reuse production components and real product routes for states/specimens instead of building a detached static imitation as the acceptance target;
126
+ - trace each selected target and declared viewport/mode/state condition through a stable surface/control key to its production route/component owner, cold-start real-user entry journey and project-owned rendered/interactive Check;
127
+ - 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;
128
+ - implement the declared Visual Coverage Set across every applicable viewport, theme/mode, state, content-stress and accessibility/motion combination. Do not synthesize unrequested dimensions, but never prune a declared/applicable combination or replace its coverage with risk-only or pairwise sampling unless authoritative Source explicitly narrows the requirement or a project-owned proof establishes equivalence;
129
+ - use the first useful runnable vertical slice as a recommended real-production-entry feedback point when its expected early-localization value exceeds the run cost; it is not an implementation gate. Always rerun the affected cold-start journey on the final candidate;
130
+ - run project-owned rendered/component/browser verification and report only the combinations actually checked. Design file hashes, registry membership and counts prove resource integrity; static analysis, generated kits and screenshot artifacts are supporting review material rather than implementation-conformance proof.
131
+ - 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.
132
+ - 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.
133
+
134
+ Without an active Long-Task, final-current-candidate Contract Conformance confirms every accounted Fact Cell, Fact and property-required proof is read, mapped, implemented, resolved, executed and passing. One project check may cover several methods only when each method and Fact retains its own attributable actual observation/environment, frozen comparator/tolerance/mask and Oracle identity, and pass/fail verdict. Protected observations retain canonical-source ownership and only attributable digest/redacted evidence; no raw sensitive value is persisted. A selected-target, Fact universe, expectation authority, implementation or declared check-input change stales closure. Any unread, unsupported, unresolved, unmapped, unimplemented, unexecuted, stale, failed or indistinguishable applicable Fact blocks a complete selected-design-conformance claim; report the checked scope and exact gaps. Do not persist the accounting as a matrix, Claim set, readiness state or Gate.
135
+
136
+ If an active Long-Task applies, do not run the preceding default closure. Express material visual expectations through its existing Requirement, full Control projection, Product `surface_bindings`, Assertion, Check, Stage, Technical Binding and external-confirmation mechanisms. Include the validated residual handoff in real `task.source_paths` and every declared immutable resource in target verification inputs; make target keys/conditions/files equal the handoff. Map covered Source Items into the root conformance Assertion and one independent Assertion per declared verification method. Every method × condition cell carries exact `fact_refs` and canonical `fact_expectations`—subject/variation/property, sensitivity, expected located digest, comparator parameters/tolerance/mask, Oracle and environment—and current typed evidence supplies set-equal per-Fact `fact_results` with actual observation/environment/comparison/verdict; all rows pass and their union closes every required Fact × method obligation. Bind each handoff blocker with the same Source Items and methods. Bind every Control to a required production target and root-entry journey; bind selected exact/constraint targets to typed `design_conformance` actual/comparison evidence. Final Gate is the sole Long-Task carrier. A blocker cannot be dismissed in-band, and scope removal requires revised Source/Contract authority. A design candidate or planned target cannot unlock fidelity implementation: selection must become real Context-reachable Source with one canonical adoption record and an adopted Authority Revision first. Do not introduce a second visual plan, value copy, acceptance document or lifecycle.
137
+
138
+ ## Modularity Check
139
+
140
+ 新实现、重构、重复逻辑、模块边界或影响面控制需要内部记录 `Modularity Check: none|required|exception`。
141
+
142
+ - 可用 `ty-context check-modularity --file <path> --limit 300` 做计划编辑审计,用 `make validate-code-modularity` 或 `ty-context check-modularity --touched --limit 300 --fail-on-warning` 做交付前硬审计;项目本地 Skill 的 limit 优先。
143
+ - 同时检查物理行数、单函数语句数、分支复杂度、导出数、状态转换和职责;压成一行不能规避。
144
+ - 风险点按 product surface、hook、model、adapter、component、service / facade 或 verification helper 等稳定边界判断,优先复用现有 extension point。
145
+ - 只实施高收益、低风险、语义稳定的抽象;不为一次性代码、不稳定语义或视觉整洁做抽象。
146
+ - `exception` 必须由 `<harnessRoot>/config.yaml` 中 lifecycle-complete waiver 授权,至少包含收窄的 `path`/`category`、`owner`、`introduced_at`、`reason`、`tracking_issue`、`expiry_condition`。交付说明不是机器豁免,已有债务不得继续接收新职责。
147
+
148
+ ## 自动化机会
149
+
150
+ 人工流程重复、确定、易漏步骤或顺序影响正确性时,评估 repo-local tool/script。脚本放在 owning module 的工具目录并有测试;可恢复入口、参数约束和适用边界写入 verification/deployment Context。不要把模块命令、provider id、artifact 路径或一次性结果写进本 Skill。
151
+
152
+ ## Context 写入边界
153
+
154
+ - area/domain/subdomain:产品或包责任;contract:API/schema/event/workflow/interface;foundation:稳定概念;verification/deployment:可重复路径;implementation-index:导航;decision-rationale:会影响未来选择的稳定原因。
155
+ - 模块 Context 只保留 principles、design logic、rejected alternative/tradeoff 和长期约束;不编造 rationale,不复制实现摘要、命令输出、debug 过程、截图、日志、临时 JSON、raw payload、测试报告或 secrets。
156
+ - `Context Delta: none|required` 是唯一长期事实结果;`Architecture Deliberation` 是可见但 task-local 的流程检查点,`Architecture Context Hit`、`Decision Rationale Hit` 与 `Modularity Check` 仍只是内部路由问题。
157
+
158
+ ## 输出边界
159
+
160
+ 不默认创建 `.work_products/**`、tech plan、ADR、implementation doc、review/test/release 文档或 lifecycle phases。`Architecture Deliberation` 与 `Architecture Conformance` 通过工作更新和交付状态可见,不生成新的持久产物。用户明确要求独立开发/技术方案时可以临时生成;稳定结论仍提炼回 `project_context/**`。
@@ -1,18 +1,18 @@
1
- ---
1
+ ---
2
2
  name: context_full_project_export
3
3
  description: Use when the user explicitly asks to 导出尽可能详细的项目全量上下文, 全量上下文导出, 项目上下文全量导出, 项目整体上下文, full project context export, export full project context, project context export, project overall context, Source Pack export, source-pack export, code index export, task context export, 当前项目代码实现, 代码级实现导出, or code-level implementation export in a Minimal Context Harness project.
4
- ---
5
-
6
- # Context Full Project Export
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_full_project_export` Skill directly.
11
-
12
- This Skill creates a temporary export artifact only. It does not author durable Context and does not change `project_context/context.toml`.
13
-
14
- ## Purpose
15
-
4
+ ---
5
+
6
+ # Context Full Project Export
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_full_project_export` Skill directly.
11
+
12
+ This Skill creates a temporary export artifact only. It does not author durable Context and does not change `project_context/context.toml`.
13
+
14
+ ## Purpose
15
+
16
16
  When the user needs a full project context export, project overall context export or external LLM handoff, create temporary export artifacts that collect project Context, key agent guidance, architecture/module facts, code navigation and bounded source support for copying into an external tool or one-off discussion.
17
17
 
18
18
  When the user needs a code-level implementation export, create one temporary Markdown snapshot of current source and engineering configuration files for upload to Web GPT or another external model.
@@ -43,9 +43,9 @@ When the user needs a code-level implementation export, create one temporary Mar
43
43
  - `npx --yes --package project-tiny-context-harness@latest ty-context export-context --full --check`
44
44
  - `npx --yes --package project-tiny-context-harness@latest ty-context export-context --code --check`
45
45
  9. After exporting, report artifact paths, source counts, recommended upload sets and warnings to the user. Do not summarize export contents back into Context.
46
-
47
- ## Output Boundaries
48
-
46
+
47
+ ## Output Boundaries
48
+
49
49
  - Export artifacts must remain temporary export artifacts, not Context.
50
50
  - `--source-pack` defaults to `tmp/ty-context/context-exports/latest/`, with `source-pack-manifest.json`, `full-project-context.md`, `code-index.md` and optional `code-bundle-core.md` / `code-bundle-extended.md`.
51
51
  - `--source-pack` and `--task-context` are capped at 5 output files. `--max-pack-files` cannot exceed 5.
@@ -53,18 +53,18 @@ When the user needs a code-level implementation export, create one temporary Mar
53
53
  - `--task-context <name>` creates `task-contexts/task-context-<name>.md` plus optional support bundle; profile verification entries are listed, not executed.
54
54
  - `--full` defaults to `tmp/ty-context/context-exports/full-project-context-<timestamp>.md`.
55
55
  - `--code` defaults to `tmp/ty-context/context-exports/code-level-implementation-<timestamp>/code-level-implementation.md`.
56
- - `--all` generates both default artifacts with the same timestamp.
57
- - `--all` does not accept `--output`; custom filenames are supported only for `--full` or `--code`.
58
- - `--code` creates one Markdown file, not shards or `all.md`.
59
- - Do not output to `project_context/**`.
60
- - Do not modify `project_context/context.toml`.
61
- - Do not register export artifacts as `[[context]]`, `implementation-index` or any Context graph node.
56
+ - `--all` generates both default artifacts with the same timestamp.
57
+ - `--all` does not accept `--output`; custom filenames are supported only for `--full` or `--code`.
58
+ - `--code` creates one Markdown file, not shards or `all.md`.
59
+ - Do not output to `project_context/**`.
60
+ - Do not modify `project_context/context.toml`.
61
+ - Do not register export artifacts as `[[context]]`, `implementation-index` or any Context graph node.
62
62
  - Do not write tracked docs; if the user asks for an ordinary docs path, redirect to `tmp/ty-context/context-exports/**`.
63
63
  - Export contents may include redaction warnings; do not bypass secret/token/cookie/password/api_key/credential/bearer/authorization filtering. Use `--redaction-strict` when the user wants the command to fail if any redaction occurred.
64
64
  - Profiles under `<harnessRoot>/config.yaml` are export selectors only. They must not become durable Context facts or execute verification commands.
65
-
66
- ## Handoff
67
-
68
- - Report `Export: generated <path>` or `Export: check completed; no files written`.
69
- - 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`.
70
- - Context drift check should be `Context: no durable project facts changed` unless the task also changes Harness rules.
65
+
66
+ ## Handoff
67
+
68
+ - Report `Export: generated <path>` or `Export: check completed; no files written`.
69
+ - 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`.
70
+ - Context drift check should be `Context: no durable project facts changed` unless the task also changes Harness rules.