@harness-engineering/cli 1.20.1 → 1.21.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.
Files changed (87) hide show
  1. package/dist/agents/skills/claude-code/harness-accessibility/skill.yaml +20 -0
  2. package/dist/agents/skills/claude-code/harness-design/skill.yaml +20 -0
  3. package/dist/agents/skills/claude-code/harness-design-mobile/skill.yaml +20 -0
  4. package/dist/agents/skills/claude-code/harness-design-system/skill.yaml +22 -0
  5. package/dist/agents/skills/claude-code/harness-design-web/skill.yaml +22 -0
  6. package/dist/agents/skills/claude-code/harness-diagnostics/skill.yaml +19 -0
  7. package/dist/agents/skills/claude-code/harness-git-workflow/skill.yaml +15 -0
  8. package/dist/agents/skills/claude-code/harness-i18n/skill.yaml +22 -0
  9. package/dist/agents/skills/claude-code/harness-i18n-process/skill.yaml +15 -0
  10. package/dist/agents/skills/claude-code/harness-i18n-workflow/skill.yaml +19 -0
  11. package/dist/agents/skills/claude-code/harness-perf-tdd/skill.yaml +20 -0
  12. package/dist/agents/skills/claude-code/harness-pre-commit-review/skill.yaml +18 -0
  13. package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +23 -0
  14. package/dist/agents/skills/codex/harness-accessibility/skill.yaml +20 -0
  15. package/dist/agents/skills/codex/harness-design/skill.yaml +20 -0
  16. package/dist/agents/skills/codex/harness-design-mobile/skill.yaml +20 -0
  17. package/dist/agents/skills/codex/harness-design-system/skill.yaml +22 -0
  18. package/dist/agents/skills/codex/harness-design-web/skill.yaml +22 -0
  19. package/dist/agents/skills/codex/harness-diagnostics/skill.yaml +19 -0
  20. package/dist/agents/skills/codex/harness-git-workflow/skill.yaml +15 -0
  21. package/dist/agents/skills/codex/harness-i18n/skill.yaml +22 -0
  22. package/dist/agents/skills/codex/harness-i18n-process/skill.yaml +15 -0
  23. package/dist/agents/skills/codex/harness-i18n-workflow/skill.yaml +19 -0
  24. package/dist/agents/skills/codex/harness-perf-tdd/skill.yaml +20 -0
  25. package/dist/agents/skills/codex/harness-pre-commit-review/skill.yaml +18 -0
  26. package/dist/agents/skills/codex/harness-security-review/skill.yaml +23 -0
  27. package/dist/agents/skills/cursor/harness-accessibility/skill.yaml +20 -0
  28. package/dist/agents/skills/cursor/harness-design/skill.yaml +20 -0
  29. package/dist/agents/skills/cursor/harness-design-mobile/skill.yaml +20 -0
  30. package/dist/agents/skills/cursor/harness-design-system/skill.yaml +22 -0
  31. package/dist/agents/skills/cursor/harness-design-web/skill.yaml +22 -0
  32. package/dist/agents/skills/cursor/harness-diagnostics/skill.yaml +19 -0
  33. package/dist/agents/skills/cursor/harness-git-workflow/skill.yaml +15 -0
  34. package/dist/agents/skills/cursor/harness-i18n/skill.yaml +22 -0
  35. package/dist/agents/skills/cursor/harness-i18n-process/skill.yaml +15 -0
  36. package/dist/agents/skills/cursor/harness-i18n-workflow/skill.yaml +19 -0
  37. package/dist/agents/skills/cursor/harness-perf-tdd/skill.yaml +20 -0
  38. package/dist/agents/skills/cursor/harness-pre-commit-review/skill.yaml +18 -0
  39. package/dist/agents/skills/cursor/harness-security-review/skill.yaml +23 -0
  40. package/dist/agents/skills/gemini-cli/harness-accessibility/skill.yaml +20 -0
  41. package/dist/agents/skills/gemini-cli/harness-design/skill.yaml +20 -0
  42. package/dist/agents/skills/gemini-cli/harness-design-mobile/skill.yaml +20 -0
  43. package/dist/agents/skills/gemini-cli/harness-design-system/skill.yaml +22 -0
  44. package/dist/agents/skills/gemini-cli/harness-design-web/skill.yaml +22 -0
  45. package/dist/agents/skills/gemini-cli/harness-diagnostics/skill.yaml +19 -0
  46. package/dist/agents/skills/gemini-cli/harness-git-workflow/skill.yaml +15 -0
  47. package/dist/agents/skills/gemini-cli/harness-i18n/skill.yaml +22 -0
  48. package/dist/agents/skills/gemini-cli/harness-i18n-process/skill.yaml +15 -0
  49. package/dist/agents/skills/gemini-cli/harness-i18n-workflow/skill.yaml +19 -0
  50. package/dist/agents/skills/gemini-cli/harness-perf-tdd/skill.yaml +20 -0
  51. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/skill.yaml +18 -0
  52. package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +23 -0
  53. package/dist/{agents-md-WHXVPOK2.js → agents-md-TDTLYAQU.js} +1 -1
  54. package/dist/{architecture-45YCLD26.js → architecture-NANP4XPE.js} +2 -2
  55. package/dist/bin/harness-mcp.js +11 -11
  56. package/dist/bin/harness.js +13 -13
  57. package/dist/{check-phase-gate-2VXVOUJ5.js → check-phase-gate-I4NQOCSU.js} +3 -3
  58. package/dist/{chunk-V73TEHIF.js → chunk-6GEYPBDU.js} +3 -3
  59. package/dist/{chunk-PDOSLTWP.js → chunk-7G2ZUTZA.js} +1 -1
  60. package/dist/{chunk-LEWXD6PR.js → chunk-H6LXAH66.js} +1 -1
  61. package/dist/{chunk-A33LHIRD.js → chunk-HUDEBSR2.js} +1 -1
  62. package/dist/{chunk-45ZJPG24.js → chunk-L6LTNZQZ.js} +1 -1
  63. package/dist/{chunk-LVJ7SCD7.js → chunk-SPUK5W4W.js} +2 -2
  64. package/dist/{chunk-YDOGGQSF.js → chunk-SZ5TGZMI.js} +1 -1
  65. package/dist/{chunk-SQY4AAKP.js → chunk-TMSGI27F.js} +103 -88
  66. package/dist/{chunk-HAJD5LTI.js → chunk-UEKQ5G3V.js} +14 -14
  67. package/dist/{chunk-PDEEQJHH.js → chunk-UVJFBKCX.js} +5 -5
  68. package/dist/{chunk-4U4V7A6U.js → chunk-WXI5ONCU.js} +2 -2
  69. package/dist/{chunk-H6KZAGHZ.js → chunk-YF5ROTWR.js} +4 -4
  70. package/dist/{chunk-IC5CZSHF.js → chunk-YZYBQZVL.js} +10 -6
  71. package/dist/{ci-workflow-HWX5OVLI.js → ci-workflow-Z4IUJBZL.js} +1 -1
  72. package/dist/{dist-WHL3NN5S.js → dist-KV2ICL5X.js} +1 -1
  73. package/dist/{docs-FJFY7GF2.js → docs-2PCZVSGB.js} +3 -3
  74. package/dist/{engine-R5BZHIZB.js → engine-EOXMI5MD.js} +1 -1
  75. package/dist/{entropy-Y2GE4MYS.js → entropy-VGXXBIGX.js} +2 -2
  76. package/dist/{feedback-FKZ7GMPO.js → feedback-VTSPL3O7.js} +1 -1
  77. package/dist/{generate-agent-definitions-LN3A45OL.js → generate-agent-definitions-QICSCGXB.js} +1 -1
  78. package/dist/index.js +13 -13
  79. package/dist/{loader-2TBQUFWX.js → loader-7S4FYAPP.js} +1 -1
  80. package/dist/{mcp-KEY575NJ.js → mcp-DF25USTE.js} +11 -11
  81. package/dist/{performance-BSOMMWK5.js → performance-RV4DUMFI.js} +3 -3
  82. package/dist/{review-pipeline-KUBHP3RV.js → review-pipeline-7KQJB4SI.js} +1 -1
  83. package/dist/{runtime-BN7KGJAO.js → runtime-XKOHGGRC.js} +1 -1
  84. package/dist/{security-3T4JGDZP.js → security-NLWTMK3G.js} +1 -1
  85. package/dist/{validate-R5WGB2AV.js → validate-VHFE6J6O.js} +2 -2
  86. package/dist/{validate-cross-check-76Z5P6EX.js → validate-cross-check-PFRKABCS.js} +1 -1
  87. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  detectEntropyDefinition,
