@@ -118,6 +118,12 @@ MCP servers installed:
118118- ** memory** : In-memory key-value storage for temporary data
119119- ** git** : Tools to read, search, and manipulate Git repositories
120120- ** fetch** : Web content fetching and conversion for efficient LLM usage
121+ - ** sequentialthinking** : Dynamic problem-solving through iterative thought processes
122+ - ** context7** : Documentation retrieval for any library (community server)
123+ - ** playwright** : Browser automation and testing (community server)
124+ - ** figma** : Figma design context integration (community server)
125+ - ** semgrep** : Code analysis and pattern matching (community server)
126+ - ** exa** : Enhanced search capabilities (community server)
121127
122128### Git Commit Helpers
123129``` bash
@@ -152,14 +158,27 @@ The `--sync` flag detects and installs new packages added to configuration files
152158
153159### Script Organization
154160- ** Main Scripts** : ` setup.sh ` (production) and ` setup-validate.sh ` (validation/dry-run)
161+ - ** Core Libraries** in ` /lib/ ` :
162+ - ` common.sh ` : Shared functions and utilities
163+ - ` signal-safety.sh ` : Signal handling and cleanup framework
164+ - ` backup-manager.sh ` : Centralized backup management
165+ - ` config.sh ` : Configuration management
155166- ** Component Scripts** in ` /scripts/ ` :
156167 - ` install-homebrew.sh ` : Installs Homebrew package manager
157168 - ` install-packages.sh ` : Installs packages from Brewfile
158169 - ` setup-dotfiles.sh ` : Deploys dotfiles with automatic backups
159170 - ` setup-applications.sh ` : Installs macOS desktop applications
160171 - ` setup-macos.sh ` : Configures macOS system preferences
161172 - ` setup-git-hooks.sh ` : Configures conventional commit hooks
173+ - ` setup-claude-mcp.sh ` : Installs and configures MCP servers
174+ - ` setup-terminal-fonts.sh ` : Configures terminal fonts
175+ - ` setup-warp.sh ` : Warp terminal specific optimizations
162176 - ` commit-helper.sh ` : Interactive conventional commit creator
177+ - ` cleanup-artifacts.sh ` : Periodic maintenance and cleanup
178+ - ` health-check.sh ` : System health verification
179+ - ` update.sh ` : Update all tools and dependencies
180+ - ` uninstall.sh ` : Clean removal with backups
181+ - ` rollback.sh ` : Restore from previous backups
163182
164183### Key Configuration Files
165184- ` homebrew/Brewfile ` : Package definitions (formulae, casks, VS Code extensions)
@@ -195,6 +214,107 @@ The `--sync` flag detects and installs new packages added to configuration files
195214- Timeout protection (30s) for potentially hanging commands
196215- Git is configured with security-conscious settings (fsckObjects enabled)
197216
217+ ## Security and Signal Safety
218+
219+ ### Signal-Safe Cleanup Requirements
220+ All scripts that perform system modifications MUST implement signal-safe cleanup:
221+
222+ 1 . ** Source the signal-safety library** at the beginning of the script:
223+ ``` bash
224+ source " $ROOT_DIR /lib/signal-safety.sh"
225+ ```
226+
227+ 2 . ** Implement a cleanup function** specific to your script's needs:
228+ ``` bash
229+ cleanup_yourscript () {
230+ # Clean up temporary files
231+ rm -f " ${TEMP_FILE:- } " 2> /dev/null || true
232+
233+ # Kill any background processes
234+ [[ -n " ${CHILD_PID:- } " ]] && kill " $CHILD_PID " 2> /dev/null || true
235+
236+ # Remove partial installations
237+ [[ -d " ${WORK_DIR:- } " ]] && rm -rf " $WORK_DIR " 2> /dev/null || true
238+
239+ # Call default cleanup
240+ default_cleanup
241+ }
242+ ```
243+
244+ 3 . ** Register the cleanup function** immediately after defining it:
245+ ``` bash
246+ setup_cleanup " cleanup_yourscript"
247+ ```
248+
249+ ### Critical Cleanup Areas
250+ When implementing cleanup, ensure these artifacts are handled:
251+
252+ - ** Package Managers** : npm node_modules, Python venvs, Ruby gems
253+ - ** Build Artifacts** : Compiled binaries, object files, cache directories
254+ - ** Temporary Files** : Config backups, download files, lock files
255+ - ** Background Processes** : Any spawned child processes or daemons
256+ - ** Partial Installations** : Incomplete setups that could cause issues
257+
258+ ### Security Best Practices
259+
260+ 1 . ** Never leave sensitive data** in temporary files or logs
261+ 2 . ** Use secure temp directories** : ` mktemp -d ` with proper permissions
262+ 3 . ** Validate all inputs** before using in commands
263+ 4 . ** Avoid eval** unless absolutely necessary
264+ 5 . ** Quote all variables** to prevent injection: ` "$var" ` not ` $var `
265+ 6 . ** Set restrictive permissions** on created files: ` umask 077 `
266+ 7 . ** Clean up secrets** from memory/disk after use
267+
268+ ### Testing Signal Safety
269+ Always test your cleanup implementation:
270+
271+ ``` bash
272+ # Start your script and interrupt it
273+ ./your-script.sh &
274+ PID=$!
275+ sleep 2
276+ kill -INT $PID
277+ # Verify no artifacts remain
278+ ```
279+
280+ ## Testing Framework
281+
282+ ### Running Tests
283+ ``` bash
284+ # Run all tests
285+ ./tests/run_tests.sh
286+
287+ # Run specific test suites
288+ ./tests/run_tests.sh unit # Unit tests only
289+ ./tests/run_tests.sh integration # Integration tests only
290+ ./tests/run_tests.sh ci # CI-specific tests
291+
292+ # Run tests in parallel (faster)
293+ ./tests/run_tests_parallel.sh
294+
295+ # Run with custom parallelism
296+ TEST_JOBS=8 ./tests/run_tests.sh
297+ ```
298+
299+ ### Test Organization
300+ - ** Unit Tests** (` tests/unit/ ` ): Test individual functions and components
301+ - ** Integration Tests** (` tests/integration/ ` ): Test script interactions
302+ - ** CI Tests** (` tests/ci/ ` ): Tests specific to CI environment
303+ - ** Stress Tests** (` tests/stress/ ` ): Performance and load testing
304+ - ** Performance Tests** (` tests/performance/ ` ): Benchmark and optimization tests
305+
306+ ### Writing Tests
307+ Use the test framework's built-in functions:
308+ ``` bash
309+ it " should describe what it tests"
310+ assert_equals " expected" " actual" " Test description"
311+ assert_true " [[ condition ]]" " Condition should be true"
312+ assert_false " [[ condition ]]" " Condition should be false"
313+ assert_contains " haystack" " needle" " Should contain substring"
314+ assert_file_exists " /path/to/file" " File should exist"
315+ assert_dir_exists " /path/to/dir" " Directory should exist"
316+ ```
317+
198318## Setup Script Maintenance
199319
200320When adding new functionality or capabilities to this project, always check if the setup script needs updating:
@@ -207,3 +327,33 @@ When adding new functionality or capabilities to this project, always check if t
2073276 . ** Update documentation** : Document new features in this file if needed
208328
209329After any changes, run the setup script to ensure everything works correctly.
330+
331+ ## Important Behavioral Guidelines
332+
333+ - Do only what has been asked; nothing more, nothing less
334+ - Never create files unless absolutely necessary for the task
335+ - Always prefer editing existing files over creating new ones
336+ - Never proactively create documentation files (* .md) or README files unless explicitly requested
337+ - Never commit changes unless explicitly asked to
338+ - When blocked, ask for clarification rather than making assumptions
339+
340+ ## Repository Standards
341+
342+ ### Version Management
343+ - Current version is tracked in ` VERSION ` file
344+ - Semantic versioning is enforced via CI/CD
345+ - Changelog follows Keep a Changelog format
346+ - Automatic releases via semantic-release
347+
348+ ### CI/CD Pipeline
349+ - GitHub Actions for automated testing
350+ - Semantic release for version management
351+ - Branch protection on main branch
352+ - All PRs require passing tests
353+ - Claude Code Review integration for AI-assisted reviews
354+
355+ ### Code Quality
356+ - ShellCheck for shell script linting
357+ - Consistent error handling patterns
358+ - Comprehensive test coverage
359+ - Security scanning in CI pipeline
0 commit comments