@ivorycanvas/qamap 0.3.4 → 0.4.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 +43 -1
- package/README.md +19 -14
- package/dist/behavior-intent.d.ts +6 -0
- package/dist/behavior-intent.js +172 -0
- package/dist/behavior-intent.js.map +1 -0
- package/dist/behavior-manifest.d.ts +6 -0
- package/dist/behavior-manifest.js +221 -0
- package/dist/behavior-manifest.js.map +1 -0
- package/dist/behavior.d.ts +143 -0
- package/dist/behavior.js +458 -0
- package/dist/behavior.js.map +1 -0
- package/dist/change-intent.d.ts +71 -0
- package/dist/change-intent.js +744 -0
- package/dist/change-intent.js.map +1 -0
- package/dist/cli.js +6 -5
- package/dist/cli.js.map +1 -1
- package/dist/e2e.d.ts +16 -1
- package/dist/e2e.js +329 -24
- package/dist/e2e.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest.js +138 -4
- package/dist/manifest.js.map +1 -1
- package/dist/qa.d.ts +1 -0
- package/dist/qa.js +73 -1
- package/dist/qa.js.map +1 -1
- package/dist/terminal.js +1 -1
- package/dist/terminal.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/adoption.md +11 -10
- package/docs/agent-format.md +9 -7
- package/docs/agent-skill.md +5 -2
- package/docs/architecture.md +131 -0
- package/docs/benchmarking.md +26 -4
- package/docs/commands.md +13 -7
- package/docs/e2e-output-examples.md +23 -9
- package/docs/manifest.md +4 -0
- package/docs/quickstart-demo.md +9 -2
- package/docs/release-validation.md +50 -37
- package/docs/releasing.md +13 -0
- package/docs/roadmap.md +20 -10
- package/package.json +4 -2
- package/schema/qamap-agent.schema.json +42 -1
- package/schema/qamap-behavior.schema.json +307 -0
- package/skills/qamap-pr-qa/SKILL.md +16 -11
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export declare const behaviorGraphSchemaVersion: 1;
|
|
2
|
+
export declare const behaviorGraphSchemaUrl = "https://raw.githubusercontent.com/IvoryCanvas/qamap/main/schema/qamap-behavior.schema.json";
|
|
3
|
+
export declare const behaviorSurfaceKinds: readonly ["web", "mobile", "api", "cli", "artifact", "unknown"];
|
|
4
|
+
export declare const behaviorNodeKinds: readonly ["domain", "flow", "surface", "action", "state", "effect", "contract", "assertion", "fixture", "locator", "source"];
|
|
5
|
+
export declare const behaviorEdgeKinds: readonly ["contains", "enters-at", "precedes", "expects", "uses-fixture", "located-by", "implemented-by", "impacts"];
|
|
6
|
+
export declare const behaviorEvidenceKinds: readonly ["commit", "diff", "source", "manifest", "selector", "fixture", "test", "inference"];
|
|
7
|
+
export type BehaviorConfidence = "low" | "medium" | "high";
|
|
8
|
+
export type BehaviorAdapterConfidence = "none" | BehaviorConfidence;
|
|
9
|
+
export type BehaviorSurfaceKind = (typeof behaviorSurfaceKinds)[number];
|
|
10
|
+
export type BehaviorNodeKind = (typeof behaviorNodeKinds)[number];
|
|
11
|
+
export type BehaviorEdgeKind = (typeof behaviorEdgeKinds)[number];
|
|
12
|
+
export type BehaviorEvidenceKind = (typeof behaviorEvidenceKinds)[number];
|
|
13
|
+
export type BehaviorImpactKind = "direct" | "propagated";
|
|
14
|
+
export type BehaviorDiagnosticSeverity = "info" | "warning";
|
|
15
|
+
export type BehaviorAttributeValue = string | number | boolean | string[];
|
|
16
|
+
export interface BehaviorEvidence {
|
|
17
|
+
kind: BehaviorEvidenceKind;
|
|
18
|
+
value: string;
|
|
19
|
+
file?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface BehaviorImpact {
|
|
22
|
+
kind: BehaviorImpactKind;
|
|
23
|
+
changedFiles: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface BehaviorNode {
|
|
26
|
+
id: string;
|
|
27
|
+
kind: BehaviorNodeKind;
|
|
28
|
+
label: string;
|
|
29
|
+
confidence: BehaviorConfidence;
|
|
30
|
+
evidence: BehaviorEvidence[];
|
|
31
|
+
attributes?: Record<string, BehaviorAttributeValue>;
|
|
32
|
+
impact?: BehaviorImpact;
|
|
33
|
+
}
|
|
34
|
+
export interface BehaviorEdge {
|
|
35
|
+
id: string;
|
|
36
|
+
kind: BehaviorEdgeKind;
|
|
37
|
+
from: string;
|
|
38
|
+
to: string;
|
|
39
|
+
confidence: BehaviorConfidence;
|
|
40
|
+
evidence: BehaviorEvidence[];
|
|
41
|
+
}
|
|
42
|
+
export interface BehaviorDiagnostic {
|
|
43
|
+
severity: BehaviorDiagnosticSeverity;
|
|
44
|
+
message: string;
|
|
45
|
+
adapterId?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface BehaviorAdapterDetection {
|
|
48
|
+
confidence: BehaviorAdapterConfidence;
|
|
49
|
+
reason: string;
|
|
50
|
+
evidence: string[];
|
|
51
|
+
}
|
|
52
|
+
export interface BehaviorAdapterRun {
|
|
53
|
+
id: string;
|
|
54
|
+
version: string;
|
|
55
|
+
status: "used" | "skipped" | "failed";
|
|
56
|
+
detection: BehaviorAdapterDetection;
|
|
57
|
+
nodeCount: number;
|
|
58
|
+
edgeCount: number;
|
|
59
|
+
}
|
|
60
|
+
export interface BehaviorGraphSummary {
|
|
61
|
+
nodes: number;
|
|
62
|
+
edges: number;
|
|
63
|
+
impactedNodes: number;
|
|
64
|
+
byKind: Record<BehaviorNodeKind, number>;
|
|
65
|
+
}
|
|
66
|
+
export interface BehaviorGraph {
|
|
67
|
+
$schema?: string;
|
|
68
|
+
schemaVersion: typeof behaviorGraphSchemaVersion;
|
|
69
|
+
root: string;
|
|
70
|
+
workspaceRoot?: string;
|
|
71
|
+
base: string;
|
|
72
|
+
head: string;
|
|
73
|
+
surface: BehaviorSurfaceKind;
|
|
74
|
+
adapters: BehaviorAdapterRun[];
|
|
75
|
+
nodes: BehaviorNode[];
|
|
76
|
+
edges: BehaviorEdge[];
|
|
77
|
+
diagnostics: BehaviorDiagnostic[];
|
|
78
|
+
summary: BehaviorGraphSummary;
|
|
79
|
+
}
|
|
80
|
+
export interface BehaviorChangedFile {
|
|
81
|
+
path: string;
|
|
82
|
+
status: string;
|
|
83
|
+
previousPath?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface BehaviorAnalysisContext {
|
|
86
|
+
root: string;
|
|
87
|
+
workspaceRoot?: string;
|
|
88
|
+
base: string;
|
|
89
|
+
head: string;
|
|
90
|
+
projectType: string;
|
|
91
|
+
surface: BehaviorSurfaceKind;
|
|
92
|
+
runner?: string;
|
|
93
|
+
changedFiles: BehaviorChangedFile[];
|
|
94
|
+
}
|
|
95
|
+
export interface BehaviorGraphFragment {
|
|
96
|
+
nodes: BehaviorNode[];
|
|
97
|
+
edges: BehaviorEdge[];
|
|
98
|
+
diagnostics?: BehaviorDiagnostic[];
|
|
99
|
+
}
|
|
100
|
+
export interface BehaviorAnalyzerAdapter {
|
|
101
|
+
id: string;
|
|
102
|
+
version: string;
|
|
103
|
+
detect(context: BehaviorAnalysisContext): BehaviorAdapterDetection | Promise<BehaviorAdapterDetection>;
|
|
104
|
+
analyze(context: BehaviorAnalysisContext): BehaviorGraphFragment | Promise<BehaviorGraphFragment>;
|
|
105
|
+
}
|
|
106
|
+
export interface InferredBehaviorEntrypoint {
|
|
107
|
+
kind: "route" | "screen" | "command";
|
|
108
|
+
value: string;
|
|
109
|
+
file: string;
|
|
110
|
+
confidence: BehaviorConfidence;
|
|
111
|
+
}
|
|
112
|
+
export interface InferredBehaviorSelector {
|
|
113
|
+
kind: string;
|
|
114
|
+
value: string;
|
|
115
|
+
file: string;
|
|
116
|
+
addedInDiff?: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface InferredBehaviorCoverage {
|
|
119
|
+
title: string;
|
|
120
|
+
priority: string;
|
|
121
|
+
reason: string;
|
|
122
|
+
checks: string[];
|
|
123
|
+
}
|
|
124
|
+
export interface InferredBehaviorFlow {
|
|
125
|
+
kind: string;
|
|
126
|
+
title: string;
|
|
127
|
+
reason: string;
|
|
128
|
+
files: string[];
|
|
129
|
+
steps: string[];
|
|
130
|
+
entrypoints: InferredBehaviorEntrypoint[];
|
|
131
|
+
selectors: InferredBehaviorSelector[];
|
|
132
|
+
coverage: InferredBehaviorCoverage[];
|
|
133
|
+
fixtureStatus: string;
|
|
134
|
+
fixtureFiles: string[];
|
|
135
|
+
}
|
|
136
|
+
export interface InferredFlowAdapterOptions {
|
|
137
|
+
flows: InferredBehaviorFlow[];
|
|
138
|
+
}
|
|
139
|
+
export declare function analyzeBehaviorGraph(context: BehaviorAnalysisContext, adapters: BehaviorAnalyzerAdapter[]): Promise<BehaviorGraph>;
|
|
140
|
+
export declare function mergeBehaviorGraphFragments(fragments: BehaviorGraphFragment[]): BehaviorGraphFragment;
|
|
141
|
+
export declare function createInferredFlowBehaviorAdapter(options: InferredFlowAdapterOptions): BehaviorAnalyzerAdapter;
|
|
142
|
+
export declare function createBehaviorNodeId(kind: BehaviorNodeKind, ...parts: string[]): string;
|
|
143
|
+
export declare function createBehaviorEdge(kind: BehaviorEdgeKind, from: string, to: string, confidence: BehaviorConfidence, evidence?: BehaviorEvidence[]): BehaviorEdge;
|
package/dist/behavior.js
ADDED
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
export const behaviorGraphSchemaVersion = 1;
|
|
3
|
+
export const behaviorGraphSchemaUrl = "https://raw.githubusercontent.com/IvoryCanvas/qamap/main/schema/qamap-behavior.schema.json";
|
|
4
|
+
export const behaviorSurfaceKinds = ["web", "mobile", "api", "cli", "artifact", "unknown"];
|
|
5
|
+
export const behaviorNodeKinds = [
|
|
6
|
+
"domain",
|
|
7
|
+
"flow",
|
|
8
|
+
"surface",
|
|
9
|
+
"action",
|
|
10
|
+
"state",
|
|
11
|
+
"effect",
|
|
12
|
+
"contract",
|
|
13
|
+
"assertion",
|
|
14
|
+
"fixture",
|
|
15
|
+
"locator",
|
|
16
|
+
"source",
|
|
17
|
+
];
|
|
18
|
+
export const behaviorEdgeKinds = [
|
|
19
|
+
"contains",
|
|
20
|
+
"enters-at",
|
|
21
|
+
"precedes",
|
|
22
|
+
"expects",
|
|
23
|
+
"uses-fixture",
|
|
24
|
+
"located-by",
|
|
25
|
+
"implemented-by",
|
|
26
|
+
"impacts",
|
|
27
|
+
];
|
|
28
|
+
export const behaviorEvidenceKinds = ["commit", "diff", "source", "manifest", "selector", "fixture", "test", "inference"];
|
|
29
|
+
const confidenceWeight = {
|
|
30
|
+
low: 1,
|
|
31
|
+
medium: 2,
|
|
32
|
+
high: 3,
|
|
33
|
+
};
|
|
34
|
+
const assertionStepMatcher = /^\s*(?:assert|check|compare|confirm|ensure|expect|record|reject|verify)\b/i;
|
|
35
|
+
export async function analyzeBehaviorGraph(context, adapters) {
|
|
36
|
+
const adapterRuns = [];
|
|
37
|
+
const fragments = [];
|
|
38
|
+
const diagnostics = [];
|
|
39
|
+
for (const adapter of [...adapters].sort((left, right) => left.id.localeCompare(right.id))) {
|
|
40
|
+
let detection;
|
|
41
|
+
try {
|
|
42
|
+
detection = normalizeDetection(await adapter.detect(context));
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
const message = errorMessage(error);
|
|
46
|
+
diagnostics.push({ severity: "warning", adapterId: adapter.id, message: `Adapter detection failed: ${message}` });
|
|
47
|
+
adapterRuns.push({
|
|
48
|
+
id: adapter.id,
|
|
49
|
+
version: adapter.version,
|
|
50
|
+
status: "failed",
|
|
51
|
+
detection: { confidence: "none", reason: message, evidence: [] },
|
|
52
|
+
nodeCount: 0,
|
|
53
|
+
edgeCount: 0,
|
|
54
|
+
});
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (detection.confidence === "none") {
|
|
58
|
+
adapterRuns.push({
|
|
59
|
+
id: adapter.id,
|
|
60
|
+
version: adapter.version,
|
|
61
|
+
status: "skipped",
|
|
62
|
+
detection,
|
|
63
|
+
nodeCount: 0,
|
|
64
|
+
edgeCount: 0,
|
|
65
|
+
});
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
const fragment = await adapter.analyze(context);
|
|
70
|
+
fragments.push({
|
|
71
|
+
...fragment,
|
|
72
|
+
diagnostics: (fragment.diagnostics ?? []).map((item) => ({ ...item, adapterId: item.adapterId ?? adapter.id })),
|
|
73
|
+
});
|
|
74
|
+
adapterRuns.push({
|
|
75
|
+
id: adapter.id,
|
|
76
|
+
version: adapter.version,
|
|
77
|
+
status: "used",
|
|
78
|
+
detection,
|
|
79
|
+
nodeCount: fragment.nodes.length,
|
|
80
|
+
edgeCount: fragment.edges.length,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
const message = errorMessage(error);
|
|
85
|
+
diagnostics.push({ severity: "warning", adapterId: adapter.id, message: `Adapter analysis failed: ${message}` });
|
|
86
|
+
adapterRuns.push({
|
|
87
|
+
id: adapter.id,
|
|
88
|
+
version: adapter.version,
|
|
89
|
+
status: "failed",
|
|
90
|
+
detection,
|
|
91
|
+
nodeCount: 0,
|
|
92
|
+
edgeCount: 0,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const merged = mergeBehaviorGraphFragments(fragments);
|
|
97
|
+
diagnostics.push(...(merged.diagnostics ?? []));
|
|
98
|
+
return {
|
|
99
|
+
$schema: behaviorGraphSchemaUrl,
|
|
100
|
+
schemaVersion: behaviorGraphSchemaVersion,
|
|
101
|
+
root: context.root,
|
|
102
|
+
workspaceRoot: context.workspaceRoot,
|
|
103
|
+
base: context.base,
|
|
104
|
+
head: context.head,
|
|
105
|
+
surface: context.surface,
|
|
106
|
+
adapters: adapterRuns,
|
|
107
|
+
nodes: merged.nodes,
|
|
108
|
+
edges: merged.edges,
|
|
109
|
+
diagnostics,
|
|
110
|
+
summary: summarizeBehaviorGraph(merged.nodes, merged.edges),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export function mergeBehaviorGraphFragments(fragments) {
|
|
114
|
+
const nodes = new Map();
|
|
115
|
+
const edges = new Map();
|
|
116
|
+
const diagnostics = [];
|
|
117
|
+
for (const fragment of fragments) {
|
|
118
|
+
diagnostics.push(...(fragment.diagnostics ?? []));
|
|
119
|
+
for (const node of fragment.nodes) {
|
|
120
|
+
const existing = nodes.get(node.id);
|
|
121
|
+
if (!existing) {
|
|
122
|
+
nodes.set(node.id, normalizeNode(node));
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if (existing.kind !== node.kind) {
|
|
126
|
+
diagnostics.push({
|
|
127
|
+
severity: "warning",
|
|
128
|
+
message: `Behavior node ${node.id} was emitted with both ${existing.kind} and ${node.kind}; keeping ${existing.kind}.`,
|
|
129
|
+
});
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
nodes.set(node.id, mergeNodes(existing, node));
|
|
133
|
+
}
|
|
134
|
+
for (const edge of fragment.edges) {
|
|
135
|
+
const existing = edges.get(edge.id);
|
|
136
|
+
edges.set(edge.id, existing ? mergeEdges(existing, edge) : normalizeEdge(edge));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
for (const [id, edge] of edges) {
|
|
140
|
+
if (nodes.has(edge.from) && nodes.has(edge.to)) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
edges.delete(id);
|
|
144
|
+
diagnostics.push({
|
|
145
|
+
severity: "warning",
|
|
146
|
+
message: `Dropped behavior edge ${id} because one or both endpoint nodes were missing.`,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return {
|
|
150
|
+
nodes: [...nodes.values()].sort(compareById),
|
|
151
|
+
edges: [...edges.values()].sort(compareById),
|
|
152
|
+
diagnostics,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export function createInferredFlowBehaviorAdapter(options) {
|
|
156
|
+
return {
|
|
157
|
+
id: "qamap.inferred-flow-compat",
|
|
158
|
+
version: "1",
|
|
159
|
+
detect: () => ({
|
|
160
|
+
confidence: options.flows.length > 0 ? "high" : "none",
|
|
161
|
+
reason: options.flows.length > 0
|
|
162
|
+
? "QAMap produced deterministic flow observations that can be represented in the behavior graph."
|
|
163
|
+
: "No inferred flow observations were available.",
|
|
164
|
+
evidence: options.flows.slice(0, 8).map((flow) => flow.title),
|
|
165
|
+
}),
|
|
166
|
+
analyze: (context) => buildInferredFlowFragment(context, options.flows),
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
export function createBehaviorNodeId(kind, ...parts) {
|
|
170
|
+
const identity = parts.map((part) => part.trim()).join("\u0000");
|
|
171
|
+
const readable = slugify(parts.find((part) => part.trim().length > 0) ?? kind).slice(0, 40) || kind;
|
|
172
|
+
return `${kind}:${readable}:${shortHash(`${kind}\u0000${identity}`)}`;
|
|
173
|
+
}
|
|
174
|
+
export function createBehaviorEdge(kind, from, to, confidence, evidence = []) {
|
|
175
|
+
return {
|
|
176
|
+
id: `edge:${shortHash(`${kind}\u0000${from}\u0000${to}`)}`,
|
|
177
|
+
kind,
|
|
178
|
+
from,
|
|
179
|
+
to,
|
|
180
|
+
confidence,
|
|
181
|
+
evidence: uniqueEvidence(evidence),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
function buildInferredFlowFragment(context, flows) {
|
|
185
|
+
const nodes = [];
|
|
186
|
+
const edges = [];
|
|
187
|
+
const changedFiles = new Set(context.changedFiles.map((file) => file.path));
|
|
188
|
+
for (const flow of flows) {
|
|
189
|
+
const files = uniqueStrings(flow.files);
|
|
190
|
+
const directlyChanged = files.filter((file) => changedFiles.has(file));
|
|
191
|
+
const impactFiles = directlyChanged.length > 0
|
|
192
|
+
? directlyChanged
|
|
193
|
+
: context.changedFiles.map((file) => file.path).slice(0, 12);
|
|
194
|
+
const confidence = inferredFlowConfidence(flow);
|
|
195
|
+
const flowId = createBehaviorNodeId("flow", flow.kind, flow.title, ...files.slice().sort());
|
|
196
|
+
nodes.push({
|
|
197
|
+
id: flowId,
|
|
198
|
+
kind: "flow",
|
|
199
|
+
label: flow.title,
|
|
200
|
+
confidence,
|
|
201
|
+
evidence: uniqueEvidence([
|
|
202
|
+
{ kind: "inference", value: flow.reason },
|
|
203
|
+
...files.slice(0, 12).map((file) => ({ kind: "source", value: file, file })),
|
|
204
|
+
]),
|
|
205
|
+
attributes: {
|
|
206
|
+
flowKind: flow.kind,
|
|
207
|
+
surface: surfaceForFlow(flow, context.surface),
|
|
208
|
+
fixtureStatus: flow.fixtureStatus,
|
|
209
|
+
},
|
|
210
|
+
impact: impactFiles.length > 0
|
|
211
|
+
? { kind: directlyChanged.length > 0 ? "direct" : "propagated", changedFiles: uniqueStrings(impactFiles) }
|
|
212
|
+
: undefined,
|
|
213
|
+
});
|
|
214
|
+
for (const file of files) {
|
|
215
|
+
const sourceId = createBehaviorNodeId("source", file);
|
|
216
|
+
const direct = changedFiles.has(file);
|
|
217
|
+
nodes.push({
|
|
218
|
+
id: sourceId,
|
|
219
|
+
kind: "source",
|
|
220
|
+
label: file,
|
|
221
|
+
confidence: "high",
|
|
222
|
+
evidence: [{ kind: direct ? "diff" : "source", value: file, file }],
|
|
223
|
+
attributes: { path: file },
|
|
224
|
+
impact: direct ? { kind: "direct", changedFiles: [file] } : undefined,
|
|
225
|
+
});
|
|
226
|
+
edges.push(direct
|
|
227
|
+
? createBehaviorEdge("impacts", sourceId, flowId, "high", [{ kind: "diff", value: file, file }])
|
|
228
|
+
: createBehaviorEdge("implemented-by", flowId, sourceId, "medium", [{ kind: "source", value: file, file }]));
|
|
229
|
+
}
|
|
230
|
+
for (const entrypoint of flow.entrypoints) {
|
|
231
|
+
const surfaceId = createBehaviorNodeId("surface", entrypoint.kind, entrypoint.value, entrypoint.file);
|
|
232
|
+
nodes.push({
|
|
233
|
+
id: surfaceId,
|
|
234
|
+
kind: "surface",
|
|
235
|
+
label: `${entrypoint.kind}: ${entrypoint.value}`,
|
|
236
|
+
confidence: entrypoint.confidence,
|
|
237
|
+
evidence: [{ kind: "source", value: entrypoint.value, file: entrypoint.file }],
|
|
238
|
+
attributes: {
|
|
239
|
+
entrypointKind: entrypoint.kind,
|
|
240
|
+
value: entrypoint.value,
|
|
241
|
+
surface: surfaceForEntrypoint(entrypoint.kind),
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
edges.push(createBehaviorEdge("enters-at", flowId, surfaceId, entrypoint.confidence, [
|
|
245
|
+
{ kind: "source", value: entrypoint.value, file: entrypoint.file },
|
|
246
|
+
]));
|
|
247
|
+
}
|
|
248
|
+
let previousStepId;
|
|
249
|
+
flow.steps.forEach((step, index) => {
|
|
250
|
+
const kind = assertionStepMatcher.test(step) ? "assertion" : "action";
|
|
251
|
+
const stepId = createBehaviorNodeId(kind, flowId, String(index), step);
|
|
252
|
+
nodes.push({
|
|
253
|
+
id: stepId,
|
|
254
|
+
kind,
|
|
255
|
+
label: step,
|
|
256
|
+
confidence,
|
|
257
|
+
evidence: [{ kind: "inference", value: `flow-step:${index + 1}` }],
|
|
258
|
+
attributes: { order: index + 1 },
|
|
259
|
+
});
|
|
260
|
+
edges.push(createBehaviorEdge(kind === "assertion" ? "expects" : "contains", flowId, stepId, confidence));
|
|
261
|
+
if (previousStepId) {
|
|
262
|
+
edges.push(createBehaviorEdge("precedes", previousStepId, stepId, confidence));
|
|
263
|
+
}
|
|
264
|
+
previousStepId = stepId;
|
|
265
|
+
});
|
|
266
|
+
flow.coverage.forEach((target, targetIndex) => {
|
|
267
|
+
const checks = target.checks.length > 0 ? target.checks : [target.title];
|
|
268
|
+
checks.forEach((check, checkIndex) => {
|
|
269
|
+
const assertionId = createBehaviorNodeId("assertion", flowId, "coverage", String(targetIndex), String(checkIndex), check);
|
|
270
|
+
nodes.push({
|
|
271
|
+
id: assertionId,
|
|
272
|
+
kind: "assertion",
|
|
273
|
+
label: check,
|
|
274
|
+
confidence: confidenceForPriority(target.priority),
|
|
275
|
+
evidence: [{ kind: "inference", value: target.reason }],
|
|
276
|
+
attributes: { coverageTarget: target.title, priority: target.priority },
|
|
277
|
+
});
|
|
278
|
+
edges.push(createBehaviorEdge("expects", flowId, assertionId, confidenceForPriority(target.priority)));
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
for (const selector of flow.selectors) {
|
|
282
|
+
const locatorId = createBehaviorNodeId("locator", selector.kind, selector.value, selector.file);
|
|
283
|
+
nodes.push({
|
|
284
|
+
id: locatorId,
|
|
285
|
+
kind: "locator",
|
|
286
|
+
label: `${selector.kind}: ${selector.value}`,
|
|
287
|
+
confidence: selector.addedInDiff ? "high" : "medium",
|
|
288
|
+
evidence: [{
|
|
289
|
+
kind: selector.addedInDiff ? "diff" : "selector",
|
|
290
|
+
value: selector.value,
|
|
291
|
+
file: selector.file,
|
|
292
|
+
}],
|
|
293
|
+
attributes: { selectorKind: selector.kind, value: selector.value, addedInDiff: selector.addedInDiff ?? false },
|
|
294
|
+
});
|
|
295
|
+
edges.push(createBehaviorEdge("located-by", flowId, locatorId, selector.addedInDiff ? "high" : "medium"));
|
|
296
|
+
}
|
|
297
|
+
for (const fixtureFile of uniqueStrings(flow.fixtureFiles)) {
|
|
298
|
+
const fixtureId = createBehaviorNodeId("fixture", fixtureFile);
|
|
299
|
+
nodes.push({
|
|
300
|
+
id: fixtureId,
|
|
301
|
+
kind: "fixture",
|
|
302
|
+
label: fixtureFile,
|
|
303
|
+
confidence: "high",
|
|
304
|
+
evidence: [{ kind: "fixture", value: fixtureFile, file: fixtureFile }],
|
|
305
|
+
attributes: { path: fixtureFile },
|
|
306
|
+
});
|
|
307
|
+
edges.push(createBehaviorEdge("uses-fixture", flowId, fixtureId, "high"));
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return { nodes, edges };
|
|
311
|
+
}
|
|
312
|
+
function surfaceForFlow(flow, fallback) {
|
|
313
|
+
if (flow.kind === "api") {
|
|
314
|
+
return "api";
|
|
315
|
+
}
|
|
316
|
+
if (flow.kind === "command") {
|
|
317
|
+
return "cli";
|
|
318
|
+
}
|
|
319
|
+
if (flow.kind === "artifact" || flow.kind === "catalog" || flow.kind === "generated-artifact") {
|
|
320
|
+
return "artifact";
|
|
321
|
+
}
|
|
322
|
+
return fallback;
|
|
323
|
+
}
|
|
324
|
+
function surfaceForEntrypoint(kind) {
|
|
325
|
+
if (kind === "route") {
|
|
326
|
+
return "web";
|
|
327
|
+
}
|
|
328
|
+
if (kind === "screen") {
|
|
329
|
+
return "mobile";
|
|
330
|
+
}
|
|
331
|
+
return "cli";
|
|
332
|
+
}
|
|
333
|
+
function inferredFlowConfidence(flow) {
|
|
334
|
+
if (flow.entrypoints.some((entrypoint) => entrypoint.confidence === "high") || flow.selectors.some((selector) => selector.addedInDiff)) {
|
|
335
|
+
return "high";
|
|
336
|
+
}
|
|
337
|
+
if (flow.entrypoints.length > 0 || flow.selectors.length > 0 || flow.files.length > 0) {
|
|
338
|
+
return "medium";
|
|
339
|
+
}
|
|
340
|
+
return "low";
|
|
341
|
+
}
|
|
342
|
+
function confidenceForPriority(priority) {
|
|
343
|
+
if (priority === "critical") {
|
|
344
|
+
return "high";
|
|
345
|
+
}
|
|
346
|
+
if (priority === "recommended") {
|
|
347
|
+
return "medium";
|
|
348
|
+
}
|
|
349
|
+
return "low";
|
|
350
|
+
}
|
|
351
|
+
function normalizeDetection(detection) {
|
|
352
|
+
return {
|
|
353
|
+
confidence: detection.confidence,
|
|
354
|
+
reason: detection.reason.trim() || "No detection reason was provided.",
|
|
355
|
+
evidence: uniqueStrings(detection.evidence),
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function mergeNodes(left, right) {
|
|
359
|
+
return {
|
|
360
|
+
...left,
|
|
361
|
+
confidence: strongerConfidence(left.confidence, right.confidence),
|
|
362
|
+
evidence: uniqueEvidence([...left.evidence, ...right.evidence]),
|
|
363
|
+
attributes: left.attributes || right.attributes ? { ...(left.attributes ?? {}), ...(right.attributes ?? {}) } : undefined,
|
|
364
|
+
impact: mergeImpact(left.impact, right.impact),
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
function mergeEdges(left, right) {
|
|
368
|
+
return {
|
|
369
|
+
...left,
|
|
370
|
+
confidence: strongerConfidence(left.confidence, right.confidence),
|
|
371
|
+
evidence: uniqueEvidence([...left.evidence, ...right.evidence]),
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
function normalizeNode(node) {
|
|
375
|
+
return {
|
|
376
|
+
...node,
|
|
377
|
+
evidence: uniqueEvidence(node.evidence),
|
|
378
|
+
impact: node.impact ? { ...node.impact, changedFiles: uniqueStrings(node.impact.changedFiles) } : undefined,
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
function normalizeEdge(edge) {
|
|
382
|
+
return { ...edge, evidence: uniqueEvidence(edge.evidence) };
|
|
383
|
+
}
|
|
384
|
+
function mergeImpact(left, right) {
|
|
385
|
+
if (!left) {
|
|
386
|
+
return right ? { ...right, changedFiles: uniqueStrings(right.changedFiles) } : undefined;
|
|
387
|
+
}
|
|
388
|
+
if (!right) {
|
|
389
|
+
return { ...left, changedFiles: uniqueStrings(left.changedFiles) };
|
|
390
|
+
}
|
|
391
|
+
return {
|
|
392
|
+
kind: left.kind === "direct" || right.kind === "direct" ? "direct" : "propagated",
|
|
393
|
+
changedFiles: uniqueStrings([...left.changedFiles, ...right.changedFiles]),
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
function summarizeBehaviorGraph(nodes, edges) {
|
|
397
|
+
const byKind = emptyNodeCounts();
|
|
398
|
+
for (const node of nodes) {
|
|
399
|
+
byKind[node.kind] += 1;
|
|
400
|
+
}
|
|
401
|
+
return {
|
|
402
|
+
nodes: nodes.length,
|
|
403
|
+
edges: edges.length,
|
|
404
|
+
impactedNodes: nodes.filter((node) => node.impact && node.impact.changedFiles.length > 0).length,
|
|
405
|
+
byKind,
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
function emptyNodeCounts() {
|
|
409
|
+
return {
|
|
410
|
+
domain: 0,
|
|
411
|
+
flow: 0,
|
|
412
|
+
surface: 0,
|
|
413
|
+
action: 0,
|
|
414
|
+
state: 0,
|
|
415
|
+
effect: 0,
|
|
416
|
+
contract: 0,
|
|
417
|
+
assertion: 0,
|
|
418
|
+
fixture: 0,
|
|
419
|
+
locator: 0,
|
|
420
|
+
source: 0,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function strongerConfidence(left, right) {
|
|
424
|
+
return confidenceWeight[left] >= confidenceWeight[right] ? left : right;
|
|
425
|
+
}
|
|
426
|
+
function uniqueEvidence(items) {
|
|
427
|
+
const seen = new Set();
|
|
428
|
+
return items.filter((item) => {
|
|
429
|
+
const key = `${item.kind}\u0000${item.value}\u0000${item.file ?? ""}`;
|
|
430
|
+
if (seen.has(key)) {
|
|
431
|
+
return false;
|
|
432
|
+
}
|
|
433
|
+
seen.add(key);
|
|
434
|
+
return true;
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
function uniqueStrings(items) {
|
|
438
|
+
return [...new Set(items.map((item) => item.trim()).filter(Boolean))];
|
|
439
|
+
}
|
|
440
|
+
function compareById(left, right) {
|
|
441
|
+
return left.id.localeCompare(right.id);
|
|
442
|
+
}
|
|
443
|
+
function shortHash(value) {
|
|
444
|
+
return createHash("sha256").update(value).digest("hex").slice(0, 12);
|
|
445
|
+
}
|
|
446
|
+
function slugify(value) {
|
|
447
|
+
return value
|
|
448
|
+
.normalize("NFKD")
|
|
449
|
+
.replace(/[\u0300-\u036f]/g, "")
|
|
450
|
+
.replace(/([a-z0-9])([A-Z])/g, "$1-$2")
|
|
451
|
+
.toLowerCase()
|
|
452
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
453
|
+
.replace(/^-+|-+$/g, "");
|
|
454
|
+
}
|
|
455
|
+
function errorMessage(error) {
|
|
456
|
+
return error instanceof Error ? error.message : String(error);
|
|
457
|
+
}
|
|
458
|
+
//# sourceMappingURL=behavior.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"behavior.js","sourceRoot":"","sources":["../src/behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aA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