3
3
  handleDetectEntropy
4
- } from "./chunk-4U4V7A6U.js";
4
+ } from "./chunk-WXI5ONCU.js";
5
5
  import {
6
6
  checkPerformanceDefinition,
7
7
  getCriticalPathsDefinition,
@@ -11,7 +11,7 @@ import {
11
11
  handleGetPerfBaselines,
12
12
  handleUpdatePerfBaselines,
13
13
  updatePerfBaselinesDefinition
14
- } from "./chunk-PDEEQJHH.js";
14
+ } from "./chunk-UVJFBKCX.js";
15
15
  import {
16
16
  analyzeDiffDefinition,
17
17
  createSelfReviewDefinition,
@@ -19,15 +19,15 @@ import {
19
19
  handleCreateSelfReview,
20
20
  handleRequestPeerReview,
21
21
  requestPeerReviewDefinition
22
- } from "./chunk-V73TEHIF.js";
22
+ } from "./chunk-6GEYPBDU.js";
23
23
  import {
24
24
  handleRunSecurityScan,
25
25
  runSecurityScanDefinition
26
- } from "./chunk-LEWXD6PR.js";
26
+ } from "./chunk-H6LXAH66.js";
27
27
  import {
28
28
  handleRunCodeReview,
29
29
  runCodeReviewDefinition
30
- } from "./chunk-45ZJPG24.js";
30
+ } from "./chunk-L6LTNZQZ.js";
31
31
  import {
32
32
  GENERATED_HEADER_CLAUDE,
33
33
  GENERATED_HEADER_CODEX,
@@ -40,25 +40,25 @@ import {
40
40
  import {
41
41
  handleValidateProject,
42
42
  validateToolDefinition
43
- } from "./chunk-LVJ7SCD7.js";
43
+ } from "./chunk-SPUK5W4W.js";
44
44
  import {
45
45
  loadGraphStore
46
46
  } from "./chunk-CZZXE6BL.js";
47
47
  import {
48
48
  checkDependenciesDefinition,
49
49
  handleCheckDependencies
50
- } from "./chunk-A33LHIRD.js";
50
+ } from "./chunk-HUDEBSR2.js";
51
51
  import {
52
52
  resolveProjectConfig
53
53
  } from "./chunk-H7Y5CKTM.js";
54
54
  import {
55
55
  checkDocsDefinition,
56
56
  handleCheckDocs
57
- } from "./chunk-H6KZAGHZ.js";
57
+ } from "./chunk-YF5ROTWR.js";
58
58
  import {
59
59
  TrackerConfigSchema,
60
60
  resolveConfig
61
- } from "./chunk-YDOGGQSF.js";
61
+ } from "./chunk-SZ5TGZMI.js";
62
62
  import {
63
63
  resultToMcpResponse
64
64
  } from "./chunk-IDZNPTYD.js";
