kibi-cli 2.22.0 → 2.23.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/dist/cli-register-foundation.d.ts.map +1 -1
- package/dist/cli-register-foundation.js +1 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +51 -3
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +40 -0
- package/dist/commands/init-helpers.d.ts +2 -1
- package/dist/commands/init-helpers.d.ts.map +1 -1
- package/dist/commands/init-helpers.js +3 -0
- package/dist/commands/migrate.d.ts +47 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +82 -15
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +15 -1
- package/dist/extractors/markdown.d.ts.map +1 -1
- package/dist/extractors/markdown.js +37 -35
- package/dist/intent-search.d.ts.map +1 -1
- package/dist/intent-search.js +32 -4
- package/dist/operations/bootstrap/activation.d.ts +7 -1
- package/dist/operations/bootstrap/activation.d.ts.map +1 -1
- package/dist/operations/bootstrap/activation.js +27 -2
- package/dist/operations/bootstrap/generate.d.ts.map +1 -1
- package/dist/operations/bootstrap/generate.js +56 -16
- package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance-actions.js +14 -2
- package/dist/operations/bootstrap/guidance.d.ts.map +1 -1
- package/dist/operations/bootstrap/guidance.js +6 -2
- package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
- package/dist/operations/bootstrap/presentation.js +75 -9
- package/dist/operations/bootstrap/types.d.ts +6 -0
- package/dist/operations/bootstrap/types.d.ts.map +1 -1
- package/dist/operations/migration/kb-sources.d.ts +8 -5
- package/dist/operations/migration/kb-sources.d.ts.map +1 -1
- package/dist/operations/migration/kb-sources.js +50 -14
- package/dist/operations/migration/schema6.d.ts.map +1 -1
- package/dist/operations/migration/schema6.js +11 -2
- package/dist/operations/migration/source-paths.d.ts +18 -1
- package/dist/operations/migration/source-paths.d.ts.map +1 -1
- package/dist/operations/migration/source-paths.js +111 -16
- package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -1
- package/dist/operations/modeling/suggest-predicates.js +22 -7
- package/dist/operations/mutation/requirement-semantics.d.ts +16 -0
- package/dist/operations/mutation/requirement-semantics.d.ts.map +1 -1
- package/dist/operations/mutation/requirement-semantics.js +50 -0
- package/dist/operations/mutation/strict-fact.js +1 -1
- package/dist/operations/mutation/upsert.d.ts.map +1 -1
- package/dist/operations/mutation/upsert.js +2 -1
- package/dist/operations/mutation/validation.d.ts.map +1 -1
- package/dist/operations/mutation/validation.js +43 -1
- package/dist/operations/planning/apply-plan.d.ts.map +1 -1
- package/dist/operations/planning/apply-plan.js +38 -9
- package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/analyze-prose.js +49 -17
- package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
- package/dist/operations/semantic-advisor/ingestion-boundary.js +25 -1
- package/dist/operations/semantic-advisor/stored-ledger-drift.d.ts +19 -0
- package/dist/operations/semantic-advisor/stored-ledger-drift.d.ts.map +1 -0
- package/dist/operations/semantic-advisor/stored-ledger-drift.js +78 -0
- package/dist/public/impact/analyzer.d.ts.map +1 -1
- package/dist/public/impact/analyzer.js +7 -1
- package/dist/public/impact/diagnostics.d.ts.map +1 -1
- package/dist/public/impact/diagnostics.js +16 -3
- package/dist/public/impact/types.d.ts +2 -0
- package/dist/public/impact/types.d.ts.map +1 -1
- package/dist/public/operations/catalog.d.ts +7 -2
- package/dist/public/operations/catalog.d.ts.map +1 -1
- package/dist/public/operations/check-executor.d.ts.map +1 -1
- package/dist/public/operations/check-executor.js +10 -3
- package/dist/public/operations/check-helpers.d.ts +10 -0
- package/dist/public/operations/check-helpers.d.ts.map +1 -1
- package/dist/public/operations/check-helpers.js +54 -0
- package/dist/public/operations/contracts.d.ts.map +1 -1
- package/dist/public/operations/contracts.js +1 -0
- package/dist/public/operations/decision-firmness.d.ts +3 -1
- package/dist/public/operations/decision-firmness.d.ts.map +1 -1
- package/dist/public/operations/decision-firmness.js +13 -3
- package/dist/public/operations/discovery-executors.d.ts +18 -0
- package/dist/public/operations/discovery-executors.d.ts.map +1 -1
- package/dist/public/operations/discovery-executors.js +77 -3
- package/dist/public/operations/migration-plan.d.ts +13 -0
- package/dist/public/operations/migration-plan.d.ts.map +1 -1
- package/dist/public/operations/migration-plan.js +29 -1
- package/dist/public/operations/schema6-check-actions.d.ts +4 -0
- package/dist/public/operations/schema6-check-actions.d.ts.map +1 -1
- package/dist/public/operations/schema6-check-actions.js +39 -2
- package/dist/public/operations/source-path-dangling.d.ts +1 -1
- package/dist/public/operations/source-path-dangling.d.ts.map +1 -1
- package/dist/public/operations/source-path-dangling.js +11 -2
- package/dist/public/operations/specs/composite.d.ts +1 -1
- package/dist/public/operations/specs/discovery.d.ts +5 -0
- package/dist/public/operations/specs/discovery.d.ts.map +1 -1
- package/dist/public/operations/specs/discovery.js +5 -0
- package/dist/public/operations/specs/planning.d.ts +1 -1
- package/dist/public/operations/specs/planning.js +1 -1
- package/dist/public/operations/specs/reporting.d.ts.map +1 -1
- package/dist/public/operations/specs/reporting.js +6 -4
- package/dist/public/operations/specs/semantic.d.ts +1 -1
- package/dist/public/operations/specs/semantic.d.ts.map +1 -1
- package/dist/public/operations/specs/semantic.js +30 -3
- package/dist/public/skills/kibi-bootstrap/SKILL.md +3 -2
- package/dist/public/skills/kibi-usage/SKILL.md +13 -5
- package/dist/public/skills/kibi-usage/resources/workflows.md +3 -1
- package/dist/search-answer.d.ts +14 -0
- package/dist/search-answer.d.ts.map +1 -1
- package/dist/search-answer.js +42 -4
- package/dist/traceability/git-change-snapshot.d.ts +46 -0
- package/dist/traceability/git-change-snapshot.d.ts.map +1 -1
- package/dist/traceability/git-change-snapshot.js +187 -3
- package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
- package/dist/traceability/staged-diagnostics.js +5 -6
- package/dist/traceability/staged-inventory-drift.d.ts +24 -0
- package/dist/traceability/staged-inventory-drift.d.ts.map +1 -0
- package/dist/traceability/staged-inventory-drift.js +84 -0
- package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
- package/dist/traceability/staged-symbols-manifest.js +1 -2
- package/dist/utils/content-freshness.d.ts +9 -0
- package/dist/utils/content-freshness.d.ts.map +1 -1
- package/dist/utils/content-freshness.js +33 -0
- package/dist/utils/merge-driver-setup.d.ts +10 -0
- package/dist/utils/merge-driver-setup.d.ts.map +1 -0
- package/dist/utils/merge-driver-setup.js +69 -0
- package/dist/utils/rule-registry.generated.d.ts +1 -1
- package/dist/utils/rule-registry.generated.js +1 -1
- package/package.json +2 -2
- package/src/public/impact/analyzer.ts +13 -1
- package/src/public/impact/diagnostics.ts +20 -3
- package/src/public/impact/types.ts +2 -0
- package/src/public/operations/check-executor.ts +16 -4
- package/src/public/operations/check-helpers.ts +65 -0
- package/src/public/operations/contracts.ts +1 -0
- package/src/public/operations/decision-firmness.ts +18 -2
- package/src/public/operations/discovery-executors.ts +113 -3
- package/src/public/operations/migration-plan.ts +47 -1
- package/src/public/operations/schema6-check-actions.ts +43 -2
- package/src/public/operations/source-path-dangling.ts +12 -2
- package/src/public/operations/specs/discovery.ts +6 -0
- package/src/public/operations/specs/planning.ts +1 -1
- package/src/public/operations/specs/reporting.ts +6 -4
- package/src/public/operations/specs/semantic.ts +41 -4
- package/src/public/skills/kibi-bootstrap/SKILL.md +3 -2
- package/src/public/skills/kibi-usage/SKILL.md +13 -5
- package/src/public/skills/kibi-usage/resources/workflows.md +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-register-foundation.d.ts","sourceRoot":"","sources":["../src/cli-register-foundation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAezC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"cli-register-foundation.d.ts","sourceRoot":"","sources":["../src/cli-register-foundation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAezC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6JjE"}
|
|
@@ -22,6 +22,7 @@ export function registerFoundationCommands(program) {
|
|
|
22
22
|
.option("--format <format>", "Output format: json|table", "table")
|
|
23
23
|
.option("--apply-safe", "Apply only explicitly approved deterministic migration actions")
|
|
24
24
|
.option("--approved-plan-hash <sha256>", "Exact migration plan hash approved for --apply-safe")
|
|
25
|
+
.option("--backlog", "List every quality and coverage backlog action instead of counts per code")
|
|
25
26
|
.option("--approved-action <id>", "Approve one migration action (repeatable through comma-separated IDs)", (value, previous = []) => [
|
|
26
27
|
...previous,
|
|
27
28
|
...value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiF7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AA8gBD,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,CAAC,SAAS,EAAE,CAAC,CAqBtB;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqBtB"}
|
package/dist/commands/check.js
CHANGED
|
@@ -38,6 +38,7 @@ import { collectStagedKibiDiagnostics, } from "../traceability/staged-diagnostic
|
|
|
38
38
|
import { createStagedEntityIdStyleDiagnostics } from "../traceability/staged-entity-id-style.js";
|
|
39
39
|
import { analyzeStagedFileCoverage, } from "../traceability/staged-file-coverage.js";
|
|
40
40
|
import { classifyKibiImpactEvidence, isBehaviorSourceEdit, parseKibiImpactOverride, } from "../traceability/staged-impact-contract.js";
|
|
41
|
+
import { stagedInventoryDriftViolations } from "../traceability/staged-inventory-drift.js";
|
|
41
42
|
import { assessStagedSymbolsManifest, collectStagedAuthoredSymbolsManifestEvidence, } from "../traceability/staged-symbols-manifest.js";
|
|
42
43
|
import { createManifestLookupSentinelKey, extractSymbolsFromStagedFileAsync, } from "../traceability/symbol-extract.js";
|
|
43
44
|
import { cleanupTempKb, consultOverlay, createOverlayFacts, createTempKb, projectStagedEntities, } from "../traceability/temp-kb.js";
|
|
@@ -471,9 +472,26 @@ export async function checkCommand(options) {
|
|
|
471
472
|
file.disposition = "checked";
|
|
472
473
|
}
|
|
473
474
|
}
|
|
475
|
+
const mergeInherited = snapshot.mergeInherited ?? [];
|
|
476
|
+
const mergeNote = mergeInherited.length > 0
|
|
477
|
+
? `Merge commit: ${mergeInherited.length} staged file(s) are taken unchanged from the merged branch and are not judged here; only what the merge itself changed is checked. Any debt in those files was inherited from that branch.`
|
|
478
|
+
: undefined;
|
|
479
|
+
const renameResolved = snapshot.renameResolved ?? [];
|
|
480
|
+
const renameNote = renameResolved.length > 0
|
|
481
|
+
? `Baseline: HEAD with ${renameResolved.length} staged knowledge rename(s) into .kb/ resolved; renamed files are judged only on what this commit changed in them. Run kibi check for the full report.`
|
|
482
|
+
: undefined;
|
|
483
|
+
const baselineNotes = [mergeNote, renameNote].filter((note) => note !== undefined);
|
|
484
|
+
const printNotedResult = (input) => {
|
|
485
|
+
printStagedResult(baselineNotes.length === 0
|
|
486
|
+
? input
|
|
487
|
+
: {
|
|
488
|
+
...input,
|
|
489
|
+
messages: [...baselineNotes, ...(input.messages ?? [])],
|
|
490
|
+
});
|
|
491
|
+
};
|
|
474
492
|
const printSnapshotResult = (input) => {
|
|
475
493
|
snapshot.assertUnchanged();
|
|
476
|
-
|
|
494
|
+
printNotedResult(input);
|
|
477
495
|
};
|
|
478
496
|
stagedCoverage = analyzeStagedFileCoverage(stagedInventory, snapshot.readGit);
|
|
479
497
|
stagedCoverage.snapshot = {
|
|
@@ -526,7 +544,11 @@ export async function checkCommand(options) {
|
|
|
526
544
|
printSnapshotResult({
|
|
527
545
|
format: options.format,
|
|
528
546
|
coverage: stagedCoverage,
|
|
529
|
-
messages: [
|
|
547
|
+
messages: [
|
|
548
|
+
renameResolved.length > 0
|
|
549
|
+
? "No staged changes beyond the resolved renames."
|
|
550
|
+
: "No staged files found.",
|
|
551
|
+
],
|
|
530
552
|
});
|
|
531
553
|
return { exitCode: 0 };
|
|
532
554
|
}
|
|
@@ -575,6 +597,32 @@ export async function checkCommand(options) {
|
|
|
575
597
|
return { exitCode: options.dryRun ? 0 : 1 };
|
|
576
598
|
}
|
|
577
599
|
}
|
|
600
|
+
const inventoryDrift = stagedInventoryDriftViolations({
|
|
601
|
+
stagedPaths: new Set(markdownFiles.map((file) => file.path)),
|
|
602
|
+
snapshotEntities,
|
|
603
|
+
readBase: (filePath) => {
|
|
604
|
+
try {
|
|
605
|
+
return snapshot
|
|
606
|
+
.readGit(["show", `${snapshot.baseTree}:${filePath}`])
|
|
607
|
+
.toString("utf8");
|
|
608
|
+
}
|
|
609
|
+
catch {
|
|
610
|
+
return null;
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
});
|
|
614
|
+
if (inventoryDrift.length > 0) {
|
|
615
|
+
printSnapshotResult({
|
|
616
|
+
format: options.format,
|
|
617
|
+
coverage: stagedCoverage,
|
|
618
|
+
violations: inventoryDrift,
|
|
619
|
+
messages: [
|
|
620
|
+
`${inventoryDrift.length} staged requirement(s) have a semantic inventory that no longer matches their prose:`,
|
|
621
|
+
...inventoryDrift.map((violation) => ` ${violation.message}`),
|
|
622
|
+
],
|
|
623
|
+
});
|
|
624
|
+
return { exitCode: options.dryRun ? 0 : 1 };
|
|
625
|
+
}
|
|
578
626
|
const snapshotRequirementIds = new Set(snapshotEntities
|
|
579
627
|
.filter((row) => row.entity.type === "req")
|
|
580
628
|
.map((row) => row.entity.id));
|
|
@@ -734,7 +782,7 @@ export async function checkCommand(options) {
|
|
|
734
782
|
}
|
|
735
783
|
// Without changed source symbols the result was historically printed
|
|
736
784
|
// without re-asserting the snapshot; keep that behavior.
|
|
737
|
-
const print = allSymbols.length === 0 ?
|
|
785
|
+
const print = allSymbols.length === 0 ? printNotedResult : printSnapshotResult;
|
|
738
786
|
const passMessage = allSymbols.length === 0
|
|
739
787
|
? "✓ No violations found in staged files."
|
|
740
788
|
: "✓ No violations found in staged symbols.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAqGA,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAGD,wBAAsB,aAAa,CACjC,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAuH/B;AAED,wBAAsB,4BAA4B,CAChD,IAAI,GAAE,MAAM,OAAO,CAAC;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAE,CACT,GACxC,OAAO,CAAC,OAAO,CAAC,CAOlB;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;MAkE3C;AAkGD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGzE;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAepB"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -29,6 +29,8 @@ import { resolveBranchAttachment, resolveReadBranchAttachment, } from "../utils/
|
|
|
29
29
|
import { branchStoreCompilation, inspectBranchStore, storeLockTakeoverReason, uncompiledBranchStoreReason, } from "../utils/branch-store.js";
|
|
30
30
|
import { resolveGitRepository, } from "../utils/git-repository-context.js";
|
|
31
31
|
import { readKbManifestStatus } from "../utils/kb-manifest.js";
|
|
32
|
+
import { MERGE_DRIVER_SETUP, manifestMergeDriverGaps, } from "../utils/merge-driver-setup.js";
|
|
33
|
+
import { LATEST_KB_SCHEMA_VERSION } from "../utils/schema-version.js";
|
|
32
34
|
import { KIBI_HOOK_BEGIN, hasManagedHooks, outdatedManagedHooks, } from "./init-helpers.js";
|
|
33
35
|
import { planLegacyStorageMigration } from "./legacy-storage-migration.js";
|
|
34
36
|
/**
|
|
@@ -89,6 +91,10 @@ export async function doctorCommand(options = {}) {
|
|
|
89
91
|
name: "Kibi-managed hook sections",
|
|
90
92
|
check: checkManagedHookSections,
|
|
91
93
|
},
|
|
94
|
+
{
|
|
95
|
+
name: "Manifest merge driver",
|
|
96
|
+
check: checkManifestMergeDriver,
|
|
97
|
+
},
|
|
92
98
|
{
|
|
93
99
|
name: "Capability plugins",
|
|
94
100
|
check: checkCapabilityPlugins,
|
|
@@ -616,6 +622,17 @@ function checkKbManifest() {
|
|
|
616
622
|
remediation: `Repair .kb/manifest.json: ${status.warning}`,
|
|
617
623
|
};
|
|
618
624
|
}
|
|
625
|
+
// A knowledge base written by an older Kibi keeps reading and checking
|
|
626
|
+
// until migrated, but the current CLI expects its own schema: say so here,
|
|
627
|
+
// where the operator looks first, instead of leaving it to the next
|
|
628
|
+
// failing check. The migration plan below names the actions.
|
|
629
|
+
if (status.manifest.schemaVersion < LATEST_KB_SCHEMA_VERSION) {
|
|
630
|
+
return {
|
|
631
|
+
passed: false,
|
|
632
|
+
message: `schemaVersion ${status.manifest.schemaVersion} (this Kibi expects ${LATEST_KB_SCHEMA_VERSION})`,
|
|
633
|
+
remediation: "Run: kibi migrate (previews the plan), then kibi migrate --yes to apply it, or kibi migrate --apply-safe --approved-plan-hash <planHash> --approved-action <id> for selected actions",
|
|
634
|
+
};
|
|
635
|
+
}
|
|
619
636
|
return {
|
|
620
637
|
passed: true,
|
|
621
638
|
message: `schemaVersion ${status.manifest.schemaVersion}`,
|
|
@@ -671,6 +688,29 @@ function checkGitRepository() {
|
|
|
671
688
|
};
|
|
672
689
|
}
|
|
673
690
|
}
|
|
691
|
+
/**
|
|
692
|
+
* `.kb/symbols.yaml` conflicts on nearly every parallel branch; `kibi
|
|
693
|
+
* merge-driver` resolves them by record id, but only when Git routes the
|
|
694
|
+
* file to it. A warning, not a failure: merges still work without it.
|
|
695
|
+
*/
|
|
696
|
+
// implements REQ-cli-doctor
|
|
697
|
+
function checkManifestMergeDriver() {
|
|
698
|
+
const gaps = manifestMergeDriverGaps(process.cwd());
|
|
699
|
+
if (gaps === null) {
|
|
700
|
+
return {
|
|
701
|
+
passed: true,
|
|
702
|
+
message: "Not needed yet (no git repository or no symbols)",
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
if (gaps.length === 0)
|
|
706
|
+
return { passed: true, message: "Configured" };
|
|
707
|
+
return {
|
|
708
|
+
passed: true,
|
|
709
|
+
warning: true,
|
|
710
|
+
message: `Not configured: ${gaps.join("; ")}. Merges of .kb/symbols.yaml fall back to line conflicts.`,
|
|
711
|
+
remediation: MERGE_DRIVER_SETUP,
|
|
712
|
+
};
|
|
713
|
+
}
|
|
674
714
|
/**
|
|
675
715
|
* The current branch's KB store: it must exist and hold a compilation
|
|
676
716
|
* (journal sequence above 0) when .kb/ has authored sources. Kibi stores are
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare function getCurrentBranch(cwd?: string): Promise<string>;
|
|
2
2
|
export declare function createKbDirectoryStructure(kbDir: string, currentBranch: string): void;
|
|
3
3
|
export declare function createManifestFile(kbDir: string): void;
|
|
4
|
-
|
|
4
|
+
/** Adds the canonical derived entries to .gitignore; true when it changed the file. */
|
|
5
|
+
export declare function updateGitIgnore(cwd: string): boolean;
|
|
5
6
|
export declare function ensureSymbolsManifestFile(cwd: string): void;
|
|
6
7
|
export declare function copySchemaFiles(kbDir: string, schemaSourceDir: string): Promise<void>;
|
|
7
8
|
export declare const KIBI_HOOK_BEGIN = "# BEGIN kibi-managed";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/init-helpers.ts"],"names":[],"mappings":"AA6IA,wBAAsB,gBAAgB,CACpC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,IAAI,CA0BN;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAGtD;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"init-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/init-helpers.ts"],"names":[],"mappings":"AA6IA,wBAAsB,gBAAgB,CACpC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,CAAC,CASjB;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,GACpB,IAAI,CA0BN;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG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createManifestFile(kbDir) {
|
|
|
155
155
|
writeKbManifest(path.dirname(kbDir), defaultKbManifest());
|
|
156
156
|
console.log("✓ Created Kibi lifecycle manifest at .kb/manifest.json");
|
|
157
157
|
}
|
|
158
|
+
/** Adds the canonical derived entries to .gitignore; true when it changed the file. */
|
|
158
159
|
export function updateGitIgnore(cwd) {
|
|
159
160
|
// implements REQ-cli-init-canonical
|
|
160
161
|
const gitignorePath = path.join(cwd, ".gitignore");
|
|
@@ -179,7 +180,9 @@ export function updateGitIgnore(cwd) {
|
|
|
179
180
|
if (updatedContent !== gitignoreContent) {
|
|
180
181
|
writeFileSync(gitignorePath, updatedContent);
|
|
181
182
|
console.log("✓ Configured .gitignore for the canonical .kb/ layout");
|
|
183
|
+
return true;
|
|
182
184
|
}
|
|
185
|
+
return false;
|
|
183
186
|
}
|
|
184
187
|
/** Exact derived-runtime entries owned by current Kibi init/migrate. */
|
|
185
188
|
const CANONICAL_DERIVED_GITIGNORE_ENTRIES = [
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MigrationAction } from "../public/operations/migration-plan.js";
|
|
1
2
|
interface MigrateOptions {
|
|
2
3
|
dryRun?: boolean;
|
|
3
4
|
yes?: boolean;
|
|
@@ -7,16 +8,62 @@ interface MigrateOptions {
|
|
|
7
8
|
approvedActionIds?: string[];
|
|
8
9
|
/** `--approved-action <id>` as the CLI parser spells it; same as approvedActionIds. */
|
|
9
10
|
approvedAction?: string[];
|
|
11
|
+
/** List every quality and coverage backlog action, not only their counts. */
|
|
12
|
+
backlog?: boolean;
|
|
10
13
|
workspaceRoot?: string;
|
|
11
14
|
/** Internal migration-plan executor: create only the canonical baseline manifest. */
|
|
12
15
|
initializeMissingConfig?: boolean;
|
|
13
16
|
}
|
|
17
|
+
export interface MigrationAuditRecord {
|
|
18
|
+
auditVersion: number;
|
|
19
|
+
branch: string;
|
|
20
|
+
manifestPath: string;
|
|
21
|
+
fromVersion: number | null;
|
|
22
|
+
migratedAt: string;
|
|
23
|
+
semanticAdvisorBackfill: "pending" | "completed" | "not_applicable" | null;
|
|
24
|
+
status: "applied";
|
|
25
|
+
symbolGranularityLegacyLinks: number;
|
|
26
|
+
/** Entities carrying origin {kind: migration, ref: 'kibi migrate v5->v6'}. */
|
|
27
|
+
entityOriginBackfill: number;
|
|
28
|
+
/** Superseded requirements this run set to status: closed. */
|
|
29
|
+
supersededRequirementsClosed: number;
|
|
30
|
+
/** Pre-canonical source paths this run pointed at their .kb/ file. */
|
|
31
|
+
sourcePathsRewritten: number;
|
|
32
|
+
/** Authored source values this run removed: they named the entity's own file or nothing. */
|
|
33
|
+
sourcePathsRemoved: number;
|
|
34
|
+
toVersion: number;
|
|
35
|
+
/** The schema warning the KB showed before this run migrated it. */
|
|
36
|
+
preMigrationWarning: string | null;
|
|
37
|
+
steps: readonly string[];
|
|
38
|
+
}
|
|
39
|
+
/** What one applied `kibi migrate --yes` run changed, for plan apply results. */
|
|
40
|
+
export interface MigrationRunSummary {
|
|
41
|
+
/** Workspace-relative path of the audit record this run wrote. */
|
|
42
|
+
auditPath: string;
|
|
43
|
+
audit: MigrationAuditRecord;
|
|
44
|
+
/** Whether this run added the canonical derived entries to .gitignore. */
|
|
45
|
+
gitignoreUpdated: boolean;
|
|
46
|
+
}
|
|
14
47
|
export declare function formatSchemaVersion(rawSchemaVersion: unknown, normalized: number | null): string;
|
|
15
48
|
export declare function warnMigrationRequiredWithoutYes(): {
|
|
16
49
|
exitCode: number;
|
|
17
50
|
};
|
|
18
51
|
export declare function migrateCommand(options?: MigrateOptions): Promise<{
|
|
19
52
|
exitCode: number;
|
|
53
|
+
summary?: MigrationRunSummary;
|
|
20
54
|
}>;
|
|
55
|
+
/**
|
|
56
|
+
* One line naming what an applied migration run changed, read from the audit
|
|
57
|
+
* record it wrote: a count of zero shows a pass that had nothing left to do
|
|
58
|
+
* (for example legacy links an earlier plan action already marked).
|
|
59
|
+
*/
|
|
60
|
+
export declare function describeMigrationRun(summary: MigrationRunSummary): string;
|
|
61
|
+
/**
|
|
62
|
+
* Review findings `kibi check` and `kb_status` report at any schema version:
|
|
63
|
+
* quality and coverage work, not steps of the migration. A plan lists them
|
|
64
|
+
* so one approval flow covers both, but they never make a migration
|
|
65
|
+
* incomplete.
|
|
66
|
+
*/
|
|
67
|
+
export declare function isBacklogAction(action: Pick<MigrationAction, "code">): boolean;
|
|
21
68
|
export {};
|
|
22
69
|
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/commands/migrate.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,wCAAwC,CAAC;AAwBhD,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,uFAAuF;IACvF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB,EAAE,SAAS,GAAG,WAAW,GAAG,gBAAgB,GAAG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chAttachment } from "../utils/branch-resolver.js";
|
|
26
26
|
import { defaultKbManifest, readKbManifest, readKbManifestStatus, writeKbManifest, } from "../utils/kb-manifest.js";
|
|
27
27
|
import { CANONICAL_ENTITY_PATHS } from "../utils/kb-paths.js";
|
|
28
|
+
import { MERGE_DRIVER_SETUP, manifestMergeDriverGaps, } from "../utils/merge-driver-setup.js";
|
|
28
29
|
import { LATEST_KB_SCHEMA_VERSION, getSchemaVersionStatus, normalizeSchemaVersion, } from "../utils/schema-version.js";
|
|
29
30
|
import { updateGitIgnore } from "./init-helpers.js";
|
|
30
31
|
import { applyLegacyStorageMigration, planLegacyStorageMigration, } from "./legacy-storage-migration.js";
|
|
@@ -149,7 +150,7 @@ function buildMigrationAuditRecord(args) {
|
|
|
149
150
|
sourcePathsRewritten: args.sourcePathsRewritten,
|
|
150
151
|
sourcePathsRemoved: args.sourcePathsRemoved,
|
|
151
152
|
toVersion: LATEST_KB_SCHEMA_VERSION,
|
|
152
|
-
|
|
153
|
+
preMigrationWarning: args.preMigrationWarning,
|
|
153
154
|
steps: args.steps,
|
|
154
155
|
};
|
|
155
156
|
}
|
|
@@ -254,7 +255,7 @@ function repairLifecycleFindings(cwd, dryRun) {
|
|
|
254
255
|
console.log(`dry run: would close ${closed} superseded requirement(s): ${supersession.closures.map((closure) => closure.id).join(", ")}.`);
|
|
255
256
|
}
|
|
256
257
|
if (rewritten > 0) {
|
|
257
|
-
console.log(`dry run: would point ${rewritten} pre-canonical source path(s) at their .kb/ files.`);
|
|
258
|
+
console.log(`dry run: would point ${rewritten} pre-canonical source or text_ref path(s) at their .kb/ files.`);
|
|
258
259
|
}
|
|
259
260
|
if (removed > 0) {
|
|
260
261
|
console.log(`dry run: would remove ${removed} redundant or dead source field(s); ${REMOVED_SOURCES_NOTE}.`);
|
|
@@ -274,7 +275,7 @@ function repairLifecycleFindings(cwd, dryRun) {
|
|
|
274
275
|
removed = repairs.removed.length;
|
|
275
276
|
unrepaired = [...repairs.skipped];
|
|
276
277
|
if (rewritten > 0) {
|
|
277
|
-
console.log(`Pointed ${rewritten} pre-canonical source path(s) at their .kb/ files.`);
|
|
278
|
+
console.log(`Pointed ${rewritten} pre-canonical source or text_ref path(s) at their .kb/ files.`);
|
|
278
279
|
}
|
|
279
280
|
if (removed > 0) {
|
|
280
281
|
console.log(`Removed ${removed} redundant or dead source field(s); ${REMOVED_SOURCES_NOTE}.`);
|
|
@@ -284,7 +285,7 @@ function repairLifecycleFindings(cwd, dryRun) {
|
|
|
284
285
|
printWarning(`Requirements ${cycle.members.join(", ")} supersede each other; decide which one is current, remove the supersedes link that points at it, and close the others.`);
|
|
285
286
|
}
|
|
286
287
|
for (const skip of unrepaired) {
|
|
287
|
-
printWarning(`
|
|
288
|
+
printWarning(`Path field of ${skip.file} not repaired: ${skip.reason}; a person edits it by hand (kibi migrate --format json lists it as review_source_path_dangling).`);
|
|
288
289
|
}
|
|
289
290
|
return {
|
|
290
291
|
closed,
|
|
@@ -534,7 +535,7 @@ export async function migrateCommand(options = {}) {
|
|
|
534
535
|
});
|
|
535
536
|
if (supersedesUnexplained.length > 0)
|
|
536
537
|
console.log(`Acknowledged ${supersedesUnexplained.length} supersede(s) recorded without a 'Why this changed' section; new supersedes must explain themselves.`);
|
|
537
|
-
|
|
538
|
+
const auditRecord = buildMigrationAuditRecord({
|
|
538
539
|
branch,
|
|
539
540
|
manifestPath: KB_MANIFEST_RELATIVE,
|
|
540
541
|
fromVersion: configStatus.currentVersion,
|
|
@@ -545,9 +546,10 @@ export async function migrateCommand(options = {}) {
|
|
|
545
546
|
supersededRequirementsClosed: lifecycle.closed,
|
|
546
547
|
sourcePathsRewritten: lifecycle.rewritten,
|
|
547
548
|
sourcePathsRemoved: lifecycle.removed,
|
|
548
|
-
|
|
549
|
+
preMigrationWarning: migrationWarning,
|
|
549
550
|
steps: migrationSteps.map((step) => step.id),
|
|
550
|
-
})
|
|
551
|
+
});
|
|
552
|
+
writeJsonAtomically(auditPath, auditRecord);
|
|
551
553
|
console.log(`Migrated the KB to schemaVersion ${LATEST_KB_SCHEMA_VERSION} on the canonical .kb/ layout (was ${fromVersionLabel}).`);
|
|
552
554
|
if (semanticAdvisorBackfill === "pending") {
|
|
553
555
|
console.log(`Marked semantic advisor backfill as pending in ${KB_MANIFEST_RELATIVE}.`);
|
|
@@ -560,8 +562,29 @@ export async function migrateCommand(options = {}) {
|
|
|
560
562
|
}
|
|
561
563
|
console.log(`Wrote migration audit metadata to ${toRelativePath(cwd, auditPath)}.`);
|
|
562
564
|
console.log("Migration complete. Future 'kibi migrate' runs will be a no-op.");
|
|
563
|
-
|
|
564
|
-
|
|
565
|
+
const mergeDriverGaps = manifestMergeDriverGaps(cwd);
|
|
566
|
+
if (mergeDriverGaps !== null && mergeDriverGaps.length > 0) {
|
|
567
|
+
console.log(`Tip: kibi merge-driver resolves .kb/symbols.yaml merges by record id, but it is not wired up (${mergeDriverGaps.join("; ")}). ${MERGE_DRIVER_SETUP}`);
|
|
568
|
+
}
|
|
569
|
+
const gitignoreUpdated = updateGitIgnore(cwd);
|
|
570
|
+
return {
|
|
571
|
+
exitCode: 0,
|
|
572
|
+
summary: {
|
|
573
|
+
auditPath: toRelativePath(cwd, auditPath),
|
|
574
|
+
audit: auditRecord,
|
|
575
|
+
gitignoreUpdated,
|
|
576
|
+
},
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* One line naming what an applied migration run changed, read from the audit
|
|
581
|
+
* record it wrote: a count of zero shows a pass that had nothing left to do
|
|
582
|
+
* (for example legacy links an earlier plan action already marked).
|
|
583
|
+
*/
|
|
584
|
+
// implements REQ-agent-guided-migration-orchestration, REQ-cli-schema-migration
|
|
585
|
+
export function describeMigrationRun(summary) {
|
|
586
|
+
const { audit } = summary;
|
|
587
|
+
return `Migrated schema ${audit.fromVersion ?? "none"} -> ${audit.toVersion} (audit ${summary.auditPath}): legacy-link marks ${audit.symbolGranularityLegacyLinks}, origin backfill ${audit.entityOriginBackfill}, superseded requirements closed ${audit.supersededRequirementsClosed}, source paths rewritten ${audit.sourcePathsRewritten}, source paths removed ${audit.sourcePathsRemoved}; .gitignore ${summary.gitignoreUpdated ? "updated" : "unchanged"}.`;
|
|
565
588
|
}
|
|
566
589
|
const KB_MANIFEST_RELATIVE = ".kb/manifest.json";
|
|
567
590
|
// implements REQ-agent-guided-migration-orchestration, REQ-cli-schema-migration
|
|
@@ -824,12 +847,56 @@ async function migratePlanCommand(options) {
|
|
|
824
847
|
console.log(JSON.stringify(plan, null, 2));
|
|
825
848
|
}
|
|
826
849
|
else {
|
|
827
|
-
|
|
828
|
-
console.log(`Status: ${plan.status}; actions: ${plan.summary.actionCount}; automatic-ready: ${plan.actions.filter((action) => action.state === "ready" && action.autoApplicable).length}`);
|
|
829
|
-
for (const action of plan.actions) {
|
|
830
|
-
console.log(`- ${action.state} ${action.safety} ${action.code}: ${action.id}`);
|
|
831
|
-
}
|
|
832
|
-
console.log("Use --format json for structured actions, or --apply-safe with the approved plan hash.");
|
|
850
|
+
printPlanText(plan, options.backlog === true);
|
|
833
851
|
}
|
|
834
852
|
return { exitCode: 0 };
|
|
835
853
|
}
|
|
854
|
+
/**
|
|
855
|
+
* Review findings `kibi check` and `kb_status` report at any schema version:
|
|
856
|
+
* quality and coverage work, not steps of the migration. A plan lists them
|
|
857
|
+
* so one approval flow covers both, but they never make a migration
|
|
858
|
+
* incomplete.
|
|
859
|
+
*/
|
|
860
|
+
// implements REQ-cli-schema-migration
|
|
861
|
+
export function isBacklogAction(action) {
|
|
862
|
+
return (action.code.startsWith("quality_") ||
|
|
863
|
+
action.code.startsWith("coverage_") ||
|
|
864
|
+
(action.code.startsWith("review_") &&
|
|
865
|
+
!MIGRATION_REVIEW_CODES.has(action.code)));
|
|
866
|
+
}
|
|
867
|
+
/** Review actions that belong to the schema or storage migration itself. */
|
|
868
|
+
const MIGRATION_REVIEW_CODES = new Set([
|
|
869
|
+
"review_source_path_dangling",
|
|
870
|
+
"review_supersession_cycle",
|
|
871
|
+
]);
|
|
872
|
+
function printPlanText(plan, listBacklog) {
|
|
873
|
+
const migration = plan.actions.filter((action) => !isBacklogAction(action));
|
|
874
|
+
const backlog = plan.actions.filter(isBacklogAction);
|
|
875
|
+
const automaticReady = migration.filter((action) => action.state === "ready" && action.autoApplicable).length;
|
|
876
|
+
console.log(`Migration plan ${plan.planHash}`);
|
|
877
|
+
console.log(migration.length === 0
|
|
878
|
+
? "Migration: complete; no migration actions remain."
|
|
879
|
+
: `Migration: ${migration.length} action(s); automatic-ready: ${automaticReady}`);
|
|
880
|
+
for (const action of migration) {
|
|
881
|
+
console.log(`- ${action.state} ${action.safety} ${action.code}: ${action.id}`);
|
|
882
|
+
}
|
|
883
|
+
if (backlog.length > 0) {
|
|
884
|
+
console.log(`Quality backlog (not part of the migration): ${backlog.length} review item(s) that kibi check and kb_status also report.`);
|
|
885
|
+
if (listBacklog) {
|
|
886
|
+
for (const action of backlog) {
|
|
887
|
+
console.log(`- ${action.state} ${action.safety} ${action.code}: ${action.id}`);
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
else {
|
|
891
|
+
const counts = new Map();
|
|
892
|
+
for (const action of backlog) {
|
|
893
|
+
counts.set(action.code, (counts.get(action.code) ?? 0) + 1);
|
|
894
|
+
}
|
|
895
|
+
for (const [code, count] of [...counts].sort(([leftCode, left], [rightCode, right]) => right - left || leftCode.localeCompare(rightCode))) {
|
|
896
|
+
console.log(` ${count} ${code}`);
|
|
897
|
+
}
|
|
898
|
+
console.log(" List each item with --backlog.");
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
console.log(`Plan status: ${plan.status} (covers both sections). Use --format json for structured actions, or --apply-safe with the approved plan hash.`);
|
|
902
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAA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EACzB,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,IAAI,CAIN;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAMP;AAED,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,UAAU,EAAE,EACzB,oBAAoB,EAAE,OAAO,EAC7B,iBAAiB,EAAE,MAAM,EACzB,WAAW,EAAE,MAAM,GAClB,IAAI,CAUN;AAGD,wBAAsB,WAAW,CAC/B,OAAO,GAAE;IACP,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,2EAA2E;IAC3E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;CACZ,EACN,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,UAAU,CAAC,CA4rCrB;AAED,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/commands/sync.js
CHANGED
|
@@ -719,6 +719,9 @@ export async function syncCommand(options = {}, runtime = {}) {
|
|
|
719
719
|
// implements REQ-kibi-proposition-complete-ingestion, REQ-cli-schema-migration
|
|
720
720
|
// Every drifted inventory is reported in one run, not one per sync attempt.
|
|
721
721
|
const inventoryFailures = [];
|
|
722
|
+
// Requirements with no inventory at all: kibi migrate re-derives only an
|
|
723
|
+
// inventory a requirement already states, so they need the advisor.
|
|
724
|
+
const uninventoried = [];
|
|
722
725
|
for (const result of extractedResults) {
|
|
723
726
|
if (result.entity.type !== "req")
|
|
724
727
|
continue;
|
|
@@ -743,6 +746,8 @@ export async function syncCommand(options = {}, runtime = {}) {
|
|
|
743
746
|
advertisedContract;
|
|
744
747
|
if (enforceBoundary && boundary.errors.length > 0) {
|
|
745
748
|
inventoryFailures.push(`${key}: proposition-complete ingestion failed: ${boundary.errors.join("; ")}.`);
|
|
749
|
+
if (!advertisedContract)
|
|
750
|
+
uninventoried.push(result.entity.id);
|
|
746
751
|
continue;
|
|
747
752
|
}
|
|
748
753
|
nextSemanticHashes[key] = boundary.sourceHash;
|
|
@@ -752,7 +757,16 @@ export async function syncCommand(options = {}, runtime = {}) {
|
|
|
752
757
|
throw new SyncError([
|
|
753
758
|
`${inventoryFailures.length} requirement(s) failed proposition-complete ingestion:`,
|
|
754
759
|
...inventoryFailures.map((failure) => ` ${failure}`),
|
|
755
|
-
|
|
760
|
+
...(uninventoried.length > 0
|
|
761
|
+
? [
|
|
762
|
+
`${uninventoried.join(", ")} state(s) no inventory, which 'kibi migrate' does not derive: for each, run kb_model mode analyze (CLI: semantic-advisor) with the requirement's id and its complete semantic_text, then write the returned inventory contract into the requirement (kb_upsert with semantic_inventory, semantic_inventory_version, semantic_source_field, semantic_source_hash and logic_claims), or retire it through a superseding requirement.`,
|
|
763
|
+
]
|
|
764
|
+
: []),
|
|
765
|
+
...(uninventoried.length < inventoryFailures.length
|
|
766
|
+
? [
|
|
767
|
+
"Run 'kibi migrate' to re-derive inventories that drifted with the semantic advisor (it lists any that need a manual fix), or run kb_model mode analyze with the requirement's id and complete prose and preserve its inventory contract.",
|
|
768
|
+
]
|
|
769
|
+
: []),
|
|
756
770
|
].join("\n"));
|
|
757
771
|
}
|
|
758
772
|
// Collect INVALID_AUTHORING diagnostics
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/extractors/markdown.ts"],"names":[],"mappings":"AAsBA,OAAO,EAEL,KAAK,QAAQ,EAGd,MAAM,yBAAyB,CA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