project-tiny-context-harness 0.7.2 → 0.7.4

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 (82) hide show
  1. package/README.md +7 -5
  2. package/assets/README.md +49 -14
  3. package/assets/README.zh-CN.md +26 -13
  4. package/assets/agents/AGENTS_CORE.md +5 -5
  5. package/assets/context_templates/global.md +1 -0
  6. package/assets/skills/context_development_engineer/SKILL.md +4 -1
  7. package/assets/skills/context_uiux_design/SKILL.md +19 -6
  8. package/assets/skills/long-task-workflow/SKILL.md +10 -9
  9. package/assets/skills/long-task-workflow/references/authority-lifecycle.md +7 -5
  10. package/assets/skills/long-task-workflow/references/contract-authoring.md +24 -6
  11. package/assets/skills/long-task-workflow/references/evidence-design.md +14 -1
  12. package/assets/skills/source-plan-authoring/SKILL.md +2 -2
  13. package/dist/commands/long-task-authoring.js +25 -0
  14. package/dist/commands/long-task.js +3 -0
  15. package/dist/lib/design-md.d.ts +3 -0
  16. package/dist/lib/design-md.js +48 -55
  17. package/dist/lib/doctor.js +8 -0
  18. package/dist/lib/long-task-activation-validation.js +13 -2
  19. package/dist/lib/long-task-authoring-authority-preview.js +1 -0
  20. package/dist/lib/long-task-authority-material-diff.js +26 -0
  21. package/dist/lib/long-task-authority-materials.d.ts +2 -2
  22. package/dist/lib/long-task-authority-materials.js +6 -0
  23. package/dist/lib/long-task-authority-policy.d.ts +12 -0
  24. package/dist/lib/long-task-authority-policy.js +9 -0
  25. package/dist/lib/long-task-authority-revision-analysis.d.ts +33 -0
  26. package/dist/lib/long-task-authority-revision-analysis.js +91 -0
  27. package/dist/lib/long-task-authority-revision.js +93 -158
  28. package/dist/lib/long-task-authority-types.d.ts +7 -0
  29. package/dist/lib/long-task-authority.js +32 -3
  30. package/dist/lib/long-task-check-evidence-decoder.d.ts +2 -2
  31. package/dist/lib/long-task-check-evidence-decoder.js +11 -1
  32. package/dist/lib/long-task-check-execution-policy.d.ts +3 -0
  33. package/dist/lib/long-task-check-execution-policy.js +5 -0
  34. package/dist/lib/long-task-check-runner.js +2 -0
  35. package/dist/lib/long-task-check-shape.js +33 -3
  36. package/dist/lib/long-task-conformance-policy.d.ts +5 -0
  37. package/dist/lib/long-task-conformance-policy.js +35 -0
  38. package/dist/lib/long-task-contract-types.d.ts +14 -4
  39. package/dist/lib/long-task-delivery-compiler.js +1 -0
  40. package/dist/lib/long-task-delivery-parser.js +5 -2
  41. package/dist/lib/long-task-delivery-types.d.ts +2 -0
  42. package/dist/lib/long-task-delivery-types.js +2 -0
  43. package/dist/lib/long-task-delivery-validation.js +11 -0
  44. package/dist/lib/long-task-evidence-capability-codec.d.ts +2 -0
  45. package/dist/lib/long-task-evidence-capability-codec.js +231 -0
  46. package/dist/lib/long-task-evidence-capability-policy.d.ts +8 -0
  47. package/dist/lib/long-task-evidence-capability-policy.js +147 -0
  48. package/dist/lib/long-task-evidence-capability-runtime.d.ts +2 -0
  49. package/dist/lib/long-task-evidence-capability-runtime.js +86 -0
  50. package/dist/lib/long-task-evidence-capability-types.d.ts +74 -0
  51. package/dist/lib/long-task-evidence-capability-types.js +1 -0
  52. package/dist/lib/long-task-evidence-findings.js +5 -1
  53. package/dist/lib/long-task-evidence-v2.js +38 -23
  54. package/dist/lib/long-task-final-v2.js +42 -1
  55. package/dist/lib/long-task-outcome-parser.js +14 -3
  56. package/dist/lib/long-task-playwright-evidence.d.ts +2 -1
  57. package/dist/lib/long-task-playwright-evidence.js +70 -2
  58. package/dist/lib/long-task-progress.js +4 -0
  59. package/dist/lib/long-task-root-shape.d.ts +1 -0
  60. package/dist/lib/long-task-root-shape.js +84 -3
  61. package/dist/lib/long-task-runner-environment.js +1 -1
  62. package/dist/lib/long-task-runner-freeze.d.ts +2 -2
  63. package/dist/lib/long-task-runner-freeze.js +3 -1
  64. package/dist/lib/long-task-runtime-types.d.ts +13 -0
  65. package/dist/lib/long-task-semantic-contract-types.d.ts +36 -0
  66. package/dist/lib/long-task-semantic-contract-types.js +1 -0
  67. package/dist/lib/long-task-semantic-drift-migration.d.ts +3 -0
  68. package/dist/lib/long-task-semantic-drift-migration.js +68 -0
  69. package/dist/lib/long-task-shape-primitives.d.ts +3 -0
  70. package/dist/lib/long-task-shape-primitives.js +25 -0
  71. package/dist/lib/long-task-stage-policy.d.ts +4 -0
  72. package/dist/lib/long-task-stage-policy.js +120 -0
  73. package/dist/lib/long-task-status-projection.d.ts +4 -1
  74. package/dist/lib/long-task-status-projection.js +63 -3
  75. package/dist/lib/long-task-status-v2.d.ts +11 -1
  76. package/dist/lib/long-task-status-v2.js +25 -3
  77. package/dist/lib/long-task-target-policy.d.ts +6 -0
  78. package/dist/lib/long-task-target-policy.js +127 -0
  79. package/dist/lib/migrations.js +29 -0
  80. package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +61 -7
  81. package/migrations/README.md +7 -0
  82. package/package.json +2 -2