@@ -87,7 +87,7 @@ import {
87
87
  checkTaint,
88
88
  scanForInjection,
89
89
  writeTaint
90
- } from "./chunk-IC5CZSHF.js";
90
+ } from "./chunk-YZYBQZVL.js";
91
91
  import {
92
92
  Err,
93
93
  Ok
@@ -557,7 +557,7 @@ ${skippedMsg}`
557
557
  async function handleInitProject(input) {
558
558
  const i = input;
559
559
  try {
560
- const { TemplateEngine } = await import("./engine-R5BZHIZB.js");
560
+ const { TemplateEngine } = await import("./engine-EOXMI5MD.js");
561
561
  const engine = new TemplateEngine(resolveTemplatesDir());
562
562
  const safePath = sanitizePath(i.path);
563
563
  const detected = tryDetectFramework(engine, safePath, i);
@@ -578,7 +578,7 @@ var listPersonasDefinition = {
578
578
  inputSchema: { type: "object", properties: {} }
579
579
  };
580
580
  async function handleListPersonas() {
581
- const { listPersonas } = await import("./loader-2TBQUFWX.js");
581
+ const { listPersonas } = await import("./loader-7S4FYAPP.js");
582
582
  const result = listPersonas(resolvePersonasDir());
583
583
  return resultToMcpResponse(result);
584
584
  }
@@ -602,10 +602,10 @@ async function handleGeneratePersonaArtifacts(input) {
602
602
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
603
603
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
604
604
  }
605
- const { loadPersona } = await import("./loader-2TBQUFWX.js");
606
- const { generateRuntime } = await import("./runtime-BN7KGJAO.js");
607
- const { generateAgentsMd } = await import("./agents-md-WHXVPOK2.js");
608
- const { generateCIWorkflow } = await import("./ci-workflow-HWX5OVLI.js");
605
+ const { loadPersona } = await import("./loader-7S4FYAPP.js");
606
+ const { generateRuntime } = await import("./runtime-XKOHGGRC.js");
607
+ const { generateAgentsMd } = await import("./agents-md-TDTLYAQU.js");
608
+ const { generateCIWorkflow } = await import("./ci-workflow-Z4IUJBZL.js");
609
609
  const personasDir = resolvePersonasDir();
610
610
  const filePath = path3.join(personasDir, `${input.name}.yaml`);
611
611
  if (!filePath.startsWith(personasDir)) {
@@ -660,7 +660,7 @@ async function handleRunPersona(input) {
660
660
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
661
661
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
662
662
  }
663
- const { loadPersona } = await import("./loader-2TBQUFWX.js");
663
+ const { loadPersona } = await import("./loader-7S4FYAPP.js");
664
664
  const { runPersona } = await import("./runner-VMYLHWOC.js");
665
665
  const { executeSkill } = await import("./skill-executor-XEVDGXUM.js");
666
666
  const personasDir = resolvePersonasDir();
@@ -842,13 +842,27 @@ var TIER_1_SKILLS = /* @__PURE__ */ new Set([
842
842
  function isTier1Skill(skillName) {
843
843
  return TIER_1_SKILLS.has(skillName);
844
844
  }
845
- function scoreSkill(entry, queryTerms, profile, recentFiles) {
845
+ function scoreSkill(entry, queryTerms, profile, recentFiles, skillName) {
846
846
  const matchedKeywords = entry.keywords.filter(
847
847
  (kw) => queryTerms.some(
848
848
  (term) => kw.toLowerCase().includes(term.toLowerCase()) || term.toLowerCase().includes(kw.toLowerCase())
849
849
  )
850
850
  );
851
851
  const keywordScore = queryTerms.length > 0 ? matchedKeywords.length / queryTerms.length : 0;
852
+ let nameScore = 0;
853
+ if (skillName.length > 0 && queryTerms.length > 0) {
854
+ const nameSegments = skillName.toLowerCase().split("-").filter((s) => s.length > 2);
855
+ const matchedNameSegments = queryTerms.filter(
856
+ (term) => nameSegments.some((seg) => seg.includes(term) || term.includes(seg))
857
+ );
858
+ nameScore = matchedNameSegments.length / queryTerms.length;
859
+ }
860
+ let descScore = 0;
861
+ if (queryTerms.length > 0) {
862
+ const descLower = entry.description.toLowerCase();
863
+ const matchedDescTerms = queryTerms.filter((term) => descLower.includes(term));
864
+ descScore = matchedDescTerms.length / queryTerms.length;
865
+ }
852
866
  let stackScore = 0;
853
867
  if (profile && entry.stackSignals.length > 0) {
854
868
  const matchedSignals = entry.stackSignals.filter((signal) => {
@@ -862,19 +876,19 @@ function scoreSkill(entry, queryTerms, profile, recentFiles) {
862
876
  let recencyBoost = 0;
863
877
  if (recentFiles.length > 0) {
864
878
  const hasRecentMatch = entry.stackSignals.some((signal) => {
865
- const cleanSignal = signal.replace(/\*/g, "").replace(/\*\*/g, "");
879
+ const cleanSignal = signal.replace(/\*/g, "");
866
880
  return recentFiles.some((f) => f.includes(cleanSignal));
867
881
  });
868
882
  recencyBoost = hasRecentMatch ? 1 : 0;
869
883
  }
870
- return 0.5 * keywordScore + 0.3 * stackScore + 0.2 * recencyBoost;
884
+ return 0.35 * keywordScore + 0.2 * nameScore + 0.1 * descScore + 0.2 * stackScore + 0.15 * recencyBoost;
871
885
  }
872
886
  function suggest(index, taskDescription, profile, recentFiles, config) {
873
887
  const queryTerms = taskDescription.toLowerCase().split(/\s+/).filter((t) => t.length > 2);
874
888
  const scored = [];
875
889
  for (const [name, entry] of Object.entries(index.skills)) {
876
890
  if (config?.neverSuggest?.includes(name)) continue;
877
- const score = scoreSkill(entry, queryTerms, profile, recentFiles);
891
+ const score = scoreSkill(entry, queryTerms, profile, recentFiles, name);
878
892
  const isForced = config?.alwaysSuggest?.includes(name);
879
893
  if (score >= 0.4 || isForced) {
880
894
  scored.push({
@@ -1278,7 +1292,7 @@ async function autoSyncRoadmap(projectPath) {
1278
1292
  try {
1279
1293
  const roadmapFile = path11.join(projectPath, "docs", "roadmap.md");
1280
1294
  if (!fs10.existsSync(roadmapFile)) return;
1281
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-WHL3NN5S.js");
1295
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-KV2ICL5X.js");
1282
1296
  const raw = fs10.readFileSync(roadmapFile, "utf-8");
1283
1297
  const parseResult = parseRoadmap(raw);
1284
1298
  if (!parseResult.ok) return;
@@ -1305,7 +1319,7 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1305
1319
  }
1306
1320
  const token = process.env.GITHUB_TOKEN;
1307
1321
  if (!token) return;
1308
- const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-WHL3NN5S.js");
1322
+ const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-KV2ICL5X.js");
1309
1323
  const adapter = new GitHubIssuesSyncAdapter({
1310
1324
  token,
1311
1325
  config: trackerConfig
@@ -1417,12 +1431,12 @@ var manageStateDefinition = {
1417
1431
  }
1418
1432
  };
1419
1433
  async function handleShow(projectPath, input) {
1420
- const { loadState } = await import("./dist-WHL3NN5S.js");
1434
+ const { loadState } = await import("./dist-KV2ICL5X.js");
1421
1435
  return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
1422
1436
  }
1423
1437
  async function handleLearn(projectPath, input) {
1424
1438
  if (!input.learning) return mcpError("Error: learning is required for learn action");
1425
- const { appendLearning } = await import("./dist-WHL3NN5S.js");
1439
+ const { appendLearning } = await import("./dist-KV2ICL5X.js");
1426
1440
  const result = await appendLearning(
1427
1441
  projectPath,
1428
1442
  input.learning,
@@ -1437,7 +1451,7 @@ async function handleLearn(projectPath, input) {
1437
1451
  async function handleFailure(projectPath, input) {
1438
1452
  if (!input.description) return mcpError("Error: description is required for failure action");
1439
1453
  if (!input.failureType) return mcpError("Error: failureType is required for failure action");
1440
- const { appendFailure } = await import("./dist-WHL3NN5S.js");
1454
+ const { appendFailure } = await import("./dist-KV2ICL5X.js");
1441
1455
  const result = await appendFailure(
1442
1456
  projectPath,
1443
1457
  input.description,
@@ -1450,24 +1464,24 @@ async function handleFailure(projectPath, input) {
1450
1464
  return resultToMcpResponse(Ok({ recorded: true }));
1451
1465
  }
1452
1466
  async function handleArchive(projectPath, input) {
1453
- const { archiveFailures } = await import("./dist-WHL3NN5S.js");
1467
+ const { archiveFailures } = await import("./dist-KV2ICL5X.js");
1454
1468
  const result = await archiveFailures(projectPath, input.stream, input.session);
1455
1469
  if (!result.ok) return resultToMcpResponse(result);
1456
1470
  return resultToMcpResponse(Ok({ archived: true }));
1457
1471
  }
1458
1472
  async function handleReset(projectPath, input) {
1459
- const { saveState, DEFAULT_STATE } = await import("./dist-WHL3NN5S.js");
1473
+ const { saveState, DEFAULT_STATE } = await import("./dist-KV2ICL5X.js");
1460
1474
  const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
1461
1475
  if (!result.ok) return resultToMcpResponse(result);
1462
1476
  return resultToMcpResponse(Ok({ reset: true }));
1463
1477
  }
1464
1478
  async function handleGate(projectPath, _input) {
1465
- const { runMechanicalGate } = await import("./dist-WHL3NN5S.js");
1479
+ const { runMechanicalGate } = await import("./dist-KV2ICL5X.js");
1466
1480
  return resultToMcpResponse(await runMechanicalGate(projectPath));
1467
1481
  }
1468
1482
  async function handleSaveHandoff(projectPath, input) {
1469
1483
  if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
1470
- const { saveHandoff } = await import("./dist-WHL3NN5S.js");
1484
+ const { saveHandoff } = await import("./dist-KV2ICL5X.js");
1471
1485
  const result = await saveHandoff(
1472
1486
  projectPath,
1473
1487
  input.handoff,
@@ -1479,7 +1493,7 @@ async function handleSaveHandoff(projectPath, input) {
1479
1493
  return resultToMcpResponse(Ok({ saved: true }));
1480
1494
  }
1481
1495
  async function handleLoadHandoff(projectPath, input) {
1482
- const { loadHandoff } = await import("./dist-WHL3NN5S.js");
1496
+ const { loadHandoff } = await import("./dist-KV2ICL5X.js");
1483
1497
  return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
1484
1498
  }
1485
1499
  async function handleAppendEntry(projectPath, input) {
@@ -1487,7 +1501,7 @@ async function handleAppendEntry(projectPath, input) {
1487
1501
  if (!input.section) return mcpError("Error: section is required for append_entry action");
1488
1502
  if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
1489
1503
  if (!input.content) return mcpError("Error: content is required for append_entry action");
1490
- const { appendSessionEntry } = await import("./dist-WHL3NN5S.js");
1504
+ const { appendSessionEntry } = await import("./dist-KV2ICL5X.js");
1491
1505
  const result = await appendSessionEntry(
1492
1506
  projectPath,
1493
1507
  input.session,
@@ -1503,7 +1517,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1503
1517
  if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
1504
1518
  if (!input.newStatus)
1505
1519
  return mcpError("Error: newStatus is required for update_entry_status action");
1506
- const { updateSessionEntryStatus } = await import("./dist-WHL3NN5S.js");
1520
+ const { updateSessionEntryStatus } = await import("./dist-KV2ICL5X.js");
1507
1521
  const result = await updateSessionEntryStatus(
1508
1522
  projectPath,
1509
1523
  input.session,
@@ -1516,7 +1530,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1516
1530
  async function handleReadSection(projectPath, input) {
1517
1531
  if (!input.session) return mcpError("Error: session is required for read_section action");
1518
1532
  if (!input.section) return mcpError("Error: section is required for read_section action");
1519
- const { readSessionSection } = await import("./dist-WHL3NN5S.js");
1533
+ const { readSessionSection } = await import("./dist-KV2ICL5X.js");
1520
1534
  const result = await readSessionSection(
1521
1535
  projectPath,
1522
1536
  input.session,
@@ -1526,13 +1540,13 @@ async function handleReadSection(projectPath, input) {
1526
1540
  }
1527
1541
  async function handleReadSections(projectPath, input) {
1528
1542
  if (!input.session) return mcpError("Error: session is required for read_sections action");
1529
- const { readSessionSections } = await import("./dist-WHL3NN5S.js");
1543
+ const { readSessionSections } = await import("./dist-KV2ICL5X.js");
1530
1544
  const result = await readSessionSections(projectPath, input.session);
1531
1545
  return resultToMcpResponse(result);
1532
1546
  }
1533
1547
  async function handleArchiveSession(projectPath, input) {
1534
1548
  if (!input.session) return mcpError("Error: session is required for archive_session action");
1535
- const { archiveSession } = await import("./dist-WHL3NN5S.js");
1549
+ const { archiveSession } = await import("./dist-KV2ICL5X.js");
1536
1550
  const result = await archiveSession(projectPath, input.session);
1537
1551
  if (!result.ok) return resultToMcpResponse(result);
1538
1552
  await autoSyncRoadmap(projectPath);
@@ -1596,7 +1610,7 @@ var listStreamsDefinition = {
1596
1610
  };
1597
1611
  async function handleListStreams(input) {
1598
1612
  try {
1599
- const { listStreams, loadStreamIndex } = await import("./dist-WHL3NN5S.js");
1613
+ const { listStreams, loadStreamIndex } = await import("./dist-KV2ICL5X.js");
1600
1614
  const projectPath = sanitizePath(input.path);
1601
1615
  const indexResult = await loadStreamIndex(projectPath);
1602
1616
  const streamsResult = await listStreams(projectPath);
@@ -1634,7 +1648,7 @@ var checkPhaseGateDefinition = {
1634
1648
  };
1635
1649
  async function handleCheckPhaseGate(input) {
1636
1650
  try {
1637
- const { runCheckPhaseGate } = await import("./check-phase-gate-2VXVOUJ5.js");
1651
+ const { runCheckPhaseGate } = await import("./check-phase-gate-I4NQOCSU.js");
1638
1652
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
1639
1653
  if (result.ok) {
1640
1654
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -1690,7 +1704,7 @@ async function handleValidateCrossCheck(input) {
1690
1704
  };
1691
1705
  }
1692
1706
  try {
1693
- const { runCrossCheck } = await import("./validate-cross-check-76Z5P6EX.js");
1707
+ const { runCrossCheck } = await import("./validate-cross-check-PFRKABCS.js");
1694
1708
  const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
1695
1709
  if (!specsDir.startsWith(projectPath)) {
1696
1710
  return {
@@ -2335,7 +2349,7 @@ async function handleGenerateSlashCommands(input) {
2335
2349
  // src/mcp/resources/state.ts
2336
2350
  async function getStateResource(projectRoot) {
2337
2351
  try {
2338
- const { loadState, migrateToStreams } = await import("./dist-WHL3NN5S.js");
2352
+ const { loadState, migrateToStreams } = await import("./dist-KV2ICL5X.js");
2339
2353
  await migrateToStreams(projectRoot);
2340
2354
  const result = await loadState(projectRoot);
2341
2355
  if (result.ok) {
@@ -3154,7 +3168,7 @@ var generateAgentDefinitionsDefinition = {
3154
3168
  }
3155
3169
  };
3156
3170
  async function handleGenerateAgentDefinitions(input) {
3157
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-LN3A45OL.js");
3171
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-QICSCGXB.js");
3158
3172
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
3159
3173
  const results = generateAgentDefinitions({
3160
3174
  platforms: [...platforms],
@@ -3451,7 +3465,7 @@ function handleSync(projectPath, input, deps) {
3451
3465
  }
3452
3466
  async function handleManageRoadmap(input) {
3453
3467
  try {
3454
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-WHL3NN5S.js");
3468
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-KV2ICL5X.js");
3455
3469
  const { Ok: Ok2 } = await import("./dist-USY2C5JL.js");
3456
3470
  const projectPath = sanitizePath(input.path);
3457
3471
  const deps = { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, Ok: Ok2 };
@@ -3837,6 +3851,20 @@ var emitInteractionDefinition = {
3837
3851
  required: ["path", "type"]
3838
3852
  }
3839
3853
  };
3854
+ function dualContent(prompt, metadata) {
3855
+ return [
3856
+ {
3857
+ type: "text",
3858
+ text: prompt,
3859
+ annotations: { audience: ["user", "assistant"], priority: 1 }
3860
+ },
3861
+ {
3862
+ type: "text",
3863
+ text: JSON.stringify(metadata),
3864
+ annotations: { audience: ["assistant"], priority: 0.2 }
3865
+ }
3866
+ ];
3867
+ }
3840
3868
  function formatZodErrors(issues) {
3841
3869
  return issues.map((i) => i.path.length > 0 ? `${i.path.join(".")}: ${i.message}` : i.message).join("; ");
3842
3870
  }
@@ -3848,7 +3876,7 @@ async function handleQuestion(validInput, projectPath, id) {
3848
3876
  return mcpError(`Error: ${formatZodErrors(questionResult.error.issues)}`);
3849
3877
  const prompt = renderQuestion(questionResult.data);
3850
3878
  await recordInteraction(projectPath, id, "question", questionResult.data.text, validInput.stream);
3851
- return { content: [{ type: "text", text: JSON.stringify({ id, prompt }) }] };
3879
+ return { content: dualContent(prompt, { id }) };
3852
3880
  }
3853
3881
  async function handleConfirmation(validInput, projectPath, id) {
3854
3882
  if (!validInput.confirmation)
@@ -3866,7 +3894,7 @@ async function handleConfirmation(validInput, projectPath, id) {
3866
3894
  confirmResult.data.text,
3867
3895
  validInput.stream
3868
3896
  );
3869
- return { content: [{ type: "text", text: JSON.stringify({ id, prompt }) }] };
3897
+ return { content: dualContent(prompt, { id }) };
3870
3898
  }
3871
3899
  async function handleTransition(validInput, projectPath, id) {
3872
3900
  if (!validInput.transition)
@@ -3879,7 +3907,7 @@ async function handleTransition(validInput, projectPath, id) {
3879
3907
  const transition = transitionResult.data;
3880
3908
  const prompt = renderTransition(transition);
3881
3909
  try {
3882
- const { saveHandoff } = await import("./dist-WHL3NN5S.js");
3910
+ const { saveHandoff } = await import("./dist-KV2ICL5X.js");
3883
3911
  await saveHandoff(
3884
3912
  projectPath,
3885
3913
  {
@@ -3906,12 +3934,12 @@ async function handleTransition(validInput, projectPath, id) {
3906
3934
  `${transition.completedPhase} -> ${transition.suggestedNext}`,
3907
3935
  validInput.stream
3908
3936
  );
3909
- const responsePayload = { id, prompt, handoffWritten: true };
3937
+ const metadata = { id, handoffWritten: true };
3910
3938
  if (!transition.requiresConfirmation) {
3911
- responsePayload.autoTransition = true;
3912
- responsePayload.nextAction = `Invoke harness-${transition.suggestedNext} skill now`;
3939
+ metadata.autoTransition = true;
3940
+ metadata.nextAction = `Invoke harness-${transition.suggestedNext} skill now`;
3913
3941
  }
3914
- return { content: [{ type: "text", text: JSON.stringify(responsePayload) }] };
3942
+ return { content: dualContent(prompt, metadata) };
3915
3943
  }
3916
3944
  async function handleBatch(validInput, projectPath, id) {
3917
3945
  if (!validInput.batch) return mcpError("Error: batch payload is required when type is batch");
@@ -3922,9 +3950,7 @@ async function handleBatch(validInput, projectPath, id) {
3922
3950
  );
3923
3951
  const prompt = renderBatch(batchResult.data);
3924
3952
  await recordInteraction(projectPath, id, "batch", batchResult.data.text, validInput.stream);
3925
- return {
3926
- content: [{ type: "text", text: JSON.stringify({ id, prompt, batchMode: true }) }]
3927
- };
3953
+ return { content: dualContent(prompt, { id, batchMode: true }) };
3928
3954
  }
3929
3955
  var INTERACTION_HANDLERS = {
3930
3956
  question: handleQuestion,
@@ -3949,7 +3975,7 @@ async function handleEmitInteraction(input) {
3949
3975
  }
3950
3976
  async function recordInteraction(projectPath, id, type, decision, stream) {
3951
3977
  try {
3952
- const { loadState, saveState } = await import("./dist-WHL3NN5S.js");
3978
+ const { loadState, saveState } = await import("./dist-KV2ICL5X.js");
3953
3979
  const stateResult = await loadState(projectPath, stream);
3954
3980
  if (stateResult.ok) {
3955
3981
  const state = stateResult.value;
@@ -4038,10 +4064,10 @@ async function handleGatherContext(input) {
4038
4064
  input.include ?? ["state", "learnings", "handoff", "graph", "validation"]
4039
4065
  );
4040
4066
  const errors = [];
4041
- const statePromise = includeSet.has("state") ? import("./dist-WHL3NN5S.js").then(
4067
+ const statePromise = includeSet.has("state") ? import("./dist-KV2ICL5X.js").then(
4042
4068
  (core) => core.loadState(projectPath, void 0, input.session)
4043
4069
  ) : Promise.resolve(null);
4044
- const learningsPromise = includeSet.has("learnings") ? import("./dist-WHL3NN5S.js").then(
4070
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-KV2ICL5X.js").then(
4045
4071
  (core) => core.loadBudgetedLearnings(projectPath, {
4046
4072
  intent: input.intent,
4047
4073
  tokenBudget: input.learningsBudget ?? 1e3,
@@ -4050,7 +4076,7 @@ async function handleGatherContext(input) {
4050
4076
  ...input.depth !== void 0 && { depth: input.depth }
4051
4077
  })
4052
4078
  ) : Promise.resolve(null);
4053
- const handoffPromise = includeSet.has("handoff") ? import("./dist-WHL3NN5S.js").then(
4079
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-KV2ICL5X.js").then(
4054
4080
  (core) => core.loadHandoff(projectPath, void 0, input.session)
4055
4081
  ) : Promise.resolve(null);
4056
4082
  const graphPromise = includeSet.has("graph") ? (async () => {
@@ -4094,11 +4120,11 @@ async function handleGatherContext(input) {
4094
4120
  context: contextBlocks
4095
4121
  };
4096
4122
  })() : Promise.resolve(null);
4097
- const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-WHL3NN5S.js").then(
4123
+ const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-KV2ICL5X.js").then(
4098
4124
  (core) => core.readSessionSections(projectPath, input.session)
4099
4125
  ) : Promise.resolve(null);
4100
4126
  const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
4101
- const eventsPromise = shouldIncludeEvents ? import("./dist-WHL3NN5S.js").then(async (core) => {
4127
+ const eventsPromise = shouldIncludeEvents ? import("./dist-KV2ICL5X.js").then(async (core) => {
4102
4128
  const result = await core.loadEvents(projectPath, {
4103
4129
  session: input.session
4104
4130
  });
@@ -4106,7 +4132,7 @@ async function handleGatherContext(input) {
4106
4132
  return core.formatEventTimeline(result.value);
4107
4133
  }) : Promise.resolve(null);
4108
4134
  const validationPromise = includeSet.has("validation") ? (async () => {
4109
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-R5WGB2AV.js");
4135
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-VHFE6J6O.js");
4110
4136
  const result = await handleValidateProject2({ path: projectPath });
4111
4137
  const first = result.content[0];
4112
4138
  return first ? JSON.parse(first.text) : null;
@@ -4200,7 +4226,7 @@ async function handleGatherContext(input) {
4200
4226
  };
4201
4227
  if (input.session) {
4202
4228
  try {
4203
- const core = await import("./dist-WHL3NN5S.js");
4229
+ const core = await import("./dist-KV2ICL5X.js");
4204
4230
  core.updateSessionIndex(
4205
4231
  projectPath,
4206
4232
  input.session,
@@ -4270,7 +4296,7 @@ async function handleAssessProject(input) {
4270
4296
  let validateResult = null;
4271
4297
  if (checksToRun.has("validate")) {
4272
4298
  try {
4273
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-R5WGB2AV.js");
4299
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-VHFE6J6O.js");
4274
4300
  const result = await handleValidateProject2({ path: projectPath });
4275
4301
  const first = result.content[0];
4276
4302
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4295,7 +4321,7 @@ async function handleAssessProject(input) {
4295
4321
  parallelChecks.push(
4296
4322
  (async () => {
4297
4323
  try {
4298
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-45YCLD26.js");
4324
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-NANP4XPE.js");
4299
4325
  const result = await handleCheckDependencies2({ path: projectPath });
4300
4326
  const first = result.content[0];
4301
4327
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4322,7 +4348,7 @@ async function handleAssessProject(input) {
4322
4348
  parallelChecks.push(
4323
4349
  (async () => {
4324
4350
  try {
4325
- const { handleCheckDocs: handleCheckDocs2 } = await import("./docs-FJFY7GF2.js");
4351
+ const { handleCheckDocs: handleCheckDocs2 } = await import("./docs-2PCZVSGB.js");
4326
4352
  const result = await handleCheckDocs2({ path: projectPath, scope: "coverage" });
4327
4353
  const first = result.content[0];
4328
4354
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4349,7 +4375,7 @@ async function handleAssessProject(input) {
4349
4375
  parallelChecks.push(
4350
4376
  (async () => {
4351
4377
  try {
4352
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-Y2GE4MYS.js");
4378
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-VGXXBIGX.js");
4353
4379
  const result = await handleDetectEntropy2({ path: projectPath, type: "all" });
4354
4380
  const first = result.content[0];
4355
4381
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4376,7 +4402,7 @@ async function handleAssessProject(input) {
4376
4402
  parallelChecks.push(
4377
4403
  (async () => {
4378
4404
  try {
4379
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-3T4JGDZP.js");
4405
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-NLWTMK3G.js");
4380
4406
  const result = await handleRunSecurityScan2({ path: projectPath });
4381
4407
  const first = result.content[0];
4382
4408
  const parsed = first ? JSON.parse(first.text) : {};
@@ -4408,7 +4434,7 @@ async function handleAssessProject(input) {
4408
4434
  parallelChecks.push(
4409
4435
  (async () => {
4410
4436
  try {
4411
- const { handleCheckPerformance: handleCheckPerformance2 } = await import("./performance-BSOMMWK5.js");
4437
+ const { handleCheckPerformance: handleCheckPerformance2 } = await import("./performance-RV4DUMFI.js");
4412
4438
  const result = await handleCheckPerformance2({ path: projectPath });
4413
4439
  if ("isError" in result && result.isError) {
4414
4440
  const msg = result.content[0]?.text ?? "Performance check failed";
@@ -4611,7 +4637,7 @@ async function handleReviewChanges(input) {
4611
4637
  }
4612
4638
  }
4613
4639
  async function runQuickReview(projectPath, diff, diffLines, downgraded) {
4614
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-FKZ7GMPO.js");
4640
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-VTSPL3O7.js");
4615
4641
  const result = await handleAnalyzeDiff2({ diff, path: projectPath });
4616
4642
  const firstContent = result.content[0];
4617
4643
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -4642,7 +4668,7 @@ function extractFileCount(diffParsed) {
4642
4668
  return files?.length ?? 0;
4643
4669
  }
4644
4670
  async function runStandardReview(projectPath, diff, diffLines, downgraded) {
4645
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-FKZ7GMPO.js");
4671
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-VTSPL3O7.js");
4646
4672
  const [diffResult, reviewResult] = await Promise.all([
4647
4673
  handleAnalyzeDiff2({ diff, path: projectPath }),
4648
4674
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -4674,7 +4700,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded) {
4674
4700
  };
4675
4701
  }
4676
4702
  async function runDeepReview(projectPath, diff, diffLines, _downgraded) {
4677
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-KUBHP3RV.js");
4703
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-7KQJB4SI.js");
4678
4704
  const result = await handleRunCodeReview2({ path: projectPath, diff });
4679
4705
  const deepContent = result.content[0];
4680
4706
  if (!deepContent) throw new Error("Empty code review response");
@@ -4960,7 +4986,7 @@ async function handleDetectStaleConstraints(input) {
4960
4986
  ]
4961
4987
  };
4962
4988
  }
4963
- const { detectStaleConstraints } = await import("./dist-WHL3NN5S.js");
4989
+ const { detectStaleConstraints } = await import("./dist-KV2ICL5X.js");
4964
4990
  const result = detectStaleConstraints(
4965
4991
  store,
4966
4992
  windowDays,
@@ -4990,7 +5016,7 @@ async function handleDetectStaleConstraints(input) {
4990
5016
  // src/mcp/tools/search-skills.ts
4991
5017
  var searchSkillsDefinition = {
4992
5018
  name: "search_skills",
4993
- description: "Search the skill catalog for domain-specific skills. Returns ranked results based on keyword and stack-signal matching. Use this to discover catalog skills that are not loaded as slash commands.",
5019
+ description: "Search the skill catalog for domain-specific skills. Returns ranked results based on keyword, name, description, and stack-signal matching. Use this to discover catalog skills that are not loaded as slash commands.",
4994
5020
  inputSchema: {
4995
5021
  type: "object",
4996
5022
  properties: {
@@ -5022,18 +5048,7 @@ async function handleSearchSkills(input) {
5022
5048
  const queryTerms = query.toLowerCase().split(/\s+/).filter((t) => t.length > 2);
5023
5049
  const results = [];
5024
5050
  for (const [name, entry] of Object.entries(index.skills)) {
5025
- const matchedKeywords = entry.keywords.filter(
5026
- (kw) => queryTerms.some(
5027
- (term) => kw.toLowerCase().includes(term.toLowerCase()) || term.toLowerCase().includes(kw.toLowerCase())
5028
- )
5029
- );
5030
- const keywordScore = queryTerms.length > 0 ? matchedKeywords.length / queryTerms.length : 0;
5031
- let stackScore = 0;
5032
- if (entry.stackSignals.length > 0) {
5033
- const matchedSignals = entry.stackSignals.filter((signal) => profile.signals[signal]);
5034
- stackScore = matchedSignals.length / entry.stackSignals.length;
5035
- }
5036
- const score = 0.6 * keywordScore + 0.4 * stackScore;
5051
+ const score = scoreSkill(entry, queryTerms, profile, [], name);
5037
5052
  if (score > 0 || queryTerms.length === 0) {
5038
5053
  results.push({
5039
5054
  name,
@@ -5092,7 +5107,7 @@ async function handleCodeOutline(input) {
5092
5107
  };
5093
5108
  }
5094
5109
  try {
5095
- const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-WHL3NN5S.js");
5110
+ const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-KV2ICL5X.js");
5096
5111
  const { stat } = await import("fs/promises");
5097
5112
  const stats = await stat(targetPath).catch(() => null);
5098
5113
  if (stats?.isFile()) {
@@ -5172,7 +5187,7 @@ async function handleCodeSearch(input) {
5172
5187
  };
5173
5188
  }
5174
5189
  try {
5175
- const { searchSymbols } = await import("./dist-WHL3NN5S.js");
5190
+ const { searchSymbols } = await import("./dist-KV2ICL5X.js");
5176
5191
  const result = await searchSymbols(input.query, directory, input.glob);
5177
5192
  const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
5178
5193
  for (const match of result.matches) {
@@ -5241,7 +5256,7 @@ async function handleCodeUnfold(input) {
5241
5256
  }
5242
5257
  try {
5243
5258
  if (input.symbol) {
5244
- const { unfoldSymbol } = await import("./dist-WHL3NN5S.js");
5259
+ const { unfoldSymbol } = await import("./dist-KV2ICL5X.js");
5245
5260
  const result = await unfoldSymbol(filePath, input.symbol);
5246
5261
  const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
5247
5262
  ` : `${result.file}:${result.startLine}-${result.endLine}
@@ -5249,7 +5264,7 @@ async function handleCodeUnfold(input) {
5249
5264
  return { content: [{ type: "text", text: header + result.content }] };
5250
5265
  }
5251
5266
  if (input.startLine != null && input.endLine != null) {
5252
- const { unfoldRange } = await import("./dist-WHL3NN5S.js");
5267
+ const { unfoldRange } = await import("./dist-KV2ICL5X.js");
5253
5268
  const result = await unfoldRange(filePath, input.startLine, input.endLine);
5254
5269
  const header = `${result.file}:${result.startLine}-${result.endLine}
5255
5270
  `;
@@ -5464,7 +5479,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
5464
5479
  shouldRunCheck,
5465
5480
  readCheckState,
5466
5481
  spawnBackgroundCheck
5467
- } = await import("./dist-WHL3NN5S.js");
5482
+ } = await import("./dist-KV2ICL5X.js");
5468
5483
  const { CLI_VERSION } = await import("./version-KFFPOQAX.js");
5469
5484
  const configInterval = readConfigInterval(resolvedRoot);
5470
5485
  const DEFAULT_INTERVAL = 864e5;