feat: Unified install script with remote execution support#41
Conversation
Reorganize agent source files into src/ subdirectory: - src/claude/ - Claude Code CLI agents (18 files) - src/copilot-cli/ - GitHub Copilot CLI agents (18 files) - src/vs-code-agents/ - VS Code agents (18 files) This provides a cleaner separation between source files and configuration/documentation at the repository root. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all installation scripts to reference new agent locations: - install-claude-global.ps1 → src/claude - install-claude-repo.ps1 → src/claude - install-vscode-global.ps1 → src/vs-code-agents - install-vscode-repo.ps1 → src/vs-code-agents - install-copilot-cli-global.ps1 → src/copilot-cli - install-copilot-cli-repo.ps1 → src/copilot-cli 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update directory structure references in documentation: - README.md: Updated directory tree to show src/ hierarchy - USING-AGENTS.md: Updated directory tree to show src/ hierarchy - docs/ideation-workflow.md: Fixed broken relative links to agents - .serena/memories/codebase-structure.md: Updated structure description 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 1 of install script refactoring (CVA plan): - Add Install-Common.psm1 with 11 shared functions - Add Config.psd1 with environment configurations - Support markdown-compatible BEGIN/END markers for upgrades - Maintain backward compatibility with existing scripts Functions exported: - Get-InstallConfig: Load environment/scope configuration - Resolve-DestinationPath: Expand path expressions ($HOME, $env:APPDATA) - Test-SourceDirectory: Validate source exists - Get-AgentFiles: Find agent files by pattern - Initialize-Destination: Create destination directories - Test-GitRepository: Validate git repository - Initialize-AgentsDirectories: Create .agents subdirs with .gitkeep - Copy-AgentFile: Copy with overwrite prompting - Install-InstructionsFile: Append/upgrade with content markers - Write-InstallHeader: Consistent header output - Write-InstallComplete: Environment-specific completion message 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2 of install script refactoring (CVA plan): - Add parameterized installer supporting -Environment and -Global/-RepoPath - Wire up to Install-Common.psm1 shared functions - Support Claude, Copilot, and VSCode environments - Display known bug warning for Copilot global installs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 3 of install script refactoring (CVA plan): - Convert 6 install scripts to call unified install.ps1 - Maintain backward compatibility with existing parameters - Reduce duplication from 768 lines to ~191 lines total (75% reduction) - Mark as deprecated in favor of install.ps1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 4 of install script refactoring (CVA plan):
- Detect remote vs local execution context via $PSScriptRoot
- Bootstrap: download module, config, and source files to temp
- Add interactive mode for parameter-less invocation
- Download agent files from GitHub API for remote execution
- Cleanup temp files after installation
- Enable: iex ((New-Object System.Net.WebClient).DownloadString('...'))
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive unit tests for the PowerShell installation scripts: - Install-Common.Tests.ps1: Tests for all 11 module functions - Get-InstallConfig: All environment/scope combinations - Resolve-DestinationPath: Path expression expansion - Test-SourceDirectory: Valid/invalid path handling - Get-AgentFiles: File pattern matching - Initialize-Destination: Directory creation - Test-GitRepository: Git detection - Initialize-AgentsDirectories: .agents directory structure - Copy-AgentFile: File copy scenarios - Install-InstructionsFile: Append/upgrade/force scenarios - Config.Tests.ps1: Configuration validation - All environments defined (Claude, Copilot, VSCode) - All scopes defined (Global, Repo) - Marker format validation - Path expression validity - install.Tests.ps1: Entry point tests - Parameter definitions - Remote execution support - Interactive mode - Module integration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add automated testing for PowerShell installation scripts: - Triggers on push/PR to scripts/** and workflow file - Runs on windows-latest with PowerShell - Installs Pester 5.x - Runs all tests in scripts/tests/ - Uploads test results as artifact - Publishes test report via dorny/test-reporter - Fails PR if tests fail 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add complete installation documentation for the unified installer: docs/installation.md: - Remote installation via iex - Local installation with unified script - Legacy script reference - Installation paths for all environments - .agents directory structure - Upgrade process with content blocks - Known issues (Copilot CLI #452) - Troubleshooting guide - Post-installation verification - Uninstallation instructions scripts/README.md: - Directory structure overview - Quick reference for all commands - Parameter documentation - Module function reference - Configuration structure - Test execution instructions README.md: - Updated Quick Start with remote installation - Simplified local installation examples - Added usage examples for all environments - Updated documentation links 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add session artifacts from CVA implementation and follow-up work:
.agents/retrospective/:
- 2025-12-15-cva-install-scripts.md: CVA refactoring learnings
- 4 new skills extracted (phased migration, config extraction,
remote bootstrap, thin wrapper patterns)
- Metrics comparison (46.6% -> <5% duplication)
- Near-miss documentation
- 2025-12-15-documentation-gap.md: Process improvement analysis
- Root cause: Definition of Done was code-focused
- Gap: Explainer agent handoff not made
- Process improvements: DoD template, handoff checklist
.agents/planning/:
- cva-install-scripts.md: Original CVA analysis document
.serena/memories/:
- install-scripts-cva.md: CVA findings summary
- skills-cva-refactoring.md: Extracted skills for reuse
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add copilot-setup-steps.yml to configure Copilot Workspace environments: - Enable git hooks at .githooks/ - Install markdownlint-cli2 for linting - Configure GH_TOKEN for GitHub CLI access - Set SKIP_AUTOFIX=0 for auto-fix in pre-commit hooks The job name `copilot-setup-steps` is required for Copilot discovery. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Pester testing framework installation to copilot-setup-steps.yml: - Install Pester 5.0+ from PSGallery - Update verification step to check Pester availability - Convert verification step to PowerShell for consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add build/scripts/Invoke-PesterTests.ps1 for running Pester tests - Update pester-tests.yml to call the extracted script - Support both CI mode (-CI flag) and local development - Auto-install Pester if not present - Add detailed help and examples for discoverability Usage: pwsh ./build/scripts/Invoke-PesterTests.ps1 # Local development pwsh ./build/scripts/Invoke-PesterTests.ps1 -CI # CI mode (exit on failure) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix Config.Tests.ps1: Move variable assignments into BeforeAll blocks - Fix Install-Common.Tests.ps1: Use Pester 5 -ForEach for parameterized tests - Fix install.Tests.ps1: Update module import pattern check - Change test output path from test-results/ to artifacts/ - Add artifacts/ to .gitignore - Update documentation with testing instructions All 144 tests now pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive agent definitions to support a multi-agent orchestration system across three platforms (Claude, VS Code Copilot, and Copilot CLI). The changes introduce 13 new agent definitions with detailed responsibilities, protocols, and handoff procedures to enable complex software development workflows.
Key Changes:
- Added 13 specialized agent definitions (analyst, architect, critic, devops, etc.) across three platforms
- Established memory protocols using cloudmcp-manager for cross-session continuity
- Defined impact analysis frameworks for multi-domain planning
- Created standardized handoff protocols between agents
- Fixed documentation references in ideation-workflow.md
Reviewed changes
Copilot reviewed 28 out of 83 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vs-code-agents/*.agent.md (13 files) | VS Code agent definitions with vscode tools |
| src/copilot-cli/*.agent.md (13 files) | Copilot CLI agent definitions with shell tools |
| src/claude/independent-thinker.md | Claude-specific independent thinker agent |
| docs/ideation-workflow.md | Fixed incorrect documentation paths |
Note: All new files are additions (no modifications to existing agent logic), focused on establishing the agent orchestration framework described in the PR metadata.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes two issues in PR #41: 1. Security: Add explicit permissions block to pester-tests.yml - contents: read (repository checkout) - checks: write (test reporter needs to create check runs) This resolves CodeQL alert #1 (missing-workflow-permissions) 2. CI Failure: Change reporter from java-junit to dotnet-nunit - Pester outputs NUnitXml format, not JUnit - dorny/test-reporter requires matching format specification This resolves the "Cannot read properties of undefined" error Root Cause Analysis: The multi-agent workflow missed security review for infrastructure changes. PRD created for pre-PR security gate to prevent future occurrences. Related: - CodeQL Alert: https://github.com/rjmurillo/ai-agents/security/code-scanning/1 - Analysis: .agents/analysis/pr41-issue-analysis.md - PRD: .agents/planning/prd-pre-pr-security-gate.md - Issue: #42 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change Pester output format from NUnitXml to JUnitXml to ensure compatibility with dorny/test-reporter@v1: - Update Invoke-PesterTests.ps1 default OutputFormat to JUnitXml - Keep java-junit reporter which is universally supported in v1 The dotnet-nunit reporter requires dorny/test-reporter v2+. Using JUnitXml + java-junit ensures maximum compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds a unified PowerShell installer (scripts/install.ps1) with a shared module and Config.psd1, replaces legacy installers with thin wrappers, adds Pester test suites and CI workflows, reorganizes agent sources under src/, and introduces extensive planning/analysis/retrospective documentation and repository memories. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Invoker as Local/Remote Invoker
participant GitHub
participant Installer as install.ps1
participant Common as Install-Common.psm1
participant Config as Config.psd1
participant FS as File System
User->>Invoker: Run installer (iex remote OR local)
alt Remote bootstrap
Invoker->>GitHub: GET Install-Common.psm1 & Config.psd1
GitHub-->>Invoker: Return files
Invoker->>Invoker: Extract to temp workspace
else Local
Invoker->>FS: Resolve local script/module paths
end
Invoker->>Installer: Start install.ps1
Installer->>Common: Import module Install-Common.psm1
Installer->>Config: Load Config.psd1
opt Interactive
Installer->>User: Prompt Environment & Scope
User-->>Installer: Provide selections
end
Installer->>Common: Get-InstallConfig(env, scope)
Common->>Config: Read & merge config
Config-->>Common: Merged config
Common-->>Installer: Config data
Installer->>Common: Resolve-DestinationPath(dest)
Common->>FS: Expand & normalize path
FS-->>Common: Resolved path
Installer->>Common: Test-SourceDirectory(source)
Common->>FS: Check existence
FS-->>Common: OK/Fail
Installer->>Common: Get-AgentFiles(source, pattern)
Common->>FS: Enumerate files
FS-->>Common: File list
loop For each file
Installer->>Common: Copy-AgentFile(file, dest, Force)
Common->>FS: Copy/overwrite logic
FS-->>Common: Result (Installed/Updated/Skipped)
end
Installer->>Common: Install-InstructionsFile(srcInstr, destInstr)
Common->>FS: Read existing, detect markers, append/upgrade/replace
FS-->>Common: Updated instructions
Installer->>Common: Write-InstallComplete(env, scope)
Common-->>User: Summary & next steps
alt Remote bootstrap
Installer->>FS: Cleanup temp workspace
end
Installer-->>User: Exit
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related issues
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (36)
Comment |
Add retrospective analysis from install scripts refactoring session: - .agents/retrospective/2025-12-15-install-scripts-session.md Add learned skills to Serena memories: - skills-cva-refactoring.md (updated) - skills-ci-infrastructure.md (new) - skills-pester-testing.md (new) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add retrospective analysis that identified the recursive pattern: - Documented that infrastructure changes need security review - Then made infrastructure changes without security review Key skill extracted: Self-awareness of a process gap does not prevent repeating it without explicit enforcement mechanisms (96% atomicity) Files added: - .agents/retrospective/2025-12-15-pr41-ci-fix-workflow-analysis.md - .serena/memories/skills-process-workflow-gaps.md Relates to: #42 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Summary
This PR implements a comprehensive refactoring of the install scripts based on a Code Value Analysis (CVA) that identified 46.6% duplication across 6 scripts. The result is a unified, maintainable installation system with remote execution support.
Key Changes
install.ps1supporting all environments (Claude, Copilot, VSCode) and scopes (Global, Repo)Install-Common.psm1with 11 shared functions eliminating code duplicationiexInstallation Methods
Remote (interactive):
Local:
Metrics
Files Added/Modified
New Files:
scripts/install.ps1- Unified entry pointscripts/lib/Install-Common.psm1- Shared module (11 functions)scripts/lib/Config.psd1- Environment configurationscripts/tests/*.Tests.ps1- Pester test suitesbuild/scripts/Invoke-PesterTests.ps1- Reusable test runner.github/workflows/pester-tests.yml- CI for PowerShell tests.github/workflows/copilot-setup-steps.yml- Copilot Workspace setupdocs/installation.md- Comprehensive installation guidescripts/README.md- Script documentation.agents/planning/cva-install-scripts.md- CVA analysis document.agents/retrospective/2025-12-15-cva-install-scripts.md- RetrospectiveModified Files:
scripts/install-*.ps1- Converted to thin wrappersCLAUDE.md- Added testing sectioncopilot-instructions.md- Added testing sectionREADME.md- Added Quick Start section.gitignore- Added artifacts/Test Plan
Related
.agents/planning/cva-install-scripts.md.agents/retrospective/2025-12-15-cva-install-scripts.md🤖 Generated with Claude Code