@arcbridge/adapters 0.3.1 → 0.3.2

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
@@ -1,9 +1,13 @@
1
1
  import { ArcBridgeConfig, AgentRole } from '@arcbridge/core';
2
2
 
3
+ interface AdapterOptions {
4
+ /** Force-regenerate files that would normally be preserved */
5
+ force?: boolean;
6
+ }
3
7
  interface PlatformAdapter {
4
8
  platform: string;
5
- generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void;
6
- generateAgentConfigs(targetDir: string, roles: AgentRole[]): void;
9
+ generateProjectConfig(targetDir: string, config: ArcBridgeConfig, options?: AdapterOptions): void;
10
+ generateAgentConfigs(targetDir: string, roles: AgentRole[], options?: AdapterOptions): void;
7
11
  }
8
12
 
9
13
  declare class ClaudeAdapter implements PlatformAdapter {
@@ -21,9 +25,15 @@ declare class CopilotAdapter implements PlatformAdapter {
21
25
  declare class CodexAdapter implements PlatformAdapter {
22
26
  platform: string;
23
27
  generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void;
24
- generateAgentConfigs(targetDir: string, roles: AgentRole[]): void;
28
+ generateAgentConfigs(targetDir: string, roles: AgentRole[], options?: AdapterOptions): void;
29
+ }
30
+
31
+ declare class GeminiAdapter implements PlatformAdapter {
32
+ platform: string;
33
+ generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void;
34
+ generateAgentConfigs(targetDir: string, roles: AgentRole[], options?: AdapterOptions): void;
25
35
  }
26
36
 
27
37
  declare function getAdapter(platform: string): PlatformAdapter;
28
38
 
29
- export { ClaudeAdapter, CodexAdapter, CopilotAdapter, type PlatformAdapter, getAdapter };
39
+ export { type AdapterOptions, ClaudeAdapter, CodexAdapter, CopilotAdapter, GeminiAdapter, type PlatformAdapter, getAdapter };
package/dist/index.js CHANGED
@@ -289,8 +289,60 @@ var CopilotAdapter = class {
289
289
  };
290
290
 
291
291
  // src/codex/codex-adapter.ts
292
- import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync3, existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
292
+ import { writeFileSync as writeFileSync4, existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
293
+ import { join as join4 } from "path";
294
+
295
+ // src/shared/skills.ts
296
+ import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync3, existsSync as existsSync2 } from "fs";
293
297
  import { join as join3 } from "path";
298
+ var SYNC_SKILL = `---
299
+ name: arcbridge-sync
300
+ 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.
301
+ ---
302
+
303
+ # ArcBridge Sync
304
+
305
+ Run the full sync loop to keep architecture docs and task statuses in sync with code changes.
306
+
307
+ ## Steps
308
+
309
+ 1. **Reindex** \u2014 \`arcbridge_reindex\` to update the symbol index with recent code changes
310
+ 2. **Check drift** \u2014 \`arcbridge_check_drift\` to detect undeclared dependencies and missing modules
311
+ 3. **Review tasks** \u2014 \`arcbridge_get_current_tasks\` to see if any tasks can be inferred as done
312
+ 4. **Propose updates** \u2014 \`arcbridge_propose_arc42_update\` to generate documentation update proposals
313
+ `;
314
+ var REVIEW_SKILL = `---
315
+ name: arcbridge-review
316
+ description: Run ArcBridge phase boundary reviews \u2014 drift check, quality scenario verification, and practice review across 5 dimensions. Use before completing a phase.
317
+ ---
318
+
319
+ # ArcBridge Phase Review
320
+
321
+ Run the full review suite before completing a phase gate.
322
+
323
+ ## Steps
324
+
325
+ 1. **Drift check** \u2014 \`arcbridge_check_drift\` to catch undeclared dependencies and boundary violations
326
+ 2. **Verify scenarios** \u2014 \`arcbridge_verify_scenarios\` to run linked tests for quality scenarios
327
+ 3. **Practice review** \u2014 \`arcbridge_get_practice_review\` to review changes across architecture, security, testing, docs, and complexity
328
+ 4. **Role checks** \u2014 optionally run \`arcbridge_run_role_check\` with specific roles (security-reviewer, quality-guardian)
329
+ 5. **Complete phase** \u2014 if all checks pass, run \`arcbridge_complete_phase\` to validate gates and transition
330
+ `;
331
+ function generateSkills(targetDir, force = false) {
332
+ const skillsDir = join3(targetDir, ".agents", "skills");
333
+ const syncPath = join3(skillsDir, "arcbridge-sync", "SKILL.md");
334
+ if (force || !existsSync2(syncPath)) {
335
+ mkdirSync3(join3(skillsDir, "arcbridge-sync"), { recursive: true });
336
+ writeFileSync3(syncPath, SYNC_SKILL, "utf-8");
337
+ }
338
+ const reviewPath = join3(skillsDir, "arcbridge-review", "SKILL.md");
339
+ if (force || !existsSync2(reviewPath)) {
340
+ mkdirSync3(join3(skillsDir, "arcbridge-review"), { recursive: true });
341
+ writeFileSync3(reviewPath, REVIEW_SKILL, "utf-8");
342
+ }
343
+ }
344
+
345
+ // src/codex/codex-adapter.ts
294
346
  function generateAgentsMd(config) {
295
347
  const lines = [
296
348
  `# ${config.project_name}`,
@@ -378,66 +430,13 @@ function generateAgentsMd(config) {
378
430
  );
379
431
  return lines.join("\n");
380
432
  }
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
433
  var CodexAdapter = class {
435
434
  platform = "codex";
436
435
  generateProjectConfig(targetDir, config) {
437
436
  const agentsMdContent = generateAgentsMd(config);
438
- const agentsMdPath = join3(targetDir, "AGENTS.md");
437
+ const agentsMdPath = join4(targetDir, "AGENTS.md");
439
438
  const marker = "<!-- arcbridge-generated -->";
440
- if (existsSync2(agentsMdPath)) {
439
+ if (existsSync3(agentsMdPath)) {
441
440
  const existing = readFileSync2(agentsMdPath, "utf-8");
442
441
  const markerIndex = existing.indexOf(marker);
443
442
  if (markerIndex >= 0) {
@@ -445,7 +444,7 @@ var CodexAdapter = class {
445
444
  const prefix = userContent ? `${userContent}
446
445
 
447
446
  ` : "";
448
- writeFileSync3(agentsMdPath, `${prefix}${marker}
447
+ writeFileSync4(agentsMdPath, `${prefix}${marker}
449
448
 
450
449
  ${agentsMdContent}`, "utf-8");
451
450
  } else {
@@ -453,19 +452,19 @@ ${agentsMdContent}`, "utf-8");
453
452
  const prefix = existingTrimmed ? `${existingTrimmed}
454
453
 
455
454
  ` : "";
456
- writeFileSync3(agentsMdPath, `${prefix}${marker}
455
+ writeFileSync4(agentsMdPath, `${prefix}${marker}
457
456
 
458
457
  ${agentsMdContent}`, "utf-8");
459
458
  }
460
459
  } else {
461
- writeFileSync3(agentsMdPath, `${marker}
460
+ writeFileSync4(agentsMdPath, `${marker}
462
461
 
463
462
  ${agentsMdContent}`, "utf-8");
464
463
  }
465
464
  }
466
- generateAgentConfigs(targetDir, roles) {
467
- const agentsMdPath = join3(targetDir, "AGENTS.md");
468
- if (existsSync2(agentsMdPath)) {
465
+ generateAgentConfigs(targetDir, roles, options) {
466
+ const agentsMdPath = join4(targetDir, "AGENTS.md");
467
+ if (existsSync3(agentsMdPath)) {
469
468
  let content = readFileSync2(agentsMdPath, "utf-8");
470
469
  const roleTable = [
471
470
  "| Role | Description |",
@@ -484,15 +483,190 @@ ${agentsMdContent}`, "utf-8");
484
483
  ${roleTable}
485
484
  `;
486
485
  }
487
- writeFileSync3(agentsMdPath, content, "utf-8");
486
+ writeFileSync4(agentsMdPath, content, "utf-8");
487
+ }
488
+ generateSkills(targetDir, options?.force);
489
+ }
490
+ };
491
+
492
+ // src/gemini/gemini-adapter.ts
493
+ import { mkdirSync as mkdirSync4, writeFileSync as writeFileSync5, existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
494
+ import { join as join5 } from "path";
495
+ var MARKER = "<!-- arcbridge-generated -->";
496
+ function writeWithMarkerMerge(filePath, content) {
497
+ if (existsSync4(filePath)) {
498
+ const existing = readFileSync3(filePath, "utf-8");
499
+ const markerIndex = existing.indexOf(MARKER);
500
+ if (markerIndex >= 0) {
501
+ const userContent = existing.slice(0, markerIndex).trimEnd();
502
+ const prefix = userContent ? `${userContent}
503
+
504
+ ` : "";
505
+ writeFileSync5(filePath, `${prefix}${MARKER}
506
+
507
+ ${content}`, "utf-8");
508
+ } else {
509
+ const existingTrimmed = existing.trimEnd();
510
+ const prefix = existingTrimmed ? `${existingTrimmed}
511
+
512
+ ` : "";
513
+ writeFileSync5(filePath, `${prefix}${MARKER}
514
+
515
+ ${content}`, "utf-8");
516
+ }
517
+ } else {
518
+ writeFileSync5(filePath, `${MARKER}
519
+
520
+ ${content}`, "utf-8");
521
+ }
522
+ }
523
+ function generateStyleguide(config) {
524
+ const lines = [
525
+ `# ${config.project_name}`,
526
+ "",
527
+ `> Auto-generated by ArcBridge. Edit .arcbridge/ files to update.`,
528
+ "",
529
+ "## Project Overview",
530
+ "",
531
+ `- **Type:** ${config.project_type}`,
532
+ `- **Quality Priorities:** ${config.quality_priorities.join(", ")}`,
533
+ "",
534
+ "## How to Work in This Project",
535
+ "",
536
+ "This project follows the **Plan \u2192 Build \u2192 Sync \u2192 Review** convention using ArcBridge.",
537
+ "ArcBridge provides MCP tools that give you architectural awareness. **Use them throughout your work.**",
538
+ "",
539
+ "### Before Starting Any Work",
540
+ "",
541
+ "1. Check project status: `arcbridge_get_project_status`",
542
+ "2. Review current tasks: `arcbridge_get_current_tasks`",
543
+ "3. Activate the appropriate role: `arcbridge_activate_role`",
544
+ "",
545
+ "### When Planning or Refining Architecture",
546
+ "",
547
+ 'Activate the **architect** role: `arcbridge_activate_role({ role: "architect" })`',
548
+ "",
549
+ "- `arcbridge_get_building_blocks` \u2014 view architecture decomposition",
550
+ "- `arcbridge_get_quality_scenarios` \u2014 view quality requirements",
551
+ "- `arcbridge_get_open_questions` \u2014 find architectural gaps",
552
+ "- `arcbridge_propose_arc42_update` \u2014 propose doc updates from code changes",
553
+ "",
554
+ "### When Implementing Features",
555
+ "",
556
+ 'Activate the **implementer** role: `arcbridge_activate_role({ role: "implementer" })`',
557
+ "",
558
+ "- `arcbridge_get_guidance` \u2014 context-aware guidance for the file/block you're working on",
559
+ "- `arcbridge_get_current_tasks` \u2014 check expected tasks in the current phase",
560
+ "- `arcbridge_search_symbols` / `arcbridge_get_symbol` \u2014 understand existing code",
561
+ "- `arcbridge_get_dependency_graph` \u2014 check module dependencies",
562
+ "- `arcbridge_update_task` \u2014 mark tasks as in-progress or done",
563
+ "- `arcbridge_reindex` \u2014 re-index after significant code changes",
564
+ "",
565
+ "### After Implementing (Phase Boundary Review)",
566
+ "",
567
+ "Before completing a phase:",
568
+ "",
569
+ "1. **Drift check:** `arcbridge_check_drift` \u2014 catch undeclared dependencies",
570
+ "2. **Verify scenarios:** `arcbridge_verify_scenarios` \u2014 run linked quality tests",
571
+ "3. **Practice review:** `arcbridge_get_practice_review` \u2014 review across 5 dimensions",
572
+ "",
573
+ "### Completing a Phase",
574
+ "",
575
+ "Activate the **phase-manager** role, then: `arcbridge_complete_phase`",
576
+ '\u2014 validates three gates: all tasks done, no critical drift, must-have quality scenarios (priority = "must") not failing.',
577
+ ""
578
+ ];
579
+ if (config.project_type === "nextjs-app-router" || config.project_type === "react-vite") {
580
+ lines.push(
581
+ "## React & Next.js Analysis",
582
+ "",
583
+ "- `arcbridge_get_component_graph` \u2014 component hierarchy, props, state, context",
584
+ "- `arcbridge_get_route_map` \u2014 Next.js route tree (pages, layouts, API routes)",
585
+ "- `arcbridge_get_boundary_analysis` \u2014 server/client boundary analysis",
586
+ ""
587
+ );
588
+ }
589
+ return lines.join("\n");
590
+ }
591
+ function generateSettingsJson() {
592
+ const settings = {
593
+ mcpServers: {
594
+ arcbridge: {
595
+ command: "npx",
596
+ args: ["-y", "@arcbridge/mcp-server"]
597
+ }
598
+ }
599
+ };
600
+ return JSON.stringify(settings, null, 2) + "\n";
601
+ }
602
+ function yamlQuote(value) {
603
+ if (/[:#{}&*!|>'"%@`\n]/.test(value) || value !== value.trim()) {
604
+ return JSON.stringify(value);
605
+ }
606
+ return value;
607
+ }
608
+ function generateAgentFile3(role) {
609
+ const lines = [
610
+ "---",
611
+ `name: ${role.role_id}`,
612
+ `description: ${yamlQuote(role.description)}`
613
+ ];
614
+ const tools = role.required_tools.map(
615
+ (tool) => `mcp_*_${tool}`
616
+ );
617
+ if (role.read_only) {
618
+ tools.push("read_file", "grep_search", "list_directory");
619
+ }
620
+ if (tools.length > 0) {
621
+ lines.push("tools:");
622
+ for (const tool of tools) {
623
+ lines.push(` - ${tool}`);
624
+ }
625
+ }
626
+ const suggestedModel = role.model_preferences?.suggested_models?.gemini?.trim();
627
+ if (suggestedModel) {
628
+ lines.push(`model: ${yamlQuote(suggestedModel)}`);
629
+ } else if (role.model_preferences.reasoning_depth === "high") {
630
+ lines.push("model: gemini-2.5-pro");
631
+ }
632
+ lines.push("---", "");
633
+ lines.push(role.system_prompt, "");
634
+ return lines.join("\n");
635
+ }
636
+ var GeminiAdapter = class {
637
+ platform = "gemini";
638
+ generateProjectConfig(targetDir, config) {
639
+ const geminiDir = join5(targetDir, ".gemini");
640
+ mkdirSync4(geminiDir, { recursive: true });
641
+ const settingsPath = join5(geminiDir, "settings.json");
642
+ if (!existsSync4(settingsPath)) {
643
+ writeFileSync5(settingsPath, generateSettingsJson(), "utf-8");
644
+ } else {
645
+ try {
646
+ const existing = JSON.parse(readFileSync3(settingsPath, "utf-8"));
647
+ if (!existing.mcpServers?.arcbridge) {
648
+ existing.mcpServers = existing.mcpServers ?? {};
649
+ existing.mcpServers.arcbridge = {
650
+ command: "npx",
651
+ args: ["-y", "@arcbridge/mcp-server"]
652
+ };
653
+ writeFileSync5(settingsPath, JSON.stringify(existing, null, 2) + "\n", "utf-8");
654
+ }
655
+ } catch {
656
+ }
657
+ }
658
+ const styleguideContent = generateStyleguide(config);
659
+ writeWithMarkerMerge(join5(geminiDir, "styleguide.md"), styleguideContent);
660
+ writeWithMarkerMerge(join5(targetDir, "GEMINI.md"), styleguideContent);
661
+ }
662
+ generateAgentConfigs(targetDir, roles, options) {
663
+ const agentsDir = join5(targetDir, ".gemini", "agents");
664
+ mkdirSync4(agentsDir, { recursive: true });
665
+ for (const role of roles) {
666
+ const content = generateAgentFile3(role);
667
+ writeFileSync5(join5(agentsDir, `${role.role_id}.md`), content, "utf-8");
488
668
  }
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");
669
+ generateSkills(targetDir, options?.force);
496
670
  }
497
671
  };
498
672
 
@@ -500,7 +674,8 @@ ${roleTable}
500
674
  var adapters = {
501
675
  claude: () => new ClaudeAdapter(),
502
676
  copilot: () => new CopilotAdapter(),
503
- codex: () => new CodexAdapter()
677
+ codex: () => new CodexAdapter(),
678
+ gemini: () => new GeminiAdapter()
504
679
  };
505
680
  function getAdapter(platform) {
506
681
  const factory = adapters[platform];
@@ -515,6 +690,7 @@ export {
515
690
  ClaudeAdapter,
516
691
  CodexAdapter,
517
692
  CopilotAdapter,
693
+ GeminiAdapter,
518
694
  getAdapter
519
695
  };
520
696
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
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;A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AAW,GAAG;AACjC,kBAAU,QAAQ,QAAQ,aAAa,SAAS;AAAA,MAClD,OAAO;AAEL,kBAAU,GAAG,QAAQ,QAAQ,CAAC;AAAA;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"]}
1
+ {"version":3,"sources":["../src/claude/claude-adapter.ts","../src/copilot/copilot-adapter.ts","../src/codex/codex-adapter.ts","../src/shared/skills.ts","../src/gemini/gemini-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 { writeFileSync, existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { AgentRole, ArcBridgeConfig } from \"@arcbridge/core\";\nimport type { PlatformAdapter, AdapterOptions } from \"../types.js\";\nimport { generateSkills } from \"../shared/skills.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\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[], options?: AdapterOptions): 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 missing skills (shared with Gemini adapter — only writes if not present)\n generateSkills(targetDir, options?.force);\n }\n}\n","import { mkdirSync, writeFileSync, existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\n\nconst SYNC_SKILL = `---\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\nconst REVIEW_SKILL = `---\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\n/**\n * Generate ArcBridge skills under .agents/skills/.\n * By default, only writes skills that don't already exist — preserves existing content.\n * Pass force=true to overwrite existing skills (e.g., after template updates).\n * Shared between Codex and Gemini adapters.\n */\nexport function generateSkills(targetDir: string, force = false): void {\n const skillsDir = join(targetDir, \".agents\", \"skills\");\n\n const syncPath = join(skillsDir, \"arcbridge-sync\", \"SKILL.md\");\n if (force || !existsSync(syncPath)) {\n mkdirSync(join(skillsDir, \"arcbridge-sync\"), { recursive: true });\n writeFileSync(syncPath, SYNC_SKILL, \"utf-8\");\n }\n\n const reviewPath = join(skillsDir, \"arcbridge-review\", \"SKILL.md\");\n if (force || !existsSync(reviewPath)) {\n mkdirSync(join(skillsDir, \"arcbridge-review\"), { recursive: true });\n writeFileSync(reviewPath, REVIEW_SKILL, \"utf-8\");\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, AdapterOptions } from \"../types.js\";\nimport { generateSkills } from \"../shared/skills.js\";\n\nconst MARKER = \"<!-- arcbridge-generated -->\";\n\n/** Write content to a file with marker-based merge (preserves user content above marker) */\nfunction writeWithMarkerMerge(filePath: string, content: string): void {\n if (existsSync(filePath)) {\n const existing = readFileSync(filePath, \"utf-8\");\n const markerIndex = existing.indexOf(MARKER);\n\n if (markerIndex >= 0) {\n const userContent = existing.slice(0, markerIndex).trimEnd();\n const prefix = userContent ? `${userContent}\\n\\n` : \"\";\n writeFileSync(filePath, `${prefix}${MARKER}\\n\\n${content}`, \"utf-8\");\n } else {\n const existingTrimmed = existing.trimEnd();\n const prefix = existingTrimmed ? `${existingTrimmed}\\n\\n` : \"\";\n writeFileSync(filePath, `${prefix}${MARKER}\\n\\n${content}`, \"utf-8\");\n }\n } else {\n writeFileSync(filePath, `${MARKER}\\n\\n${content}`, \"utf-8\");\n }\n}\n\nfunction generateStyleguide(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: `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 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 return lines.join(\"\\n\");\n}\n\nfunction generateSettingsJson(): string {\n const settings = {\n mcpServers: {\n arcbridge: {\n command: \"npx\",\n args: [\"-y\", \"@arcbridge/mcp-server\"],\n },\n },\n };\n return JSON.stringify(settings, null, 2) + \"\\n\";\n}\n\nfunction yamlQuote(value: string): string {\n // Quote if value contains YAML-significant characters\n if (/[:#{}&*!|>'\"%@`\\n]/.test(value) || value !== value.trim()) {\n return JSON.stringify(value);\n }\n return value;\n}\n\nfunction generateAgentFile(role: AgentRole): string {\n const lines: string[] = [\n \"---\",\n `name: ${role.role_id}`,\n `description: ${yamlQuote(role.description)}`,\n ];\n\n // Build tools allowlist from role's required_tools (respects read_only constraint)\n const tools: string[] = role.required_tools.map(\n (tool) => `mcp_*_${tool}`,\n );\n if (role.read_only) {\n tools.push(\"read_file\", \"grep_search\", \"list_directory\");\n }\n if (tools.length > 0) {\n lines.push(\"tools:\");\n for (const tool of tools) {\n lines.push(` - ${tool}`);\n }\n }\n\n const suggestedModel = role.model_preferences?.suggested_models?.gemini?.trim();\n if (suggestedModel) {\n lines.push(`model: ${yamlQuote(suggestedModel)}`);\n } else if (role.model_preferences.reasoning_depth === \"high\") {\n lines.push(\"model: gemini-2.5-pro\");\n }\n\n lines.push(\"---\", \"\");\n lines.push(role.system_prompt, \"\");\n\n return lines.join(\"\\n\");\n}\n\nexport class GeminiAdapter implements PlatformAdapter {\n platform = \"gemini\";\n\n generateProjectConfig(targetDir: string, config: ArcBridgeConfig): void {\n const geminiDir = join(targetDir, \".gemini\");\n mkdirSync(geminiDir, { recursive: true });\n\n // Generate .gemini/settings.json (MCP config)\n const settingsPath = join(geminiDir, \"settings.json\");\n if (!existsSync(settingsPath)) {\n writeFileSync(settingsPath, generateSettingsJson(), \"utf-8\");\n } else {\n // Add arcbridge MCP server if not already present\n try {\n const existing = JSON.parse(readFileSync(settingsPath, \"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: [\"-y\", \"@arcbridge/mcp-server\"],\n };\n writeFileSync(settingsPath, JSON.stringify(existing, null, 2) + \"\\n\", \"utf-8\");\n }\n } catch {\n // Can't parse existing settings.json — leave it alone\n }\n }\n\n // Generate .gemini/styleguide.md and GEMINI.md (same content)\n const styleguideContent = generateStyleguide(config);\n writeWithMarkerMerge(join(geminiDir, \"styleguide.md\"), styleguideContent);\n writeWithMarkerMerge(join(targetDir, \"GEMINI.md\"), styleguideContent);\n }\n\n generateAgentConfigs(targetDir: string, roles: AgentRole[], options?: AdapterOptions): void {\n // Generate .gemini/agents/*.md (Gemini subagents mapped from ArcBridge roles)\n const agentsDir = join(targetDir, \".gemini\", \"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 // Generate missing skills (shared with Codex adapter — only writes if not present)\n generateSkills(targetDir, options?.force);\n }\n}\n","export type { PlatformAdapter, AdapterOptions } from \"./types.js\";\nexport { ClaudeAdapter } from \"./claude/claude-adapter.js\";\nexport { CopilotAdapter } from \"./copilot/copilot-adapter.js\";\nexport { CodexAdapter } from \"./codex/codex-adapter.js\";\nexport { GeminiAdapter } from \"./gemini/gemini-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\";\nimport { GeminiAdapter } from \"./gemini/gemini-adapter.js\";\n\nconst adapters: Record<string, () => PlatformAdapter> = {\n claude: () => new ClaudeAdapter(),\n copilot: () => new CopilotAdapter(),\n codex: () => new CodexAdapter(),\n gemini: () => new GeminiAdapter(),\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,uBAAuB,OAAO,iBAAiB,cAAc;AACvF,UAAM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AACjB;","names":["mkdirSync","writeFileSync","join","generateAgentFile","writeFileSync","existsSync","readFileSync","join","mkdirSync","writeFileSync","existsSync","join","join","existsSync","readFileSync","writeFileSync","mkdirSync","writeFileSync","existsSync","readFileSync","join","existsSync","readFileSync","writeFileSync","generateAgentFile","join","mkdirSync"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcbridge/adapters",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
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.3.1"
35
+ "@arcbridge/core": "0.3.2"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=22.16.0"