@@ -4,17 +4,19 @@
4
4
  "title": "Single-Goal Delivery Contract V2",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "required": ["schema_version", "task", "source_claims", "risk", "global"],
7
+ "required": ["schema_version", "task", "source_claims", "stages", "risk", "global"],
8
8
  "properties": {
9
9
  "schema_version": { "const": "long-task-delivery-v2" },
10
10
  "task": {
11
11
  "type": "object",
12
12
  "additionalProperties": false,
13
- "required": ["id", "title", "goal", "source_paths", "context_refs"],
13
+ "required": ["id", "title", "goal", "target_profile", "execution_targets", "source_paths", "context_refs"],
14
14
  "properties": {
15
15
  "id": { "$ref": "#/$defs/key" },
16
16
  "title": { "$ref": "#/$defs/nonEmpty" },
17
17
  "goal": { "$ref": "#/$defs/nonEmpty" },
18
+ "target_profile": { "$ref": "#/$defs/targetProfile" },
19
+ "execution_targets": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/executionTarget" } },
18
20
  "source_paths": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/nonEmpty" } },
19
21
  "context_refs": { "$ref": "#/$defs/nonEmptyStrings" },
20
22
  "context_snapshot_mode": { "enum": ["referenced", "full"], "default": "referenced" }
@@ -25,6 +27,7 @@
25
27
  "minItems": 1,
26
28
  "items": { "$ref": "#/$defs/sourceClaim" }
27
29
  },
30
+ "stages": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/stage" } },
28
31
  "risk": { "$ref": "#/$defs/risk" },
29
32
  "global": { "$ref": "#/$defs/global" },
30
33
  "outcomes": { "type": "array", "items": { "$ref": "#/$defs/outcome" }, "minItems": 1 },
@@ -38,6 +41,40 @@
38
41
  "key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
39
42
  "nonEmpty": { "type": "string", "minLength": 1 },
40
43
  "nonEmptyStrings": { "type": "array", "items": { "$ref": "#/$defs/nonEmpty" } },
44
+ "targetProfile": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["key", "description", "required_state", "required_target_refs"],
48
+ "properties": {
49
+ "key": { "$ref": "#/$defs/key" },
50
+ "description": { "$ref": "#/$defs/nonEmpty" },
51
+ "required_state": { "enum": ["implementation_complete", "target_profile_usable", "production_release_ready"] },
52
+ "required_target_refs": { "$ref": "#/$defs/keys" }
53
+ }
54
+ },
55
+ "executionTarget": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": ["key", "description", "role", "runtime_family", "root_entrypoint"],
59
+ "properties": {
60
+ "key": { "$ref": "#/$defs/key" },
61
+ "description": { "$ref": "#/$defs/nonEmpty" },
62
+ "role": { "enum": ["product", "support", "observer"] },
63
+ "runtime_family": { "enum": ["browser", "native", "desktop", "service", "process", "external"] },
64
+ "root_entrypoint": { "$ref": "#/$defs/nonEmpty" }
65
+ }
66
+ },
67
+ "stage": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": ["key", "title", "depends_on", "gate_outcome"],
71
+ "properties": {
72
+ "key": { "$ref": "#/$defs/key" },
73
+ "title": { "$ref": "#/$defs/nonEmpty" },
74
+ "depends_on": { "$ref": "#/$defs/keys" },
75
+ "gate_outcome": { "$ref": "#/$defs/key" }
76
+ }
77
+ },
41
78
  "keyedStatement": {
42
79
  "type": "object",
43
80
  "additionalProperties": false,
@@ -114,7 +151,7 @@
114
151
  "properties": {
115
152
  "checks": { "type": "array", "items": { "$ref": "#/$defs/check" }, "default": [] },
116
153
  "counterfactual_controls": { "type": "array", "items": { "$ref": "#/$defs/globalCounterfactual" }, "default": [] },
117
- "external_confirmations": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["key", "description", "owner"], "properties": { "key": { "$ref": "#/$defs/key" }, "description": { "$ref": "#/$defs/nonEmpty" }, "owner": { "$ref": "#/$defs/nonEmpty" } } }, "default": [] }
154
+ "external_confirmations": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["key", "description", "owner", "kind", "impact_claims", "blocks_target"], "properties": { "key": { "$ref": "#/$defs/key" }, "description": { "$ref": "#/$defs/nonEmpty" }, "owner": { "$ref": "#/$defs/nonEmpty" }, "kind": { "enum": ["functional_prerequisite", "field_validation", "production_release_gate", "commercial_activation", "expert_authority"] }, "impact_claims": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/nonEmpty" } }, "blocks_target": { "type": "boolean" } } }, "default": [] }
118
155
  },
