"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var instructions_exports = {};
__export(instructions_exports, {
  buildAgentInstructions: () => buildAgentInstructions
});
module.exports = __toCommonJS(instructions_exports);
var import_caveman = require("./caveman");
function buildAgentInstructions(cavemanMode) {
  const content = `# KiroGraph

KiroGraph builds a local semantic knowledge graph of this codebase. When the \`kirograph\` MCP server is available, prefer its tools over broad grep/glob/file-read exploration.

## Tool selection

- Start code tasks with \`kirograph_context\`.
- Find symbols by name with \`kirograph_search\`.
- Inspect a symbol with \`kirograph_node\`; set \`includeCode: true\` only when source is needed.
- Trace call flow with \`kirograph_callers\` and \`kirograph_callees\`.
- Check blast radius before edits with \`kirograph_impact\`.
- Use \`kirograph_path\` to explain how two symbols connect.
- Use \`kirograph_type_hierarchy\` for inheritance/interface questions.
- Use \`kirograph_files\` to inspect indexed file structure.
- Use \`kirograph_status\` if results seem stale or incomplete.
- Use \`kirograph_architecture\`, \`kirograph_coupling\`, and \`kirograph_package\` for package/layer questions when architecture analysis is enabled.
- Use \`kirograph_hotspots\`, \`kirograph_surprising\`, and \`kirograph_diff\` for refactor planning and review.

## Workflow

1. Call \`kirograph_context\` for orientation.
2. Drill into specific symbols with \`kirograph_node\`.
3. Use graph traversal tools before reading unrelated files.
4. Fall back to normal filesystem tools only when the graph is missing, stale, or lacks the needed detail.

If \`.kirograph/\` does not exist, ask whether to run \`kirograph init --index\`.
`;
  const caveman = cavemanMode && cavemanMode !== "off" ? import_caveman.CAVEMAN_RULES[cavemanMode] : null;
  return caveman ? content.trimEnd() + "\n\n" + caveman + "\n" : content;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  buildAgentInstructions
});
//# sourceMappingURL=instructions.js.map
