qfai 1.9.2 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -6
- package/assets/init/.qfai/assistant/README.md +27 -0
- package/assets/init/.qfai/assistant/agents/acceptance-test-engineer.md +1 -0
- package/assets/init/.qfai/assistant/agents/backend-engineer.md +1 -0
- package/assets/init/.qfai/assistant/agents/completion-reviewer.md +29 -2
- package/assets/init/.qfai/assistant/agents/delivery-planner.md +17 -0
- package/assets/init/.qfai/assistant/agents/frontend-engineer.md +1 -0
- package/assets/init/.qfai/assistant/agents/implementation-reviewer.md +17 -0
- package/assets/init/.qfai/assistant/agents/orchestrator.md +2 -2
- package/assets/init/.qfai/assistant/agents/qa-gatekeeper.md +183 -5
- package/assets/init/.qfai/assistant/agents/test-design-analyst.md +22 -3
- package/assets/init/.qfai/assistant/catalog/cli-ux-guidelines.md +2 -2
- package/assets/init/.qfai/assistant/catalog/spec_required_files.json +2 -1
- package/assets/init/.qfai/assistant/catalog/test-layers-ci-lanes.md +60 -0
- package/assets/init/.qfai/assistant/catalog/test-layers.md +430 -13
- package/assets/init/.qfai/assistant/catalog/worklog-entry.schema.md +165 -0
- package/assets/init/.qfai/assistant/constitution/communication.md +1 -1
- package/assets/init/.qfai/assistant/constitution/constitution.md +1 -1
- package/assets/init/.qfai/assistant/constitution/drift-protocol.md +359 -10
- package/assets/init/.qfai/assistant/constitution/quality.md +35 -5
- package/assets/init/.qfai/assistant/constitution/requirements-decomposition.md +37 -0
- package/assets/init/.qfai/assistant/constitution/shared-skill-delegation-baseline.md +419 -8
- package/assets/init/.qfai/assistant/constitution/shared-skill-operating-baseline.md +122 -5
- package/assets/init/.qfai/assistant/constitution/workflow.md +53 -7
- package/assets/init/.qfai/assistant/manifest/agent-catalog.yml +439 -946
- package/assets/init/.qfai/assistant/manifest/agent-routing.yml +116 -4
- package/assets/init/.qfai/assistant/manifest/review-profiles.yml +9 -0
- package/assets/init/.qfai/assistant/process/migrations/v1.4.27-atdd-alignment.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-atdd/SKILL.md +150 -53
- package/assets/init/.qfai/assistant/skills/qfai-atdd/references/credential-reuse.md +146 -0
- package/assets/init/.qfai/assistant/skills/qfai-atdd/references/red-provenance.md +456 -0
- package/assets/init/.qfai/assistant/skills/qfai-atdd/references/review-fix-rounds.md +128 -0
- package/assets/init/.qfai/assistant/skills/qfai-atdd/references/scaffolding.md +29 -0
- package/assets/init/.qfai/assistant/skills/qfai-atdd/references/shared-test-artifacts.md +96 -0
- package/assets/init/.qfai/assistant/skills/qfai-atdd/references/stale-manifest.md +34 -0
- package/assets/init/.qfai/assistant/skills/qfai-atdd/references/test-case-depth-checklist.md +52 -5
- package/assets/init/.qfai/assistant/skills/qfai-configure/SKILL.md +16 -8
- package/assets/init/.qfai/assistant/skills/qfai-discussion/SKILL.md +8 -4
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/design-md-brand-catalog.md +2 -2
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/discussion-completion-matrix.md +17 -7
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/rcp_footer.md +10 -4
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/review-cycle-playbook.md +5 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui-bearing-playbook.md +4 -4
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/review_audit_playbook.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux/trend_scan_playbook.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux_best_practices.md +17 -7
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/01_Context.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/02_Inception-Deck.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/03_Story-Workshop.md +11 -3
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/05_Scope.md +5 -2
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/07_NFR.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/09_Constraints.md +7 -4
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/10_Policy.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/11_OQ-Register.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/12_OQ-Resolution-Log.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/14_Review-Request.md +14 -7
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/99_delta.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/Rxx_reviewer.md +16 -7
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/review_request.md +9 -6
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/review/summary.json +2 -0
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/40_screen_contracts.md +3 -2
- package/assets/init/.qfai/assistant/skills/qfai-discussion/templates/uiux/50_review_input_bundle.md +4 -2
- package/assets/init/.qfai/assistant/skills/qfai-implement/SKILL.md +252 -130
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/change-request-reset.md +93 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/checkpoint-verification.md +210 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/cross-spec-ownership.md +73 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/evidence-revision.md +291 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/execution-ledger.md +389 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/final-checklist.md +28 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/finding-classification.md +49 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/ledger-preconditions.md +55 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/oracle-strength.md +81 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/parallelization-policy.md +235 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/red-admissibility.md +91 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/red-not-observable.md +112 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/relevant-test-suite.md +87 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/review-artifact-layout.md +44 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/round-evidence.md +118 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/selector-granularity.md +24 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/upstream-artifact-ordering.md +33 -0
- package/assets/init/.qfai/assistant/skills/qfai-implement/references/volume-policy.md +149 -0
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/SKILL.md +35 -18
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md +1 -1
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/generator-prompt.md +106 -7
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/handoff.md +40 -11
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/references/iteration-loop.md +48 -1
- package/assets/init/.qfai/assistant/skills/qfai-prototyping/templates/DESIGN.md.sample +6 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/SKILL.md +87 -22
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/contract-artifact-rules.md +148 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/rcp_footer.md +10 -4
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/review-cycle-playbook.md +5 -1
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-execution-playbook.md +4 -2
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-phase-checklists.md +18 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-quality-gate.md +44 -3
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/sdd-triage.md +60 -7
- package/assets/init/.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md +171 -6
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/change-request.md +125 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/contracts/db-contract.sample.sql +6 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/evidence/sdd-spec.md +92 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/01_Objective.md +27 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/02_Initiative.md +30 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/05_Contracts.md +16 -6
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/06_Glossary.md +19 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/07_Constraints.md +25 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/08_Decisions.md +22 -2
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/_policies/11_Slice-Policy.md +37 -10
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/02_User-stories.md +20 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/03_Acceptance-Criteria.md +19 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/04_Business-Rules.md +32 -3
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/06_Test-Cases.md +56 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/07_Decisions.md +29 -2
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/10_Plan.md +41 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/16_Traceability-ledger.md +58 -0
- package/assets/init/.qfai/assistant/skills/qfai-sdd/templates/specs/spec/tdd/test-list.md +56 -0
- package/assets/init/.qfai/assistant/skills/qfai-verify/SKILL.md +57 -102
- package/assets/init/.qfai/assistant/skills/qfai-verify/references/articles.md +24 -0
- package/assets/init/.qfai/assistant/skills/qfai-verify/references/context-load.md +22 -0
- package/assets/init/.qfai/assistant/skills/qfai-verify/references/verify-output-contract.md +48 -0
- package/assets/init/.qfai/assistant/skills/qfai-verify/templates/verify-evidence.md +48 -0
- package/assets/init/.qfai/assistant/skills/web-research/SKILL.md +25 -7
- package/assets/init/.qfai/waivers.yml +11 -5
- package/assets/init/root/.github/workflows/qfai-tests.yml +318 -0
- package/assets/init/root/.github/workflows/qfai-validate.yml +327 -24
- package/assets/init/root/DESIGN.md +6 -0
- package/assets/init/root/qfai.config.yaml +15 -12
- package/dist/cli/index.cjs +20646 -13620
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +22101 -15061
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +13954 -8829
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +423 -14
- package/dist/index.d.ts +423 -14
- package/dist/index.mjs +9330 -4224
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -19
package/dist/index.d.cts
CHANGED
|
@@ -27,8 +27,24 @@ type Issue = {
|
|
|
27
27
|
suppressed?: boolean;
|
|
28
28
|
suggested_action?: string;
|
|
29
29
|
file?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Every other file this finding implicates, when `file` is only a
|
|
32
|
+
* representative (a duplicate ID is defined in N files but reported once).
|
|
33
|
+
* `--spec` scoping keeps the finding if any of these is in scope.
|
|
34
|
+
*/
|
|
35
|
+
relatedFiles?: string[];
|
|
30
36
|
refs?: string[];
|
|
31
37
|
rule?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The CI job a finding belongs to, when the producer reported one.
|
|
40
|
+
*
|
|
41
|
+
* `file` + `rule` alone cannot place a workflow-lane finding: two jobs in one workflow
|
|
42
|
+
* file break the same rule for different reasons, and a consumer reading only `file`
|
|
43
|
+
* cannot tell them apart. The reviewer-justification gate ingests findings from the
|
|
44
|
+
* workflow-set lint lanes verbatim, and this is the third of the three site fields those
|
|
45
|
+
* lanes report — dropping it forced the job into prose and out of every JSON consumer.
|
|
46
|
+
*/
|
|
47
|
+
job?: string;
|
|
32
48
|
loc?: IssueLocation;
|
|
33
49
|
dl_id?: string;
|
|
34
50
|
};
|
|
@@ -169,8 +185,10 @@ type QfaiPrototypingExecutionConfig = {
|
|
|
169
185
|
*
|
|
170
186
|
* Accepted values during the deprecation window:
|
|
171
187
|
* - `"playwright"` (primary, post-1.9.x default).
|
|
172
|
-
* - `"playwright-cli"` (deprecated; sunset
|
|
173
|
-
* the doctor probe emits `D-DEPRECATED-PROBE`
|
|
188
|
+
* - `"playwright-cli"` (deprecated; sunset `SUNSETS.playwrightCli`).
|
|
189
|
+
* Inside the window the doctor probe emits `D-DEPRECATED-PROBE` at
|
|
190
|
+
* `warning`; from the sunset onwards `normalizePrototypingExecution`
|
|
191
|
+
* rejects the value and the probe reports `error`.
|
|
174
192
|
*
|
|
175
193
|
* At sunset only `"playwright"` is accepted.
|
|
176
194
|
*/
|
|
@@ -246,7 +264,7 @@ declare function loadConfig(root: string): Promise<ConfigLoadResult>;
|
|
|
246
264
|
declare function resolvePath(root: string, config: QfaiConfig, key: ConfigPathKey): string;
|
|
247
265
|
|
|
248
266
|
type AtddTestKind = "e2e" | "api" | "integration";
|
|
249
|
-
type AtddUnknownRefKind = "us" | "tc" | "conApi";
|
|
267
|
+
type AtddUnknownRefKind = "us" | "tc" | "conApi" | "conDb";
|
|
250
268
|
type AtddUnknownRef = {
|
|
251
269
|
file: string;
|
|
252
270
|
token: string;
|
|
@@ -267,27 +285,200 @@ type AtddTraceabilityMissing = {
|
|
|
267
285
|
us: string[];
|
|
268
286
|
tc: string[];
|
|
269
287
|
conApi: string[];
|
|
288
|
+
conDb: string[];
|
|
270
289
|
};
|
|
271
290
|
type AtddCodeTraceabilityResult = {
|
|
272
291
|
specsRoot: string;
|
|
292
|
+
/**
|
|
293
|
+
* The configured tests directory, resolved.
|
|
294
|
+
*
|
|
295
|
+
* The bound on the per-spec owner scan. Test paths are absolute, so a
|
|
296
|
+
* checkout that itself lives under `/srv/integration/spec-0002/repo` has an
|
|
297
|
+
* ancestor pair that reads exactly like the canonical layout, and a flat
|
|
298
|
+
* `tests/integration/a.test.ts` inside it was attributed to `0002`.
|
|
299
|
+
*/
|
|
300
|
+
testsRoot: string;
|
|
273
301
|
contractsApiRoot: string;
|
|
302
|
+
/**
|
|
303
|
+
* Spec number -> the directory `collectSpecEntries` enumerated for it.
|
|
304
|
+
*
|
|
305
|
+
* Two questions, one map. **Existence** is not the same as `specUsIds.has(n)`:
|
|
306
|
+
* a spec created moments ago has a directory and empty catalogues, and scope
|
|
307
|
+
* logic that asks the id maps treats it as nonexistent — so a typo naming it
|
|
308
|
+
* is handled as repo-wide when that spec's own gate would in fact own it.
|
|
309
|
+
* **Its path** is the enumerated one, never `spec-${n}` rebuilt from the
|
|
310
|
+
* number: on a case-sensitive filesystem a `SPEC-0001/` directory is valid and
|
|
311
|
+
* kept verbatim by `listSpecDirs`, and a synthesised lower-case path would
|
|
312
|
+
* send the CLI report and the GitHub annotation at a file that is not there.
|
|
313
|
+
*/
|
|
314
|
+
declaredSpecDirs: Map<string, string>;
|
|
274
315
|
specUsIds: Map<string, Set<string>>;
|
|
275
316
|
specTcIds: Map<string, Set<string>>;
|
|
317
|
+
/**
|
|
318
|
+
* Every declared `CON-API-*`, active and deferred alike. This is the public
|
|
319
|
+
* meaning the field has always had — adding `x-qfai-status: planned` defers
|
|
320
|
+
* the test obligation, it does not un-declare the contract, so an external
|
|
321
|
+
* consumer using this set for "is this ID declared?" must keep seeing it.
|
|
322
|
+
*/
|
|
276
323
|
apiContractIds: Set<string>;
|
|
324
|
+
/** The subset that carries the `QFAI-ATDD-113` obligation. */
|
|
325
|
+
activeApiContractIds: Set<string>;
|
|
326
|
+
/**
|
|
327
|
+
* `CON-API-*` IDs excluded from the `QFAI-ATDD-113` obligation because their
|
|
328
|
+
* contract declares `x-qfai-status: planned`. Reported as `info` so the
|
|
329
|
+
* deferral stays visible instead of silently shrinking the gate.
|
|
330
|
+
*/
|
|
331
|
+
deferredApiContractIds: Set<string>;
|
|
332
|
+
contractsDbRoot: string;
|
|
333
|
+
/** Every declared `CON-DB-*`, active and deferred alike. */
|
|
334
|
+
dbContractIds: Set<string>;
|
|
335
|
+
/** The subset that carries the `QFAI-ATDD-115` obligation. */
|
|
336
|
+
activeDbContractIds: Set<string>;
|
|
337
|
+
/** `CON-DB-*` deferred by `-- x-qfai-status: planned`; reported at `info`. */
|
|
338
|
+
deferredDbContractIds: Set<string>;
|
|
277
339
|
refs: {
|
|
278
340
|
us: AtddSpecRefs;
|
|
279
341
|
tc: AtddSpecRefs;
|
|
280
342
|
api: Map<string, Set<string>>;
|
|
343
|
+
/**
|
|
344
|
+
* `CON-DB-*` references found in integration tests. L3 Integration is the
|
|
345
|
+
* layer whose declared scope is real-infrastructure integration including
|
|
346
|
+
* the database, so it is the one that can actually exercise a DB contract.
|
|
347
|
+
*/
|
|
348
|
+
db: Map<string, Set<string>>;
|
|
281
349
|
};
|
|
282
350
|
unknown: AtddUnknownRef[];
|
|
283
351
|
forbidden: {
|
|
284
352
|
tcInApi: AtddForbiddenRef[];
|
|
285
353
|
tcInE2e: AtddForbiddenRef[];
|
|
354
|
+
/** TC annotated under integration although its declared Level routes elsewhere. */
|
|
355
|
+
tcInIntegration: AtddForbiddenRef[];
|
|
286
356
|
};
|
|
287
357
|
missing: AtddTraceabilityMissing;
|
|
358
|
+
/**
|
|
359
|
+
* Formatted missing TC ref -> the test kind its declared `Level` routes to.
|
|
360
|
+
* Lets the CLI phrase `QFAI-ATDD-112` (message, `suggested_action`, report)
|
|
361
|
+
* per declared layer instead of naming `tests/integration/**` for every TC.
|
|
362
|
+
*/
|
|
363
|
+
missingTcHomes: Map<string, AtddTestKind>;
|
|
364
|
+
/**
|
|
365
|
+
* `TC-*` refs excluded from the `QFAI-ATDD-112` obligation because their
|
|
366
|
+
* declared `Level` is Unit or Component. Reported at `info`
|
|
367
|
+
* (`QFAI-ATDD-117`) so the exclusion is visible rather than silent — the
|
|
368
|
+
* shape a coverage scan must never take, since "nothing owed" and "nothing
|
|
369
|
+
* scanned" are otherwise indistinguishable. `/qfai-implement`'s ledger gate
|
|
370
|
+
* (`TDDLIST_TC_NOT_COVERED`) is what covers them.
|
|
371
|
+
*/
|
|
372
|
+
unitComponentTcIds: string[];
|
|
373
|
+
/** Test files outside the scanned roots; surfaced instead of dropped. */
|
|
374
|
+
skippedTestFiles: string[];
|
|
288
375
|
scan: AtddTraceabilityScan;
|
|
289
376
|
};
|
|
377
|
+
/** Test directory each `AtddTestKind` owns, for user-facing messages. */
|
|
378
|
+
declare const ATDD_TEST_KIND_DIRS: Record<AtddTestKind, string>;
|
|
379
|
+
/**
|
|
380
|
+
* The same map rendered against the project's configured `paths.testsDir`.
|
|
381
|
+
*
|
|
382
|
+
* The scan already follows `testsDir`, so a project that renamed it to e.g.
|
|
383
|
+
* `spec-tests` would otherwise be told by `QFAI-ATDD-112` to annotate
|
|
384
|
+
* `tests/api/**` — a directory the scan never reads, leaving the finding
|
|
385
|
+
* unclearable. A root-level layout (`testsDir: "."`) is the same trap in the
|
|
386
|
+
* other direction: the scan reads `api/**` at the repository root, so the
|
|
387
|
+
* `tests/` segment must be dropped rather than kept.
|
|
388
|
+
* {@link ATDD_TEST_KIND_DIRS} stays as the default-shaped fallback for callers
|
|
389
|
+
* with no config in hand.
|
|
390
|
+
*/
|
|
391
|
+
declare function atddTestKindDirs(testsDirRelative: string): Record<AtddTestKind, string>;
|
|
290
392
|
declare function evaluateAtddCodeTraceability(root: string, config: QfaiConfig): Promise<AtddCodeTraceabilityResult>;
|
|
393
|
+
/**
|
|
394
|
+
* Reads the declared `Level` of every TC in `06_Test-Cases.md` so the TC
|
|
395
|
+
* obligation can be routed by declared layer instead of being hard-pinned to
|
|
396
|
+
* `tests/integration/**`.
|
|
397
|
+
*
|
|
398
|
+
* Both shipped shapes are read, matching `parseTestCases` in
|
|
399
|
+
* `core/atdd/scaffold.ts`: the heading form (`## TC-NNNN` plus `- Level: L4`
|
|
400
|
+
* meta lines) and the table form. Heading form wins on duplicates; within
|
|
401
|
+
* either form the first declaration wins. Every `TC-ID` table is scanned, not
|
|
402
|
+
* just the first — a spec may split its catalogue across several tables, and
|
|
403
|
+
* only scanning the first silently dropped the later tables' layers.
|
|
404
|
+
*/
|
|
405
|
+
declare function collectTcLevels(rawTcText: string): Map<string, string>;
|
|
406
|
+
/**
|
|
407
|
+
* Heading-form TC levels only (`## TC-0001` + `- Level:`), with non-spec
|
|
408
|
+
* regions masked.
|
|
409
|
+
*
|
|
410
|
+
* Exported for `validateTddList`: its table reader is deliberately
|
|
411
|
+
* section-scoped, so the heading shape needs collecting separately. Using the
|
|
412
|
+
* combined `collectTcLevels` there would re-admit every table in the document,
|
|
413
|
+
* including an Appendix one the section scoping exists to keep out.
|
|
414
|
+
*/
|
|
415
|
+
declare function collectHeadingTcLevelsFrom(rawTcText: string): Array<[string, string]>;
|
|
416
|
+
declare function collectDeclaredTcIds(rawTcText: string): Set<string>;
|
|
417
|
+
/**
|
|
418
|
+
* Every heading-form TC id, whether or not the block declares a `Level`.
|
|
419
|
+
*
|
|
420
|
+
* `collectHeadingTcLevelsFrom` yields a pair only when a `- Level:` line
|
|
421
|
+
* follows the heading, so it cannot answer "does this spec declare this TC?" —
|
|
422
|
+
* a level-less TC is still declared. `validateTddList` needs both questions
|
|
423
|
+
* answered from the same shape: the id set decides whether a ledger `TC-Refs`
|
|
424
|
+
* value is known, the level pairs decide whether it is a coverage target.
|
|
425
|
+
*/
|
|
426
|
+
declare function collectHeadingTcIdsFrom(rawTcText: string): string[];
|
|
427
|
+
/**
|
|
428
|
+
* Where a declared `Level` routes its ATDD annotation obligation, or `null`
|
|
429
|
+
* when it owes none at all (Unit / Component).
|
|
430
|
+
*
|
|
431
|
+
* **The single answer to "what does this `Level` mean for ATDD".** It used to
|
|
432
|
+
* be three: `resolveTcHomeKind` matched `NO_ATDD_OBLIGATION_LEVELS` against the
|
|
433
|
+
* raw value, `isOutsideAtddObligation` against a trimmed and lower-cased one,
|
|
434
|
+
* and `qfai atdd scaffold` kept a third set with a third inline normalization.
|
|
435
|
+
* One question answered in three places is three chances for the routing rule
|
|
436
|
+
* and the exclusion rule to disagree about the same cell — which is the defect
|
|
437
|
+
* class this routing exists to remove, so it must not be reintroduced by the
|
|
438
|
+
* removal itself.
|
|
439
|
+
*
|
|
440
|
+
* `undefined` means the spec declares no `Level` for the TC (no column, no
|
|
441
|
+
* row): that is not "no obligation", it is the default home.
|
|
442
|
+
*/
|
|
443
|
+
declare function resolveAtddHomeKind(level: string | undefined): AtddTestKind | null;
|
|
444
|
+
/**
|
|
445
|
+
* True when a declared `Level` puts the TC outside every ATDD obligation.
|
|
446
|
+
*
|
|
447
|
+
* Exported so the rules that fire on ATDD artefacts agree on one answer.
|
|
448
|
+
* `validateScaffoldPlaceholder` needs it: a skeleton generated for an L1 TC
|
|
449
|
+
* would otherwise keep escalating to `error` and block
|
|
450
|
+
* `validate --profile atdd` for a TC that ATDD no longer owes anything for.
|
|
451
|
+
*/
|
|
452
|
+
declare function isOutsideAtddObligation(level: string | undefined): boolean;
|
|
453
|
+
declare const PLANNED_CONTRACT_KEY = "x-qfai-status";
|
|
454
|
+
/**
|
|
455
|
+
* True when the contract declares itself not yet implemented.
|
|
456
|
+
*
|
|
457
|
+
* `/qfai-sdd` authors contracts in Phase 0 (Contracts-first) but slices them in
|
|
458
|
+
* Phase 2, so between the second contract and the last slice every declared
|
|
459
|
+
* `CON-API-*` would otherwise be a `QFAI-ATDD-113` error. The marker makes the
|
|
460
|
+
* deferral explicit and reviewable in the contract itself.
|
|
461
|
+
*
|
|
462
|
+
* The marker is only honoured at the **document root**. A text scan that
|
|
463
|
+
* accepted any indentation would let an `x-qfai-status: planned` on a single
|
|
464
|
+
* OpenAPI operation defer the whole file, silently dropping the API-test
|
|
465
|
+
* obligation for every other `CON-API-*` it declares. The document is therefore
|
|
466
|
+
* parsed (YAML is a superset of JSON, so both contract formats go through the
|
|
467
|
+
* same path) and only a top-level key counts. An unparseable document falls
|
|
468
|
+
* back to a column-0 text match, which cannot see a nested key either.
|
|
469
|
+
*/
|
|
470
|
+
declare function isPlannedApiContract(text: string): boolean;
|
|
471
|
+
/**
|
|
472
|
+
* Derives the per-layer file pattern from the project's configured
|
|
473
|
+
* `testFileGlobs`, so a non-JS repository is scanned with its own extensions.
|
|
474
|
+
*
|
|
475
|
+
* Configured globs describe whole paths (`tests/**\/*.py`); the ATDD scan needs
|
|
476
|
+
* a pattern to append under `tests/{e2e,api,integration}/`. The extension set is
|
|
477
|
+
* therefore lifted out of them, unioned with the structural annotation carriers
|
|
478
|
+
* above, and recombined. When no extension can be recovered, the JS/TS default
|
|
479
|
+
* is used.
|
|
480
|
+
*/
|
|
481
|
+
declare function deriveAtddFilePattern(testFileGlobs: readonly string[]): string;
|
|
291
482
|
|
|
292
483
|
type GuardrailType = "non-goal" | "not-now" | "trade-off";
|
|
293
484
|
type DecisionGuardrailEntry = {
|
|
@@ -351,12 +542,77 @@ declare function filterDecisionGuardrailsByKeyword(items: DecisionGuardrail[], k
|
|
|
351
542
|
declare function formatGuardrailsForLlm(items: DecisionGuardrail[], max: number): string;
|
|
352
543
|
declare function checkDecisionGuardrails(entries: DecisionGuardrailEntry[]): GuardrailCheckResult;
|
|
353
544
|
|
|
354
|
-
type IdPrefix = "CAP" | "SPEC" | "US" | "BR" | "SC" | "AC" | "CASE" | "UI" | "API" | "DB" | "THEMA";
|
|
355
|
-
|
|
545
|
+
type IdPrefix = "CAP" | "SPEC" | "US" | "BR" | "SC" | "AC" | "EX" | "TC" | "CASE" | "UI" | "API" | "DB" | "THEMA";
|
|
546
|
+
/**
|
|
547
|
+
* Prefixes with a declared format but no membership in {@link ID_PREFIXES}.
|
|
548
|
+
*
|
|
549
|
+
* `DR` joins `ADR` here rather than in `ID_PREFIXES` because a Decision Record
|
|
550
|
+
* is not a spec-pack item: `extractAllIds` walks the layers a spec decomposes
|
|
551
|
+
* into, and sweeping `DR-*` into that walk would make every citation of a
|
|
552
|
+
* decision look like an undeclared spec item to the traceability rules.
|
|
553
|
+
*
|
|
554
|
+
* What was missing is the *format*. `qfai-implement` makes a non-empty `DR-ID`
|
|
555
|
+
* the hard precondition for the `exception` status and `tddList.ts` enforces it
|
|
556
|
+
* at `error`, but no ID class existed — so any non-empty string satisfied the
|
|
557
|
+
* gate, including a token the operator invented on the spot.
|
|
558
|
+
*/
|
|
559
|
+
type IdFormatPrefix = IdPrefix | "ADR" | "DR";
|
|
356
560
|
declare const ID_PREFIXES: IdPrefix[];
|
|
357
|
-
|
|
561
|
+
/**
|
|
562
|
+
* Every strict-format match for `prefix`.
|
|
563
|
+
*
|
|
564
|
+
* Takes {@link IdFormatPrefix}, not {@link IdPrefix}: `ADR` and `DR` have a
|
|
565
|
+
* declared format but are not spec-pack items, and a caller asking for one
|
|
566
|
+
* should not have to assert its way past the type. `extractAllIds` still walks
|
|
567
|
+
* {@link ID_PREFIXES} only, so the decomposition layers are unchanged.
|
|
568
|
+
*/
|
|
569
|
+
declare function extractIds(text: string, prefix: IdFormatPrefix): string[];
|
|
358
570
|
declare function extractAllIds(text: string): string[];
|
|
359
|
-
|
|
571
|
+
/**
|
|
572
|
+
* The one section whose fenced bodies are primary spec content: the v1421
|
|
573
|
+
* `03_Acceptance-Criteria.md` `## AC Gherkin (required)` block. Masking it
|
|
574
|
+
* would let a mistyped required definition (`# AC-0001-1`) reach
|
|
575
|
+
* `validateLayeredIdFormat` as if it did not exist.
|
|
576
|
+
*/
|
|
577
|
+
declare const AC_GHERKIN_SECTION = "ac gherkin (required)";
|
|
578
|
+
type FenceMaskOptions = {
|
|
579
|
+
/**
|
|
580
|
+
* Normalized H2 heading (see {@link AC_GHERKIN_SECTION}) whose fenced bodies
|
|
581
|
+
* stay in the ID scan when their info string is a Gherkin dialect. Omitted:
|
|
582
|
+
* every fence body is masked.
|
|
583
|
+
*/
|
|
584
|
+
scannedSection?: string;
|
|
585
|
+
};
|
|
586
|
+
/**
|
|
587
|
+
* Blanks the body of illustrative fenced code blocks while preserving the line
|
|
588
|
+
* count, so an ID-shaped token inside a sample or a diagram is not read as a
|
|
589
|
+
* spec ID and reported line numbers still point at the source file.
|
|
590
|
+
*
|
|
591
|
+
* Two properties matter:
|
|
592
|
+
*
|
|
593
|
+
* - A fence closes only on the **same marker character** at **at least the
|
|
594
|
+
* opening length**. A ```` ```` ```` block that quotes a ```` ``` ```` sample
|
|
595
|
+
* inside itself is legal markdown; toggling on any fence line would end the
|
|
596
|
+
* outer block early and re-expose the very sample it was hiding.
|
|
597
|
+
* - A fence keeps its body only when it is tagged with a
|
|
598
|
+
* `SCANNED_FENCE_LANGUAGES` info string **and** sits inside
|
|
599
|
+
* `options.scannedSection`. Keying on the language alone exempted every
|
|
600
|
+
* ```` ```gherkin ```` block in every layered file — including an
|
|
601
|
+
* illustration in a Purpose paragraph — which is the case the mask exists
|
|
602
|
+
* for. Only the required AC Gherkin section is the spec's own definition.
|
|
603
|
+
*/
|
|
604
|
+
declare function maskFencedCodeBlocks(text: string, options?: FenceMaskOptions): string;
|
|
605
|
+
type InvalidIdOccurrence = {
|
|
606
|
+
id: string;
|
|
607
|
+
/** 1-based line number in the original text. */
|
|
608
|
+
line: number;
|
|
609
|
+
};
|
|
610
|
+
/**
|
|
611
|
+
* Finds ID-shaped tokens that do not match their prefix's canonical format,
|
|
612
|
+
* with the line each was first seen on. Fenced code blocks are excluded.
|
|
613
|
+
*/
|
|
614
|
+
declare function extractInvalidIdOccurrences(text: string, prefixes: IdFormatPrefix[], options?: FenceMaskOptions): InvalidIdOccurrence[];
|
|
615
|
+
declare function extractInvalidIds(text: string, prefixes: IdFormatPrefix[], options?: FenceMaskOptions): string[];
|
|
360
616
|
declare function extractSpecNumber(specId: string): string | null;
|
|
361
617
|
declare function extractCapSpecNumber(capId: string): string | null;
|
|
362
618
|
declare function extractUsSpecNumber(usId: string): string | null;
|
|
@@ -450,6 +706,20 @@ type ReportTraceability = {
|
|
|
450
706
|
type ReportTestStrategy = {
|
|
451
707
|
totalScenarios: number;
|
|
452
708
|
limit: number;
|
|
709
|
+
/**
|
|
710
|
+
* Where the layer buckets came from.
|
|
711
|
+
*
|
|
712
|
+
* `scenario-tags` is the Gherkin `@layer-*` path, which only exists for the
|
|
713
|
+
* legacy `scenario.feature` layout. On the v1421 layered layout
|
|
714
|
+
* `examplesPath` is the **Markdown** `05_Examples.md`, so the parse failed,
|
|
715
|
+
* the error was swallowed by `continue`, and every bucket printed 0 — while
|
|
716
|
+
* the toolkit mandates layer routing and gates completion on it.
|
|
717
|
+
* `ledger-layer` is the `Layer` column of `tdd/test-list.md`, which is the
|
|
718
|
+
* artifact the shipped templates actually produce.
|
|
719
|
+
*/
|
|
720
|
+
layerSource: "scenario-tags" | "ledger-layer" | "none";
|
|
721
|
+
/** Scenario files that failed to parse; reported instead of silently zeroed. */
|
|
722
|
+
unparsedScenarioFiles: string[];
|
|
453
723
|
layer: Record<"unit" | "component" | "integration" | "api" | "e2e" | "none" | "unknown", number>;
|
|
454
724
|
size: Record<"s" | "m" | "l" | "none" | "unknown", number>;
|
|
455
725
|
missing: {
|
|
@@ -543,11 +813,34 @@ type ReportWaivers = {
|
|
|
543
813
|
};
|
|
544
814
|
type ReportTddCoverageSpec = {
|
|
545
815
|
specNumber: string;
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
816
|
+
/**
|
|
817
|
+
* Set when the spec's coverage cannot be assessed, naming why.
|
|
818
|
+
*
|
|
819
|
+
* A report is an audit artifact, and `0 done / 0 open` is a claim: it says
|
|
820
|
+
* the spec owes nothing. For a spec whose `06_Test-Cases.md` has no readable
|
|
821
|
+
* `TC-ID` table (`TDDLIST_TC_TABLE_UNRESOLVED`), or whose ledger's first
|
|
822
|
+
* table is missing required columns (`TDDLIST_REQUIRED_COLUMN_MISSING`, on
|
|
823
|
+
* which the validator stops before checking anything else), that claim is
|
|
824
|
+
* unfounded — and printed beside a failing gate it reads as the gate being
|
|
825
|
+
* wrong. The counts are omitted and this is printed instead.
|
|
826
|
+
*/
|
|
827
|
+
unassessable?: string;
|
|
828
|
+
/**
|
|
829
|
+
* The counts, present only when {@link unassessable} is absent.
|
|
830
|
+
*
|
|
831
|
+
* Optional rather than zeroed: `report --format json` serializes this
|
|
832
|
+
* object verbatim, so a zero here is a published claim that the spec owes
|
|
833
|
+
* nothing. Omitting them makes the JSON say what the markdown says.
|
|
834
|
+
*/
|
|
835
|
+
unitComponentTotal?: number;
|
|
836
|
+
doneCount?: number;
|
|
837
|
+
/** Has a passing test, has not cleared its blocking reviewers / checkpoint. */
|
|
838
|
+
inReviewCount?: number;
|
|
839
|
+
exceptionCount?: number;
|
|
840
|
+
openCount?: number;
|
|
841
|
+
/** Open rows that cannot be started, reported apart from "not started yet". */
|
|
842
|
+
blockedCount?: number;
|
|
843
|
+
missingTcRefs?: string[];
|
|
551
844
|
exceptionRows: Array<{
|
|
552
845
|
tddId: string;
|
|
553
846
|
drId: string;
|
|
@@ -699,6 +992,12 @@ declare function formatReportJson(data: ReportData): string;
|
|
|
699
992
|
type ValidationOptions = {
|
|
700
993
|
profile?: ValidationProfile;
|
|
701
994
|
platform?: string;
|
|
995
|
+
/**
|
|
996
|
+
* Restrict the run to the named specs (`--spec`). Repo-level findings are
|
|
997
|
+
* always kept; only findings owned by an out-of-scope `spec-NNNN` directory
|
|
998
|
+
* are dropped, and per-spec report writes are skipped for them.
|
|
999
|
+
*/
|
|
1000
|
+
specIds?: readonly string[];
|
|
702
1001
|
};
|
|
703
1002
|
declare function validateProject(root: string, configResult?: ConfigLoadResult, options?: ValidationOptions): Promise<ValidationResult>;
|
|
704
1003
|
|
|
@@ -709,7 +1008,24 @@ declare function lintSql(text: string, file: string): Issue[];
|
|
|
709
1008
|
|
|
710
1009
|
declare function validateDefinedIds(root: string, config: QfaiConfig): Promise<Issue[]>;
|
|
711
1010
|
|
|
712
|
-
|
|
1011
|
+
/**
|
|
1012
|
+
* Per-spec scoping for `qfai validate --spec <id>`.
|
|
1013
|
+
*
|
|
1014
|
+
* `qfai-sdd` delegates Slice in parallel per spec and gates each slice with
|
|
1015
|
+
* `validate`, but a repo-global run makes a worker fail on a sibling agent's
|
|
1016
|
+
* in-flight spec. A scope narrows a run to the named specs: findings owned by
|
|
1017
|
+
* an out-of-scope spec are dropped, and per-spec side effects (the
|
|
1018
|
+
* `specs-coverage/spec-NNNN.md` report) are not written for them.
|
|
1019
|
+
*
|
|
1020
|
+
* Repo-level findings — config, assistant assets, `_policies/**`, contracts —
|
|
1021
|
+
* are never filtered out: they are not owned by any single spec and a worker
|
|
1022
|
+
* that ignored them would gate on an incomplete picture.
|
|
1023
|
+
*/
|
|
1024
|
+
type SpecScope = ReadonlySet<string>;
|
|
1025
|
+
|
|
1026
|
+
declare function validateAtddCodeTraceability(root: string, config: QfaiConfig, options?: {
|
|
1027
|
+
specScope?: SpecScope;
|
|
1028
|
+
}): Promise<Issue[]>;
|
|
713
1029
|
|
|
714
1030
|
declare function validateLayeredTraceability(root: string, config: QfaiConfig): Promise<Issue[]>;
|
|
715
1031
|
|
|
@@ -720,6 +1036,61 @@ declare function validateSpecSplitByCapability(root: string, config: QfaiConfig)
|
|
|
720
1036
|
declare function validateTraceability(root: string, config: QfaiConfig, options: {
|
|
721
1037
|
includeCodeReferences: boolean;
|
|
722
1038
|
}): Promise<Issue[]>;
|
|
1039
|
+
type TraceabilityGraphNode = {
|
|
1040
|
+
id: string;
|
|
1041
|
+
layer: string;
|
|
1042
|
+
path?: string;
|
|
1043
|
+
};
|
|
1044
|
+
type TraceabilityGraphEdge = {
|
|
1045
|
+
from: string;
|
|
1046
|
+
to: string;
|
|
1047
|
+
type: string;
|
|
1048
|
+
};
|
|
1049
|
+
type TraceabilityGraph = {
|
|
1050
|
+
nodes: TraceabilityGraphNode[];
|
|
1051
|
+
edges: TraceabilityGraphEdge[];
|
|
1052
|
+
};
|
|
1053
|
+
/**
|
|
1054
|
+
* Builds the requirement graph from the parsed spec pack.
|
|
1055
|
+
*
|
|
1056
|
+
* Exposed so the per-run `traceability.json` artifact can be populated from the specs themselves
|
|
1057
|
+
* rather than from the refs of emitted findings. Deriving it from findings inverted the artifact's
|
|
1058
|
+
* intent: it was empty precisely when the spec pack was healthy, and populated only with IDs that
|
|
1059
|
+
* failed.
|
|
1060
|
+
*
|
|
1061
|
+
* Every layered style `collectSpecEntries` recognises is walked, because restricting this to the
|
|
1062
|
+
* v1416 style `validateTraceability` gates would leave the artifact empty for every spec written
|
|
1063
|
+
* in the current v1421 layout. The layer vocabulary differs per style — v1416 links
|
|
1064
|
+
* `US -> AC -> BR -> SC -> CASE`, v1417/v1421 link `US -> AC -> BR -> EX -> TC` — so the edge
|
|
1065
|
+
* types differ too; the node/edge shape does not.
|
|
1066
|
+
*
|
|
1067
|
+
* Emits no issues; parse problems are reported by `validateTraceability` and
|
|
1068
|
+
* `validateLayerCoverage` on the same inputs.
|
|
1069
|
+
*/
|
|
1070
|
+
declare function buildLayeredTraceabilityGraph(root: string, config: QfaiConfig): Promise<TraceabilityGraph>;
|
|
1071
|
+
/**
|
|
1072
|
+
* Make an item ID unique across the pack.
|
|
1073
|
+
*
|
|
1074
|
+
* Item IDs are file-local (`spec-traceability-rules.md`, "ID and Parent
|
|
1075
|
+
* Rules") and the shipped templates start every spec at `US-0001` / `AC-0001`,
|
|
1076
|
+
* so two specs using the short form collide. Keying the graph on the raw ID
|
|
1077
|
+
* silently dropped the second spec's nodes and overwrote its same-shaped edges,
|
|
1078
|
+
* leaving `traceability.json` holding only the first spec's paths.
|
|
1079
|
+
*
|
|
1080
|
+
* The composite form already carries its spec number, so it is left untouched —
|
|
1081
|
+
* qualifying it would rewrite every ID in the packs that actually ship today
|
|
1082
|
+
* for no gain.
|
|
1083
|
+
*/
|
|
1084
|
+
declare function qualifyId(specNumber: string, id: string): string;
|
|
1085
|
+
/**
|
|
1086
|
+
* The spec number owning `filePath`, or `null` for a repo-level file.
|
|
1087
|
+
*
|
|
1088
|
+
* Exported next to {@link qualifyId} because every producer of graph IDs has to
|
|
1089
|
+
* namespace them the same way. A finding-derived node built from a raw short ID
|
|
1090
|
+
* lands beside — not on — the `spec-NNNN/AC-0001` node the edges point at, and
|
|
1091
|
+
* two specs' findings then merge onto the same unqualified node.
|
|
1092
|
+
*/
|
|
1093
|
+
declare function specNumberForPath(filePath: string | undefined): string | null;
|
|
723
1094
|
|
|
724
1095
|
type SurfaceType = CanonicalPrototypingSurface | "non-ui";
|
|
725
1096
|
declare const DISCUSSION_UI_BEARING_SURFACES: Set<SurfaceType>;
|
|
@@ -932,5 +1303,43 @@ type ParseResult = {
|
|
|
932
1303
|
declare function parseDesignMd(text: string): ParseResult;
|
|
933
1304
|
declare function validateDesignMd(d: DesignMd): ValidationIssue[];
|
|
934
1305
|
declare function hashDesignMd(text: string): string;
|
|
1306
|
+
/**
|
|
1307
|
+
* Sentinel carried by every DESIGN.md the package ships as a sample:
|
|
1308
|
+
* - `assets/init/root/DESIGN.md` (seeded into the project root by `qfai init`)
|
|
1309
|
+
* - `assets/init/.qfai/assistant/skills/qfai-prototyping/templates/DESIGN.md.sample`
|
|
1310
|
+
*
|
|
1311
|
+
* The two files are the same fictional brand but are NOT byte-identical
|
|
1312
|
+
* (they differ in front-matter whitespace alignment), so a sha256-equality
|
|
1313
|
+
* guard would have to enumerate — and keep in sync — one digest per shipped
|
|
1314
|
+
* sample. A marker is content-addressed instead of byte-addressed: it
|
|
1315
|
+
* survives whitespace edits, covers both samples with one constant, and
|
|
1316
|
+
* keeps covering any future sample that carries it.
|
|
1317
|
+
*
|
|
1318
|
+
* The marker lives in the markdown body, so `parseDesignMd` (which only
|
|
1319
|
+
* reads front-matter) is unaffected: an unreplaced sample still parses and
|
|
1320
|
+
* validates, and is rejected by identity instead.
|
|
1321
|
+
*/
|
|
1322
|
+
declare const DESIGN_MD_SAMPLE_MARKER = "QFAI-SAMPLE-DESIGN-MD";
|
|
1323
|
+
/**
|
|
1324
|
+
* True when `text` is still (or is derived from) a DESIGN.md the package
|
|
1325
|
+
* ships as a sample. Used to stop `/qfai-sdd` Phase 0 from sha256-freezing
|
|
1326
|
+
* an unauthored brand as the project's brand contract, and to surface the
|
|
1327
|
+
* same condition from `qfai validate` (QFAI-DCON-034).
|
|
1328
|
+
*
|
|
1329
|
+
* Two detectors, because the marker only covers samples seeded by releases
|
|
1330
|
+
* that carry it:
|
|
1331
|
+
* 1. `DESIGN_MD_SAMPLE_MARKER` — current samples, survives any edit that
|
|
1332
|
+
* leaves the comment in place.
|
|
1333
|
+
* 2. Legacy content fingerprint — samples seeded before the marker
|
|
1334
|
+
* existed, which `qfai init` will never overwrite.
|
|
1335
|
+
*
|
|
1336
|
+
* `text` is `unknown` rather than `string` because this is re-exported from
|
|
1337
|
+
* `core/index.ts` and so is reachable from untyped JavaScript, where a caller
|
|
1338
|
+
* can hand over the result of a read that failed or a value that was never a
|
|
1339
|
+
* file body. The guard below is what makes that safe; typing the parameter
|
|
1340
|
+
* `string` would have made it dead code that only looked defensive. Internal
|
|
1341
|
+
* callers pass a string and are unaffected.
|
|
1342
|
+
*/
|
|
1343
|
+
declare function isUnreplacedDesignMdSample(text: unknown): boolean;
|
|
935
1344
|
|
|
936
|
-
export { ARCHETYPES, type Archetype, type AtddCodeTraceabilityResult, type AtddForbiddenRef, type AtddSpecRefs, type AtddTestKind, type AtddTraceabilityMissing, type AtddTraceabilityScan, type AtddUnknownRef, type AtddUnknownRefKind, BROWSER_QA_PHASES, COLOR_KEYS, type ColorKey, type ConfigLoadResult, type ConfigPathKey, type ConfigSearchResult, DISCUSSION_NON_UI_SURFACES, DISCUSSION_UI_BEARING_SURFACES, type DecisionGuardrail, type DecisionGuardrailEntry, type DesignMd, type DesignMdColors, type DesignMdFonts, type DesignMdRadius, type DesignMdShadow, FONT_KEYS, type FailOn, type FontKey, type GuardrailCheckResult, type GuardrailIssue, type GuardrailIssueSeverity, type GuardrailLoadError, type GuardrailLoadResult, type GuardrailType, ID_PREFIXES, type IdFormatPrefix, type IdPrefix, type Issue, type IssueCategory, type IssueLocation, type IssueSeverity, type OrphanContractsPolicy, type OutputFormat, PROTOTYPING_SUPPORTED_SURFACES, type ParseError, type ParseResult, type PrototypingBrowserTool, type PrototypingSurface, type QfaiAtddConfig, type QfaiConfig, type QfaiOutputConfig, type QfaiPaths, type QfaiPrototypingCalibrationConfig, type QfaiPrototypingConfig, type QfaiPrototypingExecutionConfig, type QfaiReviewConfig, type QfaiUiuxAuditConfig, type QfaiUiuxConfig, type QfaiValidationConfig, RADIUS_KEYS, type RadiusKey, type ReportChangeType, type ReportChangeTypeSummary, type ReportChangeTypeWarning, type ReportContractCoverage, type ReportData, type ReportDeltaCoverage, type ReportFullHarnessExecution, type ReportGuardrailItem, type ReportGuardrails, type ReportIds, type ReportPrototypingSummary, type ReportRoundLifecycle, type ReportRuleFinding, type ReportSpecContractRefs, type ReportSpecCoverage, type ReportSummary, type ReportSurfaceClassification, type ReportTddCoverage, type ReportTddCoverageSpec, type ReportTestStrategy, type ReportTraceability, type ReportWaivers, type RunSddPreflightOptions, SHADOW_KEYS, type SddPreflightResult, type SddPreflightSource, type SddPreflightStatus, type ShadowKey, type TraceabilitySeverity, VISUAL_BROWSER_SURFACES, type ValidationCounts, type ValidationIssue, type ValidationOptions, type ValidationProfile, type ValidationResult, type ValidationTraceability, type ValidationWaiverAction, type ValidationWaiverDowngradeTo, type ValidationWaiverEntry, type ValidationWaiverMatch, type ValidationWaiverScope, type ValidationWaiverSeverity, type ValidationWaiverSuppressed, type ValidationWaivers, checkDecisionGuardrails, createReportData, defaultConfig, evaluateAtddCodeTraceability, extractAcSpecNumber, extractAllIds, extractBrSpecNumber, extractCapSpecNumber, extractCaseSpecNumber, extractDecisionGuardrailsFromMarkdown, extractIds, extractInvalidIds, extractScSpecNumber, extractSpecNumber, extractUsSpecNumber, filterDecisionGuardrailsByKeyword, findConfigRoot, formatGuardrailsForLlm, formatReportJson, formatReportMarkdown, getConfigPath, hashDesignMd, isDiscussionUiBearingSurfaceType, isNonUiDiscussionSurface, isSupportedPrototypingSurface, isValidPrototypingSurface, lintSql, loadConfig, loadDecisionGuardrails, normalizeDecisionGuardrails, parseDesignMd, requiresVisualBrowserEvidence, resolvePath, resolveToolVersion, runBrowserQaOrchestrated, runRenderCapture, runSddPreflight, sortDecisionGuardrails, summarizeBrowserQaResult, validateAtddCodeTraceability, validateContracts, validateDefinedIds, validateDesignMd, validateLayeredTraceability, validateOrphanProhibition, validateProject, validateSpecSplitByCapability, validateTraceability };
|
|
1345
|
+
export { AC_GHERKIN_SECTION, ARCHETYPES, ATDD_TEST_KIND_DIRS, type Archetype, type AtddCodeTraceabilityResult, type AtddForbiddenRef, type AtddSpecRefs, type AtddTestKind, type AtddTraceabilityMissing, type AtddTraceabilityScan, type AtddUnknownRef, type AtddUnknownRefKind, BROWSER_QA_PHASES, COLOR_KEYS, type ColorKey, type ConfigLoadResult, type ConfigPathKey, type ConfigSearchResult, DESIGN_MD_SAMPLE_MARKER, DISCUSSION_NON_UI_SURFACES, DISCUSSION_UI_BEARING_SURFACES, type DecisionGuardrail, type DecisionGuardrailEntry, type DesignMd, type DesignMdColors, type DesignMdFonts, type DesignMdRadius, type DesignMdShadow, FONT_KEYS, type FailOn, type FenceMaskOptions, type FontKey, type GuardrailCheckResult, type GuardrailIssue, type GuardrailIssueSeverity, type GuardrailLoadError, type GuardrailLoadResult, type GuardrailType, ID_PREFIXES, type IdFormatPrefix, type IdPrefix, type InvalidIdOccurrence, type Issue, type IssueCategory, type IssueLocation, type IssueSeverity, type OrphanContractsPolicy, type OutputFormat, PLANNED_CONTRACT_KEY, PROTOTYPING_SUPPORTED_SURFACES, type ParseError, type ParseResult, type PrototypingBrowserTool, type PrototypingSurface, type QfaiAtddConfig, type QfaiConfig, type QfaiOutputConfig, type QfaiPaths, type QfaiPrototypingCalibrationConfig, type QfaiPrototypingConfig, type QfaiPrototypingExecutionConfig, type QfaiReviewConfig, type QfaiUiuxAuditConfig, type QfaiUiuxConfig, type QfaiValidationConfig, RADIUS_KEYS, type RadiusKey, type ReportChangeType, type ReportChangeTypeSummary, type ReportChangeTypeWarning, type ReportContractCoverage, type ReportData, type ReportDeltaCoverage, type ReportFullHarnessExecution, type ReportGuardrailItem, type ReportGuardrails, type ReportIds, type ReportPrototypingSummary, type ReportRoundLifecycle, type ReportRuleFinding, type ReportSpecContractRefs, type ReportSpecCoverage, type ReportSummary, type ReportSurfaceClassification, type ReportTddCoverage, type ReportTddCoverageSpec, type ReportTestStrategy, type ReportTraceability, type ReportWaivers, type RunSddPreflightOptions, SHADOW_KEYS, type SddPreflightResult, type SddPreflightSource, type SddPreflightStatus, type ShadowKey, type TraceabilityGraph, type TraceabilityGraphEdge, type TraceabilityGraphNode, type TraceabilitySeverity, VISUAL_BROWSER_SURFACES, type ValidationCounts, type ValidationIssue, type ValidationOptions, type ValidationProfile, type ValidationResult, type ValidationTraceability, type ValidationWaiverAction, type ValidationWaiverDowngradeTo, type ValidationWaiverEntry, type ValidationWaiverMatch, type ValidationWaiverScope, type ValidationWaiverSeverity, type ValidationWaiverSuppressed, type ValidationWaivers, atddTestKindDirs, buildLayeredTraceabilityGraph, checkDecisionGuardrails, collectDeclaredTcIds, collectHeadingTcIdsFrom, collectHeadingTcLevelsFrom, collectTcLevels, createReportData, defaultConfig, deriveAtddFilePattern, evaluateAtddCodeTraceability, extractAcSpecNumber, extractAllIds, extractBrSpecNumber, extractCapSpecNumber, extractCaseSpecNumber, extractDecisionGuardrailsFromMarkdown, extractIds, extractInvalidIdOccurrences, extractInvalidIds, extractScSpecNumber, extractSpecNumber, extractUsSpecNumber, filterDecisionGuardrailsByKeyword, findConfigRoot, formatGuardrailsForLlm, formatReportJson, formatReportMarkdown, getConfigPath, hashDesignMd, isDiscussionUiBearingSurfaceType, isNonUiDiscussionSurface, isOutsideAtddObligation, isPlannedApiContract, isSupportedPrototypingSurface, isUnreplacedDesignMdSample, isValidPrototypingSurface, lintSql, loadConfig, loadDecisionGuardrails, maskFencedCodeBlocks, normalizeDecisionGuardrails, parseDesignMd, qualifyId, requiresVisualBrowserEvidence, resolveAtddHomeKind, resolvePath, resolveToolVersion, runBrowserQaOrchestrated, runRenderCapture, runSddPreflight, sortDecisionGuardrails, specNumberForPath, summarizeBrowserQaResult, validateAtddCodeTraceability, validateContracts, validateDefinedIds, validateDesignMd, validateLayeredTraceability, validateOrphanProhibition, validateProject, validateSpecSplitByCapability, validateTraceability };
|