@arcbridge/adapters 0.2.1 → 0.3.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/dist/index.d.ts CHANGED
@@ -18,6 +18,12 @@ declare class CopilotAdapter implements PlatformAdapter {
18
18
  generateAgentConfigs(targetDir: string, roles: AgentRole[]): void;
19
19
  }
20
20
 
21
+ declare class CodexAdapter implements PlatformAdapter {
22
+ platform: string;
23
+ generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void;
24
+ generateAgentConfigs(targetDir: string, roles: AgentRole[]): void;
25
+ }
26
+
21
27
  declare function getAdapter(platform: string): PlatformAdapter;
22
28
 
23
- export { ClaudeAdapter, CopilotAdapter, type PlatformAdapter, getAdapter };
29
+ export { ClaudeAdapter, CodexAdapter, CopilotAdapter, type PlatformAdapter, getAdapter };
package/dist/index.js CHANGED
@@ -288,10 +288,219 @@ var CopilotAdapter = class {
288
288
  }
289
289
  };
290
290
 
291
+ // src/codex/codex-adapter.ts
292
+ import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync3, existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
293
+ import { join as join3 } from "path";
294
+ function generateAgentsMd(config) {
295
+ const lines = [
296
+ `# ${config.project_name}`,
297
+ "",
298
+ `> Auto-generated by ArcBridge. Edit .arcbridge/ files to update.`,
299
+ "",
300
+ "## Codex MCP Setup",
301
+ "",
302
+ "Add this to your `~/.codex/config.toml` (one-time setup):",
303
+ "",
304
+ "```toml",
305
+ "[mcp_servers.arcbridge]",
306
+ 'command = "npx"',
307
+ 'args = ["-y", "@arcbridge/mcp-server"]',
308
+ "```",
309
+ "",
310
+ "## Project Overview",
311
+ "",
312
+ `- **Type:** ${config.project_type}`,
313
+ `- **Quality Priorities:** ${config.quality_priorities.join(", ")}`,
314
+ "",
315
+ "## How to Work in This Project",
316
+ "",
317
+ "This project follows the **Plan \u2192 Build \u2192 Sync \u2192 Review** convention using ArcBridge.",
318
+ "ArcBridge provides MCP tools that give you architectural awareness. **Use them throughout your work.**",
319
+ "",
320
+ "### Before Starting Any Work",
321
+ "",
322
+ "1. Check project status: `arcbridge_get_project_status`",
323
+ "2. Review current tasks: `arcbridge_get_current_tasks`",
324
+ "3. Activate the appropriate role: `arcbridge_activate_role`",
325
+ "",
326
+ "### When Planning or Refining Architecture",
327
+ "",
328
+ 'Activate the **architect** role: `arcbridge_activate_role({ role: "architect" })`',
329
+ "",
330
+ "- `arcbridge_get_building_blocks` \u2014 view architecture decomposition",
331
+ "- `arcbridge_get_quality_scenarios` \u2014 view quality requirements",
332
+ "- `arcbridge_get_open_questions` \u2014 find architectural gaps",
333
+ "- `arcbridge_propose_arc42_update` \u2014 propose doc updates from code changes",
334
+ "",
335
+ "### When Implementing Features",
336
+ "",
337
+ 'Activate the **implementer** role: `arcbridge_activate_role({ role: "implementer" })`',
338
+ "",
339
+ "- `arcbridge_get_guidance` \u2014 context-aware guidance for the file/block you're working on",
340
+ "- `arcbridge_get_current_tasks` \u2014 check expected tasks in the current phase",
341
+ "- `arcbridge_search_symbols` / `arcbridge_get_symbol` \u2014 understand existing code",
342
+ "- `arcbridge_get_dependency_graph` \u2014 check module dependencies",
343
+ "- `arcbridge_update_task` \u2014 mark tasks as in-progress or done",
344
+ "- `arcbridge_reindex` \u2014 re-index after significant code changes",
345
+ "",
346
+ "### After Implementing (Phase Boundary Review)",
347
+ "",
348
+ "Before completing a phase:",
349
+ "",
350
+ "1. **Drift check:** `arcbridge_check_drift` \u2014 catch undeclared dependencies",
351
+ "2. **Verify scenarios:** `arcbridge_verify_scenarios` \u2014 run linked quality tests",
352
+ "3. **Practice review:** `arcbridge_get_practice_review` \u2014 review across 5 dimensions",
353
+ "",
354
+ "### Completing a Phase",
355
+ "",
356
+ "Activate the **phase-manager** role, then: `arcbridge_complete_phase`",
357
+ '\u2014 validates three gates: all tasks done, no critical drift, must-have quality scenarios (priority = "must") not failing.',
358
+ ""
359
+ ];
360
+ if (config.project_type === "nextjs-app-router" || config.project_type === "react-vite") {
361
+ lines.push(
362
+ "## React & Next.js Analysis",
363
+ "",
364
+ "- `arcbridge_get_component_graph` \u2014 component hierarchy, props, state, context",
365
+ "- `arcbridge_get_route_map` \u2014 Next.js route tree (pages, layouts, API routes)",
366
+ "- `arcbridge_get_boundary_analysis` \u2014 server/client boundary analysis",
367
+ ""
368
+ );
369
+ }
370
+ lines.push(
371
+ "## Agent Roles",
372
+ "",
373
+ "Activate roles with `arcbridge_activate_role` to get specialized context.",
374
+ "Roles are defined in `.arcbridge/agents/`.",
375
+ "",
376
+ "*Role table is appended below after agent configs are generated.*",
377
+ ""
378
+ );
379
+ return lines.join("\n");
380
+ }
381
+ function generateSyncSkill() {
382
+ return `---
383
+ name: arcbridge-sync
384
+ description: Run the ArcBridge sync loop \u2014 reindex code, detect architecture drift, and update task statuses. Use after significant code changes or before completing a phase.
385
+ ---
386
+
387
+ # ArcBridge Sync
388
+
389
+ Run the full sync loop to keep architecture docs and task statuses in sync with code changes.
390
+
391
+ ## Steps
392
+
393
+ 1. **Reindex** \u2014 \`arcbridge_reindex\` to update the symbol index with recent code changes
394
+ 2. **Check drift** \u2014 \`arcbridge_check_drift\` to detect undeclared dependencies and missing modules
395
+ 3. **Review tasks** \u2014 \`arcbridge_get_current_tasks\` to see if any tasks can be inferred as done
396
+ 4. **Propose updates** \u2014 \`arcbridge_propose_arc42_update\` to generate documentation update proposals
397
+
398
+ ## When to Use
399
+
400
+ - After completing a significant feature or refactoring
401
+ - Before running \`arcbridge_complete_phase\`
402
+ - When you suspect architecture docs are out of date
403
+ - Periodically during active development
404
+ `;
405
+ }
406
+ function generateReviewSkill() {
407
+ return `---
408
+ name: arcbridge-review
409
+ description: Run ArcBridge phase boundary reviews \u2014 drift check, quality scenario verification, and practice review across 5 dimensions. Use before completing a phase.
410
+ ---
411
+
412
+ # ArcBridge Phase Review
413
+
414
+ Run the full review suite before completing a phase gate.
415
+
416
+ ## Steps
417
+
418
+ 1. **Drift check** \u2014 \`arcbridge_check_drift\` to catch undeclared dependencies and boundary violations
419
+ 2. **Verify scenarios** \u2014 \`arcbridge_verify_scenarios\` to run linked tests for quality scenarios
420
+ 3. **Practice review** \u2014 \`arcbridge_get_practice_review\` to review changes across architecture, security, testing, docs, and complexity
421
+ 4. **Role checks** \u2014 optionally run \`arcbridge_run_role_check\` with specific roles (security-reviewer, quality-guardian)
422
+ 5. **Complete phase** \u2014 if all checks pass, run \`arcbridge_complete_phase\` to validate gates and transition
423
+
424
+ ## Review Roles
425
+
426
+ | Role | When to consult |
427
+ |------|----------------|
428
+ | **code-reviewer** | Every phase |
429
+ | **security-reviewer** | Phases with auth, uploads, API routes, user input |
430
+ | **quality-guardian** | Every 2nd phase, or when quality scenarios are linked |
431
+ | **architect** | When drift is detected or architecture evolved significantly |
432
+ `;
433
+ }
434
+ var CodexAdapter = class {
435
+ platform = "codex";
436
+ generateProjectConfig(targetDir, config) {
437
+ const agentsMdContent = generateAgentsMd(config);
438
+ const agentsMdPath = join3(targetDir, "AGENTS.md");
439
+ const marker = "<!-- arcbridge-generated -->";
440
+ if (existsSync2(agentsMdPath)) {
441
+ const existing = readFileSync2(agentsMdPath, "utf-8");
442
+ const markerIndex = existing.indexOf(marker);
443
+ if (markerIndex >= 0) {
444
+ const userContent = existing.slice(0, markerIndex).trimEnd();
445
+ const prefix = userContent ? `${userContent}
446
+
447
+ ` : "";
448
+ writeFileSync3(agentsMdPath, `${prefix}${marker}
449
+
450
+ ${agentsMdContent}`, "utf-8");
451
+ } else {
452
+ const existingTrimmed = existing.trimEnd();
453
+ const prefix = existingTrimmed ? `${existingTrimmed}
454
+
455
+ ` : "";
456
+ writeFileSync3(agentsMdPath, `${prefix}${marker}
457
+
458
+ ${agentsMdContent}`, "utf-8");
459
+ }
460
+ } else {
461
+ writeFileSync3(agentsMdPath, `${marker}
462
+
463
+ ${agentsMdContent}`, "utf-8");
464
+ }
465
+ }
466
+ generateAgentConfigs(targetDir, roles) {
467
+ const agentsMdPath = join3(targetDir, "AGENTS.md");
468
+ if (existsSync2(agentsMdPath)) {
469
+ let content = readFileSync2(agentsMdPath, "utf-8");
470
+ const roleTable = [
471
+ "| Role | Description |",
472
+ "|------|-------------|",
473
+ ...roles.map((r) => `| \`${r.role_id}\` | ${r.description} |`),
474
+ ""
475
+ ].join("\n");
476
+ const placeholder = "*Role table is appended below after agent configs are generated.*";
477
+ if (content.includes(placeholder)) {
478
+ content = content.replace(placeholder, roleTable);
479
+ } else {
480
+ content = `${content.trimEnd()}
481
+
482
+ ## Agent Roles
483
+
484
+ ${roleTable}
485
+ `;
486
+ }
487
+ writeFileSync3(agentsMdPath, content, "utf-8");
488
+ }
489
+ const skillsDir = join3(targetDir, ".agents", "skills");
490
+ const syncDir = join3(skillsDir, "arcbridge-sync");
491
+ mkdirSync3(syncDir, { recursive: true });
492
+ writeFileSync3(join3(syncDir, "SKILL.md"), generateSyncSkill(), "utf-8");
493
+ const reviewDir = join3(skillsDir, "arcbridge-review");
494
+ mkdirSync3(reviewDir, { recursive: true });
495
+ writeFileSync3(join3(reviewDir, "SKILL.md"), generateReviewSkill(), "utf-8");
496
+ }
497
+ };
498
+
291
499
  // src/index.ts
