@harness-engineering/cli 2.3.0 → 2.4.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 (57) hide show
  1. package/dist/agents/skills/claude-code/harness-compliance/SKILL.md +19 -0
  2. package/dist/agents/skills/codex/harness-compliance/SKILL.md +19 -0
  3. package/dist/agents/skills/cursor/harness-compliance/SKILL.md +19 -0
  4. package/dist/agents/skills/gemini-cli/harness-compliance/SKILL.md +19 -0
  5. package/dist/{agents-md-N7YBQPE3.js → agents-md-ROTDQOXM.js} +3 -3
  6. package/dist/{architecture-PP7WERSV.js → architecture-I2G7PNQB.js} +4 -4
  7. package/dist/{assess-project-WXFCJQTX.js → assess-project-LO6NCLE7.js} +1 -1
  8. package/dist/bin/harness-mcp.js +15 -15
  9. package/dist/bin/harness.js +25 -25
  10. package/dist/{check-phase-gate-R3KQFBAH.js → check-phase-gate-52SQFNJB.js} +4 -4
  11. package/dist/{chunk-5PPV4WYY.js → chunk-27EHWQPK.js} +5 -5
  12. package/dist/{chunk-7PGYJO3L.js → chunk-2L2A6W6I.js} +3 -3
  13. package/dist/{chunk-GTXUUGFG.js → chunk-4XB37LST.js} +9 -9
  14. package/dist/{chunk-5KTTKXQN.js → chunk-54JTO4NZ.js} +1 -1
  15. package/dist/{chunk-D2LZUJLP.js → chunk-5YOHXTK3.js} +2 -2
  16. package/dist/{chunk-YG4ZBGEH.js → chunk-7BNK4M23.js} +1 -1
  17. package/dist/{chunk-MKPRB4PL.js → chunk-DJRRTZGD.js} +1 -1
  18. package/dist/{chunk-DLBMYLYR.js → chunk-FJJYQWUP.js} +1 -1
  19. package/dist/{chunk-4DWOMGUM.js → chunk-GDJ2MRYH.js} +476 -85
  20. package/dist/{chunk-4NFV5UZO.js → chunk-GN2CSZC6.js} +3 -3
  21. package/dist/{chunk-L3CEN42B.js → chunk-JGPOQJ73.js} +1 -1
  22. package/dist/{chunk-PW3U4YJV.js → chunk-KPWUZSHL.js} +32 -4
  23. package/dist/{chunk-MT2MMBUA.js → chunk-MQRKPF46.js} +9 -9
  24. package/dist/{chunk-NP2ZI6E3.js → chunk-MSBVH6ER.js} +1 -1
  25. package/dist/{chunk-LM4F5KBK.js → chunk-NGCM4B4V.js} +5 -5
  26. package/dist/{chunk-6CHNY3NJ.js → chunk-OFMQEUYN.js} +1 -1
  27. package/dist/{chunk-3LPOTTPX.js → chunk-Q43LM7CO.js} +92 -92
  28. package/dist/{chunk-GUIX2TMZ.js → chunk-RYVL76ZF.js} +1 -1
  29. package/dist/{chunk-YEBUFRTT.js → chunk-RZASDABE.js} +2 -2
  30. package/dist/{chunk-35FI23SO.js → chunk-TCR5PKMU.js} +216 -119
  31. package/dist/{chunk-KTWKW6KJ.js → chunk-TIQU5VY7.js} +1 -1
  32. package/dist/{chunk-KUVPSUG4.js → chunk-TVJZX53C.js} +1 -1
  33. package/dist/{chunk-KWD6FF7M.js → chunk-U4XK4BB3.js} +8 -8
  34. package/dist/{chunk-EJPR5VCT.js → chunk-WY2J54IZ.js} +6 -6
  35. package/dist/{chunk-BMM3GXV6.js → chunk-XPRGWHBL.js} +80 -37
  36. package/dist/{ci-workflow-GFCXFJ4G.js → ci-workflow-MYBH64CR.js} +3 -3
  37. package/dist/{dist-D27LJR2T.js → dist-SQAOKWXM.js} +5 -3
  38. package/dist/{dist-I4LWG3IN.js → dist-ZJGFXGIB.js} +10 -2
  39. package/dist/{docs-UXKDKPJF.js → docs-7CW7WUFB.js} +4 -4
  40. package/dist/{engine-A63FRDLF.js → engine-Y75QZW6N.js} +3 -3
  41. package/dist/{entropy-IFIP4ZP4.js → entropy-P6QELTFA.js} +3 -3
  42. package/dist/{feedback-W36DSJQA.js → feedback-PJWCDRRZ.js} +1 -1
  43. package/dist/{generate-agent-definitions-F4YMKQLP.js → generate-agent-definitions-ONDIJHHK.js} +4 -4
  44. package/dist/{glob-helper-FZPPTGJN.js → glob-helper-JE3MO4UD.js} +1 -1
  45. package/dist/{graph-loader-5MKHAJJF.js → graph-loader-TJU4E7KL.js} +1 -1
  46. package/dist/index.d.ts +66 -0
  47. package/dist/index.js +25 -25
  48. package/dist/{loader-4UAOGUSS.js → loader-DQRNWKOZ.js} +3 -3
  49. package/dist/{mcp-YW7PLXVQ.js → mcp-UUNLS3MC.js} +15 -15
  50. package/dist/{performance-AZ5UYPOQ.js → performance-7X3EFAOD.js} +4 -4
  51. package/dist/{review-pipeline-OLQVGBWJ.js → review-pipeline-GAJ22PBC.js} +3 -3
  52. package/dist/{runtime-GG3U5HH5.js → runtime-6TK6U72R.js} +3 -3
  53. package/dist/{scan-BIJYHOE7.js → scan-SFX5U3TE.js} +1 -1
  54. package/dist/{security-MYTRFSR7.js → security-ZSU643D7.js} +1 -1
  55. package/dist/{validate-QI4V4JY6.js → validate-IDX6RI3U.js} +4 -4
  56. package/dist/{validate-cross-check-XRSSAXJP.js → validate-cross-check-5YEWZ3EW.js} +3 -3
  57. package/package.json +7 -7
