@kaddo/cli 3.123.0 → 3.124.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/dist/admin-dist/assets/{architectureDiagram-3BPJPVTR-D-tiNfDq.js → architectureDiagram-3BPJPVTR-Bf-HvJ1Z.js} +1 -1
- package/dist/admin-dist/assets/{chunk-727SXJPM-B59jg2H7.js → chunk-727SXJPM-ClhePGXw.js} +1 -1
- package/dist/admin-dist/assets/{chunk-AQP2D5EJ-CoipwQHi.js → chunk-AQP2D5EJ-6XNz6ELl.js} +1 -1
- package/dist/admin-dist/assets/{classDiagram-v2-Q7XG4LA2-CX-XkMPp.js → classDiagram-4FO5ZUOK-Dak_aejZ.js} +1 -1
- package/dist/admin-dist/assets/{classDiagram-4FO5ZUOK-CX-XkMPp.js → classDiagram-v2-Q7XG4LA2-Dak_aejZ.js} +1 -1
- package/dist/admin-dist/assets/{dagre-BM42HDAG-C-6yutPn.js → dagre-BM42HDAG-CzGfT3A1.js} +1 -1
- package/dist/admin-dist/assets/{diagram-2AECGRRQ-B7XRO7W5.js → diagram-2AECGRRQ-CTOSLKXV.js} +1 -1
- package/dist/admin-dist/assets/{diagram-5GNKFQAL-BCgKGhuf.js → diagram-5GNKFQAL-DtrHLRNL.js} +1 -1
- package/dist/admin-dist/assets/{diagram-LMA3HP47-BGdTRFSD.js → diagram-LMA3HP47-XgeGDWDX.js} +1 -1
- package/dist/admin-dist/assets/{diagram-OG6HWLK6-C15xWvkg.js → diagram-OG6HWLK6-Ct81U7Cu.js} +1 -1
- package/dist/admin-dist/assets/{erDiagram-TEJ5UH35-C29eQoKn.js → erDiagram-TEJ5UH35-BQKfuN9V.js} +1 -1
- package/dist/admin-dist/assets/{flowDiagram-I6XJVG4X-BfX7uxcj.js → flowDiagram-I6XJVG4X-duNCHH8m.js} +1 -1
- package/dist/admin-dist/assets/{ganttDiagram-6RSMTGT7-BfQzmWDA.js → ganttDiagram-6RSMTGT7-CdX3ioQS.js} +1 -1
- package/dist/admin-dist/assets/index-Bht5nnnB.js +92 -0
- package/dist/admin-dist/assets/index-CS-lPjXU.css +2 -0
- package/dist/admin-dist/assets/{infoDiagram-5YYISTIA-BWn0gytG.js → infoDiagram-5YYISTIA-BhmF-Wrb.js} +1 -1
- package/dist/admin-dist/assets/{ishikawaDiagram-YF4QCWOH-DzcrHEGb.js → ishikawaDiagram-YF4QCWOH-R0-zDUcd.js} +1 -1
- package/dist/admin-dist/assets/{kanban-definition-UN3LZRKU-iqGF_-mR.js → kanban-definition-UN3LZRKU-DxCs8FgR.js} +1 -1
- package/dist/admin-dist/assets/{linear-Bs7hE1IM.js → linear-BcBNcPq4.js} +1 -1
- package/dist/admin-dist/assets/{mindmap-definition-RKZ34NQL-C7IJ3hI4.js → mindmap-definition-RKZ34NQL-CGRPxnXA.js} +1 -1
- package/dist/admin-dist/assets/{pieDiagram-4H26LBE5-CamMpAtB.js → pieDiagram-4H26LBE5-CzRqbJlG.js} +1 -1
- package/dist/admin-dist/assets/{quadrantDiagram-W4KKPZXB-D4GNDylK.js → quadrantDiagram-W4KKPZXB-D3MvUaaK.js} +1 -1
- package/dist/admin-dist/assets/{requirementDiagram-4Y6WPE33-BzsJXc5y.js → requirementDiagram-4Y6WPE33-LeXKuaNM.js} +1 -1
- package/dist/admin-dist/assets/{sequenceDiagram-3UESZ5HK-DDjBe2ss.js → sequenceDiagram-3UESZ5HK-CisjzAeU.js} +1 -1
- package/dist/admin-dist/assets/{stateDiagram-AJRCARHV-CsC2M--m.js → stateDiagram-AJRCARHV-Ckz_YV-g.js} +1 -1
- package/dist/admin-dist/assets/{stateDiagram-v2-BHNVJYJU-CL8J-lT7.js → stateDiagram-v2-BHNVJYJU-BQL9PwTU.js} +1 -1
- package/dist/admin-dist/assets/{timeline-definition-PNZ67QCA-Isk6ZjRq.js → timeline-definition-PNZ67QCA-DdT4yCQE.js} +1 -1
- package/dist/admin-dist/assets/{vennDiagram-CIIHVFJN-CEV1XktJ.js → vennDiagram-CIIHVFJN-DdPmvnd8.js} +1 -1
- package/dist/admin-dist/assets/{wardleyDiagram-YWT4CUSO-DTbBWA-K.js → wardleyDiagram-YWT4CUSO-Bzactu5G.js} +1 -1
- package/dist/admin-dist/assets/{xychartDiagram-2RQKCTM6-CnOxqQ-o.js → xychartDiagram-2RQKCTM6-AHL4ky3j.js} +1 -1
- package/dist/admin-dist/banner.png +0 -0
- package/dist/admin-dist/blog/cycle/cover.webp +0 -0
- package/dist/admin-dist/blog/cycle/dogfooding.webp +0 -0
- package/dist/admin-dist/blog/cycle/handoff.webp +0 -0
- package/dist/admin-dist/blog/cycle/learning.webp +0 -0
- package/dist/admin-dist/blog/cycle/problem.webp +0 -0
- package/dist/admin-dist/blog/cycle/refinement.webp +0 -0
- package/dist/admin-dist/blog/cycle/verification.webp +0 -0
- package/dist/admin-dist/blog/kaddo-graphify/code-discovery.webp +0 -0
- package/dist/admin-dist/blog/kaddo-graphify/cover.webp +0 -0
- package/dist/admin-dist/blog/kaddo-graphify/kaddo-core.webp +0 -0
- package/dist/admin-dist/blog/kaddo-graphify/knowledge-lifecycle.webp +0 -0
- package/dist/admin-dist/blog/kaddo-graphify/payment-change.webp +0 -0
- package/dist/admin-dist/blog/kiro-power/cover.webp +0 -0
- package/dist/admin-dist/blog/kiro-power/human-loop.webp +0 -0
- package/dist/admin-dist/blog/kiro-power/two-levels.webp +0 -0
- package/dist/admin-dist/blog/knowledge-diagrams/business-refinement.png +0 -0
- package/dist/admin-dist/blog/knowledge-diagrams/business.png +0 -0
- package/dist/admin-dist/blog/knowledge-diagrams/cover.webp +0 -0
- package/dist/admin-dist/blog/knowledge-diagrams/product.png +0 -0
- package/dist/admin-dist/blog/knowledge-diagrams/tech-architecture.png +0 -0
- package/dist/admin-dist/blog/knowledge-diagrams/tech-sequence.png +0 -0
- package/dist/admin-dist/blog/legacy-ai/cover.webp +0 -0
- package/dist/admin-dist/blog/legacy-ai/current-state.webp +0 -0
- package/dist/admin-dist/blog/legacy-ai/learning-loop.webp +0 -0
- package/dist/admin-dist/blog/legacy-ai/legacy-definition.webp +0 -0
- package/dist/admin-dist/blog/legacy-ai/modernization.webp +0 -0
- package/dist/admin-dist/blog/legacy-ai/uncertainty.webp +0 -0
- package/dist/admin-dist/blog/poc-mode/cover.webp +0 -0
- package/dist/admin-dist/blog/poc-mode/credit-architecture.webp +0 -0
- package/dist/admin-dist/blog/poc-mode/decision.webp +0 -0
- package/dist/admin-dist/blog/poc-mode/final-report.webp +0 -0
- package/dist/admin-dist/blog/poc-mode/hypothesis.webp +0 -0
- package/dist/admin-dist/blog/poc-mode/minimum-context.webp +0 -0
- package/dist/admin-dist/blog/poc-mode/poc-route.webp +0 -0
- package/dist/admin-dist/blog/project-resources/cover.webp +0 -0
- package/dist/admin-dist/blog/project-resources/exploration.webp +0 -0
- package/dist/admin-dist/blog/project-resources/external-context.webp +0 -0
- package/dist/admin-dist/blog/project-resources/knowledge-and-access.webp +0 -0
- package/dist/admin-dist/blog/project-resources/living-model.webp +0 -0
- package/dist/admin-dist/blog/project-resources/multirepo.webp +0 -0
- package/dist/admin-dist/blog/project-resources/refinement.webp +0 -0
- package/dist/admin-dist/blog/project-resources/relationships.webp +0 -0
- package/dist/admin-dist/blog/project-resources/resources-vs-tech.webp +0 -0
- package/dist/admin-dist/blog/project-types/cover.webp +0 -0
- package/dist/admin-dist/blog/task-knowledge/context-grows.webp +0 -0
- package/dist/admin-dist/blog/task-knowledge/cover.webp +0 -0
- package/dist/admin-dist/blog/task-knowledge/kaddo-approach.webp +0 -0
- package/dist/admin-dist/blog/task-knowledge/more-context.webp +0 -0
- package/dist/admin-dist/blog/task-knowledge/multirepo.webp +0 -0
- package/dist/admin-dist/blog/task-knowledge/project-memory.webp +0 -0
- package/dist/admin-dist/blog/task-knowledge/team-size.webp +0 -0
- package/dist/admin-dist/blog/task-knowledge/work-item.webp +0 -0
- package/dist/admin-dist/brand/_ref-brand-kit.webp +0 -0
- package/dist/admin-dist/brand/_ref-visual-direction.webp +0 -0
- package/dist/admin-dist/brand/iso-code-to-delivery.webp +0 -0
- package/dist/admin-dist/brand/iso-evidence.webp +0 -0
- package/dist/admin-dist/brand/iso-knowledge-context.webp +0 -0
- package/dist/admin-dist/brand/iso-knowledge-graph.webp +0 -0
- package/dist/admin-dist/brand/iso-resources.webp +0 -0
- package/dist/admin-dist/contribution-cycle.webp +0 -0
- package/dist/admin-dist/favicon.png +0 -0
- package/dist/admin-dist/index.html +14 -4
- package/dist/admin-dist/kaddo-power-icon.png +0 -0
- package/dist/admin-dist/mermaid-zoom.js +148 -0
- package/dist/admin-dist/visual-explorer/README.md +21 -0
- package/dist/admin-dist/visual-explorer/compare-bmad.webp +0 -0
- package/dist/admin-dist/visual-explorer/compare-gentle-ai.webp +0 -0
- package/dist/admin-dist/visual-explorer/compare-graphify.webp +0 -0
- package/dist/admin-dist/visual-explorer/deprecation.webp +0 -0
- package/dist/admin-dist/visual-explorer/drift-report.webp +0 -0
- package/dist/admin-dist/visual-explorer/guard.webp +0 -0
- package/dist/admin-dist/visual-explorer/kaddo-admin.webp +0 -0
- package/dist/admin-dist/visual-explorer/knowledge-capsules.webp +0 -0
- package/dist/admin-dist/visual-explorer/knowledge-drift.webp +0 -0
- package/dist/admin-dist/visual-explorer/knowledge-graph.webp +0 -0
- package/dist/admin-dist/visual-explorer/knowledge-levels.webp +0 -0
- package/dist/admin-dist/visual-explorer/lifecycle-v2.webp +0 -0
- package/dist/admin-dist/visual-explorer/performance-report.webp +0 -0
- package/dist/admin-dist/visual-explorer/poc-mode.webp +0 -0
- package/dist/admin-dist/visual-explorer/pre-ai-project.webp +0 -0
- package/dist/admin-dist/visual-explorer/project-legacy.webp +0 -0
- package/dist/admin-dist/visual-explorer/project-new.webp +0 -0
- package/dist/admin-dist/visual-explorer/project-resources.webp +0 -0
- package/dist/admin-dist/visual-explorer/savings-report.webp +0 -0
- package/dist/admin-dist/visual-explorer/system-topology.webp +0 -0
- package/dist/admin-dist/visual-explorer/work-item-types.webp +0 -0
- package/dist/admin-dist/visual-explorer/work-items.webp +0 -0
- package/dist/index.js +117 -17
- package/package.json +1 -1
- package/dist/admin-dist/assets/index-BeBpoOiK.js +0 -92
- package/dist/admin-dist/assets/index-DNkI-1xG.css +0 -2
- package/dist/admin-dist/favicon.svg +0 -1
- package/dist/admin-dist/icons.svg +0 -24
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -21846,6 +21846,41 @@ async function runIntegrationsImport(dir, id, externalId, opts) {
|
|
|
21846
21846
|
|
|
21847
21847
|
// src/core/impact-report.ts
|
|
21848
21848
|
import matter19 from "gray-matter";
|
|
21849
|
+
|
|
21850
|
+
// src/core/reporting-evidence.ts
|
|
21851
|
+
function reportingProjectContext(dir) {
|
|
21852
|
+
const config = loadConfig(dir);
|
|
21853
|
+
if (!config) return { state: "unknown", mode: "unknown", repository_structure: "unknown" };
|
|
21854
|
+
return {
|
|
21855
|
+
state: config.project.state,
|
|
21856
|
+
mode: projectMode(config),
|
|
21857
|
+
repository_structure: config.project.structure
|
|
21858
|
+
};
|
|
21859
|
+
}
|
|
21860
|
+
function knowledgeLayerEvidence(context, layer2, present) {
|
|
21861
|
+
const baseline = context.mode === "poc" ? ["Tech", "Delivery"] : ["Business", "Product", "Tech", "Delivery"];
|
|
21862
|
+
if (!baseline.includes(layer2)) {
|
|
21863
|
+
return { id: `knowledge.${layer2.toLowerCase()}`, label: `${layer2} knowledge`, classification: "not_applicable", reason: "This layer is outside the configured POC baseline." };
|
|
21864
|
+
}
|
|
21865
|
+
return {
|
|
21866
|
+
id: `knowledge.${layer2.toLowerCase()}`,
|
|
21867
|
+
label: `${layer2} knowledge`,
|
|
21868
|
+
classification: present ? "observed" : "unknown",
|
|
21869
|
+
reason: present ? "A structured knowledge artifact is present." : "No structured artifact was found; absence is not proof that knowledge does not exist."
|
|
21870
|
+
};
|
|
21871
|
+
}
|
|
21872
|
+
function deliveryCapabilityEvidence(dir, context) {
|
|
21873
|
+
const initiatives = discoverInitiatives(dir);
|
|
21874
|
+
const resources = getResources(dir);
|
|
21875
|
+
const modules = loadMappedModules(dir);
|
|
21876
|
+
return [
|
|
21877
|
+
{ id: "initiatives", label: "Initiatives", classification: initiatives.length ? "observed" : "not_applicable", reason: initiatives.length ? `${initiatives.length} optional Initiative artifact(s) were discovered.` : "Initiatives are optional and no Initiative artifacts were discovered." },
|
|
21878
|
+
{ id: "resources", label: "Project Resources", classification: resources.length ? "observed" : "not_applicable", reason: resources.length ? `${resources.length} Project Resource artifact(s) were discovered.` : "Resources are optional and no Resource artifacts were discovered." },
|
|
21879
|
+
{ id: "multirepo", label: "Multirepo mapping", classification: context.repository_structure === "multirepo" ? modules.length ? "observed" : "unknown" : "not_applicable", reason: context.repository_structure === "multirepo" ? modules.length ? `${modules.length} module mapping(s) were discovered.` : "Project is multirepo but no module mappings were found." : "The project is configured as a monorepo." }
|
|
21880
|
+
];
|
|
21881
|
+
}
|
|
21882
|
+
|
|
21883
|
+
// src/core/impact-report.ts
|
|
21849
21884
|
function isBroadGlob(glob) {
|
|
21850
21885
|
if (!glob.endsWith("/**")) return false;
|
|
21851
21886
|
const prefix = glob.slice(0, -3);
|
|
@@ -21864,8 +21899,10 @@ function buildImpactReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
|
21864
21899
|
const resolvedScope = opts.scope ?? "all";
|
|
21865
21900
|
const scopeSource = opts.scopeSource ?? (opts.scope ? "explicit" : "default");
|
|
21866
21901
|
const exp = buildProjectExplanation(dir);
|
|
21902
|
+
const projectContext = reportingProjectContext(dir);
|
|
21867
21903
|
const wis = discoverWorkItems(dir);
|
|
21868
21904
|
const total = wis.length;
|
|
21905
|
+
const verifiedWorkItems = wis.filter((wi) => wi.validationStatus === "passed").length;
|
|
21869
21906
|
let withOwnership = 0;
|
|
21870
21907
|
let withSource = 0;
|
|
21871
21908
|
let withInitiative = 0;
|
|
@@ -21957,7 +21994,8 @@ function buildImpactReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
|
21957
21994
|
const knowledge_coverage = [
|
|
21958
21995
|
{ label: "Work Items with ownership", have: withOwnership, total },
|
|
21959
21996
|
{ label: "Work Items with source", have: withSource, total },
|
|
21960
|
-
|
|
21997
|
+
// Initiatives are optional: report their observed use, but do not use absence as a gap or score input.
|
|
21998
|
+
{ label: "Work Items using optional initiatives", have: withInitiative, total },
|
|
21961
21999
|
{ label: "Work Items with acceptance criteria", have: withAcceptance, total },
|
|
21962
22000
|
{ label: "Work Items with Definition of Done", have: withDoD, total },
|
|
21963
22001
|
{ label: "Work Items with knowledge level", have: withLevel, total }
|
|
@@ -22011,7 +22049,8 @@ function buildImpactReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
|
22011
22049
|
let score_breakdown = null;
|
|
22012
22050
|
if (total > 0) {
|
|
22013
22051
|
const healthPts = [layerStatus("Business"), layerStatus("Product"), layerStatus("Tech"), layerStatus("Delivery")].filter((s) => s !== "Missing").length / 4 * 20;
|
|
22014
|
-
const
|
|
22052
|
+
const applicableCoverage = knowledge_coverage.filter((c) => c.label !== "Work Items using optional initiatives");
|
|
22053
|
+
const covAvg = applicableCoverage.reduce((a, c) => a + coverageRatio(c.have), 0) / applicableCoverage.length;
|
|
22015
22054
|
const coveragePts = covAvg * 20;
|
|
22016
22055
|
const ownPts = coverageRatio(withOwnership) * 15;
|
|
22017
22056
|
const traceBlend = (exp.roadmap.candidates > 0 ? exp.roadmap.materialized / exp.roadmap.candidates : 1) * 0.5 + coverageRatio(withOwnership) * 0.5;
|
|
@@ -22042,7 +22081,6 @@ function buildImpactReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
|
22042
22081
|
for (const a of [
|
|
22043
22082
|
groupedAction(gaps.missing_code_ownership, "Add `code:` ownership to"),
|
|
22044
22083
|
groupedAction(gaps.missing_source, "Add `source`/`source_id` to"),
|
|
22045
|
-
groupedAction(gaps.missing_initiative, "Add an `initiative` to"),
|
|
22046
22084
|
groupedAction(gaps.missing_acceptance_criteria, "Add Acceptance Criteria to"),
|
|
22047
22085
|
groupedAction(gaps.missing_definition_of_done, "Add a Definition of Done to"),
|
|
22048
22086
|
groupedAction(gaps.missing_validation, "Add a validation (How to test it) section to")
|
|
@@ -22061,6 +22099,14 @@ function buildImpactReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
|
22061
22099
|
return {
|
|
22062
22100
|
generated_at: now.toISOString(),
|
|
22063
22101
|
project: exp.project.name,
|
|
22102
|
+
project_context: projectContext,
|
|
22103
|
+
evidence: [
|
|
22104
|
+
...["Business", "Product", "Tech", "Delivery"].map((layer2) => knowledgeLayerEvidence(projectContext, layer2, layerStatus(layer2) !== "Missing")),
|
|
22105
|
+
{ id: "work-items.lifecycle", label: "Work Item lifecycle", classification: total > 0 ? "observed" : "unknown", reason: total > 0 ? `${total} Work Item artifact(s) were discovered.` : "No Work Item artifacts were discovered." },
|
|
22106
|
+
{ id: "delivery.verification", label: "Verified delivery outcomes", classification: verifiedWorkItems > 0 ? "observed" : "unknown", reason: verifiedWorkItems > 0 ? `${verifiedWorkItems} Work Item(s) have persisted validation_status: passed.` : "Acceptance Criteria and Definition of Done sections show declared intent, not completed verification evidence." },
|
|
22107
|
+
...deliveryCapabilityEvidence(dir, projectContext),
|
|
22108
|
+
{ id: "guard-history", label: "Guard consistency history", classification: buildGuardHistory(dir).available ? "observed" : "unknown", reason: buildGuardHistory(dir).available ? "Recorded Guard runs provide current consistency evidence." : "No recorded Guard history is available." }
|
|
22109
|
+
],
|
|
22064
22110
|
scope: g.scope,
|
|
22065
22111
|
default_scope: "all",
|
|
22066
22112
|
scope_source: scopeSource,
|
|
@@ -22115,9 +22161,10 @@ function renderImpactMarkdown(r) {
|
|
|
22115
22161
|
L.push("# Kaddo Knowledge Impact Report", "");
|
|
22116
22162
|
L.push(`Generated at: ${r.generated_at}`);
|
|
22117
22163
|
L.push(`Project: ${r.project}`);
|
|
22164
|
+
L.push(`Project context: state=${r.project_context.state}; mode=${r.project_context.mode}; repositories=${r.project_context.repository_structure}`);
|
|
22118
22165
|
L.push(`Scope: ${r.scope}`);
|
|
22119
|
-
if (r.score !== null) L.push(`Knowledge Impact Score: ${r.score}/100`);
|
|
22120
|
-
else L.push("Knowledge Impact Score: not available");
|
|
22166
|
+
if (r.score !== null) L.push(`Legacy Knowledge Impact Score: ${r.score}/100 (deprecated; use Evidence and Applicability)`);
|
|
22167
|
+
else L.push("Legacy Knowledge Impact Score: not available");
|
|
22121
22168
|
if (r.scope_source === "default") {
|
|
22122
22169
|
L.push("Scope note: Impact reports use `all` by default to measure accumulated knowledge impact.");
|
|
22123
22170
|
} else if (r.scope === "active" && r.graph_quality.available === false) {
|
|
@@ -22127,6 +22174,9 @@ function renderImpactMarkdown(r) {
|
|
|
22127
22174
|
L.push("## Executive Summary", "");
|
|
22128
22175
|
for (const s2 of r.executive_summary) L.push(`- ${s2}`);
|
|
22129
22176
|
L.push("");
|
|
22177
|
+
L.push("## Evidence and Applicability", "");
|
|
22178
|
+
for (const item of r.evidence) L.push(`- ${item.label}: ${item.classification} \u2014 ${item.reason}`);
|
|
22179
|
+
L.push("");
|
|
22130
22180
|
L.push("## Knowledge Health", "");
|
|
22131
22181
|
for (const [k, v] of Object.entries(r.knowledge_health)) L.push(`- ${k}: ${v}`);
|
|
22132
22182
|
L.push("");
|
|
@@ -22317,6 +22367,7 @@ function loadAssumptions(dir) {
|
|
|
22317
22367
|
source: "file",
|
|
22318
22368
|
assumptions: {
|
|
22319
22369
|
currency: raw?.currency ?? DEFAULT_ASSUMPTIONS.currency,
|
|
22370
|
+
...typeof raw?.calibrated_at === "string" && raw.calibrated_at.trim() ? { calibrated_at: raw.calibrated_at.trim() } : {},
|
|
22320
22371
|
hourly_cost: num(raw?.hourly_cost, DEFAULT_ASSUMPTIONS.hourly_cost),
|
|
22321
22372
|
context_preparation_minutes_saved_per_work_item: num(a.context_preparation_minutes_saved_per_work_item, DEFAULT_ASSUMPTIONS.context_preparation_minutes_saved_per_work_item),
|
|
22322
22373
|
rework_hours_avoided_per_resolved_drift: num(a.rework_hours_avoided_per_resolved_drift, DEFAULT_ASSUMPTIONS.rework_hours_avoided_per_resolved_drift),
|
|
@@ -22337,6 +22388,8 @@ function savingsTemplate() {
|
|
|
22337
22388
|
"# Kaddo savings assumptions (VS-062). Estimates are evidence-based, not exact ROI.",
|
|
22338
22389
|
"# Edit these to match your team, then run `kaddo savings`.",
|
|
22339
22390
|
"currency: USD",
|
|
22391
|
+
"# Set calibrated_at only after comparing assumptions with observed project data (YYYY-MM-DD).",
|
|
22392
|
+
"# calibrated_at: 2026-10-11",
|
|
22340
22393
|
"",
|
|
22341
22394
|
"hourly_cost: 40",
|
|
22342
22395
|
"",
|
|
@@ -22365,6 +22418,7 @@ var SAVINGS_DISCLAIMER = "These are evidence-based estimates, not exact ROI. Adj
|
|
|
22365
22418
|
function buildSavingsReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
22366
22419
|
const { assumptions: a, source: source2 } = loadAssumptions(dir);
|
|
22367
22420
|
const impact = buildImpactReport(dir, { scope: opts.scope, scopeSource: opts.scopeSource }, now);
|
|
22421
|
+
const projectContext = reportingProjectContext(dir);
|
|
22368
22422
|
const completed = impact.traceability.completed_work_items;
|
|
22369
22423
|
const wiWithOwnership = parseRatioNumerator(impact.traceability.work_items_connected_to_code);
|
|
22370
22424
|
const acceptanceCov = impact.knowledge_coverage.find((c) => c.label.toLowerCase().includes("acceptance"));
|
|
@@ -22396,20 +22450,28 @@ function buildSavingsReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
|
22396
22450
|
reason: "Guard history exists, but no resolved drift warnings have been recorded yet."
|
|
22397
22451
|
};
|
|
22398
22452
|
}
|
|
22399
|
-
const
|
|
22400
|
-
const
|
|
22453
|
+
const observedHours = round2(ctxPrepH + reviewH + clarH + driftSavings.hours);
|
|
22454
|
+
const projectedHours = round2(onboardH + archH);
|
|
22455
|
+
const observedValue = Math.round(observedHours * a.hourly_cost);
|
|
22456
|
+
const projectedValue = Math.round(projectedHours * a.hourly_cost);
|
|
22401
22457
|
const reasons = [];
|
|
22402
22458
|
let level;
|
|
22403
|
-
|
|
22459
|
+
const verifiedDelivery = impact.evidence.some((item) => item.id === "delivery.verification" && item.classification === "observed");
|
|
22460
|
+
const evidenceStrong = graphQuality === "good" && impact.ownership_coverage.coverage_percent >= 70 && verifiedDelivery;
|
|
22461
|
+
if (!evidenceStrong || graphQuality === "empty") {
|
|
22404
22462
|
level = "Low";
|
|
22405
|
-
reasons.push("
|
|
22406
|
-
} else if (
|
|
22463
|
+
reasons.push("Delivery, ownership or graph evidence is insufficient for a reliable estimate.");
|
|
22464
|
+
} else if (evidenceStrong && source2 === "file" && Boolean(a.calibrated_at) && guard.available && guard.resolved > 0) {
|
|
22407
22465
|
level = "High";
|
|
22408
|
-
reasons.push("Strong evidence,
|
|
22466
|
+
reasons.push("Strong evidence, calibrated assumptions and recorded drift resolution.");
|
|
22409
22467
|
} else {
|
|
22410
22468
|
level = "Medium";
|
|
22411
22469
|
reasons.push("Strong knowledge and graph evidence.");
|
|
22412
22470
|
}
|
|
22471
|
+
if (!a.calibrated_at && level === "High") {
|
|
22472
|
+
level = "Medium";
|
|
22473
|
+
reasons.push("Uncalibrated assumptions cannot support High confidence.");
|
|
22474
|
+
}
|
|
22413
22475
|
if (!guard.available) {
|
|
22414
22476
|
reasons.push("Guard history is not persisted yet \u2014 avoided rework is not estimated.");
|
|
22415
22477
|
} else if (guard.resolved > 0) {
|
|
@@ -22434,7 +22496,15 @@ function buildSavingsReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
|
22434
22496
|
return {
|
|
22435
22497
|
generated_at: now.toISOString(),
|
|
22436
22498
|
project: impact.project,
|
|
22499
|
+
project_context: projectContext,
|
|
22437
22500
|
scope: impact.scope,
|
|
22501
|
+
reporting_period: { observed: "all recorded project history", projected: "per month", note: "Historical estimates and future monthly projections are intentionally not added together." },
|
|
22502
|
+
evidence_classification: [
|
|
22503
|
+
{ id: "completed-work-items", label: "Completed Work Items", classification: completed > 0 ? "observed" : "unknown", reason: completed > 0 ? "Lifecycle state is recorded in Work Items." : "No completed Work Items were recorded." },
|
|
22504
|
+
{ id: "guard-resolution", label: "Resolved drift warnings", classification: guard.available ? "observed" : "unknown", reason: guard.available ? "Derived from recorded Guard history." : "No Guard history was recorded." },
|
|
22505
|
+
{ id: "assumptions", label: "Savings assumptions", classification: "estimated", reason: a.calibrated_at ? `Project assumptions were calibrated on ${a.calibrated_at}.` : source2 === "file" ? "Project-provided assumptions are not marked as calibrated." : "Defaults are uncalibrated estimates." },
|
|
22506
|
+
{ id: "team-expectations", label: "Future team activity", classification: "projected", reason: "Monthly contributor and Work Item expectations model a future scenario." }
|
|
22507
|
+
],
|
|
22438
22508
|
currency: a.currency,
|
|
22439
22509
|
disclaimer: SAVINGS_DISCLAIMER,
|
|
22440
22510
|
assumptions_source: source2,
|
|
@@ -22468,7 +22538,11 @@ function buildSavingsReport(dir, opts = {}, now = /* @__PURE__ */ new Date()) {
|
|
|
22468
22538
|
architecture_discovery: { hours: archH, formula: `${a.architecture_discovery_hours_saved_when_graph_good} h \xD7 ${graphMult.toFixed(2)} graph multiplier` },
|
|
22469
22539
|
drift_prevention: driftSavings
|
|
22470
22540
|
},
|
|
22471
|
-
|
|
22541
|
+
totals: {
|
|
22542
|
+
observed_history_estimate: { estimated_hours: observedHours, estimated_value: observedValue, currency: a.currency },
|
|
22543
|
+
monthly_projection: { estimated_hours: projectedHours, estimated_value: projectedValue, currency: a.currency }
|
|
22544
|
+
},
|
|
22545
|
+
total: { estimated_hours_saved: observedHours, estimated_value: observedValue, currency: a.currency },
|
|
22472
22546
|
confidence: { level, reasons },
|
|
22473
22547
|
suggested_actions: actions
|
|
22474
22548
|
};
|
|
@@ -22478,14 +22552,18 @@ function renderSavingsMarkdown(r) {
|
|
|
22478
22552
|
L.push("# Kaddo Estimated Savings Report", "");
|
|
22479
22553
|
L.push(`Generated at: ${r.generated_at}`);
|
|
22480
22554
|
L.push(`Project: ${r.project}`);
|
|
22555
|
+
L.push(`Project context: state=${r.project_context.state}; mode=${r.project_context.mode}; repositories=${r.project_context.repository_structure}`);
|
|
22481
22556
|
L.push(`Scope: ${r.scope}`);
|
|
22482
22557
|
L.push(`Currency: ${r.currency}`);
|
|
22483
22558
|
L.push("");
|
|
22484
22559
|
L.push("## Disclaimer", "");
|
|
22485
22560
|
L.push(r.disclaimer, "");
|
|
22561
|
+
L.push("## Evidence Classification", "");
|
|
22562
|
+
for (const item of r.evidence_classification) L.push(`- ${item.label}: ${item.classification} \u2014 ${item.reason}`);
|
|
22563
|
+
L.push("");
|
|
22486
22564
|
L.push("## Executive Summary", "");
|
|
22487
|
-
L.push(`-
|
|
22488
|
-
L.push(`-
|
|
22565
|
+
L.push(`- Historical estimate: ${r.totals.observed_history_estimate.estimated_hours} hours`);
|
|
22566
|
+
L.push(`- Monthly projection: ${r.totals.monthly_projection.estimated_hours} hours`);
|
|
22489
22567
|
L.push(`- Confidence: ${r.confidence.level}`);
|
|
22490
22568
|
if (r.assumptions_source === "default") L.push("- Using default assumptions. Run `kaddo savings init` to customize them.");
|
|
22491
22569
|
L.push("");
|
|
@@ -22538,9 +22616,10 @@ function renderSavingsMarkdown(r) {
|
|
|
22538
22616
|
L.push("- Not available yet.");
|
|
22539
22617
|
L.push(`- Reason: ${s.drift_prevention.reason}`, "");
|
|
22540
22618
|
}
|
|
22541
|
-
L.push("## Total", "");
|
|
22542
|
-
L.push(`-
|
|
22543
|
-
L.push(`-
|
|
22619
|
+
L.push("## Total (Period-separated)", "");
|
|
22620
|
+
L.push(`- Historical estimate (all recorded project history): ${r.totals.observed_history_estimate.estimated_hours} h / ${r.totals.observed_history_estimate.estimated_value} ${r.currency}`);
|
|
22621
|
+
L.push(`- Monthly projection: ${r.totals.monthly_projection.estimated_hours} h / ${r.totals.monthly_projection.estimated_value} ${r.currency}`);
|
|
22622
|
+
L.push(`- Note: ${r.reporting_period.note}`);
|
|
22544
22623
|
L.push("");
|
|
22545
22624
|
L.push("## Confidence", "");
|
|
22546
22625
|
L.push(`Confidence: ${r.confidence.level}`, "", "Reason:");
|
|
@@ -22593,6 +22672,14 @@ function runSavingsInit(opts = {}) {
|
|
|
22593
22672
|
function buildDriftReport(dir, now = /* @__PURE__ */ new Date()) {
|
|
22594
22673
|
const h = buildGuardHistory(dir);
|
|
22595
22674
|
const project = loadConfig(dir)?.project.name ?? "unknown";
|
|
22675
|
+
const projectContext = reportingProjectContext(dir);
|
|
22676
|
+
const workItems = discoverWorkItems(dir);
|
|
22677
|
+
const verificationEvidence = workItems.filter((wi) => wi.validationStatus && wi.validationStatus !== "not-started");
|
|
22678
|
+
const plans = getDeprecationPlans(dir);
|
|
22679
|
+
const deprecationFindings = plans.flatMap((plan) => getDeprecationPlan(dir, plan.id)?.targets.flatMap(validateTarget) ?? []);
|
|
22680
|
+
const config = loadConfig(dir);
|
|
22681
|
+
const topology = config ? buildGraph(dir, config, { scope: "all" }, now) : null;
|
|
22682
|
+
const topologyHints = topology ? buildGraphHints(dir, topology, now).summary.hints : null;
|
|
22596
22683
|
const actions = [];
|
|
22597
22684
|
if (!h.available) {
|
|
22598
22685
|
actions.push("Run `kaddo guard --record` to start recording guard history.");
|
|
@@ -22604,6 +22691,13 @@ function buildDriftReport(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
22604
22691
|
return {
|
|
22605
22692
|
generated_at: now.toISOString(),
|
|
22606
22693
|
project,
|
|
22694
|
+
project_context: projectContext,
|
|
22695
|
+
consistency_evidence: [
|
|
22696
|
+
{ id: "guard-current-consistency", label: "Current Guard consistency", classification: h.available ? "observed" : "unknown", reason: h.available ? `${h.total_runs} recorded Guard run(s) provide deterministic consistency evidence.` : "No recorded Guard history is available." },
|
|
22697
|
+
{ id: "lifecycle-consistency", label: "Lifecycle evidence consistency", classification: verificationEvidence.length > 0 ? "observed" : "unknown", reason: verificationEvidence.length > 0 ? `${verificationEvidence.length} Work Item(s) persist an implementation validation status.` : "No persisted Work Item validation status is available." },
|
|
22698
|
+
{ id: "deprecation-consistency", label: "Deprecation consistency", classification: plans.length === 0 ? "not_applicable" : deprecationFindings.length === 0 ? "derived" : "observed", reason: plans.length === 0 ? "No deprecation plans exist in this project." : deprecationFindings.length === 0 ? `${plans.length} plan(s) passed deterministic target consistency checks.` : `${deprecationFindings.length} deterministic deprecation consistency finding(s) were detected.` },
|
|
22699
|
+
{ id: "topology-consistency", label: "Knowledge topology consistency", classification: topology === null ? "unknown" : topologyHints === 0 ? "derived" : "observed", reason: topology === null ? "No project configuration is available to construct the topology." : topologyHints === 0 ? `The in-memory topology has ${topology.nodes.length} node(s) and no open deterministic hints.` : `The in-memory topology has ${topologyHints} open deterministic hint(s).` }
|
|
22700
|
+
],
|
|
22607
22701
|
guard_history: {
|
|
22608
22702
|
available: h.available,
|
|
22609
22703
|
total_runs: h.total_runs,
|
|
@@ -22624,6 +22718,10 @@ function renderDriftMarkdown(r) {
|
|
|
22624
22718
|
L.push("# Kaddo Drift Trend Report", "");
|
|
22625
22719
|
L.push(`Generated at: ${r.generated_at}`);
|
|
22626
22720
|
L.push(`Project: ${r.project}`);
|
|
22721
|
+
L.push(`Project context: state=${r.project_context.state}; mode=${r.project_context.mode}; repositories=${r.project_context.repository_structure}`);
|
|
22722
|
+
L.push("");
|
|
22723
|
+
L.push("## Consistency Evidence", "");
|
|
22724
|
+
for (const item of r.consistency_evidence) L.push(`- ${item.label}: ${item.classification} \u2014 ${item.reason}`);
|
|
22627
22725
|
L.push("");
|
|
22628
22726
|
if (!r.guard_history.available) {
|
|
22629
22727
|
L.push("## Guard History", "");
|
|
@@ -22691,6 +22789,8 @@ function serializeDriftJson(r) {
|
|
|
22691
22789
|
const out = {
|
|
22692
22790
|
generated_at: r.generated_at,
|
|
22693
22791
|
project: r.project,
|
|
22792
|
+
project_context: r.project_context,
|
|
22793
|
+
consistency_evidence: r.consistency_evidence,
|
|
22694
22794
|
guard_history: r.guard_history,
|
|
22695
22795
|
drift_warnings: r.drift_warnings,
|
|
22696
22796
|
hotspots: r.hotspots,
|