@harness-engineering/cli 2.1.0 → 2.2.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 (50) hide show
  1. package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +168 -13
  2. package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +168 -13
  3. package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +168 -13
  4. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +168 -13
  5. package/dist/{agents-md-XCAWON2D.js → agents-md-L4X4MOWT.js} +2 -2
  6. package/dist/{architecture-KERHEEQZ.js → architecture-WJRIYQ45.js} +3 -3
  7. package/dist/{assess-project-NPYA3UVI.js → assess-project-PHC2HO3V.js} +1 -1
  8. package/dist/bin/harness-mcp.js +13 -13
  9. package/dist/bin/harness.js +22 -22
  10. package/dist/{check-phase-gate-GE5ALEEU.js → check-phase-gate-646KY67H.js} +3 -3
  11. package/dist/{chunk-IIX5OJES.js → chunk-224XKVLP.js} +1 -1
  12. package/dist/{chunk-UWIOBHZL.js → chunk-2QPHCR22.js} +5 -5
  13. package/dist/{chunk-URLDPALI.js → chunk-2ZURBWEV.js} +3 -3
  14. package/dist/{chunk-EFA4OEEN.js → chunk-36X7TRUI.js} +2 -2
  15. package/dist/{chunk-HBQ3BK2E.js → chunk-4HKVZO7R.js} +1 -1
  16. package/dist/{chunk-OXFFN3FD.js → chunk-CPYL6LJR.js} +1 -1
  17. package/dist/{chunk-WW6AUOA3.js → chunk-E7W3YOXL.js} +2 -2
  18. package/dist/{chunk-FQAJAM54.js → chunk-GOOTYTTV.js} +71 -29
  19. package/dist/{chunk-D5FE4L2O.js → chunk-JPWICLXQ.js} +1 -1
  20. package/dist/{chunk-MAFI6UWT.js → chunk-K4WRQTEF.js} +137 -39
  21. package/dist/{chunk-M4C3ZIGL.js → chunk-KV7A5OZT.js} +3 -3
  22. package/dist/{chunk-T7MNLCUD.js → chunk-L2IDE7WS.js} +122 -76
  23. package/dist/{chunk-4FVHBBPY.js → chunk-LO7ZLV7S.js} +1 -1
  24. package/dist/{chunk-GCYGGQFM.js → chunk-OJMO4JBQ.js} +61 -6
  25. package/dist/{chunk-PCX4GPNT.js → chunk-QTUPHTTK.js} +1 -1
  26. package/dist/{chunk-AEFZJ543.js → chunk-TNZYQTEE.js} +1 -1
  27. package/dist/{chunk-DRD7LLFC.js → chunk-VJQLUS5I.js} +1 -1
  28. package/dist/{chunk-LY2TY6NE.js → chunk-VKDBM3RX.js} +3 -3
  29. package/dist/{chunk-FBQYKH7R.js → chunk-W4AFGFFB.js} +2 -2
  30. package/dist/{chunk-YBGVZQQE.js → chunk-YLOAQZLA.js} +2 -2
  31. package/dist/{chunk-GHPWBWUW.js → chunk-YLTRFZAT.js} +6 -6
  32. package/dist/{chunk-RCHXBL2M.js → chunk-YWD6WXXM.js} +6 -6
  33. package/dist/{ci-workflow-A2E2RTOP.js → ci-workflow-TOS5X527.js} +2 -2
  34. package/dist/{dist-K22DQUYY.js → dist-6RT2AVYU.js} +1 -1
  35. package/dist/{docs-GXJOFVCF.js → docs-HOJMQYDZ.js} +3 -3
  36. package/dist/{engine-JBUIA2XO.js → engine-D6UYH6DB.js} +2 -2
  37. package/dist/{entropy-Y7LUT4BZ.js → entropy-LZ4IDGZR.js} +2 -2
  38. package/dist/{feedback-BHOBVKI3.js → feedback-WV7EQVK7.js} +1 -1
  39. package/dist/{generate-agent-definitions-VL3ZVR32.js → generate-agent-definitions-GFNXJCBY.js} +3 -3
  40. package/dist/index.d.ts +17 -8
  41. package/dist/index.js +22 -22
  42. package/dist/{loader-WCKVMDYR.js → loader-Z23JTXIZ.js} +2 -2
  43. package/dist/{mcp-FA2CKHFY.js → mcp-JDJGELGD.js} +13 -13
  44. package/dist/{performance-NISUL5AA.js → performance-7ATLHTQU.js} +3 -3
  45. package/dist/{review-pipeline-CHE5LJ5D.js → review-pipeline-COBGGXHJ.js} +2 -2
  46. package/dist/{runtime-3SKKEVPF.js → runtime-KCBNQUXK.js} +2 -2
  47. package/dist/{security-MF54MY3P.js → security-MAPRIFQT.js} +1 -1
  48. package/dist/{validate-SIWFNTXI.js → validate-74XTQR7Q.js} +3 -3
  49. package/dist/{validate-cross-check-GBX7B7CQ.js → validate-cross-check-MI5MZ7MB.js} +2 -2
  50. package/package.json +4 -4
