artifact-graph 0.5.0 → 0.6.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.
- package/CHANGELOG.md +41 -0
- package/dist/cli.js +803 -42
- package/dist/index.cjs +676 -41
- package/dist/index.d.cts +121 -3
- package/dist/index.d.ts +121 -3
- package/dist/index.js +668 -35
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -559,7 +559,7 @@ interface VersionLockRefreshResult {
|
|
|
559
559
|
warnings: string[];
|
|
560
560
|
}
|
|
561
561
|
declare function buildVersionIndex(root: string, graph?: ArtifactGraph): Promise<VersionIndex>;
|
|
562
|
-
declare function auditVersionLock(root: string, lockPath?: string, graph?: ArtifactGraph): Promise<VersionLockAuditResult>;
|
|
562
|
+
declare function auditVersionLock(root: string, lockPath?: string, graph?: ArtifactGraph, config?: ArtifactSchema): Promise<VersionLockAuditResult>;
|
|
563
563
|
declare function updateVersionLock(root: string, options: VersionLockUpdateOptions): Promise<VersionLockFile>;
|
|
564
564
|
declare function bootstrapVersionLock(root: string, options?: VersionLockBootstrapOptions): Promise<VersionLockFile>;
|
|
565
565
|
declare function refreshVersionLock(root: string, options?: VersionLockRefreshOptions): Promise<VersionLockRefreshResult>;
|
|
@@ -845,6 +845,26 @@ interface ArtifactEdgeRule {
|
|
|
845
845
|
to: string;
|
|
846
846
|
kind: string;
|
|
847
847
|
}
|
|
848
|
+
/** E2E test runner configuration */
|
|
849
|
+
interface E2eRunnerConfig {
|
|
850
|
+
/** Runner name (e.g., 'playwright', 'vitest', 'jest') */
|
|
851
|
+
name: string;
|
|
852
|
+
/** Test kind accepted by this runner: 'unit', 'integration', or 'e2e' */
|
|
853
|
+
kind?: 'unit' | 'integration' | 'e2e';
|
|
854
|
+
/** Root directory for test discovery (relative to project root) */
|
|
855
|
+
root: string;
|
|
856
|
+
/** Include glob patterns for test files */
|
|
857
|
+
include: string[];
|
|
858
|
+
/** Exclude glob patterns for test files */
|
|
859
|
+
exclude?: string[];
|
|
860
|
+
/** Test ignore patterns (files that should not be considered as tests) */
|
|
861
|
+
testIgnore?: string[];
|
|
862
|
+
}
|
|
863
|
+
/** Waiver entry with mandatory reason */
|
|
864
|
+
interface E2eWaiver {
|
|
865
|
+
id: string;
|
|
866
|
+
reason: string;
|
|
867
|
+
}
|
|
848
868
|
interface ArtifactSchema {
|
|
849
869
|
types: Record<string, ArtifactTypeSchema>;
|
|
850
870
|
idPatterns: Record<string, string>;
|
|
@@ -862,6 +882,23 @@ interface ArtifactSchema {
|
|
|
862
882
|
/** When false, skip universal baseline injection. Default: true. */
|
|
863
883
|
universal_baseline?: boolean;
|
|
864
884
|
};
|
|
885
|
+
/** E2E coverage proof configuration */
|
|
886
|
+
e2e?: {
|
|
887
|
+
/** Minimum executable_ref coverage rate (0-1) for warning */
|
|
888
|
+
executable_ref_warning?: number;
|
|
889
|
+
/** Minimum executable_ref coverage rate (0-1) for error */
|
|
890
|
+
executable_ref_error?: number;
|
|
891
|
+
/** Whether to report uncovered scenarios. Default true. */
|
|
892
|
+
report_uncovered_scenarios?: boolean;
|
|
893
|
+
/** Whether to report uncovered features. Default true. */
|
|
894
|
+
report_uncovered_features?: boolean;
|
|
895
|
+
/** Scenario waivers (id + reason) from coverage requirements */
|
|
896
|
+
scenario_waivers?: E2eWaiver[];
|
|
897
|
+
/** Feature waivers (id + reason) from coverage requirements */
|
|
898
|
+
feature_waivers?: E2eWaiver[];
|
|
899
|
+
/** E2E test runner configurations */
|
|
900
|
+
runners?: E2eRunnerConfig[];
|
|
901
|
+
};
|
|
865
902
|
}
|
|
866
903
|
declare const TARGET_ARTIFACT_TYPES: readonly ["feature", "scenario", "decision", "design", "e2e_test"];
|
|
867
904
|
type TargetArtifactType = typeof TARGET_ARTIFACT_TYPES[number];
|
|
@@ -968,7 +1005,88 @@ declare function queryGraph(graph: ArtifactGraph, options: QueryOptions): Artifa
|
|
|
968
1005
|
declare function renderMermaid(graph: ArtifactGraph): string;
|
|
969
1006
|
declare function nextId(graph: ArtifactGraph, schema: ArtifactSchema, type: string, rangeName: string): string;
|
|
970
1007
|
declare function writeGraphCache(root: string, graph: ArtifactGraph): Promise<void>;
|
|
971
|
-
declare function validateExecutableTraceability(root: string): Promise<ValidationIssue[]>;
|
|
1008
|
+
declare function validateExecutableTraceability(root: string, config?: ArtifactSchema): Promise<ValidationIssue[]>;
|
|
1009
|
+
/** O2: E2E coverage statistics and blackhole diagnostics */
|
|
1010
|
+
interface E2eCoverageStats {
|
|
1011
|
+
totalTestCases: number;
|
|
1012
|
+
withExecutableRef: number;
|
|
1013
|
+
executableRefRate: string;
|
|
1014
|
+
/** TCs by status */
|
|
1015
|
+
statusBreakdown: Record<string, number>;
|
|
1016
|
+
/** TCs by chain_type */
|
|
1017
|
+
chainTypeBreakdown: Record<string, number>;
|
|
1018
|
+
/** Scenarios with zero E2E coverage */
|
|
1019
|
+
uncoveredScenarios: string[];
|
|
1020
|
+
/** Features with zero E2E coverage */
|
|
1021
|
+
uncoveredFeatures: string[];
|
|
1022
|
+
/** Configurable thresholds */
|
|
1023
|
+
thresholdWarnings: string[];
|
|
1024
|
+
thresholdErrors: string[];
|
|
1025
|
+
/** Derived ac_coverage_rate per feature */
|
|
1026
|
+
acCoverageRateByFeature: Record<string, {
|
|
1027
|
+
numerator: number;
|
|
1028
|
+
denominator: number;
|
|
1029
|
+
rate: number;
|
|
1030
|
+
}>;
|
|
1031
|
+
/** Multi-dimensional scenario coverage */
|
|
1032
|
+
scenarioCoverage: Record<string, {
|
|
1033
|
+
linked: boolean;
|
|
1034
|
+
acCovered: boolean;
|
|
1035
|
+
waived: boolean;
|
|
1036
|
+
verified: boolean;
|
|
1037
|
+
}>;
|
|
1038
|
+
/** Multi-dimensional feature coverage */
|
|
1039
|
+
featureCoverage: Record<string, {
|
|
1040
|
+
linked: boolean;
|
|
1041
|
+
acCovered: boolean;
|
|
1042
|
+
waived: boolean;
|
|
1043
|
+
verified: boolean;
|
|
1044
|
+
}>;
|
|
1045
|
+
}
|
|
1046
|
+
interface E2eCoverageThresholds {
|
|
1047
|
+
/** Minimum executable_ref coverage rate (0-1). Below this triggers warning. */
|
|
1048
|
+
executableRefWarning?: number;
|
|
1049
|
+
/** Minimum executable_ref coverage rate (0-1). Below this triggers error. */
|
|
1050
|
+
executableRefError?: number;
|
|
1051
|
+
/** Whether to report uncovered scenarios as warnings. Default true. */
|
|
1052
|
+
reportUncoveredScenarios?: boolean;
|
|
1053
|
+
/** Whether to report uncovered features as warnings. Default true. */
|
|
1054
|
+
reportUncoveredFeatures?: boolean;
|
|
1055
|
+
/** Explicit waivers: scenario IDs that are waived from coverage requirements */
|
|
1056
|
+
scenarioWaivers?: E2eWaiver[];
|
|
1057
|
+
/** Explicit waivers: feature IDs that are waived from coverage requirements */
|
|
1058
|
+
featureWaivers?: E2eWaiver[];
|
|
1059
|
+
}
|
|
1060
|
+
declare function computeE2eCoverageStats(graph: ArtifactGraph, root: string, thresholds?: E2eCoverageThresholds): Promise<E2eCoverageStats>;
|
|
1061
|
+
/** O4: Deterministic, idempotent E2E registry generation from Markdown sources */
|
|
1062
|
+
interface E2eRegistryBatch {
|
|
1063
|
+
batch_id: string;
|
|
1064
|
+
file: string;
|
|
1065
|
+
scope: string;
|
|
1066
|
+
ac_coverage: Record<string, string[]>;
|
|
1067
|
+
related_scenarios: string[];
|
|
1068
|
+
test_case_count: number;
|
|
1069
|
+
status_summary?: Record<string, number>;
|
|
1070
|
+
/** Batch-level status: 'blocked' when frontmatter fixes_block indicates blocking */
|
|
1071
|
+
status?: string;
|
|
1072
|
+
/** Blocking reasons from frontmatter fixes_block */
|
|
1073
|
+
blocking_reasons?: Record<string, string>;
|
|
1074
|
+
}
|
|
1075
|
+
interface E2eRegistry {
|
|
1076
|
+
registry_version: string;
|
|
1077
|
+
generated_at: string;
|
|
1078
|
+
total_batches: number;
|
|
1079
|
+
total_test_cases: number;
|
|
1080
|
+
batches: E2eRegistryBatch[];
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* Generate E2E registry from Markdown test files.
|
|
1084
|
+
* Deterministic: same input always produces same output (except generated_at).
|
|
1085
|
+
* Use `--deterministic` to set generated_at to epoch for idempotent diff checks.
|
|
1086
|
+
*/
|
|
1087
|
+
declare function generateE2eRegistry(root: string, opts?: {
|
|
1088
|
+
deterministic?: boolean;
|
|
1089
|
+
}): Promise<E2eRegistry>;
|
|
972
1090
|
interface DiscoverOptions {
|
|
973
1091
|
limit?: number;
|
|
974
1092
|
schema?: ArtifactSchema;
|
|
@@ -987,4 +1105,4 @@ declare function discoverTargets(graph: ArtifactGraph, options?: DiscoverOptions
|
|
|
987
1105
|
declare function resolveArtifactContext(graph: ArtifactGraph, opts: ContextOptions): ContextManifest;
|
|
988
1106
|
declare function formatContextMarkdown(manifest: ContextManifest): string;
|
|
989
1107
|
|
|
990
|
-
export { ALWAYS_PRESENT_ITEMS as ALWAYS_PRESENT, type ArtifactChainDoctorReport, type ArtifactEdge, type ArtifactEdgeRule, type ArtifactExtraFieldSchema, type ArtifactGraph, type ArtifactGraphCliCandidate, type ArtifactGraphCliResolution, type ArtifactGraphCliSource, type ArtifactNode, type ArtifactSchema, type ArtifactTarget, type ArtifactTypeMetadata, type ArtifactTypeRole, type ArtifactTypeSchema, BASELINE_CONSTRAINTS, BASELINE_CONSTRAINTS_COUNT, BASELINE_ITEMS_COUNT, type BatchDefinition, type CollectChangedPathsOptions, type ContextItem, type ContextManifest, type ContextMode, type ContextOptions, type ContextTier, DEFAULT_MAX_CHARS, DEFAULT_SCHEMA, type DiscoverOptions, type Evidence, type EvidenceObject, type ExecutorType, type Finding, type FindingLocation, type FindingSeverity, type FindingStatus, type GitChangeMode, type GitChangeResult, type GitHookName, type HookInstallResult, type ImplementationBlueprintDraft, type ImplementationPacket, MIN_PROMPT_CHARS, type ManagedHookBlockOptions, type MissingDetail, type PacketAuditEntry, type PacketAuditSummary, type PacketCategory, type PacketItem, type PacketOmittedItem, type PacketOptions, type PacketPromptError, type PacketPromptOptions, type PacketTarget, type PacketTargetType, type PacketValidationIssue, type PacketValidationResult, type PreparedManagedHookBlock, type Producer, type PromptValidationIssue, type PromptValidationResult, type QueryOptions, type RepairData, type RepairValidation, type ResolveArtifactGraphCliOptions, type ReviewData, type ReviewDecision, type ReviewMetrics, type ReviewOrderStep, type ReviewResult, type ReviewStatus, type RiskChecklistItem, TARGET_ARTIFACT_TYPES, type TargetArtifactType, type TraceVersionResult, VALID_PACKET_TARGET_TYPES, VERSION_INDEX_SCHEMA_VERSION, VERSION_LOCK_PATH, VERSION_LOCK_SCHEMA_VERSION, type ValidationError, type ValidationIssue, type VersionEdgeKind, type VersionIndex, type VersionLockAuditResult, type VersionLockBootstrapOptions, type VersionLockEntry, type VersionLockFile, type VersionLockIssue, type VersionLockRef, type VersionLockRefreshOptions, type VersionLockRefreshResult, type VersionLockSourceRef, type VersionLockStatus, type VersionLockUpdateOptions, type VersionSourceKind, type VersionedEdge, type VersionedNode, applyPreparedManagedHookBlocks, assemblePacket, auditPackets, auditVersionLock, bootstrapVersionLock, buildGraph, buildVersionIndex, collectChangedPaths, discoverAndAuditPackets, discoverTargets, doctorArtifactChain, formatContextMarkdown, getArtifactTypeMetadata, getTargetArtifactTypes, installManagedHookBlock, isPacketTargetType, isPacketTargetTypeDynamic, isTargetArtifactType, loadConfig, nextId, parseTargetSelector, parseTargetsFile, prepareManagedHookBlock, queryGraph, refreshVersionLock, renderDoctorMarkdown, renderMermaid, renderPacketMarkdown, renderPacketPrompt, renderTraceVersionMarkdown, renderVersionLockAuditMarkdown, renderVersionLockRefreshMarkdown, resolveArtifactContext, resolveArtifactGraphCli, resolveArtifactTypeName, resolveCliTarget, resolveGitHookPath, resolveMatrixEdges, scanArtifacts, traceVersion, updateVersionLock, validateExecutableTraceability, validateGraph, validatePacket, validatePacketMarkdown, validatePacketPrompt, validateReviewResult, validateScenarioPrdLinkIndex, validateScenarioPrdLinks, writeGraphCache };
|
|
1108
|
+
export { ALWAYS_PRESENT_ITEMS as ALWAYS_PRESENT, type ArtifactChainDoctorReport, type ArtifactEdge, type ArtifactEdgeRule, type ArtifactExtraFieldSchema, type ArtifactGraph, type ArtifactGraphCliCandidate, type ArtifactGraphCliResolution, type ArtifactGraphCliSource, type ArtifactNode, type ArtifactSchema, type ArtifactTarget, type ArtifactTypeMetadata, type ArtifactTypeRole, type ArtifactTypeSchema, BASELINE_CONSTRAINTS, BASELINE_CONSTRAINTS_COUNT, BASELINE_ITEMS_COUNT, type BatchDefinition, type CollectChangedPathsOptions, type ContextItem, type ContextManifest, type ContextMode, type ContextOptions, type ContextTier, DEFAULT_MAX_CHARS, DEFAULT_SCHEMA, type DiscoverOptions, type E2eCoverageStats, type E2eCoverageThresholds, type E2eRegistry, type E2eRegistryBatch, type E2eRunnerConfig, type E2eWaiver, type Evidence, type EvidenceObject, type ExecutorType, type Finding, type FindingLocation, type FindingSeverity, type FindingStatus, type GitChangeMode, type GitChangeResult, type GitHookName, type HookInstallResult, type ImplementationBlueprintDraft, type ImplementationPacket, MIN_PROMPT_CHARS, type ManagedHookBlockOptions, type MissingDetail, type PacketAuditEntry, type PacketAuditSummary, type PacketCategory, type PacketItem, type PacketOmittedItem, type PacketOptions, type PacketPromptError, type PacketPromptOptions, type PacketTarget, type PacketTargetType, type PacketValidationIssue, type PacketValidationResult, type PreparedManagedHookBlock, type Producer, type PromptValidationIssue, type PromptValidationResult, type QueryOptions, type RepairData, type RepairValidation, type ResolveArtifactGraphCliOptions, type ReviewData, type ReviewDecision, type ReviewMetrics, type ReviewOrderStep, type ReviewResult, type ReviewStatus, type RiskChecklistItem, TARGET_ARTIFACT_TYPES, type TargetArtifactType, type TraceVersionResult, VALID_PACKET_TARGET_TYPES, VERSION_INDEX_SCHEMA_VERSION, VERSION_LOCK_PATH, VERSION_LOCK_SCHEMA_VERSION, type ValidationError, type ValidationIssue, type VersionEdgeKind, type VersionIndex, type VersionLockAuditResult, type VersionLockBootstrapOptions, type VersionLockEntry, type VersionLockFile, type VersionLockIssue, type VersionLockRef, type VersionLockRefreshOptions, type VersionLockRefreshResult, type VersionLockSourceRef, type VersionLockStatus, type VersionLockUpdateOptions, type VersionSourceKind, type VersionedEdge, type VersionedNode, applyPreparedManagedHookBlocks, assemblePacket, auditPackets, auditVersionLock, bootstrapVersionLock, buildGraph, buildVersionIndex, collectChangedPaths, computeE2eCoverageStats, discoverAndAuditPackets, discoverTargets, doctorArtifactChain, formatContextMarkdown, generateE2eRegistry, getArtifactTypeMetadata, getTargetArtifactTypes, installManagedHookBlock, isPacketTargetType, isPacketTargetTypeDynamic, isTargetArtifactType, loadConfig, nextId, parseTargetSelector, parseTargetsFile, prepareManagedHookBlock, queryGraph, refreshVersionLock, renderDoctorMarkdown, renderMermaid, renderPacketMarkdown, renderPacketPrompt, renderTraceVersionMarkdown, renderVersionLockAuditMarkdown, renderVersionLockRefreshMarkdown, resolveArtifactContext, resolveArtifactGraphCli, resolveArtifactTypeName, resolveCliTarget, resolveGitHookPath, resolveMatrixEdges, scanArtifacts, traceVersion, updateVersionLock, validateExecutableTraceability, validateGraph, validatePacket, validatePacketMarkdown, validatePacketPrompt, validateReviewResult, validateScenarioPrdLinkIndex, validateScenarioPrdLinks, writeGraphCache };
|
package/dist/index.d.ts
CHANGED
|
@@ -559,7 +559,7 @@ interface VersionLockRefreshResult {
|
|
|
559
559
|
warnings: string[];
|
|
560
560
|
}
|
|
561
561
|
declare function buildVersionIndex(root: string, graph?: ArtifactGraph): Promise<VersionIndex>;
|
|
562
|
-
declare function auditVersionLock(root: string, lockPath?: string, graph?: ArtifactGraph): Promise<VersionLockAuditResult>;
|
|
562
|
+
declare function auditVersionLock(root: string, lockPath?: string, graph?: ArtifactGraph, config?: ArtifactSchema): Promise<VersionLockAuditResult>;
|
|
563
563
|
declare function updateVersionLock(root: string, options: VersionLockUpdateOptions): Promise<VersionLockFile>;
|
|
564
564
|
declare function bootstrapVersionLock(root: string, options?: VersionLockBootstrapOptions): Promise<VersionLockFile>;
|
|
565
565
|
declare function refreshVersionLock(root: string, options?: VersionLockRefreshOptions): Promise<VersionLockRefreshResult>;
|
|
@@ -845,6 +845,26 @@ interface ArtifactEdgeRule {
|
|
|
845
845
|
to: string;
|
|
846
846
|
kind: string;
|
|
847
847
|
}
|
|
848
|
+
/** E2E test runner configuration */
|
|
849
|
+
interface E2eRunnerConfig {
|
|
850
|
+
/** Runner name (e.g., 'playwright', 'vitest', 'jest') */
|
|
851
|
+
name: string;
|
|
852
|
+
/** Test kind accepted by this runner: 'unit', 'integration', or 'e2e' */
|
|
853
|
+
kind?: 'unit' | 'integration' | 'e2e';
|
|
854
|
+
/** Root directory for test discovery (relative to project root) */
|
|
855
|
+
root: string;
|
|
856
|
+
/** Include glob patterns for test files */
|
|
857
|
+
include: string[];
|
|
858
|
+
/** Exclude glob patterns for test files */
|
|
859
|
+
exclude?: string[];
|
|
860
|
+
/** Test ignore patterns (files that should not be considered as tests) */
|
|
861
|
+
testIgnore?: string[];
|
|
862
|
+
}
|
|
863
|
+
/** Waiver entry with mandatory reason */
|
|
864
|
+
interface E2eWaiver {
|
|
865
|
+
id: string;
|
|
866
|
+
reason: string;
|
|
867
|
+
}
|
|
848
868
|
interface ArtifactSchema {
|
|
849
869
|
types: Record<string, ArtifactTypeSchema>;
|
|
850
870
|
idPatterns: Record<string, string>;
|
|
@@ -862,6 +882,23 @@ interface ArtifactSchema {
|
|
|
862
882
|
/** When false, skip universal baseline injection. Default: true. */
|
|
863
883
|
universal_baseline?: boolean;
|
|
864
884
|
};
|
|
885
|
+
/** E2E coverage proof configuration */
|
|
886
|
+
e2e?: {
|
|
887
|
+
/** Minimum executable_ref coverage rate (0-1) for warning */
|
|
888
|
+
executable_ref_warning?: number;
|
|
889
|
+
/** Minimum executable_ref coverage rate (0-1) for error */
|
|
890
|
+
executable_ref_error?: number;
|
|
891
|
+
/** Whether to report uncovered scenarios. Default true. */
|
|
892
|
+
report_uncovered_scenarios?: boolean;
|
|
893
|
+
/** Whether to report uncovered features. Default true. */
|
|
894
|
+
report_uncovered_features?: boolean;
|
|
895
|
+
/** Scenario waivers (id + reason) from coverage requirements */
|
|
896
|
+
scenario_waivers?: E2eWaiver[];
|
|
897
|
+
/** Feature waivers (id + reason) from coverage requirements */
|
|
898
|
+
feature_waivers?: E2eWaiver[];
|
|
899
|
+
/** E2E test runner configurations */
|
|
900
|
+
runners?: E2eRunnerConfig[];
|
|
901
|
+
};
|
|
865
902
|
}
|
|
866
903
|
declare const TARGET_ARTIFACT_TYPES: readonly ["feature", "scenario", "decision", "design", "e2e_test"];
|
|
867
904
|
type TargetArtifactType = typeof TARGET_ARTIFACT_TYPES[number];
|
|
@@ -968,7 +1005,88 @@ declare function queryGraph(graph: ArtifactGraph, options: QueryOptions): Artifa
|
|
|
968
1005
|
declare function renderMermaid(graph: ArtifactGraph): string;
|
|
969
1006
|
declare function nextId(graph: ArtifactGraph, schema: ArtifactSchema, type: string, rangeName: string): string;
|
|
970
1007
|
declare function writeGraphCache(root: string, graph: ArtifactGraph): Promise<void>;
|
|
971
|
-
declare function validateExecutableTraceability(root: string): Promise<ValidationIssue[]>;
|
|
1008
|
+
declare function validateExecutableTraceability(root: string, config?: ArtifactSchema): Promise<ValidationIssue[]>;
|
|
1009
|
+
/** O2: E2E coverage statistics and blackhole diagnostics */
|
|
1010
|
+
interface E2eCoverageStats {
|
|
1011
|
+
totalTestCases: number;
|
|
1012
|
+
withExecutableRef: number;
|
|
1013
|
+
executableRefRate: string;
|
|
1014
|
+
/** TCs by status */
|
|
1015
|
+
statusBreakdown: Record<string, number>;
|
|
1016
|
+
/** TCs by chain_type */
|
|
1017
|
+
chainTypeBreakdown: Record<string, number>;
|
|
1018
|
+
/** Scenarios with zero E2E coverage */
|
|
1019
|
+
uncoveredScenarios: string[];
|
|
1020
|
+
/** Features with zero E2E coverage */
|
|
1021
|
+
uncoveredFeatures: string[];
|
|
1022
|
+
/** Configurable thresholds */
|
|
1023
|
+
thresholdWarnings: string[];
|
|
1024
|
+
thresholdErrors: string[];
|
|
1025
|
+
/** Derived ac_coverage_rate per feature */
|
|
1026
|
+
acCoverageRateByFeature: Record<string, {
|
|
1027
|
+
numerator: number;
|
|
1028
|
+
denominator: number;
|
|
1029
|
+
rate: number;
|
|
1030
|
+
}>;
|
|
1031
|
+
/** Multi-dimensional scenario coverage */
|
|
1032
|
+
scenarioCoverage: Record<string, {
|
|
1033
|
+
linked: boolean;
|
|
1034
|
+
acCovered: boolean;
|
|
1035
|
+
waived: boolean;
|
|
1036
|
+
verified: boolean;
|
|
1037
|
+
}>;
|
|
1038
|
+
/** Multi-dimensional feature coverage */
|
|
1039
|
+
featureCoverage: Record<string, {
|
|
1040
|
+
linked: boolean;
|
|
1041
|
+
acCovered: boolean;
|
|
1042
|
+
waived: boolean;
|
|
1043
|
+
verified: boolean;
|
|
1044
|
+
}>;
|
|
1045
|
+
}
|
|
1046
|
+
interface E2eCoverageThresholds {
|
|
1047
|
+
/** Minimum executable_ref coverage rate (0-1). Below this triggers warning. */
|
|
1048
|
+
executableRefWarning?: number;
|
|
1049
|
+
/** Minimum executable_ref coverage rate (0-1). Below this triggers error. */
|
|
1050
|
+
executableRefError?: number;
|
|
1051
|
+
/** Whether to report uncovered scenarios as warnings. Default true. */
|
|
1052
|
+
reportUncoveredScenarios?: boolean;
|
|
1053
|
+
/** Whether to report uncovered features as warnings. Default true. */
|
|
1054
|
+
reportUncoveredFeatures?: boolean;
|
|
1055
|
+
/** Explicit waivers: scenario IDs that are waived from coverage requirements */
|
|
1056
|
+
scenarioWaivers?: E2eWaiver[];
|
|
1057
|
+
/** Explicit waivers: feature IDs that are waived from coverage requirements */
|
|
1058
|
+
featureWaivers?: E2eWaiver[];
|
|
1059
|
+
}
|
|
1060
|
+
declare function computeE2eCoverageStats(graph: ArtifactGraph, root: string, thresholds?: E2eCoverageThresholds): Promise<E2eCoverageStats>;
|
|
1061
|
+
/** O4: Deterministic, idempotent E2E registry generation from Markdown sources */
|
|
1062
|
+
interface E2eRegistryBatch {
|
|
1063
|
+
batch_id: string;
|
|
1064
|
+
file: string;
|
|
1065
|
+
scope: string;
|
|
1066
|
+
ac_coverage: Record<string, string[]>;
|
|
1067
|
+
related_scenarios: string[];
|
|
1068
|
+
test_case_count: number;
|
|
1069
|
+
status_summary?: Record<string, number>;
|
|
1070
|
+
/** Batch-level status: 'blocked' when frontmatter fixes_block indicates blocking */
|
|
1071
|
+
status?: string;
|
|
1072
|
+
/** Blocking reasons from frontmatter fixes_block */
|
|
1073
|
+
blocking_reasons?: Record<string, string>;
|
|
1074
|
+
}
|
|
1075
|
+
interface E2eRegistry {
|
|
1076
|
+
registry_version: string;
|
|
1077
|
+
generated_at: string;
|
|
1078
|
+
total_batches: number;
|
|
1079
|
+
total_test_cases: number;
|
|
1080
|
+
batches: E2eRegistryBatch[];
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* Generate E2E registry from Markdown test files.
|
|
1084
|
+
* Deterministic: same input always produces same output (except generated_at).
|
|
1085
|
+
* Use `--deterministic` to set generated_at to epoch for idempotent diff checks.
|
|
1086
|
+
*/
|
|
1087
|
+
declare function generateE2eRegistry(root: string, opts?: {
|
|
1088
|
+
deterministic?: boolean;
|
|
1089
|
+
}): Promise<E2eRegistry>;
|
|
972
1090
|
interface DiscoverOptions {
|
|
973
1091
|
limit?: number;
|
|
974
1092
|
schema?: ArtifactSchema;
|
|
@@ -987,4 +1105,4 @@ declare function discoverTargets(graph: ArtifactGraph, options?: DiscoverOptions
|
|
|
987
1105
|
declare function resolveArtifactContext(graph: ArtifactGraph, opts: ContextOptions): ContextManifest;
|
|
988
1106
|
declare function formatContextMarkdown(manifest: ContextManifest): string;
|
|
989
1107
|
|
|
990
|
-
export { ALWAYS_PRESENT_ITEMS as ALWAYS_PRESENT, type ArtifactChainDoctorReport, type ArtifactEdge, type ArtifactEdgeRule, type ArtifactExtraFieldSchema, type ArtifactGraph, type ArtifactGraphCliCandidate, type ArtifactGraphCliResolution, type ArtifactGraphCliSource, type ArtifactNode, type ArtifactSchema, type ArtifactTarget, type ArtifactTypeMetadata, type ArtifactTypeRole, type ArtifactTypeSchema, BASELINE_CONSTRAINTS, BASELINE_CONSTRAINTS_COUNT, BASELINE_ITEMS_COUNT, type BatchDefinition, type CollectChangedPathsOptions, type ContextItem, type ContextManifest, type ContextMode, type ContextOptions, type ContextTier, DEFAULT_MAX_CHARS, DEFAULT_SCHEMA, type DiscoverOptions, type Evidence, type EvidenceObject, type ExecutorType, type Finding, type FindingLocation, type FindingSeverity, type FindingStatus, type GitChangeMode, type GitChangeResult, type GitHookName, type HookInstallResult, type ImplementationBlueprintDraft, type ImplementationPacket, MIN_PROMPT_CHARS, type ManagedHookBlockOptions, type MissingDetail, type PacketAuditEntry, type PacketAuditSummary, type PacketCategory, type PacketItem, type PacketOmittedItem, type PacketOptions, type PacketPromptError, type PacketPromptOptions, type PacketTarget, type PacketTargetType, type PacketValidationIssue, type PacketValidationResult, type PreparedManagedHookBlock, type Producer, type PromptValidationIssue, type PromptValidationResult, type QueryOptions, type RepairData, type RepairValidation, type ResolveArtifactGraphCliOptions, type ReviewData, type ReviewDecision, type ReviewMetrics, type ReviewOrderStep, type ReviewResult, type ReviewStatus, type RiskChecklistItem, TARGET_ARTIFACT_TYPES, type TargetArtifactType, type TraceVersionResult, VALID_PACKET_TARGET_TYPES, VERSION_INDEX_SCHEMA_VERSION, VERSION_LOCK_PATH, VERSION_LOCK_SCHEMA_VERSION, type ValidationError, type ValidationIssue, type VersionEdgeKind, type VersionIndex, type VersionLockAuditResult, type VersionLockBootstrapOptions, type VersionLockEntry, type VersionLockFile, type VersionLockIssue, type VersionLockRef, type VersionLockRefreshOptions, type VersionLockRefreshResult, type VersionLockSourceRef, type VersionLockStatus, type VersionLockUpdateOptions, type VersionSourceKind, type VersionedEdge, type VersionedNode, applyPreparedManagedHookBlocks, assemblePacket, auditPackets, auditVersionLock, bootstrapVersionLock, buildGraph, buildVersionIndex, collectChangedPaths, discoverAndAuditPackets, discoverTargets, doctorArtifactChain, formatContextMarkdown, getArtifactTypeMetadata, getTargetArtifactTypes, installManagedHookBlock, isPacketTargetType, isPacketTargetTypeDynamic, isTargetArtifactType, loadConfig, nextId, parseTargetSelector, parseTargetsFile, prepareManagedHookBlock, queryGraph, refreshVersionLock, renderDoctorMarkdown, renderMermaid, renderPacketMarkdown, renderPacketPrompt, renderTraceVersionMarkdown, renderVersionLockAuditMarkdown, renderVersionLockRefreshMarkdown, resolveArtifactContext, resolveArtifactGraphCli, resolveArtifactTypeName, resolveCliTarget, resolveGitHookPath, resolveMatrixEdges, scanArtifacts, traceVersion, updateVersionLock, validateExecutableTraceability, validateGraph, validatePacket, validatePacketMarkdown, validatePacketPrompt, validateReviewResult, validateScenarioPrdLinkIndex, validateScenarioPrdLinks, writeGraphCache };
|
|
1108
|
+
export { ALWAYS_PRESENT_ITEMS as ALWAYS_PRESENT, type ArtifactChainDoctorReport, type ArtifactEdge, type ArtifactEdgeRule, type ArtifactExtraFieldSchema, type ArtifactGraph, type ArtifactGraphCliCandidate, type ArtifactGraphCliResolution, type ArtifactGraphCliSource, type ArtifactNode, type ArtifactSchema, type ArtifactTarget, type ArtifactTypeMetadata, type ArtifactTypeRole, type ArtifactTypeSchema, BASELINE_CONSTRAINTS, BASELINE_CONSTRAINTS_COUNT, BASELINE_ITEMS_COUNT, type BatchDefinition, type CollectChangedPathsOptions, type ContextItem, type ContextManifest, type ContextMode, type ContextOptions, type ContextTier, DEFAULT_MAX_CHARS, DEFAULT_SCHEMA, type DiscoverOptions, type E2eCoverageStats, type E2eCoverageThresholds, type E2eRegistry, type E2eRegistryBatch, type E2eRunnerConfig, type E2eWaiver, type Evidence, type EvidenceObject, type ExecutorType, type Finding, type FindingLocation, type FindingSeverity, type FindingStatus, type GitChangeMode, type GitChangeResult, type GitHookName, type HookInstallResult, type ImplementationBlueprintDraft, type ImplementationPacket, MIN_PROMPT_CHARS, type ManagedHookBlockOptions, type MissingDetail, type PacketAuditEntry, type PacketAuditSummary, type PacketCategory, type PacketItem, type PacketOmittedItem, type PacketOptions, type PacketPromptError, type PacketPromptOptions, type PacketTarget, type PacketTargetType, type PacketValidationIssue, type PacketValidationResult, type PreparedManagedHookBlock, type Producer, type PromptValidationIssue, type PromptValidationResult, type QueryOptions, type RepairData, type RepairValidation, type ResolveArtifactGraphCliOptions, type ReviewData, type ReviewDecision, type ReviewMetrics, type ReviewOrderStep, type ReviewResult, type ReviewStatus, type RiskChecklistItem, TARGET_ARTIFACT_TYPES, type TargetArtifactType, type TraceVersionResult, VALID_PACKET_TARGET_TYPES, VERSION_INDEX_SCHEMA_VERSION, VERSION_LOCK_PATH, VERSION_LOCK_SCHEMA_VERSION, type ValidationError, type ValidationIssue, type VersionEdgeKind, type VersionIndex, type VersionLockAuditResult, type VersionLockBootstrapOptions, type VersionLockEntry, type VersionLockFile, type VersionLockIssue, type VersionLockRef, type VersionLockRefreshOptions, type VersionLockRefreshResult, type VersionLockSourceRef, type VersionLockStatus, type VersionLockUpdateOptions, type VersionSourceKind, type VersionedEdge, type VersionedNode, applyPreparedManagedHookBlocks, assemblePacket, auditPackets, auditVersionLock, bootstrapVersionLock, buildGraph, buildVersionIndex, collectChangedPaths, computeE2eCoverageStats, discoverAndAuditPackets, discoverTargets, doctorArtifactChain, formatContextMarkdown, generateE2eRegistry, getArtifactTypeMetadata, getTargetArtifactTypes, installManagedHookBlock, isPacketTargetType, isPacketTargetTypeDynamic, isTargetArtifactType, loadConfig, nextId, parseTargetSelector, parseTargetsFile, prepareManagedHookBlock, queryGraph, refreshVersionLock, renderDoctorMarkdown, renderMermaid, renderPacketMarkdown, renderPacketPrompt, renderTraceVersionMarkdown, renderVersionLockAuditMarkdown, renderVersionLockRefreshMarkdown, resolveArtifactContext, resolveArtifactGraphCli, resolveArtifactTypeName, resolveCliTarget, resolveGitHookPath, resolveMatrixEdges, scanArtifacts, traceVersion, updateVersionLock, validateExecutableTraceability, validateGraph, validatePacket, validatePacketMarkdown, validatePacketPrompt, validateReviewResult, validateScenarioPrdLinkIndex, validateScenarioPrdLinks, writeGraphCache };
|