@kaddo/mcp 3.116.0 → 3.117.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/index.js +211 -35
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -393,13 +393,15 @@ import matter10 from "gray-matter";
|
|
|
393
393
|
|
|
394
394
|
// ../cli/src/core/config.ts
|
|
395
395
|
import { z } from "zod";
|
|
396
|
-
import { parse as parseYaml2 } from "yaml";
|
|
396
|
+
import { parse as parseYaml2, stringify as stringifyYaml } from "yaml";
|
|
397
397
|
var PROJECT_STATES = ["new", "pre-ai", "legacy", "ai-assisted"];
|
|
398
|
+
var PROJECT_MODES = ["standard", "poc"];
|
|
398
399
|
var TEAM_SIZES = ["indie", "small", "medium", "enterprise"];
|
|
399
400
|
var REPOSITORY_STRUCTURES = ["monorepo", "multirepo"];
|
|
400
401
|
var PROJECT_LANGUAGES = ["en", "es"];
|
|
401
402
|
var DEFAULTS = {
|
|
402
403
|
state: "pre-ai",
|
|
404
|
+
mode: "standard",
|
|
403
405
|
structure: "monorepo",
|
|
404
406
|
teamSize: "indie",
|
|
405
407
|
language: "en"
|
|
@@ -411,6 +413,9 @@ function projectLanguage(config) {
|
|
|
411
413
|
const lang = config.project.language;
|
|
412
414
|
return lang === "es" ? "es" : "en";
|
|
413
415
|
}
|
|
416
|
+
function projectMode(config) {
|
|
417
|
+
return config.project.mode === "poc" ? "poc" : "standard";
|
|
418
|
+
}
|
|
414
419
|
var ConfigError = class extends Error {
|
|
415
420
|
constructor(message) {
|
|
416
421
|
super(message);
|
|
@@ -422,6 +427,11 @@ var projectStateSchema = z.enum(["new", "pre-ai", "legacy", "ai-assisted"], {
|
|
|
422
427
|
message: `project.state must be one of: ${PROJECT_STATES.join(", ")}`
|
|
423
428
|
})
|
|
424
429
|
});
|
|
430
|
+
var projectModeSchema = z.enum(["standard", "poc"], {
|
|
431
|
+
errorMap: () => ({
|
|
432
|
+
message: `project.mode must be one of: ${PROJECT_MODES.join(", ")}`
|
|
433
|
+
})
|
|
434
|
+
});
|
|
425
435
|
var teamSizeSchema = z.enum(["indie", "small", "medium", "enterprise"], {
|
|
426
436
|
errorMap: () => ({
|
|
427
437
|
message: `team.size must be one of: ${TEAM_SIZES.join(", ")}`
|
|
@@ -443,6 +453,7 @@ var configSchema = z.object({
|
|
|
443
453
|
project: z.object({
|
|
444
454
|
name: z.string().default("project"),
|
|
445
455
|
state: projectStateSchema.default(DEFAULTS.state),
|
|
456
|
+
mode: projectModeSchema.default(DEFAULTS.mode),
|
|
446
457
|
structure: structureSchema.default(DEFAULTS.structure),
|
|
447
458
|
language: languageSchema.default(DEFAULTS.language),
|
|
448
459
|
role: multirepoRoleSchema,
|
|
@@ -891,7 +902,7 @@ function assessPhase(input) {
|
|
|
891
902
|
|
|
892
903
|
// ../cli/src/core/capsule.ts
|
|
893
904
|
import matter4 from "gray-matter";
|
|
894
|
-
import { parse as parseYaml7, stringify as
|
|
905
|
+
import { parse as parseYaml7, stringify as stringifyYaml4 } from "yaml";
|
|
895
906
|
|
|
896
907
|
// ../cli/src/services/owners.ts
|
|
897
908
|
import { parse as parseYaml3 } from "yaml";
|
|
@@ -1145,7 +1156,7 @@ var Q2 = o("\u25B2", "!");
|
|
|
1145
1156
|
var ee = o("\u25A0", "x");
|
|
1146
1157
|
|
|
1147
1158
|
// ../cli/src/commands/modules-map.ts
|
|
1148
|
-
import { parse as parseYaml6, stringify as
|
|
1159
|
+
import { parse as parseYaml6, stringify as stringifyYaml3 } from "yaml";
|
|
1149
1160
|
|
|
1150
1161
|
// ../cli/src/templates/registry.ts
|
|
1151
1162
|
var QUALITY = "## Quality checklist";
|
|
@@ -2309,7 +2320,7 @@ ${QUALITY}
|
|
|
2309
2320
|
`;
|
|
2310
2321
|
|
|
2311
2322
|
// ../cli/src/commands/modules-discover.ts
|
|
2312
|
-
import { parse as parseYaml5, stringify as
|
|
2323
|
+
import { parse as parseYaml5, stringify as stringifyYaml2 } from "yaml";
|
|
2313
2324
|
|
|
2314
2325
|
// ../cli/src/core/capsule.ts
|
|
2315
2326
|
var KNOWLEDGE2 = "knowledge";
|
|
@@ -4312,6 +4323,43 @@ function buildTechDecisions(dir) {
|
|
|
4312
4323
|
};
|
|
4313
4324
|
}
|
|
4314
4325
|
|
|
4326
|
+
// ../cli/src/core/poc.ts
|
|
4327
|
+
var POC_ARTIFACT_PATH = "knowledge/delivery/poc.md";
|
|
4328
|
+
var PLACEHOLDER = /^[_<].*[_>]$|^(describe|list|document|what|how)\b/i;
|
|
4329
|
+
function section2(markdown, heading) {
|
|
4330
|
+
const match = markdown.match(new RegExp(`^##\\s+${heading}\\s*$([\\s\\S]*?)(?=^##\\s+|(?![\\s\\S]))`, "im"));
|
|
4331
|
+
return match?.[1] ?? "";
|
|
4332
|
+
}
|
|
4333
|
+
function meaningful(text3) {
|
|
4334
|
+
return text3.split(/\r?\n/).some((line) => {
|
|
4335
|
+
const value = line.trim().replace(/^[-*]\s+(?:\[[^\]]+\]\s*)?/, "");
|
|
4336
|
+
return Boolean(value) && !PLACEHOLDER.test(value) && !/^status:\s*(pending|tbd)$/i.test(value);
|
|
4337
|
+
});
|
|
4338
|
+
}
|
|
4339
|
+
function readPocSummary(dir) {
|
|
4340
|
+
const path9 = join(dir, POC_ARTIFACT_PATH);
|
|
4341
|
+
if (!exists(path9)) {
|
|
4342
|
+
return { exists: false, hypothesisDefined: false, successCriteriaCount: 0, constraintsDefined: false, nonGoalsDefined: false, conclusion: "pending" };
|
|
4343
|
+
}
|
|
4344
|
+
let markdown = "";
|
|
4345
|
+
try {
|
|
4346
|
+
markdown = readFile(path9);
|
|
4347
|
+
} catch {
|
|
4348
|
+
return { exists: false, hypothesisDefined: false, successCriteriaCount: 0, constraintsDefined: false, nonGoalsDefined: false, conclusion: "pending" };
|
|
4349
|
+
}
|
|
4350
|
+
const criteria = section2(markdown, "Success Criteria").split(/\r?\n/).filter((line) => /^\s*[-*]\s+(?:\[[ xX]\]\s+)?/.test(line)).filter((line) => meaningful(line)).length;
|
|
4351
|
+
const conclusionBody = section2(markdown, "Conclusion");
|
|
4352
|
+
const conclusionMatch = conclusionBody.match(/\b(?:status|outcome)\s*:\s*(validated|rejected|inconclusive)\b/i);
|
|
4353
|
+
return {
|
|
4354
|
+
exists: true,
|
|
4355
|
+
hypothesisDefined: meaningful(section2(markdown, "Hypothesis")),
|
|
4356
|
+
successCriteriaCount: criteria,
|
|
4357
|
+
constraintsDefined: meaningful(section2(markdown, "Constraints")),
|
|
4358
|
+
nonGoalsDefined: meaningful(section2(markdown, "Non-goals")),
|
|
4359
|
+
conclusion: conclusionMatch ? conclusionMatch[1].toLowerCase() : "pending"
|
|
4360
|
+
};
|
|
4361
|
+
}
|
|
4362
|
+
|
|
4315
4363
|
// ../cli/src/core/next-step.ts
|
|
4316
4364
|
function buildDeliveryState(dir) {
|
|
4317
4365
|
const wis = discoverWorkItems(dir);
|
|
@@ -4399,6 +4447,40 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
|
|
|
4399
4447
|
return { id: "init", phase: "Setup", label: "Run `kaddo init` to initialize Kaddo.", command: "kaddo init", reason: "Kaddo is not initialized in this project." };
|
|
4400
4448
|
}
|
|
4401
4449
|
const state = config.project.state;
|
|
4450
|
+
if (projectMode(config) === "poc") {
|
|
4451
|
+
const poc = readPocSummary(dir);
|
|
4452
|
+
if (!poc.exists) {
|
|
4453
|
+
return { id: "bootstrap", phase: "Setup", label: "Run `kaddo bootstrap` to create the POC knowledge baseline.", command: "kaddo bootstrap", reason: `Missing ${POC_ARTIFACT_PATH}.` };
|
|
4454
|
+
}
|
|
4455
|
+
if (!poc.hypothesisDefined) {
|
|
4456
|
+
return { id: "poc-hypothesis", phase: "POC Definition", label: "Define the POC hypothesis.", target: POC_ARTIFACT_PATH, reason: "The POC needs a testable hypothesis before work begins." };
|
|
4457
|
+
}
|
|
4458
|
+
if (poc.successCriteriaCount === 0) {
|
|
4459
|
+
return { id: "poc-success-criteria", phase: "POC Definition", label: "Define observable POC success criteria.", target: POC_ARTIFACT_PATH, reason: "No success criteria are defined for the hypothesis." };
|
|
4460
|
+
}
|
|
4461
|
+
const qCurrentState2 = analyzeKnowledgeArtifact(dir, CS);
|
|
4462
|
+
const qCodebase2 = analyzeKnowledgeArtifact(dir, CB);
|
|
4463
|
+
if (qCurrentState2 !== "useful" || qCodebase2 !== "useful") {
|
|
4464
|
+
return { id: "poc-technical-context", phase: "POC Discovery", label: "Document the minimal technical context for the experiment.", target: qCurrentState2 !== "useful" ? CS : CB, agent: "architecture-agent", reason: "The experiment surface and constraints are not yet sufficiently documented." };
|
|
4465
|
+
}
|
|
4466
|
+
if (!exists(join(dir, "knowledge", "resources"))) {
|
|
4467
|
+
return { id: "poc-resources", phase: "POC Discovery", label: "Identify the project resources relevant to the experiment.", command: "kaddo resources list", reason: "No project resource catalog is available for the experiment context." };
|
|
4468
|
+
}
|
|
4469
|
+
const delivery = buildDeliveryState(dir);
|
|
4470
|
+
if (delivery.total_work_items === 0) {
|
|
4471
|
+
return { id: "poc-create-experiment", phase: "Experiment", label: "Create the first experiment Work Item (prefer `spike`).", command: "kaddo create spike", reason: "The POC has no Work Item to produce evidence." };
|
|
4472
|
+
}
|
|
4473
|
+
if (delivery.in_progress_work_items > 0) {
|
|
4474
|
+
return { id: "guard", phase: "Experiment", label: "Run `kaddo guard` and capture evidence from the experiment.", command: "kaddo guard", reason: `${delivery.in_progress_work_items} experiment Work Item(s) are in progress.` };
|
|
4475
|
+
}
|
|
4476
|
+
if (delivery.ready_work_items > 0 || delivery.draft_work_items > 0 || delivery.blocked_work_items > 0) {
|
|
4477
|
+
return { id: delivery.ready_work_items > 0 ? "implement-work-item" : "refine-work-item", phase: "Experiment", label: delivery.ready_work_items > 0 ? "Implement the ready experiment Work Item and collect evidence." : "Refine the experiment Work Item before running it.", agent: "work-item-agent", reason: "The POC evidence Work Item is not complete yet." };
|
|
4478
|
+
}
|
|
4479
|
+
if (poc.conclusion === "pending") {
|
|
4480
|
+
return { id: "poc-evaluate", phase: "Evaluation", label: "Evaluate the experiment evidence and record the POC conclusion.", target: POC_ARTIFACT_PATH, reason: "Experiment Work Items are complete but the POC conclusion is pending." };
|
|
4481
|
+
}
|
|
4482
|
+
return { id: "poc-complete", phase: "Conclusion", label: `POC concluded: ${poc.conclusion}. Decide whether to graduate it to standard delivery.`, target: POC_ARTIFACT_PATH, reason: "The POC conclusion is recorded from experiment evidence." };
|
|
4483
|
+
}
|
|
4402
4484
|
const q3 = (rel) => analyzeKnowledgeArtifact(dir, rel);
|
|
4403
4485
|
const resolveAgent = (agent) => {
|
|
4404
4486
|
const file = agent.endsWith(".md") ? agent : `${agent}.md`;
|
|
@@ -8650,6 +8732,47 @@ var LEGACY_STEPS = [
|
|
|
8650
8732
|
runGuard,
|
|
8651
8733
|
captureLearning
|
|
8652
8734
|
];
|
|
8735
|
+
var definePocHypothesis = {
|
|
8736
|
+
id: "poc-hypothesis",
|
|
8737
|
+
label: "Define hypothesis",
|
|
8738
|
+
evaluate: (ctx) => {
|
|
8739
|
+
const poc = readPocSummary(ctx.dir);
|
|
8740
|
+
return { status: poc.hypothesisDefined ? "done" : "current", evidence: poc.hypothesisDefined ? [POC_ARTIFACT_PATH] : void 0, reason: poc.hypothesisDefined ? void 0 : "A POC starts with one testable hypothesis." };
|
|
8741
|
+
}
|
|
8742
|
+
};
|
|
8743
|
+
var definePocCriteria = {
|
|
8744
|
+
id: "poc-success-criteria",
|
|
8745
|
+
label: "Define success criteria",
|
|
8746
|
+
evaluate: (ctx) => {
|
|
8747
|
+
const poc = readPocSummary(ctx.dir);
|
|
8748
|
+
return { status: poc.successCriteriaCount > 0 ? "done" : "pending", evidence: poc.successCriteriaCount > 0 ? [POC_ARTIFACT_PATH] : void 0, reason: poc.successCriteriaCount > 0 ? void 0 : "Define observable evidence for the hypothesis." };
|
|
8749
|
+
}
|
|
8750
|
+
};
|
|
8751
|
+
var describePocTech = { ...describeArchitecture, id: "poc-technical-context", label: "Document minimal technical context" };
|
|
8752
|
+
var identifyPocResources = {
|
|
8753
|
+
id: "poc-resources",
|
|
8754
|
+
label: "Identify relevant resources",
|
|
8755
|
+
evaluate: (ctx) => exists(join(ctx.dir, "knowledge/resources")) ? { status: "done", evidence: ["knowledge/resources/"] } : { status: "pending", command: "kaddo resources list" }
|
|
8756
|
+
};
|
|
8757
|
+
var createPocExperiment = {
|
|
8758
|
+
id: "poc-create-experiment",
|
|
8759
|
+
label: "Create experiment Work Item",
|
|
8760
|
+
evaluate: (ctx) => ctx.totalWorkItems > 0 ? { status: "done", evidence: ["knowledge/delivery/work-items/"] } : { status: "pending", command: "kaddo create spike", reason: "Prefer a spike for a focused experiment." }
|
|
8761
|
+
};
|
|
8762
|
+
var capturePocEvidence = {
|
|
8763
|
+
id: "poc-evidence",
|
|
8764
|
+
label: "Capture experiment evidence",
|
|
8765
|
+
evaluate: (ctx) => ctx.completedWorkItems > 0 ? { status: "done", evidence: ["knowledge/delivery/work-items/"] } : { status: "pending", reason: "Complete an experiment Work Item and link its evidence in the POC artifact." }
|
|
8766
|
+
};
|
|
8767
|
+
var concludePoc = {
|
|
8768
|
+
id: "poc-evaluate",
|
|
8769
|
+
label: "Evaluate and conclude",
|
|
8770
|
+
evaluate: (ctx) => {
|
|
8771
|
+
const conclusion = readPocSummary(ctx.dir).conclusion;
|
|
8772
|
+
return conclusion === "pending" ? { status: "pending", reason: "Record validated, rejected, or inconclusive from the evidence." } : { status: "done", evidence: [POC_ARTIFACT_PATH], reason: `Conclusion: ${conclusion}.` };
|
|
8773
|
+
}
|
|
8774
|
+
};
|
|
8775
|
+
var POC_STEPS = [enableKaddo, bootstrapBaseline, definePocHypothesis, definePocCriteria, describePocTech, identifyPocResources, createPocExperiment, capturePocEvidence, concludePoc];
|
|
8653
8776
|
function stepsForState(state) {
|
|
8654
8777
|
switch (state) {
|
|
8655
8778
|
case "new":
|
|
@@ -8746,14 +8869,21 @@ function mapNextStepId(id) {
|
|
|
8746
8869
|
"init-module-context": "enable-kaddo",
|
|
8747
8870
|
"module-ready": "ready-for-core-orchestration",
|
|
8748
8871
|
"validate-work-item-modules": "validate-module-knowledge",
|
|
8749
|
-
"modules-discover": "enable-kaddo"
|
|
8872
|
+
"modules-discover": "enable-kaddo",
|
|
8873
|
+
"poc-hypothesis": "poc-hypothesis",
|
|
8874
|
+
"poc-success-criteria": "poc-success-criteria",
|
|
8875
|
+
"poc-technical-context": "poc-technical-context",
|
|
8876
|
+
"poc-resources": "poc-resources",
|
|
8877
|
+
"poc-create-experiment": "poc-create-experiment",
|
|
8878
|
+
"poc-evaluate": "poc-evaluate",
|
|
8879
|
+
"poc-complete": "poc-evaluate"
|
|
8750
8880
|
};
|
|
8751
8881
|
return MAP[id] ?? id;
|
|
8752
8882
|
}
|
|
8753
8883
|
function buildProjectRoute(dir) {
|
|
8754
8884
|
const config = loadConfig(dir);
|
|
8755
8885
|
const state = config?.project.state ?? "pre-ai";
|
|
8756
|
-
const defs = config && isModule(config) ? MODULE_STEPS : stepsForState(state);
|
|
8886
|
+
const defs = config && projectMode(config) === "poc" ? POC_STEPS : config && isModule(config) ? MODULE_STEPS : stepsForState(state);
|
|
8757
8887
|
const ctx = buildRouteContext(dir);
|
|
8758
8888
|
const steps = defs.map((d3) => {
|
|
8759
8889
|
const result = d3.evaluate(ctx);
|
|
@@ -10826,6 +10956,18 @@ var RESOURCES = [
|
|
|
10826
10956
|
"Roadmap not found. Create knowledge/delivery/roadmap.md (e.g. via the roadmap-agent) first."
|
|
10827
10957
|
)
|
|
10828
10958
|
},
|
|
10959
|
+
{
|
|
10960
|
+
uri: "kaddo://poc",
|
|
10961
|
+
name: "Kaddo proof of concept",
|
|
10962
|
+
description: "Canonical POC hypothesis, success criteria, evidence, and conclusion.",
|
|
10963
|
+
mimeType: "text/markdown",
|
|
10964
|
+
read: (root) => fileOrHint(
|
|
10965
|
+
root,
|
|
10966
|
+
"kaddo://poc",
|
|
10967
|
+
"knowledge/delivery/poc.md",
|
|
10968
|
+
"POC artifact not found. Set `project.mode: poc` and run `kaddo bootstrap` first."
|
|
10969
|
+
)
|
|
10970
|
+
},
|
|
10829
10971
|
{
|
|
10830
10972
|
uri: "kaddo://capsules",
|
|
10831
10973
|
name: "Kaddo knowledge capsules",
|
|
@@ -11115,14 +11257,14 @@ import matter15 from "gray-matter";
|
|
|
11115
11257
|
import fs3 from "fs";
|
|
11116
11258
|
import path3 from "path";
|
|
11117
11259
|
import { z as z3 } from "zod";
|
|
11118
|
-
import { parse as parseYaml10 } from "yaml";
|
|
11260
|
+
import { parse as parseYaml10, stringify as stringifyYaml5 } from "yaml";
|
|
11119
11261
|
import matter12 from "gray-matter";
|
|
11120
11262
|
import matter22 from "gray-matter";
|
|
11121
|
-
import { parse as parseYaml62, stringify as
|
|
11263
|
+
import { parse as parseYaml62, stringify as stringifyYaml42 } from "yaml";
|
|
11122
11264
|
import { parse as parseYaml22 } from "yaml";
|
|
11123
11265
|
import { parse as parseYaml32 } from "yaml";
|
|
11124
|
-
import { parse as parseYaml52, stringify as
|
|
11125
|
-
import { parse as parseYaml42, stringify as
|
|
11266
|
+
import { parse as parseYaml52, stringify as stringifyYaml32 } from "yaml";
|
|
11267
|
+
import { parse as parseYaml42, stringify as stringifyYaml22 } from "yaml";
|
|
11126
11268
|
import matter32 from "gray-matter";
|
|
11127
11269
|
import matter42 from "gray-matter";
|
|
11128
11270
|
import matter52 from "gray-matter";
|
|
@@ -11134,7 +11276,7 @@ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
|
11134
11276
|
import matter72 from "gray-matter";
|
|
11135
11277
|
import matter82 from "gray-matter";
|
|
11136
11278
|
import matter92 from "gray-matter";
|
|
11137
|
-
import { parse as parseYaml82, stringify as
|
|
11279
|
+
import { parse as parseYaml82, stringify as stringifyYaml52 } from "yaml";
|
|
11138
11280
|
import fs4 from "fs";
|
|
11139
11281
|
import path4 from "path";
|
|
11140
11282
|
import crypto2 from "crypto";
|
|
@@ -11143,8 +11285,8 @@ import crypto3 from "crypto";
|
|
|
11143
11285
|
import fs5 from "fs";
|
|
11144
11286
|
import matter112 from "gray-matter";
|
|
11145
11287
|
import matter122 from "gray-matter";
|
|
11146
|
-
import { parse as parseYaml92, stringify as
|
|
11147
|
-
import { parse as parseYaml102, stringify as
|
|
11288
|
+
import { parse as parseYaml92, stringify as stringifyYaml6 } from "yaml";
|
|
11289
|
+
import { parse as parseYaml102, stringify as stringifyYaml7 } from "yaml";
|
|
11148
11290
|
import matter13 from "gray-matter";
|
|
11149
11291
|
function exists2(p) {
|
|
11150
11292
|
return fs3.existsSync(p);
|
|
@@ -11170,11 +11312,13 @@ function join3(...parts) {
|
|
|
11170
11312
|
return path3.join(...parts);
|
|
11171
11313
|
}
|
|
11172
11314
|
var PROJECT_STATES2 = ["new", "pre-ai", "legacy", "ai-assisted"];
|
|
11315
|
+
var PROJECT_MODES2 = ["standard", "poc"];
|
|
11173
11316
|
var TEAM_SIZES2 = ["indie", "small", "medium", "enterprise"];
|
|
11174
11317
|
var REPOSITORY_STRUCTURES2 = ["monorepo", "multirepo"];
|
|
11175
11318
|
var PROJECT_LANGUAGES2 = ["en", "es"];
|
|
11176
11319
|
var DEFAULTS2 = {
|
|
11177
11320
|
state: "pre-ai",
|
|
11321
|
+
mode: "standard",
|
|
11178
11322
|
structure: "monorepo",
|
|
11179
11323
|
teamSize: "indie",
|
|
11180
11324
|
language: "en"
|
|
@@ -11190,6 +11334,11 @@ var projectStateSchema2 = z3.enum(["new", "pre-ai", "legacy", "ai-assisted"], {
|
|
|
11190
11334
|
message: `project.state must be one of: ${PROJECT_STATES2.join(", ")}`
|
|
11191
11335
|
})
|
|
11192
11336
|
});
|
|
11337
|
+
var projectModeSchema2 = z3.enum(["standard", "poc"], {
|
|
11338
|
+
errorMap: () => ({
|
|
11339
|
+
message: `project.mode must be one of: ${PROJECT_MODES2.join(", ")}`
|
|
11340
|
+
})
|
|
11341
|
+
});
|
|
11193
11342
|
var teamSizeSchema2 = z3.enum(["indie", "small", "medium", "enterprise"], {
|
|
11194
11343
|
errorMap: () => ({
|
|
11195
11344
|
message: `team.size must be one of: ${TEAM_SIZES2.join(", ")}`
|
|
@@ -11211,6 +11360,7 @@ var configSchema2 = z3.object({
|
|
|
11211
11360
|
project: z3.object({
|
|
11212
11361
|
name: z3.string().default("project"),
|
|
11213
11362
|
state: projectStateSchema2.default(DEFAULTS2.state),
|
|
11363
|
+
mode: projectModeSchema2.default(DEFAULTS2.mode),
|
|
11214
11364
|
structure: structureSchema2.default(DEFAULTS2.structure),
|
|
11215
11365
|
language: languageSchema2.default(DEFAULTS2.language),
|
|
11216
11366
|
role: multirepoRoleSchema2,
|
|
@@ -16988,6 +17138,7 @@ var LEGACY_STEPS2 = [
|
|
|
16988
17138
|
runGuard2,
|
|
16989
17139
|
captureLearning2
|
|
16990
17140
|
];
|
|
17141
|
+
var describePocTech2 = { ...describeArchitecture2, id: "poc-technical-context", label: "Document minimal technical context" };
|
|
16991
17142
|
var USER_FACING_KEYWORDS_EN = [
|
|
16992
17143
|
"user",
|
|
16993
17144
|
"visitor",
|
|
@@ -19306,7 +19457,7 @@ function persistConsent(dir, consent) {
|
|
|
19306
19457
|
const prev = doc.telemetry ?? {};
|
|
19307
19458
|
delete prev.enabled;
|
|
19308
19459
|
doc.telemetry = { ...prev, consent, consentVersion: CURRENT_CONSENT_VERSION };
|
|
19309
|
-
writeFile2(configPath,
|
|
19460
|
+
writeFile2(configPath, stringifyYaml7(doc));
|
|
19310
19461
|
}
|
|
19311
19462
|
function isDeferralActive(dir) {
|
|
19312
19463
|
const p = join3(dir, ".kaddo", "telemetry-deferred.json");
|
|
@@ -20257,7 +20408,7 @@ function deleteResourceTool(root, id, confirm2) {
|
|
|
20257
20408
|
import fs7 from "fs";
|
|
20258
20409
|
import path6 from "path";
|
|
20259
20410
|
import matter16 from "gray-matter";
|
|
20260
|
-
import { parse as parseYaml11, stringify as
|
|
20411
|
+
import { parse as parseYaml11, stringify as stringifyYaml8 } from "yaml";
|
|
20261
20412
|
var ok2 = (data) => ({ ok: true, data });
|
|
20262
20413
|
var fail2 = (message) => ({ ok: false, message });
|
|
20263
20414
|
function moduleRepoPath(m2) {
|
|
@@ -20747,7 +20898,7 @@ function modulesDiscoverTool(root, args) {
|
|
|
20747
20898
|
descriptor.modules.push({ id: d3.id, name: d3.id, path: d3.path, parent_system: sysName, status: "configured" });
|
|
20748
20899
|
}
|
|
20749
20900
|
}
|
|
20750
|
-
const ymlContent =
|
|
20901
|
+
const ymlContent = stringifyYaml8({ version: descriptor.version ?? 1, system: sysName, workspace_roots: workspaceRoots2, modules: descriptor.modules ?? [] });
|
|
20751
20902
|
writeDerived(root, ".kaddo/modules.yml", ymlContent);
|
|
20752
20903
|
return ok2({ discovered, applied: true });
|
|
20753
20904
|
}
|
|
@@ -20793,7 +20944,7 @@ ${list3(data.owners)}
|
|
|
20793
20944
|
}
|
|
20794
20945
|
|
|
20795
20946
|
// ../cli/src/core/system-topology.ts
|
|
20796
|
-
import { parse as parseYaml12, stringify as
|
|
20947
|
+
import { parse as parseYaml12, stringify as stringifyYaml9 } from "yaml";
|
|
20797
20948
|
import fs8 from "fs";
|
|
20798
20949
|
import path7 from "path";
|
|
20799
20950
|
import crypto from "crypto";
|
|
@@ -21308,7 +21459,7 @@ function systemImpactCandidatesTool(root, args) {
|
|
|
21308
21459
|
|
|
21309
21460
|
// ../cli/src/services/integrations.ts
|
|
21310
21461
|
import matter18 from "gray-matter";
|
|
21311
|
-
import { parse as parseYaml13, stringify as
|
|
21462
|
+
import { parse as parseYaml13, stringify as stringifyYaml10 } from "yaml";
|
|
21312
21463
|
|
|
21313
21464
|
// ../cli/src/core/work-item-write.ts
|
|
21314
21465
|
import fs9 from "fs";
|
|
@@ -22481,6 +22632,7 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
22481
22632
|
missing.push("No work items found.");
|
|
22482
22633
|
}
|
|
22483
22634
|
const state = config.project.state;
|
|
22635
|
+
const mode = projectMode(config);
|
|
22484
22636
|
const roadmapPath = join(dir, ARCH_DIR4, "delivery", "roadmap.md");
|
|
22485
22637
|
const materialized = allArtifacts.filter(
|
|
22486
22638
|
(a2) => a2.filePath.replace(/\\/g, "/").includes("/delivery/work-items/") && Boolean(a2.type)
|
|
@@ -22573,6 +22725,7 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
22573
22725
|
project: {
|
|
22574
22726
|
name: config.project.name,
|
|
22575
22727
|
state,
|
|
22728
|
+
mode,
|
|
22576
22729
|
teamSize: config.team.size,
|
|
22577
22730
|
structure: config.project.structure,
|
|
22578
22731
|
language: languageLabel(projectLanguage(config))
|
|
@@ -22598,6 +22751,7 @@ function buildContextPack(dir, config, now = /* @__PURE__ */ new Date()) {
|
|
|
22598
22751
|
allWorkItems: allWorkItemArtifacts.map(toContextWorkItem),
|
|
22599
22752
|
artifacts: allArtifacts.filter((a2) => a2.codeGlobs.length > 0).map(toContextArtifact)
|
|
22600
22753
|
},
|
|
22754
|
+
...mode === "poc" ? { poc: readPocSummary(dir) } : {},
|
|
22601
22755
|
layers,
|
|
22602
22756
|
knowledgeQuality,
|
|
22603
22757
|
roadmap,
|
|
@@ -22701,11 +22855,23 @@ function renderContextPack(pack) {
|
|
|
22701
22855
|
[
|
|
22702
22856
|
`- Name: ${project.name}`,
|
|
22703
22857
|
`- State: ${project.state}`,
|
|
22858
|
+
`- Mode: ${project.mode}`,
|
|
22704
22859
|
`- Team size: ${project.teamSize}`,
|
|
22705
22860
|
`- Structure: ${project.structure}`,
|
|
22706
22861
|
`- Language: ${project.language}`
|
|
22707
22862
|
].join("\n") + "\n"
|
|
22708
22863
|
);
|
|
22864
|
+
if (pack.poc) {
|
|
22865
|
+
parts.push("## Proof of Concept\n");
|
|
22866
|
+
parts.push([
|
|
22867
|
+
`- Hypothesis: ${pack.poc.hypothesisDefined ? "defined" : "missing"}`,
|
|
22868
|
+
`- Success criteria: ${pack.poc.successCriteriaCount}`,
|
|
22869
|
+
`- Constraints: ${pack.poc.constraintsDefined ? "defined" : "missing"}`,
|
|
22870
|
+
`- Non-goals: ${pack.poc.nonGoalsDefined ? "defined" : "missing"}`,
|
|
22871
|
+
`- Conclusion: ${pack.poc.conclusion}`,
|
|
22872
|
+
"- Canonical artifact: `knowledge/delivery/poc.md`"
|
|
22873
|
+
].join("\n") + "\n");
|
|
22874
|
+
}
|
|
22709
22875
|
parts.push("## Current Phase\n");
|
|
22710
22876
|
parts.push(`Phase: ${pack.phase.phase}
|
|
22711
22877
|
`);
|
|
@@ -22789,27 +22955,29 @@ function renderContextPack(pack) {
|
|
|
22789
22955
|
}
|
|
22790
22956
|
parts.push("## Current Knowledge\n");
|
|
22791
22957
|
parts.push((knowledge.summary || "No project knowledge summary found yet.") + "\n");
|
|
22792
|
-
|
|
22793
|
-
|
|
22794
|
-
|
|
22795
|
-
[
|
|
22796
|
-
`- Initiatives: ${pack.roadmap.initiatives}`,
|
|
22797
|
-
`- Work Item candidates: ${pack.roadmap.work_item_candidates}`,
|
|
22798
|
-
`- Materialized Work Items: ${pack.roadmap.materialized_work_items}`,
|
|
22799
|
-
`- Remaining Work Item candidates: ${pack.roadmap.remaining_work_item_candidates}`
|
|
22800
|
-
].join("\n") + "\n"
|
|
22801
|
-
);
|
|
22802
|
-
if (pack.roadmap.remaining_work_item_candidates > 0) {
|
|
22958
|
+
if (project.mode !== "poc") {
|
|
22959
|
+
parts.push("## Roadmap Status\n");
|
|
22960
|
+
if (pack.roadmap.present) {
|
|
22803
22961
|
parts.push(
|
|
22804
|
-
|
|
22962
|
+
[
|
|
22963
|
+
`- Initiatives: ${pack.roadmap.initiatives}`,
|
|
22964
|
+
`- Work Item candidates: ${pack.roadmap.work_item_candidates}`,
|
|
22965
|
+
`- Materialized Work Items: ${pack.roadmap.materialized_work_items}`,
|
|
22966
|
+
`- Remaining Work Item candidates: ${pack.roadmap.remaining_work_item_candidates}`
|
|
22967
|
+
].join("\n") + "\n"
|
|
22805
22968
|
);
|
|
22969
|
+
if (pack.roadmap.remaining_work_item_candidates > 0) {
|
|
22970
|
+
parts.push(
|
|
22971
|
+
"Work Item candidates are not yet Work Items. Materialize them with `kaddo create --from roadmap`.\n"
|
|
22972
|
+
);
|
|
22973
|
+
}
|
|
22806
22974
|
}
|
|
22975
|
+
parts.push((knowledge.roadmapSummary || "No roadmap baseline found.") + "\n");
|
|
22807
22976
|
}
|
|
22808
|
-
parts.push((knowledge.roadmapSummary || "No roadmap baseline found.") + "\n");
|
|
22809
22977
|
const rq = pack.roadmapQuality;
|
|
22810
22978
|
const rqi = rq.initiatives;
|
|
22811
22979
|
const rqw = rq.work_item_candidates;
|
|
22812
|
-
if (rqi.total > 0 || rqw.total > 0) {
|
|
22980
|
+
if (project.mode !== "poc" && (rqi.total > 0 || rqw.total > 0)) {
|
|
22813
22981
|
parts.push("## Roadmap Quality\n");
|
|
22814
22982
|
if (rqi.total > 0) {
|
|
22815
22983
|
parts.push(
|
|
@@ -23024,7 +23192,13 @@ function renderContextPack(pack) {
|
|
|
23024
23192
|
function agentIsInstalled(dir, fileName) {
|
|
23025
23193
|
return exists(join(dir, agentInstallPath(fileName))) || exists(join(dir, "knowledge", "agents", fileName));
|
|
23026
23194
|
}
|
|
23027
|
-
function flowForState(state) {
|
|
23195
|
+
function flowForState(state, mode) {
|
|
23196
|
+
if (mode === "poc") {
|
|
23197
|
+
return [
|
|
23198
|
+
{ agent: "architecture-agent.md", output: "knowledge/tech/current-state.md" },
|
|
23199
|
+
{ agent: "work-item-agent.md", output: "knowledge/delivery/poc.md" }
|
|
23200
|
+
];
|
|
23201
|
+
}
|
|
23028
23202
|
switch (state) {
|
|
23029
23203
|
case "new":
|
|
23030
23204
|
return [
|
|
@@ -23049,9 +23223,10 @@ function flowForState(state) {
|
|
|
23049
23223
|
}
|
|
23050
23224
|
function buildUnderstandPlan(dir, config) {
|
|
23051
23225
|
const state = config.project.state;
|
|
23226
|
+
const mode = projectMode(config);
|
|
23052
23227
|
if (isModule(config)) {
|
|
23053
23228
|
return {
|
|
23054
|
-
project: { name: config.project.name, state, teamSize: config.team.size, structure: config.project.structure, language: "English" },
|
|
23229
|
+
project: { name: config.project.name, state, mode, teamSize: config.team.size, structure: config.project.structure, language: "English" },
|
|
23055
23230
|
steps: [],
|
|
23056
23231
|
missingAgents: [],
|
|
23057
23232
|
agentsInstalled: true,
|
|
@@ -23059,7 +23234,7 @@ function buildUnderstandPlan(dir, config) {
|
|
|
23059
23234
|
contextPackPath: ".kaddo/context-pack.md"
|
|
23060
23235
|
};
|
|
23061
23236
|
}
|
|
23062
|
-
const flow = flowForState(state).filter((s) => !exists(join(dir, s.output)));
|
|
23237
|
+
const flow = flowForState(state, mode).filter((s) => !exists(join(dir, s.output)));
|
|
23063
23238
|
const steps = flow.map((s) => {
|
|
23064
23239
|
const installed = agentIsInstalled(dir, s.agent);
|
|
23065
23240
|
return { agent: s.agent, output: s.output, installed };
|
|
@@ -23070,6 +23245,7 @@ function buildUnderstandPlan(dir, config) {
|
|
|
23070
23245
|
project: {
|
|
23071
23246
|
name: config.project.name,
|
|
23072
23247
|
state,
|
|
23248
|
+
mode,
|
|
23073
23249
|
teamSize: config.team.size,
|
|
23074
23250
|
structure: config.project.structure,
|
|
23075
23251
|
language: "English"
|
package/package.json
CHANGED