ccqa 1.18.0 → 1.19.0

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.
@@ -85,6 +85,7 @@ declare const TriageCaseSchema: z.ZodObject<{
85
85
  TEST_DRIFT: "TEST_DRIFT";
86
86
  SPEC_CHANGE: "SPEC_CHANGE";
87
87
  PRODUCT_BUG: "PRODUCT_BUG";
88
+ ENVIRONMENT: "ENVIRONMENT";
88
89
  UNKNOWN: "UNKNOWN";
89
90
  }>;
90
91
  confidence: z.ZodNumber;
@@ -96,10 +97,12 @@ declare const TriageCaseSchema: z.ZodObject<{
96
97
  TEST_DRIFT: "TEST_DRIFT";
97
98
  SPEC_CHANGE: "SPEC_CHANGE";
98
99
  PRODUCT_BUG: "PRODUCT_BUG";
100
+ ENVIRONMENT: "ENVIRONMENT";
99
101
  NO_DRIFT: "NO_DRIFT";
100
102
  }>;
101
103
  note: z.ZodOptional<z.ZodString>;
102
104
  recordedAt: z.ZodString;
105
+ invalidForKind: z.ZodOptional<z.ZodBoolean>;
103
106
  }, z.core.$strip>>;
104
107
  }, z.core.$strip>;
105
108
  type TriageCase = z.infer<typeof TriageCaseSchema>;
@@ -115,6 +118,7 @@ declare const RunTriageSchema: z.ZodObject<{
115
118
  TEST_DRIFT: "TEST_DRIFT";
116
119
  SPEC_CHANGE: "SPEC_CHANGE";
117
120
  PRODUCT_BUG: "PRODUCT_BUG";
121
+ ENVIRONMENT: "ENVIRONMENT";
118
122
  UNKNOWN: "UNKNOWN";
119
123
  }>;
120
124
  confidence: z.ZodNumber;
@@ -126,13 +130,16 @@ declare const RunTriageSchema: z.ZodObject<{
126
130
  TEST_DRIFT: "TEST_DRIFT";
127
131
  SPEC_CHANGE: "SPEC_CHANGE";
128
132
  PRODUCT_BUG: "PRODUCT_BUG";
133
+ ENVIRONMENT: "ENVIRONMENT";
129
134
  NO_DRIFT: "NO_DRIFT";
130
135
  }>;
131
136
  note: z.ZodOptional<z.ZodString>;
132
137
  recordedAt: z.ZodString;
138
+ invalidForKind: z.ZodOptional<z.ZodBoolean>;
133
139
  }, z.core.$strip>>;
134
140
  }, z.core.$strip>>;
135
141
  recorded: z.ZodNumber;
142
+ recordedInvalidForKind: z.ZodNumber;
136
143
  total: z.ZodNumber;
137
144
  }, z.core.$strip>;
138
145
  type RunTriage = z.infer<typeof RunTriageSchema>;
@@ -141,11 +148,22 @@ declare const PutActualCauseRequestSchema: z.ZodObject<{
141
148
  TEST_DRIFT: "TEST_DRIFT";
142
149
  SPEC_CHANGE: "SPEC_CHANGE";
143
150
  PRODUCT_BUG: "PRODUCT_BUG";
151
+ ENVIRONMENT: "ENVIRONMENT";
144
152
  NO_DRIFT: "NO_DRIFT";
145
153
  }>;
146
154
  note: z.ZodOptional<z.ZodString>;
147
155
  }, z.core.$strip>;
148
156
  type PutActualCauseRequest = z.infer<typeof PutActualCauseRequestSchema>;
