project-tiny-context-harness 0.8.2 → 0.8.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.
- package/LICENSE +21 -21
- package/README.md +399 -387
- package/assets/README.md +557 -553
- package/assets/README.zh-CN.md +341 -331
- package/assets/agents/.gitkeep +1 -1
- package/assets/agents/AGENTS_CORE.md +69 -69
- package/assets/context_templates/architecture.md +28 -28
- package/assets/context_templates/area.md +34 -34
- package/assets/context_templates/context.toml +30 -30
- package/assets/context_templates/deployment.md +35 -35
- package/assets/context_templates/global.md +57 -57
- package/assets/context_templates/product-surface-contract.md +70 -70
- package/assets/context_templates/screen-contract.md +189 -189
- package/assets/context_templates/verification.md +32 -32
- package/assets/github/.gitkeep +1 -1
- package/assets/github/harness.yml +39 -39
- package/assets/make/.gitkeep +1 -1
- package/assets/make/ty-context.mk +48 -48
- package/assets/skills/context_development_engineer/SKILL.md +137 -137
- package/assets/skills/context_full_project_export/SKILL.md +28 -28
- package/assets/skills/context_harness_upgrade/SKILL.md +60 -60
- package/assets/skills/context_product_plan/SKILL.md +88 -88
- package/assets/skills/context_surface_contract/SKILL.md +191 -191
- package/assets/skills/context_uiux_design/SKILL.md +172 -172
- package/assets/skills/design-resource-authoring/SKILL.md +86 -85
- package/assets/skills/design-resource-authoring/references/downstream-handoff.md +138 -135
- package/assets/skills/design-resource-authoring/references/open-design-provider.md +135 -135
- package/assets/skills/design-resource-authoring/references/resource-selection.md +174 -173
- package/assets/skills/design-system-authoring/SKILL.md +57 -57
- package/assets/skills/design-system-authoring/agents/openai.yaml +6 -6
- package/assets/skills/design-system-authoring/references/authority-adoption.md +48 -48
- package/assets/skills/design-system-authoring/references/open-design-design-system-provider.md +110 -110
- package/assets/skills/long-task-workflow/SKILL.md +93 -93
- package/assets/skills/long-task-workflow/references/authority-lifecycle.md +69 -69
- package/assets/skills/long-task-workflow/references/contract-authoring.md +111 -111
- package/assets/skills/long-task-workflow/references/evidence-design.md +68 -68
- package/assets/skills/long-task-workflow/references/source-authoring.md +95 -95
- package/assets/skills/source-plan-authoring/SKILL.md +14 -14
- package/assets/tools/validate_context.py +442 -442
- package/dist/commands/design-resource.js +2 -2
- package/dist/commands/index.js +26 -26
- package/dist/commands/long-task.js +15 -15
- package/dist/lib/design-resource-fact-policy.d.ts +25 -0
- package/dist/lib/design-resource-fact-policy.js +35 -0
- package/dist/lib/design-resource-handoff-shape-evidence.d.ts +3 -1
- package/dist/lib/design-resource-handoff-shape-evidence.js +57 -0
- package/dist/lib/design-resource-handoff-shape.js +5 -1
- package/dist/lib/design-resource-handoff-types.d.ts +27 -0
- package/dist/lib/design-resource-handoff-validation-coverage.d.ts +1 -1
- package/dist/lib/design-resource-handoff-validation-coverage.js +41 -14
- package/dist/lib/design-resource-handoff-validation-facts.d.ts +2 -0
- package/dist/lib/design-resource-handoff-validation-facts.js +97 -0
- package/dist/lib/design-resource-handoff-validation.js +10 -1
- package/dist/lib/long-task-design-resource-handoff.js +19 -6
- package/dist/lib/long-task-evidence-capability-codec.js +10 -0
- package/dist/lib/long-task-evidence-capability-runtime.js +3 -0
- package/dist/lib/long-task-evidence-capability-types.d.ts +1 -0
- package/dist/lib/long-task-playwright-evidence.js +1 -0
- package/dist/lib/long-task-semantic-drift-migration.js +1 -1
- package/dist/lib/long-task-ui-design-policy.js +7 -0
- package/dist/lib/long-task-ui-surface-shape.js +12 -1
- package/dist/lib/long-task-ui-surface-types.d.ts +1 -0
- package/dist/lib/migrations.js +64 -0
- package/dist/lib/profiles.js +0 -2
- package/dist/schemas/long-task-delivery-v2/long-task-delivery-v2.schema.json +3 -1
- package/migrations/README.md +15 -15
- package/package.json +83 -83
- package/source-mappings.yaml +25 -25
- package/assets/skills/normal-long-task/SKILL.md +0 -12
|
@@ -67,13 +67,16 @@ function validateCoverageClaims(contract, contractTarget, indexed) {
|
|
|
67
67
|
const rows = indexed.preflight.handoff.coverage.filter((row) => row.disposition === "covered" && row.target_refs.includes(target.key));
|
|
68
68
|
if (!rows.length)
|
|
69
69
|
invalid("target_covered_claims_required", target.key);
|
|
70
|
+
const facts = indexed.preflight.handoff.facts.filter((fact) => fact.target_ref === target.key);
|
|
71
|
+
if (!facts.length)
|
|
72
|
+
invalid("target_facts_required", target.key);
|
|
70
73
|
const claimsBySourceItem = new Map();
|
|
71
74
|
for (const row of rows)
|
|
72
75
|
for (const sourceItemRef of row.source_item_refs) {
|
|
73
76
|
const localClaims = designSourceItemClaims(contract, contractTarget, indexed, sourceItemRef, claims);
|
|
74
77
|
claimsBySourceItem.set(sourceItemRef, localClaims);
|
|
75
78
|
}
|
|
76
|
-
validateVerificationMethodBindings(target, check,
|
|
79
|
+
validateVerificationMethodBindings(target, check, facts, claimsBySourceItem);
|
|
77
80
|
}
|
|
78
81
|
function validateBlockerBindings(contract, contractTarget, indexed) {
|
|
79
82
|
const bound = new Map(contractTarget.binding.acceptance_blockers.map((item) => [item.key, item]));
|
|
@@ -137,8 +140,8 @@ function designSourceItemClaims(contract, contractTarget, indexed, sourceItemRef
|
|
|
137
140
|
return claimRef.slice(prefix.length);
|
|
138
141
|
});
|
|
139
142
|
}
|
|
140
|
-
function validateVerificationMethodBindings(target, check,
|
|
141
|
-
const expectedMethods = new Set(
|
|
143
|
+
function validateVerificationMethodBindings(target, check, facts, claimsBySourceItem) {
|
|
144
|
+
const expectedMethods = new Set(facts.map((fact) => fact.verification_method));
|
|
142
145
|
const bindings = target.verification_method_bindings;
|
|
143
146
|
assertSameSet(bindings.map((item) => item.method), [...expectedMethods], "verification_methods_mismatch", target.key);
|
|
144
147
|
const assertionRefs = bindings.map((item) => item.assertion_ref);
|
|
@@ -146,13 +149,14 @@ function validateVerificationMethodBindings(target, check, rows, claimsBySourceI
|
|
|
146
149
|
invalid("verification_method_assertion_duplicate", target.key);
|
|
147
150
|
if (assertionRefs.includes(target.conformance_assertion_ref))
|
|
148
151
|
invalid("verification_method_assertion_must_be_independent", target.key);
|
|
152
|
+
const boundFactRefs = [];
|
|
149
153
|
for (const binding of bindings) {
|
|
150
154
|
const assertion = check.positive_assertions.find((item) => item.key === binding.assertion_ref);
|
|
151
155
|
if (!assertion)
|
|
152
156
|
invalid("verification_method_assertion_unknown", `${target.key}:${binding.method}:${binding.assertion_ref}`);
|
|
153
|
-
const sourceItems = new Set(
|
|
154
|
-
.filter((
|
|
155
|
-
.flatMap((
|
|
157
|
+
const sourceItems = new Set(facts
|
|
158
|
+
.filter((fact) => fact.verification_method === binding.method)
|
|
159
|
+
.flatMap((fact) => fact.source_item_refs));
|
|
156
160
|
for (const sourceItemRef of sourceItems)
|
|
157
161
|
for (const claimRef of claimsBySourceItem.get(sourceItemRef) ?? [])
|
|
158
162
|
if (!assertion.claims.includes(claimRef))
|
|
@@ -161,7 +165,16 @@ function validateVerificationMethodBindings(target, check, rows, claimsBySourceI
|
|
|
161
165
|
if (!assertion.evidence_capabilities.includes(capability))
|
|
162
166
|
invalid("verification_method_capability_required", `${target.key}:${binding.method}:${capability}`);
|
|
163
167
|
assertSameSet(binding.evidence_artifacts.map((item) => item.condition_key), target.condition_keys, "verification_method_evidence_conditions_mismatch", `${target.key}:${binding.method}`);
|
|
168
|
+
for (const artifact of binding.evidence_artifacts) {
|
|
169
|
+
const expectedFactRefs = facts
|
|
170
|
+
.filter((fact) => fact.verification_method === binding.method &&
|
|
171
|
+
fact.condition_ref === artifact.condition_key)
|
|
172
|
+
.map((fact) => fact.key);
|
|
173
|
+
assertSameSet(artifact.fact_refs, expectedFactRefs, "design_method_fact_refs_mismatch", `${target.key}:${binding.method}:${artifact.condition_key}`);
|
|
174
|
+
boundFactRefs.push(...artifact.fact_refs);
|
|
175
|
+
}
|
|
164
176
|
}
|
|
177
|
+
assertSameSet(boundFactRefs, facts.map((fact) => fact.key), "design_method_fact_refs_mismatch", target.key);
|
|
165
178
|
}
|
|
166
179
|
function requiredCapabilities(method) {
|
|
167
180
|
if (method === "interaction_trace")
|
|
@@ -202,11 +202,13 @@ function decodeRecord(value, index) {
|
|
|
202
202
|
"condition_key",
|
|
203
203
|
"artifact_path",
|
|
204
204
|
"observation_artifact_path",
|
|
205
|
+
"fact_refs",
|
|
205
206
|
]);
|
|
206
207
|
return {
|
|
207
208
|
condition_key: key(cell.condition_key, `${cellLabel}.condition_key`),
|
|
208
209
|
artifact_path: nonEmpty(cell.artifact_path, `${cellLabel}.artifact_path`),
|
|
209
210
|
observation_artifact_path: nonEmpty(cell.observation_artifact_path, `${cellLabel}.observation_artifact_path`),
|
|
211
|
+
fact_refs: designFactRefs(cell.fact_refs, `${cellLabel}.fact_refs`),
|
|
210
212
|
};
|
|
211
213
|
}),
|
|
212
214
|
};
|
|
@@ -273,6 +275,14 @@ function strings(value, label) {
|
|
|
273
275
|
function keys(value, label) {
|
|
274
276
|
return array(value, label).map((item, index) => key(item, `${label}[${index}]`));
|
|
275
277
|
}
|
|
278
|
+
function designFactRefs(value, label) {
|
|
279
|
+
return array(value, label).map((item, index) => {
|
|
280
|
+
const result = nonEmpty(item, `${label}[${index}]`);
|
|
281
|
+
if (!/^[a-z0-9][a-z0-9._-]*$/u.test(result))
|
|
282
|
+
throw invalidRecord(`${label}[${index}]`);
|
|
283
|
+
return result;
|
|
284
|
+
});
|
|
285
|
+
}
|
|
276
286
|
function sha(value, label) {
|
|
277
287
|
const result = nonEmpty(value, label);
|
|
278
288
|
if (!/^[a-f0-9]{64}$/u.test(result))
|
|
@@ -53,6 +53,7 @@ function validateDesignMethod(check, record, artifactHashes) {
|
|
|
53
53
|
{
|
|
54
54
|
artifact_path: item.path,
|
|
55
55
|
observation_artifact_path: item.observation_path,
|
|
56
|
+
fact_refs: item.fact_refs,
|
|
56
57
|
},
|
|
57
58
|
]));
|
|
58
59
|
if (record.cells.length !== expected.size)
|
|
@@ -62,6 +63,8 @@ function validateDesignMethod(check, record, artifactHashes) {
|
|
|
62
63
|
if (expectedCell?.artifact_path !== cell.artifact_path ||
|
|
63
64
|
expectedCell?.observation_artifact_path !== cell.observation_artifact_path)
|
|
64
65
|
return "design_method_artifact_path_mismatch";
|
|
66
|
+
if (!same([...cell.fact_refs].sort(), [...(expectedCell?.fact_refs ?? [])].sort()))
|
|
67
|
+
return "design_method_fact_refs_mismatch";
|
|
65
68
|
if (!artifactHashes[cell.artifact_path])
|
|
66
69
|
return "design_method_artifact_missing";
|
|
67
70
|
if (!artifactHashes[cell.observation_artifact_path])
|
|
@@ -80,6 +80,7 @@ export interface DesignMethodEvidenceV2 extends EvidenceRecordBaseV2 {
|
|
|
80
80
|
condition_key: string;
|
|
81
81
|
artifact_path: string;
|
|
82
82
|
observation_artifact_path: string;
|
|
83
|
+
fact_refs: string[];
|
|
83
84
|
}>;
|
|
84
85
|
}
|
|
85
86
|
export interface InputVariationEvidenceV2 extends EvidenceRecordBaseV2 {
|
|
@@ -70,7 +70,7 @@ function collectOutcome(outcome, label, missing) {
|
|
|
70
70
|
for (const [methodIndex, method] of rows(target.verification_method_bindings).entries()) {
|
|
71
71
|
required(method, `${label}.product.surface_bindings[${bindingIndex}].design_targets[${targetIndex}].verification_method_bindings[${methodIndex}]`, ["evidence_artifacts"], missing);
|
|
72
72
|
for (const [artifactIndex, artifact] of rows(method.evidence_artifacts).entries())
|
|
73
|
-
required(artifact, `${label}.product.surface_bindings[${bindingIndex}].design_targets[${targetIndex}].verification_method_bindings[${methodIndex}].evidence_artifacts[${artifactIndex}]`, ["observation_path"], missing);
|
|
73
|
+
required(artifact, `${label}.product.surface_bindings[${bindingIndex}].design_targets[${targetIndex}].verification_method_bindings[${methodIndex}].evidence_artifacts[${artifactIndex}]`, ["observation_path", "fact_refs"], missing);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -19,6 +19,7 @@ function validateDesignTargets({ outcome, binding, outcomeClaims, checks, carrie
|
|
|
19
19
|
if (!target.verification_method_bindings.length)
|
|
20
20
|
issue(report, "ui_design_target_verification_methods_required", label);
|
|
21
21
|
const methodArtifactPaths = new Set();
|
|
22
|
+
const methodFactRefs = new Set();
|
|
22
23
|
for (const [name, values] of [
|
|
23
24
|
["source_paths", target.source_paths],
|
|
24
25
|
["condition_keys", target.condition_keys],
|
|
@@ -60,6 +61,12 @@ function validateDesignTargets({ outcome, binding, outcomeClaims, checks, carrie
|
|
|
60
61
|
if (!sameSet(conditionKeys, target.condition_keys))
|
|
61
62
|
issue(report, "ui_design_method_evidence_conditions_mismatch", `${label}:${methodBinding.method}`);
|
|
62
63
|
for (const artifact of methodBinding.evidence_artifacts) {
|
|
64
|
+
unique(artifact.fact_refs, "ui_design_method_fact_ref_duplicate", `${label}:${methodBinding.method}:${artifact.condition_key}`, report);
|
|
65
|
+
for (const factRef of artifact.fact_refs) {
|
|
66
|
+
if (methodFactRefs.has(factRef))
|
|
67
|
+
issue(report, "ui_design_method_fact_ref_reused", `${label}:${factRef}`);
|
|
68
|
+
methodFactRefs.add(factRef);
|
|
69
|
+
}
|
|
63
70
|
for (const [kind, artifactPath] of [
|
|
64
71
|
["record", artifact.path],
|
|
65
72
|
["observation", artifact.observation_path],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DESIGN_RESOURCE_VERIFICATION_METHODS } from "./design-resource-handoff-types.js";
|
|
2
2
|
import { EXECUTION_TARGET_CAPABILITIES } from "./execution-target-capabilities.js";
|
|
3
|
-
import { array, key, literal, object, repositoryFile, repositoryFiles, string, strings, } from "./long-task-shape-primitives.js";
|
|
3
|
+
import { array, fail, key, literal, object, repositoryFile, repositoryFiles, string, strings, } from "./long-task-shape-primitives.js";
|
|
4
4
|
export function parseSurfaceBindings(value, label) {
|
|
5
5
|
return array(value, label).map((item, index) => {
|
|
6
6
|
const itemLabel = `${label}[${index}]`;
|
|
@@ -99,11 +99,13 @@ function parseVerificationMethodBindings(value, label) {
|
|
|
99
99
|
"condition_key",
|
|
100
100
|
"path",
|
|
101
101
|
"observation_path",
|
|
102
|
+
"fact_refs",
|
|
102
103
|
]);
|
|
103
104
|
return {
|
|
104
105
|
condition_key: key(entry.condition_key, `${artifactLabel}.condition_key`),
|
|
105
106
|
path: repositoryFile(entry.path, `${artifactLabel}.path`),
|
|
106
107
|
observation_path: repositoryFile(entry.observation_path, `${artifactLabel}.observation_path`),
|
|
108
|
+
fact_refs: designFactRefs(entry.fact_refs, `${artifactLabel}.fact_refs`),
|
|
107
109
|
};
|
|
108
110
|
}),
|
|
109
111
|
};
|
|
@@ -112,3 +114,12 @@ function parseVerificationMethodBindings(value, label) {
|
|
|
112
114
|
function keys(value, label) {
|
|
113
115
|
return array(value, label).map((item, index) => key(item, `${label}[${index}]`));
|
|
114
116
|
}
|
|
117
|
+
function designFactRefs(value, label) {
|
|
118
|
+
return array(value, label).map((item, index) => {
|
|
119
|
+
const itemLabel = `${label}[${index}]`;
|
|
120
|
+
const result = string(item, itemLabel);
|
|
121
|
+
if (!/^[a-z0-9][a-z0-9._-]*$/u.test(result))
|
|
122
|
+
fail(itemLabel, "must match ^[a-z0-9][a-z0-9._-]*$");
|
|
123
|
+
return result;
|
|
124
|
+
});
|
|
125
|
+
}
|
package/dist/lib/migrations.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
1
2
|
import path from "node:path";
|
|
2
3
|
import { promises as fs } from "node:fs";
|
|
3
4
|
import { CONTEXT_MANIFEST_PATH, contextManifestFromExistingAreas, } from "./context-manifest.js";
|
|
@@ -13,6 +14,8 @@ import { semanticDriftMigrationFields } from "./long-task-semantic-drift-migrati
|
|
|
13
14
|
async function verifyNoop() {
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
17
|
+
const REMOVED_NORMAL_LONG_TASK_SKILL = "normal-long-task";
|
|
18
|
+
const REMOVED_NORMAL_LONG_TASK_SKILL_SHA256 = "7a4f755da9a32e07f258d6c7fc5e5c70395257c72efb8a9ad4995cddcc4c73ba";
|
|
16
19
|
export const migrations = [
|
|
17
20
|
legacySdlcHarnessMigration,
|
|
18
21
|
{
|
|
@@ -25,6 +28,17 @@ export const migrations = [
|
|
|
25
28
|
detect: detectLongTaskSemanticDriftAuthority,
|
|
26
29
|
verify: verifyNoop,
|
|
27
30
|
},
|
|
31
|
+
{
|
|
32
|
+
id: "remove-normal-long-task-skill",
|
|
33
|
+
introducedIn: "0.8.4",
|
|
34
|
+
description: "Remove the obsolete normal-long-task compatibility Skill; long-task-workflow is the sole explicit Long-Task execution Skill.",
|
|
35
|
+
scope: "<harnessRoot>/skills/normal-long-task",
|
|
36
|
+
risk: "safe",
|
|
37
|
+
manualMessage: "The same-name directory differs from the former package-owned compatibility Skill. Preserve any user-authored content elsewhere, then remove the directory manually.",
|
|
38
|
+
detect: detectRemovedNormalLongTaskSkill,
|
|
39
|
+
apply: migrateRemovedNormalLongTaskSkill,
|
|
40
|
+
verify: verifyRemovedNormalLongTaskSkill,
|
|
41
|
+
},
|
|
28
42
|
{
|
|
29
43
|
id: "long-task-v1-retirement",
|
|
30
44
|
introducedIn: "0.6.0",
|
|
@@ -131,6 +145,56 @@ async function detectLongTaskSemanticDriftAuthority(projectRoot, _root, migratio
|
|
|
131
145
|
item(migration, "manual_required", ".long-task/delivery-contract.yaml", `The active/draft V2 Contract predates semantic-drift authority and is missing: ${fields.slice(0, 12).join(", ")}${fields.length > 12 ? `, +${fields.length - 12} more` : ""}. Re-author these meanings from Source; do not synthesize them from old passing evidence.`),
|
|
132
146
|
];
|
|
133
147
|
}
|
|
148
|
+
async function detectRemovedNormalLongTaskSkill(projectRoot, root, migration) {
|
|
149
|
+
const skill = removedNormalLongTaskSkillPath(projectRoot, root);
|
|
150
|
+
const state = await removedNormalLongTaskSkillState(skill);
|
|
151
|
+
if (state === "absent")
|
|
152
|
+
return [];
|
|
153
|
+
const relative = path.relative(projectRoot, skill).split(path.sep).join("/");
|
|
154
|
+
return [
|
|
155
|
+
item(migration, state === "package-owned" ? "safe_pending" : "manual_required", relative, state === "package-owned"
|
|
156
|
+
? "Remove the exact obsolete package-owned compatibility Skill."
|
|
157
|
+
: "The obsolete Skill directory contains modified or additional content; preserve any user-authored material elsewhere and remove it manually."),
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
async function migrateRemovedNormalLongTaskSkill(projectRoot, root, report) {
|
|
161
|
+
const skill = removedNormalLongTaskSkillPath(projectRoot, root);
|
|
162
|
+
const state = await removedNormalLongTaskSkillState(skill);
|
|
163
|
+
const relative = path.relative(projectRoot, skill).split(path.sep).join("/");
|
|
164
|
+
if (state === "absent") {
|
|
165
|
+
report.skipped.push("remove-normal-long-task-skill");
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (state !== "package-owned") {
|
|
169
|
+
throw new Error(`${relative} changed after upgrade planning; rerun upgrade and resolve the manual_required item`);
|
|
170
|
+
}
|
|
171
|
+
await fs.rm(skill, { recursive: true, force: true });
|
|
172
|
+
report.changed.push(relative);
|
|
173
|
+
}
|
|
174
|
+
async function verifyRemovedNormalLongTaskSkill(projectRoot, root) {
|
|
175
|
+
if (await pathExists(removedNormalLongTaskSkillPath(projectRoot, root))) {
|
|
176
|
+
throw new Error("remove-normal-long-task-skill migration verification failed");
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function removedNormalLongTaskSkillPath(projectRoot, root) {
|
|
180
|
+
return path.join(projectRoot, root, "skills", REMOVED_NORMAL_LONG_TASK_SKILL);
|
|
181
|
+
}
|
|
182
|
+
async function removedNormalLongTaskSkillState(skill) {
|
|
183
|
+
if (!(await pathExists(skill)))
|
|
184
|
+
return "absent";
|
|
185
|
+
const files = await listFiles(skill);
|
|
186
|
+
if (files.length === 0)
|
|
187
|
+
return "package-owned";
|
|
188
|
+
if (files.length !== 1 ||
|
|
189
|
+
path.relative(skill, files[0]).split(path.sep).join("/") !== "SKILL.md") {
|
|
190
|
+
return "modified";
|
|
191
|
+
}
|
|
192
|
+
const normalized = (await readText(files[0])).replace(/\r\n/g, "\n");
|
|
193
|
+
const digest = createHash("sha256").update(normalized).digest("hex");
|
|
194
|
+
return digest === REMOVED_NORMAL_LONG_TASK_SKILL_SHA256
|
|
195
|
+
? "package-owned"
|
|
196
|
+
: "modified";
|
|
197
|
+
}
|
|
134
198
|
async function detectLongTaskV1Retirement(projectRoot, root, migration) {
|
|
135
199
|
const items = [];
|
|
136
200
|
const hook = path.join(projectRoot, root, "hooks", "long-task-hook.mjs");
|
package/dist/lib/profiles.js
CHANGED
|
@@ -58,8 +58,6 @@ export function enabledManagedSkillNames(config) {
|
|
|
58
58
|
"design-system-authoring",
|
|
59
59
|
"design-resource-authoring",
|
|
60
60
|
]);
|
|
61
|
-
if (isProfileEnabled(config, "workflow-default"))
|
|
62
|
-
names.add("normal-long-task");
|
|
63
61
|
if (isProfileEnabled(config, "long-task")) {
|
|
64
62
|
names.add("long-task-workflow");
|
|
65
63
|
names.add("source-plan-authoring");
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
],
|
|
40
40
|
"$defs": {
|
|
41
41
|
"key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
42
|
+
"designFactKey": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" },
|
|
43
|
+
"designFactRefs": { "type": "array", "items": { "$ref": "#/$defs/designFactKey" }, "uniqueItems": true },
|
|
42
44
|
"nonEmpty": { "type": "string", "minLength": 1 },
|
|
43
45
|
"nonEmptyStrings": { "type": "array", "items": { "$ref": "#/$defs/nonEmpty" } },
|
|
44
46
|
"executionTargetCapability": { "enum": ["browser-runtime", "native-runtime", "desktop-runtime", "service-runtime", "process-runtime", "external-runtime", "cold-start", "production-root", "pointer-input", "keyboard-input", "touch-input", "viewport-control", "pixel-density-observation", "safe-area-observation", "motion-observation", "reduced-motion", "color-scheme-control", "text-scale-control", "assistive-technology", "screen-reader", "physical-device", "device-orientation", "sensor-input", "camera-input", "haptic-output", "thermal-observation", "power-mode-control", "persistent-storage", "network-boundary"] },
|
|
@@ -304,7 +306,7 @@
|
|
|
304
306
|
"properties": {
|
|
305
307
|
"method": { "$ref": "#/$defs/designVerificationMethod" },
|
|
306
308
|
"assertion_ref": { "$ref": "#/$defs/key" },
|
|
307
|
-
"evidence_artifacts": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["condition_key", "path", "observation_path"], "properties": { "condition_key": { "$ref": "#/$defs/key" }, "path": { "$ref": "#/$defs/nonEmpty" }, "observation_path": { "$ref": "#/$defs/nonEmpty" } } } }
|
|
309
|
+
"evidence_artifacts": { "type": "array", "minItems": 1, "items": { "type": "object", "additionalProperties": false, "required": ["condition_key", "path", "observation_path", "fact_refs"], "properties": { "condition_key": { "$ref": "#/$defs/key" }, "path": { "$ref": "#/$defs/nonEmpty" }, "observation_path": { "$ref": "#/$defs/nonEmpty" }, "fact_refs": { "$ref": "#/$defs/designFactRefs" } } } }
|
|
308
310
|
}
|
|
309
311
|
}
|
|
310
312
|
},
|
package/migrations/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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
|
-
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.
|
|
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
|
+
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,84 +1,84 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "project-tiny-context-harness",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "Minimal project memory and validation harness for AI coding agents.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"author": "Seven128",
|
|
7
|
-
"homepage": "https://github.com/Seven128/project-tiny-context-harness#readme",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/Seven128/project-tiny-context-harness.git",
|
|
11
|
-
"directory": "packages/ty-context"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/Seven128/project-tiny-context-harness/issues"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"ai-agents",
|
|
18
|
-
"coding-agent",
|
|
19
|
-
"codex",
|
|
20
|
-
"claude-code",
|
|
21
|
-
"cursor",
|
|
22
|
-
"gemini-cli",
|
|
23
|
-
"opencode",
|
|
24
|
-
"agent-context",
|
|
25
|
-
"context-engineering",
|
|
26
|
-
"context-management",
|
|
27
|
-
"agents-md",
|
|
28
|
-
"project-memory",
|
|
29
|
-
"agent-memory",
|
|
30
|
-
"ai-coding",
|
|
31
|
-
"multi-agent",
|
|
32
|
-
"llm",
|
|
33
|
-
"developer-tools",
|
|
34
|
-
"developer-productivity",
|
|
35
|
-
"cli",
|
|
36
|
-
"ty-context",
|
|
37
|
-
"workflow"
|
|
38
|
-
],
|
|
39
|
-
"type": "module",
|
|
40
|
-
"bin": {
|
|
41
|
-
"ty-context": "dist/cli.js"
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"README.md",
|
|
45
|
-
"dist",
|
|
46
|
-
"assets",
|
|
47
|
-
"migrations",
|
|
48
|
-
"source-mappings.yaml"
|
|
49
|
-
],
|
|
50
|
-
"scripts": {
|
|
51
|
-
"build": "node ../../tools/package_build_fingerprint.mjs build",
|
|
52
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
53
|
-
"test:default:built": "node ../../tests/ty-context/run-package-suite.mjs default",
|
|
54
|
-
"test:default": "npm run build && npm run test:default:built",
|
|
55
|
-
"test:built": "npm run test:default:built && npm run test:long-task-workflow:built",
|
|
56
|
-
"test:trust:built": "npm run test:default:built && npm run test:long-task-trust:built",
|
|
57
|
-
"test:trust": "npm run build && npm run test:trust:built",
|
|
58
|
-
"pretest": "npm run build",
|
|
59
|
-
"test": "npm run test:built",
|
|
60
|
-
"test:workflow-default:built": "node --test --test-concurrency=1 ../../tests/ty-context/workflow-contract-routing.test.mjs",
|
|
1
|
+
{
|
|
2
|
+
"name": "project-tiny-context-harness",
|
|
3
|
+
"version": "0.8.4",
|
|
4
|
+
"description": "Minimal project memory and validation harness for AI coding agents.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Seven128",
|
|
7
|
+
"homepage": "https://github.com/Seven128/project-tiny-context-harness#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Seven128/project-tiny-context-harness.git",
|
|
11
|
+
"directory": "packages/ty-context"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Seven128/project-tiny-context-harness/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ai-agents",
|
|
18
|
+
"coding-agent",
|
|
19
|
+
"codex",
|
|
20
|
+
"claude-code",
|
|
21
|
+
"cursor",
|
|
22
|
+
"gemini-cli",
|
|
23
|
+
"opencode",
|
|
24
|
+
"agent-context",
|
|
25
|
+
"context-engineering",
|
|
26
|
+
"context-management",
|
|
27
|
+
"agents-md",
|
|
28
|
+
"project-memory",
|
|
29
|
+
"agent-memory",
|
|
30
|
+
"ai-coding",
|
|
31
|
+
"multi-agent",
|
|
32
|
+
"llm",
|
|
33
|
+
"developer-tools",
|
|
34
|
+
"developer-productivity",
|
|
35
|
+
"cli",
|
|
36
|
+
"ty-context",
|
|
37
|
+
"workflow"
|
|
38
|
+
],
|
|
39
|
+
"type": "module",
|
|
40
|
+
"bin": {
|
|
41
|
+
"ty-context": "dist/cli.js"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"README.md",
|
|
45
|
+
"dist",
|
|
46
|
+
"assets",
|
|
47
|
+
"migrations",
|
|
48
|
+
"source-mappings.yaml"
|
|
49
|
+
],
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "node ../../tools/package_build_fingerprint.mjs build",
|
|
52
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
53
|
+
"test:default:built": "node ../../tests/ty-context/run-package-suite.mjs default",
|
|
54
|
+
"test:default": "npm run build && npm run test:default:built",
|
|
55
|
+
"test:built": "npm run test:default:built && npm run test:long-task-workflow:built",
|
|
56
|
+
"test:trust:built": "npm run test:default:built && npm run test:long-task-trust:built",
|
|
57
|
+
"test:trust": "npm run build && npm run test:trust:built",
|
|
58
|
+
"pretest": "npm run build",
|
|
59
|
+
"test": "npm run test:built",
|
|
60
|
+
"test:workflow-default:built": "node --test --test-concurrency=1 ../../tests/ty-context/workflow-contract-routing.test.mjs",
|
|
61
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-assurance-closure.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
|
-
"test:delivery-contract": "npm run build && npm run test:delivery-contract:built",
|
|
63
|
-
"test:long-task-workflow:built": "node ../../tests/ty-context/run-package-suite.mjs long-task",
|
|
64
|
-
"test:long-task-workflow": "npm run build && npm run test:long-task-workflow:built",
|
|
65
|
-
"test:long-task-trust:built": "node ../../tests/ty-context/run-package-suite.mjs long-task-trust",
|
|
66
|
-
"test:long-task-trust": "npm run build && npm run test:long-task-trust:built",
|
|
67
|
-
"test:long-task-performance": "npm run build && node ../../tests/ty-context/long-task-performance.mjs",
|
|
68
|
-
"prepack": "npm run build"
|
|
69
|
-
},
|
|
70
|
-
"engines": {
|
|
71
|
-
"node": ">=24"
|
|
72
|
-
},
|
|
73
|
-
"dependencies": {
|
|
74
|
-
"@google/design.md": "^0.3.0",
|
|
75
|
-
"impeccable": "^3.2.1",
|
|
76
|
-
"re2js": "2.8.6",
|
|
77
|
-
"smol-toml": "1.7.0",
|
|
78
|
-
"yaml": "^2.9.0"
|
|
79
|
-
},
|
|
80
|
-
"devDependencies": {
|
|
81
|
-
"@types/node": "^26.1.1",
|
|
82
|
-
"typescript": "^7.0.2"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
62
|
+
"test:delivery-contract": "npm run build && npm run test:delivery-contract:built",
|
|
63
|
+
"test:long-task-workflow:built": "node ../../tests/ty-context/run-package-suite.mjs long-task",
|
|
64
|
+
"test:long-task-workflow": "npm run build && npm run test:long-task-workflow:built",
|
|
65
|
+
"test:long-task-trust:built": "node ../../tests/ty-context/run-package-suite.mjs long-task-trust",
|
|
66
|
+
"test:long-task-trust": "npm run build && npm run test:long-task-trust:built",
|
|
67
|
+
"test:long-task-performance": "npm run build && node ../../tests/ty-context/long-task-performance.mjs",
|
|
68
|
+
"prepack": "npm run build"
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=24"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"@google/design.md": "^0.3.0",
|
|
75
|
+
"impeccable": "^3.2.1",
|
|
76
|
+
"re2js": "2.8.6",
|
|
77
|
+
"smol-toml": "1.7.0",
|
|
78
|
+
"yaml": "^2.9.0"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@types/node": "^26.1.1",
|
|
82
|
+
"typescript": "^7.0.2"
|
|
83
|
+
}
|
|
84
|
+
}
|
package/source-mappings.yaml
CHANGED
|
@@ -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"
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: normal-long-task
|
|
3
|
-
description: Retired compatibility pointer for users who explicitly invoke /normal-long-task. Direct them to /long-task-workflow and do not create legacy checklist, prompt, audit, matrix, verdict, or plan artifacts.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Retired: Normal Long Task
|
|
7
|
-
|
|
8
|
-
`/normal-long-task` no longer defines a second long-task artifact workflow.
|
|
9
|
-
|
|
10
|
-
Use `/long-task-workflow` for one Canonical Delivery Contract, the current platform-native Goal, rolling implementation in the current workspace, targeted repair verification, a same-snapshot Final Gate and Stop freshness.
|
|
11
|
-
|
|
12
|
-
Do not create a preserved-source/checklist pair, target-mode prompt, Local Audit, matrix, verdict or second plan from this compatibility invocation.
|