Skip to content

Conversation

@ignaciosantise
Copy link
Collaborator

@ignaciosantise ignaciosantise commented Jan 19, 2026

Summary

  • Add Conductor worktree scripts (setup-worktree.sh, cleanup-worktree.sh) for easy workspace setup and cleanup
  • Add conductor.json config for Conductor integration
  • Add AGENTS.md documentation for poc-pos-app, W3MWagmi, and rn_cli_wallet
  • Add CLAUDE.md files pointing to AGENTS.md for all projects
  • Consolidate copy-sample-files.sh scripts with existence checks (won't override existing files)
  • Replace setup-secrets.js with copy-sample-files.sh in pos-app and poc-pos-app
  • Add postinstall hooks to run copy-sample-files.sh automatically
  • Update environment variables documentation in all AGENTS.md files

Changes

Worktree Scripts

  • scripts/setup-worktree.sh - Symlinks env files and sentry.properties from main repo, runs copy-sample-files scripts
  • scripts/cleanup-worktree.sh - Removes node_modules, android/build, ios/Pods, ios/build for archiving

Documentation

  • Added comprehensive AGENTS.md files for AI agents with project overview, tech stack, architecture, and code quality guidelines
  • Added CLAUDE.md files that point to AGENTS.md

Script Improvements

  • Updated all copy-sample-files.sh to check if files exist before copying
  • Added postinstall hooks to automatically run setup scripts after npm/yarn install

Test plan

  • Test setup-worktree.sh in a new Conductor workspace
  • Test cleanup-worktree.sh removes expected directories
  • Verify postinstall hooks run correctly after yarn install
  • Verify copy-sample-files.sh skips existing files

🤖 Generated with Claude Code

- Add Conductor worktree scripts (setup-worktree.sh, cleanup-worktree.sh)
- Add conductor.json config for Conductor integration
- Add AGENTS.md documentation for poc-pos-app, W3MWagmi, rn_cli_wallet
- Add CLAUDE.md files pointing to AGENTS.md for all projects
- Consolidate copy-sample-files.sh scripts with existence checks
- Replace setup-secrets.js with copy-sample-files.sh in pos-app and poc-pos-app
- Add postinstall hooks to run copy-sample-files.sh automatically
- Update environment variables documentation in all AGENTS.md files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 19, 2026 19:48
@vercel
Copy link

vercel bot commented Jan 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
react-native-examples Ready Ready Preview, Comment Jan 20, 2026 3:14pm

Request Review

@claude
Copy link

claude bot commented Jan 19, 2026

Claude finished @ignaciosantise's task in 2m 11s —— View job


Code Review

Found 6 issue(s)

Issue 1: Missing source file validation in copy_if_missing function

ID: copy-sample-missing-validation-a7c1
File: dapps/poc-pos-app/scripts/copy-sample-files.sh:4
Severity: MEDIUM
Category: error_handling
Context: The copy_if_missing function checks if destination exists but doesn't validate source file existence before copying. If source file is missing, cp will fail with an error but the script continues due to lack of error handling.
Recommendation: Add source file validation before attempting copy:

copy_if_missing() {
    local src="$1"
    local dest="$2"
    if [ ! -f "$src" ]; then
        echo "Error: Source file not found: $src"
        return 1
    fi
    if [ ! -f "$dest" ]; then
        cp "$src" "$dest"
        echo "Copied: $dest"
    else
        echo "Skipped (exists): $dest"
    fi
}

Issue 2: Missing source file validation in copy_if_missing function

ID: copy-sample-missing-validation-b8d2
File: dapps/pos-app/scripts/copy-sample-files.sh:4
Severity: MEDIUM
Category: error_handling
Context: Same issue as Issue 1 - no validation that source file exists before attempting copy.
Recommendation: Apply same fix as Issue 1.

Issue 3: Missing source file validation in copy_if_missing function

ID: copy-sample-missing-validation-c9e3
File: dapps/W3MWagmi/scripts/copy-sample-files.sh:4
Severity: MEDIUM
Category: error_handling
Context: Same issue - no validation that source file exists before attempting copy.
Recommendation: Apply same fix as Issue 1.

Issue 4: Missing source file validation in copy_if_missing function

ID: copy-sample-missing-validation-d1f4
File: wallets/rn_cli_wallet/scripts/copy-sample-files.sh:4
Severity: MEDIUM
Category: error_handling
Context: Same issue - no validation that source file exists before attempting copy.
Recommendation: Apply same fix as Issue 1.

Issue 5: Hardcoded fallback path in setup-worktree.sh may not be portable

ID: setup-worktree-hardcoded-path-e2a5
File: scripts/setup-worktree.sh:16
Severity: LOW
Category: portability
Context: The fallback path $HOME/projects/react-native-examples is hardcoded and assumes a specific directory structure that may not exist on all developer machines. If CONDUCTOR_ROOT_PATH is not set and this path doesn't exist, the script will fail silently with confusing "Not found" warnings for all files.
Recommendation: Add validation and fail early if source directory doesn't exist:

SOURCE_DIR="${CONDUCTOR_ROOT_PATH:-$HOME/projects/react-native-examples}"

if [ ! -d "$SOURCE_DIR" ]; then
    echo -e "${RED}Error: Source directory not found: $SOURCE_DIR${NC}"
    echo "Please set CONDUCTOR_ROOT_PATH or run from correct location"
    exit 1
fi

Issue 6: Missing executable permissions on new copy-sample-files.sh scripts

ID: copy-sample-no-exec-perms-f3b6
File: dapps/poc-pos-app/scripts/copy-sample-files.sh:1
Severity: HIGH
Category: permissions
Context: The new copy-sample-files.sh scripts for poc-pos-app and pos-app don't have executable permissions set in git, while W3MWagmi and rn_cli_wallet scripts do (visible in diff as index 6610604..ea3d9c7 100755). This will cause postinstall hooks to fail with "Permission denied" errors.
Recommendation: Add executable permissions:

chmod +x dapps/poc-pos-app/scripts/copy-sample-files.sh
chmod +x dapps/pos-app/scripts/copy-sample-files.sh
git add dapps/poc-pos-app/scripts/copy-sample-files.sh dapps/pos-app/scripts/copy-sample-files.sh

Automated Checks

✅ No external domain URLs detected
✅ No cache-control issues detected
✅ No GitHub Actions workflow changes
✅ No WalletConnect Pay architecture violations


Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Conductor worktree integration and consolidates project setup scripts across multiple React Native projects. It replaces Node.js-based setup scripts with unified shell scripts that check for file existence before copying, adds comprehensive AI agent documentation (AGENTS.md), and configures automatic setup via postinstall hooks.

Changes:

  • Add Conductor worktree scripts (setup-worktree.sh, cleanup-worktree.sh) and conductor.json configuration
  • Replace setup-secrets.js with unified copy-sample-files.sh scripts that skip existing files
  • Add AGENTS.md documentation for all projects with architecture, tech stack, and development guidelines
  • Add CLAUDE.md files pointing to AGENTS.md in each project
  • Configure postinstall hooks to automatically run setup scripts after package installation

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
scripts/setup-worktree.sh Conductor workspace setup script that symlinks env files and runs project setup scripts
scripts/cleanup-worktree.sh Cleanup script that removes node_modules and build artifacts for archiving
conductor.json Conductor configuration linking to setup and cleanup scripts
wallets/rn_cli_wallet/scripts/copy-sample-files.sh Unified copy script with existence checks (replaces old bash script)
wallets/rn_cli_wallet/package.json Adds postinstall hook to run copy-sample-files.sh
wallets/rn_cli_wallet/CLAUDE.md Points to AGENTS.md for AI agent guidance
wallets/rn_cli_wallet/AGENTS.md Comprehensive documentation for RN CLI Wallet project
dapps/pos-app/scripts/copy-sample-files.sh New unified copy script with existence checks
dapps/pos-app/package.json Updates postinstall to use copy-sample-files.sh instead of setup-secrets.js
dapps/pos-app/AGENTS.md Updates environment variables section and code quality guidelines
dapps/pos-app/scripts/setup-secrets.js Removed in favor of copy-sample-files.sh
dapps/poc-pos-app/scripts/copy-sample-files.sh New unified copy script with existence checks
dapps/poc-pos-app/package.json Updates postinstall to use copy-sample-files.sh instead of setup-secrets.js
dapps/poc-pos-app/CLAUDE.md Points to AGENTS.md for AI agent guidance
dapps/poc-pos-app/AGENTS.md Comprehensive documentation for PoC POS App project
dapps/poc-pos-app/scripts/setup-secrets.js Removed in favor of copy-sample-files.sh
dapps/W3MWagmi/scripts/copy-sample-files.sh Unified copy script with existence checks (replaces old bash script)
dapps/W3MWagmi/package.json Adds postinstall hook to run copy-sample-files.sh
dapps/W3MWagmi/CLAUDE.md Points to AGENTS.md for AI agent guidance
dapps/W3MWagmi/AGENTS.md Comprehensive documentation for W3MWagmi project

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Shell scripts don't work in Vercel's build environment. Changed pos-app
and poc-pos-app to use Node.js version of copy-sample-files script.

- Replace copy-sample-files.sh with copy-sample-files.js for Expo projects
- Update setup-worktree.sh to handle both .js and .sh versions
- Keep shell scripts for W3MWagmi and rn_cli_wallet (React Native CLI)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Skip gracefully when source files don't exist (e.g., in Vercel builds
where secrets.properties.mock is not present).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Revert pos-app and poc-pos-app to use original setup-secrets.js
to avoid Vercel build issues. Keep copy-sample-files.sh only for
W3MWagmi and rn_cli_wallet which don't deploy to Vercel.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address review feedback: check if source file exists before attempting
to copy to avoid cp errors when mock files are missing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ignaciosantise ignaciosantise merged commit d477ad5 into main Jan 20, 2026
6 checks passed
@ignaciosantise ignaciosantise deleted the chore/worktree-scripts-and-agents-docs branch January 20, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants