project-tiny-context-harness 0.2.79 → 0.2.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -15
- package/assets/README.md +17 -15
- package/assets/README.zh-CN.md +19 -9
- package/assets/agents/AGENTS_CORE.md +42 -42
- package/assets/github/harness.yml +1 -1
- package/assets/skills/composite-long-task-workflow/SKILL.md +218 -0
- package/assets/skills/composite-long-task-workflow/assets/execution-binding.template.md +33 -0
- package/assets/skills/composite-long-task-workflow/assets/goal-objective.template.md +26 -0
- package/assets/skills/composite-long-task-workflow/references/composite-long-task-workflow-protocol.md +644 -0
- package/assets/skills/normal-long-task/SKILL.md +12 -12
- package/dist/commands/composite-long-task.d.ts +6 -0
- package/dist/commands/composite-long-task.js +103 -0
- package/dist/commands/index.js +5 -3
- package/dist/commands/superpowers.js +6 -87
- package/dist/lib/composite-long-task-renderer.d.ts +12 -0
- package/dist/lib/composite-long-task-renderer.js +109 -0
- package/dist/lib/superpowers-task-assertion-normalizers.d.ts +3 -0
- package/dist/lib/superpowers-task-assertion-normalizers.js +67 -0
- package/dist/lib/superpowers-task-assertions.d.ts +20 -0
- package/dist/lib/superpowers-task-assertions.js +242 -0
- package/dist/lib/superpowers-task-compile-diagnostics.d.ts +5 -0
- package/dist/lib/superpowers-task-compile-diagnostics.js +20 -0
- package/dist/lib/superpowers-task-compile-guards.d.ts +2 -0
- package/dist/lib/superpowers-task-compile-guards.js +66 -0
- package/dist/lib/superpowers-task-compile.js +26 -6
- package/dist/lib/superpowers-task-conformance.d.ts +2 -0
- package/dist/lib/superpowers-task-conformance.js +24 -0
- package/dist/lib/superpowers-task-derive.js +61 -5
- package/dist/lib/superpowers-task-gates.js +62 -6
- package/dist/lib/superpowers-task-source-compile.js +94 -14
- package/dist/lib/superpowers-task-source-parser.js +20 -18
- package/dist/lib/superpowers-task-state-schema.d.ts +61 -1
- package/dist/lib/superpowers-task-state.js +19 -3
- package/dist/lib/superpowers-task-status.d.ts +2 -0
- package/dist/lib/superpowers-task-status.js +14 -0
- package/dist/lib/superpowers-task-validator.d.ts +1 -0
- package/dist/lib/superpowers-task-validator.js +30 -4
- package/package.json +5 -5
- package/assets/skills/superpowers-long-task/SKILL.md +0 -612
|
@@ -3,9 +3,12 @@ import { pathExists, readText } from "./fs.js";
|
|
|
3
3
|
import { findSensitiveEvidence } from "./plan-acceptance-evidence.js";
|
|
4
4
|
import { primitiveText, repoRelative, resolveInputDir } from "./plan-validator-common.js";
|
|
5
5
|
import { derivedMatchesState } from "./superpowers-task-derive.js";
|
|
6
|
+
import { validatePlanCompletionConformance } from "./superpowers-task-conformance.js";
|
|
6
7
|
import { fullPopulationRequired, validateDeliveryContract, validateScopeConflicts } from "./superpowers-task-delivery.js";
|
|
7
8
|
import { loadSuperpowersState, sha256 } from "./superpowers-task-state.js";
|
|
9
|
+
import { validateCanonicalStatuses } from "./superpowers-task-status.js";
|
|
8
10
|
import { isRecord } from "./superpowers-task-state-schema.js";
|
|
11
|
+
import { evaluateProofLayerAssertions, isUiBrowserLayer } from "./superpowers-task-assertions.js";
|
|
9
12
|
export async function validateSuperpowersState(projectRoot, args = []) {
|
|
10
13
|
const info = [];
|
|
11
14
|
const warnings = [];
|
|
@@ -35,7 +38,9 @@ export async function validateSuperpowersState(projectRoot, args = []) {
|
|
|
35
38
|
}
|
|
36
39
|
await validateSourceHashes(targetDir, state, errors);
|
|
37
40
|
validateDeliveryContract(state, errors);
|
|
41
|
+
validateCanonicalStatuses(state, errors);
|
|
38
42
|
validateGraphReferences(state, errors);
|
|
43
|
+
validatePlanCompletionConformance(state, errors);
|
|
39
44
|
validateScopeConflicts(state, errors);
|
|
40
45
|
validateEvidenceRecords(state, errors);
|
|
41
46
|
validateProofLayers(state, errors);
|
|
@@ -163,7 +168,7 @@ function validateEvidenceRecords(state, errors) {
|
|
|
163
168
|
if (proofLayer.endsWith(".runtime") && /\b(mock|unit|viewmodel)\b/i.test(evidence.type)) {
|
|
164
169
|
errors.push(`${label} runtime proof cannot be mock/unit/viewmodel only`);
|
|
165
170
|
}
|
|
166
|
-
if (proofLayer.endsWith(".ui_browser") &&
|
|
171
|
+
if (proofLayer.endsWith(".ui_browser") && !/(browser|ui_browser|screenshot|playwright)/i.test(evidence.type)) {
|
|
167
172
|
errors.push(`${label} UI proof must use browser owner surface evidence`);
|
|
168
173
|
}
|
|
169
174
|
}
|
|
@@ -185,6 +190,13 @@ function validateProofLayers(state, errors) {
|
|
|
185
190
|
errors.push(`proof layer ${layerId} references ${evidenceId} but that evidence does not prove it`);
|
|
186
191
|
}
|
|
187
192
|
}
|
|
193
|
+
if (layer.status === "satisfied") {
|
|
194
|
+
const evaluation = evaluateProofLayerAssertions(state, layerId);
|
|
195
|
+
errors.push(...evaluation.blocking_assertion_failures, ...evaluation.negative_evidence_findings);
|
|
196
|
+
if (isUiBrowserLayer(layerId) && evaluation.assertion_status !== "passed") {
|
|
197
|
+
errors.push(`proof layer ${layerId} ui_browser proof not machine-backed`);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
188
200
|
}
|
|
189
201
|
}
|
|
190
202
|
function validateAuditor(state, errors) {
|
|
@@ -221,6 +233,9 @@ function validateFinalCompletion(state, errors) {
|
|
|
221
233
|
errors.push("product_goal_complete=true but Context Delta coverage is unresolved");
|
|
222
234
|
}
|
|
223
235
|
}
|
|
236
|
+
validateFullPopulationEvidence(state, errors);
|
|
237
|
+
}
|
|
238
|
+
function validateFullPopulationEvidence(state, errors) {
|
|
224
239
|
if (fullPopulationRequired(state)) {
|
|
225
240
|
const sampleOnlyEvidence = state.evidence.filter((evidence) => evidence.does_not_prove.some((claim) => /\b(full[-_ ]?population|all[-_ ]?provider|all[-_ ]?interface|all[-_ ]?platform)\b/i.test(claim)));
|
|
226
241
|
if (sampleOnlyEvidence.length > 0) {
|
|
@@ -230,23 +245,34 @@ function validateFinalCompletion(state, errors) {
|
|
|
230
245
|
}
|
|
231
246
|
}
|
|
232
247
|
}
|
|
233
|
-
export function
|
|
248
|
+
export function completionConditionErrors(state) {
|
|
234
249
|
const errors = [];
|
|
235
250
|
validateShape(state, errors);
|
|
236
251
|
if (!hasUsableShape(state)) {
|
|
237
|
-
return
|
|
252
|
+
return errors;
|
|
238
253
|
}
|
|
239
254
|
validateDeliveryContract(state, errors);
|
|
240
255
|
validateScopeConflicts(state, errors);
|
|
241
256
|
validateGraphReferences(state, errors);
|
|
257
|
+
validatePlanCompletionConformance(state, errors);
|
|
242
258
|
validateEvidenceRecords(state, errors);
|
|
243
259
|
validateProofLayers(state, errors);
|
|
244
260
|
validateAuditor(state, errors);
|
|
261
|
+
validateFullPopulationEvidence(state, errors);
|
|
245
262
|
const planItems = Object.values(state.graph.plan_items);
|
|
246
263
|
const acceptanceCriteria = Object.values(state.graph.acceptance_criteria);
|
|
247
264
|
const proofLayers = Object.values(state.graph.proof_layers);
|
|
248
265
|
const allPlansComplete = planItems.every((item) => item.status === "complete" || item.status === "out_of_scope_NA");
|
|
249
266
|
const allAcsComplete = acceptanceCriteria.every((ac) => ac.status === "complete" || ac.status === "out_of_scope_NA");
|
|
250
267
|
const allLayersSatisfied = proofLayers.every((layer) => !layer.required || layer.status === "satisfied");
|
|
251
|
-
|
|
268
|
+
if (planItems.length === 0 || acceptanceCriteria.length === 0 || proofLayers.length === 0) {
|
|
269
|
+
errors.push("completion conditions require a compiled task graph with plan items, ACs and proof layers");
|
|
270
|
+
}
|
|
271
|
+
if (!allPlansComplete || !allAcsComplete || !allLayersSatisfied) {
|
|
272
|
+
errors.push("completion conditions require all required plan items, ACs and proof layers to be complete");
|
|
273
|
+
}
|
|
274
|
+
return errors;
|
|
275
|
+
}
|
|
276
|
+
export function allCompletionConditionsSatisfied(state) {
|
|
277
|
+
return completionConditionErrors(state).length === 0;
|
|
252
278
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "project-tiny-context-harness",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.81",
|
|
4
4
|
"description": "Minimal project memory and validation harness for AI coding agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Seven128",
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
"prepack": "npm run build"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
|
-
"node": ">=
|
|
58
|
+
"node": ">=24"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@google/design.md": "^0.
|
|
62
|
-
"impeccable": "^
|
|
61
|
+
"@google/design.md": "^0.3.0",
|
|
62
|
+
"impeccable": "^3.1.0",
|
|
63
63
|
"yaml": "^2.9.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@types/node": "^
|
|
66
|
+
"@types/node": "^26.0.0",
|
|
67
67
|
"typescript": "^5.5.0"
|
|
68
68
|
}
|
|
69
69
|
}
|