project-tiny-context-harness 0.7.9 → 0.8.0

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 (150) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +393 -380
  3. package/assets/README.md +567 -557
  4. package/assets/README.zh-CN.md +339 -326
  5. package/assets/agents/.gitkeep +1 -1
  6. package/assets/agents/AGENTS_CORE.md +66 -64
  7. package/assets/context_templates/architecture.md +33 -33
  8. package/assets/context_templates/area.md +39 -39
  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 +52 -51
  12. package/assets/context_templates/product-surface-contract.md +70 -70
  13. package/assets/context_templates/screen-contract.md +186 -177
  14. package/assets/context_templates/verification.md +32 -32
  15. package/assets/github/.gitkeep +1 -1
  16. package/assets/github/harness.yml +41 -41
  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 +135 -131
  20. package/assets/skills/context_full_project_export/SKILL.md +70 -70
  21. package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
  22. package/assets/skills/context_product_plan/SKILL.md +88 -87
  23. package/assets/skills/context_surface_contract/SKILL.md +191 -191
  24. package/assets/skills/context_uiux_design/SKILL.md +158 -154
  25. package/assets/skills/design-resource-authoring/SKILL.md +84 -79
  26. package/assets/skills/design-resource-authoring/references/downstream-handoff.md +136 -108
  27. package/assets/skills/design-resource-authoring/references/open-design-provider.md +133 -127
  28. package/assets/skills/design-resource-authoring/references/resource-selection.md +173 -173
  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 -47
  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 +100 -92
  34. package/assets/skills/long-task-workflow/agents/openai.yaml +4 -4
  35. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +76 -59
  36. package/assets/skills/long-task-workflow/references/contract-authoring.md +116 -105
  37. package/assets/skills/long-task-workflow/references/evidence-design.md +78 -75
  38. package/assets/skills/long-task-workflow/references/source-authoring.md +101 -98
  39. package/assets/skills/normal-long-task/SKILL.md +12 -12
  40. package/assets/skills/source-plan-authoring/SKILL.md +14 -14
  41. package/assets/tools/validate_context.py +442 -442
  42. package/dist/commands/design-resource.d.ts +1 -0
  43. package/dist/commands/design-resource.js +32 -0
  44. package/dist/commands/index.js +4 -0
  45. package/dist/commands/long-task-command-args.d.ts +1 -0
  46. package/dist/commands/long-task-command-args.js +6 -0
  47. package/dist/commands/long-task-revision.js +16 -4
  48. package/dist/commands/long-task.js +12 -5
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.js +1 -0
  51. package/dist/lib/design-md.js +3 -1
  52. package/dist/lib/design-resource-handoff-file-primitives.d.ts +4 -0
  53. package/dist/lib/design-resource-handoff-file-primitives.js +14 -0
  54. package/dist/lib/design-resource-handoff-file-validation.d.ts +2 -0
  55. package/dist/lib/design-resource-handoff-file-validation.js +142 -0
  56. package/dist/lib/design-resource-handoff-parser.d.ts +3 -0
  57. package/dist/lib/design-resource-handoff-parser.js +29 -0
  58. package/dist/lib/design-resource-handoff-policy.d.ts +3 -0
  59. package/dist/lib/design-resource-handoff-policy.js +36 -0
  60. package/dist/lib/design-resource-handoff-shape-evidence.d.ts +4 -0
  61. package/dist/lib/design-resource-handoff-shape-evidence.js +84 -0
  62. package/dist/lib/design-resource-handoff-shape-primitives.d.ts +9 -0
  63. package/dist/lib/design-resource-handoff-shape-primitives.js +44 -0
  64. package/dist/lib/design-resource-handoff-shape-structure.d.ts +5 -0
  65. package/dist/lib/design-resource-handoff-shape-structure.js +118 -0
  66. package/dist/lib/design-resource-handoff-shape.d.ts +2 -0
  67. package/dist/lib/design-resource-handoff-shape.js +75 -0
  68. package/dist/lib/design-resource-handoff-types.d.ts +139 -0
  69. package/dist/lib/design-resource-handoff-types.js +46 -0
  70. package/dist/lib/design-resource-handoff-validation-coverage.d.ts +4 -0
  71. package/dist/lib/design-resource-handoff-validation-coverage.js +168 -0
  72. package/dist/lib/design-resource-handoff-validation-primitives.d.ts +11 -0
  73. package/dist/lib/design-resource-handoff-validation-primitives.js +26 -0
  74. package/dist/lib/design-resource-handoff-validation-structure.d.ts +6 -0
  75. package/dist/lib/design-resource-handoff-validation-structure.js +93 -0
  76. package/dist/lib/design-resource-handoff-validation.d.ts +3 -0
  77. package/dist/lib/design-resource-handoff-validation.js +78 -0
  78. package/dist/lib/design-resource-handoff-web-dependency-validation.d.ts +3 -0
  79. package/dist/lib/design-resource-handoff-web-dependency-validation.js +70 -0
  80. package/dist/lib/long-task-activation-validation.js +14 -2
  81. package/dist/lib/long-task-authoring-preflight-diagnostics.js +7 -0
  82. package/dist/lib/long-task-authoring-preflight.js +39 -1
  83. package/dist/lib/long-task-authority-material-diff.js +14 -0
  84. package/dist/lib/long-task-authority-materials.js +21 -0
  85. package/dist/lib/long-task-authority-policy.d.ts +33 -0
  86. package/dist/lib/long-task-authority-policy.js +36 -0
  87. package/dist/lib/long-task-authority-revision-analysis.d.ts +1 -0
  88. package/dist/lib/long-task-authority-revision-analysis.js +30 -0
  89. package/dist/lib/long-task-authority-revision-brief.d.ts +3 -0
  90. package/dist/lib/long-task-authority-revision-brief.js +74 -0
  91. package/dist/lib/long-task-authority-revision-details.js +16 -16
  92. package/dist/lib/long-task-authority-revision-diagnosis.d.ts +1 -1
  93. package/dist/lib/long-task-authority-revision-diagnosis.js +8 -0
  94. package/dist/lib/long-task-authority-revision-enforcement.js +7 -3
  95. package/dist/lib/long-task-authority-revision-summary.d.ts +3 -0
  96. package/dist/lib/long-task-authority-revision-summary.js +133 -21
  97. package/dist/lib/long-task-authority-revision-types.d.ts +19 -1
  98. package/dist/lib/long-task-authority-revision.js +5 -0
  99. package/dist/lib/long-task-authority-types.d.ts +2 -0
  100. package/dist/lib/long-task-authority.js +10 -2
  101. package/dist/lib/long-task-check-execution-policy.js +2 -0
  102. package/dist/lib/long-task-claim-definitions.js +1 -5
  103. package/dist/lib/long-task-contract-types.d.ts +2 -0
  104. package/dist/lib/long-task-counterfactual-sandbox.d.ts +7 -0
  105. package/dist/lib/long-task-counterfactual-sandbox.js +27 -1
  106. package/dist/lib/long-task-delivery-compiler.js +26 -8
  107. package/dist/lib/long-task-delivery-types.d.ts +1 -0
  108. package/dist/lib/long-task-delivery-types.js +1 -0
  109. package/dist/lib/long-task-delivery-validation.js +3 -0
  110. package/dist/lib/long-task-design-resource-handoff.d.ts +2 -0
  111. package/dist/lib/long-task-design-resource-handoff.js +177 -0
  112. package/dist/lib/long-task-evidence-capability-codec.js +19 -0
  113. package/dist/lib/long-task-evidence-capability-policy.js +4 -0
  114. package/dist/lib/long-task-evidence-capability-runtime.js +25 -0
  115. package/dist/lib/long-task-evidence-capability-types.d.ts +9 -1
  116. package/dist/lib/long-task-outcome-parser.js +11 -1
  117. package/dist/lib/long-task-paths.d.ts +0 -1
  118. package/dist/lib/long-task-paths.js +0 -4
  119. package/dist/lib/long-task-playwright-case-evidence.d.ts +43 -0
  120. package/dist/lib/long-task-playwright-case-evidence.js +152 -0
  121. package/dist/lib/long-task-playwright-evidence.js +19 -152
  122. package/dist/lib/long-task-runner-freeze.d.ts +2 -2
  123. package/dist/lib/long-task-runner-freeze.js +2 -1
  124. package/dist/lib/long-task-runtime-types.d.ts +2 -0
  125. package/dist/lib/long-task-semantic-contract-types.d.ts +1 -1
  126. package/dist/lib/long-task-semantic-drift-migration.js +6 -1
  127. package/dist/lib/long-task-shape-primitives.d.ts +1 -1
  128. package/dist/lib/long-task-shape-primitives.js +1 -0
  129. package/dist/lib/long-task-status-v2.js +12 -7
  130. package/dist/lib/long-task-ui-design-policy.d.ts +17 -0
  131. package/dist/lib/long-task-ui-design-policy.js +128 -0
  132. package/dist/lib/long-task-ui-surface-policy.d.ts +4 -0
  133. package/dist/lib/long-task-ui-surface-policy.js +109 -0
  134. package/dist/lib/long-task-ui-surface-shape.d.ts +2 -0
  135. package/dist/lib/long-task-ui-surface-shape.js +94 -0
  136. package/dist/lib/long-task-ui-surface-types.d.ts +44 -0
  137. package/dist/lib/long-task-ui-surface-types.js +1 -0
  138. package/dist/lib/long-task-ui-surface-validation.d.ts +11 -0
  139. package/dist/lib/long-task-ui-surface-validation.js +62 -0
  140. package/dist/lib/long-task-verification-preview.d.ts +55 -0
  141. package/dist/lib/long-task-verification-preview.js +120 -0
  142. package/dist/lib/long-task-verifier-v2.js +11 -18
  143. package/dist/lib/long-task-workspace-scope.d.ts +38 -0
  144. package/dist/lib/long-task-workspace-scope.js +121 -0
  145. package/dist/lib/long-task-workspace.d.ts +1 -0
  146. package/dist/lib/long-task-workspace.js +73 -9
  147. package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +84 -2
  148. package/migrations/README.md +7 -7
  149. package/package.json +3 -3
  150. package/source-mappings.yaml +25 -25
@@ -15,10 +15,10 @@ export async function gitCommonDir(root) {
15
15
  }
16
16
  export async function captureWorkspaceFingerprint(rootInput, excludedPrefixes = []) {
17
17
  const root = path.resolve(rootInput);
18
- const [head, headTree, indexTree, staged, unstaged, statusBytes, untracked] = await Promise.all([
18
+ const indexTree = await gitOutput(root, ["write-tree"]);
19
+ const [head, headTree, staged, unstaged, statusBytes, untracked] = await Promise.all([
19
20
  gitOutput(root, ["rev-parse", "HEAD"]),
20
21
  gitOutput(root, ["rev-parse", "HEAD^{tree}"]),
21
- gitOutput(root, ["write-tree"]),
22
22
  gitBuffer(root, scopedDiffArgs(["diff", "--cached", "--binary", "--no-ext-diff"], excludedPrefixes)),
23
23
  gitBuffer(root, scopedDiffArgs(["diff", "--binary", "--no-ext-diff"], excludedPrefixes)),
24
24
  Promise.all([
@@ -51,11 +51,11 @@ export async function captureWorkspaceManifest(rootInput, workdirInput, _copyRoo
51
51
  workdir,
52
52
  ...additionalExcludedWorkdirs,
53
53
  ]);
54
- const [indexBytes, modifiedBytes, untrackedBytes, fingerprint] = await Promise.all([
54
+ const fingerprint = await captureWorkspaceFingerprint(root, excluded);
55
+ const [indexBytes, modifiedBytes, untrackedBytes] = await Promise.all([
55
56
  gitBuffer(root, ["ls-files", "--stage", "-z"]),
56
57
  gitBuffer(root, ["diff", "--name-only", "-z"]),
57
58
  gitBuffer(root, ["ls-files", "--others", "--exclude-standard", "-z"]),
58
- captureWorkspaceFingerprint(root, excluded),
59
59
  ]);
60
60
  const files = new Map();
61
61
  for (const record of splitZero(indexBytes)) {
@@ -114,7 +114,11 @@ export async function createWorkspaceSnapshot(rootInput, workdirInput, label, ad
114
114
  const started = performance.now();
115
115
  const root = path.resolve(rootInput);
116
116
  const workdir = path.resolve(workdirInput);
117
- const excluded = excludedPrefixes(root, [
117
+ const fingerprintExcluded = excludedPrefixes(root, [
118
+ workdir,
119
+ ...additionalExcludedWorkdirs,
120
+ ]);
121
+ const snapshotExcluded = snapshotExcludedPrefixes(root, [
118
122
  workdir,
119
123
  ...additionalExcludedWorkdirs,
120
124
  ]);
@@ -128,6 +132,7 @@ export async function createWorkspaceSnapshot(rootInput, workdirInput, label, ad
128
132
  "--force",
129
133
  `--prefix=${temporary.replace(/\\/gu, "/")}/`,
130
134
  ]);
135
+ await overlayTrackedEolDifferences(root, temporary);
131
136
  const [modified, untracked] = await Promise.all([
132
137
  gitBuffer(root, ["diff", "--name-only", "-z"]),
133
138
  gitBuffer(root, ["ls-files", "--others", "--exclude-standard", "-z"]),
@@ -137,7 +142,7 @@ export async function createWorkspaceSnapshot(rootInput, workdirInput, label, ad
137
142
  ...splitZero(untracked),
138
143
  ])) {
139
144
  const relative = raw.replace(/\\/gu, "/");
140
- if (excludedPath(relative, excluded))
145
+ if (excludedPath(relative, snapshotExcluded))
141
146
  continue;
142
147
  const source = path.join(root, ...relative.split("/"));
143
148
  const target = path.join(temporary, ...relative.split("/"));
@@ -149,12 +154,12 @@ export async function createWorkspaceSnapshot(rootInput, workdirInput, label, ad
149
154
  await mkdir(path.dirname(target), { recursive: true });
150
155
  await copyFile(source, target);
151
156
  }
152
- await removeExcludedSnapshotPaths(temporary, excluded);
157
+ await removeExcludedSnapshotPaths(temporary, snapshotExcluded);
153
158
  await linkDependencyTrees(root, temporary, [
154
159
  workdir,
155
160
  ...additionalExcludedWorkdirs,
156
161
  ]);
157
- const after = await captureWorkspaceFingerprint(root, excluded);
162
+ const after = await captureWorkspaceFingerprint(root, fingerprintExcluded);
158
163
  if (after.identity !== before.identity)
159
164
  throw new Error("workspace_changed_during_snapshot");
160
165
  return {
@@ -176,6 +181,23 @@ export function changedWorkspacePaths(baseline, current) {
176
181
  .filter((file) => before.get(file) !== after.get(file))
177
182
  .sort();
178
183
  }
184
+ export async function changedWorkspacePathsFromHead(rootInput, workdirInput, additionalExcludedWorkdirs = []) {
185
+ const root = path.resolve(rootInput);
186
+ const workdir = path.resolve(workdirInput);
187
+ const excluded = excludedPrefixes(root, [
188
+ workdir,
189
+ ...additionalExcludedWorkdirs,
190
+ ]);
191
+ const [trackedBytes, untrackedBytes] = await Promise.all([
192
+ gitBuffer(root, scopedDiffArgs(["diff", "--name-only", "--no-renames", "--no-ext-diff", "-z", "HEAD"], excluded)),
193
+ gitBuffer(root, ["ls-files", "--others", "--exclude-standard", "-z"]),
194
+ ]);
195
+ return [
196
+ ...new Set([...splitZero(trackedBytes), ...splitZero(untrackedBytes)]
197
+ .map((raw) => raw.replace(/\\/gu, "/"))
198
+ .filter((relative) => !excludedPath(relative, excluded))),
199
+ ].sort();
200
+ }
179
201
  export async function currentGitState(root) {
180
202
  const [head, tree, raw] = await Promise.all([
181
203
  gitOutput(root, ["rev-parse", "HEAD"]),
@@ -255,8 +277,13 @@ async function untrackedIdentity(root, excluded) {
255
277
  }
256
278
  function excludedPrefixes(root, workdirs) {
257
279
  return [
258
- ...workdirs.map((workdir) => repoRelative(root, path.resolve(workdir))),
280
+ ...snapshotExcludedPrefixes(root, workdirs),
259
281
  "project_context",
282
+ ].filter(Boolean);
283
+ }
284
+ function snapshotExcludedPrefixes(root, workdirs) {
285
+ return [
286
+ ...workdirs.map((workdir) => repoRelative(root, path.resolve(workdir))),
260
287
  "tmp/ty-context/long-task-runs",
261
288
  ].filter(Boolean);
262
289
  }
@@ -283,6 +310,43 @@ async function removeExcludedSnapshotPaths(snapshotRoot, excluded) {
283
310
  }
284
311
  await visit(snapshotRoot);
285
312
  }
313
+ async function overlayTrackedEolDifferences(sourceRoot, snapshotRoot) {
314
+ const [raw, autocrlf] = await Promise.all([
315
+ gitBuffer(sourceRoot, ["ls-files", "--eol", "-z"]),
316
+ gitConfigGet(sourceRoot, "core.autocrlf"),
317
+ ]);
318
+ for (const record of splitZero(raw)) {
319
+ const tab = record.indexOf("\t");
320
+ if (tab < 0)
321
+ continue;
322
+ const metadata = record.slice(0, tab);
323
+ const relative = record.slice(tab + 1).replace(/\\/gu, "/");
324
+ const match = metadata.match(/^i\/(\S+)\s+w\/(\S+)\s+attr\/(.*)$/u);
325
+ if (!match)
326
+ continue;
327
+ const [, indexEol, worktreeEol, attributesRaw] = match;
328
+ const expected = checkoutEol(indexEol, attributesRaw.trim(), autocrlf);
329
+ if (worktreeEol === expected)
330
+ continue;
331
+ const source = path.join(sourceRoot, ...relative.split("/"));
332
+ const target = path.join(snapshotRoot, ...relative.split("/"));
333
+ const info = await stat(source).catch(() => null);
334
+ if (!info?.isFile())
335
+ continue;
336
+ await mkdir(path.dirname(target), { recursive: true });
337
+ await copyFile(source, target);
338
+ }
339
+ }
340
+ function checkoutEol(indexEol, attributes, autocrlf) {
341
+ const explicit = attributes.match(/(?:^|\s)eol=(lf|crlf)(?:\s|$)/u)?.[1];
342
+ if (explicit)
343
+ return explicit;
344
+ if (/(?:^|\s)-text(?:\s|$)/u.test(attributes))
345
+ return indexEol;
346
+ if (indexEol === "-text" || indexEol === "none")
347
+ return indexEol;
348
+ return autocrlf?.toLowerCase() === "true" ? "crlf" : indexEol;
349
+ }
286
350
  async function linkDependencyTrees(sourceRoot, snapshotRoot, workdirs) {
287
351
  const protectedWorkdirs = workdirs.map((workdir) => repoRelative(sourceRoot, workdir));
288
352
  async function visit(directory, relative = "") {
@@ -183,8 +183,15 @@
183
183
  "requirements": { "type": "array", "items": { "$ref": "#/$defs/requirement" }, "default": [] },
184
184
  "owner_surfaces": { "$ref": "#/$defs/nonEmptyStrings", "default": [] },
185
185
  "controls": { "type": "array", "items": { "$ref": "#/$defs/control" }, "default": [] },
186
+ "surface_bindings": { "type": "array", "items": { "$ref": "#/$defs/surfaceBinding" }, "default": [] },
186
187
  "non_completing_outcomes": { "type": "array", "items": { "$ref": "#/$defs/keyedStatement" }, "default": [] }
187
- }
188
+ },
189
+ "allOf": [
190
+ {
191
+ "if": { "required": ["controls"], "properties": { "controls": { "minItems": 1 } } },
192
+ "then": { "required": ["surface_bindings"], "properties": { "surface_bindings": { "minItems": 1 } } }
193
+ }
194
+ ]
188
195
  },
189
196
  "requirement": {
190
197
  "type": "object",
@@ -198,6 +205,81 @@
198
205
  "required": ["key", "location"],
199
206
  "properties": { "key": { "$ref": "#/$defs/key" }, "surface": { "type": "string", "default": "" }, "region": { "type": "string", "default": "" }, "location": { "$ref": "#/$defs/nonEmpty" }, "control_type": { "type": "string", "default": "" }, "label_content": { "type": "string", "default": "" }, "user_task": { "type": "string", "default": "" }, "visibility": { "type": "string", "default": "" }, "availability": { "type": "string", "default": "" }, "trigger": { "type": "string", "default": "" }, "input": { "type": "string", "default": "" }, "validation": { "type": "string", "default": "" }, "default_value": { "type": "string", "default": "" }, "interaction": { "type": "string", "default": "" }, "navigation_result": { "type": "string", "default": "" }, "loading_state": { "type": "string", "default": "" }, "empty_state": { "type": "string", "default": "" }, "success_state": { "type": "string", "default": "" }, "failure_state": { "type": "string", "default": "" }, "recovery": { "type": "string", "default": "" }, "permission": { "type": "string", "default": "" }, "feedback": { "type": "string", "default": "" }, "accessibility": { "type": "string", "default": "" } }
200
207
  },
208
+ "surfaceBinding": {
209
+ "type": "object",
210
+ "additionalProperties": false,
211
+ "required": ["key", "surface_ref", "target_ref", "control_refs", "route_binding_ref", "component_binding_refs", "root_journey_check_ref", "entry_action_ref", "design_targets", "acceptance_blockers"],
212
+ "properties": {
213
+ "key": { "$ref": "#/$defs/key" },
214
+ "surface_ref": { "$ref": "#/$defs/nonEmpty" },
215
+ "target_ref": { "$ref": "#/$defs/key" },
216
+ "control_refs": { "$ref": "#/$defs/keys" },
217
+ "route_binding_ref": { "$ref": "#/$defs/key" },
218
+ "component_binding_refs": { "$ref": "#/$defs/keys" },
219
+ "root_journey_check_ref": { "$ref": "#/$defs/key" },
220
+ "entry_action_ref": { "$ref": "#/$defs/key" },
221
+ "design_targets": { "type": "array", "items": { "$ref": "#/$defs/designTarget" } },
222
+ "acceptance_blockers": { "type": "array", "items": { "$ref": "#/$defs/designAcceptanceBlocker" } }
223
+ }
224
+ },
225
+ "designTarget": {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": ["key", "interpretation", "source_paths", "condition_keys", "claim_refs", "conformance_check_ref", "conformance_assertion_ref", "verification_method_bindings", "actual_artifact_path", "comparison_artifact_path"],
229
+ "properties": {
230
+ "key": { "$ref": "#/$defs/key" },
231
+ "interpretation": { "enum": ["exact_target", "constraint"] },
232
+ "source_paths": { "$ref": "#/$defs/nonEmptyStrings" },
233
+ "condition_keys": { "$ref": "#/$defs/keys" },
234
+ "claim_refs": { "$ref": "#/$defs/nonEmptyStrings" },
235
+ "conformance_check_ref": { "$ref": "#/$defs/key" },
236
+ "conformance_assertion_ref": { "$ref": "#/$defs/key" },
237
+ "verification_method_bindings": {
238
+ "type": "array",
239
+ "minItems": 1,
240
+ "uniqueItems": true,
241
+ "items": {
242
+ "type": "object",
243
+ "additionalProperties": false,
244
+ "required": ["method", "assertion_ref"],
245
+ "properties": {
246
+ "method": { "$ref": "#/$defs/designVerificationMethod" },
247
+ "assertion_ref": { "$ref": "#/$defs/key" }
248
+ }
249
+ }
250
+ },
251
+ "actual_artifact_path": { "$ref": "#/$defs/nonEmpty" },
252
+ "comparison_artifact_path": { "$ref": "#/$defs/nonEmpty" }
253
+ }
254
+ },
255
+ "designAcceptanceBlocker": {
256
+ "type": "object",
257
+ "additionalProperties": false,
258
+ "required": ["key", "status", "refs", "source_item_refs", "verification_methods", "rationale"],
259
+ "properties": {
260
+ "key": { "$ref": "#/$defs/key" },
261
+ "status": { "enum": ["machine_claim", "external_confirmation"] },
262
+ "refs": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/nonEmpty" } },
263
+ "source_item_refs": { "$ref": "#/$defs/nonEmptyStrings" },
264
+ "verification_methods": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/designVerificationMethod" } },
265
+ "rationale": { "$ref": "#/$defs/nonEmpty" }
266
+ }
267
+ },
268
+ "designVerificationMethod": {
269
+ "enum": [
270
+ "layout_geometry",
271
+ "visual_pixel",
272
+ "design_token",
273
+ "content",
274
+ "component_state",
275
+ "interaction_trace",
276
+ "motion_timeline",
277
+ "responsive_reflow",
278
+ "input_method",
279
+ "accessibility_semantics",
280
+ "asset_integrity"
281
+ ]
282
+ },
201
283
  "technical": {
202
284
  "type": "object",
203
285
  "additionalProperties": false,
@@ -321,7 +403,7 @@
321
403
  "when": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/keyedStatement" } }
322
404
  }
323
405
  },
324
- "evidenceCapability": { "enum": ["presence", "interaction_trace", "state_delta", "cross_surface_consistency", "durable_readback", "boundary_invocation", "external_side_effect", "failure_injection", "visual_render", "target_runtime", "input_variation"] },
406
+ "evidenceCapability": { "enum": ["presence", "interaction_trace", "state_delta", "cross_surface_consistency", "durable_readback", "boundary_invocation", "external_side_effect", "failure_injection", "visual_render", "design_conformance", "target_runtime", "input_variation"] },
325
407
  "environment": {
326
408
  "oneOf": [
327
409
  {
@@ -1,10 +1,10 @@
1
- # Migrations
2
-
3
- Schema migrations for Harness config and managed file layout belong here.
4
-
5
- Version 0.6.0 includes `long-task-v1-retirement`. It safely removes the
6
- retired repo-local Hook, reports a legacy active projection as
7
- `manual_required`, and deliberately does not import V1 progress or receipts
1
+ # Migrations
2
+
3
+ Schema migrations for Harness config and managed file layout belong here.
4
+
5
+ Version 0.6.0 includes `long-task-v1-retirement`. It safely removes the
6
+ retired repo-local Hook, reports a legacy active projection as
7
+ `manual_required`, and deliberately does not import V1 progress or receipts
8
8
  into the V2 Claim/Evidence authority.
9
9
 
10
10
  Version 0.7.2 includes `long-task-v2-semantic-drift-authority`. It reports a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-tiny-context-harness",
3
- "version": "0.7.9",
3
+ "version": "0.8.0",
4
4
  "description": "Minimal project memory and validation harness for AI coding agents.",
5
5
  "license": "MIT",
6
6
  "author": "Seven128",
@@ -48,7 +48,7 @@
48
48
  "source-mappings.yaml"
49
49
  ],
50
50
  "scripts": {
51
- "build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
51
+ "build": "node ../../tools/package_build_fingerprint.mjs build",
52
52
  "typecheck": "tsc -p tsconfig.json --noEmit",
53
53
  "test:default:built": "node ../../tests/ty-context/run-package-suite.mjs default",
54
54
  "test:default": "npm run build && npm run test:default:built",
@@ -58,7 +58,7 @@
58
58
  "pretest": "npm run build",
59
59
  "test": "npm run test:built",
60
60
  "test:workflow-default:built": "node --test --test-concurrency=1 ../../tests/ty-context/workflow-contract-routing.test.mjs",
61
- "test:delivery-contract:built": "node --test --test-concurrency=1 ../../tests/ty-context/long-task-compact-authoring.test.mjs ../../tests/ty-context/long-task-authoring-claims.test.mjs ../../tests/ty-context/long-task-authoring-preflight.test.mjs ../../tests/ty-context/long-task-authority-authoring-fields.test.mjs ../../tests/ty-context/long-task-playwright-ac-evidence.test.mjs ../../tests/ty-context/long-task-delivery-parser.test.mjs ../../tests/ty-context/long-task-delivery-compiler.test.mjs ../../tests/ty-context/long-task-delivery-risk.test.mjs ../../tests/ty-context/long-task-claim-coverage.test.mjs ../../tests/ty-context/long-task-closure-invariants.test.mjs ../../tests/ty-context/long-task-source-authority-closure.test.mjs ../../tests/ty-context/long-task-evidence-sensitivity-policy.test.mjs ../../tests/ty-context/long-task-global-evidence-sensitivity.test.mjs ../../tests/ty-context/long-task-source-risk-binding.test.mjs ../../tests/ty-context/long-task-non-completing-source.test.mjs ../../tests/ty-context/long-task-playwright-trust-boundary.test.mjs ../../tests/ty-context/long-task-planned-counterfactual.test.mjs ../../tests/ty-context/long-task-public-contract-example.test.mjs ../../tests/ty-context/long-task-release-tarball-contract.test.mjs ../../tests/ty-context/long-task-semantic-drift-closure.test.mjs ../../tests/ty-context/long-task-semantic-drift-lifecycle.test.mjs",
61
+ "test:delivery-contract:built": "node --test --test-concurrency=1 ../../tests/ty-context/long-task-compact-authoring.test.mjs ../../tests/ty-context/long-task-authoring-claims.test.mjs ../../tests/ty-context/long-task-authoring-preflight.test.mjs ../../tests/ty-context/long-task-authority-authoring-fields.test.mjs ../../tests/ty-context/long-task-playwright-ac-evidence.test.mjs ../../tests/ty-context/long-task-delivery-parser.test.mjs ../../tests/ty-context/long-task-delivery-compiler.test.mjs ../../tests/ty-context/long-task-delivery-risk.test.mjs ../../tests/ty-context/long-task-claim-coverage.test.mjs ../../tests/ty-context/long-task-closure-invariants.test.mjs ../../tests/ty-context/long-task-source-authority-closure.test.mjs ../../tests/ty-context/long-task-evidence-sensitivity-policy.test.mjs ../../tests/ty-context/long-task-global-evidence-sensitivity.test.mjs ../../tests/ty-context/long-task-source-risk-binding.test.mjs ../../tests/ty-context/long-task-non-completing-source.test.mjs ../../tests/ty-context/long-task-playwright-trust-boundary.test.mjs ../../tests/ty-context/long-task-planned-counterfactual.test.mjs ../../tests/ty-context/long-task-public-contract-example.test.mjs ../../tests/ty-context/long-task-release-tarball-contract.test.mjs ../../tests/ty-context/long-task-semantic-drift-closure.test.mjs ../../tests/ty-context/long-task-semantic-drift-lifecycle.test.mjs ../../tests/ty-context/long-task-workspace-scope.test.mjs",
62
62
  "test:delivery-contract": "npm run build && npm run test:delivery-contract:built",
63
63
  "test:long-task-workflow:built": "node ../../tests/ty-context/run-package-suite.mjs long-task",
64
64
  "test:long-task-workflow": "npm run build && npm run test:long-task-workflow:built",
@@ -1,25 +1,25 @@
1
- source_mappings:
2
- - source: ".codex/ty-context-managed/agents/AGENTS_CORE.md"
3
- target: "packages/ty-context/assets/agents/AGENTS_CORE.md"
4
- mode: "copy-file"
5
- - source: "README.md"
6
- target: "packages/ty-context/assets/README.md"
7
- mode: "copy-file"
8
- - source: "README.zh-CN.md"
9
- target: "packages/ty-context/assets/README.zh-CN.md"
10
- mode: "copy-file"
11
- - source: ".codex/ty-context-managed/context_templates"
12
- target: "packages/ty-context/assets/context_templates"
13
- mode: "copy-tree"
14
- - source: ".codex/ty-context-managed/skills"
15
- target: "packages/ty-context/assets/skills"
16
- mode: "copy-tree"
17
- - source: ".codex/ty-context-managed/make/ty-context.mk"
18
- target: "packages/ty-context/assets/make/ty-context.mk"
19
- mode: "copy-file"
20
- - source: ".codex/ty-context-managed/minimal_tools"
21
- target: "packages/ty-context/assets/tools"
22
- mode: "copy-tree"
23
- - source: ".github/workflows/harness.yml"
24
- target: "packages/ty-context/assets/github/harness.yml"
25
- mode: "copy-file"
1
+ source_mappings:
2
+ - source: ".codex/ty-context-managed/agents/AGENTS_CORE.md"
3
+ target: "packages/ty-context/assets/agents/AGENTS_CORE.md"
4
+ mode: "copy-file"
5
+ - source: "README.md"
6
+ target: "packages/ty-context/assets/README.md"
7
+ mode: "copy-file"
8
+ - source: "README.zh-CN.md"
9
+ target: "packages/ty-context/assets/README.zh-CN.md"
10
+ mode: "copy-file"
11
+ - source: ".codex/ty-context-managed/context_templates"
12
+ target: "packages/ty-context/assets/context_templates"
13
+ mode: "copy-tree"
14
+ - source: ".codex/ty-context-managed/skills"
15
+ target: "packages/ty-context/assets/skills"
16
+ mode: "copy-tree"
17
+ - source: ".codex/ty-context-managed/make/ty-context.mk"
18
+ target: "packages/ty-context/assets/make/ty-context.mk"
19
+ mode: "copy-file"
20
+ - source: ".codex/ty-context-managed/minimal_tools"
21
+ target: "packages/ty-context/assets/tools"
22
+ mode: "copy-tree"
23
+ - source: ".github/workflows/harness.yml"
24
+ target: "packages/ty-context/assets/github/harness.yml"
25
+ mode: "copy-file"