artifact-graph 0.3.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 +32 -0
- package/INSTALL.md +81 -0
- package/LICENSE +186 -0
- package/NOTICE +4 -0
- package/README.md +50 -0
- package/README.zh-CN.md +48 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +7051 -0
- package/dist/index.cjs +6126 -0
- package/dist/index.d.cts +832 -0
- package/dist/index.d.ts +832 -0
- package/dist/index.js +6029 -0
- package/package.json +85 -0
- package/scripts/run-packet-audit.mjs +367 -0
- package/scripts/run-packet-prompt-audit.mjs +329 -0
- package/templates/git-hooks/pre-commit.sh +26 -0
- package/templates/git-hooks/pre-push.sh +22 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
export { dirname, extname } from 'node:path';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* packet-constants.ts
|
|
5
|
+
*
|
|
6
|
+
* Shared constants for packet assembly, validation, and auditing.
|
|
7
|
+
* Extracted here to avoid circular imports between index.ts and packet-validator.ts.
|
|
8
|
+
*/
|
|
9
|
+
/** Always-present baseline items included in every implementation packet */
|
|
10
|
+
declare const ALWAYS_PRESENT_ITEMS: {
|
|
11
|
+
path: string;
|
|
12
|
+
reason: string;
|
|
13
|
+
}[];
|
|
14
|
+
/** Baseline items count derived from ALWAYS_PRESENT_ITEMS */
|
|
15
|
+
declare const BASELINE_ITEMS_COUNT: number;
|
|
16
|
+
/** Baseline constraints — well-known constraints derived from baseline artifacts */
|
|
17
|
+
declare const BASELINE_CONSTRAINTS: {
|
|
18
|
+
id: string;
|
|
19
|
+
description: string;
|
|
20
|
+
source: string;
|
|
21
|
+
}[];
|
|
22
|
+
/** Baseline constraints count derived from BASELINE_CONSTRAINTS */
|
|
23
|
+
declare const BASELINE_CONSTRAINTS_COUNT: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* target-selector.ts
|
|
27
|
+
*
|
|
28
|
+
* Unified target selector for the artifact-graph CLI.
|
|
29
|
+
* Parses `--target <type>:<id>` and resolves from legacy flags,
|
|
30
|
+
* enforcing mutual exclusivity between the two forms.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Parse a `<type>:<id>` selector string, splitting only on the first colon.
|
|
35
|
+
* Colons within the ID portion are preserved (e.g. `e2e_test:batch:TC-001` → `{ type: 'e2e_test', id: 'batch:TC-001' }`).
|
|
36
|
+
*/
|
|
37
|
+
declare function parseTargetSelector(value: string): ArtifactTarget;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve the effective target from CLI flags.
|
|
40
|
+
*
|
|
41
|
+
* Accepts either `--target <type>:<id>` OR one of the legacy flags (`--feature`, `--scenario`, etc.).
|
|
42
|
+
* Mixing both forms is a hard error.
|
|
43
|
+
*
|
|
44
|
+
* @param flags Parsed CLI flags (Record<string, string | boolean>)
|
|
45
|
+
* @param schema Loaded artifact schema — used to verify target capability
|
|
46
|
+
* @returns Resolved ArtifactTarget
|
|
47
|
+
* @throws Error on invalid/mutually-exclusive/unsupported flags
|
|
48
|
+
*/
|
|
49
|
+
declare function resolveCliTarget(flags: Record<string, string | boolean>, schema: ArtifactSchema): ArtifactTarget;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* packet-assembler.ts
|
|
53
|
+
*
|
|
54
|
+
* Deterministic implementation packet assembly from context manifest.
|
|
55
|
+
* No LLM involvement — pure data transformation.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/** Target information for the packet */
|
|
59
|
+
interface PacketTarget {
|
|
60
|
+
type: string;
|
|
61
|
+
id: string;
|
|
62
|
+
uid: string;
|
|
63
|
+
title?: string;
|
|
64
|
+
sourcePath?: string;
|
|
65
|
+
status?: string;
|
|
66
|
+
}
|
|
67
|
+
/** Single item in a packet category */
|
|
68
|
+
interface PacketItem {
|
|
69
|
+
path: string;
|
|
70
|
+
reason: string;
|
|
71
|
+
required: boolean;
|
|
72
|
+
tier?: string;
|
|
73
|
+
reasons?: string[];
|
|
74
|
+
}
|
|
75
|
+
/** Category section in the packet */
|
|
76
|
+
interface PacketCategory {
|
|
77
|
+
category: string;
|
|
78
|
+
total: number;
|
|
79
|
+
items: PacketItem[];
|
|
80
|
+
}
|
|
81
|
+
/** Omitted item in the packet */
|
|
82
|
+
interface PacketOmittedItem {
|
|
83
|
+
path: string;
|
|
84
|
+
reason: string;
|
|
85
|
+
tier?: string;
|
|
86
|
+
}
|
|
87
|
+
/** Single step in recommended review order */
|
|
88
|
+
interface ReviewOrderStep {
|
|
89
|
+
step: number;
|
|
90
|
+
category: string;
|
|
91
|
+
reason: string;
|
|
92
|
+
}
|
|
93
|
+
/** Single item in risk checklist */
|
|
94
|
+
interface RiskChecklistItem {
|
|
95
|
+
id: string;
|
|
96
|
+
description: string;
|
|
97
|
+
checked: boolean;
|
|
98
|
+
}
|
|
99
|
+
/** Blueprint draft: manifest-derived skeleton for implementation */
|
|
100
|
+
interface ImplementationBlueprintDraft {
|
|
101
|
+
objective: {
|
|
102
|
+
featureId: string | null;
|
|
103
|
+
scenarioId: string | null;
|
|
104
|
+
decisionId: string | null;
|
|
105
|
+
designId: string | null;
|
|
106
|
+
e2eTestId: string | null;
|
|
107
|
+
description: string;
|
|
108
|
+
scope: string;
|
|
109
|
+
nonGoals: string[];
|
|
110
|
+
};
|
|
111
|
+
contextChecklist: {
|
|
112
|
+
categories: {
|
|
113
|
+
name: string;
|
|
114
|
+
count: number;
|
|
115
|
+
paths: string[];
|
|
116
|
+
}[];
|
|
117
|
+
};
|
|
118
|
+
fileChanges: {
|
|
119
|
+
path: string;
|
|
120
|
+
action: string;
|
|
121
|
+
description: string;
|
|
122
|
+
source: string;
|
|
123
|
+
}[];
|
|
124
|
+
constraints: {
|
|
125
|
+
id: string;
|
|
126
|
+
description: string;
|
|
127
|
+
source: string;
|
|
128
|
+
}[];
|
|
129
|
+
validationCommands: string[];
|
|
130
|
+
recommendedReviewOrder: ReviewOrderStep[];
|
|
131
|
+
riskChecklist: RiskChecklistItem[];
|
|
132
|
+
}
|
|
133
|
+
/** AssemblePacket options */
|
|
134
|
+
interface PacketOptions {
|
|
135
|
+
/** Override default validation commands */
|
|
136
|
+
validationCommands?: string[];
|
|
137
|
+
/** Context mode used during resolution */
|
|
138
|
+
mode?: ContextMode;
|
|
139
|
+
/** Max per category used during resolution */
|
|
140
|
+
maxPerCategory?: number;
|
|
141
|
+
/** Fixed ISO 8601 timestamp for reproducible output. If omitted, uses current time. */
|
|
142
|
+
generatedAt?: string;
|
|
143
|
+
}
|
|
144
|
+
/** Top-level implementation packet */
|
|
145
|
+
interface ImplementationPacket {
|
|
146
|
+
schemaVersion: '1.0';
|
|
147
|
+
generatedAt: string;
|
|
148
|
+
target: PacketTarget;
|
|
149
|
+
contextManifestSummary: {
|
|
150
|
+
totalCategories: number;
|
|
151
|
+
totalItems: number;
|
|
152
|
+
totalOmitted: number;
|
|
153
|
+
totalMissing: number;
|
|
154
|
+
mode: string;
|
|
155
|
+
maxPerCategory: number;
|
|
156
|
+
};
|
|
157
|
+
requiredBaseline: PacketCategory;
|
|
158
|
+
contextByTier: {
|
|
159
|
+
direct: PacketCategory[];
|
|
160
|
+
matrix: PacketCategory[];
|
|
161
|
+
transitive: PacketCategory[];
|
|
162
|
+
};
|
|
163
|
+
omittedItems: PacketOmittedItem[];
|
|
164
|
+
missing: string[];
|
|
165
|
+
missingDetails?: MissingDetail[];
|
|
166
|
+
implementationBlueprintDraft: ImplementationBlueprintDraft;
|
|
167
|
+
validationCommands: string[];
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Assemble an implementation packet from a context manifest.
|
|
171
|
+
*
|
|
172
|
+
* This is a pure data transformation. Packet content is derived from the
|
|
173
|
+
* manifest; generatedAt is variable unless a fixed value is supplied.
|
|
174
|
+
* No LLM is involved.
|
|
175
|
+
*/
|
|
176
|
+
declare function assemblePacket(manifest: ContextManifest, options?: PacketOptions): ImplementationPacket;
|
|
177
|
+
/**
|
|
178
|
+
* Render an implementation packet as Markdown.
|
|
179
|
+
*
|
|
180
|
+
* Output is designed to be directly usable as a pre-implementation brief
|
|
181
|
+
* for Claude Code or other AI coding agents.
|
|
182
|
+
*/
|
|
183
|
+
declare function renderPacketMarkdown(packet: ImplementationPacket): string;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* packet-validator.ts
|
|
187
|
+
*
|
|
188
|
+
* Schema validation for implementation packets.
|
|
189
|
+
* Validates both structured JSON packets and rendered Markdown packets.
|
|
190
|
+
*
|
|
191
|
+
* v1.12: accepts optional schema to derive valid target types dynamically.
|
|
192
|
+
* Without schema, falls back to the static VALID_PACKET_TARGET_TYPES list.
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
/** Valid target types for packets (legacy static fallback) */
|
|
196
|
+
declare const VALID_PACKET_TARGET_TYPES: readonly ["feature", "scenario", "decision", "design", "e2e_test"];
|
|
197
|
+
type PacketTargetType = typeof VALID_PACKET_TARGET_TYPES[number];
|
|
198
|
+
declare function isPacketTargetType(type: string): type is PacketTargetType;
|
|
199
|
+
/**
|
|
200
|
+
* Check whether a type is a valid packet target, optionally using a loaded schema.
|
|
201
|
+
* When a schema is provided, uses dynamic target-capable types.
|
|
202
|
+
* Without schema, uses the static VALID_PACKET_TARGET_TYPES.
|
|
203
|
+
*/
|
|
204
|
+
type PacketTargetSchema = {
|
|
205
|
+
types: Record<string, {
|
|
206
|
+
target?: boolean;
|
|
207
|
+
role?: string;
|
|
208
|
+
}>;
|
|
209
|
+
idPatterns?: Record<string, string>;
|
|
210
|
+
};
|
|
211
|
+
declare function isPacketTargetTypeDynamic(type: string, schema?: PacketTargetSchema): boolean;
|
|
212
|
+
interface PacketValidationIssue {
|
|
213
|
+
severity: 'error' | 'warning';
|
|
214
|
+
code: string;
|
|
215
|
+
message: string;
|
|
216
|
+
path?: string;
|
|
217
|
+
}
|
|
218
|
+
interface PacketValidationResult {
|
|
219
|
+
ok: boolean;
|
|
220
|
+
issues: PacketValidationIssue[];
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Validate a structured ImplementationPacket against schema rules.
|
|
224
|
+
*
|
|
225
|
+
* Rules:
|
|
226
|
+
* - PKT-001: schemaVersion must be '1.0'
|
|
227
|
+
* - PKT-002: target.type must be a valid packet target type
|
|
228
|
+
* - PKT-003: target.id must be non-empty
|
|
229
|
+
* - PKT-004: requiredBaseline.total must equal baseline items count
|
|
230
|
+
* - PKT-005: constraints must have exactly baseline count and include C-RULE-01
|
|
231
|
+
* - PKT-006: validationCommands must have at least 4 entries
|
|
232
|
+
* - PKT-007: missing.length > 0 is a warning
|
|
233
|
+
*/
|
|
234
|
+
declare function validatePacket(packet: ImplementationPacket, schema?: PacketTargetSchema): PacketValidationResult;
|
|
235
|
+
/**
|
|
236
|
+
* Validate a rendered Markdown packet for required section structure.
|
|
237
|
+
*
|
|
238
|
+
* Checks that all required section headings are present.
|
|
239
|
+
*/
|
|
240
|
+
declare function validatePacketMarkdown(markdown: string): PacketValidationResult;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* packet-audit.ts
|
|
244
|
+
*
|
|
245
|
+
* Batch audit of implementation packets from a targets file.
|
|
246
|
+
* Each target is processed independently — a single failure does not abort the batch.
|
|
247
|
+
*/
|
|
248
|
+
|
|
249
|
+
interface PacketAuditEntry {
|
|
250
|
+
type: string;
|
|
251
|
+
id: string;
|
|
252
|
+
status: 'passed' | 'failed' | 'missing';
|
|
253
|
+
outputPath?: string;
|
|
254
|
+
missingCount: number;
|
|
255
|
+
omittedCount: number;
|
|
256
|
+
itemsCount: number;
|
|
257
|
+
baselineCount: number;
|
|
258
|
+
constraintsCount: number;
|
|
259
|
+
errors: string[];
|
|
260
|
+
validationIssues?: PacketValidationIssue[];
|
|
261
|
+
missingDetailsSummary?: {
|
|
262
|
+
ref: string;
|
|
263
|
+
kind: string;
|
|
264
|
+
suggestedAction: string;
|
|
265
|
+
}[];
|
|
266
|
+
}
|
|
267
|
+
interface PacketAuditSummary {
|
|
268
|
+
schemaVersion: '1.3';
|
|
269
|
+
total: number;
|
|
270
|
+
passed: number;
|
|
271
|
+
failed: number;
|
|
272
|
+
missing: number;
|
|
273
|
+
totalOmitted: number;
|
|
274
|
+
targets: PacketAuditEntry[];
|
|
275
|
+
generatedAt: string;
|
|
276
|
+
/** Absolute path to the targets file (--targets-file mode only) */
|
|
277
|
+
sourceTargetsPath?: string;
|
|
278
|
+
/** Context mode used for this audit run */
|
|
279
|
+
mode?: ContextMode;
|
|
280
|
+
/** Output format used for this audit run */
|
|
281
|
+
format?: 'json' | 'markdown';
|
|
282
|
+
/** maxPerCategory value used (undefined = default) */
|
|
283
|
+
maxPerCategory?: number;
|
|
284
|
+
/** How packet files were written: 'full' (all), 'summary-only' (none), 'sample' (selected) */
|
|
285
|
+
packetOutputMode?: 'full' | 'summary-only' | 'sample';
|
|
286
|
+
/** Targets for which packet files were written (--sample-targets mode) */
|
|
287
|
+
sampleTargets?: string[];
|
|
288
|
+
/** Paths to sample packet files written */
|
|
289
|
+
sampleOutputPaths?: string[];
|
|
290
|
+
/** Detail level: 'full' includes all targets, 'compact' omits passed targets */
|
|
291
|
+
summaryDetail?: 'full' | 'compact';
|
|
292
|
+
/** Per-type counts (compact mode) */
|
|
293
|
+
countsByType?: Record<string, number>;
|
|
294
|
+
}
|
|
295
|
+
interface TargetRef {
|
|
296
|
+
type: string;
|
|
297
|
+
id: string;
|
|
298
|
+
}
|
|
299
|
+
interface AuditOptions {
|
|
300
|
+
root: string;
|
|
301
|
+
outDir?: string;
|
|
302
|
+
format?: 'json' | 'markdown';
|
|
303
|
+
mode?: ContextMode;
|
|
304
|
+
maxPerCategory?: number;
|
|
305
|
+
/** Absolute path to the targets file (--targets-file mode only) */
|
|
306
|
+
sourceTargetsPath?: string;
|
|
307
|
+
/** If true, do not write individual packet files — only summary */
|
|
308
|
+
summaryOnly?: boolean;
|
|
309
|
+
/** List of target keys (type:id) for which to write packet files */
|
|
310
|
+
sampleTargets?: string[];
|
|
311
|
+
/** Detail level: 'full' includes all targets, 'compact' omits passed targets */
|
|
312
|
+
summaryDetail?: 'full' | 'compact';
|
|
313
|
+
/** Artifact schema for dynamic target type validation in validatePacket */
|
|
314
|
+
schema?: ArtifactSchema;
|
|
315
|
+
}
|
|
316
|
+
interface ParseError {
|
|
317
|
+
line: number;
|
|
318
|
+
raw: string;
|
|
319
|
+
message: string;
|
|
320
|
+
}
|
|
321
|
+
interface ParseResult {
|
|
322
|
+
targets: TargetRef[];
|
|
323
|
+
errors: ParseError[];
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Parse a targets file where each line is `type:id`.
|
|
327
|
+
* Blank lines and lines starting with `#` are skipped.
|
|
328
|
+
* Returns structured result with valid targets and parse errors.
|
|
329
|
+
*
|
|
330
|
+
* When a schema is provided, target types are validated against the schema's
|
|
331
|
+
* target-capable types (dynamic). Without a schema, falls back to the static
|
|
332
|
+
* VALID_PACKET_TARGET_TYPES list for backward compatibility.
|
|
333
|
+
*/
|
|
334
|
+
declare function parseTargetsFile(content: string, schema?: ArtifactSchema): ParseResult;
|
|
335
|
+
/**
|
|
336
|
+
* Audit a list of targets by generating packets for each.
|
|
337
|
+
* Each target is processed independently — a single failure does not abort the batch.
|
|
338
|
+
*/
|
|
339
|
+
declare function auditPackets(root: string, targets: TargetRef[], options: AuditOptions, graph?: ArtifactGraph): Promise<PacketAuditSummary>;
|
|
340
|
+
interface DiscoverAuditOptions {
|
|
341
|
+
root: string;
|
|
342
|
+
outDir?: string;
|
|
343
|
+
format?: 'json' | 'markdown';
|
|
344
|
+
mode?: ContextMode;
|
|
345
|
+
maxPerCategory?: number;
|
|
346
|
+
limit?: number;
|
|
347
|
+
summaryOnly?: boolean;
|
|
348
|
+
sampleTargets?: string[];
|
|
349
|
+
summaryDetail?: 'full' | 'compact';
|
|
350
|
+
/** Artifact schema for dynamic target type validation */
|
|
351
|
+
schema?: ArtifactSchema;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Scan artifacts, discover targets, then audit packets for each.
|
|
355
|
+
* Single scan is reused for both discovery and audit.
|
|
356
|
+
*/
|
|
357
|
+
declare function discoverAndAuditPackets(root: string, options: DiscoverAuditOptions): Promise<PacketAuditSummary>;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* packet-prompt.ts
|
|
361
|
+
*
|
|
362
|
+
* Generate a compressed Claude Code task prompt from an implementation packet.
|
|
363
|
+
* Output is designed to be directly pasted into Claude Code as a task instruction.
|
|
364
|
+
* Default max 4000 characters; references packet/evidence paths when content exceeds limit.
|
|
365
|
+
* No LLM involvement — pure template rendering.
|
|
366
|
+
*/
|
|
367
|
+
|
|
368
|
+
/** Options for packet-prompt generation */
|
|
369
|
+
interface PacketPromptOptions {
|
|
370
|
+
/** Max character count for the output prompt. Default: 4000 */
|
|
371
|
+
maxChars?: number;
|
|
372
|
+
/** Fixed ISO 8601 timestamp for reproducible output */
|
|
373
|
+
generatedAt?: string;
|
|
374
|
+
/** Root path for resolving file references */
|
|
375
|
+
root?: string;
|
|
376
|
+
}
|
|
377
|
+
/** Default max character count */
|
|
378
|
+
declare const DEFAULT_MAX_CHARS = 4000;
|
|
379
|
+
/** Minimum prompt size that can still satisfy validatePacketPrompt() for supported target IDs. */
|
|
380
|
+
declare const MIN_PROMPT_CHARS = 320;
|
|
381
|
+
/** Structured error returned when prompt cannot be compressed to the requested maxChars */
|
|
382
|
+
interface PacketPromptError {
|
|
383
|
+
ok: false;
|
|
384
|
+
reason: string;
|
|
385
|
+
actualLength: number;
|
|
386
|
+
minRequired: number;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Generate a compressed Claude Code task prompt from a packet.
|
|
390
|
+
*
|
|
391
|
+
* Output is ≤ maxChars characters by default.
|
|
392
|
+
* When content would exceed the limit, context details are replaced with
|
|
393
|
+
* references to the packet command.
|
|
394
|
+
* Returns a PacketPromptError object when the prompt cannot be compressed to maxChars.
|
|
395
|
+
*/
|
|
396
|
+
declare function renderPacketPrompt(packet: ImplementationPacket, options?: PacketPromptOptions): string | PacketPromptError;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* packet-prompt-validator.ts
|
|
400
|
+
*
|
|
401
|
+
* Lightweight validator for packet-prompt output.
|
|
402
|
+
* Validates that a generated handoff prompt contains all required sections.
|
|
403
|
+
* Used by both CLI validation and evidence generation.
|
|
404
|
+
*/
|
|
405
|
+
interface PromptValidationIssue {
|
|
406
|
+
code: string;
|
|
407
|
+
message: string;
|
|
408
|
+
severity: 'error' | 'warning';
|
|
409
|
+
}
|
|
410
|
+
interface PromptValidationResult {
|
|
411
|
+
ok: boolean;
|
|
412
|
+
issues: PromptValidationIssue[];
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Validate a packet-prompt output string.
|
|
416
|
+
*
|
|
417
|
+
* Checks that the prompt contains all required sections:
|
|
418
|
+
* - 目标信息
|
|
419
|
+
* - packet 命令或来源
|
|
420
|
+
* - 验证命令
|
|
421
|
+
* - 提交要求
|
|
422
|
+
* - 禁止事项
|
|
423
|
+
* - 不得回退规则
|
|
424
|
+
* - SEC severity 规则
|
|
425
|
+
* - 中文主导(warning)
|
|
426
|
+
*/
|
|
427
|
+
declare function validatePacketPrompt(prompt: string): PromptValidationResult;
|
|
428
|
+
|
|
429
|
+
declare const VERSION_LOCK_PATH = "artifacts/traceability-version-lock.json";
|
|
430
|
+
declare const VERSION_INDEX_SCHEMA_VERSION = "1.0";
|
|
431
|
+
declare const VERSION_LOCK_SCHEMA_VERSION = "1.0";
|
|
432
|
+
type VersionSourceKind = 'artifact' | 'code' | 'test';
|
|
433
|
+
type VersionEdgeKind = 'references' | 'covers' | 'depends_on' | 'implements' | 'verifies';
|
|
434
|
+
type VersionLockStatus = 'fresh' | 'target_not_found' | 'artifact_changed' | 'source_changed' | 'verified_by_changed' | 'missing_lock' | 'orphan_lock';
|
|
435
|
+
interface VersionedNode {
|
|
436
|
+
uid: string;
|
|
437
|
+
type: string;
|
|
438
|
+
id: string;
|
|
439
|
+
path: string;
|
|
440
|
+
title: string;
|
|
441
|
+
line: number;
|
|
442
|
+
sourceKind: VersionSourceKind;
|
|
443
|
+
contentHash: string;
|
|
444
|
+
}
|
|
445
|
+
interface VersionedEdge {
|
|
446
|
+
from: string;
|
|
447
|
+
to: string;
|
|
448
|
+
kind: VersionEdgeKind | string;
|
|
449
|
+
source: string;
|
|
450
|
+
sourcePath: string;
|
|
451
|
+
sourceLine: number;
|
|
452
|
+
fromHash?: string;
|
|
453
|
+
toHash?: string;
|
|
454
|
+
}
|
|
455
|
+
interface VersionIndex {
|
|
456
|
+
schemaVersion: typeof VERSION_INDEX_SCHEMA_VERSION;
|
|
457
|
+
root: string;
|
|
458
|
+
graph: {
|
|
459
|
+
nodes: number;
|
|
460
|
+
edges: number;
|
|
461
|
+
};
|
|
462
|
+
nodes: VersionedNode[];
|
|
463
|
+
edges: VersionedEdge[];
|
|
464
|
+
}
|
|
465
|
+
interface VersionLockRef {
|
|
466
|
+
type: string;
|
|
467
|
+
id: string;
|
|
468
|
+
path: string;
|
|
469
|
+
contentHash: string;
|
|
470
|
+
}
|
|
471
|
+
interface VersionLockSourceRef {
|
|
472
|
+
type: 'code' | 'test';
|
|
473
|
+
path: string;
|
|
474
|
+
contentHash: string;
|
|
475
|
+
}
|
|
476
|
+
interface VersionLockEntry {
|
|
477
|
+
edgeId: string;
|
|
478
|
+
kind: 'implements' | 'verifies';
|
|
479
|
+
artifact: VersionLockRef;
|
|
480
|
+
source: VersionLockSourceRef;
|
|
481
|
+
verifiedBy?: VersionLockSourceRef[];
|
|
482
|
+
}
|
|
483
|
+
interface VersionLockFile {
|
|
484
|
+
schemaVersion: typeof VERSION_LOCK_SCHEMA_VERSION;
|
|
485
|
+
locks: VersionLockEntry[];
|
|
486
|
+
}
|
|
487
|
+
interface VersionLockIssue {
|
|
488
|
+
status: VersionLockStatus;
|
|
489
|
+
edgeId: string;
|
|
490
|
+
message: string;
|
|
491
|
+
artifact?: VersionLockRef;
|
|
492
|
+
source?: VersionLockSourceRef;
|
|
493
|
+
currentArtifactHash?: string;
|
|
494
|
+
currentSourceHash?: string;
|
|
495
|
+
currentVerifiedByHash?: string;
|
|
496
|
+
verifiedByPath?: string;
|
|
497
|
+
}
|
|
498
|
+
interface VersionLockAuditResult {
|
|
499
|
+
schemaVersion: '1.0';
|
|
500
|
+
root: string;
|
|
501
|
+
lockPath: string;
|
|
502
|
+
totalLocks: number;
|
|
503
|
+
fresh: number;
|
|
504
|
+
issues: VersionLockIssue[];
|
|
505
|
+
}
|
|
506
|
+
interface TraceVersionResult {
|
|
507
|
+
schemaVersion: '1.0';
|
|
508
|
+
root: string;
|
|
509
|
+
lockPath: string;
|
|
510
|
+
target: {
|
|
511
|
+
uid: string;
|
|
512
|
+
node?: VersionedNode;
|
|
513
|
+
};
|
|
514
|
+
currentEdges: VersionedEdge[];
|
|
515
|
+
locks: VersionLockEntry[];
|
|
516
|
+
issues: VersionLockIssue[];
|
|
517
|
+
}
|
|
518
|
+
interface VersionLockUpdateOptions {
|
|
519
|
+
target: string;
|
|
520
|
+
source: string;
|
|
521
|
+
verifiedBy?: string[];
|
|
522
|
+
lockPath?: string;
|
|
523
|
+
}
|
|
524
|
+
interface VersionLockBootstrapOptions {
|
|
525
|
+
lockPath?: string;
|
|
526
|
+
force?: boolean;
|
|
527
|
+
}
|
|
528
|
+
interface VersionLockRefreshOptions {
|
|
529
|
+
lockPath?: string;
|
|
530
|
+
changedOnly?: boolean;
|
|
531
|
+
changedPaths?: string[];
|
|
532
|
+
all?: boolean;
|
|
533
|
+
removeOrphans?: boolean;
|
|
534
|
+
}
|
|
535
|
+
interface VersionLockRefreshResult {
|
|
536
|
+
schemaVersion: '1.0';
|
|
537
|
+
root: string;
|
|
538
|
+
lockPath: string;
|
|
539
|
+
mode: 'all' | 'changed-only';
|
|
540
|
+
changedPaths: string[];
|
|
541
|
+
affectedEdges: string[];
|
|
542
|
+
addedLocks: string[];
|
|
543
|
+
updatedLocks: string[];
|
|
544
|
+
retainedOrphans: string[];
|
|
545
|
+
removedOrphans: string[];
|
|
546
|
+
postAudit: VersionLockAuditResult;
|
|
547
|
+
warnings: string[];
|
|
548
|
+
}
|
|
549
|
+
declare function buildVersionIndex(root: string, graph?: ArtifactGraph): Promise<VersionIndex>;
|
|
550
|
+
declare function auditVersionLock(root: string, lockPath?: string, graph?: ArtifactGraph): Promise<VersionLockAuditResult>;
|
|
551
|
+
declare function updateVersionLock(root: string, options: VersionLockUpdateOptions): Promise<VersionLockFile>;
|
|
552
|
+
declare function bootstrapVersionLock(root: string, options?: VersionLockBootstrapOptions): Promise<VersionLockFile>;
|
|
553
|
+
declare function refreshVersionLock(root: string, options?: VersionLockRefreshOptions): Promise<VersionLockRefreshResult>;
|
|
554
|
+
declare function traceVersion(root: string, target: string, lockPath?: string): Promise<TraceVersionResult>;
|
|
555
|
+
declare function renderVersionLockAuditMarkdown(result: VersionLockAuditResult): string;
|
|
556
|
+
declare function renderVersionLockRefreshMarkdown(result: VersionLockRefreshResult): string;
|
|
557
|
+
declare function renderTraceVersionMarkdown(result: TraceVersionResult): string;
|
|
558
|
+
|
|
559
|
+
type ArtifactGraphCliSource = 'node_modules' | 'path' | 'legacy' | 'plugin-bundled';
|
|
560
|
+
interface ArtifactGraphCliCandidate {
|
|
561
|
+
source: ArtifactGraphCliSource;
|
|
562
|
+
path: string;
|
|
563
|
+
exists: boolean;
|
|
564
|
+
}
|
|
565
|
+
interface ArtifactGraphCliResolution {
|
|
566
|
+
path?: string;
|
|
567
|
+
source?: ArtifactGraphCliSource;
|
|
568
|
+
candidates: ArtifactGraphCliCandidate[];
|
|
569
|
+
warnings: string[];
|
|
570
|
+
}
|
|
571
|
+
interface ResolveArtifactGraphCliOptions {
|
|
572
|
+
projectCliPath?: string;
|
|
573
|
+
fallbackPath?: string;
|
|
574
|
+
}
|
|
575
|
+
interface ArtifactChainDoctorReport {
|
|
576
|
+
schemaVersion: '1.0';
|
|
577
|
+
root: string;
|
|
578
|
+
cli: ArtifactGraphCliResolution;
|
|
579
|
+
node: {
|
|
580
|
+
version: string;
|
|
581
|
+
compatible: boolean;
|
|
582
|
+
required: '>=22.0.0';
|
|
583
|
+
};
|
|
584
|
+
config: {
|
|
585
|
+
path: string;
|
|
586
|
+
exists: boolean;
|
|
587
|
+
};
|
|
588
|
+
lock: {
|
|
589
|
+
path: string;
|
|
590
|
+
exists: boolean;
|
|
591
|
+
};
|
|
592
|
+
supportedCommands: string[];
|
|
593
|
+
warnings: string[];
|
|
594
|
+
}
|
|
595
|
+
declare function resolveArtifactGraphCli(root: string, options?: ResolveArtifactGraphCliOptions): Promise<ArtifactGraphCliResolution>;
|
|
596
|
+
declare function doctorArtifactChain(root: string, options?: ResolveArtifactGraphCliOptions): Promise<ArtifactChainDoctorReport>;
|
|
597
|
+
declare function renderDoctorMarkdown(report: ArtifactChainDoctorReport): string;
|
|
598
|
+
|
|
599
|
+
type GitChangeMode = 'staged' | 'worktree' | 'base';
|
|
600
|
+
interface CollectChangedPathsOptions {
|
|
601
|
+
mode: GitChangeMode;
|
|
602
|
+
base?: string;
|
|
603
|
+
}
|
|
604
|
+
interface GitChangeResult {
|
|
605
|
+
root: string;
|
|
606
|
+
mode: GitChangeMode;
|
|
607
|
+
base?: string;
|
|
608
|
+
changedPaths: string[];
|
|
609
|
+
unstagedPaths: string[];
|
|
610
|
+
stagedUnstagedConflictPaths: string[];
|
|
611
|
+
}
|
|
612
|
+
declare function collectChangedPaths(root: string, options: CollectChangedPathsOptions): Promise<GitChangeResult>;
|
|
613
|
+
|
|
614
|
+
type GitHookName = 'pre-commit' | 'pre-push';
|
|
615
|
+
declare function resolveGitHookPath(root: string, hookName: GitHookName): Promise<string>;
|
|
616
|
+
|
|
617
|
+
interface ManagedHookBlockOptions {
|
|
618
|
+
hookPath: string;
|
|
619
|
+
block: string;
|
|
620
|
+
markerId?: string;
|
|
621
|
+
uninstall?: boolean;
|
|
622
|
+
}
|
|
623
|
+
interface HookInstallResult {
|
|
624
|
+
hookPath: string;
|
|
625
|
+
action: 'installed' | 'replaced' | 'uninstalled' | 'unchanged';
|
|
626
|
+
markerId: string;
|
|
627
|
+
}
|
|
628
|
+
type HookEntryKind = 'missing' | 'file' | 'symlink' | 'other';
|
|
629
|
+
interface HookSnapshot {
|
|
630
|
+
kind: HookEntryKind;
|
|
631
|
+
bytes: Buffer;
|
|
632
|
+
dev?: bigint;
|
|
633
|
+
ino?: bigint;
|
|
634
|
+
size?: bigint;
|
|
635
|
+
mtimeNs?: bigint;
|
|
636
|
+
mode?: bigint;
|
|
637
|
+
linkTarget?: string;
|
|
638
|
+
}
|
|
639
|
+
interface DesiredHookState {
|
|
640
|
+
exists: boolean;
|
|
641
|
+
bytes: Buffer;
|
|
642
|
+
mode?: number;
|
|
643
|
+
}
|
|
644
|
+
interface PreparedManagedHookBlock {
|
|
645
|
+
readonly hookPath: string;
|
|
646
|
+
readonly result: HookInstallResult;
|
|
647
|
+
readonly snapshot: HookSnapshot;
|
|
648
|
+
readonly desired: DesiredHookState;
|
|
649
|
+
readonly writeRequired: boolean;
|
|
650
|
+
}
|
|
651
|
+
declare function prepareManagedHookBlock(options: ManagedHookBlockOptions): Promise<PreparedManagedHookBlock>;
|
|
652
|
+
declare function applyPreparedManagedHookBlocks(prepared: readonly PreparedManagedHookBlock[]): Promise<HookInstallResult[]>;
|
|
653
|
+
declare function installManagedHookBlock(options: ManagedHookBlockOptions): Promise<HookInstallResult>;
|
|
654
|
+
|
|
655
|
+
interface ArtifactNode {
|
|
656
|
+
uid: string;
|
|
657
|
+
type: string;
|
|
658
|
+
code: string;
|
|
659
|
+
title: string;
|
|
660
|
+
path: string;
|
|
661
|
+
line: number;
|
|
662
|
+
status?: string;
|
|
663
|
+
attrs?: Record<string, unknown>;
|
|
664
|
+
aliases?: string[];
|
|
665
|
+
}
|
|
666
|
+
interface ArtifactEdge {
|
|
667
|
+
from: string;
|
|
668
|
+
to: string;
|
|
669
|
+
kind: string;
|
|
670
|
+
source: string;
|
|
671
|
+
sourcePath: string;
|
|
672
|
+
sourceLine: number;
|
|
673
|
+
}
|
|
674
|
+
interface ValidationIssue {
|
|
675
|
+
code: string;
|
|
676
|
+
severity: 'error' | 'warning' | 'info';
|
|
677
|
+
message: string;
|
|
678
|
+
node?: string;
|
|
679
|
+
edge?: ArtifactEdge;
|
|
680
|
+
path: string;
|
|
681
|
+
line: number;
|
|
682
|
+
}
|
|
683
|
+
interface ArtifactExtraFieldSchema {
|
|
684
|
+
name: string;
|
|
685
|
+
type: 'string' | 'number' | 'boolean' | 'enum';
|
|
686
|
+
enum?: Array<string | number | boolean>;
|
|
687
|
+
}
|
|
688
|
+
interface ArtifactTypeSchema {
|
|
689
|
+
paths: string[];
|
|
690
|
+
idPattern?: string;
|
|
691
|
+
displayName?: string;
|
|
692
|
+
role?: ArtifactTypeRole;
|
|
693
|
+
layer?: string;
|
|
694
|
+
aliases?: string[];
|
|
695
|
+
target?: boolean;
|
|
696
|
+
extraFields?: ArtifactExtraFieldSchema[];
|
|
697
|
+
}
|
|
698
|
+
interface ArtifactTarget {
|
|
699
|
+
type: string;
|
|
700
|
+
id: string;
|
|
701
|
+
}
|
|
702
|
+
interface ArtifactEdgeRule {
|
|
703
|
+
from: string;
|
|
704
|
+
to: string;
|
|
705
|
+
kind: string;
|
|
706
|
+
}
|
|
707
|
+
interface ArtifactSchema {
|
|
708
|
+
types: Record<string, ArtifactTypeSchema>;
|
|
709
|
+
idPatterns: Record<string, string>;
|
|
710
|
+
relationFields: Record<string, string[]>;
|
|
711
|
+
allowedEdges: ArtifactEdgeRule[];
|
|
712
|
+
forbiddenEdges: ArtifactEdgeRule[];
|
|
713
|
+
statuses: string[];
|
|
714
|
+
idRanges: Record<string, Record<string, {
|
|
715
|
+
prefix: string;
|
|
716
|
+
start: number;
|
|
717
|
+
end: number;
|
|
718
|
+
}>>;
|
|
719
|
+
}
|
|
720
|
+
declare const TARGET_ARTIFACT_TYPES: readonly ["feature", "scenario", "decision", "design", "e2e_test"];
|
|
721
|
+
type TargetArtifactType = typeof TARGET_ARTIFACT_TYPES[number];
|
|
722
|
+
type ArtifactTypeRole = TargetArtifactType | 'context' | 'candidate' | 'not-recommended';
|
|
723
|
+
interface ArtifactTypeMetadata {
|
|
724
|
+
type: string;
|
|
725
|
+
displayName: string;
|
|
726
|
+
role: ArtifactTypeRole;
|
|
727
|
+
layer: string;
|
|
728
|
+
aliases: string[];
|
|
729
|
+
targetCapable: boolean;
|
|
730
|
+
}
|
|
731
|
+
declare function isTargetArtifactType(type: string): type is TargetArtifactType;
|
|
732
|
+
declare function getArtifactTypeMetadata(schema: ArtifactSchema, type: string): ArtifactTypeMetadata;
|
|
733
|
+
declare function getTargetArtifactTypes(schema?: ArtifactSchema): string[];
|
|
734
|
+
/**
|
|
735
|
+
* Resolve a token (which may be an exact type name or an explicit alias) to
|
|
736
|
+
* the canonical artifact type name. Returns `undefined` if no match.
|
|
737
|
+
*
|
|
738
|
+
* Strict matching only — no automatic hyphen/underscore conversion.
|
|
739
|
+
*/
|
|
740
|
+
declare function resolveArtifactTypeName(schema: ArtifactSchema, token: string): string | undefined;
|
|
741
|
+
interface ArtifactGraph {
|
|
742
|
+
nodes: ArtifactNode[];
|
|
743
|
+
edges: ArtifactEdge[];
|
|
744
|
+
generatedAt: string;
|
|
745
|
+
/** Scan-time diagnostics. Optional for backward compatibility with consumers that build graph literals without this field. */
|
|
746
|
+
diagnostics?: ValidationIssue[];
|
|
747
|
+
}
|
|
748
|
+
interface QueryOptions {
|
|
749
|
+
from?: string;
|
|
750
|
+
to?: string;
|
|
751
|
+
depth?: number;
|
|
752
|
+
}
|
|
753
|
+
type ContextTier = 'baseline' | 'target' | 'direct' | 'matrix' | 'transitive';
|
|
754
|
+
interface ContextItem {
|
|
755
|
+
path: string;
|
|
756
|
+
reason: string;
|
|
757
|
+
required?: boolean;
|
|
758
|
+
tier?: ContextTier;
|
|
759
|
+
reasons?: string[];
|
|
760
|
+
}
|
|
761
|
+
interface MissingDetail {
|
|
762
|
+
ref: string;
|
|
763
|
+
from: string;
|
|
764
|
+
kind: 'unresolved-outgoing' | 'unresolved-incoming' | 'target-not-found' | 'multiple-targets';
|
|
765
|
+
message: string;
|
|
766
|
+
suggestedAction: string;
|
|
767
|
+
}
|
|
768
|
+
interface ContextManifest {
|
|
769
|
+
schemaVersion?: string;
|
|
770
|
+
target: {
|
|
771
|
+
type: string;
|
|
772
|
+
id: string;
|
|
773
|
+
uid: string;
|
|
774
|
+
title?: string;
|
|
775
|
+
sourcePath?: string;
|
|
776
|
+
status?: string;
|
|
777
|
+
};
|
|
778
|
+
context: Record<string, ContextItem[]>;
|
|
779
|
+
missing: string[];
|
|
780
|
+
missingDetails?: MissingDetail[];
|
|
781
|
+
omitted?: ContextItem[];
|
|
782
|
+
}
|
|
783
|
+
type ContextMode = 'full' | 'implementation';
|
|
784
|
+
interface ContextOptions {
|
|
785
|
+
feature?: string;
|
|
786
|
+
scenario?: string;
|
|
787
|
+
decision?: string;
|
|
788
|
+
design?: string;
|
|
789
|
+
e2e_test?: string;
|
|
790
|
+
/** Unified target (type + id) resolved from `--target <type>:<id>`. Additive — old fields preserved. */
|
|
791
|
+
target?: ArtifactTarget;
|
|
792
|
+
mode?: ContextMode;
|
|
793
|
+
maxPerCategory?: number;
|
|
794
|
+
}
|
|
795
|
+
declare const DEFAULT_SCHEMA: ArtifactSchema;
|
|
796
|
+
declare function loadConfig(root: string): Promise<ArtifactSchema>;
|
|
797
|
+
declare function buildGraph(nodes: Omit<ArtifactNode, 'uid'>[], edges: ArtifactEdge[], diagnostics?: ValidationIssue[]): ArtifactGraph;
|
|
798
|
+
declare function scanArtifacts(root: string, schema?: ArtifactSchema): Promise<ArtifactGraph>;
|
|
799
|
+
/**
|
|
800
|
+
* Resolve traceability-matrix-v2 edges:
|
|
801
|
+
* 1. Edges pointing to matrix-row targets (traceability-matrix-v2:*) are kept as-is.
|
|
802
|
+
* 2. Unresolved refs (`resolve:BARE_ID`) are resolved to real artifact nodes when possible,
|
|
803
|
+
* otherwise left as `resolve:BARE_ID` (which becomes a DANGLING_REFERENCE in validateGraph).
|
|
804
|
+
*/
|
|
805
|
+
declare function resolveMatrixEdges(graph: ArtifactGraph): ArtifactGraph;
|
|
806
|
+
declare function validateGraph(graph: ArtifactGraph, schema?: ArtifactSchema): ValidationIssue[];
|
|
807
|
+
declare function validateScenarioPrdLinks(graph: ArtifactGraph, schema?: ArtifactSchema): ValidationIssue[];
|
|
808
|
+
declare function validateScenarioPrdLinkIndex(root: string, graph: ArtifactGraph): Promise<ValidationIssue[]>;
|
|
809
|
+
declare function queryGraph(graph: ArtifactGraph, options: QueryOptions): ArtifactGraph;
|
|
810
|
+
declare function renderMermaid(graph: ArtifactGraph): string;
|
|
811
|
+
declare function nextId(graph: ArtifactGraph, schema: ArtifactSchema, type: string, rangeName: string): string;
|
|
812
|
+
declare function writeGraphCache(root: string, graph: ArtifactGraph): Promise<void>;
|
|
813
|
+
declare function validateExecutableTraceability(root: string): Promise<ValidationIssue[]>;
|
|
814
|
+
interface DiscoverOptions {
|
|
815
|
+
limit?: number;
|
|
816
|
+
schema?: ArtifactSchema;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Discover audit targets from an artifact graph.
|
|
820
|
+
* Collects configured target-capable artifact nodes, sorted by id within each type.
|
|
821
|
+
* When the total exceeds `limit`, uses round-robin across configured target types
|
|
822
|
+
* to keep the sample balanced.
|
|
823
|
+
*/
|
|
824
|
+
declare function discoverTargets(graph: ArtifactGraph, options?: DiscoverOptions): Array<{
|
|
825
|
+
type: string;
|
|
826
|
+
id: string;
|
|
827
|
+
}>;
|
|
828
|
+
|
|
829
|
+
declare function resolveArtifactContext(graph: ArtifactGraph, opts: ContextOptions): ContextManifest;
|
|
830
|
+
declare function formatContextMarkdown(manifest: ContextManifest): string;
|
|
831
|
+
|
|
832
|
+
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 CollectChangedPathsOptions, type ContextItem, type ContextManifest, type ContextMode, type ContextOptions, type ContextTier, DEFAULT_MAX_CHARS, DEFAULT_SCHEMA, type DiscoverOptions, 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 PromptValidationIssue, type PromptValidationResult, type QueryOptions, type ResolveArtifactGraphCliOptions, type ReviewOrderStep, 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 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, validateScenarioPrdLinkIndex, validateScenarioPrdLinks, writeGraphCache };
|