@@ -15,7 +15,7 @@ function evictIfNeeded() {
15
15
  }
16
16
  }
17
17
  async function doLoadGraphStore(projectRoot) {
18
- const { GraphStore } = await import("./dist-D27LJR2T.js");
18
+ const { GraphStore } = await import("./dist-SQAOKWXM.js");
19
19
  const graphDir = path.join(projectRoot, ".harness", "graph");
20
20
  const store = new GraphStore();
21
21
  const loaded = await store.load(graphDir);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-KET4QQZB.js";
4
4
  import {
5
5
  init_dist
6
- } from "./chunk-4DWOMGUM.js";
6
+ } from "./chunk-GDJ2MRYH.js";
7
7
  import {
8
8
  Err,
9
9
  Ok
@@ -7,10 +7,10 @@ import {
7
7
  import {
8
8
  findConfigFile,
9
9
  loadConfig
10
- } from "./chunk-PW3U4YJV.js";
10
+ } from "./chunk-KPWUZSHL.js";
11
11
  import {
12
12
  init_dist
13
- } from "./chunk-4DWOMGUM.js";
13
+ } from "./chunk-GDJ2MRYH.js";
14
14
  import {
15
15
  Ok
16
16
  } from "./chunk-RL4VMEXL.js";
@@ -35,7 +35,7 @@ var checkPerformanceDefinition = {
35
35
  };
