qfai 1.7.13 → 1.7.14
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 +7 -5
- package/assets/init/.qfai/assistant/agents/frontend-engineer.md +2 -2
- package/assets/init/.qfai/assistant/agents/product-experience-architect.md +2 -2
- package/assets/init/.qfai/assistant/agents/product-surface-reviewer.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +44 -18
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/01_Context.md +9 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/04_Sources.md +6 -6
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +7 -7
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/Rxx_reviewer.md +2 -2
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/review_request.md +2 -2
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/10_implementation_strategy.md +31 -13
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/20_trend_scan.md +41 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/23_design_eval_aggregate.md +12 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/40_screen_contracts.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +2 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +6 -2
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +264 -34
- package/assets/init/.qfai/assistant/steering/agent-catalog.yml +1 -1
- package/assets/init/.qfai/assistant/steering/agent-routing.yml +1 -1
- package/assets/init/.qfai/assistant/steering/manifest.md +4 -7
- package/assets/init/.qfai/assistant/steering/product.md +6 -6
- package/assets/init/.qfai/assistant/steering/review-profiles.yml +3 -0
- package/assets/init/.qfai/assistant/steering/ui-definition-protocol.md +2 -2
- package/assets/init/.qfai/contracts/ui/README.md +2 -2
- package/assets/init/.qfai/discussion/README.md +14 -22
- package/assets/init/.qfai/evidence/README.md +21 -12
- package/assets/uix-rev/comparison-review.md +3 -15
- package/assets/uix-rev/contracts-review.md +5 -2
- package/assets/uix-rev/scoring-review.md +10 -2
- package/assets/uix-rev/strategy-review.md +11 -7
- package/dist/cli/index.cjs +1993 -1279
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +1930 -1216
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +1989 -1269
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +75 -62
- package/dist/index.d.ts +75 -62
- package/dist/index.mjs +1926 -1207
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/assets/uix-rev/migration-review.md +0 -17
package/dist/index.d.cts
CHANGED
|
@@ -14,7 +14,7 @@ type TestFileScan = {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
type IssueSeverity = "info" | "warning" | "error";
|
|
17
|
-
type IssueCategory = "canonical" | "
|
|
17
|
+
type IssueCategory = "canonical" | "change";
|
|
18
18
|
type IssueLocation = {
|
|
19
19
|
line: number;
|
|
20
20
|
column?: number;
|
|
@@ -142,9 +142,6 @@ type QfaiUiuxAuditConfig = {
|
|
|
142
142
|
maxRawTokenLiteralWarnings?: number;
|
|
143
143
|
maxDuplicateFindingsPerRule?: number;
|
|
144
144
|
};
|
|
145
|
-
type QfaiUiuxMigrationConfig = {
|
|
146
|
-
strict?: boolean;
|
|
147
|
-
};
|
|
148
145
|
type QfaiUiuxConfig = {
|
|
149
146
|
platform?: string;
|
|
150
147
|
designTokensDir?: string;
|
|
@@ -153,10 +150,8 @@ type QfaiUiuxConfig = {
|
|
|
153
150
|
requireResearchSummary?: boolean;
|
|
154
151
|
competitive_refs_min?: number;
|
|
155
152
|
warning_as_error_override?: string[];
|
|
156
|
-
phase1ReleaseDate?: string;
|
|
157
153
|
renderEvidence?: RenderEvidenceConfig;
|
|
158
154
|
audit?: QfaiUiuxAuditConfig;
|
|
159
|
-
migration?: QfaiUiuxMigrationConfig;
|
|
160
155
|
};
|
|
161
156
|
type QfaiPrototypingCalibrationConfig = {
|
|
162
157
|
packPath?: string;
|
|
@@ -322,12 +317,13 @@ declare function extractAcSpecNumber(acId: string): string | null;
|
|
|
322
317
|
declare function extractCaseSpecNumber(caseId: string): string | null;
|
|
323
318
|
declare function extractScSpecNumber(scId: string): string | null;
|
|
324
319
|
|
|
320
|
+
declare const CANONICAL_PROTOTYPING_SURFACES: readonly ["web", "mobile", "desktop", "cli", "mixed"];
|
|
321
|
+
type CanonicalPrototypingSurface = (typeof CANONICAL_PROTOTYPING_SURFACES)[number];
|
|
322
|
+
|
|
325
323
|
type PrototypingMode = "low-cost" | "standard" | "full-harness";
|
|
326
324
|
type ModeSelectionSource = "explicit-request" | "discussion-recommendation" | "system-default";
|
|
327
|
-
type PrototypingSurface =
|
|
328
|
-
|
|
329
|
-
type LegacyPrototypingSurface = "web-ui" | "mobile-ui" | "desktop-ui";
|
|
330
|
-
type DiscussionRecommendationSourceSchema = "canonical-namespaced" | "legacy-top-level";
|
|
325
|
+
type PrototypingSurface = CanonicalPrototypingSurface;
|
|
326
|
+
type DiscussionRecommendationSourceSchema = "canonical-namespaced";
|
|
331
327
|
/**
|
|
332
328
|
* Canonical validated recommendation — all 4 fields required.
|
|
333
329
|
* Parser output uses this same type; fields are always populated
|
|
@@ -386,7 +382,7 @@ type ParseDiscussionResult = {
|
|
|
386
382
|
};
|
|
387
383
|
/**
|
|
388
384
|
* Parse a prototyping.yaml file from a discussion pack.
|
|
389
|
-
* Supports
|
|
385
|
+
* Supports only the canonical namespaced (`prototyping.*`) schema.
|
|
390
386
|
*/
|
|
391
387
|
declare function parseDiscussionModeRecommendation(filePath: string): Promise<DiscussionModeRecommendation | null>;
|
|
392
388
|
declare function parseDiscussionModeRecommendationWithWarnings(filePath: string): Promise<ParseDiscussionResult>;
|
|
@@ -409,18 +405,13 @@ declare function inferSurfaceFromRecommendationAndEvidence(input: {
|
|
|
409
405
|
hasBrowserQaBundle?: boolean | undefined;
|
|
410
406
|
hasUiRoutes?: boolean | undefined;
|
|
411
407
|
hasRuntimeGateUi?: boolean | undefined;
|
|
412
|
-
}): PrototypingSurface;
|
|
408
|
+
}): PrototypingSurface | null;
|
|
413
409
|
declare function derivePrototypingObligations(input: {
|
|
414
410
|
surface: PrototypingSurface;
|
|
415
411
|
effectiveMode: PrototypingMode;
|
|
416
412
|
}): PrototypingObligations;
|
|
417
413
|
declare function isValidPrototypingMode(value: unknown): value is PrototypingMode;
|
|
418
414
|
declare function isValidPrototypingSurface(value: unknown): value is PrototypingSurface;
|
|
419
|
-
/**
|
|
420
|
-
* Normalize a surface value: map legacy values to canonical equivalents.
|
|
421
|
-
*/
|
|
422
|
-
declare function normalizePrototypingSurface(value: string): PrototypingSurface;
|
|
423
|
-
declare function isUiBearingSurface(surface: PrototypingSurface): boolean;
|
|
424
415
|
declare function normalizeAllowedModes(modes?: string[]): PrototypingMode[];
|
|
425
416
|
|
|
426
417
|
/**
|
|
@@ -509,40 +500,44 @@ declare class CritiqueAdapter {
|
|
|
509
500
|
requestCritique(input: CritiqueInput): Promise<CritiqueResult>;
|
|
510
501
|
}
|
|
511
502
|
|
|
512
|
-
type SurfaceType =
|
|
513
|
-
|
|
514
|
-
declare const
|
|
515
|
-
|
|
516
|
-
declare
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
* Canonical shared helper for classification validator and prototyping mode.
|
|
520
|
-
*/
|
|
521
|
-
declare function isUiBearingSurfaceType(surface: SurfaceType): boolean;
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* Browser QA canonical types — WS-B
|
|
525
|
-
*
|
|
526
|
-
* Defines the 4-phase execution model with truthful status reporting.
|
|
527
|
-
*/
|
|
503
|
+
type SurfaceType = CanonicalPrototypingSurface | "non-ui";
|
|
504
|
+
declare const DISCUSSION_UI_BEARING_SURFACES: Set<SurfaceType>;
|
|
505
|
+
declare const DISCUSSION_NON_UI_SURFACES: Set<SurfaceType>;
|
|
506
|
+
declare const VISUAL_BROWSER_SURFACES: Set<SurfaceType>;
|
|
507
|
+
declare function isDiscussionUiBearingSurfaceType(surface: SurfaceType): boolean;
|
|
508
|
+
declare function isNonUiDiscussionSurface(surface: SurfaceType): boolean;
|
|
509
|
+
declare function requiresVisualBrowserEvidence(surface: SurfaceType): boolean;
|
|
528
510
|
|
|
529
511
|
type BrowserQaPhase = "smoke" | "interaction" | "visual" | "accessibility";
|
|
530
512
|
declare const BROWSER_QA_PHASES: readonly BrowserQaPhase[];
|
|
531
|
-
type BrowserQaPhaseStatus = "
|
|
532
|
-
type BrowserQaFindingSeverity = "info" | "warning" | "error";
|
|
533
|
-
|
|
513
|
+
type BrowserQaPhaseStatus = "passed" | "executed" | "failed" | "skipped";
|
|
514
|
+
type BrowserQaFindingSeverity = "info" | "warn" | "warning" | "error";
|
|
515
|
+
interface BrowserQaFinding {
|
|
534
516
|
phase: BrowserQaPhase;
|
|
535
|
-
route?: string;
|
|
536
|
-
selector?: string;
|
|
537
|
-
target?: string;
|
|
538
517
|
severity: BrowserQaFindingSeverity;
|
|
539
|
-
|
|
518
|
+
summary: string;
|
|
519
|
+
detail: string;
|
|
520
|
+
screen_id?: string;
|
|
521
|
+
selector?: string;
|
|
522
|
+
evidence_refs: string[];
|
|
523
|
+
repair_suggestions: string[];
|
|
524
|
+
category?: BrowserQaPhase;
|
|
525
|
+
message?: string;
|
|
526
|
+
route?: string;
|
|
540
527
|
repair_hint?: string;
|
|
528
|
+
}
|
|
529
|
+
type BrowserQaScreenContractRef = {
|
|
530
|
+
screen_id: string;
|
|
531
|
+
route?: string;
|
|
532
|
+
primary_tasks?: string[];
|
|
541
533
|
};
|
|
542
534
|
type BrowserQaPhaseResult = {
|
|
543
535
|
phase: BrowserQaPhase;
|
|
544
536
|
status: BrowserQaPhaseStatus;
|
|
545
537
|
findings: BrowserQaFinding[];
|
|
538
|
+
repair_suggestions: string[];
|
|
539
|
+
evidence_refs: string[];
|
|
540
|
+
checks_performed: string[];
|
|
546
541
|
skippedReason?: string;
|
|
547
542
|
};
|
|
548
543
|
type BrowserQaInput = {
|
|
@@ -552,6 +547,7 @@ type BrowserQaInput = {
|
|
|
552
547
|
surface: SurfaceType;
|
|
553
548
|
required?: boolean;
|
|
554
549
|
executionSource?: "html" | "url" | "none";
|
|
550
|
+
screenContracts?: BrowserQaScreenContractRef[];
|
|
555
551
|
};
|
|
556
552
|
type BrowserQaRunResult = {
|
|
557
553
|
phases: BrowserQaPhaseResult[];
|
|
@@ -563,8 +559,12 @@ type BrowserQaSummary = {
|
|
|
563
559
|
phases: Record<BrowserQaPhase, {
|
|
564
560
|
status: BrowserQaPhaseStatus;
|
|
565
561
|
findingsCount: number;
|
|
562
|
+
checksCount: number;
|
|
563
|
+
passed?: number;
|
|
564
|
+
failed?: number;
|
|
566
565
|
}>;
|
|
567
566
|
totalFindings: number;
|
|
567
|
+
totalRepairs: number;
|
|
568
568
|
skippedReasons: string[];
|
|
569
569
|
};
|
|
570
570
|
interface BrowserQaProvider {
|
|
@@ -583,11 +583,11 @@ interface BrowserQaProvider {
|
|
|
583
583
|
* absence is a valid state with fail-open semantics.
|
|
584
584
|
*
|
|
585
585
|
* WS-B: BrowserQaProvider is the canonical interface for 4-phase Browser QA.
|
|
586
|
-
* BrowserProvider
|
|
586
|
+
* BrowserProvider defines the browser QA and capture provider interface.
|
|
587
587
|
*/
|
|
588
588
|
|
|
589
589
|
type ProviderCapability = "screenshot" | "viewport" | "dom" | "interaction" | "visual" | "accessibility";
|
|
590
|
-
/**
|
|
590
|
+
/** Browser QA and capture provider. */
|
|
591
591
|
type BrowserProvider = {
|
|
592
592
|
name: string;
|
|
593
593
|
capabilities: ProviderCapability[];
|
|
@@ -917,8 +917,11 @@ type ReportPrototypingSummary = {
|
|
|
917
917
|
totalFailed: number;
|
|
918
918
|
};
|
|
919
919
|
phaseSummary?: Record<string, {
|
|
920
|
-
|
|
921
|
-
|
|
920
|
+
status: string;
|
|
921
|
+
findingsCount: number;
|
|
922
|
+
checksCount: number;
|
|
923
|
+
passed?: number;
|
|
924
|
+
failed?: number;
|
|
922
925
|
}>;
|
|
923
926
|
modeMismatch?: boolean;
|
|
924
927
|
};
|
|
@@ -980,24 +983,7 @@ declare function validateSpecSplitByCapability(root: string, config: QfaiConfig)
|
|
|
980
983
|
|
|
981
984
|
declare function validateTraceability(root: string, config: QfaiConfig, phase: ValidationPhase): Promise<Issue[]>;
|
|
982
985
|
|
|
983
|
-
/**
|
|
984
|
-
* Browser QA runner — WS-B
|
|
985
|
-
*
|
|
986
|
-
* Orchestrates the canonical 4-phase Browser QA execution model.
|
|
987
|
-
* Provider resolution → phase execution → truthful skip/fail handling.
|
|
988
|
-
*/
|
|
989
|
-
|
|
990
|
-
/**
|
|
991
|
-
* Run the canonical 4-phase Browser QA.
|
|
992
|
-
*
|
|
993
|
-
* - provider resolved → delegate to provider methods
|
|
994
|
-
* - no provider → use built-in static analysis phases
|
|
995
|
-
* - non-ui surface → all phases skipped
|
|
996
|
-
*/
|
|
997
986
|
declare function runBrowserQaOrchestrated(input: BrowserQaInput, provider?: BrowserQaProvider): Promise<BrowserQaRunResult>;
|
|
998
|
-
/**
|
|
999
|
-
* Summarize a BrowserQaRunResult for report output.
|
|
1000
|
-
*/
|
|
1001
987
|
declare function summarizeBrowserQaResult(result: BrowserQaRunResult): BrowserQaSummary;
|
|
1002
988
|
|
|
1003
989
|
/**
|
|
@@ -1018,6 +1004,25 @@ declare function runRenderCapture(targets: RenderCaptureTarget[], outputDir: str
|
|
|
1018
1004
|
required?: boolean;
|
|
1019
1005
|
}): Promise<RenderRunnerResult>;
|
|
1020
1006
|
|
|
1007
|
+
interface FakeUiDetectionResult {
|
|
1008
|
+
detected: boolean;
|
|
1009
|
+
reasons: string[];
|
|
1010
|
+
evidence_refs: string[];
|
|
1011
|
+
confidence: "low" | "medium" | "high";
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
declare const FULL_HARNESS_EXIT_REASONS: readonly ["quality-threshold-met", "plateau", "budget-exhausted", "fake-ui-detected", "runtime-failure", "human-review-required"];
|
|
1015
|
+
type FullHarnessExitReason = (typeof FULL_HARNESS_EXIT_REASONS)[number];
|
|
1016
|
+
|
|
1017
|
+
type FullHarnessHandoff = {
|
|
1018
|
+
selected_build: string;
|
|
1019
|
+
artifact_refs: string[];
|
|
1020
|
+
outstanding_issues: string[];
|
|
1021
|
+
required_human_review_points: string[];
|
|
1022
|
+
exit_reason: FullHarnessExitReason;
|
|
1023
|
+
next_recommended_action: string;
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1021
1026
|
type PrototypingSummaryBundle = {
|
|
1022
1027
|
surface: PrototypingSurface;
|
|
1023
1028
|
specs: Array<{
|
|
@@ -1105,6 +1110,11 @@ declare function writeEvidenceBundles(input: {
|
|
|
1105
1110
|
mode: PrototypingMode;
|
|
1106
1111
|
};
|
|
1107
1112
|
prototyping: PrototypingSummaryBundle;
|
|
1113
|
+
fullHarnessArtifacts?: {
|
|
1114
|
+
fakeUiDetection: FakeUiDetectionResult;
|
|
1115
|
+
handoff: FullHarnessHandoff;
|
|
1116
|
+
exitReason: FullHarnessExitReason;
|
|
1117
|
+
};
|
|
1108
1118
|
}): Promise<{
|
|
1109
1119
|
prototypingPath: string;
|
|
1110
1120
|
renderPath: string;
|
|
@@ -1288,6 +1298,9 @@ type FullHarnessResult = {
|
|
|
1288
1298
|
output: FullHarnessOutput;
|
|
1289
1299
|
evidence: ReturnType<typeof generateEvidence>;
|
|
1290
1300
|
reviewSummary: ReturnType<typeof generateReviewSummary>;
|
|
1301
|
+
fakeUiDetection: FakeUiDetectionResult;
|
|
1302
|
+
exitReason: FullHarnessExitReason;
|
|
1303
|
+
handoff: FullHarnessHandoff;
|
|
1291
1304
|
};
|
|
1292
1305
|
/**
|
|
1293
1306
|
* Run the full-harness mode.
|
|
@@ -1306,4 +1319,4 @@ declare function createPlaywrightRenderAdapter(input: {
|
|
|
1306
1319
|
|
|
1307
1320
|
declare function createPlaywrightBrowserQaProvider(): BrowserQaProvider;
|
|
1308
1321
|
|
|
1309
|
-
export { type AtddCodeTraceabilityResult, type AtddForbiddenRef, type AtddSpecRefs, type AtddTestKind, type AtddTraceabilityMissing, type AtddTraceabilityScan, type AtddUnknownRef, type AtddUnknownRefKind, BROWSER_QA_PHASES, type ConfigLoadResult, type ConfigPathKey, type ConfigSearchResult, type DecisionGuardrail, type DecisionGuardrailEntry, type DiscussionModeRecommendation, type DiscussionRecommendationSourceSchema, type FailOn, type FullHarnessRequest, type FullHarnessResult, type GuardrailCheckResult, type GuardrailIssue, type GuardrailIssueSeverity, type GuardrailLoadError, type GuardrailLoadResult, type GuardrailType, ID_PREFIXES, type IdFormatPrefix, type IdPrefix, type Issue, type IssueCategory, type IssueLocation, type IssueSeverity, type
|
|
1322
|
+
export { type AtddCodeTraceabilityResult, type AtddForbiddenRef, type AtddSpecRefs, type AtddTestKind, type AtddTraceabilityMissing, type AtddTraceabilityScan, type AtddUnknownRef, type AtddUnknownRefKind, BROWSER_QA_PHASES, type ConfigLoadResult, type ConfigPathKey, type ConfigSearchResult, DISCUSSION_NON_UI_SURFACES, DISCUSSION_UI_BEARING_SURFACES, type DecisionGuardrail, type DecisionGuardrailEntry, type DiscussionModeRecommendation, type DiscussionRecommendationSourceSchema, type FailOn, type FullHarnessRequest, type FullHarnessResult, type GuardrailCheckResult, type GuardrailIssue, type GuardrailIssueSeverity, type GuardrailLoadError, type GuardrailLoadResult, type GuardrailType, ID_PREFIXES, type IdFormatPrefix, type IdPrefix, type Issue, type IssueCategory, type IssueLocation, type IssueSeverity, type ModeResolutionInput, type ModeResolutionResult, type ModeSelectionSource, type OrphanContractsPolicy, type OutputFormat, type ParseDiscussionResult, type PrototypingExecutionConfig, type PrototypingExecutionRequest, type PrototypingExecutionResult, type PrototypingMode, type PrototypingObligations, type PrototypingSurface, type QfaiConfig, type QfaiOutputConfig, type QfaiPaths, type QfaiPrototypingCalibrationConfig, type QfaiPrototypingConfig, type QfaiUiuxAuditConfig, type QfaiUiuxConfig, type QfaiValidationConfig, type ReportChangeType, type ReportChangeTypeSummary, type ReportChangeTypeWarning, type ReportContractCoverage, type ReportData, type ReportDeltaCoverage, type ReportFullHarnessExecution, type ReportGuardrailItem, type ReportGuardrails, type ReportIds, type ReportPrototypingSummary, type ReportRuleFinding, type ReportSpecContractRefs, type ReportSpecCoverage, type ReportSummary, type ReportSurfaceClassification, type ReportTddCoverage, type ReportTddCoverageSpec, type ReportTestStrategy, type ReportTraceability, type ReportWaivers, type ResolveModeInput, type ResolvedModeSummary, type RunSddPreflightOptions, type SddPreflightResult, type SddPreflightSource, type SddPreflightStatus, type TraceabilitySeverity, type UiFidelityStatus, VISUAL_BROWSER_SURFACES, type ValidationCounts, type ValidationOptions, type ValidationPhase, type ValidationResult, type ValidationTraceability, type ValidationWaiverAction, type ValidationWaiverDowngradeTo, type ValidationWaiverEntry, type ValidationWaiverMatch, type ValidationWaiverScope, type ValidationWaiverSeverity, type ValidationWaiverSuppressed, type ValidationWaivers, checkDecisionGuardrails, createPlaywrightBrowserQaProvider, createPlaywrightRenderAdapter, createReportData, defaultConfig, derivePrototypingObligations, evaluateAtddCodeTraceability, extractAcSpecNumber, extractAllIds, extractBrSpecNumber, extractCapSpecNumber, extractCaseSpecNumber, extractDecisionGuardrailsFromMarkdown, extractIds, extractInvalidIds, extractScSpecNumber, extractSpecNumber, extractUsSpecNumber, filterDecisionGuardrailsByKeyword, findConfigRoot, formatGuardrailsForLlm, formatReportJson, formatReportMarkdown, getConfigPath, inferSurfaceFromRecommendationAndEvidence, isDiscussionUiBearingSurfaceType, isNonUiDiscussionSurface, isValidPrototypingMode, isValidPrototypingSurface, lintSql, loadConfig, loadDecisionGuardrails, normalizeAllowedModes, normalizeDecisionGuardrails, normalizeSurface, parseDiscussionFromObject, parseDiscussionModeRecommendation, parseDiscussionModeRecommendationWithWarnings, requiresVisualBrowserEvidence, resolvePath, resolvePrototypingMode, resolvePrototypingModeFromInput, resolveToolVersion, runBrowserQaOrchestrated, runFullHarness, runPrototypingExecution, runRenderCapture, runSddPreflight, sortDecisionGuardrails, summarizeBrowserQaResult, summarizeResolvedMode, validateAtddCodeTraceability, validateContracts, validateDefinedIds, validateLayeredTraceability, validateOrphanProhibition, validateProject, validateSpecSplitByCapability, validateTraceability, writeEvidenceBundles };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ type TestFileScan = {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
type IssueSeverity = "info" | "warning" | "error";
|
|
17
|
-
type IssueCategory = "canonical" | "
|
|
17
|
+
type IssueCategory = "canonical" | "change";
|
|
18
18
|
type IssueLocation = {
|
|
19
19
|
line: number;
|
|
20
20
|
column?: number;
|
|
@@ -142,9 +142,6 @@ type QfaiUiuxAuditConfig = {
|
|
|
142
142
|
maxRawTokenLiteralWarnings?: number;
|
|
143
143
|
maxDuplicateFindingsPerRule?: number;
|
|
144
144
|
};
|
|
145
|
-
type QfaiUiuxMigrationConfig = {
|
|
146
|
-
strict?: boolean;
|
|
147
|
-
};
|
|
148
145
|
type QfaiUiuxConfig = {
|
|
149
146
|
platform?: string;
|
|
150
147
|
designTokensDir?: string;
|
|
@@ -153,10 +150,8 @@ type QfaiUiuxConfig = {
|
|
|
153
150
|
requireResearchSummary?: boolean;
|
|
154
151
|
competitive_refs_min?: number;
|
|
155
152
|
warning_as_error_override?: string[];
|
|
156
|
-
phase1ReleaseDate?: string;
|
|
157
153
|
renderEvidence?: RenderEvidenceConfig;
|
|
158
154
|
audit?: QfaiUiuxAuditConfig;
|
|
159
|
-
migration?: QfaiUiuxMigrationConfig;
|
|
160
155
|
};
|
|
161
156
|
type QfaiPrototypingCalibrationConfig = {
|
|
162
157
|
packPath?: string;
|
|
@@ -322,12 +317,13 @@ declare function extractAcSpecNumber(acId: string): string | null;
|
|
|
322
317
|
declare function extractCaseSpecNumber(caseId: string): string | null;
|
|
323
318
|
declare function extractScSpecNumber(scId: string): string | null;
|
|
324
319
|
|
|
320
|
+
declare const CANONICAL_PROTOTYPING_SURFACES: readonly ["web", "mobile", "desktop", "cli", "mixed"];
|
|
321
|
+
type CanonicalPrototypingSurface = (typeof CANONICAL_PROTOTYPING_SURFACES)[number];
|
|
322
|
+
|
|
325
323
|
type PrototypingMode = "low-cost" | "standard" | "full-harness";
|
|
326
324
|
type ModeSelectionSource = "explicit-request" | "discussion-recommendation" | "system-default";
|
|
327
|
-
type PrototypingSurface =
|
|
328
|
-
|
|
329
|
-
type LegacyPrototypingSurface = "web-ui" | "mobile-ui" | "desktop-ui";
|
|
330
|
-
type DiscussionRecommendationSourceSchema = "canonical-namespaced" | "legacy-top-level";
|
|
325
|
+
type PrototypingSurface = CanonicalPrototypingSurface;
|
|
326
|
+
type DiscussionRecommendationSourceSchema = "canonical-namespaced";
|
|
331
327
|
/**
|
|
332
328
|
* Canonical validated recommendation — all 4 fields required.
|
|
333
329
|
* Parser output uses this same type; fields are always populated
|
|
@@ -386,7 +382,7 @@ type ParseDiscussionResult = {
|
|
|
386
382
|
};
|
|
387
383
|
/**
|
|
388
384
|
* Parse a prototyping.yaml file from a discussion pack.
|
|
389
|
-
* Supports
|
|
385
|
+
* Supports only the canonical namespaced (`prototyping.*`) schema.
|
|
390
386
|
*/
|
|
391
387
|
declare function parseDiscussionModeRecommendation(filePath: string): Promise<DiscussionModeRecommendation | null>;
|
|
392
388
|
declare function parseDiscussionModeRecommendationWithWarnings(filePath: string): Promise<ParseDiscussionResult>;
|
|
@@ -409,18 +405,13 @@ declare function inferSurfaceFromRecommendationAndEvidence(input: {
|
|
|
409
405
|
hasBrowserQaBundle?: boolean | undefined;
|
|
410
406
|
hasUiRoutes?: boolean | undefined;
|
|
411
407
|
hasRuntimeGateUi?: boolean | undefined;
|
|
412
|
-
}): PrototypingSurface;
|
|
408
|
+
}): PrototypingSurface | null;
|
|
413
409
|
declare function derivePrototypingObligations(input: {
|
|
414
410
|
surface: PrototypingSurface;
|
|
415
411
|
effectiveMode: PrototypingMode;
|
|
416
412
|
}): PrototypingObligations;
|
|
417
413
|
declare function isValidPrototypingMode(value: unknown): value is PrototypingMode;
|
|
418
414
|
declare function isValidPrototypingSurface(value: unknown): value is PrototypingSurface;
|
|
419
|
-
/**
|
|
420
|
-
* Normalize a surface value: map legacy values to canonical equivalents.
|
|
421
|
-
*/
|
|
422
|
-
declare function normalizePrototypingSurface(value: string): PrototypingSurface;
|
|
423
|
-
declare function isUiBearingSurface(surface: PrototypingSurface): boolean;
|
|
424
415
|
declare function normalizeAllowedModes(modes?: string[]): PrototypingMode[];
|
|
425
416
|
|
|
426
417
|
/**
|
|
@@ -509,40 +500,44 @@ declare class CritiqueAdapter {
|
|
|
509
500
|
requestCritique(input: CritiqueInput): Promise<CritiqueResult>;
|
|
510
501
|
}
|
|
511
502
|
|
|
512
|
-
type SurfaceType =
|
|
513
|
-
|
|
514
|
-
declare const
|
|
515
|
-
|
|
516
|
-
declare
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
* Canonical shared helper for classification validator and prototyping mode.
|
|
520
|
-
*/
|
|
521
|
-
declare function isUiBearingSurfaceType(surface: SurfaceType): boolean;
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* Browser QA canonical types — WS-B
|
|
525
|
-
*
|
|
526
|
-
* Defines the 4-phase execution model with truthful status reporting.
|
|
527
|
-
*/
|
|
503
|
+
type SurfaceType = CanonicalPrototypingSurface | "non-ui";
|
|
504
|
+
declare const DISCUSSION_UI_BEARING_SURFACES: Set<SurfaceType>;
|
|
505
|
+
declare const DISCUSSION_NON_UI_SURFACES: Set<SurfaceType>;
|
|
506
|
+
declare const VISUAL_BROWSER_SURFACES: Set<SurfaceType>;
|
|
507
|
+
declare function isDiscussionUiBearingSurfaceType(surface: SurfaceType): boolean;
|
|
508
|
+
declare function isNonUiDiscussionSurface(surface: SurfaceType): boolean;
|
|
509
|
+
declare function requiresVisualBrowserEvidence(surface: SurfaceType): boolean;
|
|
528
510
|
|
|
529
511
|
type BrowserQaPhase = "smoke" | "interaction" | "visual" | "accessibility";
|
|
530
512
|
declare const BROWSER_QA_PHASES: readonly BrowserQaPhase[];
|
|
531
|
-
type BrowserQaPhaseStatus = "
|
|
532
|
-
type BrowserQaFindingSeverity = "info" | "warning" | "error";
|
|
533
|
-
|
|
513
|
+
type BrowserQaPhaseStatus = "passed" | "executed" | "failed" | "skipped";
|
|
514
|
+
type BrowserQaFindingSeverity = "info" | "warn" | "warning" | "error";
|
|
515
|
+
interface BrowserQaFinding {
|
|
534
516
|
phase: BrowserQaPhase;
|
|
535
|
-
route?: string;
|
|
536
|
-
selector?: string;
|
|
537
|
-
target?: string;
|
|
538
517
|
severity: BrowserQaFindingSeverity;
|
|
539
|
-
|
|
518
|
+
summary: string;
|
|
519
|
+
detail: string;
|
|
520
|
+
screen_id?: string;
|
|
521
|
+
selector?: string;
|
|
522
|
+
evidence_refs: string[];
|
|
523
|
+
repair_suggestions: string[];
|
|
524
|
+
category?: BrowserQaPhase;
|
|
525
|
+
message?: string;
|
|
526
|
+
route?: string;
|
|
540
527
|
repair_hint?: string;
|
|
528
|
+
}
|
|
529
|
+
type BrowserQaScreenContractRef = {
|
|
530
|
+
screen_id: string;
|
|
531
|
+
route?: string;
|
|
532
|
+
primary_tasks?: string[];
|
|
541
533
|
};
|
|
542
534
|
type BrowserQaPhaseResult = {
|
|
543
535
|
phase: BrowserQaPhase;
|
|
544
536
|
status: BrowserQaPhaseStatus;
|
|
545
537
|
findings: BrowserQaFinding[];
|
|
538
|
+
repair_suggestions: string[];
|
|
539
|
+
evidence_refs: string[];
|
|
540
|
+
checks_performed: string[];
|
|
546
541
|
skippedReason?: string;
|
|
547
542
|
};
|
|
548
543
|
type BrowserQaInput = {
|
|
@@ -552,6 +547,7 @@ type BrowserQaInput = {
|
|
|
552
547
|
surface: SurfaceType;
|
|
553
548
|
required?: boolean;
|
|
554
549
|
executionSource?: "html" | "url" | "none";
|
|
550
|
+
screenContracts?: BrowserQaScreenContractRef[];
|
|
555
551
|
};
|
|
556
552
|
type BrowserQaRunResult = {
|
|
557
553
|
phases: BrowserQaPhaseResult[];
|
|
@@ -563,8 +559,12 @@ type BrowserQaSummary = {
|
|
|
563
559
|
phases: Record<BrowserQaPhase, {
|
|
564
560
|
status: BrowserQaPhaseStatus;
|
|
565
561
|
findingsCount: number;
|
|
562
|
+
checksCount: number;
|
|
563
|
+
passed?: number;
|
|
564
|
+
failed?: number;
|
|
566
565
|
}>;
|
|
567
566
|
totalFindings: number;
|
|
567
|
+
totalRepairs: number;
|
|
568
568
|
skippedReasons: string[];
|
|
569
569
|
};
|
|
570
570
|
interface BrowserQaProvider {
|
|
@@ -583,11 +583,11 @@ interface BrowserQaProvider {
|
|
|
583
583
|
* absence is a valid state with fail-open semantics.
|
|
584
584
|
*
|
|
585
585
|
* WS-B: BrowserQaProvider is the canonical interface for 4-phase Browser QA.
|
|
586
|
-
* BrowserProvider
|
|
586
|
+
* BrowserProvider defines the browser QA and capture provider interface.
|
|
587
587
|
*/
|
|
588
588
|
|
|
589
589
|
type ProviderCapability = "screenshot" | "viewport" | "dom" | "interaction" | "visual" | "accessibility";
|
|
590
|
-
/**
|
|
590
|
+
/** Browser QA and capture provider. */
|
|
591
591
|
type BrowserProvider = {
|
|
592
592
|
name: string;
|
|
593
593
|
capabilities: ProviderCapability[];
|
|
@@ -917,8 +917,11 @@ type ReportPrototypingSummary = {
|
|
|
917
917
|
totalFailed: number;
|
|
918
918
|
};
|
|
919
919
|
phaseSummary?: Record<string, {
|
|
920
|
-
|
|
921
|
-
|
|
920
|
+
status: string;
|
|
921
|
+
findingsCount: number;
|
|
922
|
+
checksCount: number;
|
|
923
|
+
passed?: number;
|
|
924
|
+
failed?: number;
|
|
922
925
|
}>;
|
|
923
926
|
modeMismatch?: boolean;
|
|
924
927
|
};
|
|
@@ -980,24 +983,7 @@ declare function validateSpecSplitByCapability(root: string, config: QfaiConfig)
|
|
|
980
983
|
|
|
981
984
|
declare function validateTraceability(root: string, config: QfaiConfig, phase: ValidationPhase): Promise<Issue[]>;
|
|
982
985
|
|
|
983
|
-
/**
|
|
984
|
-
* Browser QA runner — WS-B
|
|
985
|
-
*
|
|
986
|
-
* Orchestrates the canonical 4-phase Browser QA execution model.
|
|
987
|
-
* Provider resolution → phase execution → truthful skip/fail handling.
|
|
988
|
-
*/
|
|
989
|
-
|
|
990
|
-
/**
|
|
991
|
-
* Run the canonical 4-phase Browser QA.
|
|
992
|
-
*
|
|
993
|
-
* - provider resolved → delegate to provider methods
|
|
994
|
-
* - no provider → use built-in static analysis phases
|
|
995
|
-
* - non-ui surface → all phases skipped
|
|
996
|
-
*/
|
|
997
986
|
declare function runBrowserQaOrchestrated(input: BrowserQaInput, provider?: BrowserQaProvider): Promise<BrowserQaRunResult>;
|
|
998
|
-
/**
|
|
999
|
-
* Summarize a BrowserQaRunResult for report output.
|
|
1000
|
-
*/
|
|
1001
987
|
declare function summarizeBrowserQaResult(result: BrowserQaRunResult): BrowserQaSummary;
|
|
1002
988
|
|
|
1003
989
|
/**
|
|
@@ -1018,6 +1004,25 @@ declare function runRenderCapture(targets: RenderCaptureTarget[], outputDir: str
|
|
|
1018
1004
|
required?: boolean;
|
|
1019
1005
|
}): Promise<RenderRunnerResult>;
|
|
1020
1006
|
|
|
1007
|
+
interface FakeUiDetectionResult {
|
|
1008
|
+
detected: boolean;
|
|
1009
|
+
reasons: string[];
|
|
1010
|
+
evidence_refs: string[];
|
|
1011
|
+
confidence: "low" | "medium" | "high";
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
declare const FULL_HARNESS_EXIT_REASONS: readonly ["quality-threshold-met", "plateau", "budget-exhausted", "fake-ui-detected", "runtime-failure", "human-review-required"];
|
|
1015
|
+
type FullHarnessExitReason = (typeof FULL_HARNESS_EXIT_REASONS)[number];
|
|
1016
|
+
|
|
1017
|
+
type FullHarnessHandoff = {
|
|
1018
|
+
selected_build: string;
|
|
1019
|
+
artifact_refs: string[];
|
|
1020
|
+
outstanding_issues: string[];
|
|
1021
|
+
required_human_review_points: string[];
|
|
1022
|
+
exit_reason: FullHarnessExitReason;
|
|
1023
|
+
next_recommended_action: string;
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1021
1026
|
type PrototypingSummaryBundle = {
|
|
1022
1027
|
surface: PrototypingSurface;
|
|
1023
1028
|
specs: Array<{
|
|
@@ -1105,6 +1110,11 @@ declare function writeEvidenceBundles(input: {
|
|
|
1105
1110
|
mode: PrototypingMode;
|
|
1106
1111
|
};
|
|
1107
1112
|
prototyping: PrototypingSummaryBundle;
|
|
1113
|
+
fullHarnessArtifacts?: {
|
|
1114
|
+
fakeUiDetection: FakeUiDetectionResult;
|
|
1115
|
+
handoff: FullHarnessHandoff;
|
|
1116
|
+
exitReason: FullHarnessExitReason;
|
|
1117
|
+
};
|
|
1108
1118
|
}): Promise<{
|
|
1109
1119
|
prototypingPath: string;
|
|
1110
1120
|
renderPath: string;
|
|
@@ -1288,6 +1298,9 @@ type FullHarnessResult = {
|
|
|
1288
1298
|
output: FullHarnessOutput;
|
|
1289
1299
|
evidence: ReturnType<typeof generateEvidence>;
|
|
1290
1300
|
reviewSummary: ReturnType<typeof generateReviewSummary>;
|
|
1301
|
+
fakeUiDetection: FakeUiDetectionResult;
|
|
1302
|
+
exitReason: FullHarnessExitReason;
|
|
1303
|
+
handoff: FullHarnessHandoff;
|
|
1291
1304
|
};
|
|
1292
1305
|
/**
|
|
1293
1306
|
* Run the full-harness mode.
|
|
@@ -1306,4 +1319,4 @@ declare function createPlaywrightRenderAdapter(input: {
|
|
|
1306
1319
|
|
|
1307
1320
|
declare function createPlaywrightBrowserQaProvider(): BrowserQaProvider;
|
|
1308
1321
|
|
|
1309
|
-
export { type AtddCodeTraceabilityResult, type AtddForbiddenRef, type AtddSpecRefs, type AtddTestKind, type AtddTraceabilityMissing, type AtddTraceabilityScan, type AtddUnknownRef, type AtddUnknownRefKind, BROWSER_QA_PHASES, type ConfigLoadResult, type ConfigPathKey, type ConfigSearchResult, type DecisionGuardrail, type DecisionGuardrailEntry, type DiscussionModeRecommendation, type DiscussionRecommendationSourceSchema, type FailOn, type FullHarnessRequest, type FullHarnessResult, type GuardrailCheckResult, type GuardrailIssue, type GuardrailIssueSeverity, type GuardrailLoadError, type GuardrailLoadResult, type GuardrailType, ID_PREFIXES, type IdFormatPrefix, type IdPrefix, type Issue, type IssueCategory, type IssueLocation, type IssueSeverity, type
|
|
1322
|
+
export { type AtddCodeTraceabilityResult, type AtddForbiddenRef, type AtddSpecRefs, type AtddTestKind, type AtddTraceabilityMissing, type AtddTraceabilityScan, type AtddUnknownRef, type AtddUnknownRefKind, BROWSER_QA_PHASES, type ConfigLoadResult, type ConfigPathKey, type ConfigSearchResult, DISCUSSION_NON_UI_SURFACES, DISCUSSION_UI_BEARING_SURFACES, type DecisionGuardrail, type DecisionGuardrailEntry, type DiscussionModeRecommendation, type DiscussionRecommendationSourceSchema, type FailOn, type FullHarnessRequest, type FullHarnessResult, type GuardrailCheckResult, type GuardrailIssue, type GuardrailIssueSeverity, type GuardrailLoadError, type GuardrailLoadResult, type GuardrailType, ID_PREFIXES, type IdFormatPrefix, type IdPrefix, type Issue, type IssueCategory, type IssueLocation, type IssueSeverity, type ModeResolutionInput, type ModeResolutionResult, type ModeSelectionSource, type OrphanContractsPolicy, type OutputFormat, type ParseDiscussionResult, type PrototypingExecutionConfig, type PrototypingExecutionRequest, type PrototypingExecutionResult, type PrototypingMode, type PrototypingObligations, type PrototypingSurface, type QfaiConfig, type QfaiOutputConfig, type QfaiPaths, type QfaiPrototypingCalibrationConfig, type QfaiPrototypingConfig, type QfaiUiuxAuditConfig, type QfaiUiuxConfig, type QfaiValidationConfig, type ReportChangeType, type ReportChangeTypeSummary, type ReportChangeTypeWarning, type ReportContractCoverage, type ReportData, type ReportDeltaCoverage, type ReportFullHarnessExecution, type ReportGuardrailItem, type ReportGuardrails, type ReportIds, type ReportPrototypingSummary, type ReportRuleFinding, type ReportSpecContractRefs, type ReportSpecCoverage, type ReportSummary, type ReportSurfaceClassification, type ReportTddCoverage, type ReportTddCoverageSpec, type ReportTestStrategy, type ReportTraceability, type ReportWaivers, type ResolveModeInput, type ResolvedModeSummary, type RunSddPreflightOptions, type SddPreflightResult, type SddPreflightSource, type SddPreflightStatus, type TraceabilitySeverity, type UiFidelityStatus, VISUAL_BROWSER_SURFACES, type ValidationCounts, type ValidationOptions, type ValidationPhase, type ValidationResult, type ValidationTraceability, type ValidationWaiverAction, type ValidationWaiverDowngradeTo, type ValidationWaiverEntry, type ValidationWaiverMatch, type ValidationWaiverScope, type ValidationWaiverSeverity, type ValidationWaiverSuppressed, type ValidationWaivers, checkDecisionGuardrails, createPlaywrightBrowserQaProvider, createPlaywrightRenderAdapter, createReportData, defaultConfig, derivePrototypingObligations, evaluateAtddCodeTraceability, extractAcSpecNumber, extractAllIds, extractBrSpecNumber, extractCapSpecNumber, extractCaseSpecNumber, extractDecisionGuardrailsFromMarkdown, extractIds, extractInvalidIds, extractScSpecNumber, extractSpecNumber, extractUsSpecNumber, filterDecisionGuardrailsByKeyword, findConfigRoot, formatGuardrailsForLlm, formatReportJson, formatReportMarkdown, getConfigPath, inferSurfaceFromRecommendationAndEvidence, isDiscussionUiBearingSurfaceType, isNonUiDiscussionSurface, isValidPrototypingMode, isValidPrototypingSurface, lintSql, loadConfig, loadDecisionGuardrails, normalizeAllowedModes, normalizeDecisionGuardrails, normalizeSurface, parseDiscussionFromObject, parseDiscussionModeRecommendation, parseDiscussionModeRecommendationWithWarnings, requiresVisualBrowserEvidence, resolvePath, resolvePrototypingMode, resolvePrototypingModeFromInput, resolveToolVersion, runBrowserQaOrchestrated, runFullHarness, runPrototypingExecution, runRenderCapture, runSddPreflight, sortDecisionGuardrails, summarizeBrowserQaResult, summarizeResolvedMode, validateAtddCodeTraceability, validateContracts, validateDefinedIds, validateLayeredTraceability, validateOrphanProhibition, validateProject, validateSpecSplitByCapability, validateTraceability, writeEvidenceBundles };
|