snipara-companion 3.6.22 → 3.6.23

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 CHANGED
@@ -484,6 +484,13 @@ npx -y snipara-companion workflow producer-review --latest --outcome useful --re
484
484
  npx -y snipara-companion handoff --summary "auth impact mapped" --next "run auth tests"
485
485
  ```
486
486
 
487
+ For a stricter engineering workflow, add `--strict` to a completed
488
+ `workflow task-commit` or `workflow phase-commit`. Strict phase closeout requires
489
+ all declared tasks to be completed or skipped and requires every supplied
490
+ verification item to be passed. The default remains backward-compatible for
491
+ older workflows; strict mode is recommended for release, security, and
492
+ multi-agent work.
493
+
487
494
  Managed workflow judgments use risk-based authority. `info` and `watch`
488
495
  recommendations are accepted locally by policy and remain auditable; `risk` and
489
496
  `block` recommendations still need `workflow judgment-respond`. The immutable
package/dist/index.js CHANGED
@@ -35537,6 +35537,29 @@ function workflowOutcomeEvidence(values) {
35537
35537
  ];
35538
35538
  });
35539
35539
  }
35540
+ function assertStrictVerificationEvidence(values, subject) {
35541
+ const evidence = workflowOutcomeEvidence(values);
35542
+ if (evidence.length === 0) {
35543
+ throw new Error(`${subject} requires at least one --evidence passed:<check> in strict mode.`);
35544
+ }
35545
+ const nonPassing = evidence.filter((item) => item.status !== "passed");
35546
+ if (nonPassing.length > 0) {
35547
+ throw new Error(
35548
+ `${subject} has non-passing evidence in strict mode: ${nonPassing.map((item) => `${item.status}:${item.label}`).join(" | ")}`
35549
+ );
35550
+ }
35551
+ return evidence;
35552
+ }
35553
+ function assertStrictPhaseTasksCompleted(phase) {
35554
+ const incomplete = workflowTasks(phase).filter(
35555
+ (task) => !["completed", "skipped"].includes(task.status)
35556
+ );
35557
+ if (incomplete.length > 0) {
35558
+ throw new Error(
35559
+ `Phase '${phase.id}' has incomplete tasks in strict mode: ${incomplete.map((task) => `${task.id} (${task.status})`).join(", ")}`
35560
+ );
35561
+ }
35562
+ }
35540
35563
  var MANAGED_WORKFLOW_JUDGMENT_AUTONOMY_VERSION = "snipara.workflow.judgment-autonomy.v1";
35541
35564
  function isPolicyAutoEligibleRecommendation(recommendation) {
35542
35565
  return recommendation.severity === "info" || recommendation.severity === "watch";
@@ -36887,6 +36910,9 @@ async function workflowTaskCommitCommand(options) {
36887
36910
  const outcome = options.outcome ?? "completed";
36888
36911
  const category = options.category ?? "workflow-task";
36889
36912
  const files = options.files && options.files.length > 0 ? options.files : task.files ?? phase.files;
36913
+ if (options.strict && outcome === "completed") {
36914
+ assertStrictVerificationEvidence(options.evidence, `Task '${task.id}'`);
36915
+ }
36890
36916
  await memoryGuardCheckCommand({
36891
36917
  trigger: "commit",
36892
36918
  files,
@@ -37533,6 +37559,10 @@ async function workflowPhaseCommitCommand(options) {
37533
37559
  const outcome = options.outcome ?? "completed";
37534
37560
  const category = options.category ?? "workflow-phase";
37535
37561
  const files = options.files && options.files.length > 0 ? options.files : phase.files;
37562
+ if (options.strict && outcome === "completed") {
37563
+ assertStrictPhaseTasksCompleted(phase);
37564
+ assertStrictVerificationEvidence(options.evidence, `Phase '${phase.id}'`);
37565
+ }
37536
37566
  if (outcome === "completed" && workflowTasks(phase).some((task) => task.status === "blocked")) {
37537
37567
  throw new Error(
37538
37568
  `Phase '${phase.id}' still has blocked tasks. Retry or complete their recovery tasks before phase-commit.`
@@ -46464,7 +46494,7 @@ workflow.command("task-commit").description("Persist a task outcome and keep the
46464
46494
  "Task evidence as passed|failed|not-run|unknown:text; repeatable",
46465
46495
  collectOption,
46466
46496
  []
46467
- ).option("--json", "Print raw JSON").action(async (phaseId, taskId, options) => {
46497
+ ).option("--strict", "Require passed evidence before completing this task").option("--json", "Print raw JSON").action(async (phaseId, taskId, options) => {
46468
46498
  await workflowTaskCommitCommand({
46469
46499
  phaseId,
46470
46500
  taskId,
@@ -46478,6 +46508,7 @@ workflow.command("task-commit").description("Persist a task outcome and keep the
46478
46508
  outcome: options.outcome,
46479
46509
  files: options.files,
46480
46510
  evidence: options.evidence,
46511
+ strict: Boolean(options.strict),
46481
46512
  json: options.json
46482
46513
  });
46483
46514
  });
@@ -46524,7 +46555,7 @@ workflow.command("phase-commit").description(
46524
46555
  "Phase evidence as passed|failed|not-run|unknown:text; repeatable",
46525
46556
  collectOption,
46526
46557
  []
46527
- ).option("--json", "Print raw JSON").action(async (phaseId, options) => {
46558
+ ).option("--strict", "Require all tasks complete and passed evidence before completing this phase").option("--json", "Print raw JSON").action(async (phaseId, options) => {
46528
46559
  await workflowPhaseCommitCommand({
46529
46560
  phaseId,
46530
46561
  summary: options.summary,
@@ -46537,6 +46568,7 @@ workflow.command("phase-commit").description(
46537
46568
  outcome: options.outcome,
46538
46569
  files: options.files,
46539
46570
  evidence: options.evidence,
46571
+ strict: Boolean(options.strict),
46540
46572
  json: options.json
46541
46573
  });
46542
46574
  });
@@ -1180,6 +1180,15 @@ snipara-companion workflow run --mode full --no-runtime-hint --query "implement
1180
1180
  snipara-companion workflow run --mode orchestrate --query "map production rollout risks"
1181
1181
  snipara-companion workflow final-commit --summary "Shipped auth hardening and tests" --why "Close the reported session replay gap" --evidence "passed:pnpm test auth" --risk "Monitor production auth errors" --next-step "Review the first 24 hours of telemetry" --files src/auth.ts tests/auth.test.ts
1182
1182
  snipara-companion workflow producer-report
1183
+ ```
1184
+
1185
+ Use `--strict` on a completed `workflow task-commit` or `workflow phase-commit`
1186
+ when the work needs a hard engineering closeout. Strict phase commit refuses
1187
+ pending or in-progress declared tasks and requires every supplied evidence item
1188
+ to be passed. Without the flag, legacy workflows retain their existing
1189
+ compatibility behavior.
1190
+
1191
+ ```
1183
1192
  snipara-companion workflow producer-review --artifact producer-abc123 --outcome useful --reviewer alice
1184
1193
  snipara-companion final-commit --summary "Shipped auth hardening and tests" --why "Close the reported session replay gap" --evidence "passed:pnpm test auth" --next-step "Review the first 24 hours of telemetry" --files src/auth.ts tests/auth.test.ts
1185
1194
  snipara-companion doctor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snipara-companion",
3
- "version": "3.6.22",
3
+ "version": "3.6.23",
4
4
  "description": "Local-first CLI that asks your repo what breaks before an AI coding agent edits it.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {