@ghl-ai/aw 0.1.39-beta.12 → 0.1.39-beta.13

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/ecc.mjs CHANGED
@@ -10,7 +10,7 @@ import { applyStoredStartupPreferences } from "./startup.mjs";
10
10
 
11
11
  const AW_ECC_REPO_SSH = "git@github.com:shreyansh-ghl/aw-ecc.git";
12
12
  const AW_ECC_REPO_HTTPS = "https://github.com/shreyansh-ghl/aw-ecc.git";
13
- export const AW_ECC_TAG = "v1.4.36";
13
+ export const AW_ECC_TAG = "v1.4.37";
14
14
 
15
15
  const MARKETPLACE_NAME = "aw-marketplace";
16
16
  const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.39-beta.12",
3
+ "version": "0.1.39-beta.13",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {
package/render-rules.mjs CHANGED
@@ -6,7 +6,12 @@ import { homedir } from 'node:os';
6
6
  import * as fmt from './fmt.mjs';
7
7
  import { RULES_RUNTIME_DIR } from './constants.mjs';
8
8
 
9
- const GENERATED_HEADER = '<!-- Generated by aw do not edit manually -->\n\n';
9
+ // The marker is placed AFTER the YAML frontmatter so Cursor/Markdown parsers
10
+ // see the frontmatter at byte 0. Putting an HTML comment before --- breaks
11
+ // Cursor's alwaysApply/globs detection.
12
+ const GENERATED_MARKER = '<!-- Generated by aw — do not edit manually -->';
13
+ // Legacy header (pre-pattern comment first) — kept for pruning old files.
14
+ const LEGACY_GENERATED_HEADER = '<!-- Generated by aw — do not edit manually -->\n\n';
10
15
  const STACK_OVERLAY_FLAG = 'AW_ENABLE_STACK_OVERLAY_RULES';
11
16
 
12
17
  /** Rule scope → Cursor .mdc glob patterns */
@@ -196,7 +201,8 @@ function pruneStaleGeneratedRules(outputDir, expectedFilenames) {
196
201
 
197
202
  const fullPath = join(outputDir, entry.name);
198
203
  const content = readOrNull(fullPath);
199
- if (!content?.startsWith(GENERATED_HEADER)) continue;
204
+ // Match both new pattern (marker after frontmatter) and legacy (marker at top).
205
+ if (!content || (!content.includes(GENERATED_MARKER) && !content.startsWith(LEGACY_GENERATED_HEADER))) continue;
200
206
 
201
207
  try {
202
208
  unlinkSync(fullPath);
@@ -303,7 +309,9 @@ function renderCursorRules(cwd, rulesDir, options = {}) {
303
309
  }
304
310
  }
305
311
 
306
- const content = GENERATED_HEADER + frontmatter.join('\n') + '\n\n' + agentsMd.trim() + '\n' + refSection;
312
+ // Frontmatter MUST be at byte 0 for Cursor's YAML parser.
313
+ // Generated marker goes on the line immediately after the closing ---.
314
+ const content = frontmatter.join('\n') + '\n' + GENERATED_MARKER + '\n\n' + agentsMd.trim() + '\n' + refSection;
307
315
  writeFileSync(join(cursorRulesDir, `${scopeToFilename(scope)}.mdc`), content);
308
316
  count++;
309
317
  }
@@ -318,10 +326,13 @@ function renderCursorRules(cwd, rulesDir, options = {}) {
318
326
  }
319
327
 
320
328
  function generateCursorAwRoutingRule() {
321
- return `${GENERATED_HEADER}---
329
+ // Frontmatter MUST be at byte 0 for Cursor's alwaysApply/globs detection.
330
+ return `---
322
331
  description: "AW global routing: select route, READ stage skill, then respond"
323
332
  alwaysApply: true
324
333
  ---
334
+ ${GENERATED_MARKER}
335
+
325
336
  # AW Global Routing
326
337
 
327
338
  ## Hard Gate (MUST — do not skip)
@@ -460,7 +471,8 @@ function renderClaudeRules(cwd, rulesDir, options = {}) {
460
471
  }
461
472
  }
462
473
 
463
- const content = GENERATED_HEADER + frontmatter + agentsMd.trim() + '\n' + refSection;
474
+ // Claude Code reads .md frontmatter similarly keep marker after frontmatter.
475
+ const content = frontmatter + GENERATED_MARKER + '\n\n' + agentsMd.trim() + '\n' + refSection;
464
476
  writeFileSync(join(claudeRulesDir, `${scopeToFilename(scope)}.md`), content);
465
477
  count++;
466
478
  }