157
+ /** Response of `PUT /runs/:id/triage/actual-causes`. */
158
+ declare const ImportActualCausesResponseSchema: z.ZodObject<{
159
+ imported: z.ZodNumber;
160
+ rejected: z.ZodArray<z.ZodObject<{
161
+ feature: z.ZodString;
162
+ spec: z.ZodString;
163
+ reason: z.ZodString;
164
+ }, z.core.$strip>>;
165
+ }, z.core.$strip>;
166
+ type ImportActualCausesResponse = z.infer<typeof ImportActualCausesResponseSchema>;
149
167
  /**
150
168
  * One spec's "last time it passed" record in the last-green ledger. The hub
151
169
  * updates the ledger whenever a `kind: "run"` run reaches a terminal state:
@@ -366,19 +384,25 @@ type DriftLedgerResponse = z.infer<typeof DriftLedgerResponseSchema>;
366
384
  * the names without a circular import.
367
385
  *
368
386
  * Two kinds share one namespace:
369
- * - "guidance": the record/live prompt bundle — `.user.md` (human-maintained)
370
- * and `.agent.md` (auto-rewritten by `ccqa run --learn-hub-live-prompt`)
371
- * plus `triage.user`, the human-maintained guidance injected into the
372
- * failure-analysis (triage) prompt.
373
- * - "custom-prompt": `analysis-custom-prompt` Claude-written calibration guidance
374
- * learned from graded triage cases, injected into the failure-analysis
375
- * prompt at run time.
387
+ * - "guidance": Markdown every `.user.md` file, plus the record/live/
388
+ * playwright/runn `.agent.md` notes (despite the "agent" name, these are
389
+ * plain prose, not the learned JSON below).
390
+ * - "custom-prompt": JSON Claude writes — only `triage.agent` and
391
+ * `audit.agent`, calibration distilled from graded cases and injected at
392
+ * run time.
393
+ *
394
+ * `triage.*` belongs to `ccqa run`'s failure classification and `audit.*` to
395
+ * `ccqa audit`. They are two prompts because they answer two questions in one
396
+ * shared vocabulary: the audit decides whether a spec still describes the
397
+ * code (from the source alone), and the run decides why it failed, using the
398
+ * execution evidence — the two commands run independently, neither gating the
399
+ * other (ADR-0016).
376
400
  *
377
401
  * Hub names are extensionless (`record.agent`), local files keep their real
378
402
  * extensions; `PROMPT_LOCAL_PATHS` is the single mapping every caller (push,
379
403
  * pull, learn, UI) goes through so the two never drift.
380
404
  */
381
- declare const PROMPT_NAMES: readonly ["record.user", "record.agent", "live.user", "live.agent", "playwright.user", "playwright.agent", "runn.user", "runn.agent", "triage.user", "analysis-custom-prompt"];
405
+ declare const PROMPT_NAMES: readonly ["record.user", "record.agent", "live.user", "live.agent", "playwright.user", "playwright.agent", "runn.user", "runn.agent", "triage.user", "triage.agent", "audit.user", "audit.agent"];
382
406
  type PromptName = (typeof PROMPT_NAMES)[number];
383
407
  //#endregion
384
408
  //#region src/report/schema.d.ts