119
156
  "default": {}
120
157
  }
@@ -123,10 +160,11 @@
123
160
  "outcome": {
124
161
  "type": "object",
125
162
  "additionalProperties": false,
126
- "required": ["key", "title", "product", "technical", "acceptance"],
163
+ "required": ["key", "title", "stage", "product", "technical", "acceptance"],
127
164
  "properties": {
128
165
  "key": { "$ref": "#/$defs/key" },
129
166
  "title": { "$ref": "#/$defs/nonEmpty" },
167
+ "stage": { "$ref": "#/$defs/key" },
130
168
  "depends_on": { "$ref": "#/$defs/keys", "default": [] },
131
169
  "product": { "$ref": "#/$defs/product" },
132
170
  "technical": { "$ref": "#/$defs/technical" },
@@ -136,9 +174,11 @@
136
174
  "product": {
137
175
  "type": "object",
138
176
  "additionalProperties": false,
139
- "required": ["observable_result", "owner"],
177
+ "required": ["observable_result", "success_path_required", "degradation_path_required", "owner"],
140
178
  "properties": {
141
179
  "observable_result": { "$ref": "#/$defs/nonEmpty" },
180
+ "success_path_required": { "type": "boolean" },
181
+ "degradation_path_required": { "type": "boolean" },
142
182
  "owner": { "type": "object", "additionalProperties": false, "required": ["label", "context_refs", "path_globs"], "properties": { "label": { "$ref": "#/$defs/nonEmpty" }, "context_refs": { "$ref": "#/$defs/nonEmptyStrings" }, "path_globs": { "$ref": "#/$defs/nonEmptyStrings" } } },
143
183
  "requirements": { "type": "array", "items": { "$ref": "#/$defs/requirement" }, "default": [] },
144
184
  "owner_surfaces": { "$ref": "#/$defs/nonEmptyStrings", "default": [] },
@@ -204,9 +244,12 @@
204
244
  "check": {
205
245
  "type": "object",
206
246
  "additionalProperties": false,
207
- "required": ["key", "proof_surface", "runner", "verification_inputs"],
247
+ "required": ["key", "journey_roles", "execution_target", "scenario", "proof_surface", "runner", "verification_inputs"],
208
248
  "properties": {
209
249
  "key": { "$ref": "#/$defs/key" },
250
+ "journey_roles": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "enum": ["success", "degradation", "recovery", "stage_gate", "conformance"] } },
251
+ "execution_target": { "type": "object", "additionalProperties": false, "required": ["target_ref", "entrypoint"], "properties": { "target_ref": { "$ref": "#/$defs/key" }, "entrypoint": { "enum": ["root", "internal"] } } },
252
+ "scenario": { "$ref": "#/$defs/scenario" },
210
253
  "proof_surface": { "$ref": "#/$defs/proofSurface" },
211
254
  "runner": { "$ref": "#/$defs/runner" },
212
255
  "verification_inputs": { "$ref": "#/$defs/nonEmptyStrings" },
@@ -236,12 +279,13 @@
236
279
  "assertion": {
237
280
  "type": "object",
238
281
  "additionalProperties": false,
239
- "required": ["key", "claims", "observation", "operator"],
282
+ "required": ["key", "claims", "observation", "operator", "evidence_capabilities"],
240
283
  "properties": {
241
284
  "key": { "$ref": "#/$defs/key" },
242
285
  "criterion": { "$ref": "#/$defs/nonEmpty" },
243
286
  "claims": { "$ref": "#/$defs/nonEmptyStrings" },
244
287
  "observation": { "$ref": "#/$defs/nonEmpty" },
288
+ "evidence_capabilities": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/evidenceCapability" } },
245
289
  "operator": { "enum": ["equals", "not_equals", "contains", "not_contains", "matches", "not_matches", "greater_than", "greater_or_equal", "less_than", "less_or_equal", "truthy", "falsy", "exists", "set_equals", "subset_of", "superset_of"] },
246
290
  "expected": true
247
291
  },
@@ -268,6 +312,16 @@
268
312
  }
269
313
  ]
270
314
  },
315
+ "scenario": {
316
+ "type": "object",
317
+ "additionalProperties": false,
318
+ "required": ["given", "when"],
319
+ "properties": {
320
+ "given": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/keyedStatement" } },
321
+ "when": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/keyedStatement" } }
322
+ }
323
+ },
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"] },
271
325
  "environment": {
272
326
  "oneOf": [
273
327
  {
@@ -6,3 +6,10 @@ Version 0.6.0 includes `long-task-v1-retirement`. It safely removes the
6
6
  retired repo-local Hook, reports a legacy active projection as
7
7
  `manual_required`, and deliberately does not import V1 progress or receipts
8
8
  into the V2 Claim/Evidence authority.
9
+
10
+ Version 0.7.2 includes `long-task-v2-semantic-drift-authority`. It reports a
11
+ conventional `.long-task/delivery-contract.yaml` as `manual_required` when the
12
+ V2 file predates explicit Stage, target-profile/root-runtime, journey-scenario,
13
+ success/degradation, evidence-capability or external-impact authority. Those
14
+ meanings must be re-authored from Source; migration never infers them from old
15
+ Progress or Receipts.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-tiny-context-harness",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Minimal project memory and validation harness for AI coding agents.",
5
5
  "license": "MIT",
6
6
  "author": "Seven128",
@@ -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",
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",
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",