agents-md-gen 0.6.0 → 0.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0
4
+
5
+ - Detect Dart/Flutter projects (`pubspec.yaml`, Flutter vs. plain
6
+ Dart, `flutter test`/`dart test`).
7
+ - Detect Elixir projects (`mix.exs`, Phoenix framework detection,
8
+ ExUnit).
9
+
10
+ ## 0.6.1
11
+
12
+ - Detect Rush monorepos (`rush.json`, including the `//` line
13
+ comments Rush's own tooling writes into it).
14
+
3
15
  ## 0.6.0
4
16
 
5
17
  - Detect Swift packages (`Package.swift`, XCTest detection).
package/README.md CHANGED
@@ -63,8 +63,10 @@ docker run --rm -v "$PWD":/workdir ghcr.io/peshino2012/agents-md-gen
63
63
  - **PHP** — Composer, Laravel/Symfony detection, PHPUnit
64
64
  - **.NET/C#** — NuGet, xUnit/NUnit/MSTest detection
65
65
  - **Swift** — Swift Package Manager, XCTest detection
66
- - **Monorepos** — Turborepo, Nx, Lerna, npm/yarn/pnpm workspaces, listing
67
- each detected sub-package
66
+ - **Dart/Flutter** — pub, `flutter test`/`dart test` detection
67
+ - **Elixir** — Mix, Phoenix framework detection, ExUnit
68
+ - **Monorepos** — Turborepo, Nx, Lerna, Rush, npm/yarn/pnpm workspaces,
69
+ listing each detected sub-package
68
70
  - CI (GitHub Actions), license, and top-level project structure
69
71
 
70
72
  ## GitHub Action
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-md-gen",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Generate a solid AGENTS.md / CLAUDE.md for any repo by detecting its stack, commands, and structure",
5
5
  "license": "MIT",
6
6
  "funding": {
@@ -44,6 +44,10 @@
44
44
  "csharp",
45
45
  "swift",
46
46
  "swiftpm",
47
+ "dart",
48
+ "flutter",
49
+ "elixir",
50
+ "phoenix",
47
51
  "cli",
48
52
  "codegen",
49
53
  "developer-tools"
package/src/detect.js CHANGED
@@ -229,6 +229,51 @@ function detectRuby(root) {
229
229
  };
230
230
  }
231
231
 
232
+ function detectDart(root) {
233
+ const pubspec = readText(root, 'pubspec.yaml');
234
+ if (!pubspec) return null;
235
+ const nameMatch = pubspec.match(/^name:\s*(\S+)/m);
236
+ const isFlutter = /^\s*flutter:/m.test(pubspec) || /flutter:\s*\n\s*sdk:\s*flutter/.test(pubspec);
237
+
238
+ return {
239
+ ecosystem: isFlutter ? 'Flutter' : 'Dart',
240
+ name: nameMatch ? nameMatch[1] : null,
241
+ description: null,
242
+ packageManager: 'pub',
243
+ frameworks: [],
244
+ testFramework: exists(root, 'test') ? 'test' : null,
245
+ commands: {
246
+ install: 'dart pub get',
247
+ build: isFlutter ? 'flutter build' : null,
248
+ test: isFlutter ? 'flutter test' : 'dart test',
249
+ lint: 'dart analyze',
250
+ dev: isFlutter ? 'flutter run' : null,
251
+ },
252
+ };
253
+ }
254
+
255
+ function detectElixir(root) {
256
+ const mixExs = readText(root, 'mix.exs');
257
+ if (!mixExs) return null;
258
+ const nameMatch = mixExs.match(/app:\s*:(\w+)/);
259
+
260
+ return {
261
+ ecosystem: 'Elixir',
262
+ name: nameMatch ? nameMatch[1] : null,
263
+ description: null,
264
+ packageManager: 'mix',
265
+ frameworks: /phoenix/i.test(mixExs) ? ['Phoenix'] : [],
266
+ testFramework: exists(root, 'test') ? 'ExUnit' : null,
267
+ commands: {
268
+ install: 'mix deps.get',
269
+ build: 'mix compile',
270
+ test: exists(root, 'test') ? 'mix test' : null,
271
+ lint: exists(root, '.credo.exs') ? 'mix credo' : null,
272
+ dev: null,
273
+ },
274
+ };
275
+ }
276
+
232
277
  function detectSwift(root) {
233
278
  const manifest = readText(root, 'Package.swift');
234
279
  if (!manifest) return null;
@@ -368,7 +413,27 @@ function detectDocker(root) {
368
413
  return { dockerfile, compose: compose || null };
369
414
  }
370
415
 
416
+ function readJsonWithComments(root, ...segments) {
417
+ const text = readText(root, ...segments);
418
+ if (!text) return null;
419
+ try {
420
+ // rush.json commonly ships with // line comments, which aren't valid JSON.
421
+ return JSON.parse(text.replace(/^\s*\/\/.*$/gm, ''));
422
+ } catch {
423
+ return null;
424
+ }
425
+ }
426
+
371
427
  function detectMonorepo(root) {
428
+ const rush = readJsonWithComments(root, 'rush.json');
429
+ if (rush && Array.isArray(rush.projects)) {
430
+ const packages = rush.projects
431
+ .map((p) => p.packageName)
432
+ .filter(Boolean)
433
+ .sort();
434
+ return { tool: 'Rush', packages };
435
+ }
436
+
372
437
  const pkg = readJson(root, 'package.json');
373
438
  const patterns = [];
374
439
 
@@ -413,7 +478,7 @@ function detectMonorepo(root) {
413
478
  }
414
479
 
415
480
  function detectProject(root) {
416
- const detectors = [detectNode, detectPython, detectRust, detectGo, detectRuby, detectJava, detectPhp, detectDotnet, detectSwift];
481
+ const detectors = [detectNode, detectPython, detectRust, detectGo, detectRuby, detectJava, detectPhp, detectDotnet, detectSwift, detectDart, detectElixir];
417
482
  const stacks = detectors.map((fn) => fn(root)).filter(Boolean);
418
483
 
419
484
  return {