292
500
  var adapters = {
293
501
  claude: () => new ClaudeAdapter(),
294
- copilot: () => new CopilotAdapter()
502
+ copilot: () => new CopilotAdapter(),
503
+ codex: () => new CodexAdapter()
295
504
  };
296
505
  function getAdapter(platform) {
297
506
  const factory = adapters[platform];
@@ -304,6 +513,7 @@ function getAdapter(platform) {
304
513
  }
305
514
  export {
306
515
  ClaudeAdapter,
516
+ CodexAdapter,
307
517
  CopilotAdapter,
308
518
  getAdapter
309
519
  };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/claude/claude-adapter.ts","../src/copilot/copilot-adapter.ts","../src/index.ts"],"sourcesContent":["import { mkdirSync, writeFileSync, existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { AgentRole, ArcBridgeConfig } from \"@arcbridge/core\";\nimport type { PlatformAdapter } from \"../types.js\";\n\nfunction generateClaudeMd(config: ArcBridgeConfig): string {\n const lines: string[] = [\n `# ${config.project_name}`,\n \"\",\n `> Auto-generated by ArcBridge. Edit .arcbridge/ files to update.`,\n \"\",\n \"## Project Overview\",\n \"\",\n `- **Type:** ${config.project_type}`,\n `- **Quality Priorities:** ${config.quality_priorities.join(\", \")}`,\n \"\",\n \"## How to Work in This Project\",\n \"\",\n \"This project follows the **Plan → Build → Sync → Review** convention using ArcBridge.\",\n \"ArcBridge provides MCP tools that give you architectural awareness. **Use them throughout your work.**\",\n \"\",\n \"### Before Starting Any Work\",\n \"\",\n \"1. Check project status: `arcbridge_get_project_status`\",\n \"2. Review current tasks: `arcbridge_get_current_tasks`\",\n \"3. Activate the appropriate role (see below): `arcbridge_activate_role`\",\n \"\",\n \"### When Planning or Refining Architecture\",\n \"\",\n \"Activate the **architect** role: `arcbridge_activate_role({ role: \\\"architect\\\" })`\",\n \"\",\n \"Then use:\",\n \"- `arcbridge_get_building_blocks` — view current architecture decomposition\",\n \"- `arcbridge_get_quality_scenarios` — view quality requirements\",\n \"- `arcbridge_get_open_questions` — find architectural gaps to resolve\",\n \"- `arcbridge_propose_arc42_update` — propose doc updates from recent code changes\",\n \"\",\n \"### When Implementing Features\",\n \"\",\n \"Activate the **implementer** role: `arcbridge_activate_role({ role: \\\"implementer\\\" })`\",\n \"\",\n \"Then use:\",\n \"- `arcbridge_get_guidance` — get context-aware guidance for the file/block you're working on\",\n \"- `arcbridge_get_current_tasks` — check what tasks are expected in the current phase\",\n \"- `arcbridge_search_symbols` / `arcbridge_get_symbol` — understand existing code\",\n \"- `arcbridge_get_dependency_graph` — check module dependencies before adding new ones\",\n \"- `arcbridge_update_task` — mark tasks as in-progress or done as you complete them\",\n \"- `arcbridge_reindex` — re-index after significant code changes\",\n \"\",\n \"### After Implementing (Phase Boundary Review)\",\n \"\",\n \"Before completing a phase, consult the review roles. Not every role is needed every phase — use this guide:\",\n \"\",\n \"| Role | When to consult | How |\",\n \"|------|----------------|-----|\",\n \"| **code-reviewer** | Every phase | `arcbridge_activate_role({ role: \\\"code-reviewer\\\" })` then `arcbridge_get_practice_review` |\",\n \"| **security-reviewer** | Phases with auth, uploads, API routes, user input | `arcbridge_activate_role({ role: \\\"security-reviewer\\\" })` then `arcbridge_run_role_check` |\",\n \"| **quality-guardian** | Every 2nd phase, or when quality scenarios are linked | `arcbridge_activate_role({ role: \\\"quality-guardian\\\" })` then `arcbridge_get_practice_review` |\",\n \"| **architect** | When drift is detected or architecture evolved significantly | `arcbridge_activate_role({ role: \\\"architect\\\" })` then `arcbridge_check_drift` |\",\n \"\",\n \"Then run the standard checks:\",\n \"\",\n \"1. **Drift check:** `arcbridge_check_drift` — catch undeclared dependencies and missing modules\",\n \"2. **Verify scenarios:** `arcbridge_verify_scenarios` — run linked tests for quality scenarios\",\n \"\",\n \"### Completing a Phase\",\n \"\",\n \"Activate the **phase-manager** role: `arcbridge_activate_role({ role: \\\"phase-manager\\\" })`\",\n \"\",\n \"Then: `arcbridge_complete_phase` — validates three gates: all tasks done, no critical drift, must-have quality scenarios not failing.\",\n \"\",\n ];\n\n // Add React/Next.js section only for relevant project types\n if (config.project_type === \"nextjs-app-router\" || config.project_type === \"react-vite\") {\n lines.push(\n \"## React & Next.js Analysis\",\n \"\",\n \"- `arcbridge_get_component_graph` — view component hierarchy, props, state, and context usage\",\n \"- `arcbridge_get_route_map` — view Next.js route tree (pages, layouts, API routes)\",\n \"- `arcbridge_get_boundary_analysis` — analyze server/client boundaries and detect violations\",\n \"\",\n );\n }\n\n lines.push(\n \"## Agent Roles\",\n \"\",\n \"Activate roles with `arcbridge_activate_role` to get specialized context and tool guidance:\",\n \"\",\n \"| Role | When to Use |\",\n \"|------|-------------|\",\n \"| `architect` | Defining building blocks, reviewing dependencies, creating ADRs |\",\n \"| `implementer` | Writing code within the established architecture |\",\n \"| `security-reviewer` | Auditing auth, input validation, client/server boundaries |\",\n \"| `quality-guardian` | Reviewing test coverage, quality scenarios, quality gates |\",\n \"| `phase-manager` | Completing phases, managing task transitions |\",\n \"| `code-reviewer` | Reviewing code for correctness, patterns, edge cases |\",\n \"| `onboarding` | Understanding the project (for new developers) |\",\n \"\",\n \"Roles are defined in `.arcbridge/agents/` and `.claude/agents/`.\",\n \"\",\n );\n\n return lines.join(\"\\n\");\n}\n\nfunction generateAgentFile(role: AgentRole): string {\n const lines: string[] = [\n `# ${role.name}`,\n \"\",\n role.description,\n \"\",\n \"## Tools\",\n \"\",\n ...role.required_tools.map((t) => `- ${t}`),\n \"\",\n ];\n\n if (role.denied_tools.length > 0) {\n lines.push(\"## Denied Tools\", \"\", ...role.denied_tools.map((t) => `- ${t}`), \"\");\n }\n\n if (role.read_only) {\n lines.push(\"## Access\", \"\", \"This role is **read-only**.\", \"\");\n }\n\n if (role.quality_focus.length > 0) {\n lines.push(\n \"## Quality Focus\",\n \"\",\n ...role.quality_focus.map((q) => `- ${q}`),\n \"\",\n );\n }\n\n lines.push(\"## Instructions\", \"\", role.system_prompt, \"\");\n\n return lines.join(\"\\n\");\n}\n\nexport class ClaudeAdapter implements PlatformAdapter {\n platform = \"claude\";\n\n generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void {\n const arcbridgeContent = generateClaudeMd(config);\n const claudeMdPath = join(targetDir, \"CLAUDE.md\");\n const marker = \"<!-- arcbridge-generated -->\";\n\n if (existsSync(claudeMdPath)) {\n const existing = readFileSync(claudeMdPath, \"utf-8\");\n\n // Detect where ArcBridge content starts: marker from current version,\n // or the generated heading from older versions (before marker was added)\n const markerIndex = existing.indexOf(marker);\n const legacyIndex = existing.indexOf(\"## ArcBridge Workflow\");\n const splitIndex = markerIndex >= 0 ? markerIndex : legacyIndex;\n\n if (splitIndex >= 0) {\n // Replace everything from the ArcBridge section onwards\n const userContent = existing.slice(0, splitIndex).trimEnd();\n writeFileSync(claudeMdPath, `${userContent}\\n\\n${marker}\\n\\n${arcbridgeContent}`, \"utf-8\");\n } else {\n // No existing ArcBridge content — append\n writeFileSync(claudeMdPath, `${existing.trimEnd()}\\n\\n${marker}\\n\\n${arcbridgeContent}`, \"utf-8\");\n }\n } else {\n writeFileSync(claudeMdPath, `${marker}\\n\\n${arcbridgeContent}`, \"utf-8\");\n }\n\n // Generate .mcp.json if it doesn't already exist\n const mcpJsonPath = join(targetDir, \".mcp.json\");\n if (!existsSync(mcpJsonPath)) {\n const mcpConfig = {\n mcpServers: {\n arcbridge: {\n command: \"npx\",\n args: [\"@arcbridge/mcp-server\"],\n },\n },\n };\n writeFileSync(mcpJsonPath, JSON.stringify(mcpConfig, null, 2) + \"\\n\", \"utf-8\");\n } else {\n // If .mcp.json exists, add arcbridge server if not already present\n try {\n const existing = JSON.parse(readFileSync(mcpJsonPath, \"utf-8\")) as {\n mcpServers?: Record<string, unknown>;\n };\n if (!existing.mcpServers?.arcbridge) {\n existing.mcpServers = existing.mcpServers ?? {};\n existing.mcpServers.arcbridge = {\n command: \"npx\",\n args: [\"@arcbridge/mcp-server\"],\n };\n writeFileSync(mcpJsonPath, JSON.stringify(existing, null, 2) + \"\\n\", \"utf-8\");\n }\n } catch {\n // If we can't parse existing .mcp.json, leave it alone\n }\n }\n }\n\n generateAgentConfigs(targetDir: string, roles: AgentRole[]): void {\n const agentsDir = join(targetDir, \".claude\", \"agents\");\n mkdirSync(agentsDir, { recursive: true });\n\n for (const role of roles) {\n const content = generateAgentFile(role);\n writeFileSync(join(agentsDir, `${role.role_id}.md`), content, \"utf-8\");\n }\n }\n}\n","import { mkdirSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { AgentRole, ArcBridgeConfig } from \"@arcbridge/core\";\nimport type { PlatformAdapter } from \"../types.js\";\n\nfunction generateCopilotInstructions(config: ArcBridgeConfig): string {\n const lines: string[] = [\n `# ${config.project_name} - Copilot Instructions`,\n \"\",\n `> Auto-generated by ArcBridge. Edit .arcbridge/ files to update.`,\n \"\",\n \"## Project Context\",\n \"\",\n `This is a ${config.project_type} project.`,\n \"\",\n `**Quality Priorities:** ${config.quality_priorities.join(\", \")}`,\n \"\",\n \"## Architecture\",\n \"\",\n \"Architecture documentation is in `.arcbridge/arc42/`.\",\n \"Quality scenarios are in `.arcbridge/arc42/10-quality-scenarios.yaml`.\",\n \"Phase plan is in `.arcbridge/plan/`.\",\n \"\",\n \"## Code Intelligence\",\n \"\",\n \"Use ArcBridge MCP tools to explore the codebase:\",\n \"- `arcbridge_search_symbols` — Search for functions, classes, types\",\n \"- `arcbridge_get_symbol` — Get full details on a symbol\",\n \"- `arcbridge_get_dependency_graph` — Analyze module dependencies\",\n \"- `arcbridge_reindex` — Re-index after code changes\",\n \"\",\n \"## React & Next.js Analysis\",\n \"\",\n \"- `arcbridge_get_component_graph` — View component hierarchy, props, state, and context\",\n \"- `arcbridge_get_route_map` — View Next.js route tree (pages, layouts, API routes)\",\n \"- `arcbridge_get_boundary_analysis` — Analyze server/client boundaries\",\n \"\",\n \"## Architecture Bridge\",\n \"\",\n \"- `arcbridge_check_drift` — Detect architecture drift and boundary violations\",\n \"- `arcbridge_get_guidance` — Get context-aware guidance for code changes\",\n \"- `arcbridge_get_open_questions` — Surface architectural gaps\",\n \"- `arcbridge_propose_arc42_update` — Generate arc42 update proposals from code changes\",\n \"- `arcbridge_get_practice_review` — Review recent changes across 5 practice dimensions\",\n \"\",\n \"## Conventions\",\n \"\",\n \"- Follow existing patterns in the codebase\",\n \"- Stay within building block boundaries\",\n \"- Write tests for new functionality\",\n \"- Check quality scenarios before submitting changes\",\n \"\",\n ];\n\n return lines.join(\"\\n\");\n}\n\nfunction generateAgentFile(role: AgentRole): string {\n const lines: string[] = [\n `# ${role.name}`,\n \"\",\n role.description,\n \"\",\n ];\n\n if (role.read_only) {\n lines.push(\"**Access:** Read-only\", \"\");\n }\n\n if (role.quality_focus.length > 0) {\n lines.push(\n \"## Quality Focus\",\n \"\",\n ...role.quality_focus.map((q) => `- ${q}`),\n \"\",\n );\n }\n\n lines.push(\"## Instructions\", \"\", role.system_prompt, \"\");\n\n return lines.join(\"\\n\");\n}\n\nexport class CopilotAdapter implements PlatformAdapter {\n platform = \"copilot\";\n\n generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void {\n const githubDir = join(targetDir, \".github\");\n mkdirSync(githubDir, { recursive: true });\n\n const content = generateCopilotInstructions(config);\n writeFileSync(\n join(githubDir, \"copilot-instructions.md\"),\n content,\n \"utf-8\",\n );\n }\n\n generateAgentConfigs(targetDir: string, roles: AgentRole[]): void {\n const agentsDir = join(targetDir, \".github\", \"agents\");\n mkdirSync(agentsDir, { recursive: true });\n\n for (const role of roles) {\n const content = generateAgentFile(role);\n writeFileSync(join(agentsDir, `${role.role_id}.md`), content, \"utf-8\");\n }\n }\n}\n","export type { PlatformAdapter } from \"./types.js\";\nexport { ClaudeAdapter } from \"./claude/claude-adapter.js\";\nexport { CopilotAdapter } from \"./copilot/copilot-adapter.js\";\n\nimport type { PlatformAdapter } from \"./types.js\";\nimport { ClaudeAdapter } from \"./claude/claude-adapter.js\";\nimport { CopilotAdapter } from \"./copilot/copilot-adapter.js\";\n\nconst adapters: Record<string, () => PlatformAdapter> = {\n claude: () => new ClaudeAdapter(),\n copilot: () => new CopilotAdapter(),\n};\n\nexport function getAdapter(platform: string): PlatformAdapter {\n const factory = adapters[platform];\n if (!factory) {\n throw new Error(\n `Unknown platform: ${platform}. Available: ${Object.keys(adapters).join(\", \")}`,\n );\n }\n return factory();\n}\n"],"mappings":";AAAA,SAAS,WAAW,eAAe,YAAY,oBAAoB;AACnE,SAAS,YAAY;AAIrB,SAAS,iBAAiB,QAAiC;AACzD,QAAM,QAAkB;AAAA,IACtB,KAAK,OAAO,YAAY;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe,OAAO,YAAY;AAAA,IAClC,6BAA6B,OAAO,mBAAmB,KAAK,IAAI,CAAC;AAAA,IACjE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAC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AAE,WAAW,KAAK,CAAC;AAExC,eAAW,QAAQ,OAAO;AACxB,YAAM,UAAUG,mBAAkB,IAAI;AACtC,MAAAF,eAAcC,MAAK,WAAW,GAAG,KAAK,OAAO,KAAK,GAAG,SAAS,OAAO;AAAA,IACvE;AAAA,EACF;AACF;;;ACnGA,IAAM,WAAkD;AAAA,EACtD,QAAQ,MAAM,IAAI,cAAc;AAAA,EAChC,SAAS,MAAM,IAAI,eAAe;AACpC;AAEO,SAAS,WAAW,UAAmC;AAC5D,QAAM,UAAU,SAAS,QAAQ;AACjC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR,qBAAqB,QAAQ,gBAAgB,OAAO,KAAK,QAAQ,EAAE,KAAK,IAAI,CAAC;AAAA,IAC/E;AAAA,EACF;AACA,SAAO,QAAQ;AACjB;","names":["mkdirSync","writeFileSync","join","generateAgentFile"]}
