@lousy-agents/cli 5.17.16 → 5.18.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.
@@ -55,7 +55,7 @@ Work in a read-only planning phase first. If the runtime provides a dedicated pl
55
55
 
56
56
  1. **Discover product and engineering context.** Read whatever conventional files the repo provides — for example `AGENTS.md`, `README.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `CONTRIBUTING.md`, anything under `.github/instructions/`, or product docs under `docs/`. Don't assume any specific file exists; use what's there.
57
57
  2. **Seed Context & Goal.** Based on the argument:
58
- - **Issue reference (`#N` or matches `^\d+$`):** fetch the issue and treat its Context & Goal and Acceptance Criteria sections (if present) as the starting point. Note any cross-reference IDs (e.g., a beads ID) in the issue footer.
58
+ - **Issue reference (`#N` or matches `^\d+$`):** fetch the issue and treat its Context & Goal and Acceptance Criteria sections (if present) as the starting point. Note any cross-reference IDs in the issue footer.
59
59
 
60
60
  ```bash
61
61
  gh issue view <N> --json title,body,labels,comments
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@biomejs/biome": "2.5.3",
21
- "@lousy-agents/mcp": "5.17.15",
21
+ "@lousy-agents/mcp": "5.17.16",
22
22
  "@modelcontextprotocol/server-sequential-thinking": "2026.7.4",
23
23
  "@testcontainers/postgresql": "12.0.4",
24
24
  "@types/node": "24.13.3",
@@ -972,9 +972,9 @@
972
972
  }
973
973
  },
974
974
  "node_modules/@lousy-agents/mcp": {
975
- "version": "5.17.15",
976
- "resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.17.15.tgz",
977
- "integrity": "sha512-Ui0uDJAQB5FVYqu1/7miZK5M9cQ8/1FgSGiKKY+mfEV3CyBZx4E900k20ApXQakBh5ptZypG9lbGR+74SMymng==",
975
+ "version": "5.17.16",
976
+ "resolved": "https://registry.npmjs.org/@lousy-agents/mcp/-/mcp-5.17.16.tgz",
977
+ "integrity": "sha512-4WH5oFcnFLCAOChFK/yv3pItX+fuNNB4YbRU2/mZR/VyZW5JiwIWJxo1HxoGp9NXI+n3jPYbdjfcDStoGtQq3Q==",
978
978
  "dev": true,
979
979
  "license": "BSD-2-Clause-Patent",
980
980
  "dependencies": {
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@biomejs/biome": "2.5.3",
32
- "@lousy-agents/mcp": "5.17.15",
32
+ "@lousy-agents/mcp": "5.17.16",
33
33
  "@modelcontextprotocol/server-sequential-thinking": "2026.7.4",
34
34
  "@testcontainers/postgresql": "12.0.4",
35
35
  "@types/node": "24.13.3",
@@ -55,7 +55,7 @@ Work in a read-only planning phase first. If the runtime provides a dedicated pl
55
55
 
56
56
  1. **Discover product and engineering context.** Read whatever conventional files the repo provides — for example `AGENTS.md`, `README.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `CONTRIBUTING.md`, anything under `.github/instructions/`, or product docs under `docs/`. Don't assume any specific file exists; use what's there.
57
57
  2. **Seed Context & Goal.** Based on the argument:
58
- - **Issue reference (`#N` or matches `^\d+$`):** fetch the issue and treat its Context & Goal and Acceptance Criteria sections (if present) as the starting point. Note any cross-reference IDs (e.g., a beads ID) in the issue footer.
58
+ - **Issue reference (`#N` or matches `^\d+$`):** fetch the issue and treat its Context & Goal and Acceptance Criteria sections (if present) as the starting point. Note any cross-reference IDs in the issue footer.
59
59
 
