OpenWriterControle/scripts/bridge/sync-to-claude.sh
Darren Hinde 9a58a03284
fix(context): Add frontmatter to context files with missing metadata (#97)
* feat(context): Add project intelligence system

- Add project-intelligence.md standard (what & why)
- Add project-intelligence-management.md guide (how to manage)
- Add project-intelligence/ folder with 6 context files:
  - navigation.md (quick overview & routes)
  - business-domain.md (business context, users, value)
  - technical-domain.md (stack, architecture, decisions)
  - business-tech-bridge.md (business → technical mapping)
  - decisions-log.md (decision history with context)
  - living-notes.md (active issues, debt, questions)
- Update standards navigation with new entries
- Register all new contexts in registry.json

This enables projects to document and maintain business + technical
context for quick onboarding and lasting project understanding.

* fix(registry): Add project-intelligence to profiles

- Add context:project-intelligence/* to developer, business, full, and advanced profiles
- Ensures project intelligence contexts are included when these profiles are selected

This complements commit c731328 which added the context entries.

* docs(core): refine project intelligence system and deprecate legacy context

* feat(claude): simplify Claude Code integration with unified installer

- Create single install-claude.sh script that auto-converts and installs
- Remove redundant bootstrap-install.sh and install.sh scripts
- Delete stale plugin/ directory (now auto-generated from .opencode/)
- Add Claude Code documentation (agent-skills, create-subagents, hooks, plugins)
- Add installation profiles (essential, developer, business, full, advanced)
- Update README with Claude Code beta feature documentation
- Add component-planning.md workflow context
- Clean up demo files (assets/, src/)
- Update registry with new context entries
- Add gitignore rule for converter/generated/

The new installer:
- Converts agents automatically from .opencode/agent/
- Installs fresh converted agents to ~/.claude/plugins/
- Single command: ./integrations/claude-code/install-claude.sh

* fix: update README to use new install-claude.sh script

The Claude Code integration now uses the unified install-claude.sh script
instead of the removed bootstrap-install.sh and install.sh scripts.

* fix(context): Add frontmatter to context files with missing metadata

- Add YAML frontmatter with description to system-builder-templates
- Add frontmatter to ui/web/design context files
- Fixes validation warnings in validate-component.sh

* fix(registry): Remove orphaned context entries for deleted files

- Remove copywriting-frameworks entry (file moved to content-creation/principles/)
- Remove tone-voice entry (file moved to content-creation/principles/)
2026-01-17 21:29:48 +00:00

38 lines
1.3 KiB
Bash
Executable file

#!/bin/bash
# sync-to-claude.sh
# Syncs OpenCode Agents to Claude Code plugin directory
SOURCE_DIR=".opencode/agent"
DEST_DIR=".opencode/integrations/claude-code/agents"
CLAUDE_DIR=".claude/plugins/openagent"
echo "🚀 Starting OpenBridge Sync..."
# Ensure destination exists
mkdir -p "$DEST_DIR"
# 1. Sync Subagents (Core logic)
echo "📦 Syncing subagents..."
cp .opencode/agent/subagents/core/*.md "$DEST_DIR/" 2>/dev/null
# 2. Sync Category Agents (Convert to Claude Subagents)
# Note: We rename them to be flatter for Claude's /agents menu
echo "🤖 Syncing category agents..."
find "$SOURCE_DIR" -maxdepth 2 -name "*.md" -not -path "*/subagents/*" | while read -r agent; do
filename=$(basename "$agent")
# Add Claude-specific frontmatter if missing (simple approach)
# Claude needs name and description in frontmatter
cp "$agent" "$DEST_DIR/$filename"
done
# 3. Installation - Link to .claude directory for immediate use
echo "🔗 Installing plugin to .claude/plugins/openagent..."
mkdir -p .claude/plugins
# Use a symbolic link so changes in integrations/ are reflected
rm -rf "$CLAUDE_DIR"
ln -s "$(pwd)/.opencode/integrations/claude-code" "$CLAUDE_DIR"
echo "✅ Sync complete!"
echo "💡 To use in Claude Code, run: claude"
echo " Claude will now automatically use 'context-scout' and apply 'repo-standards'."