@harness-engineering/cli 2.7.1 → 2.8.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/agents/personas/adversarial-reviewer.yaml +43 -0
- package/dist/agents/personas/frontend-races-reviewer.yaml +54 -0
- package/dist/agents/personas/typescript-strict-reviewer.yaml +53 -0
- package/dist/agents/skills/CHANGELOG.md +12 -0
- package/dist/agents/skills/claude-code/align-design-system/SKILL.md +18 -0
- package/dist/agents/skills/claude-code/align-design-system/skill.yaml +3 -0
- package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +37 -5
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +107 -22
- package/dist/agents/skills/claude-code/harness-code-review/references/confidence-rubric.md +45 -0
- package/dist/agents/skills/claude-code/harness-code-review/references/risk-keywords.md +40 -0
- package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +3 -0
- package/dist/agents/skills/claude-code/harness-compound/SKILL.md +7 -4
- package/dist/agents/skills/claude-code/harness-ideate/SKILL.md +277 -0
- package/dist/agents/skills/claude-code/harness-ideate/references/scoring.md +88 -0
- package/dist/agents/skills/claude-code/harness-ideate/skill.yaml +66 -0
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +14 -4
- package/dist/agents/skills/claude-code/harness-pulse/SKILL.md +12 -16
- package/dist/agents/skills/claude-code/harness-roadmap-pilot/SKILL.md +34 -6
- package/dist/agents/skills/claude-code/harness-strategy/SKILL.md +152 -0
- package/dist/agents/skills/claude-code/harness-strategy/references/interview.md +122 -0
- package/dist/agents/skills/claude-code/harness-strategy/skill.yaml +54 -0
- package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +76 -10
- package/dist/agents/skills/codex/align-design-system/SKILL.md +18 -0
- package/dist/agents/skills/codex/align-design-system/skill.yaml +3 -0
- package/dist/agents/skills/codex/harness-brainstorming/SKILL.md +37 -5
- package/dist/agents/skills/codex/harness-code-review/SKILL.md +107 -22
- package/dist/agents/skills/codex/harness-code-review/references/confidence-rubric.md +45 -0
- package/dist/agents/skills/codex/harness-code-review/references/risk-keywords.md +40 -0
- package/dist/agents/skills/codex/harness-code-review/skill.yaml +3 -0
- package/dist/agents/skills/codex/harness-compound/SKILL.md +7 -4
- package/dist/agents/skills/codex/harness-ideate/SKILL.md +277 -0
- package/dist/agents/skills/codex/harness-ideate/references/scoring.md +88 -0
- package/dist/agents/skills/codex/harness-ideate/skill.yaml +66 -0
- package/dist/agents/skills/codex/harness-planning/SKILL.md +14 -4
- package/dist/agents/skills/codex/harness-pulse/SKILL.md +12 -16
- package/dist/agents/skills/codex/harness-roadmap-pilot/SKILL.md +34 -6
- package/dist/agents/skills/codex/harness-strategy/SKILL.md +152 -0
- package/dist/agents/skills/codex/harness-strategy/references/interview.md +122 -0
- package/dist/agents/skills/codex/harness-strategy/skill.yaml +54 -0
- package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +76 -10
- package/dist/agents/skills/cursor/align-design-system/SKILL.md +18 -0
- package/dist/agents/skills/cursor/align-design-system/skill.yaml +3 -0
- package/dist/agents/skills/cursor/harness-brainstorming/SKILL.md +37 -5
- package/dist/agents/skills/cursor/harness-code-review/SKILL.md +107 -22
- package/dist/agents/skills/cursor/harness-code-review/references/confidence-rubric.md +45 -0
- package/dist/agents/skills/cursor/harness-code-review/references/risk-keywords.md +40 -0
- package/dist/agents/skills/cursor/harness-code-review/skill.yaml +3 -0
- package/dist/agents/skills/cursor/harness-compound/SKILL.md +7 -4
- package/dist/agents/skills/cursor/harness-ideate/SKILL.md +277 -0
- package/dist/agents/skills/cursor/harness-ideate/references/scoring.md +88 -0
- package/dist/agents/skills/cursor/harness-ideate/skill.yaml +66 -0
- package/dist/agents/skills/cursor/harness-planning/SKILL.md +14 -4
- package/dist/agents/skills/cursor/harness-pulse/SKILL.md +12 -16
- package/dist/agents/skills/cursor/harness-roadmap-pilot/SKILL.md +34 -6
- package/dist/agents/skills/cursor/harness-strategy/SKILL.md +152 -0
- package/dist/agents/skills/cursor/harness-strategy/references/interview.md +122 -0
- package/dist/agents/skills/cursor/harness-strategy/skill.yaml +54 -0
- package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +76 -10
- package/dist/agents/skills/gemini-cli/align-design-system/SKILL.md +18 -0
- package/dist/agents/skills/gemini-cli/align-design-system/skill.yaml +3 -0
- package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +37 -5
- package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +107 -22
- package/dist/agents/skills/gemini-cli/harness-code-review/references/confidence-rubric.md +45 -0
- package/dist/agents/skills/gemini-cli/harness-code-review/references/risk-keywords.md +40 -0
- package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +3 -0
- package/dist/agents/skills/gemini-cli/harness-compound/SKILL.md +7 -4
- package/dist/agents/skills/gemini-cli/harness-ideate/SKILL.md +277 -0
- package/dist/agents/skills/gemini-cli/harness-ideate/references/scoring.md +88 -0
- package/dist/agents/skills/gemini-cli/harness-ideate/skill.yaml +66 -0
- package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +14 -4
- package/dist/agents/skills/gemini-cli/harness-pulse/SKILL.md +12 -16
- package/dist/agents/skills/gemini-cli/harness-roadmap-pilot/SKILL.md +34 -6
- package/dist/agents/skills/gemini-cli/harness-strategy/SKILL.md +152 -0
- package/dist/agents/skills/gemini-cli/harness-strategy/references/interview.md +122 -0
- package/dist/agents/skills/gemini-cli/harness-strategy/skill.yaml +54 -0
- package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +76 -10
- package/dist/agents/skills/package.json +1 -1
- package/dist/agents/skills/tests/harness-strategy.test.ts +145 -0
- package/dist/agents-md-WMJO5HSM.js +13 -0
- package/dist/analyzer-V633GUHY-MBCQWKDU.js +26 -0
- package/dist/{architecture-LUR2I67H.js → architecture-EVYVGPRZ.js} +6 -6
- package/dist/{assess-project-OJWECOP2.js → assess-project-KZG563SO.js} +1 -1
- package/dist/bin/harness-mcp.js +17 -17
- package/dist/bin/harness.js +27 -27
- package/dist/{check-phase-gate-HS5KYLRO.js → check-phase-gate-MK364VXS.js} +6 -6
- package/dist/{chunk-6UHDQP2N.js → chunk-2N4OENGE.js} +1 -1
- package/dist/{chunk-FC4JPM6W.js → chunk-2SNRCAC3.js} +3 -3
- package/dist/{chunk-LGYXR2KZ.js → chunk-4BDOSCNY.js} +137 -71
- package/dist/{chunk-N5NSSLMU.js → chunk-5XL5QJ5B.js} +2 -2
- package/dist/{chunk-LECXPXS3.js → chunk-7EQAZKJ5.js} +2 -2
- package/dist/{chunk-LYIPI2SJ.js → chunk-ACOOG3UW.js} +6 -6
- package/dist/{chunk-FXZI6NJ2.js → chunk-B7KMTHN3.js} +51 -4
- package/dist/{chunk-OH3NXXUY.js → chunk-BDGTZRZ6.js} +11 -1
- package/dist/{chunk-NIVWM7OW.js → chunk-C7J55C6E.js} +10 -10
- package/dist/{chunk-7PLIWP7U.js → chunk-CAQPSFPT.js} +4042 -738
- package/dist/{chunk-TIH53QXY.js → chunk-CLI4K2CH.js} +1 -1
- package/dist/{chunk-INBTDBV2.js → chunk-EEFRPEWT.js} +1 -1
- package/dist/{chunk-VI4IS55S.js → chunk-FZ5MBXEG.js} +6 -6
- package/dist/{chunk-WZY5U6NS.js → chunk-GOHWCHCS.js} +1809 -812
- package/dist/{chunk-VSIRUZQP.js → chunk-HRSE6IQD.js} +2 -2
- package/dist/{chunk-CZPOPMMI.js → chunk-KBCPELBC.js} +3 -3
- package/dist/{chunk-7AF6C5GE.js → chunk-KI6PHH6Q.js} +3 -3
- package/dist/{chunk-KN3EMDZ5.js → chunk-LADPYELQ.js} +23 -3
- package/dist/{chunk-Y4T6ENKQ.js → chunk-N55WOGN3.js} +86 -17
- package/dist/{chunk-H2ZJOJ7A.js → chunk-PP6ZRL5T.js} +316 -42
- package/dist/{chunk-RJ2WEES5.js → chunk-STESM73J.js} +2 -2
- package/dist/{chunk-B2VAYLYI.js → chunk-UBZQE3JN.js} +2 -2
- package/dist/{chunk-GGSNWH7P.js → chunk-UJFNIWC7.js} +5 -5
- package/dist/{chunk-FEKBXX2J.js → chunk-UUO4K7NX.js} +9 -9
- package/dist/{chunk-Z3TMCCZB.js → chunk-UXPWSV3B.js} +9 -9
- package/dist/{chunk-O2ASYKA6.js → chunk-VBNJAKUH.js} +2 -2
- package/dist/{chunk-PTHX545Q.js → chunk-X4EFYVCZ.js} +2 -2
- package/dist/{ci-workflow-MDSTHJOY.js → ci-workflow-IW2H5DC4.js} +5 -5
- package/dist/{dist-E3SAAHCM.js → dist-ICW4QUEW.js} +5 -1
- package/dist/{dist-72ID44UE.js → dist-JCFK263L.js} +52 -4
- package/dist/{dist-R3TOOPJ7.js → dist-OWHMNL4W.js} +1 -1
- package/dist/{docs-2RFOJ6XY.js → docs-7CP6VV42.js} +6 -6
- package/dist/engine-MKJEBWU7.js +13 -0
- package/dist/{entropy-3UX6644G.js → entropy-6JOZJYG7.js} +5 -5
- package/dist/{feedback-CVCFYND4.js → feedback-T65AEJEG.js} +1 -1
- package/dist/{generate-agent-definitions-HZ3XENWO.js → generate-agent-definitions-4VI4YTO2.js} +6 -6
- package/dist/{glob-helper-EX4YZKZO.js → glob-helper-GLZAURJC.js} +1 -1
- package/dist/{graph-loader-EIFEOUVI.js → graph-loader-HHXN5FLP.js} +1 -1
- package/dist/index.d.ts +202 -0
- package/dist/index.js +27 -27
- package/dist/{loader-6RHWU5FH.js → loader-AWTHHE3A.js} +5 -5
- package/dist/{mcp-OYR26JDI.js → mcp-JBIBINO2.js} +17 -17
- package/dist/{performance-JJMIRXCH.js → performance-NCOUDOMW.js} +6 -6
- package/dist/{review-pipeline-BHQZIXWZ.js → review-pipeline-YIC6JPMY.js} +5 -5
- package/dist/{runtime-DALTAVTN.js → runtime-5MHV4UEE.js} +5 -5
- package/dist/{scan-LYKLM4EQ.js → scan-P7YFKB77.js} +1 -1
- package/dist/{security-RMLMYFPB.js → security-VZPJNIDP.js} +1 -1
- package/dist/{validate-R7DZRDFK.js → validate-7BE4VTFI.js} +6 -6
- package/dist/validate-cross-check-F7GEBRDH.js +13 -0
- package/package.json +7 -7
- package/dist/agents-md-FKMKH6ZF.js +0 -13
- package/dist/analyzer-H3AHBFSL-KPOPJYRB.js +0 -26
- package/dist/engine-BSFKOGPN.js +0 -13
- package/dist/validate-cross-check-AUUZFNVL.js +0 -13
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5XL5QJ5B.js";
|
|
4
4
|
import {
|
|
5
5
|
generateAgentsMd
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7EQAZKJ5.js";
|
|
7
7
|
import {
|
|
8
8
|
generateCIWorkflow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-STESM73J.js";
|
|
10
10
|
import {
|
|
11
11
|
createGenerateAgentDefinitionsCommand,
|
|
12
12
|
generateAgentDefinitions
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EEFRPEWT.js";
|
|
14
14
|
import {
|
|
15
15
|
toKebabCase
|
|
16
16
|
} from "./chunk-KET4QQZB.js";
|
|
17
17
|
import {
|
|
18
18
|
createScanCommand,
|
|
19
19
|
loadIngestOptions
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2N4OENGE.js";
|
|
21
21
|
import {
|
|
22
22
|
TemplateEngine
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UBZQE3JN.js";
|
|
24
24
|
import {
|
|
25
25
|
generate,
|
|
26
26
|
validate
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
listPersonas,
|
|
33
33
|
loadPersona
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-X4EFYVCZ.js";
|
|
35
35
|
import {
|
|
36
36
|
runPersona
|
|
37
37
|
} from "./chunk-GISMXMVL.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
OutputMode,
|
|
47
47
|
createCheckPhaseGateCommand,
|
|
48
48
|
findFiles
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-2SNRCAC3.js";
|
|
50
50
|
import {
|
|
51
51
|
appendFrameworkAgents,
|
|
52
52
|
captureHealthSnapshot,
|
|
@@ -74,13 +74,13 @@ import {
|
|
|
74
74
|
runSecurityCraft,
|
|
75
75
|
runSpecCraft,
|
|
76
76
|
runTestCraft
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-CAQPSFPT.js";
|
|
78
78
|
import {
|
|
79
79
|
VALID_PLATFORMS
|
|
80
80
|
} from "./chunk-3ISINLYT.js";
|
|
81
81
|
import {
|
|
82
82
|
loadGraphStore
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-CLI4K2CH.js";
|
|
84
84
|
import {
|
|
85
85
|
loadOrRebuildIndex
|
|
86
86
|
} from "./chunk-27AJKSQY.js";
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
BranchingConfigSchema,
|
|
100
100
|
findConfigFile,
|
|
101
101
|
resolveConfig
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-B7KMTHN3.js";
|
|
103
103
|
import {
|
|
104
104
|
logger
|
|
105
105
|
} from "./chunk-EBJQ6N4M.js";
|
|
@@ -191,9 +191,10 @@ import {
|
|
|
191
191
|
validatePulseConfig,
|
|
192
192
|
validateRoadmapMode,
|
|
193
193
|
validateSolutionsDir,
|
|
194
|
+
validateStrategy,
|
|
194
195
|
writeConfig,
|
|
195
196
|
writeLockfile
|
|
196
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-GOHWCHCS.js";
|
|
197
198
|
import {
|
|
198
199
|
CLI_VERSION
|
|
199
200
|
} from "./chunk-BM3PWGXQ.js";
|
|
@@ -206,20 +207,20 @@ import {
|
|
|
206
207
|
detectDocDrift,
|
|
207
208
|
generateSuggestions,
|
|
208
209
|
validateDependencies
|
|
209
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-N55WOGN3.js";
|
|
210
211
|
import {
|
|
211
212
|
Err,
|
|
212
213
|
INDEXED_FILE_KINDS,
|
|
213
214
|
INSIGHTS_KEYS,
|
|
214
215
|
Ok,
|
|
215
216
|
init_dist
|
|
216
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-BDGTZRZ6.js";
|
|
217
218
|
import {
|
|
218
219
|
DEFAULT_SKIP_DIRS,
|
|
219
220
|
DesignConstraintAdapter,
|
|
220
221
|
GraphStore,
|
|
221
222
|
init_dist as init_dist2
|
|
222
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-PP6ZRL5T.js";
|
|
223
224
|
import {
|
|
224
225
|
ArchConfigSchema,
|
|
225
226
|
TimelineManager
|
|
@@ -419,7 +420,7 @@ function registerSkillsCommand(adoption) {
|
|
|
419
420
|
const globalOpts = cmd.optsWithGlobals();
|
|
420
421
|
const limit = Math.max(parseInt(opts.limit, 10) || 20, 1);
|
|
421
422
|
const cwd = process.cwd();
|
|
422
|
-
const { readAdoptionRecords, aggregateBySkill } = await import("./dist-
|
|
423
|
+
const { readAdoptionRecords, aggregateBySkill } = await import("./dist-JCFK263L.js");
|
|
423
424
|
const records = readAdoptionRecords(cwd);
|
|
424
425
|
if (records.length === 0) {
|
|
425
426
|
if (globalOpts.json) {
|
|
@@ -455,7 +456,7 @@ function registerRecentCommand(adoption) {
|
|
|
455
456
|
const globalOpts = cmd.optsWithGlobals();
|
|
456
457
|
const limit = Math.max(parseInt(opts.limit, 10) || 20, 1);
|
|
457
458
|
const cwd = process.cwd();
|
|
458
|
-
const { readAdoptionRecords } = await import("./dist-
|
|
459
|
+
const { readAdoptionRecords } = await import("./dist-JCFK263L.js");
|
|
459
460
|
const records = readAdoptionRecords(cwd);
|
|
460
461
|
if (records.length === 0) {
|
|
461
462
|
if (globalOpts.json) {
|
|
@@ -533,7 +534,7 @@ function registerSkillCommand(adoption) {
|
|
|
533
534
|
adoption.command("skill <name>").description("Show detail for a specific skill").action(async (name, _opts, cmd) => {
|
|
534
535
|
const globalOpts = cmd.optsWithGlobals();
|
|
535
536
|
const cwd = process.cwd();
|
|
536
|
-
const { readAdoptionRecords, aggregateBySkill } = await import("./dist-
|
|
537
|
+
const { readAdoptionRecords, aggregateBySkill } = await import("./dist-JCFK263L.js");
|
|
537
538
|
const records = readAdoptionRecords(cwd);
|
|
538
539
|
const skillRecords = records.filter((r) => r.skill === name);
|
|
539
540
|
if (skillRecords.length === 0) {
|
|
@@ -848,6 +849,9 @@ function createAlignDesignSystemCommand() {
|
|
|
848
849
|
).option(
|
|
849
850
|
"--design-strictness <level>",
|
|
850
851
|
"Override design.strictness: strict | standard | permissive"
|
|
852
|
+
).option(
|
|
853
|
+
"--revert",
|
|
854
|
+
"Inverse-apply the most-recent batch recorded at .harness/align/last-batch.json. Skips files edited externally since the apply."
|
|
851
855
|
).action(async (opts, cmd) => {
|
|
852
856
|
const globalOpts = cmd.optsWithGlobals();
|
|
853
857
|
const outputMode = resolveOutputMode(globalOpts);
|
|
@@ -858,6 +862,7 @@ function createAlignDesignSystemCommand() {
|
|
|
858
862
|
if (opts.files !== void 0) input.files = opts.files;
|
|
859
863
|
if (opts.mode !== void 0) input.mode = opts.mode;
|
|
860
864
|
if (opts.designStrictness !== void 0) input.designStrictness = opts.designStrictness;
|
|
865
|
+
if (opts.revert === true) input.revert = true;
|
|
861
866
|
let result;
|
|
862
867
|
try {
|
|
863
868
|
result = await runAlignDesignSystem(input);
|
|
@@ -884,7 +889,11 @@ function printAlignResult(result, mode, _formatter) {
|
|
|
884
889
|
const verbose = mode === OutputMode.VERBOSE;
|
|
885
890
|
const { summary, outcomes, meta } = result;
|
|
886
891
|
if (outcomes.length === 0) {
|
|
887
|
-
|
|
892
|
+
if (meta.revert === true) {
|
|
893
|
+
console.log("No batch to revert (.harness/align/last-batch.json missing or empty).");
|
|
894
|
+
} else {
|
|
895
|
+
console.log("No drift findings to align.");
|
|
896
|
+
}
|
|
888
897
|
return;
|
|
889
898
|
}
|
|
890
899
|
const byFile = /* @__PURE__ */ new Map();
|
|
@@ -914,8 +923,9 @@ ${file}`);
|
|
|
914
923
|
}
|
|
915
924
|
}
|
|
916
925
|
console.log("");
|
|
926
|
+
const action = meta.revert === true ? "reverted" : "applied";
|
|
917
927
|
console.log(
|
|
918
|
-
`Summary: ${summary.applied}
|
|
928
|
+
`Summary: ${summary.applied} ${action}, ${summary.suggestions} suggestions, ${summary.skipped} skipped, ${summary.failed} failed (${summary.filesModified} files modified, ${summary.durationMs}ms)`
|
|
919
929
|
);
|
|
920
930
|
if (meta.dryRun) {
|
|
921
931
|
console.log("(dry-run \u2014 no files written)");
|
|
@@ -4225,7 +4235,7 @@ async function readConnectorSyncStatus(graphDir) {
|
|
|
4225
4235
|
return result;
|
|
4226
4236
|
}
|
|
4227
4237
|
async function runGraphStatus(projectPath) {
|
|
4228
|
-
const { GraphStore: GraphStore2, loadGraphMetadata } = await import("./dist-
|
|
4238
|
+
const { GraphStore: GraphStore2, loadGraphMetadata } = await import("./dist-OWHMNL4W.js");
|
|
4229
4239
|
const graphDir = path16.join(projectPath, ".harness", "graph");
|
|
4230
4240
|
const metaResult = await loadGraphMetadata(graphDir);
|
|
4231
4241
|
if (metaResult.status === "not_found") {
|
|
@@ -4277,7 +4287,7 @@ async function runGraphStatus(projectPath) {
|
|
|
4277
4287
|
// src/commands/graph/export.ts
|
|
4278
4288
|
import * as path17 from "path";
|
|
4279
4289
|
async function runGraphExport(projectPath, format) {
|
|
4280
|
-
const { GraphStore: GraphStore2 } = await import("./dist-
|
|
4290
|
+
const { GraphStore: GraphStore2 } = await import("./dist-OWHMNL4W.js");
|
|
4281
4291
|
const graphDir = path17.join(projectPath, ".harness", "graph");
|
|
4282
4292
|
const store = new GraphStore2();
|
|
4283
4293
|
const loaded = await store.load(graphDir);
|
|
@@ -4313,7 +4323,7 @@ import * as path20 from "path";
|
|
|
4313
4323
|
import { Command as Command33 } from "commander";
|
|
4314
4324
|
import * as path18 from "path";
|
|
4315
4325
|
async function runQuery(projectPath, rootNodeId, opts) {
|
|
4316
|
-
const { GraphStore: GraphStore2, ContextQL } = await import("./dist-
|
|
4326
|
+
const { GraphStore: GraphStore2, ContextQL } = await import("./dist-OWHMNL4W.js");
|
|
4317
4327
|
const store = new GraphStore2();
|
|
4318
4328
|
const graphDir = path18.join(projectPath, ".harness", "graph");
|
|
4319
4329
|
const loaded = await store.load(graphDir);
|
|
@@ -4375,6 +4385,13 @@ async function loadConnectorConfig(projectPath, source) {
|
|
|
4375
4385
|
return {};
|
|
4376
4386
|
}
|
|
4377
4387
|
}
|
|
4388
|
+
async function ingestBusinessKnowledge(bk, projectPath) {
|
|
4389
|
+
return mergeResults(
|
|
4390
|
+
await bk.ingest(path19.join(projectPath, "docs", "knowledge")),
|
|
4391
|
+
await bk.ingestSolutions(path19.join(projectPath, "docs", "solutions")),
|
|
4392
|
+
await bk.ingestStrategy(path19.join(projectPath, "STRATEGY.md"))
|
|
4393
|
+
);
|
|
4394
|
+
}
|
|
4378
4395
|
function mergeResults(...results) {
|
|
4379
4396
|
return results.reduce(
|
|
4380
4397
|
(acc, r) => ({
|
|
@@ -4401,6 +4418,7 @@ async function runIngest(projectPath, source, opts) {
|
|
|
4401
4418
|
CodeIngestor,
|
|
4402
4419
|
TopologicalLinker,
|
|
4403
4420
|
KnowledgeIngestor,
|
|
4421
|
+
BusinessKnowledgeIngestor,
|
|
4404
4422
|
GitIngestor,
|
|
4405
4423
|
RequirementIngestor,
|
|
4406
4424
|
SyncManager,
|
|
@@ -4410,7 +4428,7 @@ async function runIngest(projectPath, source, opts) {
|
|
|
4410
4428
|
ConfluenceConnector,
|
|
4411
4429
|
FigmaConnector,
|
|
4412
4430
|
MiroConnector
|
|
4413
|
-
} = await import("./dist-
|
|
4431
|
+
} = await import("./dist-OWHMNL4W.js");
|
|
4414
4432
|
const graphDir = path19.join(projectPath, ".harness", "graph");
|
|
4415
4433
|
const store = new GraphStore2();
|
|
4416
4434
|
await store.load(graphDir);
|
|
@@ -4420,11 +4438,13 @@ async function runIngest(projectPath, source, opts) {
|
|
|
4420
4438
|
const codeResult = await new CodeIngestor(store, ingestOptions).ingest(projectPath);
|
|
4421
4439
|
new TopologicalLinker(store).link();
|
|
4422
4440
|
const knowledgeResult = await new KnowledgeIngestor(store).ingestAll(projectPath);
|
|
4441
|
+
const bkInst = new BusinessKnowledgeIngestor(store);
|
|
4442
|
+
const bkResult = await ingestBusinessKnowledge(bkInst, projectPath);
|
|
4423
4443
|
const reqResult = await new RequirementIngestor(store).ingestSpecs(
|
|
4424
4444
|
path19.join(projectPath, "docs", "changes")
|
|
4425
4445
|
);
|
|
4426
4446
|
const gitResult = await new GitIngestor(store).ingest(projectPath);
|
|
4427
|
-
const { createExtractionRunner } = await import("./dist-
|
|
4447
|
+
const { createExtractionRunner } = await import("./dist-OWHMNL4W.js");
|
|
4428
4448
|
const extractedDir = path19.join(projectPath, ".harness", "knowledge", "extracted");
|
|
4429
4449
|
const signalsResult = await createExtractionRunner().run(projectPath, store, extractedDir);
|
|
4430
4450
|
const syncManager = new SyncManager(store, graphDir);
|
|
@@ -4445,6 +4465,7 @@ async function runIngest(projectPath, source, opts) {
|
|
|
4445
4465
|
const merged = mergeResults(
|
|
4446
4466
|
codeResult,
|
|
4447
4467
|
knowledgeResult,
|
|
4468
|
+
bkResult,
|
|
4448
4469
|
reqResult,
|
|
4449
4470
|
gitResult,
|
|
4450
4471
|
signalsResult,
|
|
@@ -4458,9 +4479,12 @@ async function runIngest(projectPath, source, opts) {
|
|
|
4458
4479
|
result = await new CodeIngestor(store, ingestOptions).ingest(projectPath);
|
|
4459
4480
|
new TopologicalLinker(store).link();
|
|
4460
4481
|
break;
|
|
4461
|
-
case "knowledge":
|
|
4462
|
-
|
|
4482
|
+
case "knowledge": {
|
|
4483
|
+
const knowledge = await new KnowledgeIngestor(store).ingestAll(projectPath);
|
|
4484
|
+
const bk = await ingestBusinessKnowledge(new BusinessKnowledgeIngestor(store), projectPath);
|
|
4485
|
+
result = mergeResults(knowledge, bk);
|
|
4463
4486
|
break;
|
|
4487
|
+
}
|
|
4464
4488
|
case "git":
|
|
4465
4489
|
result = await new GitIngestor(store).ingest(projectPath);
|
|
4466
4490
|
break;
|
|
@@ -4470,7 +4494,7 @@ async function runIngest(projectPath, source, opts) {
|
|
|
4470
4494
|
);
|
|
4471
4495
|
break;
|
|
4472
4496
|
case "business-signals": {
|
|
4473
|
-
const { createExtractionRunner } = await import("./dist-
|
|
4497
|
+
const { createExtractionRunner } = await import("./dist-OWHMNL4W.js");
|
|
4474
4498
|
const extractedDir = path19.join(projectPath, ".harness", "knowledge", "extracted");
|
|
4475
4499
|
result = await createExtractionRunner().run(projectPath, store, extractedDir);
|
|
4476
4500
|
break;
|
|
@@ -4506,35 +4530,41 @@ async function runIngest(projectPath, source, opts) {
|
|
|
4506
4530
|
await store.save(graphDir);
|
|
4507
4531
|
return result;
|
|
4508
4532
|
}
|
|
4533
|
+
function printIngestSummary(result, label) {
|
|
4534
|
+
console.log(
|
|
4535
|
+
`Ingested (${label}): +${result.nodesAdded} nodes, +${result.edgesAdded} edges (${result.durationMs}ms)`
|
|
4536
|
+
);
|
|
4537
|
+
if (result.errors.length === 0) return;
|
|
4538
|
+
console.warn(` ${result.errors.length} parse/skip warning(s):`);
|
|
4539
|
+
for (const err of result.errors) console.warn(` - ${err}`);
|
|
4540
|
+
}
|
|
4541
|
+
async function handleIngestAction(opts, cmd) {
|
|
4542
|
+
if (!opts.source && !opts.all) {
|
|
4543
|
+
console.error("Error: --source or --all is required");
|
|
4544
|
+
process.exit(1);
|
|
4545
|
+
}
|
|
4546
|
+
const globalOpts = cmd.optsWithGlobals();
|
|
4547
|
+
const projectPath = path19.resolve(globalOpts.config ? path19.dirname(globalOpts.config) : ".");
|
|
4548
|
+
try {
|
|
4549
|
+
const runOpts = {};
|
|
4550
|
+
if (opts.full !== void 0) runOpts.full = opts.full;
|
|
4551
|
+
if (opts.all !== void 0) runOpts.all = opts.all;
|
|
4552
|
+
const result = await runIngest(projectPath, opts.source ?? "", runOpts);
|
|
4553
|
+
if (globalOpts.json) {
|
|
4554
|
+
console.log(JSON.stringify(result));
|
|
4555
|
+
} else {
|
|
4556
|
+
printIngestSummary(result, opts.all ? "all" : opts.source ?? "");
|
|
4557
|
+
}
|
|
4558
|
+
} catch (err) {
|
|
4559
|
+
console.error("Ingest failed:", err instanceof Error ? err.message : err);
|
|
4560
|
+
process.exit(2);
|
|
4561
|
+
}
|
|
4562
|
+
}
|
|
4509
4563
|
function createIngestCommand() {
|
|
4510
4564
|
return new Command34("ingest").description("Ingest data into the knowledge graph").option(
|
|
4511
4565
|
"--source <name>",
|
|
4512
4566
|
"Source to ingest (code, knowledge, git, requirements, business-signals, jira, slack, ci, confluence, figma, miro)"
|
|
4513
|
-
).option("--all", "Run all sources (code, knowledge, git, and configured connectors)").option("--full", "Force full re-ingestion").action(
|
|
4514
|
-
if (!opts.source && !opts.all) {
|
|
4515
|
-
console.error("Error: --source or --all is required");
|
|
4516
|
-
process.exit(1);
|
|
4517
|
-
}
|
|
4518
|
-
const globalOpts = cmd.optsWithGlobals();
|
|
4519
|
-
const projectPath = path19.resolve(globalOpts.config ? path19.dirname(globalOpts.config) : ".");
|
|
4520
|
-
try {
|
|
4521
|
-
const result = await runIngest(projectPath, opts.source ?? "", {
|
|
4522
|
-
full: opts.full,
|
|
4523
|
-
all: opts.all
|
|
4524
|
-
});
|
|
4525
|
-
if (globalOpts.json) {
|
|
4526
|
-
console.log(JSON.stringify(result));
|
|
4527
|
-
} else {
|
|
4528
|
-
const label = opts.all ? "all" : opts.source;
|
|
4529
|
-
console.log(
|
|
4530
|
-
`Ingested (${label}): +${result.nodesAdded} nodes, +${result.edgesAdded} edges (${result.durationMs}ms)`
|
|
4531
|
-
);
|
|
4532
|
-
}
|
|
4533
|
-
} catch (err) {
|
|
4534
|
-
console.error("Ingest failed:", err instanceof Error ? err.message : err);
|
|
4535
|
-
process.exit(2);
|
|
4536
|
-
}
|
|
4537
|
-
});
|
|
4567
|
+
).option("--all", "Run all sources (code, knowledge, git, and configured connectors)").option("--full", "Force full re-ingestion").action(handleIngestAction);
|
|
4538
4568
|
}
|
|
4539
4569
|
|
|
4540
4570
|
// src/commands/graph/index.ts
|
|
@@ -5368,7 +5398,19 @@ var ALL_MCP_TOOLS = [
|
|
|
5368
5398
|
// craft-pipeline #9 — knowledge-craft LLM-judgment ceiling skill (docs/knowledge/ entries)
|
|
5369
5399
|
"knowledge_craft",
|
|
5370
5400
|
// craft-pipeline #10 — security-craft LLM-judgment ceiling skill (AST-driven, conservative-confidence)
|
|
5371
|
-
"security_craft"
|
|
5401
|
+
"security_craft",
|
|
5402
|
+
// strategic-anchor — STRATEGY.md read/validate/write so projects can call
|
|
5403
|
+
// these via MCP without needing @harness-engineering/core in node_modules
|
|
5404
|
+
"validate_strategy",
|
|
5405
|
+
"read_strategy",
|
|
5406
|
+
"write_strategy",
|
|
5407
|
+
// strategic-anchor — pulse config writer + STRATEGY.md seed extractor
|
|
5408
|
+
"write_pulse_config",
|
|
5409
|
+
"seed_pulse_from_strategy",
|
|
5410
|
+
// strategic-anchor — compound lock acquire/release (server holds the handle;
|
|
5411
|
+
// skill threads a token between calls)
|
|
5412
|
+
"acquire_compound_lock",
|
|
5413
|
+
"release_compound_lock"
|
|
5372
5414
|
];
|
|
5373
5415
|
async function runCursorToolPicker() {
|
|
5374
5416
|
try {
|
|
@@ -5744,7 +5786,7 @@ function createInsightsCommand() {
|
|
|
5744
5786
|
return new Command44("insights").description("Composite project report \u2014 health, entropy, decay, attention, impact.").option("--json", "Emit JSON to stdout instead of pretty text").option("--skip <list>", `Comma-separated keys to skip (${INSIGHTS_KEYS.join(",")})`).action(async (opts) => {
|
|
5745
5787
|
const cwd = process.cwd();
|
|
5746
5788
|
const skip = parseSkip2(opts.skip);
|
|
5747
|
-
const { composeInsights } = await import("./dist-
|
|
5789
|
+
const { composeInsights } = await import("./dist-JCFK263L.js");
|
|
5748
5790
|
const report = await composeInsights(cwd, { skip });
|
|
5749
5791
|
if (opts.json) {
|
|
5750
5792
|
console.log(JSON.stringify(report, null, 2));
|
|
@@ -6944,7 +6986,7 @@ function createKnowledgePipelineCommand() {
|
|
|
6944
6986
|
const graphDir = path39.join(projectDir, ".harness", "graph");
|
|
6945
6987
|
const fs48 = await import("fs/promises");
|
|
6946
6988
|
await fs48.mkdir(graphDir, { recursive: true });
|
|
6947
|
-
const { GraphStore: GraphStore2, KnowledgePipelineRunner } = await import("./dist-
|
|
6989
|
+
const { GraphStore: GraphStore2, KnowledgePipelineRunner } = await import("./dist-OWHMNL4W.js");
|
|
6948
6990
|
const store = new GraphStore2();
|
|
6949
6991
|
try {
|
|
6950
6992
|
await store.load(graphDir);
|
|
@@ -7000,6 +7042,7 @@ function createKnowledgePipelineCommand() {
|
|
|
7000
7042
|
iterations: result.iterations,
|
|
7001
7043
|
findings: result.findings,
|
|
7002
7044
|
extraction: result.extraction,
|
|
7045
|
+
errors: result.errors,
|
|
7003
7046
|
gaps: {
|
|
7004
7047
|
domains: result.gaps.domains.length,
|
|
7005
7048
|
totalEntries: result.gaps.totalEntries,
|
|
@@ -7040,7 +7083,7 @@ function createKnowledgePipelineCommand() {
|
|
|
7040
7083
|
` Findings: ${result.findings.new} new, ${result.findings.stale} stale, ${result.findings.drifted} drifted, ${result.findings.contradicting} contradicting`
|
|
7041
7084
|
);
|
|
7042
7085
|
console.log(
|
|
7043
|
-
` Extraction: ${result.extraction.codeSignals} code signals, ${result.extraction.diagrams} diagrams, ${result.extraction.linkerFacts} linker facts, ${result.extraction.businessKnowledge} business knowledge, ${result.extraction.images} images`
|
|
7086
|
+
` Extraction: ${result.extraction.codeSignals} code signals, ${result.extraction.diagrams} diagrams, ${result.extraction.linkerFacts} linker facts, ${result.extraction.businessKnowledge} business knowledge, ${result.extraction.decisions} decisions, ${result.extraction.images} images`
|
|
7044
7087
|
);
|
|
7045
7088
|
console.log(
|
|
7046
7089
|
` Gaps: ${result.gaps.domains.length} domains \u2014 ${result.gaps.totalEntries} documented / ${result.gaps.totalExtracted} extracted / ${result.gaps.totalGaps} undocumented`
|
|
@@ -7051,6 +7094,13 @@ function createKnowledgePipelineCommand() {
|
|
|
7051
7094
|
if (result.remediations.length > 0) {
|
|
7052
7095
|
console.log(` Remediations: ${result.remediations.length} applied`);
|
|
7053
7096
|
}
|
|
7097
|
+
if (result.errors.length > 0) {
|
|
7098
|
+
console.warn("");
|
|
7099
|
+
console.warn(` ${result.errors.length} ingestion warning(s):`);
|
|
7100
|
+
for (const err of result.errors) {
|
|
7101
|
+
console.warn(` - ${err}`);
|
|
7102
|
+
}
|
|
7103
|
+
}
|
|
7054
7104
|
if (result.materialization) {
|
|
7055
7105
|
const mat = result.materialization;
|
|
7056
7106
|
console.log(
|
|
@@ -7446,7 +7496,7 @@ function createMcpCommand() {
|
|
|
7446
7496
|
parseBudget
|
|
7447
7497
|
).action(async (opts) => {
|
|
7448
7498
|
const [{ startServer: startServer2, getToolDefinitions: getToolDefinitions2 }, { selectTier }] = await Promise.all([
|
|
7449
|
-
import("./mcp-
|
|
7499
|
+
import("./mcp-JBIBINO2.js"),
|
|
7450
7500
|
import("./tool-tiers-B7JC2XC3.js")
|
|
7451
7501
|
]);
|
|
7452
7502
|
if (opts.tools && opts.tools.length > 0) {
|
|
@@ -8521,7 +8571,7 @@ function registerBenchCommand(perf) {
|
|
|
8521
8571
|
perf.command("bench [glob]").description("Run benchmarks via vitest bench").action(async (glob2, _opts, cmd) => {
|
|
8522
8572
|
const globalOpts = cmd.optsWithGlobals();
|
|
8523
8573
|
const cwd = process.cwd();
|
|
8524
|
-
const { BenchmarkRunner } = await import("./dist-
|
|
8574
|
+
const { BenchmarkRunner } = await import("./dist-JCFK263L.js");
|
|
8525
8575
|
const runner = new BenchmarkRunner();
|
|
8526
8576
|
const benchFiles = runner.discover(cwd, glob2);
|
|
8527
8577
|
if (benchFiles.length === 0) {
|
|
@@ -8585,7 +8635,7 @@ async function runBaselinesShow(globalOpts) {
|
|
|
8585
8635
|
}
|
|
8586
8636
|
async function runBaselinesUpdate(globalOpts) {
|
|
8587
8637
|
const cwd = process.cwd();
|
|
8588
|
-
const { BenchmarkRunner } = await import("./dist-
|
|
8638
|
+
const { BenchmarkRunner } = await import("./dist-JCFK263L.js");
|
|
8589
8639
|
const runner = new BenchmarkRunner();
|
|
8590
8640
|
const manager = new BaselineManager(cwd);
|
|
8591
8641
|
logger.info("Running benchmarks to update baselines...");
|
|
@@ -8626,7 +8676,7 @@ function registerReportCommand(perf) {
|
|
|
8626
8676
|
perf.command("report").description("Full performance report with metrics, trends, and hotspots").action(async (_opts, cmd) => {
|
|
8627
8677
|
const globalOpts = cmd.optsWithGlobals();
|
|
8628
8678
|
const cwd = process.cwd();
|
|
8629
|
-
const { EntropyAnalyzer: EntropyAnalyzer2 } = await import("./dist-
|
|
8679
|
+
const { EntropyAnalyzer: EntropyAnalyzer2 } = await import("./dist-JCFK263L.js");
|
|
8630
8680
|
const analyzer = new EntropyAnalyzer2({
|
|
8631
8681
|
rootDir: path46.resolve(cwd),
|
|
8632
8682
|
analyze: { complexity: true, coupling: true }
|
|
@@ -9153,7 +9203,7 @@ async function runPublishAnalyses(opts) {
|
|
|
9153
9203
|
const nameToExternalId = await buildNameToExternalIdMap(projectPath);
|
|
9154
9204
|
if (!nameToExternalId) return process.exit(1);
|
|
9155
9205
|
const { AnalysisArchive } = await import("@harness-engineering/orchestrator");
|
|
9156
|
-
const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-
|
|
9206
|
+
const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-JCFK263L.js");
|
|
9157
9207
|
const archive = new AnalysisArchive(path48.join(projectPath, ".harness", "analyses"));
|
|
9158
9208
|
const analyses = await archive.list();
|
|
9159
9209
|
if (analyses.length === 0) {
|
|
@@ -10506,7 +10556,7 @@ async function detectLegacyLayout(cwd) {
|
|
|
10506
10556
|
}
|
|
10507
10557
|
async function runInitialGraphScan(cwd) {
|
|
10508
10558
|
try {
|
|
10509
|
-
const { runScan: runScan2 } = await import("./scan-
|
|
10559
|
+
const { runScan: runScan2 } = await import("./scan-P7YFKB77.js");
|
|
10510
10560
|
const result = await runScan2(cwd);
|
|
10511
10561
|
return {
|
|
10512
10562
|
status: "pass",
|
|
@@ -12104,7 +12154,7 @@ async function runSyncAnalyses(opts) {
|
|
|
12104
12154
|
return;
|
|
12105
12155
|
}
|
|
12106
12156
|
const { AnalysisArchive, loadPublishedIndex: loadPublishedIndex2, savePublishedIndex: savePublishedIndex2 } = await import("@harness-engineering/orchestrator");
|
|
12107
|
-
const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-
|
|
12157
|
+
const { GitHubIssuesSyncAdapter: GitHubIssuesSyncAdapter2 } = await import("./dist-JCFK263L.js");
|
|
12108
12158
|
const adapter = new GitHubIssuesSyncAdapter2({ token, config: trackerConfig });
|
|
12109
12159
|
const archive = new AnalysisArchive(path66.join(projectPath, ".harness", "analyses"));
|
|
12110
12160
|
const publishedIndex = loadPublishedIndex2(projectPath);
|
|
@@ -12747,7 +12797,7 @@ async function runTraceability(options) {
|
|
|
12747
12797
|
const projectPath = process.cwd();
|
|
12748
12798
|
const store = await loadGraphStore(projectPath);
|
|
12749
12799
|
if (!store) handleNoStore(mode);
|
|
12750
|
-
const graphModule = await import("./dist-
|
|
12800
|
+
const graphModule = await import("./dist-OWHMNL4W.js");
|
|
12751
12801
|
const filterOptions = buildFilterOptions(options);
|
|
12752
12802
|
const results = graphModule.queryTraceability(store, filterOptions);
|
|
12753
12803
|
if (results.length === 0) handleEmptyResults(mode);
|
|
@@ -13312,7 +13362,7 @@ function createUpdateCommand() {
|
|
|
13312
13362
|
// src/commands/usage.ts
|
|
13313
13363
|
import { Command as Command117 } from "commander";
|
|
13314
13364
|
async function loadAndPriceRecords(cwd, includeClaudeSessions = false) {
|
|
13315
|
-
const { readCostRecords, loadPricingData, calculateCost, parseCCRecords } = await import("./dist-
|
|
13365
|
+
const { readCostRecords, loadPricingData, calculateCost, parseCCRecords } = await import("./dist-JCFK263L.js");
|
|
13316
13366
|
const records = readCostRecords(cwd);
|
|
13317
13367
|
if (includeClaudeSessions) {
|
|
13318
13368
|
const ccRecords = parseCCRecords();
|
|
@@ -13405,7 +13455,7 @@ function registerDailyCommand(usage) {
|
|
|
13405
13455
|
else logger.info("No usage data found. Run some harness sessions first.");
|
|
13406
13456
|
return;
|
|
13407
13457
|
}
|
|
13408
|
-
const { aggregateByDay } = await import("./dist-
|
|
13458
|
+
const { aggregateByDay } = await import("./dist-JCFK263L.js");
|
|
13409
13459
|
const limited = aggregateByDay(records).slice(0, days);
|
|
13410
13460
|
if (globalOpts.json) {
|
|
13411
13461
|
console.log(
|
|
@@ -13434,7 +13484,7 @@ function registerSessionsCommand(usage) {
|
|
|
13434
13484
|
}
|
|
13435
13485
|
return;
|
|
13436
13486
|
}
|
|
13437
|
-
const { aggregateBySession } = await import("./dist-
|
|
13487
|
+
const { aggregateBySession } = await import("./dist-JCFK263L.js");
|
|
13438
13488
|
const sessionData = aggregateBySession(records);
|
|
13439
13489
|
const limited = sessionData.slice(0, limit);
|
|
13440
13490
|
if (globalOpts.json) {
|
|
@@ -13514,7 +13564,7 @@ function registerSessionCommand(usage) {
|
|
|
13514
13564
|
cwd,
|
|
13515
13565
|
globalOpts.includeClaudeSessions
|
|
13516
13566
|
);
|
|
13517
|
-
const { aggregateBySession } = await import("./dist-
|
|
13567
|
+
const { aggregateBySession } = await import("./dist-JCFK263L.js");
|
|
13518
13568
|
const sessionData = aggregateBySession(records);
|
|
13519
13569
|
const match = sessionData.find((s) => s.sessionId === id);
|
|
13520
13570
|
if (!match) {
|
|
@@ -13549,7 +13599,7 @@ function registerLatestCommand(usage) {
|
|
|
13549
13599
|
}
|
|
13550
13600
|
return;
|
|
13551
13601
|
}
|
|
13552
|
-
const { aggregateBySession } = await import("./dist-
|
|
13602
|
+
const { aggregateBySession } = await import("./dist-JCFK263L.js");
|
|
13553
13603
|
const sessionData = aggregateBySession(records);
|
|
13554
13604
|
const latest = sessionData[0];
|
|
13555
13605
|
if (!latest) {
|
|
@@ -13659,6 +13709,22 @@ async function runValidate(options) {
|
|
|
13659
13709
|
}
|
|
13660
13710
|
});
|
|
13661
13711
|
}
|
|
13712
|
+
const strategyResult = await validateStrategy(cwd);
|
|
13713
|
+
if (strategyResult.ok) {
|
|
13714
|
+
result.checks.strategyConfig = true;
|
|
13715
|
+
} else {
|
|
13716
|
+
result.valid = false;
|
|
13717
|
+
result.checks.strategyConfig = false;
|
|
13718
|
+
result.issues.push({
|
|
13719
|
+
check: "strategyConfig",
|
|
13720
|
+
file: "STRATEGY.md",
|
|
13721
|
+
severity: "error",
|
|
13722
|
+
message: strategyResult.error.message,
|
|
13723
|
+
...strategyResult.error.suggestions?.[0] !== void 0 && {
|
|
13724
|
+
suggestion: strategyResult.error.suggestions[0]
|
|
13725
|
+
}
|
|
13726
|
+
});
|
|
13727
|
+
}
|
|
13662
13728
|
const solutionsResult = await validateSolutionsDir(cwd);
|
|
13663
13729
|
if (solutionsResult.ok) {
|
|
13664
13730
|
result.checks.solutionsDir = true;
|
|
@@ -13814,7 +13880,7 @@ function resolveValidateMode(globalOpts) {
|
|
|
13814
13880
|
return OutputMode.TEXT;
|
|
13815
13881
|
}
|
|
13816
13882
|
async function printCrossCheckWarnings(mode) {
|
|
13817
|
-
const { runCrossCheck: runCrossCheck2 } = await import("./validate-cross-check-
|
|
13883
|
+
const { runCrossCheck: runCrossCheck2 } = await import("./validate-cross-check-F7GEBRDH.js");
|
|
13818
13884
|
const cwd = process.cwd();
|
|
13819
13885
|
const crossResult = await runCrossCheck2({
|
|
13820
13886
|
specsDir: path71.join(cwd, "docs", "specs"),
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-KET4QQZB.js";
|
|
4
4
|
import {
|
|
5
5
|
init_dist
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GOHWCHCS.js";
|
|
7
7
|
import {
|
|
8
8
|
Err,
|
|
9
9
|
Ok
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BDGTZRZ6.js";
|
|
11
11
|
|
|
12
12
|
// src/persona/generators/runtime.ts
|
|
13
13
|
init_dist();
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
} from "./chunk-W6Y7ZW3Y.js";
|
|
7
7
|
import {
|
|
8
8
|
init_dist
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GOHWCHCS.js";
|
|
10
10
|
import {
|
|
11
11
|
Ok
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BDGTZRZ6.js";
|
|
13
13
|
|
|
14
14
|
// src/mcp/tools/entropy.ts
|
|
15
15
|
init_dist();
|
|
16
16
|
async function loadEntropyGraphOptions(projectPath) {
|
|
17
|
-
const { loadGraphStore } = await import("./graph-loader-
|
|
17
|
+
const { loadGraphStore } = await import("./graph-loader-HHXN5FLP.js");
|
|
18
18
|
const store = await loadGraphStore(projectPath);
|
|
19
19
|
if (!store) return void 0;
|
|
20
|
-
const { GraphEntropyAdapter } = await import("./dist-
|
|
20
|
+
const { GraphEntropyAdapter } = await import("./dist-OWHMNL4W.js");
|
|
21
21
|
const adapter = new GraphEntropyAdapter(store);
|
|
22
22
|
const driftData = adapter.computeDriftData();
|
|
23
23
|
const deadCodeData = adapter.computeDeadCodeData();
|
|
@@ -127,7 +127,7 @@ function buildSummaryResponse(report) {
|
|
|
127
127
|
}
|
|
128
128
|
async function handleDetectEntropy(input) {
|
|
129
129
|
try {
|
|
130
|
-
const { EntropyAnalyzer } = await import("./dist-
|
|
130
|
+
const { EntropyAnalyzer } = await import("./dist-JCFK263L.js");
|
|
131
131
|
const typeFilter = input.type ?? "all";
|
|
132
132
|
const analyzer = new EntropyAnalyzer({
|
|
133
133
|
rootDir: sanitizePath(input.path),
|
|
@@ -146,7 +146,7 @@ async function handleDetectEntropy(input) {
|
|
|
146
146
|
return resultToMcpResponse(result);
|
|
147
147
|
}
|
|
148
148
|
if (!result.ok) return resultToMcpResponse(result);
|
|
149
|
-
const { createFixes, applyFixes, generateSuggestions } = await import("./dist-
|
|
149
|
+
const { createFixes, applyFixes, generateSuggestions } = await import("./dist-JCFK263L.js");
|
|
150
150
|
const report = result.value;
|
|
151
151
|
const deadCode = report.deadCode;
|
|
152
152
|
const fixTypesConfig = input.fixTypes ? { fixTypes: input.fixTypes } : void 0;
|