@@ -2,11 +2,11 @@ import {
2
2
  handleRunCodeReview,
3
3
  runCodeReviewDefinition,
4
4
  sortFindingsBySeverity
5
- } from "./chunk-EFA4OEEN.js";
5
+ } from "./chunk-36X7TRUI.js";
6
6
  import {
7
7
  assessProjectDefinition,
8
8
  handleAssessProject
9
- } from "./chunk-RCHXBL2M.js";
9
+ } from "./chunk-YWD6WXXM.js";
10
10
  import {
11
11
  getBusinessKnowledgeResource
12
12
  } from "./chunk-IOW3MW2K.js";
@@ -17,35 +17,35 @@ import {
17
17
  handleCreateSelfReview,
18
18
  handleRequestPeerReview,
19
19
  requestPeerReviewDefinition
20
- } from "./chunk-URLDPALI.js";
20
+ } from "./chunk-2ZURBWEV.js";
21
21
  import {
22
22
  getSecurityTrendsDefinition,
23
23
  handleGetSecurityTrends,
24
24
  handleRunSecurityScan,
25
25
  runSecurityScanDefinition
26
- } from "./chunk-FBQYKH7R.js";
26
+ } from "./chunk-W4AFGFFB.js";
27
27
  import {
28
28
  loadGraphStore
29
29
  } from "./chunk-KTWKW6KJ.js";
30
30
  import {
31
31
  handleValidateProject,
32
32
  validateToolDefinition
33
- } from "./chunk-LY2TY6NE.js";
33
+ } from "./chunk-VKDBM3RX.js";
34
34
  import {
35
35
  checkDependenciesDefinition,
36
36
  handleCheckDependencies
37
- } from "./chunk-YBGVZQQE.js";
37
+ } from "./chunk-YLOAQZLA.js";
38
38
  import {
39
39
  resolveProjectConfig
40
- } from "./chunk-OXFFN3FD.js";
40
+ } from "./chunk-CPYL6LJR.js";
41
41
  import {
42
42
  checkDocsDefinition,
43
43
  handleCheckDocs
44
- } from "./chunk-UWIOBHZL.js";
44
+ } from "./chunk-2QPHCR22.js";
45
45
  import {
46
46
  detectEntropyDefinition,
47
47
  handleDetectEntropy
48
- } from "./chunk-M4C3ZIGL.js";
48
+ } from "./chunk-KV7A5OZT.js";
49
49
  import {
50
50
  checkPerformanceDefinition,
51
51
  getCriticalPathsDefinition,
@@ -55,7 +55,7 @@ import {
55
55
  handleGetPerfBaselines,
56
56
  handleUpdatePerfBaselines,
57
57
  updatePerfBaselinesDefinition
58
- } from "./chunk-GHPWBWUW.js";
58
+ } from "./chunk-YLTRFZAT.js";
59
59
  import {
60
60
  resultToMcpResponse
61
61
  } from "./chunk-EPUKTTJZ.js";
@@ -67,7 +67,7 @@ import {
67
67
  } from "./chunk-27AJKSQY.js";