1
+ {"version":3,"sources":["../src/claude/claude-adapter.ts","../src/copilot/copilot-adapter.ts","../src/codex/codex-adapter.ts","../src/index.ts"],"sourcesContent":["import { mkdirSync, writeFileSync, existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { AgentRole, ArcBridgeConfig } from \"@arcbridge/core\";\nimport type { PlatformAdapter } from \"../types.js\";\n\nfunction generateClaudeMd(config: ArcBridgeConfig): string {\n const lines: string[] = [\n `# ${config.project_name}`,\n \"\",\n `> Auto-generated by ArcBridge. Edit .arcbridge/ files to update.`,\n \"\",\n \"## Project Overview\",\n \"\",\n `- **Type:** ${config.project_type}`,\n `- **Quality Priorities:** ${config.quality_priorities.join(\", \")}`,\n \"\",\n \"## How to Work in This Project\",\n \"\",\n \"This project follows the **Plan → Build → Sync → Review** convention using ArcBridge.\",\n \"ArcBridge provides MCP tools that give you architectural awareness. **Use them throughout your work.**\",\n \"\",\n \"### Before Starting Any Work\",\n \"\",\n \"1. Check project status: `arcbridge_get_project_status`\",\n \"2. Review current tasks: `arcbridge_get_current_tasks`\",\n \"3. Activate the appropriate role (see below): `arcbridge_activate_role`\",\n \"\",\n \"### When Planning or Refining Architecture\",\n \"\",\n \"Activate the **architect** role: `arcbridge_activate_role({ role: \\\"architect\\\" })`\",\n \"\",\n \"Then use:\",\n \"- `arcbridge_get_building_blocks` — view current architecture decomposition\",\n \"- `arcbridge_get_quality_scenarios` — view quality requirements\",\n \"- `arcbridge_get_open_questions` — find architectural gaps to resolve\",\n \"- `arcbridge_propose_arc42_update` — propose doc updates from recent code changes\",\n \"\",\n \"### When Implementing Features\",\n \"\",\n \"Activate the **implementer** role: `arcbridge_activate_role({ role: \\\"implementer\\\" })`\",\n \"\",\n \"Then use:\",\n \"- `arcbridge_get_guidance` — get context-aware guidance for the file/block you're working on\",\n \"- `arcbridge_get_current_tasks` — check what tasks are expected in the current phase\",\n \"- `arcbridge_search_symbols` / `arcbridge_get_symbol` — understand existing code\",\n \"- `arcbridge_get_dependency_graph` — check module dependencies before adding new ones\",\n \"- `arcbridge_update_task` — mark tasks as in-progress or done as you complete them\",\n \"- `arcbridge_reindex` — re-index after significant code changes\",\n \"\",\n \"### After Implementing (Phase Boundary Review)\",\n \"\",\n \"Before completing a phase, consult the review roles. Not every role is needed every phase — use this guide:\",\n \"\",\n \"| Role | When to consult | How |\",\n \"|------|----------------|-----|\",\n \"| **code-reviewer** | Every phase | `arcbridge_activate_role({ role: \\\"code-reviewer\\\" })` then `arcbridge_get_practice_review` |\",\n \"| **security-reviewer** | Phases with auth, uploads, API routes, user input | `arcbridge_activate_role({ role: \\\"security-reviewer\\\" })` then `arcbridge_run_role_check` |\",\n \"| **quality-guardian** | Every 2nd phase, or when quality scenarios are linked | `arcbridge_activate_role({ role: \\\"quality-guardian\\\" })` then `arcbridge_get_practice_review` |\",\n \"| **architect** | When drift is detected or architecture evolved significantly | `arcbridge_activate_role({ role: \\\"architect\\\" })` then `arcbridge_check_drift` |\",\n \"\",\n \"Then run the standard checks:\",\n \"\",\n \"1. **Drift check:** `arcbridge_check_drift` — catch undeclared dependencies and missing modules\",\n \"2. **Verify scenarios:** `arcbridge_verify_scenarios` — run linked tests for quality scenarios\",\n \"\",\n \"### Completing a Phase\",\n \"\",\n \"Activate the **phase-manager** role: `arcbridge_activate_role({ role: \\\"phase-manager\\\" })`\",\n \"\",\n \"Then: `arcbridge_complete_phase` — validates three gates: all tasks done, no critical drift, must-have quality scenarios not failing.\",\n \"\",\n ];\n\n // Add React/Next.js section only for relevant project types\n if (config.project_type === \"nextjs-app-router\" || config.project_type === \"react-vite\") {\n lines.push(\n \"## React & Next.js Analysis\",\n \"\",\n \"- `arcbridge_get_component_graph` — view component hierarchy, props, state, and context usage\",\n \"- `arcbridge_get_route_map` — view Next.js route tree (pages, layouts, API routes)\",\n \"- `arcbridge_get_boundary_analysis` — analyze server/client boundaries and detect violations\",\n \"\",\n );\n }\n\n lines.push(\n \"## Agent Roles\",\n \"\",\n \"Activate roles with `arcbridge_activate_role` to get specialized context and tool guidance:\",\n \"\",\n \"| Role | When to Use |\",\n \"|------|-------------|\",\n \"| `architect` | Defining building blocks, reviewing dependencies, creating ADRs |\",\n \"| `implementer` | Writing code within the established architecture |\",\n \"| `security-reviewer` | Auditing auth, input validation, client/server boundaries |\",\n \"| `quality-guardian` | Reviewing test coverage, quality scenarios, quality gates |\",\n \"| `phase-manager` | Completing phases, managing task transitions |\",\n \"| `code-reviewer` | Reviewing code for correctness, patterns, edge cases |\",\n \"| `onboarding` | Understanding the project (for new developers) |\",\n \"\",\n \"Roles are defined in `.arcbridge/agents/` and `.claude/agents/`.\",\n \"\",\n );\n\n return lines.join(\"\\n\");\n}\n\nfunction generateAgentFile(role: AgentRole): string {\n const lines: string[] = [\n `# ${role.name}`,\n \"\",\n role.description,\n \"\",\n \"## Tools\",\n \"\",\n ...role.required_tools.map((t) => `- ${t}`),\n \"\",\n ];\n\n if (role.denied_tools.length > 0) {\n lines.push(\"## Denied Tools\", \"\", ...role.denied_tools.map((t) => `- ${t}`), \"\");\n }\n\n if (role.read_only) {\n lines.push(\"## Access\", \"\", \"This role is **read-only**.\", \"\");\n }\n\n if (role.quality_focus.length > 0) {\n lines.push(\n \"## Quality Focus\",\n \"\",\n ...role.quality_focus.map((q) => `- ${q}`),\n \"\",\n );\n }\n\n lines.push(\"## Instructions\", \"\", role.system_prompt, \"\");\n\n return lines.join(\"\\n\");\n}\n\nexport class ClaudeAdapter implements PlatformAdapter {\n platform = \"claude\";\n\n generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void {\n const arcbridgeContent = generateClaudeMd(config);\n const claudeMdPath = join(targetDir, \"CLAUDE.md\");\n const marker = \"<!-- arcbridge-generated -->\";\n\n if (existsSync(claudeMdPath)) {\n const existing = readFileSync(claudeMdPath, \"utf-8\");\n\n // Detect where ArcBridge content starts: marker from current version,\n // or the generated heading from older versions (before marker was added)\n const markerIndex = existing.indexOf(marker);\n const legacyIndex = existing.indexOf(\"## ArcBridge Workflow\");\n const splitIndex = markerIndex >= 0 ? markerIndex : legacyIndex;\n\n if (splitIndex >= 0) {\n // Replace everything from the ArcBridge section onwards\n const userContent = existing.slice(0, splitIndex).trimEnd();\n writeFileSync(claudeMdPath, `${userContent}\\n\\n${marker}\\n\\n${arcbridgeContent}`, \"utf-8\");\n } else {\n // No existing ArcBridge content — append\n writeFileSync(claudeMdPath, `${existing.trimEnd()}\\n\\n${marker}\\n\\n${arcbridgeContent}`, \"utf-8\");\n }\n } else {\n writeFileSync(claudeMdPath, `${marker}\\n\\n${arcbridgeContent}`, \"utf-8\");\n }\n\n // Generate .mcp.json if it doesn't already exist\n const mcpJsonPath = join(targetDir, \".mcp.json\");\n if (!existsSync(mcpJsonPath)) {\n const mcpConfig = {\n mcpServers: {\n arcbridge: {\n command: \"npx\",\n args: [\"@arcbridge/mcp-server\"],\n },\n },\n };\n writeFileSync(mcpJsonPath, JSON.stringify(mcpConfig, null, 2) + \"\\n\", \"utf-8\");\n } else {\n // If .mcp.json exists, add arcbridge server if not already present\n try {\n const existing = JSON.parse(readFileSync(mcpJsonPath, \"utf-8\")) as {\n mcpServers?: Record<string, unknown>;\n };\n if (!existing.mcpServers?.arcbridge) {\n existing.mcpServers = existing.mcpServers ?? {};\n existing.mcpServers.arcbridge = {\n command: \"npx\",\n args: [\"@arcbridge/mcp-server\"],\n };\n writeFileSync(mcpJsonPath, JSON.stringify(existing, null, 2) + \"\\n\", \"utf-8\");\n }\n } catch {\n // If we can't parse existing .mcp.json, leave it alone\n }\n }\n }\n\n generateAgentConfigs(targetDir: string, roles: AgentRole[]): void {\n const agentsDir = join(targetDir, \".claude\", \"agents\");\n mkdirSync(agentsDir, { recursive: true });\n\n for (const role of roles) {\n const content = generateAgentFile(role);\n writeFileSync(join(agentsDir, `${role.role_id}.md`), content, \"utf-8\");\n }\n }\n}\n","import { mkdirSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { AgentRole, ArcBridgeConfig } from \"@arcbridge/core\";\nimport type { PlatformAdapter } from \"../types.js\";\n\nfunction generateCopilotInstructions(config: ArcBridgeConfig): string {\n const lines: string[] = [\n `# ${config.project_name} - Copilot Instructions`,\n \"\",\n `> Auto-generated by ArcBridge. Edit .arcbridge/ files to update.`,\n \"\",\n \"## Project Context\",\n \"\",\n `This is a ${config.project_type} project.`,\n \"\",\n `**Quality Priorities:** ${config.quality_priorities.join(\", \")}`,\n \"\",\n \"## Architecture\",\n \"\",\n \"Architecture documentation is in `.arcbridge/arc42/`.\",\n \"Quality scenarios are in `.arcbridge/arc42/10-quality-scenarios.yaml`.\",\n \"Phase plan is in `.arcbridge/plan/`.\",\n \"\",\n \"## Code Intelligence\",\n \"\",\n \"Use ArcBridge MCP tools to explore the codebase:\",\n \"- `arcbridge_search_symbols` — Search for functions, classes, types\",\n \"- `arcbridge_get_symbol` — Get full details on a symbol\",\n \"- `arcbridge_get_dependency_graph` — Analyze module dependencies\",\n \"- `arcbridge_reindex` — Re-index after code changes\",\n \"\",\n \"## React & Next.js Analysis\",\n \"\",\n \"- `arcbridge_get_component_graph` — View component hierarchy, props, state, and context\",\n \"- `arcbridge_get_route_map` — View Next.js route tree (pages, layouts, API routes)\",\n \"- `arcbridge_get_boundary_analysis` — Analyze server/client boundaries\",\n \"\",\n \"## Architecture Bridge\",\n \"\",\n \"- `arcbridge_check_drift` — Detect architecture drift and boundary violations\",\n \"- `arcbridge_get_guidance` — Get context-aware guidance for code changes\",\n \"- `arcbridge_get_open_questions` — Surface architectural gaps\",\n \"- `arcbridge_propose_arc42_update` — Generate arc42 update proposals from code changes\",\n \"- `arcbridge_get_practice_review` — Review recent changes across 5 practice dimensions\",\n \"\",\n \"## Conventions\",\n \"\",\n \"- Follow existing patterns in the codebase\",\n \"- Stay within building block boundaries\",\n \"- Write tests for new functionality\",\n \"- Check quality scenarios before submitting changes\",\n \"\",\n ];\n\n return lines.join(\"\\n\");\n}\n\nfunction generateAgentFile(role: AgentRole): string {\n const lines: string[] = [\n `# ${role.name}`,\n \"\",\n role.description,\n \"\",\n ];\n\n if (role.read_only) {\n lines.push(\"**Access:** Read-only\", \"\");\n }\n\n if (role.quality_focus.length > 0) {\n lines.push(\n \"## Quality Focus\",\n \"\",\n ...role.quality_focus.map((q) => `- ${q}`),\n \"\",\n );\n }\n\n lines.push(\"## Instructions\", \"\", role.system_prompt, \"\");\n\n return lines.join(\"\\n\");\n}\n\nexport class CopilotAdapter implements PlatformAdapter {\n platform = \"copilot\";\n\n generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void {\n const githubDir = join(targetDir, \".github\");\n mkdirSync(githubDir, { recursive: true });\n\n const content = generateCopilotInstructions(config);\n writeFileSync(\n join(githubDir, \"copilot-instructions.md\"),\n content,\n \"utf-8\",\n );\n }\n\n generateAgentConfigs(targetDir: string, roles: AgentRole[]): void {\n const agentsDir = join(targetDir, \".github\", \"agents\");\n mkdirSync(agentsDir, { recursive: true });\n\n for (const role of roles) {\n const content = generateAgentFile(role);\n writeFileSync(join(agentsDir, `${role.role_id}.md`), content, \"utf-8\");\n }\n }\n}\n","import { mkdirSync, writeFileSync, existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { AgentRole, ArcBridgeConfig } from \"@arcbridge/core\";\nimport type { PlatformAdapter } from \"../types.js\";\n\nfunction generateAgentsMd(config: ArcBridgeConfig): string {\n const lines: string[] = [\n `# ${config.project_name}`,\n \"\",\n `> Auto-generated by ArcBridge. Edit .arcbridge/ files to update.`,\n \"\",\n \"## Codex MCP Setup\",\n \"\",\n \"Add this to your `~/.codex/config.toml` (one-time setup):\",\n \"\",\n \"```toml\",\n \"[mcp_servers.arcbridge]\",\n 'command = \"npx\"',\n 'args = [\"-y\", \"@arcbridge/mcp-server\"]',\n \"```\",\n \"\",\n \"## Project Overview\",\n \"\",\n `- **Type:** ${config.project_type}`,\n `- **Quality Priorities:** ${config.quality_priorities.join(\", \")}`,\n \"\",\n \"## How to Work in This Project\",\n \"\",\n \"This project follows the **Plan → Build → Sync → Review** convention using ArcBridge.\",\n \"ArcBridge provides MCP tools that give you architectural awareness. **Use them throughout your work.**\",\n \"\",\n \"### Before Starting Any Work\",\n \"\",\n \"1. Check project status: `arcbridge_get_project_status`\",\n \"2. Review current tasks: `arcbridge_get_current_tasks`\",\n \"3. Activate the appropriate role: `arcbridge_activate_role`\",\n \"\",\n \"### When Planning or Refining Architecture\",\n \"\",\n \"Activate the **architect** role: `arcbridge_activate_role({ role: \\\"architect\\\" })`\",\n \"\",\n \"- `arcbridge_get_building_blocks` — view architecture decomposition\",\n \"- `arcbridge_get_quality_scenarios` — view quality requirements\",\n \"- `arcbridge_get_open_questions` — find architectural gaps\",\n \"- `arcbridge_propose_arc42_update` — propose doc updates from code changes\",\n \"\",\n \"### When Implementing Features\",\n \"\",\n \"Activate the **implementer** role: `arcbridge_activate_role({ role: \\\"implementer\\\" })`\",\n \"\",\n \"- `arcbridge_get_guidance` — context-aware guidance for the file/block you're working on\",\n \"- `arcbridge_get_current_tasks` — check expected tasks in the current phase\",\n \"- `arcbridge_search_symbols` / `arcbridge_get_symbol` — understand existing code\",\n \"- `arcbridge_get_dependency_graph` — check module dependencies\",\n \"- `arcbridge_update_task` — mark tasks as in-progress or done\",\n \"- `arcbridge_reindex` — re-index after significant code changes\",\n \"\",\n \"### After Implementing (Phase Boundary Review)\",\n \"\",\n \"Before completing a phase:\",\n \"\",\n \"1. **Drift check:** `arcbridge_check_drift` — catch undeclared dependencies\",\n \"2. **Verify scenarios:** `arcbridge_verify_scenarios` — run linked quality tests\",\n \"3. **Practice review:** `arcbridge_get_practice_review` — review across 5 dimensions\",\n \"\",\n \"### Completing a Phase\",\n \"\",\n \"Activate the **phase-manager** role, then: `arcbridge_complete_phase`\",\n \"— validates three gates: all tasks done, no critical drift, must-have quality scenarios (priority = \\\"must\\\") not failing.\",\n \"\",\n ];\n\n // Add React/Next.js section only for relevant project types\n if (config.project_type === \"nextjs-app-router\" || config.project_type === \"react-vite\") {\n lines.push(\n \"## React & Next.js Analysis\",\n \"\",\n \"- `arcbridge_get_component_graph` — component hierarchy, props, state, context\",\n \"- `arcbridge_get_route_map` — Next.js route tree (pages, layouts, API routes)\",\n \"- `arcbridge_get_boundary_analysis` — server/client boundary analysis\",\n \"\",\n );\n }\n\n lines.push(\n \"## Agent Roles\",\n \"\",\n \"Activate roles with `arcbridge_activate_role` to get specialized context.\",\n \"Roles are defined in `.arcbridge/agents/`.\",\n \"\",\n \"*Role table is appended below after agent configs are generated.*\",\n \"\",\n );\n\n return lines.join(\"\\n\");\n}\n\nfunction generateSyncSkill(): string {\n return `---\nname: arcbridge-sync\ndescription: Run the ArcBridge sync loop — reindex code, detect architecture drift, and update task statuses. Use after significant code changes or before completing a phase.\n---\n\n# ArcBridge Sync\n\nRun the full sync loop to keep architecture docs and task statuses in sync with code changes.\n\n## Steps\n\n1. **Reindex** — \\`arcbridge_reindex\\` to update the symbol index with recent code changes\n2. **Check drift** — \\`arcbridge_check_drift\\` to detect undeclared dependencies and missing modules\n3. **Review tasks** — \\`arcbridge_get_current_tasks\\` to see if any tasks can be inferred as done\n4. **Propose updates** — \\`arcbridge_propose_arc42_update\\` to generate documentation update proposals\n\n## When to Use\n\n- After completing a significant feature or refactoring\n- Before running \\`arcbridge_complete_phase\\`\n- When you suspect architecture docs are out of date\n- Periodically during active development\n`;\n}\n\nfunction generateReviewSkill(): string {\n return `---\nname: arcbridge-review\ndescription: Run ArcBridge phase boundary reviews — drift check, quality scenario verification, and practice review across 5 dimensions. Use before completing a phase.\n---\n\n# ArcBridge Phase Review\n\nRun the full review suite before completing a phase gate.\n\n## Steps\n\n1. **Drift check** — \\`arcbridge_check_drift\\` to catch undeclared dependencies and boundary violations\n2. **Verify scenarios** — \\`arcbridge_verify_scenarios\\` to run linked tests for quality scenarios\n3. **Practice review** — \\`arcbridge_get_practice_review\\` to review changes across architecture, security, testing, docs, and complexity\n4. **Role checks** — optionally run \\`arcbridge_run_role_check\\` with specific roles (security-reviewer, quality-guardian)\n5. **Complete phase** — if all checks pass, run \\`arcbridge_complete_phase\\` to validate gates and transition\n\n## Review Roles\n\n| Role | When to consult |\n|------|----------------|\n| **code-reviewer** | Every phase |\n| **security-reviewer** | Phases with auth, uploads, API routes, user input |\n| **quality-guardian** | Every 2nd phase, or when quality scenarios are linked |\n| **architect** | When drift is detected or architecture evolved significantly |\n`;\n}\n\nexport class CodexAdapter implements PlatformAdapter {\n platform = \"codex\";\n\n generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void {\n const agentsMdContent = generateAgentsMd(config);\n const agentsMdPath = join(targetDir, \"AGENTS.md\");\n const marker = \"<!-- arcbridge-generated -->\";\n\n if (existsSync(agentsMdPath)) {\n const existing = readFileSync(agentsMdPath, \"utf-8\");\n const markerIndex = existing.indexOf(marker);\n\n if (markerIndex >= 0) {\n // Replace everything from the marker onwards\n const userContent = existing.slice(0, markerIndex).trimEnd();\n const prefix = userContent ? `${userContent}\\n\\n` : \"\";\n writeFileSync(agentsMdPath, `${prefix}${marker}\\n\\n${agentsMdContent}`, \"utf-8\");\n } else {\n // No existing ArcBridge content — append\n const existingTrimmed = existing.trimEnd();\n const prefix = existingTrimmed ? `${existingTrimmed}\\n\\n` : \"\";\n writeFileSync(agentsMdPath, `${prefix}${marker}\\n\\n${agentsMdContent}`, \"utf-8\");\n }\n } else {\n writeFileSync(agentsMdPath, `${marker}\\n\\n${agentsMdContent}`, \"utf-8\");\n }\n }\n\n generateAgentConfigs(targetDir: string, roles: AgentRole[]): void {\n // Append dynamic role table to AGENTS.md (replaces placeholder)\n const agentsMdPath = join(targetDir, \"AGENTS.md\");\n if (existsSync(agentsMdPath)) {\n let content = readFileSync(agentsMdPath, \"utf-8\");\n const roleTable = [\n \"| Role | Description |\",\n \"|------|-------------|\",\n ...roles.map((r) => `| \\`${r.role_id}\\` | ${r.description} |`),\n \"\",\n ].join(\"\\n\");\n\n const placeholder = \"*Role table is appended below after agent configs are generated.*\";\n if (content.includes(placeholder)) {\n content = content.replace(placeholder, roleTable);\n } else {\n // Fallback: append role table at the end if placeholder was removed\n content = `${content.trimEnd()}\\n\\n## Agent Roles\\n\\n${roleTable}\\n`;\n }\n writeFileSync(agentsMdPath, content, \"utf-8\");\n }\n\n // Generate skills (reusable workflows) instead of per-role agent files,\n // since Codex agent definitions live in the global ~/.codex/config.toml\n const skillsDir = join(targetDir, \".agents\", \"skills\");\n\n const syncDir = join(skillsDir, \"arcbridge-sync\");\n mkdirSync(syncDir, { recursive: true });\n writeFileSync(join(syncDir, \"SKILL.md\"), generateSyncSkill(), \"utf-8\");\n\n const reviewDir = join(skillsDir, \"arcbridge-review\");\n mkdirSync(reviewDir, { recursive: true });\n writeFileSync(join(reviewDir, \"SKILL.md\"), generateReviewSkill(), \"utf-8\");\n }\n}\n","export type { PlatformAdapter } from \"./types.js\";\nexport { ClaudeAdapter } from \"./claude/claude-adapter.js\";\nexport { CopilotAdapter } from \"./copilot/copilot-adapter.js\";\nexport { CodexAdapter } from \"./codex/codex-adapter.js\";\n\nimport type { PlatformAdapter } from \"./types.js\";\nimport { ClaudeAdapter } from \"./claude/claude-adapter.js\";\nimport { CopilotAdapter } from \"./copilot/copilot-adapter.js\";\nimport { CodexAdapter } from \"./codex/codex-adapter.js\";\n\nconst adapters: Record<string, () => PlatformAdapter> = {\n claude: () => new ClaudeAdapter(),\n copilot: () => new CopilotAdapter(),\n codex: () => new CodexAdapter(),\n};\n\nexport function getAdapter(platform: string): PlatformAdapter {\n const factory = adapters[platform];\n if (!factory) {\n throw new Error(\n `Unknown platform: ${platform}. Available: ${Object.keys(adapters).join(\", \")}`,\n );\n }\n return factory();\n}\n"],"mappings":";AAAA,SAAS,WAAW,eAAe,YAAY,oBAAoB;AACnE,SAAS,YAAY;AAIrB,SAAS,iBAAiB,QAAiC;AACzD,QAAM,QAAkB;AAAA,IACtB,KAAK,OAAO,YAAY;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe,OAAO,YAAY;AAAA,IAClC,6BAA6B,OAAO,mBAAmB,KAAK,IAAI,CAAC;AAAA,IACjE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAGA,MAAI,OAAO,iBAAiB,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A;AAAA;AAAA;AAAA,EAAyB,SAAS;AAAA;AAAA,MAClE;AACA,MAAAF,eAAc,cAAc,SAAS,OAAO;AAAA,IAC9C;AAIA,UAAM,YAAYG,MAAK,WAAW,WAAW,QAAQ;AAErD,UAAM,UAAUA,MAAK,WAAW,gBAAgB;AAChD,IAAAJ,WAAU,SAAS,EAAE,WAAW,KAAK,CAAC;AACtC,IAAAC,eAAcG,MAAK,SAAS,UAAU,GAAG,kBAAkB,GAAG,OAAO;AAErE,UAAM,YAAYA,MAAK,WAAW,kBAAkB;AACpD,IAAAJ,WAAU,WAAW,EAAE,WAAW,KAAK,CAAC;AACxC,IAAAC,eAAcG,MAAK,WAAW,UAAU,GAAG,oBAAoB,GAAG,OAAO;AAAA,EAC3E;AACF;;;AC5MA,IAAM,WAAkD;AAAA,EACtD,QAAQ,MAAM,IAAI,cAAc;AAAA,EAChC,SAAS,MAAM,IAAI,eAAe;AAAA,EAClC,OAAO,MAAM,IAAI,aAAa;AAChC;AAEO,SAAS,WAAW,UAAmC;AAC5D,QAAM,UAAU,SAAS,QAAQ;AACjC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI;AAAA,MACR,qBAAqB,QAAQ,gBAAgB,OAAO,KAAK,QAAQ,EAAE,KAAK,IAAI,CAAC;AAAA,IAC/E;AAAA,EACF;AACA,SAAO,QAAQ;AACjB;","names":["mkdirSync","writeFileSync","join","generateAgentFile","mkdirSync","writeFileSync","existsSync","readFileSync","join"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcbridge/adapters",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Platform adapters for ArcBridge — Claude Code and GitHub Copilot config generators",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@arcbridge/core": "0.2.1"
35
+ "@arcbridge/core": "0.3.0"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=22.16.0"