36
36
  async function handleCheckPerformance(input) {
37
37
  try {
38
- const { EntropyAnalyzer } = await import("./dist-I4LWG3IN.js");
38
+ const { EntropyAnalyzer } = await import("./dist-ZJGFXGIB.js");
39
39
  const typeFilter = input.type ?? "all";
40
40
  const projectPath = sanitizePath(input.path);
41
41
  let entryPoints;
@@ -58,10 +58,10 @@ async function handleCheckPerformance(input) {
58
58
  });
59
59
  let graphOptions;
60
60
  try {
61
- const { loadGraphStore } = await import("./graph-loader-5MKHAJJF.js");
61
+ const { loadGraphStore } = await import("./graph-loader-TJU4E7KL.js");
62
62
  const store = await loadGraphStore(projectPath);
63
63
  if (store) {
64
- const { GraphComplexityAdapter, GraphCouplingAdapter } = await import("./dist-D27LJR2T.js");
64
+ const { GraphComplexityAdapter, GraphCouplingAdapter } = await import("./dist-SQAOKWXM.js");
65
65
  const complexityAdapter = new GraphComplexityAdapter(store);
66
66
  const couplingAdapter = new GraphCouplingAdapter(store);
67
67
  graphOptions = {
@@ -98,7 +98,7 @@ var getPerfBaselinesDefinition = {
98
98
  };
99
99
  async function handleGetPerfBaselines(input) {
100
100
  try {
101
- const { BaselineManager } = await import("./dist-I4LWG3IN.js");
101
+ const { BaselineManager } = await import("./dist-ZJGFXGIB.js");
102
102
  const manager = new BaselineManager(sanitizePath(input.path));
103
103
  const baselines = manager.load();
104
104
  return resultToMcpResponse(
@@ -146,7 +146,7 @@ var updatePerfBaselinesDefinition = {
146
146
  };
147
147
  async function handleUpdatePerfBaselines(input) {
148
148
  try {
149
- const { BaselineManager } = await import("./dist-I4LWG3IN.js");
149
+ const { BaselineManager } = await import("./dist-ZJGFXGIB.js");
150
150
  const manager = new BaselineManager(sanitizePath(input.path));
151
151
  manager.save(input.results, input.commitHash);
152
152
  const updated = manager.load();
@@ -176,7 +176,7 @@ var getCriticalPathsDefinition = {
176
176
  };
177
177
  async function handleGetCriticalPaths(input) {
178
178
  try {
179
- const { CriticalPathResolver } = await import("./dist-I4LWG3IN.js");
179
+ const { CriticalPathResolver } = await import("./dist-ZJGFXGIB.js");
180
180
  const resolver = new CriticalPathResolver(sanitizePath(input.path));
181
181
  const result = await resolver.resolve();
182
182
  return resultToMcpResponse(Ok(result));
@@ -50,7 +50,7 @@ async function handleAssessProject(input) {
50
50
  let validateResult = null;
51
51
  if (checksToRun.has("validate")) {
52
52
  try {
53
- const { handleValidateProject } = await import("./validate-QI4V4JY6.js");
53
+ const { handleValidateProject } = await import("./validate-IDX6RI3U.js");
54
54
  const result = await handleValidateProject({ path: projectPath });
55
55
  const first = result.content[0];
56
56
  const parsed = first ? JSON.parse(first.text) : {};
@@ -75,7 +75,7 @@ async function handleAssessProject(input) {
75
75
  parallelChecks.push(
76
76
  (async () => {
77
77
  try {
78
- const { handleCheckDependencies } = await import("./architecture-PP7WERSV.js");
78
+ const { handleCheckDependencies } = await import("./architecture-I2G7PNQB.js");
79
79
  const result = await handleCheckDependencies({ path: projectPath });
80
80
  const first = result.content[0];
81
81
  const parsed = first ? JSON.parse(first.text) : {};
@@ -102,7 +102,7 @@ async function handleAssessProject(input) {
102
102
  parallelChecks.push(
103
103
  (async () => {
104
104
  try {
105
- const { handleCheckDocs } = await import("./docs-UXKDKPJF.js");
105
+ const { handleCheckDocs } = await import("./docs-7CW7WUFB.js");
106
106
  const result = await handleCheckDocs({ path: projectPath, scope: "coverage" });
107
107
  const first = result.content[0];
108
108
  const parsed = first ? JSON.parse(first.text) : {};
@@ -129,7 +129,7 @@ async function handleAssessProject(input) {
129
129
  parallelChecks.push(
130
130
  (async () => {
131
131
  try {
132
- const { handleDetectEntropy } = await import("./entropy-IFIP4ZP4.js");
132
+ const { handleDetectEntropy } = await import("./entropy-P6QELTFA.js");
133
133
  const result = await handleDetectEntropy({ path: projectPath, type: "all" });
134
134
  const first = result.content[0];
135
135
  const parsed = first ? JSON.parse(first.text) : {};
@@ -156,7 +156,7 @@ async function handleAssessProject(input) {
156
156
  parallelChecks.push(
157
157
  (async () => {
158
158
  try {
159
- const { handleRunSecurityScan } = await import("./security-MYTRFSR7.js");
159
+ const { handleRunSecurityScan } = await import("./security-ZSU643D7.js");
160
160
  const result = await handleRunSecurityScan({ path: projectPath });
161
161
  const first = result.content[0];
162
162
  const parsed = first ? JSON.parse(first.text) : {};
@@ -188,7 +188,7 @@ async function handleAssessProject(input) {
188
188
  parallelChecks.push(
189
189
  (async () => {
190
190
  try {
191
- const { handleCheckPerformance } = await import("./performance-AZ5UYPOQ.js");
191
+ const { handleCheckPerformance } = await import("./performance-7X3EFAOD.js");
192
192
  const result = await handleCheckPerformance({ path: projectPath });
193
193
  if ("isError" in result && result.isError) {
194
194
  const msg = result.content[0]?.text ?? "Performance check failed";
@@ -39,7 +39,7 @@ import * as path11 from "path";
39
39
  import * as fs12 from "fs/promises";
40
40
  import * as path13 from "path";
41
41
  import { minimatch as minimatch2 } from "minimatch";
42
- import { relative as relative5 } from "path";
42
+ import { relative as relative6 } from "path";
43
43
  import * as fs13 from "fs/promises";
44
44
  import * as path14 from "path";
45
45
  function streamGraphNdjson(filePath, nodes, edges) {
@@ -294,6 +294,9 @@ function resolveSkipDirs(options) {
294
294
  }
295
295
  return base;
296
296
  }
297
+ function skipDirGlobs(skipDirs = DEFAULT_SKIP_DIRS) {
298
+ return Array.from(skipDirs, (name) => `**/${name}/**`);
299
+ }
297
300
  function isExported(lang, line, name) {
298
301
  if (lang === "go") return /^[A-Z]/.test(name);
299
302
  if (lang === "rust") return /^\s*pub\b/.test(line);
@@ -395,6 +398,17 @@ function buildResult(nodesAdded, edgesAdded, errors, start) {
395
398
  durationMs: Date.now() - start
396
399
  };
397
400
  }
401
+ function parseDocumentNode(nodeId, filePath, relPath, content) {
402
+ const titleMatch = content.match(/^#\s+(.+)$/m);
403
+ const title = titleMatch ? titleMatch[1].trim() : path3.basename(filePath, ".md");
404
+ return {
405
+ id: nodeId,
406
+ type: "document",
407
+ name: title,
408
+ path: filePath,
409
+ metadata: { relPath }
410
+ };
411
+ }
398
412
  function parseADRNode(nodeId, filePath, filename, content) {
399
413
  const titleMatch = content.match(/^#\s+(.+)$/m);
400
414
  const title = titleMatch ? titleMatch[1].trim() : filename;
@@ -1629,7 +1643,7 @@ function parseAntiPatterns(content) {
1629
1643
  }
1630
1644
  return patterns;
1631
1645
  }
1632
- var NODE_TYPES, EDGE_TYPES, OBSERVABILITY_TYPES, CURRENT_SCHEMA_VERSION, NODE_STABILITY, GraphNodeSchema, GraphEdgeSchema, POISONED_KEYS, GraphStore, VectorStore, DEFAULT_TTL_MS, PackedSummaryCache, ContextQL, TEST_TYPES, DOC_TYPES, CODE_TYPES, DEFAULT_SKIP_DIRS, SKIP_METHOD_NAMES, FUNCTION_PATTERNS, CLASS_PATTERNS, INTERFACE_PATTERNS, METHOD_PATTERNS, GO_METHOD_PATTERN, VARIABLE_PATTERNS, SUPPORTED_EXTENSIONS, SKIP_EXTENSIONS, CodeIngestor, execFileAsync, GitIngestor, TopologicalLinker, CODE_NODE_TYPES, KnowledgeIngestor, BUG_TRACK_CATEGORIES, KNOWLEDGE_TRACK_CATEGORIES, ISO_DATE, SolutionBaseSchema, SolutionDocFrontmatterSchema, BUSINESS_KNOWLEDGE_TYPES, GOVERNS_SOURCE_TYPES, CODE_NODE_TYPES2, MEASURABLE_TYPES, BusinessKnowledgeIngestor, CODE_NODE_TYPES3, DecisionIngestor, REQUIREMENT_SECTIONS, SECTION_HEADING_RE, NUMBERED_ITEM_RE, CODE_NODE_TYPES4, RequirementIngestor, DEFAULT_PATTERNS, DEFAULT_BLOCKLIST, CODE_EXTENSIONS, MermaidParser, D2Parser, PlantUmlParser, DIAGRAM_EXTENSIONS, SKIP_DIRS, DiagramParser, HEURISTIC_PATTERNS, SCANNABLE_TYPES, KnowledgeLinker, StructuralDriftDetector, BUSINESS_NODE_TYPES, KnowledgeStagingAggregator, SKIP_DIRS2, EXT_TO_LANGUAGE, SKIP_EXTENSIONS2, EXTRACTOR_EDGE_TYPE, ExtractionRunner, PATTERNS, TestDescriptionExtractor, EnumConstantExtractor, ValidationRuleExtractor, ApiPathExtractor, ALL_EXTRACTORS, ImageAnalysisExtractor, KNOWLEDGE_NODE_TYPES, SIMILARITY_THRESHOLD, SEVERITY_MAP, ContradictionDetector, KNOWLEDGE_TYPES, CODE_TYPES2, KNOWLEDGE_EDGE_TYPES, CoverageScorer, VALID_BUSINESS_TYPES, DEFAULT_MAX_DOCS, MAX_COLLISION_SUFFIX, KnowledgeDocMaterializer, BUSINESS_NODE_TYPES2, SNAPSHOT_NODE_TYPES, KnowledgePipelineRunner, CODE_NODE_TYPES5, RETRYABLE_STATUSES, SANITIZE_RULES, SyncManager, SUMMARIZE_PROMPT, JiraConnector, SlackConnector, ConfluenceConnector, CIConnector, CONSTRAINT_KEYWORDS, FigmaConnector, MIN_CONTENT_LENGTH, CONCEPT_ITEM_TYPES, MiroConnector, STOP_WORDS, FusionLayer, CODE_NODE_TYPES6, GraphEntropyAdapter, GraphComplexityAdapter, GraphCouplingAdapter, DEFAULT_THRESHOLD, DEFAULT_METRICS, RECOGNIZED_METRICS, GraphAnomalyAdapter, INTENTS, SIGNAL_WEIGHTS, INTENT_SIGNALS, IntentClassifier, INTENT_KEYWORDS, STOP_WORDS2, PASCAL_OR_CAMEL_RE, FILE_PATH_RE, QUOTED_RE, EntityExtractor, EntityResolver, ResponseFormatter, CompositeProbabilityStrategy, DEFAULT_PROBABILITY_FLOOR, DEFAULT_MAX_DEPTH, CascadeSimulator, ENTITY_REQUIRED_INTENTS, classifier, extractor, formatter, PHASE_NODE_TYPES, CODE_NODE_TYPES7, Assembler, GraphConstraintAdapter, DesignIngestor, DesignConstraintAdapter, GraphFeedbackAdapter, DEFAULT_EDGE_TYPES, TaskIndependenceAnalyzer, ConflictPredictor, VERSION;
1646
+ var NODE_TYPES, EDGE_TYPES, OBSERVABILITY_TYPES, CURRENT_SCHEMA_VERSION, NODE_STABILITY, GraphNodeSchema, GraphEdgeSchema, POISONED_KEYS, GraphStore, VectorStore, DEFAULT_TTL_MS, PackedSummaryCache, ContextQL, TEST_TYPES, DOC_TYPES, CODE_TYPES, DEFAULT_SKIP_DIRS, SKIP_METHOD_NAMES, FUNCTION_PATTERNS, CLASS_PATTERNS, INTERFACE_PATTERNS, METHOD_PATTERNS, GO_METHOD_PATTERN, VARIABLE_PATTERNS, SUPPORTED_EXTENSIONS, SKIP_EXTENSIONS, CodeIngestor, execFileAsync, GitIngestor, TopologicalLinker, CODE_NODE_TYPES, DOCS_OWNED_BY_OTHER_INGESTORS, KnowledgeIngestor, BUG_TRACK_CATEGORIES, KNOWLEDGE_TRACK_CATEGORIES, ISO_DATE, SolutionBaseSchema, SolutionDocFrontmatterSchema, BUSINESS_KNOWLEDGE_TYPES, GOVERNS_SOURCE_TYPES, CODE_NODE_TYPES2, MEASURABLE_TYPES, BusinessKnowledgeIngestor, CODE_NODE_TYPES3, DecisionIngestor, REQUIREMENT_SECTIONS, SECTION_HEADING_RE, NUMBERED_ITEM_RE, CODE_NODE_TYPES4, RequirementIngestor, DEFAULT_PATTERNS, DEFAULT_BLOCKLIST, CODE_EXTENSIONS, MermaidParser, D2Parser, PlantUmlParser, DIAGRAM_EXTENSIONS, DiagramParser, HEURISTIC_PATTERNS, SCANNABLE_TYPES, KnowledgeLinker, StructuralDriftDetector, BUSINESS_NODE_TYPES, KnowledgeStagingAggregator, EXT_TO_LANGUAGE, SKIP_EXTENSIONS2, EXTRACTOR_EDGE_TYPE, ExtractionRunner, PATTERNS, TestDescriptionExtractor, EnumConstantExtractor, ValidationRuleExtractor, ApiPathExtractor, ALL_EXTRACTORS, ImageAnalysisExtractor, KNOWLEDGE_NODE_TYPES, SIMILARITY_THRESHOLD, SEVERITY_MAP, ContradictionDetector, KNOWLEDGE_TYPES, CODE_TYPES2, KNOWLEDGE_EDGE_TYPES, CoverageScorer, VALID_BUSINESS_TYPES, DEFAULT_MAX_DOCS, MAX_COLLISION_SUFFIX, KnowledgeDocMaterializer, BUSINESS_NODE_TYPES2, SNAPSHOT_NODE_TYPES, KnowledgePipelineRunner, CODE_NODE_TYPES5, RETRYABLE_STATUSES, SANITIZE_RULES, SyncManager, SUMMARIZE_PROMPT, JiraConnector, SlackConnector, ConfluenceConnector, CIConnector, CONSTRAINT_KEYWORDS, FigmaConnector, MIN_CONTENT_LENGTH, CONCEPT_ITEM_TYPES, MiroConnector, STOP_WORDS, FusionLayer, CODE_NODE_TYPES6, GraphEntropyAdapter, GraphComplexityAdapter, GraphCouplingAdapter, DEFAULT_THRESHOLD, DEFAULT_METRICS, RECOGNIZED_METRICS, GraphAnomalyAdapter, INTENTS, SIGNAL_WEIGHTS, INTENT_SIGNALS, IntentClassifier, INTENT_KEYWORDS, STOP_WORDS2, PASCAL_OR_CAMEL_RE, FILE_PATH_RE, QUOTED_RE, EntityExtractor, EntityResolver, ResponseFormatter, CompositeProbabilityStrategy, DEFAULT_PROBABILITY_FLOOR, DEFAULT_MAX_DEPTH, CascadeSimulator, ENTITY_REQUIRED_INTENTS, classifier, extractor, formatter, PHASE_NODE_TYPES, CODE_NODE_TYPES7, Assembler, GraphConstraintAdapter, DesignIngestor, DesignConstraintAdapter, GraphFeedbackAdapter, DEFAULT_EDGE_TYPES, TaskIndependenceAnalyzer, ConflictPredictor, VERSION;
1633
1647
  var init_dist = __esm({
1634
1648
  "../graph/dist/index.mjs"() {
1635
1649
  NODE_TYPES = [
@@ -3144,6 +3158,7 @@ var init_dist = __esm({
3144
3158
  }
3145
3159
  };
3146
3160
  CODE_NODE_TYPES = ["file", "function", "class", "method", "interface", "variable"];
3161
+ DOCS_OWNED_BY_OTHER_INGESTORS = /* @__PURE__ */ new Set(["adr", "knowledge", "changes", "solutions"]);
3147
3162
  KnowledgeIngestor = class {
3148
3163
  constructor(store) {
3149
3164
  this.store = store;
@@ -3215,15 +3230,53 @@ var init_dist = __esm({
3215
3230
  }
3216
3231
  return buildResult(nodesAdded, edgesAdded, [], start);
3217
3232
  }
3233
+ async ingestGeneralDocs(projectPath) {
3234
+ const start = Date.now();
3235
+ const errors = [];
3236
+ let nodesAdded = 0;
3237
+ let edgesAdded = 0;
3238
+ const files = /* @__PURE__ */ new Set();
3239
+ try {
3240
+ const entries = await fs2.readdir(projectPath, { withFileTypes: true });
3241
+ for (const entry of entries) {
3242
+ if (entry.isFile() && entry.name.endsWith(".md")) {
3243
+ files.add(path3.join(projectPath, entry.name));
3244
+ }
3245
+ }
3246
+ } catch {
3247
+ return emptyResult(Date.now() - start);
3248
+ }
3249
+ const docsRoot = path3.join(projectPath, "docs");
3250
+ try {
3251
+ const scanned = await this.scanDocsDir(docsRoot);
3252
+ for (const f of scanned) files.add(f);
3253
+ } catch {
3254
+ }
3255
+ for (const filePath of files) {
3256
+ try {
3257
+ const content = await fs2.readFile(filePath, "utf-8");
3258
+ const relPath = path3.relative(projectPath, filePath).replaceAll("\\", "/");
3259
+ const nodeId = `doc:${relPath}`;
3260
+ if (this.store.getNode(nodeId)) continue;
3261
+ this.store.addNode(parseDocumentNode(nodeId, filePath, relPath, content));
3262
+ nodesAdded++;
3263
+ edgesAdded += this.linkToCode(content, nodeId, "documents");
3264
+ } catch (err) {
3265
+ errors.push(`${filePath}: ${err instanceof Error ? err.message : String(err)}`);
3266
+ }
3267
+ }
3268
+ return buildResult(nodesAdded, edgesAdded, errors, start);
3269
+ }
3218
3270
  async ingestAll(projectPath, opts) {
3219
3271
  const start = Date.now();
3220
3272
  const adrDir = opts?.adrDir ?? path3.join(projectPath, "docs", "adr");
3221
- const [adrResult, learningsResult, failuresResult] = await Promise.all([
3273
+ const [adrResult, learningsResult, failuresResult, docsResult] = await Promise.all([
3222
3274
  this.ingestADRs(adrDir),
3223
3275
  this.ingestLearnings(projectPath),
3224
- this.ingestFailures(projectPath)
3276
+ this.ingestFailures(projectPath),
3277
+ this.ingestGeneralDocs(projectPath)
3225
3278
  ]);
3226
- const merged = mergeResults(adrResult, learningsResult, failuresResult);
3279
+ const merged = mergeResults(adrResult, learningsResult, failuresResult, docsResult);
3227
3280
  return { ...merged, durationMs: Date.now() - start };
3228
3281
  }
3229
3282
  linkToCode(content, sourceNodeId, edgeType) {
@@ -3258,7 +3311,22 @@ var init_dist = __esm({
3258
3311
  const entries = await fs2.readdir(dir, { withFileTypes: true });
3259
3312
  for (const entry of entries) {
3260
3313
  const fullPath = path3.join(dir, entry.name);
3261
- if (entry.isDirectory() && entry.name !== "node_modules" && entry.name !== "dist" && entry.name !== "target" && entry.name !== "build" && entry.name !== ".git" && entry.name !== ".gradle" && entry.name !== ".harness" && entry.name !== "vendor" && entry.name !== "bin" && entry.name !== "obj" && entry.name !== "venv" && entry.name !== "_build" && entry.name !== "deps" && entry.name !== "coverage") {
3314
+ if (entry.isDirectory() && !DEFAULT_SKIP_DIRS.has(entry.name)) {
3315
+ results.push(...await this.findMarkdownFiles(fullPath));
3316
+ } else if (entry.isFile() && entry.name.endsWith(".md")) {
3317
+ results.push(fullPath);
3318
+ }
3319
+ }
3320
+ return results;
3321
+ }
3322
+ async scanDocsDir(docsRoot) {
3323
+ const results = [];
3324
+ const rootEntries = await fs2.readdir(docsRoot, { withFileTypes: true });
3325
+ for (const entry of rootEntries) {
3326
+ const fullPath = path3.join(docsRoot, entry.name);
3327
+ if (entry.isDirectory()) {
3328
+ if (DEFAULT_SKIP_DIRS.has(entry.name)) continue;
3329
+ if (DOCS_OWNED_BY_OTHER_INGESTORS.has(entry.name)) continue;
3262
3330
  results.push(...await this.findMarkdownFiles(fullPath));
3263
3331
  } else if (entry.isFile() && entry.name.endsWith(".md")) {
3264
3332
  results.push(fullPath);
@@ -3497,7 +3565,7 @@ var init_dist = __esm({
3497
3565
  const entries = await fs3.readdir(dir, { withFileTypes: true });
3498
3566
  for (const entry of entries) {
3499
3567
  const fullPath = path4.join(dir, entry.name);
3500
- if (entry.isDirectory() && entry.name !== "node_modules" && entry.name !== "dist" && entry.name !== "target" && entry.name !== "build" && entry.name !== ".git" && entry.name !== ".gradle" && entry.name !== ".harness" && entry.name !== "vendor" && entry.name !== "bin" && entry.name !== "obj" && entry.name !== "venv" && entry.name !== "_build" && entry.name !== "deps" && entry.name !== "coverage") {
3568
+ if (entry.isDirectory() && !DEFAULT_SKIP_DIRS.has(entry.name)) {
3501
3569
  results.push(...await this.findMarkdownFiles(fullPath));
3502
3570
  } else if (entry.isFile() && entry.name.endsWith(".md")) {
3503
3571
  results.push(fullPath);
@@ -3930,7 +3998,6 @@ var init_dist = __esm({
3930
3998
  }
3931
3999
  };
3932
4000
  DIAGRAM_EXTENSIONS = /* @__PURE__ */ new Set([".mmd", ".mermaid", ".d2", ".puml", ".plantuml"]);
3933
- SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", "build", ".harness"]);
3934
4001
  DiagramParser = class {
3935
4002
  constructor(store) {
3936
4003
  this.store = store;
@@ -4035,7 +4102,7 @@ var init_dist = __esm({
4035
4102
  }
4036
4103
  for (const entry of entries) {
4037
4104
  if (entry.isDirectory()) {
4038
- if (!SKIP_DIRS.has(entry.name)) {
4105
+ if (!DEFAULT_SKIP_DIRS.has(entry.name)) {
4039
4106
  await walk(path7.join(currentDir, entry.name));
4040
4107
  }
4041
4108
  } else if (entry.isFile()) {
@@ -4537,31 +4604,6 @@ var init_dist = __esm({
4537
4604
  await fs8.writeFile(path9.join(gapsDir, "gaps.md"), lines.join("\n"), "utf-8");
4538
4605
  }
4539
4606
  };
4540
- SKIP_DIRS2 = /* @__PURE__ */ new Set([
4541
- "node_modules",
4542
- "dist",
4543
- "target",
4544
- "build",
4545
- ".git",
4546
- "__pycache__",
4547
- ".venv",
4548
- ".turbo",
4549
- ".harness",
4550
- ".next",
4551
- ".vscode",
4552
- ".idea",
4553
- "vendor",
4554
- "out",
4555
- ".gradle",
4556
- ".gradle-home",
4557
- "bin",
4558
- "obj",
4559
- "venv",
4560
- "_build",
4561
- "deps",
4562
- "coverage",
4563
- ".nyc_output"
4564
- ]);
4565
4607
  EXT_TO_LANGUAGE = {
4566
4608
  ".ts": "typescript",
4567
4609
  ".tsx": "typescript",
@@ -4732,7 +4774,7 @@ var init_dist = __esm({
4732
4774
  }
4733
4775
  for (const entry of entries) {
4734
4776
  const fullPath = path10.join(dir, entry.name);
4735
- if (entry.isDirectory() && !SKIP_DIRS2.has(entry.name)) {
4777
+ if (entry.isDirectory() && !DEFAULT_SKIP_DIRS.has(entry.name)) {
4736
4778
  results.push(...await this.findSourceFiles(fullPath));
4737
4779
  } else if (entry.isFile() && detectLanguage(fullPath) !== void 0) {
4738
4780
  results.push(fullPath);
@@ -8998,8 +9040,8 @@ ${replyLines.join("\n")}`;
8998
9040
  const { edges } = this.computeDependencyGraph();
8999
9041
  const violations = [];
9000
9042
  for (const edge of edges) {
9001
- const fromRelative = relative5(rootDir, edge.from).replaceAll("\\", "/");
9002
- const toRelative = relative5(rootDir, edge.to).replaceAll("\\", "/");
9043
+ const fromRelative = relative6(rootDir, edge.from).replaceAll("\\", "/");
9044
+ const toRelative = relative6(rootDir, edge.to).replaceAll("\\", "/");
9003
9045
  const fromLayer = this.resolveLayer(fromRelative, layers);
9004
9046
  const toLayer = this.resolveLayer(toRelative, layers);
9005
9047
  if (!fromLayer || !toLayer) continue;
@@ -9724,6 +9766,7 @@ export {
9724
9766
  groupNodesByImpact,
9725
9767
  DEFAULT_SKIP_DIRS,
9726
9768
  resolveSkipDirs,
9769
+ skipDirGlobs,
9727
9770
  CodeIngestor,
9728
9771
  GitIngestor,
9729
9772
  TopologicalLinker,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generateCIWorkflow
3
- } from "./chunk-MKPRB4PL.js";
4
- import "./chunk-4DWOMGUM.js";
3
+ } from "./chunk-DJRRTZGD.js";
4
+ import "./chunk-GDJ2MRYH.js";
5
5
  import "./chunk-RL4VMEXL.js";
6
- import "./chunk-BMM3GXV6.js";
6
+ import "./chunk-XPRGWHBL.js";
7
7
  import "./chunk-KFQGP6VL.js";
8
8
  export {
9
9
  generateCIWorkflow
@@ -78,8 +78,9 @@ import {
78
78
  project,
79
79
  queryTraceability,
80
80
  resolveSkipDirs,
81
- saveGraph
82
- } from "./chunk-BMM3GXV6.js";
81
+ saveGraph,
82
+ skipDirGlobs
83
+ } from "./chunk-XPRGWHBL.js";
83
84
  import "./chunk-KFQGP6VL.js";
84
85
  init_dist();
85
86
  export {
@@ -161,5 +162,6 @@ export {
161
162
  project,
162
163
  queryTraceability,
163
164
  resolveSkipDirs,
164
- saveGraph
165
+ saveGraph,
166
+ skipDirGlobs
165
167
  };
@@ -152,6 +152,7 @@ import {
152
152
  ViolationHistorySchema,
153
153
  ViolationSchema,
154
154
  ViolationSnapshotSchema,
155
+ WHATWG_BAD_PORTS,
155
156
  acquireCompoundLock,
156
157
  addProvenance,
157
158
  agentConfigRules,
@@ -177,6 +178,7 @@ import {
177
178
  archiveStream,
178
179
  assembleCandidateReport,
179
180
  assembleReport,
181
+ assertPortUsable,
180
182
  assertSanitized,
181
183
  assignFeature,
182
184
  buildDependencyGraph,
@@ -292,6 +294,7 @@ import {
292
294
  init_dist,
293
295
  injectionRules,
294
296
  insecureDefaultsRules,
297
+ isBadPort,
295
298
  isDuplicateFinding,
296
299
  isRegression,
297
300
  isSanitizedResult,
@@ -425,6 +428,7 @@ import {
425
428
  validateAgentConfigs,
426
429
  validateAgentsMap,
427
430
  validateBoundaries,
431
+ validateBranchName,
428
432
  validateCommitMessage,
429
433
  validateConfig,
430
434
  validateDependencies,
@@ -444,7 +448,7 @@ import {
444
448
  writeSessionSummary,
445
449
  writeTaint,
446
450
  xssRules
447
- } from "./chunk-4DWOMGUM.js";
451
+ } from "./chunk-GDJ2MRYH.js";
448
452
  import {
449
453
  DEFAULT_SKILL_CONTEXT_BUDGET,
450
454
  Err,
@@ -454,7 +458,7 @@ import {
454
458
  isErr,
455
459
  isOk
456
460
  } from "./chunk-RL4VMEXL.js";
457
- import "./chunk-BMM3GXV6.js";
461
+ import "./chunk-XPRGWHBL.js";
458
462
  import "./chunk-KFQGP6VL.js";
459
463
  init_dist();
460
464
  export {
@@ -616,6 +620,7 @@ export {
616
620
  ViolationHistorySchema,
617
621
  ViolationSchema,
618
622
  ViolationSnapshotSchema,
623
+ WHATWG_BAD_PORTS,
619
624
  acquireCompoundLock,
620
625
  addProvenance,
621
626
  agentConfigRules,
@@ -641,6 +646,7 @@ export {
641
646
  archiveStream,
642
647
  assembleCandidateReport,
643
648
  assembleReport,
649
+ assertPortUsable,
644
650
  assertSanitized,
645
651
  assignFeature,
646
652
  buildDependencyGraph,
@@ -755,6 +761,7 @@ export {
755
761
  goRules,
756
762
  injectionRules,
757
763
  insecureDefaultsRules,
764
+ isBadPort,
758
765
  isDuplicateFinding,
759
766
  isErr,
760
767
  isOk,
@@ -890,6 +897,7 @@ export {
890
897
  validateAgentConfigs,
891
898
  validateAgentsMap,
892
899
  validateBoundaries,
900
+ validateBranchName,
893
901
  validateCommitMessage,
894
902
  validateConfig,
895
903
  validateDependencies,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  checkDocsDefinition,
3
3
  handleCheckDocs
4
- } from "./chunk-MT2MMBUA.js";
4
+ } from "./chunk-MQRKPF46.js";
5
5
  import "./chunk-EPUKTTJZ.js";
6
6
  import "./chunk-W6Y7ZW3Y.js";
7
- import "./chunk-PW3U4YJV.js";
7
+ import "./chunk-KPWUZSHL.js";
8
8
  import "./chunk-ZCZD7FHU.js";
9
- import "./chunk-4DWOMGUM.js";
9
+ import "./chunk-GDJ2MRYH.js";
10
10
  import "./chunk-RL4VMEXL.js";
11
- import "./chunk-BMM3GXV6.js";
11
+ import "./chunk-XPRGWHBL.js";
12
12
  import "./chunk-3WGJMBKH.js";
13
13
  import "./chunk-KFQGP6VL.js";
14
14
  export {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  TemplateEngine
3
- } from "./chunk-5KTTKXQN.js";
4
- import "./chunk-4DWOMGUM.js";
3
+ } from "./chunk-54JTO4NZ.js";
4
+ import "./chunk-GDJ2MRYH.js";
5
5
  import "./chunk-RL4VMEXL.js";
6
- import "./chunk-BMM3GXV6.js";
6
+ import "./chunk-XPRGWHBL.js";
7
7
  import "./chunk-KFQGP6VL.js";
8
8
  export {
9
9
  TemplateEngine
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  detectEntropyDefinition,
3
3
  handleDetectEntropy
4
- } from "./chunk-5PPV4WYY.js";
4
+ } from "./chunk-27EHWQPK.js";
5
5
  import "./chunk-EPUKTTJZ.js";
6
6
  import "./chunk-W6Y7ZW3Y.js";
7
- import "./chunk-4DWOMGUM.js";
7
+ import "./chunk-GDJ2MRYH.js";
8
8
  import "./chunk-RL4VMEXL.js";
9
- import "./chunk-BMM3GXV6.js";
9
+ import "./chunk-XPRGWHBL.js";
10
10
  import "./chunk-KFQGP6VL.js";
11
11
  export {
12
12
  detectEntropyDefinition,
@@ -5,7 +5,7 @@ import {
5
5
  handleCreateSelfReview,
6
6
  handleRequestPeerReview,
7
7
  requestPeerReviewDefinition
8
- } from "./chunk-GTXUUGFG.js";
8
+ } from "./chunk-4XB37LST.js";
9
9
  import "./chunk-EPUKTTJZ.js";
10
10
  import "./chunk-W6Y7ZW3Y.js";
11
11
  import "./chunk-KFQGP6VL.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  createGenerateAgentDefinitionsCommand,
3
3
  generateAgentDefinitions
4
- } from "./chunk-GUIX2TMZ.js";
4
+ } from "./chunk-RYVL76ZF.js";
5
5
  import "./chunk-KET4QQZB.js";
6
- import "./chunk-L3CEN42B.js";
6
+ import "./chunk-JGPOQJ73.js";
7
7
  import "./chunk-3ISINLYT.js";
8
8
  import "./chunk-6B6UN6SG.js";
9
- import "./chunk-4DWOMGUM.js";
9
+ import "./chunk-GDJ2MRYH.js";
10
10
  import "./chunk-RL4VMEXL.js";
11
- import "./chunk-BMM3GXV6.js";
11
+ import "./chunk-XPRGWHBL.js";
12
12
  import "./chunk-3WGJMBKH.js";
13
13
  import "./chunk-KFQGP6VL.js";
14
14
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_SKIP_DIRS,
3
3
  init_dist
4
- } from "./chunk-BMM3GXV6.js";
4
+ } from "./chunk-XPRGWHBL.js";
5
5
  import "./chunk-KFQGP6VL.js";
6
6
 
7
7
  // src/mcp/utils/glob-helper.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearGraphStoreCache,
3
3
  loadGraphStore
4
- } from "./chunk-KTWKW6KJ.js";
4
+ } from "./chunk-TIQU5VY7.js";
5
5
  import "./chunk-KFQGP6VL.js";
6
6
  export {
7
7
  clearGraphStoreCache,
package/dist/index.d.ts CHANGED
@@ -909,6 +909,54 @@ declare const HarnessConfigSchema: z.ZodObject<{
909
909
  }, {
910
910
  enabled?: boolean | undefined;
911
911
  }>>;
912
+ /** Compliance and convention enforcement settings */
913
+ compliance: z.ZodOptional<z.ZodObject<{
914
+ /** Branch naming convention settings */
915
+ branching: z.ZodDefault<z.ZodObject<{
916
+ /** Allowed branch name prefixes */
917
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
918
+ /** Whether to enforce kebab-case for the branch slug */
919
+ enforceKebabCase: z.ZodDefault<z.ZodBoolean>;
920
+ /**
921
+ * Optional regex that fully replaces the default prefix and kebab-case checks.
922
+ * When set, only the ignore list and this regex are evaluated; `prefixes`,
923
+ * `enforceKebabCase`, and `maxLength` are bypassed.
924
+ */
925
+ customRegex: z.ZodOptional<z.ZodString>;
926
+ /** List of ignored branch names (exact match or glob) */
927
+ ignore: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
928
+ /** Maximum slug length (characters after the first `/`). Set to 0 to disable. */
929
+ maxLength: z.ZodDefault<z.ZodNumber>;
930
+ }, "strip", z.ZodTypeAny, {
931
+ maxLength: number;
932
+ prefixes: string[];
933
+ enforceKebabCase: boolean;
934
+ ignore: string[];
935
+ customRegex?: string | undefined;
936
+ }, {
937
+ maxLength?: number | undefined;
938
+ prefixes?: string[] | undefined;
939
+ enforceKebabCase?: boolean | undefined;
940
+ customRegex?: string | undefined;
941
+ ignore?: string[] | undefined;
942
+ }>>;
943
+ }, "strip", z.ZodTypeAny, {
944
+ branching: {
945
+ maxLength: number;
946
+ prefixes: string[];
947
+ enforceKebabCase: boolean;
948
+ ignore: string[];
949
+ customRegex?: string | undefined;
950
+ };
951
+ }, {
952
+ branching?: {
953
+ maxLength?: number | undefined;
954
+ prefixes?: string[] | undefined;
955
+ enforceKebabCase?: boolean | undefined;
956
+ customRegex?: string | undefined;
957
+ ignore?: string[] | undefined;
958
+ } | undefined;
959
+ }>>;
912
960
  /** Central telemetry collection settings */
913
961
  telemetry: z.ZodOptional<z.ZodObject<{
914
962
  /** Whether anonymous telemetry is enabled (default: true) */
@@ -1081,6 +1129,15 @@ declare const HarnessConfigSchema: z.ZodObject<{
1081
1129
  adoption?: {
1082
1130
  enabled: boolean;
1083
1131
  } | undefined;
1132
+ compliance?: {
1133
+ branching: {
1134
+ maxLength: number;
1135
+ prefixes: string[];
1136
+ enforceKebabCase: boolean;
1137
+ ignore: string[];
1138
+ customRegex?: string | undefined;
1139
+ };
1140
+ } | undefined;
1084
1141
  telemetry?: {
1085
1142
  enabled: boolean;
1086
1143
  } | undefined;
@@ -1240,6 +1297,15 @@ declare const HarnessConfigSchema: z.ZodObject<{
1240
1297
  adoption?: {
1241
1298
  enabled?: boolean | undefined;
1242
1299
  } | undefined;
1300
+ compliance?: {
1301
+ branching?: {
1302
+ maxLength?: number | undefined;
1303
+ prefixes?: string[] | undefined;
1304
+ enforceKebabCase?: boolean | undefined;
1305
+ customRegex?: string | undefined;
1306
+ ignore?: string[] | undefined;
1307
+ } | undefined;
1308
+ } | undefined;
1243
1309
  telemetry?: {
1244
1310
  enabled?: boolean | undefined;
1245
1311
  } | undefined;