60
60
  ```bash
61
61
  gh issue view <N> --json title,body,labels,comments
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@biomejs/biome": "2.5.3",
23
- "@lousy-agents/mcp": "5.17.15",
23
+ "@lousy-agents/mcp": "5.17.16",
24
24
  "@modelcontextprotocol/server-sequential-thinking": "2026.7.4",
25
25
  "@types/node": "24.13.3",
26
26
  "@upstash/context7-mcp": "3.2.5",
package/dist/index.js CHANGED
@@ -3032,7 +3032,7 @@ exports.basename = (path, { windows } = {}) => {
3032
3032
 
3033
3033
 
3034
3034
  },
3035
- 9646(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
3035
+ 6367(__unused_rspack_module, __unused_rspack___webpack_exports__, __webpack_require__) {
3036
3036
  // NAMESPACE OBJECT: ../../node_modules/micromark/lib/constructs.js
3037
3037
  var constructs_namespaceObject = {};
3038
3038
  __webpack_require__.r(constructs_namespaceObject);
@@ -27525,6 +27525,312 @@ const PackageJsonSchema = schemas_object({
27525
27525
  return new FileSystemSkillFileGateway();
27526
27526
  }
27527
27527
 
27528
+ ;// CONCATENATED MODULE: ../core/src/entities/agentic-location-catalog.ts
27529
+ /**
27530
+ * Canonical catalog of agentic construct locations shared by lint and doctor.
27531
+ * Pure data only — no filesystem I/O.
27532
+ */ const agentic_location_catalog_AGENTIC_LOCATION_CATALOG = [
27533
+ // Skill lint roots
27534
+ {
27535
+ id: "skill-github",
27536
+ path: ".github/skills",
27537
+ matchKind: "directory-prefix",
27538
+ primaryConstruct: "skill",
27539
+ lintTarget: "skills",
27540
+ harnessHints: [
27541
+ "copilot"
27542
+ ]
27543
+ },
27544
+ {
27545
+ id: "skill-claude",
27546
+ path: ".claude/skills",
27547
+ matchKind: "directory-prefix",
27548
+ primaryConstruct: "skill",
27549
+ lintTarget: "skills",
27550
+ harnessHints: [
27551
+ "claude"
27552
+ ]
27553
+ },
27554
+ {
27555
+ id: "skill-agents",
27556
+ path: ".agents/skills",
27557
+ matchKind: "directory-prefix",
27558
+ primaryConstruct: "skill",
27559
+ lintTarget: "skills",
27560
+ harnessHints: [
27561
+ "shared"
27562
+ ]
27563
+ },
27564
+ // Doctor-only skill locations
27565
+ {
27566
+ id: "skill-pi",
27567
+ path: ".pi/skills",
27568
+ matchKind: "directory-prefix",
27569
+ primaryConstruct: "skill",
27570
+ lintTarget: "none",
27571
+ harnessHints: [
27572
+ "pi"
27573
+ ]
27574
+ },
27575
+ {
27576
+ id: "skill-pi-prompts",
27577
+ path: ".pi/prompts",
27578
+ matchKind: "directory-prefix",
27579
+ primaryConstruct: "skill",
27580
+ lintTarget: "none",
27581
+ harnessHints: [
27582
+ "pi"
27583
+ ]
27584
+ },
27585
+ // Agent lint root (dual-role: agent + instruction)
27586
+ {
27587
+ id: "agent-github",
27588
+ path: ".github/agents",
27589
+ matchKind: "directory-prefix",
27590
+ primaryConstruct: "agent",
27591
+ secondaryConstructs: [
27592
+ "instruction"
27593
+ ],
27594
+ lintTarget: "agents",
27595
+ harnessHints: [
27596
+ "copilot"
27597
+ ],
27598
+ instructionFormat: "copilot-agent"
27599
+ },
27600
+ // Hook lint exact configs
27601
+ {
27602
+ id: "hook-copilot-agent-shell",
27603
+ path: ".github/hooks/agent-shell/hooks.json",
27604
+ matchKind: "exact",
27605
+ primaryConstruct: "hook",
27606
+ lintTarget: "hooks",
27607
+ harnessHints: [
27608
+ "copilot"
27609
+ ],
27610
+ hookPlatform: "copilot"
27611
+ },
27612
+ {
27613
+ id: "hook-claude-settings",
27614
+ path: ".claude/settings.json",
27615
+ matchKind: "exact",
27616
+ primaryConstruct: "hook",
27617
+ lintTarget: "hooks",
27618
+ harnessHints: [
27619
+ "claude"
27620
+ ],
27621
+ hookPlatform: "claude"
27622
+ },
27623
+ {
27624
+ id: "hook-claude-settings-local",
27625
+ path: ".claude/settings.local.json",
27626
+ matchKind: "exact",
27627
+ primaryConstruct: "hook",
27628
+ lintTarget: "hooks",
27629
+ harnessHints: [
27630
+ "claude"
27631
+ ],
27632
+ hookPlatform: "claude"
27633
+ },
27634
+ // Doctor-only hook directory prefixes
27635
+ {
27636
+ id: "hook-github-dir",
27637
+ path: ".github/hooks",
27638
+ matchKind: "directory-prefix",
27639
+ primaryConstruct: "hook",
27640
+ lintTarget: "none",
27641
+ harnessHints: [
27642
+ "copilot"
27643
+ ]
27644
+ },
27645
+ {
27646
+ id: "hook-claude-dir",
27647
+ path: ".claude/hooks",
27648
+ matchKind: "directory-prefix",
27649
+ primaryConstruct: "hook",
27650
+ lintTarget: "none",
27651
+ harnessHints: [
27652
+ "claude"
27653
+ ]
27654
+ },
27655
+ // Instruction lint locations
27656
+ {
27657
+ id: "instruction-copilot-root",
27658
+ path: ".github/copilot-instructions.md",
27659
+ matchKind: "exact",
27660
+ primaryConstruct: "instruction",
27661
+ lintTarget: "instructions",
27662
+ harnessHints: [
27663
+ "copilot"
27664
+ ],
27665
+ instructionFormat: "copilot-instructions"
27666
+ },
27667
+ {
27668
+ id: "instruction-copilot-scoped",
27669
+ path: ".github/instructions",
27670
+ matchKind: "directory-prefix",
27671
+ primaryConstruct: "instruction",
27672
+ lintTarget: "instructions",
27673
+ harnessHints: [
27674
+ "copilot"
27675
+ ],
27676
+ instructionFormat: "copilot-scoped"
27677
+ },
27678
+ {
27679
+ id: "instruction-agents-md",
27680
+ path: "AGENTS.md",
27681
+ matchKind: "exact",
27682
+ primaryConstruct: "instruction",
27683
+ lintTarget: "instructions",
27684
+ harnessHints: [
27685
+ "shared"
27686
+ ],
27687
+ instructionFormat: "agents-md"
27688
+ },
27689
+ {
27690
+ id: "instruction-claude-md",
27691
+ path: "CLAUDE.md",
27692
+ matchKind: "exact",
27693
+ primaryConstruct: "instruction",
27694
+ lintTarget: "instructions",
27695
+ harnessHints: [
27696
+ "claude"
27697
+ ],
27698
+ instructionFormat: "claude-md"
27699
+ },
27700
+ // Doctor-only construct locations
27701
+ {
27702
+ id: "subagent-claude",
27703
+ path: ".claude/agents",
27704
+ matchKind: "directory-prefix",
27705
+ primaryConstruct: "subagent",
27706
+ lintTarget: "none",
27707
+ harnessHints: [
27708
+ "claude"
27709
+ ]
27710
+ },
27711
+ {
27712
+ id: "agent-claude-commands",
27713
+ path: ".claude/commands",
27714
+ matchKind: "directory-prefix",
27715
+ primaryConstruct: "agent",
27716
+ lintTarget: "none",
27717
+ harnessHints: [
27718
+ "claude"
27719
+ ]
27720
+ },
27721
+ {
27722
+ id: "plugin-codex",
27723
+ path: ".codex-plugin",
27724
+ matchKind: "directory-prefix",
27725
+ primaryConstruct: "plugin",
27726
+ lintTarget: "none",
27727
+ harnessHints: [
27728
+ "codex"
27729
+ ]
27730
+ }
27731
+ ];
27732
+
27733
+ ;// CONCATENATED MODULE: ../core/src/lib/agentic-location-matchers.ts
27734
+ /**
27735
+ * Pure path→construct matching helpers over the agentic location catalog.
27736
+ * No filesystem I/O.
27737
+ */
27738
+ /**
27739
+ * Normalizes a repo-relative path for catalog matching.
27740
+ * Collapses `.` / `..` segments. Returns "" when the path is absolute or
27741
+ * escapes the repository root — callers treat "" as non-matching.
27742
+ */ function normalizeRepoRelativePath(path) {
27743
+ const normalized = path.replaceAll("\\", "/");
27744
+ // POSIX absolute, UNC-style leading slash after backslash conversion,
27745
+ // and Windows drive-letter absolute (C:/..., d:\...).
27746
+ if (normalized.startsWith("/") || /^[A-Za-z]:(\/|$)/.test(normalized)) {
27747
+ return "";
27748
+ }
27749
+ const resolved = [];
27750
+ for (const segment of normalized.split("/")){
27751
+ if (segment === "" || segment === ".") {
27752
+ continue;
27753
+ }
27754
+ if (segment === "..") {
27755
+ if (resolved.length === 0) {
27756
+ return "";
27757
+ }
27758
+ resolved.pop();
27759
+ continue;
27760
+ }
27761
+ resolved.push(segment);
27762
+ }
27763
+ return resolved.join("/");
27764
+ }
27765
+ function matchesLocationEntry(path, entry) {
27766
+ const normalized = normalizeRepoRelativePath(path);
27767
+ if (entry.matchKind === "exact") {
27768
+ return normalized === entry.path;
27769
+ }
27770
+ return normalized === entry.path || normalized.startsWith(`${entry.path}/`);
27771
+ }
27772
+ function entriesMatchingPath(path, catalog = agentic_location_catalog_AGENTIC_LOCATION_CATALOG) {
27773
+ return catalog.filter((entry)=>matchesLocationEntry(path, entry));
27774
+ }
27775
+ function specificityScore(entry) {
27776
+ // Exact matches outrank any prefix; longer prefixes outrank shorter ones.
27777
+ const kindBonus = entry.matchKind === "exact" ? 1_000_000 : 0;
27778
+ return kindBonus + entry.path.length;
27779
+ }
27780
+ function bestMatchingEntry(path, catalog = agentic_location_catalog_AGENTIC_LOCATION_CATALOG) {
27781
+ const matches = entriesMatchingPath(path, catalog);
27782
+ if (matches.length === 0) {
27783
+ return null;
27784
+ }
27785
+ let best = matches[0];
27786
+ let bestScore = specificityScore(best);
27787
+ for(let i = 1; i < matches.length; i++){
27788
+ const candidate = matches[i];
27789
+ const score = specificityScore(candidate);
27790
+ if (score > bestScore) {
27791
+ best = candidate;
27792
+ bestScore = score;
27793
+ }
27794
+ }
27795
+ return best;
27796
+ }
27797
+ function primaryConstructTypeForPath(path, catalog = agentic_location_catalog_AGENTIC_LOCATION_CATALOG) {
27798
+ return bestMatchingEntry(path, catalog)?.primaryConstruct ?? null;
27799
+ }
27800
+ function constructTypesForPath(path, catalog = AGENTIC_LOCATION_CATALOG) {
27801
+ const best = bestMatchingEntry(path, catalog);
27802
+ if (!best) {
27803
+ return [];
27804
+ }
27805
+ if (best.secondaryConstructs && best.secondaryConstructs.length > 0) {
27806
+ return [
27807
+ best.primaryConstruct,
27808
+ ...best.secondaryConstructs
27809
+ ];
27810
+ }
27811
+ return [
27812
+ best.primaryConstruct
27813
+ ];
27814
+ }
27815
+ function lintTargetEntries(target, catalog = agentic_location_catalog_AGENTIC_LOCATION_CATALOG) {
27816
+ return catalog.filter((entry)=>entry.lintTarget === target);
27817
+ }
27818
+ function skillDirectoryRoots(catalog = agentic_location_catalog_AGENTIC_LOCATION_CATALOG) {
27819
+ return lintTargetEntries("skills", catalog).filter((entry)=>entry.matchKind === "directory-prefix").map((entry)=>entry.path);
27820
+ }
27821
+ function agentDirectoryRoots(catalog = agentic_location_catalog_AGENTIC_LOCATION_CATALOG) {
27822
+ return lintTargetEntries("agents", catalog).filter((entry)=>entry.matchKind === "directory-prefix").map((entry)=>entry.path);
27823
+ }
27824
+ function hookConfigPaths(catalog = agentic_location_catalog_AGENTIC_LOCATION_CATALOG) {
27825
+ return lintTargetEntries("hooks", catalog).filter((entry)=>entry.matchKind === "exact" && entry.hookPlatform != null).map((entry)=>({
27826
+ relativePath: entry.path,
27827
+ platform: entry.hookPlatform
27828
+ }));
27829
+ }
27830
+ function instructionDiscoveryEntries(catalog = agentic_location_catalog_AGENTIC_LOCATION_CATALOG) {
27831
+ return catalog.filter((entry)=>entry.instructionFormat != null);
27832
+ }
27833
+
27528
27834
  ;// CONCATENATED MODULE: ../core/src/gateways/skill-lint-gateway.ts
27529
27835
  /**
27530
27836
  * Gateway for skill lint file system operations.
@@ -27533,14 +27839,9 @@ const PackageJsonSchema = schemas_object({
27533
27839
 
27534
27840
 
27535
27841
 
27842
+
27536
27843
  /** Maximum skill file size: 1 MB */ const MAX_SKILL_FILE_BYTES = 1_048_576;
27537
- /**
27538
- * Skill directory locations to search for SKILL.md files.
27539
- */ const SKILL_DIRECTORIES = [
27540
- (0,external_node_path_.join)(".github", "skills"),
27541
- (0,external_node_path_.join)(".claude", "skills"),
27542
- (0,external_node_path_.join)(".agents", "skills")
27543
- ];
27844
+ /** Catalog skill roots converted to OS-native relative paths. */ const SKILL_DIRECTORIES = skillDirectoryRoots().map((root)=>(0,external_node_path_.join)(...root.split("/")));
27544
27845
  /** Maximum lock file size: 256 KB */ const MAX_LOCK_FILE_BYTES = 262_144;
27545
27846
  /** Relative path to the skills lock file. */ const SKILLS_LOCK_PATH = "skills-lock.json";
27546
27847
  /** Zod schema for skills-lock.json structure */ const SkillsLockSchema = schemas_object({
@@ -29677,7 +29978,10 @@ const HARNESS_FOOTPRINTS = {
29677
29978
  ],
29678
29979
  primaryIndicators: [
29679
29980
  ".github/copilot-instructions.md",
29680
- ".github/instructions/"
29981
+ ".github/instructions/",
29982
+ ".github/skills/",
29983
+ ".github/agents/",
29984
+ ".github/hooks/"
29681
29985
  ],
29682
29986
  crossRefMechanisms: [
29683
29987
  {
@@ -29996,6 +30300,7 @@ async function enumerateMcpServers(repoRoot) {
29996
30300
 
29997
30301
 
29998
30302
 
30303
+
29999
30304
  const MAX_FILE_BYTES = 1_048_576;
30000
30305
  const SCANNABLE_EXTENSIONS = new Set([
30001
30306
  ".md",
@@ -30023,22 +30328,7 @@ function isMarkdownFile(name) {
30023
30328
  return name.endsWith(".md") || name.endsWith(".mdc");
30024
30329
  }
30025
30330
  function determineConstructType(relPath) {
30026
- if (relPath.startsWith(".agents/skills/") || relPath.startsWith(".pi/skills/") || relPath.startsWith(".pi/prompts/")) {
30027
- return "skill";
30028
- }
30029
- if (relPath.startsWith(".codex-plugin/")) {
30030
- return "plugin";
30031
- }
30032
- if (relPath.startsWith(".claude/hooks/")) {
30033
- return "hook";
30034
- }
30035
- if (relPath.startsWith(".claude/agents/")) {
30036
- return "subagent";
30037
- }
30038
- if (relPath.startsWith(".claude/commands/")) {
30039
- return "agent";
30040
- }
30041
- return "instruction";
30331
+ return primaryConstructTypeForPath(relPath) ?? "instruction";
30042
30332
  }
30043
30333
  function determineHarness(repoRelativePath) {
30044
30334
  const matching = ALL_HARNESS_NAMES.filter((harness)=>matchesPrimaryIndicator(repoRelativePath, HARNESS_FOOTPRINTS[harness].primaryIndicators));
@@ -32435,12 +32725,21 @@ function createInitHooksCommand(useCase) {
32435
32725
  */
32436
32726
 
32437
32727
 
32728
+
32438
32729
  /** Maximum agent file size: 1 MB */ const MAX_AGENT_FILE_BYTES = 1_048_576;
32730
+ /** Catalog agent roots converted to OS-native relative paths. */ const AGENT_DIRECTORIES = agentDirectoryRoots().map((root)=>(0,external_node_path_.join)(...root.split("/")));
32439
32731
  /**
32440
32732
  * File system implementation of the agent lint gateway.
32441
32733
  */ class FileSystemAgentLintGateway {
32442
32734
  async discoverAgents(targetDir) {
32443
- const agentsDir = (0,external_node_path_.join)(".github", "agents");
32735
+ const agents = [];
32736
+ for (const agentsDir of AGENT_DIRECTORIES){
32737
+ const discovered = await this.discoverAgentsInDir(targetDir, agentsDir);
32738
+ agents.push(...discovered);
32739
+ }
32740
+ return agents;
32741
+ }
32742
+ async discoverAgentsInDir(targetDir, agentsDir) {
32444
32743
  try {
32445
32744
  if (!await file_system_utils_pathExistsWithinRoot(targetDir, agentsDir)) {
32446
32745
  return [];
@@ -32506,25 +32805,14 @@ function createInitHooksCommand(useCase) {
32506
32805
  * Discovers hook config files for GitHub Copilot and Claude Code.
32507
32806
  */
32508
32807
 
32808
+
32509
32809
  /** Maximum hook config file size: 1 MB */ const MAX_CONFIG_FILE_BYTES = 1_048_576;
32510
32810
  /** Matches the Copilot hook key `"preToolUse":` to detect hook section presence */ const COPILOT_HOOK_PATTERN = /"preToolUse"\s*:/;
32511
32811
  /** Matches the Claude hook key `"PreToolUse":` to detect hook section presence */ const CLAUDE_HOOK_PATTERN = /"PreToolUse"\s*:/;
32512
- /**
32513
- * Hook configuration file locations to search.
32514
- */ const HOOK_CONFIG_PATHS = [
32515
- {
32516
- relativePath: (0,external_node_path_.join)(".github", "hooks", "agent-shell", "hooks.json"),
32517
- platform: "copilot"
32518
- },
32519
- {
32520
- relativePath: (0,external_node_path_.join)(".claude", "settings.json"),
32521
- platform: "claude"
32522
- },
32523
- {
32524
- relativePath: (0,external_node_path_.join)(".claude", "settings.local.json"),
32525
- platform: "claude"
32526
- }
32527
- ];
32812
+ /** Catalog hook config paths converted to OS-native relative paths. */ const HOOK_CONFIG_PATHS = hookConfigPaths().map((entry)=>({
32813
+ relativePath: (0,external_node_path_.join)(...entry.relativePath.split("/")),
32814
+ platform: entry.platform
32815
+ }));
32528
32816
  /**
32529
32817
  * File system implementation of the hook config lint gateway.
32530
32818
  */ class FileSystemHookConfigGateway {
@@ -32593,40 +32881,28 @@ function createInitHooksCommand(useCase) {
32593
32881
  * Supports GitHub Copilot, Claude Code, and community agent instruction formats.
32594
32882
  */
32595
32883
 
32884
+
32596
32885
  /**
32597
32886
  * File system implementation of the instruction file discovery gateway.
32598
32887
  */ class FileSystemInstructionFileDiscoveryGateway {
32599
32888
  async discoverInstructionFiles(targetDir) {
32600
32889
  const files = [];
32601
- // .github/copilot-instructions.md
32602
- const copilotInstructions = (0,external_node_path_.join)(".github", "copilot-instructions.md");
32603
- if (await this.safePathExists(targetDir, copilotInstructions)) {
32604
- files.push({
32605
- filePath: (0,external_node_path_.join)(targetDir, copilotInstructions),
32606
- format: "copilot-instructions"
32607
- });
32608
- }
32609
- // .github/instructions/*.md
32610
- const instructionsDir = (0,external_node_path_.join)(".github", "instructions");
32611
- await this.discoverMdFilesInDir(targetDir, instructionsDir, "copilot-scoped", files);
32612
- // .github/agents/*.md
32613
- const agentsDir = (0,external_node_path_.join)(".github", "agents");
32614
- await this.discoverMdFilesInDir(targetDir, agentsDir, "copilot-agent", files);
32615
- // AGENTS.md at repo root
32616
- const agentsMd = "AGENTS.md";
32617
- if (await this.safePathExists(targetDir, agentsMd)) {
32618
- files.push({
32619
- filePath: (0,external_node_path_.join)(targetDir, agentsMd),
32620
- format: "agents-md"
32621
- });
32622
- }
32623
- // CLAUDE.md at repo root
32624
- const claudeMd = "CLAUDE.md";
32625
- if (await this.safePathExists(targetDir, claudeMd)) {
32626
- files.push({
32627
- filePath: (0,external_node_path_.join)(targetDir, claudeMd),
32628
- format: "claude-md"
32629
- });
32890
+ for (const entry of instructionDiscoveryEntries()){
32891
+ const format = entry.instructionFormat;
32892
+ if (format == null) {
32893
+ continue;
32894
+ }
32895
+ const relativePath = (0,external_node_path_.join)(...entry.path.split("/"));
32896
+ if (entry.matchKind === "exact") {
32897
+ if (await this.safePathExists(targetDir, relativePath)) {
32898
+ files.push({
32899
+ filePath: (0,external_node_path_.join)(targetDir, relativePath),
32900
+ format
32901
+ });
32902
+ }
32903
+ continue;
32904
+ }
32905
+ await this.discoverMdFilesInDir(targetDir, relativePath, format, files);
32630
32906
  }
32631
32907
  return files;
32632
32908
  }
@@ -62612,4 +62888,4 @@ if (installedChunkData !== 0) { // 0 means "already installed".'
62612
62888
  // module factories are used so entry inlining is disabled
62613
62889
  // startup
62614
62890
  // Load entry module and return exports
62615
- var __webpack_exports__ = __webpack_require__(9646);
62891
+ var __webpack_exports__ = __webpack_require__(6367);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lousy-agents/cli",
3
- "version": "5.17.16",
3
+ "version": "5.18.0",
4
4
  "description": "CLI scaffolding tool that sets up projects with structure, instructions, and feedback loops for AI coding assistants",
5
5
  "type": "module",
6
6
  "repository": {
@@ -55,7 +55,7 @@ Work in a read-only planning phase first. If the runtime provides a dedicated pl
55
55
 
56
56
  1. **Discover product and engineering context.** Read whatever conventional files the repo provides — for example `AGENTS.md`, `README.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `CONTRIBUTING.md`, anything under `.github/instructions/`, or product docs under `docs/`. Don't assume any specific file exists; use what's there.
57
57
  2. **Seed Context & Goal.** Based on the argument:
58
- - **Issue reference (`#N` or matches `^\d+$`):** fetch the issue and treat its Context & Goal and Acceptance Criteria sections (if present) as the starting point. Note any cross-reference IDs (e.g., a beads ID) in the issue footer.
58
+ - **Issue reference (`#N` or matches `^\d+$`):** fetch the issue and treat its Context & Goal and Acceptance Criteria sections (if present) as the starting point. Note any cross-reference IDs in the issue footer.
59
59
 
60
60
  ```bash
61
61
  gh issue view <N> --json title,body,labels,comments
@@ -23,7 +23,7 @@
23
23
  "devDependencies": {
24
24
  "@biomejs/biome": "2.5.3",
25
25
  "@eslint/eslintrc": "3.3.6",
26
- "@lousy-agents/mcp": "5.17.15",
26
+ "@lousy-agents/mcp": "5.17.16",
27
27
  "@modelcontextprotocol/server-sequential-thinking": "2026.7.4",
28
28
  "@testing-library/jest-dom": "7.0.0",
29
29
  "@testing-library/react": "16.3.2",