@intellectronica/ruler 0.3.15 → 0.3.17

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/README.md CHANGED
@@ -66,6 +66,7 @@ Ruler solves this by providing a **single source of truth** for all your AI agen
66
66
  | Cline | `.clinerules` | - |
67
67
  | Crush | `CRUSH.md` | `.crush.json` |
68
68
  | Amp | `AGENTS.md` | - |
69
+ | Antigravity | `.agent/rules/ruler.md` | - |
69
70
  | Amazon Q CLI | `.amazonq/rules/ruler_q_rules.md` | `.amazonq/mcp.json` |
70
71
  | Aider | `AGENTS.md`, `.aider.conf.yml` | `.mcp.json` |
71
72
  | Firebase Studio | `.idx/airules.md` | `.idx/mcp.json` |
@@ -81,7 +82,7 @@ Ruler solves this by providing a **single source of truth** for all your AI agen
81
82
  | Zed | `AGENTS.md` | `.zed/settings.json` (project root, never $HOME) |
82
83
  | Trae AI | `.trae/rules/project_rules.md` | - |
83
84
  | Warp | `WARP.md` | - |
84
- | Kiro | `.kiro/steering/ruler_kiro_instructions.md` | - |
85
+ | Kiro | `.kiro/steering/ruler_kiro_instructions.md` | `.kiro/settings/mcp.json` |
85
86
  | Firebender | `firebender.json` | `firebender.json` (rules and MCP in same file) |
86
87
 
87
88
  ## Getting Started
@@ -131,7 +132,7 @@ This is your central hub for all AI agent instructions:
131
132
  3. Legacy `.ruler/instructions.md` (only if `.ruler/AGENTS.md` absent; no longer emits a deprecation warning)
132
133
  4. Remaining discovered `.md` files under `.ruler/` (and subdirectories) in sorted order
133
134
  - **Rule Files (`*.md`)**: Discovered recursively from `.ruler/` or `$XDG_CONFIG_HOME/ruler` and concatenated in the order above
134
- - **Concatenation Marker**: Each file's content is prepended with `--- Source: <relative_path_to_md_file> ---` for traceability
135
+ - **Concatenation Marker**: Each file's content is prepended with `<!-- Source: <relative_path_to_md_file> -->` for traceability
135
136
  - **`ruler.toml`**: Master configuration for Ruler's behavior, agent selection, and output paths
136
137
  - **`mcp.json`**: Shared MCP server settings
137
138
 
@@ -318,7 +319,7 @@ ruler revert [options]
318
319
  | Option | Description |
319
320
  | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
320
321
  | `--project-root <path>` | Path to your project's root (default: current directory) |
321
- | `--agents <agent1,agent2,...>` | Comma-separated list of agent names to revert (agentsmd, aider, amazonqcli, amp, augmentcode, claude, cline, codex, copilot, crush, cursor, firebase, firebender, gemini-cli, goose, jules, junie, kilocode, kiro, opencode, openhands, qwen, roo, trae, warp, windsurf, zed) |
322
+ | `--agents <agent1,agent2,...>` | Comma-separated list of agent names to revert (agentsmd, aider, amazonqcli, amp, antigravity, augmentcode, claude, cline, codex, copilot, crush, cursor, firebase, firebender, gemini-cli, goose, jules, junie, kilocode, kiro, opencode, openhands, qwen, roo, trae, warp, windsurf, zed) |
322
323
  | `--config <path>` | Path to a custom `ruler.toml` configuration file |
323
324
  | `--keep-backups` | Keep backup files (.bak) after restoration (default: false) |
324
325
  | `--dry-run` | Preview changes without actually reverting files |
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.AntigravityAgent = void 0;
37
+ const path = __importStar(require("path"));
38
+ const AbstractAgent_1 = require("./AbstractAgent");
39
+ /**
40
+ * Antigravity agent adapter.
41
+ */
42
+ class AntigravityAgent extends AbstractAgent_1.AbstractAgent {
43
+ getIdentifier() {
44
+ return 'antigravity';
45
+ }
46
+ getName() {
47
+ return 'Antigravity';
48
+ }
49
+ getDefaultOutputPath(projectRoot) {
50
+ return path.join(projectRoot, '.agent', 'rules', 'ruler.md');
51
+ }
52
+ }
53
+ exports.AntigravityAgent = AntigravityAgent;
@@ -31,6 +31,7 @@ const RooCodeAgent_1 = require("./RooCodeAgent");
31
31
  const TraeAgent_1 = require("./TraeAgent");
32
32
  const AmazonQCliAgent_1 = require("./AmazonQCliAgent");
33
33
  const FirebenderAgent_1 = require("./FirebenderAgent");
34
+ const AntigravityAgent_1 = require("./AntigravityAgent");
34
35
  exports.allAgents = [
35
36
  new CopilotAgent_1.CopilotAgent(),
36
37
  new ClaudeAgent_1.ClaudeAgent(),
@@ -59,6 +60,7 @@ exports.allAgents = [
59
60
  new TraeAgent_1.TraeAgent(),
60
61
  new AmazonQCliAgent_1.AmazonQCliAgent(),
61
62
  new FirebenderAgent_1.FirebenderAgent(),
63
+ new AntigravityAgent_1.AntigravityAgent(),
62
64
  ];
63
65
  /**
64
66
  * Generates a comma-separated list of agent identifiers for CLI help text.
@@ -43,6 +43,7 @@ exports.findAllRulerDirs = findAllRulerDirs;
43
43
  const fs_1 = require("fs");
44
44
  const path = __importStar(require("path"));
45
45
  const os = __importStar(require("os"));
46
+ const constants_1 = require("../constants");
46
47
  /**
47
48
  * Gets the XDG config directory path, falling back to ~/.config if XDG_CONFIG_HOME is not set.
48
49
  */
@@ -101,6 +102,13 @@ async function readMarkdownFiles(rulerDir) {
101
102
  for (const entry of entries) {
102
103
  const fullPath = path.join(dir, entry.name);
103
104
  if (entry.isDirectory()) {
105
+ // Skip .ruler/skills; skills are propagated separately and should not be concatenated
106
+ const relativeFromRoot = path.relative(rulerDir, fullPath);
107
+ const isSkillsDir = relativeFromRoot === constants_1.SKILLS_DIR ||
108
+ relativeFromRoot.startsWith(`${constants_1.SKILLS_DIR}${path.sep}`);
109
+ if (isSkillsDir) {
110
+ continue;
111
+ }
104
112
  await walk(fullPath);
105
113
  }
106
114
  else if (entry.isFile() && entry.name.endsWith('.md')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intellectronica/ruler",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "description": "Ruler — apply the same rules to all coding agents",
5
5
  "main": "dist/lib.js",
6
6
  "scripts": {