@mjasnikovs/pi-task 0.17.1 → 0.17.2
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/dist/task/verify-work.js +61 -39
- package/package.json +1 -1
package/dist/task/verify-work.js
CHANGED
|
@@ -17,17 +17,27 @@
|
|
|
17
17
|
* PASS / FAIL verdict. If the spec's VERIFY is legitimately a no-op (config-only
|
|
18
18
|
* change, re-read of a file), the model says so and that is a PASS.
|
|
19
19
|
*
|
|
20
|
-
* It must verify the REAL deliverable, not a
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
20
|
+
* It must verify the REAL deliverable AS SHIPPED, not a run the verifier itself
|
|
21
|
+
* prepared into passing. The failure class is broader than a bad VERIFY block: the
|
|
22
|
+
* child has `bash`, so it can quietly make almost anything go green — export an env
|
|
23
|
+
* var, source a config file, run a different command, rebuild in a scratch dir,
|
|
24
|
+
* fabricate the artifact by hand — and then report PASS, masking a defect a fresh
|
|
25
|
+
* checkout or CI run would hit. (This is exactly what sank an mx5 run: the verify
|
|
26
|
+
* child `export`ed the test DB URL its own shell, watched the suite go green, and
|
|
27
|
+
* passed a project whose documented command failed unaided.) The prompt therefore
|
|
28
|
+
* anchors the child to ONE principle: run the project's own commands verbatim in the
|
|
29
|
+
* tree as found, and treat any preparation/repair/substitution it had to perform to
|
|
30
|
+
* reach green as ITSELF the defect — while still distinguishing a genuinely-absent
|
|
31
|
+
* EXTERNAL service (an environment gap, not a code fault) from the project mis-wiring
|
|
32
|
+
* how it connects. This generalises across languages and toolchains and assumes no
|
|
33
|
+
* tests, build, or particular runtime.
|
|
34
|
+
*
|
|
35
|
+
* A/B-proven on the live local model (Qwen3.6-35B), 5 runs/arm on a work-around-to-pass
|
|
36
|
+
* fixture (documented command fails unaided; greppable env file makes it pass): the old
|
|
37
|
+
* prompt false-passed 2/5; the new prompt caught it 5/5, each time naming the unwired
|
|
38
|
+
* config. Guards (3 runs/arm): a healthy project still PASSes 3/3 (no false-fail), a
|
|
39
|
+
* genuinely-broken shipped build FAILs 3/3, and a genuine external-service gap — which
|
|
40
|
+
* the OLD prompt wrongly blamed on the code 3/3 — now correctly PASSes 3/3.
|
|
31
41
|
*
|
|
32
42
|
* It runs as a GATE right after the implementation turn, BEFORE the task is
|
|
33
43
|
* checked off or committed. A FAIL stops the /task-auto run exactly like an
|
|
@@ -106,37 +116,49 @@ export function buildVerifyPrompt(spec) {
|
|
|
106
116
|
'THE TASK SPEC (its ACCEPTANCE criteria and VERIFY block are the contract):',
|
|
107
117
|
spec.trim(),
|
|
108
118
|
'',
|
|
109
|
-
'How to verify — verify the REAL deliverable
|
|
110
|
-
|
|
111
|
-
'
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
'
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
'
|
|
118
|
-
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
123
|
-
'
|
|
124
|
-
'
|
|
125
|
-
'
|
|
126
|
-
'
|
|
127
|
-
'
|
|
128
|
-
'
|
|
129
|
-
'
|
|
130
|
-
'
|
|
131
|
-
'
|
|
132
|
-
'
|
|
133
|
-
'
|
|
119
|
+
'How to verify — verify the REAL, shipped deliverable exactly as an unaided fresh',
|
|
120
|
+
'checkout (or CI run) would experience it:',
|
|
121
|
+
'',
|
|
122
|
+
"1. Run the project's OWN commands — the verbatim scripts / targets / binaries it",
|
|
123
|
+
' ships (package.json scripts, Makefile targets, the command the spec names) —',
|
|
124
|
+
' exactly as written, in the workspace as you found it. Judge the artifact or',
|
|
125
|
+
" output they actually PRODUCE. The project's own command and its real output are",
|
|
126
|
+
" the bar; also run the spec's VERIFY block, but it does not override that bar.",
|
|
127
|
+
'',
|
|
128
|
+
'2. Do NOT prepare, repair, reconfigure, or stand in for the run to make a check',
|
|
129
|
+
' pass. Concretely, to reach a green result you must NOT: set or export an',
|
|
130
|
+
' environment variable, source an env file, add or change a flag, edit or replace',
|
|
131
|
+
' the command, install or add a dependency / plugin / import / config the project',
|
|
132
|
+
' lacks, create or pre-populate files or state by hand, or rebuild / compile in a',
|
|
133
|
+
' scratch dir or with options the project does not itself use. If a check only goes',
|
|
134
|
+
' green AFTER you intervene like that, then the very thing you had to do IS the',
|
|
135
|
+
' defect: the project does not work as shipped. Report FAIL and name the missing or',
|
|
136
|
+
' broken wiring exactly (e.g. "shipped command `<cmd>` fails unaided because <why>").',
|
|
137
|
+
'',
|
|
138
|
+
'3. Presence of a token / directive / string in a SOURCE file is NOT verification.',
|
|
139
|
+
' Judge the produced artifact and the real runtime behavior. A raw build directive',
|
|
140
|
+
' that SURVIVES into the built output means the build never ran — that is a FAIL.',
|
|
141
|
+
'',
|
|
142
|
+
'4. Treat the ACCEPTANCE criteria as the bar. If a command fails, or its real output',
|
|
143
|
+
' contradicts an ACCEPTANCE criterion, the work has NOT verified.',
|
|
144
|
+
'',
|
|
145
|
+
'5. The ONLY thing you may assume is already provided is a genuinely EXTERNAL running',
|
|
146
|
+
' service or network resource (a database server, an API host) that the project',
|
|
147
|
+
' documents as a prerequisite. If a command fails purely because such an external',
|
|
148
|
+
' service is ABSENT from this machine — and NOT because the project misconfigures',
|
|
149
|
+
' how it connects — note that as an environment gap and judge the rest; do not fail',
|
|
150
|
+
' the code for it. But a command that fails because of how the PROJECT ITSELF is',
|
|
151
|
+
' wired (config it owns but does not load, a wrong default, a command that cannot',
|
|
152
|
+
' run unaided) is a defect, not an environment gap.',
|
|
153
|
+
'',
|
|
154
|
+
'6. If the spec legitimately has no runnable verification (a pure docs / config change',
|
|
134
155
|
' with nothing to build or run), validating it cleanly is a PASS.',
|
|
135
|
-
'
|
|
156
|
+
'',
|
|
157
|
+
'7. Do NOT edit anything to make a check pass. Report what you actually saw.',
|
|
136
158
|
'',
|
|
137
159
|
'When you are done, output EXACTLY ONE of these as the final line:',
|
|
138
|
-
|
|
139
|
-
' WORK-VERIFIED: FAIL <text> (the
|
|
160
|
+
" WORK-VERIFIED: PASS (the project's own command, run unaided, met the spec)",
|
|
161
|
+
' WORK-VERIFIED: FAIL <text> (the shipped command failed or did not meet the spec; say what failed)',
|
|
140
162
|
'Output the verdict line verbatim — it is parsed mechanically.'
|
|
141
163
|
].join('\n');
|
|
142
164
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjasnikovs/pi-task",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "Deterministic spec-orchestration for local models, with a bundled real-time remote web view and web/docs/fetch/worker subagent tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|