@@ -388,8 +412,8 @@ declare const ReportSpecResultSchema: z.ZodObject<{
388
412
  title: z.ZodNullable<z.ZodString>;
389
413
  target: z.ZodOptional<z.ZodString>;
390
414
  mode: z.ZodOptional<z.ZodEnum<{
391
- live: "live";
392
415
  deterministic: "deterministic";
416
+ live: "live";
393
417
  }>>;
394
418
  status: z.ZodEnum<{
395
419
  passed: "passed";
@@ -417,6 +441,7 @@ declare const ReportSpecResultSchema: z.ZodObject<{
417
441
  TEST_DRIFT: "TEST_DRIFT";
418
442
  SPEC_CHANGE: "SPEC_CHANGE";
419
443
  PRODUCT_BUG: "PRODUCT_BUG";
444
+ ENVIRONMENT: "ENVIRONMENT";
420
445
  UNKNOWN: "UNKNOWN";
421
446
  }>;
422
447
  confidence: z.ZodNumber;
@@ -445,30 +470,6 @@ declare const ReportSpecResultSchema: z.ZodObject<{
445
470
  ref: z.ZodString;
446
471
  sha: z.ZodString;
447
472
  }, z.core.$strip>>>;
448
- driftAudit: z.ZodNullable<z.ZodObject<{
449
- label: z.ZodEnum<{
450
- TEST_DRIFT: "TEST_DRIFT";
451
- SPEC_CHANGE: "SPEC_CHANGE";
452
- UNKNOWN: "UNKNOWN";
453
- }>;
454
- confidence: z.ZodNumber;
455
- surface: z.ZodDefault<z.ZodEnum<{
456
- spec: "spec";
457
- generated: "generated";
458
- }>>;
459
- subDiagnosis: z.ZodDefault<z.ZodEnum<{
460
- OVER_ASSERTION: "OVER_ASSERTION";
461
- SELECTOR_DRIFT: "SELECTOR_DRIFT";
462
- NONE: "NONE";
463
- }>>;
464
- headline: z.ZodString;
465
- recommendation: z.ZodDefault<z.ZodString>;
466
- evidence: z.ZodArray<z.ZodObject<{
467
- file: z.ZodOptional<z.ZodString>;
468
- detail: z.ZodString;
469
- }, z.core.$strip>>;
470
- reasoning: z.ZodDefault<z.ZodString>;
471
- }, z.core.$strip>>;
472
473
  failureLogExcerpt: z.ZodNullable<z.ZodString>;
473
474
  diffExcerpt: z.ZodNullable<z.ZodString>;
474
475
  specYaml: z.ZodNullable<z.ZodString>;
@@ -574,8 +575,8 @@ declare const RunReportDataSchema: z.ZodObject<{
574
575
  title: z.ZodNullable<z.ZodString>;
575
576
  target: z.ZodOptional<z.ZodString>;
576
577
  mode: z.ZodOptional<z.ZodEnum<{
577
- live: "live";
578
578
  deterministic: "deterministic";
579
+ live: "live";
579
580
  }>>;
580
581
  status: z.ZodEnum<{
581
582
  passed: "passed";
@@ -603,6 +604,7 @@ declare const RunReportDataSchema: z.ZodObject<{
603
604
  TEST_DRIFT: "TEST_DRIFT";
604
605
  SPEC_CHANGE: "SPEC_CHANGE";
605
606
  PRODUCT_BUG: "PRODUCT_BUG";
607
+ ENVIRONMENT: "ENVIRONMENT";
606
608
  UNKNOWN: "UNKNOWN";
607
609
  }>;
608
610
  confidence: z.ZodNumber;
@@ -631,30 +633,6 @@ declare const RunReportDataSchema: z.ZodObject<{
631
633
  ref: z.ZodString;
632
634
  sha: z.ZodString;
633
635
  }, z.core.$strip>>>;
634
- driftAudit: z.ZodNullable<z.ZodObject<{
635
- label: z.ZodEnum<{
636
- TEST_DRIFT: "TEST_DRIFT";
637
- SPEC_CHANGE: "SPEC_CHANGE";
638
- UNKNOWN: "UNKNOWN";
639
- }>;
640
- confidence: z.ZodNumber;
641
- surface: z.ZodDefault<z.ZodEnum<{
642
- spec: "spec";
643
- generated: "generated";
644
- }>>;
645
- subDiagnosis: z.ZodDefault<z.ZodEnum<{
646
- OVER_ASSERTION: "OVER_ASSERTION";
647
- SELECTOR_DRIFT: "SELECTOR_DRIFT";
648
- NONE: "NONE";
649
- }>>;
650
- headline: z.ZodString;
651
- recommendation: z.ZodDefault<z.ZodString>;
652
- evidence: z.ZodArray<z.ZodObject<{
653
- file: z.ZodOptional<z.ZodString>;
654
- detail: z.ZodString;
655
- }, z.core.$strip>>;
656
- reasoning: z.ZodDefault<z.ZodString>;
657
- }, z.core.$strip>>;
658
636
  failureLogExcerpt: z.ZodNullable<z.ZodString>;
659
637
  diffExcerpt: z.ZodNullable<z.ZodString>;
660
638
  specYaml: z.ZodNullable<z.ZodString>;
@@ -742,12 +720,15 @@ declare const LabelsExportSchema: z.ZodObject<{
742
720
  TEST_DRIFT: "TEST_DRIFT";
743
721
  SPEC_CHANGE: "SPEC_CHANGE";
744
722
  PRODUCT_BUG: "PRODUCT_BUG";
723
+ ENVIRONMENT: "ENVIRONMENT";
745
724
  UNKNOWN: "UNKNOWN";
746
725
  }>;
747
726
  label: z.ZodEnum<{
748
727
  TEST_DRIFT: "TEST_DRIFT";
749
728
  SPEC_CHANGE: "SPEC_CHANGE";
750
729
  PRODUCT_BUG: "PRODUCT_BUG";
730
+ ENVIRONMENT: "ENVIRONMENT";
731
+ NO_DRIFT: "NO_DRIFT";
751
732
  }>;
752
733
  note: z.ZodOptional<z.ZodString>;
753
734
  }, z.core.$strip>>;
@@ -873,9 +854,7 @@ interface HubClient {
873
854
  feature: string;
874
855
  spec: string;
875
856
  }): Promise<void>;
876
- importActualCauses(id: string, labels: LabelsExport): Promise<{
877
- imported: number;
878
- }>;
857
+ importActualCauses(id: string, labels: LabelsExport): Promise<ImportActualCausesResponse>;
879
858
  /** Every project the hub knows (from runs and stored secrets). */
880
859
  listProjects(): Promise<string[]>;
881
860
  /**
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {