valent-pipeline 0.19.23 → 0.19.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valent-pipeline",
3
- "version": "0.19.23",
3
+ "version": "0.19.24",
4
4
  "description": "v3 multi-agent AI pipeline for software development lifecycle",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2030,11 +2030,30 @@ async function runStory(story) {
2030
2030
  }
2031
2031
  }
2032
2032
 
2033
+ // Shift-left pre-handoff self-gate (review 2026-06-15): the dev fan-out used to hand off WITHOUT
2034
+ // knowing which deterministic checks the pre-CRITIC STATIC gate would run the instant it did — so
2035
+ // lint/type failures and un-waived test skips reached the gate and cost a full rework round-trip
2036
+ // (a re-spawn), the dominant avoidable-rework pattern in the field (a soft correction-directive
2037
+ // reduced it but did not close it). Thread the gate's OWN checks into the build prompt so the dev
2038
+ // runs them IN its build turn (same context, no re-spawn) and hands off clean. The gate
2039
+ // (runPreCriticGate) stays the mechanical backstop; this just makes it pass first-try, cutting both
2040
+ // the round-trip cost and the rework-cycle count. Same preCriticChecks the gate runs; the
2041
+ // skip-waiver / spec-conformance rules are always named. Static + args only => journal-replay safe.
2042
+ const preHandoffStaticCmds = preCriticChecks.map((c) => subCmd(c, storyId, effectiveWorkspaces))
2043
+ const preHandoffNote = (preHandoffStaticCmds.length || specConformanceEnabled || traceCheckEnabled)
2044
+ ? '\n\n## Definition of done — run these BEFORE you write your handoff\n' +
2045
+ 'The deterministic pre-CRITIC gate runs the moment you hand off; a failure costs a full rework cycle (a re-spawn). Pass them first-try:\n' +
2046
+ preHandoffStaticCmds.map((c) => ` - \`${c}\` — must exit 0 (lint / type / static).\n`).join('') +
2047
+ ' - Every deliberately skipped or pending test MUST carry an inline `// valent-waiver: <reason>` (on the skip line or in the test name) — an un-waived skip is rejected by the spec-conformance check.\n' +
2048
+ ' - Do NOT drop a spec\'d assertion target or omit a spec\'d case to make a suite pass.\n' +
2049
+ 'Run them locally, fix EVERYTHING they flag, and only then write your handoff — this is part of the build, not the gate\'s job to find for you.'
2050
+ : ''
2051
+
2033
2052
  phase('Build')
2034
2053
  // Genuine barrier: CRITIC needs ALL active dev agents' work before reviewing.
2035
2054
  const builds = await parallel(
2036
2055
  devTasks.map((t) => () =>
2037
- spawn(t.agent, `${t.agent.toLowerCase()}.md`, (t.subject || 'Implement production code and tests per the brief and test spec.') + atddReadOnlyNote, {
2056
+ spawn(t.agent, `${t.agent.toLowerCase()}.md`, (t.subject || 'Implement production code and tests per the brief and test spec.') + atddReadOnlyNote + preHandoffNote, {
2038
2057
  label: `build:${t.ref}:${storyId}`,
2039
2058
  phase: 'Build',
2040
2059
  })),