@ghl-ai/aw 0.1.37-beta.64 → 0.1.37-beta.66

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.
@@ -383,6 +383,7 @@ function findBrokenRegistryReferences(filePaths) {
383
383
  const content = readText(filePath);
384
384
  const refs = extractRegistryReferencePaths(content);
385
385
  for (const ref of refs) {
386
+ if (ref.includes('<domain>')) continue;
386
387
  const resolvedPath = join(dirname(filePath), ref);
387
388
  if (!existsSync(resolvedPath)) {
388
389
  broken.push({ filePath, ref, resolvedPath });
package/ecc.mjs CHANGED
@@ -17,11 +17,19 @@ const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
17
17
 
18
18
  function eccDir() { return join(homedir(), ".aw-ecc"); }
19
19
 
20
- // "claude" runs install-apply.js --without baseline:commands so hooks, rules,
21
- // and agents land in ~/.claude/ — but commands are skipped because the plugin
22
- // marketplace (installClaudePlugin) already registers them under /aw:tdd.
23
- // File-copying commands would create a duplicate flat /tdd alongside /aw:tdd.
20
+ // "claude" uses a no-commands module set so hooks, rules, shared references,
21
+ // and install-state land in ~/.claude/ — while slash commands stay owned by
22
+ // the marketplace plugin under /aw:*.
23
+ // Using `--without baseline:commands` with broader profiles is unsafe because
24
+ // some optional modules depend on commands-core and cause install-apply to fail.
24
25
  const FILE_COPY_TARGETS = ["claude", "cursor", "codex"];
26
+ const CLAUDE_FILE_COPY_MODULES = [
27
+ "rules-core",
28
+ "agents-core",
29
+ "hooks-runtime",
30
+ "platform-configs",
31
+ "workflow-quality",
32
+ ];
25
33
 
26
34
  const TARGET_STATE = {
27
35
  claude: { state: ".claude/ecc/install-state.json" },
@@ -190,11 +198,14 @@ export async function installAwEcc(
190
198
  try {
191
199
  // Always use HOME as cwd so files land in ~/.<target>/ globally.
192
200
  const runCwd = homedir();
193
- // For claude: skip commands (plugin handles them as /aw:tdd) but
194
- // install hooks, rules, agents into ~/.claude/.
195
- const withoutFlag = target === "claude" ? " --without baseline:commands" : "";
201
+ // For claude: install the safe no-commands module set. The plugin
202
+ // already owns /aw:* command registration, and broader profiles with
203
+ // `--without baseline:commands` can fail on commands-core deps.
204
+ const installArgs = target === "claude"
205
+ ? `--target ${target} --modules ${CLAUDE_FILE_COPY_MODULES.join(",")}`
206
+ : `--target ${target} --profile full`;
196
207
  run(
197
- `node ${join(repoDir, "scripts/install-apply.js")} --target ${target} --profile full${withoutFlag}`,
208
+ `node ${join(repoDir, "scripts/install-apply.js")} ${installArgs}`,
198
209
  { cwd: runCwd },
199
210
  );
200
211
  // Move cursor commands into aw/ subfolder for namespace consistency
package/integrate.mjs CHANGED
@@ -29,7 +29,7 @@ function generateAwRouterBridgeSection() {
29
29
  - Do not assume the previous skill stack is still active
30
30
 
31
31
  ### 2. Read Rules Before Acting (MANDATORY)
32
- - Read applicable AW rules from \`$HOME/.aw/.aw_registry/.aw_rules/platform/<domain>/AGENTS.md\`
32
+ - Read applicable AW rules from \`~/.aw/.aw_registry/.aw_rules/platform/<domain>/AGENTS.md\`
33
33
  - Also read \`universal\` and \`security\` rules whenever they apply
34
34
  - If repo-local instructions conflict with org-level sources of truth, follow org-level sources
35
35
 
@@ -91,6 +91,27 @@ function stripManagedSection(content, header, stopHeaders = []) {
91
91
  return `${content.slice(0, idx).trimEnd()}${content.slice(end)}`;
92
92
  }
93
93
 
94
+ function defaultInstructionPreamble(file) {
95
+ return file === 'CLAUDE.md' ? '# CLAUDE.md\n' : '# AGENTS.md\n';
96
+ }
97
+
98
+ function shouldResetHomeInstructionFile(content, file) {
99
+ const legacyMarkers = file === 'CLAUDE.md'
100
+ ? [
101
+ '# CLAUDE.md — ',
102
+ '## Routing Rule (ABSOLUTE)',
103
+ 'This supplements the root `AGENTS.md` with Codex-specific guidance.',
104
+ '<!-- BEGIN ECC -->',
105
+ ]
106
+ : [
107
+ '# AGENTS.md — ',
108
+ '# ECC for Codex CLI',
109
+ '<!-- BEGIN ECC -->',
110
+ ];
111
+
112
+ return legacyMarkers.some(marker => content.includes(marker));
113
+ }
114
+
94
115
  function applyManagedInstructionSections(content, file, rulesSections = {}, options = {}) {
95
116
  const rulesHeader = file === 'CLAUDE.md' ? CLAUDE_RULES_HEADER : AGENTS_RULES_HEADER;
96
117
  const rulesSection = file === 'CLAUDE.md' ? rulesSections.claudeSection : rulesSections.agentsSection;
@@ -215,9 +236,12 @@ export function copyInstructions(cwd, tempDir, namespace) {
215
236
  function syncHomeInstructionFile(destPath, file, rulesSection) {
216
237
  const existing = existsSync(destPath)
217
238
  ? readFileSync(destPath, 'utf8')
218
- : (file === 'CLAUDE.md' ? '# CLAUDE.md\n' : '# AGENTS.md\n');
239
+ : defaultInstructionPreamble(file);
240
+ const base = shouldResetHomeInstructionFile(existing, file)
241
+ ? defaultInstructionPreamble(file)
242
+ : existing;
219
243
  const updated = applyManagedInstructionSections(
220
- existing,
244
+ base,
221
245
  file,
222
246
  file === 'CLAUDE.md' ? { claudeSection: rulesSection } : { agentsSection: rulesSection },
223
247
  );
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.37-beta.64",
3
+ "version": "0.1.37-beta.66",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
- "bin": "bin.js",
6
+ "bin": {
7
+ "aw": "bin.js"
8
+ },
7
9
  "files": [
8
10
  "bin.js",
9
11
  "cli.mjs",