68
68
  import {
69
69
  resolveConfig
70
- } from "./chunk-4FVHBBPY.js";
70
+ } from "./chunk-LO7ZLV7S.js";
71
71
  import {
72
72
  GENERATED_HEADER_CLAUDE,
73
73
  GENERATED_HEADER_CODEX,
@@ -103,7 +103,7 @@ import {
103
103
  scanForInjection,
104
104
  serializeEnvelope,
105
105
  writeTaint
106
- } from "./chunk-MAFI6UWT.js";
106
+ } from "./chunk-K4WRQTEF.js";
107
107
  import {
108
108
  Err,
109
109
  Ok
@@ -291,9 +291,7 @@ function ensureHarnessGitignore(targetDir) {
291
291
  analyses/
292
292
  graph/
293
293
  debug/
294
- hooks/
295
294
  interactions/
296
- security/
297
295
  sessions/
298
296
  streams/
299
297
  workspaces/
@@ -313,6 +311,10 @@ events.jsonl
313
311
  .install-id
314
312
  telemetry.json
315
313
  .telemetry-notice-shown
314
+
315
+ # security/: track timeline.json (trend ledger), ignore everything else
316
+ security/*
317
+ !security/timeline.json
316
318
  `;
317
319
  fs.mkdirSync(path.dirname(gitignorePath), { recursive: true });
318
320
  fs.writeFileSync(gitignorePath, content);
@@ -706,7 +708,7 @@ ${skippedMsg}`
706
708
  async function handleInitProject(input) {
707
709
  const i = input;
708
710
  try {
709
- const { TemplateEngine } = await import("./engine-JBUIA2XO.js");
711
+ const { TemplateEngine } = await import("./engine-D6UYH6DB.js");
710
712
  const engine = new TemplateEngine(resolveTemplatesDir());
711
713
  const safePath = sanitizePath(i.path);
712
714
  const detected = tryDetectFramework(engine, safePath, i);
@@ -728,7 +730,7 @@ var listPersonasDefinition = {
728
730
  inputSchema: { type: "object", properties: {} }
729
731
  };
730
732
  async function handleListPersonas() {
731
- const { listPersonas } = await import("./loader-WCKVMDYR.js");
733
+ const { listPersonas } = await import("./loader-Z23JTXIZ.js");
732
734
  const result = listPersonas(resolvePersonasDir());
733
735
  return resultToMcpResponse(result);
734
736
  }
@@ -752,10 +754,10 @@ async function handleGeneratePersonaArtifacts(input) {
752
754
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
753
755
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
754
756
  }
755
- const { loadPersona } = await import("./loader-WCKVMDYR.js");
756
- const { generateRuntime } = await import("./runtime-3SKKEVPF.js");
757
- const { generateAgentsMd } = await import("./agents-md-XCAWON2D.js");
758
- const { generateCIWorkflow } = await import("./ci-workflow-A2E2RTOP.js");
757
+ const { loadPersona } = await import("./loader-Z23JTXIZ.js");
758
+ const { generateRuntime } = await import("./runtime-KCBNQUXK.js");
759
+ const { generateAgentsMd } = await import("./agents-md-L4X4MOWT.js");
760
+ const { generateCIWorkflow } = await import("./ci-workflow-TOS5X527.js");
759
761
  const personasDir = resolvePersonasDir();
760
762
  const filePath = path3.join(personasDir, `${input.name}.yaml`);
761
763
  if (!filePath.startsWith(personasDir)) {
@@ -810,7 +812,7 @@ async function handleRunPersona(input) {
810
812
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
811
813
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
812
814
  }
813
- const { loadPersona } = await import("./loader-WCKVMDYR.js");
815
+ const { loadPersona } = await import("./loader-Z23JTXIZ.js");
814
816
  const { runPersona } = await import("./runner-AAEF2TXY.js");
815
817
  const { executeSkill } = await import("./skill-executor-MOCUIAYS.js");
816
818
  const personasDir = resolvePersonasDir();
@@ -1255,7 +1257,7 @@ function loadOrGenerateProfile(projectRoot) {
1255
1257
  // src/mcp/tools/event-emitter.ts
1256
1258
  async function emitSkillEvent(projectPath, event) {
1257
1259
  try {
1258
- const { emitEvent } = await import("./dist-K22DQUYY.js");
1260
+ const { emitEvent } = await import("./dist-6RT2AVYU.js");
1259
1261
  await emitEvent(projectPath, event);
1260
1262
  } catch {
1261
1263
  }
@@ -1527,7 +1529,7 @@ async function autoSyncRoadmap(projectPath) {
1527
1529
  try {
1528
1530
  const roadmapFile = path10.join(projectPath, "docs", "roadmap.md");
1529
1531
  if (!fs9.existsSync(roadmapFile)) return;
1530
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-K22DQUYY.js");
1532
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-6RT2AVYU.js");
1531
1533
  const raw = fs9.readFileSync(roadmapFile, "utf-8");
1532
1534
  const parseResult = parseRoadmap(raw);
1533
1535
  if (!parseResult.ok) return;
@@ -1557,7 +1559,7 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1557
1559
  console.warn("[roadmap-sync] GITHUB_TOKEN not found \u2014 external sync skipped");
1558
1560
  return;
1559
1561
  }
1560
- const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-K22DQUYY.js");
1562
+ const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-6RT2AVYU.js");
1561
1563
  const adapter = new GitHubIssuesSyncAdapter({
1562
1564
  token,
1563
1565
  config: trackerConfig
@@ -1654,12 +1656,12 @@ var manageStateDefinition = {
1654
1656
  }
1655
1657
  };
1656
1658
  async function handleShow(projectPath, input) {
1657
- const { loadState } = await import("./dist-K22DQUYY.js");
1659
+ const { loadState } = await import("./dist-6RT2AVYU.js");
1658
1660
  return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
1659
1661
  }
1660
1662
  async function handleLearn(projectPath, input) {
1661
1663
  if (!input.learning) return mcpError("Error: learning is required for learn action");
1662
- const { appendLearning } = await import("./dist-K22DQUYY.js");
1664
+ const { appendLearning } = await import("./dist-6RT2AVYU.js");
1663
1665
  const result = await appendLearning(
1664
1666
  projectPath,
1665
1667
  input.learning,
@@ -1674,7 +1676,7 @@ async function handleLearn(projectPath, input) {
1674
1676
  async function handleFailure(projectPath, input) {
1675
1677
  if (!input.description) return mcpError("Error: description is required for failure action");
1676
1678
  if (!input.failureType) return mcpError("Error: failureType is required for failure action");
1677
- const { appendFailure } = await import("./dist-K22DQUYY.js");
1679
+ const { appendFailure } = await import("./dist-6RT2AVYU.js");
1678
1680
  const result = await appendFailure(
1679
1681
  projectPath,
1680
1682
  input.description,
@@ -1693,19 +1695,19 @@ async function handleFailure(projectPath, input) {
1693
1695
  return resultToMcpResponse(Ok({ recorded: true }));
1694
1696
  }
1695
1697
  async function handleArchive(projectPath, input) {
1696
- const { archiveFailures } = await import("./dist-K22DQUYY.js");
1698
+ const { archiveFailures } = await import("./dist-6RT2AVYU.js");
1697
1699
  const result = await archiveFailures(projectPath, input.stream, input.session);
1698
1700
  if (!result.ok) return resultToMcpResponse(result);
1699
1701
  return resultToMcpResponse(Ok({ archived: true }));
1700
1702
  }
1701
1703
  async function handleReset(projectPath, input) {
1702
- const { saveState, DEFAULT_STATE } = await import("./dist-K22DQUYY.js");
1704
+ const { saveState, DEFAULT_STATE } = await import("./dist-6RT2AVYU.js");
1703
1705
  const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
1704
1706
  if (!result.ok) return resultToMcpResponse(result);
1705
1707
  return resultToMcpResponse(Ok({ reset: true }));
1706
1708
  }
1707
1709
  async function handleGate(projectPath, input) {
1708
- const { runMechanicalGate } = await import("./dist-K22DQUYY.js");
1710
+ const { runMechanicalGate } = await import("./dist-6RT2AVYU.js");
1709
1711
  const result = await runMechanicalGate(projectPath);
1710
1712
  if (result.ok) {
1711
1713
  await emitSkillEvent(projectPath, {
@@ -1725,7 +1727,7 @@ async function handleGate(projectPath, input) {
1725
1727
  }
1726
1728
  async function handleSaveHandoff(projectPath, input) {
1727
1729
  if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
1728
- const { saveHandoff } = await import("./dist-K22DQUYY.js");
1730
+ const { saveHandoff } = await import("./dist-6RT2AVYU.js");
1729
1731
  const result = await saveHandoff(
1730
1732
  projectPath,
1731
1733
  input.handoff,
@@ -1747,7 +1749,7 @@ async function handleSaveHandoff(projectPath, input) {
1747
1749
  return resultToMcpResponse(Ok({ saved: true }));
1748
1750
  }
1749
1751
  async function handleLoadHandoff(projectPath, input) {
1750
- const { loadHandoff } = await import("./dist-K22DQUYY.js");
1752
+ const { loadHandoff } = await import("./dist-6RT2AVYU.js");
1751
1753
  return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
1752
1754
  }
1753
1755
  async function handleAppendEntry(projectPath, input) {
@@ -1755,7 +1757,7 @@ async function handleAppendEntry(projectPath, input) {
1755
1757
  if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
1756
1758
  if (!input.content) return mcpError("Error: content is required for append_entry action");
1757
1759
  if (input.session) {
1758
- const { appendSessionEntry } = await import("./dist-K22DQUYY.js");
1760
+ const { appendSessionEntry } = await import("./dist-6RT2AVYU.js");
1759
1761
  const result = await appendSessionEntry(
1760
1762
  projectPath,
1761
1763
  input.session,
@@ -1768,7 +1770,7 @@ async function handleAppendEntry(projectPath, input) {
1768
1770
  if (input.section !== "decisions") {
1769
1771
  return mcpError("Error: session is required for non-decisions sections");
1770
1772
  }
1771
- const { loadState, saveState } = await import("./dist-K22DQUYY.js");
1773
+ const { loadState, saveState } = await import("./dist-6RT2AVYU.js");
1772
1774
  const lr = await loadState(projectPath, input.stream);
1773
1775
  if (!lr.ok) return resultToMcpResponse(lr);
1774
1776
  lr.value.decisions.push({
@@ -1786,7 +1788,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1786
1788
  if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
1787
1789
  if (!input.newStatus)
1788
1790
  return mcpError("Error: newStatus is required for update_entry_status action");
1789
- const { updateSessionEntryStatus } = await import("./dist-K22DQUYY.js");
1791
+ const { updateSessionEntryStatus } = await import("./dist-6RT2AVYU.js");
1790
1792
  const result = await updateSessionEntryStatus(
1791
1793
  projectPath,
1792
1794
  input.session,
@@ -1799,7 +1801,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1799
1801
  async function handleReadSection(projectPath, input) {
1800
1802
  if (!input.session) return mcpError("Error: session is required for read_section action");
1801
1803
  if (!input.section) return mcpError("Error: section is required for read_section action");
1802
- const { readSessionSection } = await import("./dist-K22DQUYY.js");
1804
+ const { readSessionSection } = await import("./dist-6RT2AVYU.js");
1803
1805
  const result = await readSessionSection(
1804
1806
  projectPath,
1805
1807
  input.session,
@@ -1809,13 +1811,13 @@ async function handleReadSection(projectPath, input) {
1809
1811
  }
1810
1812
  async function handleReadSections(projectPath, input) {
1811
1813
  if (!input.session) return mcpError("Error: session is required for read_sections action");
1812
- const { readSessionSections } = await import("./dist-K22DQUYY.js");
1814
+ const { readSessionSections } = await import("./dist-6RT2AVYU.js");
1813
1815
  const result = await readSessionSections(projectPath, input.session);
1814
1816
  return resultToMcpResponse(result);
1815
1817
  }
1816
1818
  async function handleArchiveSession(projectPath, input) {
1817
1819
  if (!input.session) return mcpError("Error: session is required for archive_session action");
1818
- const { archiveSession } = await import("./dist-K22DQUYY.js");
1820
+ const { archiveSession } = await import("./dist-6RT2AVYU.js");
1819
1821
  const result = await archiveSession(projectPath, input.session);
1820
1822
  if (!result.ok) return resultToMcpResponse(result);
1821
1823
  await autoSyncRoadmap(projectPath);
@@ -1895,7 +1897,7 @@ var listStreamsDefinition = {
1895
1897
  };
1896
1898
  async function handleListStreams(input) {
1897
1899
  try {
1898
- const { listStreams, loadStreamIndex } = await import("./dist-K22DQUYY.js");
1900
+ const { listStreams, loadStreamIndex } = await import("./dist-6RT2AVYU.js");
1899
1901
  const projectPath = sanitizePath(input.path);
1900
1902
  const indexResult = await loadStreamIndex(projectPath);
1901
1903
  const streamsResult = await listStreams(projectPath);
@@ -1933,7 +1935,7 @@ var checkPhaseGateDefinition = {
1933
1935
  };
1934
1936
  async function handleCheckPhaseGate(input) {
1935
1937
  try {
1936
- const { runCheckPhaseGate } = await import("./check-phase-gate-GE5ALEEU.js");
1938
+ const { runCheckPhaseGate } = await import("./check-phase-gate-646KY67H.js");
1937
1939
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
1938
1940
  if (result.ok) {
1939
1941
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -1989,7 +1991,7 @@ async function handleValidateCrossCheck(input) {
1989
1991
  };
1990
1992
  }
1991
1993
  try {
1992
- const { runCrossCheck } = await import("./validate-cross-check-GBX7B7CQ.js");
1994
+ const { runCrossCheck } = await import("./validate-cross-check-MI5MZ7MB.js");
1993
1995
  const specsDir = path11.resolve(projectPath, input.specsDir ?? "docs/specs");
1994
1996
  if (!specsDir.startsWith(projectPath)) {
1995
1997
  return {
@@ -2249,6 +2251,36 @@ function renderClaudeCode(spec) {
2249
2251
  return lines.join("\n");
2250
2252
  }
2251
2253
 
2254
+ // src/slash-commands/render-cursor-command.ts
2255
+ function renderCursorCommand(spec) {
2256
+ const lines = ["---"];
2257
+ lines.push(`name: ${spec.fullName}`);
2258
+ lines.push(`description: ${spec.description}`);
2259
+ lines.push("---");
2260
+ lines.push("");
2261
+ lines.push(GENERATED_HEADER_CURSOR);
2262
+ lines.push("");
2263
+ lines.push("<context>");
2264
+ lines.push(spec.prompt.context);
2265
+ lines.push("</context>");
2266
+ lines.push("");
2267
+ lines.push("<objective>");
2268
+ lines.push(spec.prompt.objective);
2269
+ lines.push("</objective>");
2270
+ lines.push("");
2271
+ if (spec.prompt.executionContext) {
2272
+ lines.push("<execution_context>");
2273
+ lines.push(spec.prompt.executionContext);
2274
+ lines.push("</execution_context>");
2275
+ lines.push("");
2276
+ }
2277
+ lines.push("<process>");
2278
+ lines.push(spec.prompt.process);
2279
+ lines.push("</process>");
2280
+ lines.push("");
2281
+ return lines.join("\n");
2282
+ }
2283
+
2252
2284
  // src/slash-commands/render-gemini.ts
2253
2285
  function escapeTomlLiteral(content) {
2254
2286
  return content.replace(/'''/g, "''\\'''");
@@ -2471,8 +2503,11 @@ function resolveAbsoluteExecutionContext(spec) {
2471
2503
  }
2472
2504
  };
2473
2505
  }
2474
- function renderSpec(platform, spec, useAbsolutePaths) {
2506
+ function renderSpec(platform, spec, useAbsolutePaths, cursorMode = "rules") {
2475
2507
  if (platform === "cursor") {
2508
+ if (cursorMode === "commands") {
2509
+ return [`${spec.name}.md`, renderCursorCommand(spec)];
2510
+ }
2476
2511
  const mdPath2 = path14.join(spec.skillsBaseDir, spec.sourceDir, "SKILL.md");
2477
2512
  const skillMd = fs12.existsSync(mdPath2) ? fs12.readFileSync(mdPath2, "utf-8") : "";
2478
2513
  return [`${spec.skillYamlName}.mdc`, renderCursor(spec, skillMd, spec.cursor)];
@@ -2501,7 +2536,7 @@ function generateForPlatform(platform, outputDir, specs, opts) {
2501
2536
  const parentRendered = /* @__PURE__ */ new Map();
2502
2537
  const customNamespaceRendered = /* @__PURE__ */ new Map();
2503
2538
  for (const spec of specs) {
2504
- const [filename, content] = renderSpec(platform, spec, opts.global);
2539
+ const [filename, content] = renderSpec(platform, spec, opts.global, opts.cursorMode);
2505
2540
  if (spec.commandName && (platform === "claude-code" || platform === "gemini-cli")) {
2506
2541
  parentRendered.set(filename, content);
2507
2542
  } else if (spec.customNamespace && (platform === "claude-code" || platform === "gemini-cli")) {
@@ -2631,10 +2666,20 @@ ${result.platform} \u2192 ${result.outputDir}`);
2631
2666
  function createGenerateSlashCommandsCommand() {
2632
2667
  return new Command("generate-slash-commands").description(
2633
2668
  "Generate native commands for Claude Code, Gemini CLI, Codex CLI, and Cursor from skill metadata"
2634
- ).option("--platforms <list>", "Target platforms (comma-separated)", "claude-code,gemini-cli").option("--global", "Write to global config directories", false).option("--include-global", "Include built-in global skills alongside project skills", false).option("--output <dir>", "Custom output directory").option("--skills-dir <path>", "Skills directory to scan").option("--dry-run", "Show what would change without writing", false).option("--yes", "Skip deletion confirmation prompts", false).action(async (opts, cmd) => {
2669
+ ).option("--platforms <list>", "Target platforms (comma-separated)", "claude-code,gemini-cli").option("--global", "Write to global config directories", false).option("--include-global", "Include built-in global skills alongside project skills", false).option("--output <dir>", "Custom output directory").option("--skills-dir <path>", "Skills directory to scan").option("--dry-run", "Show what would change without writing", false).option("--yes", "Skip deletion confirmation prompts", false).option(
2670
+ "--cursor-mode <mode>",
2671
+ 'For cursor platform: "rules" (.mdc with description/globs/alwaysApply, default) or "commands" (.md with name/description for plugin commands/ dir)',
2672
+ "rules"
2673
+ ).action(async (opts, cmd) => {
2635
2674
  const globalOpts = cmd.optsWithGlobals();
2636
2675
  try {
2637
2676
  const platforms = validatePlatforms(opts.platforms.split(",").map((p) => p.trim()));
2677
+ if (opts.cursorMode !== "rules" && opts.cursorMode !== "commands") {
2678
+ throw new CLIError(
2679
+ `Invalid --cursor-mode "${opts.cursorMode}". Expected "rules" or "commands".`,
2680
+ ExitCode.VALIDATION_FAILED
2681
+ );
2682
+ }
2638
2683
  const generateOpts = {
2639
2684
  platforms,
2640
2685
  global: opts.global,
@@ -2642,7 +2687,8 @@ function createGenerateSlashCommandsCommand() {
2642
2687
  output: opts.output,
2643
2688
  skillsDir: opts.skillsDir ?? "",
2644
2689
  dryRun: opts.dryRun,
2645
- yes: opts.yes
2690
+ yes: opts.yes,
2691
+ cursorMode: opts.cursorMode
2646
2692
  };
2647
2693
  const results = generateSlashCommands(generateOpts);
2648
2694
  if (globalOpts.json) {
@@ -2712,7 +2758,7 @@ async function handleGenerateSlashCommands(input) {
2712
2758
  // src/mcp/resources/state.ts
2713
2759
  async function getStateResource(projectRoot) {
2714
2760
  try {
2715
- const { loadState, migrateToStreams } = await import("./dist-K22DQUYY.js");
2761
+ const { loadState, migrateToStreams } = await import("./dist-6RT2AVYU.js");
2716
2762
  await migrateToStreams(projectRoot);
2717
2763
  const result = await loadState(projectRoot);
2718
2764
  if (result.ok) {
@@ -3732,7 +3778,7 @@ var generateAgentDefinitionsDefinition = {
3732
3778
  }
3733
3779
  };
3734
3780
  async function handleGenerateAgentDefinitions(input) {
3735
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-VL3ZVR32.js");
3781
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-GFNXJCBY.js");
3736
3782
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
3737
3783
  const results = generateAgentDefinitions({
3738
3784
  platforms: [...platforms],
@@ -4064,7 +4110,7 @@ function shouldTriggerExternalSync(input, response) {
4064
4110
  }
4065
4111
  async function handleManageRoadmap(input) {
4066
4112
  try {
4067
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-K22DQUYY.js");
4113
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-6RT2AVYU.js");
4068
4114
  const { Ok: Ok2 } = await import("./dist-3EWNRFFQ.js");
4069
4115
  const projectPath = sanitizePath(input.path);
4070
4116
  const deps = {
@@ -4503,7 +4549,7 @@ async function handleTransition(validInput, projectPath, id) {
4503
4549
  const transition = transitionResult.data;
4504
4550
  const prompt = renderTransition(transition);
4505
4551
  try {
4506
- const { saveHandoff } = await import("./dist-K22DQUYY.js");
4552
+ const { saveHandoff } = await import("./dist-6RT2AVYU.js");
4507
4553
  await saveHandoff(
4508
4554
  projectPath,
4509
4555
  {
@@ -4584,7 +4630,7 @@ async function handleEmitInteraction(input) {
4584
4630
  }
4585
4631
  async function recordInteraction(projectPath, id, type, decision, stream) {
4586
4632
  try {
4587
- const { loadState, saveState } = await import("./dist-K22DQUYY.js");
4633
+ const { loadState, saveState } = await import("./dist-6RT2AVYU.js");
4588
4634
  const stateResult = await loadState(projectPath, stream);
4589
4635
  if (stateResult.ok) {
4590
4636
  const state = stateResult.value;
@@ -4745,10 +4791,10 @@ async function handleGatherContext(input) {
4745
4791
  input.include ?? ["state", "learnings", "handoff", "graph", "validation", "businessKnowledge"]
4746
4792
  );
4747
4793
  const errors = [];
4748
- const statePromise = includeSet.has("state") ? import("./dist-K22DQUYY.js").then(
4794
+ const statePromise = includeSet.has("state") ? import("./dist-6RT2AVYU.js").then(
4749
4795
  (core) => core.loadState(projectPath, void 0, input.session)
4750
4796
  ) : Promise.resolve(null);
4751
- const learningsPromise = includeSet.has("learnings") ? import("./dist-K22DQUYY.js").then(
4797
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-6RT2AVYU.js").then(
4752
4798
  (core) => core.loadBudgetedLearnings(projectPath, {
4753
4799
  intent: input.intent,
4754
4800
  tokenBudget: input.learningsBudget ?? 1e3,
@@ -4757,7 +4803,7 @@ async function handleGatherContext(input) {
4757
4803
  ...input.depth !== void 0 && { depth: input.depth }
4758
4804
  })
4759
4805
  ) : Promise.resolve(null);
4760
- const handoffPromise = includeSet.has("handoff") ? import("./dist-K22DQUYY.js").then(
4806
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-6RT2AVYU.js").then(
4761
4807
  (core) => core.loadHandoff(projectPath, void 0, input.session)
4762
4808
  ) : Promise.resolve(null);
4763
4809
  const graphPromise = includeSet.has("graph") ? (async () => {
@@ -4801,11 +4847,11 @@ async function handleGatherContext(input) {
4801
4847
  context: contextBlocks
4802
4848
  };
4803
4849
  })() : Promise.resolve(null);
4804
- const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-K22DQUYY.js").then(
4850
+ const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-6RT2AVYU.js").then(
4805
4851
  (core) => core.readSessionSections(projectPath, input.session)
4806
4852
  ) : Promise.resolve(null);
4807
4853
  const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
4808
- const eventsPromise = shouldIncludeEvents ? import("./dist-K22DQUYY.js").then(async (core) => {
4854
+ const eventsPromise = shouldIncludeEvents ? import("./dist-6RT2AVYU.js").then(async (core) => {
4809
4855
  const result = await core.loadEvents(projectPath, {
4810
4856
  session: input.session
4811
4857
  });
@@ -4813,7 +4859,7 @@ async function handleGatherContext(input) {
4813
4859
  return core.formatEventTimeline(result.value);
4814
4860
  }) : Promise.resolve(null);
4815
4861
  const validationPromise = includeSet.has("validation") ? (async () => {
4816
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-SIWFNTXI.js");
4862
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-74XTQR7Q.js");
4817
4863
  const result = await handleValidateProject2({ path: projectPath });
4818
4864
  const first = result.content[0];
4819
4865
  return first ? JSON.parse(first.text) : null;
@@ -4916,7 +4962,7 @@ async function handleGatherContext(input) {
4916
4962
  };
4917
4963
  if (input.session) {
4918
4964
  try {
4919
- const core = await import("./dist-K22DQUYY.js");
4965
+ const core = await import("./dist-6RT2AVYU.js");
4920
4966
  core.updateSessionIndex(
4921
4967
  projectPath,
4922
4968
  input.session,
@@ -5068,7 +5114,7 @@ async function handleReviewChanges(input) {
5068
5114
  }
5069
5115
  }
5070
5116
  async function runQuickReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5071
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-BHOBVKI3.js");
5117
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-WV7EQVK7.js");
5072
5118
  const result = await handleAnalyzeDiff2({ diff, path: projectPath });
5073
5119
  const firstContent = result.content[0];
5074
5120
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -5103,7 +5149,7 @@ function extractFileCount(diffParsed) {
5103
5149
  return files?.length ?? 0;
5104
5150
  }
5105
5151
  async function runStandardReview(projectPath, diff, diffLines, downgraded, offset, limit) {
5106
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-BHOBVKI3.js");
5152
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-WV7EQVK7.js");
5107
5153
  const [diffResult, reviewResult] = await Promise.all([
5108
5154
  handleAnalyzeDiff2({ diff, path: projectPath }),
5109
5155
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -5138,7 +5184,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded, offse
5138
5184
  };
5139
5185
  }
5140
5186
  async function runDeepReview(projectPath, diff, diffLines, _downgraded, offset, limit) {
5141
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-CHE5LJ5D.js");
5187
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-COBGGXHJ.js");
5142
5188
  const result = await handleRunCodeReview2({
5143
5189
  path: projectPath,
5144
5190
  diff,
@@ -5432,7 +5478,7 @@ async function handleDetectStaleConstraints(input) {
5432
5478
  ]
5433
5479
  };
5434
5480
  }
5435
- const { detectStaleConstraints } = await import("./dist-K22DQUYY.js");
5481
+ const { detectStaleConstraints } = await import("./dist-6RT2AVYU.js");
5436
5482
  const result = detectStaleConstraints(
5437
5483
  store,
5438
5484
  windowDays,
@@ -5552,10 +5598,10 @@ function countCriticalFindings(securityData) {
5552
5598
  return findings.filter((f) => f.severity === "error").length;
5553
5599
  }
5554
5600
  async function runHealthChecks(projectPath) {
5555
- const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-NPYA3UVI.js");
5556
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-KERHEEQZ.js");
5557
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-Y7LUT4BZ.js");
5558
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-MF54MY3P.js");
5601
+ const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-PHC2HO3V.js");
5602
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-WJRIYQ45.js");
5603
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-LZ4IDGZR.js");
5604
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-MAPRIFQT.js");
5559
5605
  const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
5560
5606
  handleAssessProject2({
5561
5607
  path: projectPath,
@@ -6396,7 +6442,7 @@ async function handleGetDecayTrends(input) {
6396
6442
  };
6397
6443
  }
6398
6444
  try {
6399
- const core = await import("./dist-K22DQUYY.js");
6445
+ const core = await import("./dist-6RT2AVYU.js");
6400
6446
  const { TimelineManager } = core;
6401
6447
  const manager = new TimelineManager(projectPath);
6402
6448
  const timeline = manager.load();
@@ -6531,7 +6577,7 @@ async function handleCodeOutline(input) {
6531
6577
  };
6532
6578
  }
6533
6579
  try {
6534
- const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-K22DQUYY.js");
6580
+ const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-6RT2AVYU.js");
6535
6581
  const { stat } = await import("fs/promises");
6536
6582
  const stats = await stat(targetPath).catch(() => null);
6537
6583
  if (stats?.isFile()) {
@@ -6550,7 +6596,7 @@ async function handleCodeOutline(input) {
6550
6596
  })
6551
6597
  );
6552
6598
  fileStats.sort((a, b) => b.mtimeMs - a.mtimeMs);
6553
- const { paginate: paginate2 } = await import("./dist-K22DQUYY.js");
6599
+ const { paginate: paginate2 } = await import("./dist-6RT2AVYU.js");
6554
6600
  const paged = paginate2(fileStats, input.offset ?? 0, input.limit ?? 30);
6555
6601
  const results = [];
6556
6602
  for (const entry of paged.items) {
@@ -6623,7 +6669,7 @@ async function handleCodeSearch(input) {
6623
6669
  };
6624
6670
  }
6625
6671
  try {
6626
- const { searchSymbols } = await import("./dist-K22DQUYY.js");
6672
+ const { searchSymbols } = await import("./dist-6RT2AVYU.js");
6627
6673
  const result = await searchSymbols(input.query, directory, input.glob);
6628
6674
  const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
6629
6675
  for (const match of result.matches) {
@@ -6692,7 +6738,7 @@ async function handleCodeUnfold(input) {
6692
6738
  }
6693
6739
  try {
6694
6740
  if (input.symbol) {
6695
- const { unfoldSymbol } = await import("./dist-K22DQUYY.js");
6741
+ const { unfoldSymbol } = await import("./dist-6RT2AVYU.js");
6696
6742
  const result = await unfoldSymbol(filePath, input.symbol);
6697
6743
  const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
6698
6744
  ` : `${result.file}:${result.startLine}-${result.endLine}
@@ -6700,7 +6746,7 @@ async function handleCodeUnfold(input) {
6700
6746
  return { content: [{ type: "text", text: header + result.content }] };
6701
6747
  }
6702
6748
  if (input.startLine != null && input.endLine != null) {
6703
- const { unfoldRange } = await import("./dist-K22DQUYY.js");
6749
+ const { unfoldRange } = await import("./dist-6RT2AVYU.js");
6704
6750
  const result = await unfoldRange(filePath, input.startLine, input.endLine);
6705
6751
  const header = `${result.file}:${result.startLine}-${result.endLine}
6706
6752
  `;
@@ -6885,7 +6931,7 @@ async function handlePredictFailures(input) {
6885
6931
  };
6886
6932
  }
6887
6933
  try {
6888
- const core = await import("./dist-K22DQUYY.js");
6934
+ const core = await import("./dist-6RT2AVYU.js");
6889
6935
  const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
6890
6936
  const manager = new TimelineManager(projectPath);
6891
6937
  const includeRoadmap = input.includeRoadmap !== false;
@@ -7994,7 +8040,7 @@ async function handleDetectConstraintEmergence(input) {
7994
8040
  }
7995
8041
  const nodePath = await import("path");
7996
8042
  const historyPath = nodePath.resolve(projectPath, ".harness/arch/violation-history.json");
7997
- const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-K22DQUYY.js");
8043
+ const { ViolationHistoryManager, detectEmergentConstraints } = await import("./dist-6RT2AVYU.js");
7998
8044
  const manager = new ViolationHistoryManager(historyPath);
7999
8045
  const history = manager.load();
8000
8046
  const options = { windowWeeks, minOccurrences };
@@ -8082,7 +8128,7 @@ async function handleRunCIChecks(input) {
8082
8128
  };
8083
8129
  }
8084
8130
  try {
8085
- const { runCIChecks } = await import("./dist-K22DQUYY.js");
8131
+ const { runCIChecks } = await import("./dist-6RT2AVYU.js");
8086
8132
  const skip = input.checks ? VALID_CHECKS.filter((c) => !input.checks.includes(c)) : [];
8087
8133
  const result = await runCIChecks({
8088
8134
  projectRoot: projectPath,
@@ -8144,7 +8190,7 @@ async function handleGenerateBlueprint(input) {
8144
8190
  };
8145
8191
  }
8146
8192
  try {
8147
- const { ProjectScanner } = await import("./dist-K22DQUYY.js");
8193
+ const { ProjectScanner } = await import("./dist-6RT2AVYU.js");
8148
8194
  const scanner = new ProjectScanner(projectPath);
8149
8195
  const data = await scanner.scan();
8150
8196
  return {
@@ -8390,7 +8436,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
8390
8436
  shouldRunCheck,
8391
8437
  readCheckState,
8392
8438
  spawnBackgroundCheck
8393
- } = await import("./dist-K22DQUYY.js");
8439
+ } = await import("./dist-6RT2AVYU.js");
8394
8440
  const { CLI_VERSION } = await import("./version-CUI434OP.js");
8395
8441
  const configInterval = readConfigInterval(resolvedRoot);
8396
8442
  const DEFAULT_INTERVAL = 864e5;
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  ArchConfigSchema,
6
6
  init_dist
7
- } from "./chunk-MAFI6UWT.js";
7
+ } from "./chunk-K4WRQTEF.js";
8
8
  import {
9
9
  Err,
10
10
  Ok