refactor(scripts): consolidate agent sync scripts into unified tool - #23
Conversation
Thank you for your contribution! 🎉Your PR has been validated and is ready for review. What happens next?
While you wait
🤖 This comment was generated automatically |
There was a problem hiding this comment.
Pull Request Overview
This PR consolidates three separate agent sync scripts into a single unified tool, removing deprecated scripts and adding comprehensive repository validation. The consolidation simplifies maintenance by replacing agent-specific scripts with a multi-agent capable tool that handles Claude, Codex, and future agents through a common interface.
Key changes:
- Unified
gh_sync_agents.shreplaces individual agent sync scripts with--modelsflag support - New
repo_validate.shprovides comprehensive repository compliance checking with fix capabilities - Updated all git hooks, documentation, and setup scripts to use the unified tool
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/repo_validate.sh | New comprehensive validation script with check and fix modes for repository compliance |
| scripts/repo_setup.sh | Updated to call unified gh_sync_agents.sh instead of deprecated Codex-specific script |
| scripts/gh_sync_codex.sh | Removed deprecated Codex-specific sync script (176 lines) |
| scripts/gh_sync_claude.sh | Removed deprecated Claude-specific sync script (97 lines) |
| scripts/gh_sync_agents.sh | Enhanced with unified multi-agent support, directory copying, and symlink management |
| scripts/gh_setup_contributing.sh | Added support for .common/artagon-common path alongside legacy path |
| scripts/README.md | Updated documentation to reflect unified script and removed deprecated script references |
| git-hooks/pre-commit | Updated to use gh_sync_agents.sh instead of gh_sync_codex.sh |
| git-hooks/post-merge | Updated to use gh_sync_agents.sh instead of gh_sync_codex.sh |
| git-hooks/post-checkout | Updated to use gh_sync_agents.sh instead of gh_sync_codex.sh |
| README.md | Updated with comprehensive examples and options for unified agent sync script |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Remove deprecated `setup_model_directory_links()` function and its call from `bootstrap_model()`. Root-level symlinks (.agents, .claude, .codex) are now created by `create_root_symlinks()` after all models are bootstrapped, making the per-model symlink function unnecessary. Addresses review comment on PR #23. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Consolidate gh_sync_claude.sh, gh_sync_codex.sh, and gh_sync_agents.sh into a single unified script for managing AI agent configurations (Claude, Codex, etc.). This simplifies maintenance and ensures consistent behavior across all agent types. Changes: - Remove deprecated gh_sync_claude.sh and gh_sync_codex.sh scripts - Enhance gh_sync_agents.sh to support multiple agent types via --models flag - Add directory copying from artagon-common submodule - Add root-level symlink creation (.agents, .claude, .codex) - Update all git hooks to use unified gh_sync_agents.sh - Update repo_setup.sh to call unified script - Update gh_setup_contributing.sh to support .common/artagon-common path - Update README.md and scripts/README.md with new usage examples - Add repo_validate.sh for repository compliance checking
Remove reference to deleted gh_sync_claude.sh script and add validation for new repo_validate.sh script.
Remove deprecated `setup_model_directory_links()` function and its call from `bootstrap_model()`. Root-level symlinks (.agents, .claude, .codex) are now created by `create_root_symlinks()` after all models are bootstrapped, making the per-model symlink function unnecessary. Addresses review comment on PR #23.
117352e to
ba6ee41
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
gh_sync_claude.sh,gh_sync_codex.sh, andgh_sync_agents.shinto a single unified scriptrepo_validate.sh)Changes
Scripts Consolidated
scripts/gh_sync_claude.sh(97 lines)scripts/gh_sync_codex.sh(176 lines)scripts/gh_sync_agents.shwith unified functionality (+152 lines)scripts/repo_validate.sh(980 lines) for repository compliance checkingEnhanced Functionality
The unified
gh_sync_agents.shnow:--modelsflag (default: "claude codex").common/artagon-commonsubmodule.agents,.claude,.codex).common/artagon-common(current) andartagon-common(legacy) pathsGit Hooks Updated
All hooks now use the unified
gh_sync_agents.sh:git-hooks/pre-commit- Validates agent configuration syncgit-hooks/post-checkout- Auto-syncs after branch switchesgit-hooks/post-merge- Auto-syncs after mergesDocumentation Updated
README.md- Added comprehensive usage examples and options for unified scriptscripts/README.md- Updated script listing and replaced deprecated script docsOther Updates
scripts/repo_setup.sh- Now calls unified agent sync scriptscripts/gh_setup_contributing.sh- Added support for.common/artagon-commonpathTest plan
gh_sync_agents.sh --checkon artagon-common (passed)gh_sync_agents.sh --ensurefunctionalityrepo_validate.shon artagon-parent (0 errors)repo_validate.shon artagon-bom (0 errors).agents,.claude,.codex)Files Changed
11 files: +1,195 insertions, -322 deletions
Related Issues
Closes #22
🤖 Generated with Claude Code