fix: correct AI.md copying when running installer from npm package#18
Conversation
- Use USER_DIR=$(pwd) to get user's working directory instead of script location - Copy AI.md to $USER_DIR/AI.md to ensure it reaches the user's project directory - Update verification logic to check correct AI.md location - Fixes issue where npx @stillrivercode/information-dense-keywords wouldn't copy AI.md - All existing tests continue to pass 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🔒 Security Scan Results✅ npm audit - Dependency SecurityNo vulnerable dependencies found.
|
🤖 AI ReviewOf course. Here is a review of the pull request. PR Review: Fix
|
- Move USER_DIR=$(pwd) to the very beginning of the script - This ensures we capture the user's actual working directory before any potential directory changes - Addresses PR #18 feedback about incorrect timing of pwd execution - Removes duplicate USER_DIR assignment later in the script - All tests continue to pass This fixes the critical issue where npx installations would fail to copy AI.md to the user's project directory. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix Applied ✅Thank you for the excellent feedback! I've addressed the critical timing issue: Changes Made
Root CauseThe issue was that Testing
Technical DetailsBefore: # Later in script after potential directory changes
USER_DIR="$(pwd)" # Wrong timing\!After: #\!/bin/bash
# Capture the user's working directory BEFORE any other operations
USER_DIR="$(pwd)" # Correct timing\!This ensures that when users run Ready for re-review! 🚀 |
- Change AI.md installation location from current directory to installation directory - Update AI.md to be installed alongside other dictionary files (consistency) - Benefits: cleaner organization, all dictionary files in one location - Update test descriptions and logic to reflect new behavior - All 10 tests continue to pass Examples: - Default: AI.md now goes to ./docs/AI.md (not ./AI.md) - Custom: AI.md now goes to my-docs/AI.md (not ./AI.md) This makes the installer more predictable and organized for users. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Further Improvement Applied ✅Based on your suggestion, I've made an additional improvement for better organization: Change MadeAI.md now installs in the custom directory alongside other dictionary files Why This Is Better
ExamplesBefore:
After:
Testing
This makes the installer much more organized and predictable for users! 🎯 |
🤖 AI ReviewOf course! Here is a detailed review of the provided pull request. Pull Request ReviewPR Title: Fix: AI.md copy on npx install Summary of ChangesThe pull request modifies the The core change is to alter the destination of the Strengths of the Implementation
Issues and Concerns1. Code Quality and Best Practices
2. Potential Bugs or Issues
3. Security Concerns
4. Performance Implications
5. Test Coverage
6. Documentation Updates Needed
Suggestions for Improvement
Overall RecommendationRequest Changes This pull request provides a solid and logical fix for the reported issue. The improved file organization is a welcome side effect. However, the misleading PR description and the inclusion of unused code should be addressed before merging to maintain code quality and clarity. Once these minor changes are made, the PR will be ready for approval. This review was automatically generated by |
- Remove unused USER_DIR=$(pwd) variable from install.sh (dead code) - Update README.md to reflect AI.md location change (docs/AI.md not project root) - Addresses AI review feedback about code quality and documentation The implementation correctly uses $INSTALL_DIR, not $USER_DIR, so the unused variable has been removed to avoid confusion. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
AI Review Feedback Addressed ✅Thank you for the detailed review! I've addressed all the concerns: 1. Fixed PR Description ✅
2. Removed Dead Code ✅
3. Updated Documentation ✅
Current Implementation Summary
All tests continue to pass and the implementation is now clean, well-documented, and consistent! 🎯 |
🤖 AI ReviewOf course. Here is a detailed pull request review based on your request. PR Review: Fix AI.md installation pathSummary of ChangesThis pull request addresses a bug where This change aligns the installation path of Strengths of the Implementation
Issues or ConcernsI have no major concerns with this implementation. The logic is sound, and the changes are well-contained and executed.
Suggestions for ImprovementThe pull request is already very strong, but here is one minor suggestion for future consideration to improve the general robustness of the shell scripts:
Overall RecommendationThis is an excellent pull request that clearly identifies a problem and implements a clean, well-tested, and well-documented solution. The author has done a great job of thinking through all the implications of the change, from code to tests to documentation. Recommendation: This review was automatically generated by |
🔒 Security Review ReportThis report contains the results of automated security scans. ✅ No security issues found by Bandit ✅ No vulnerable dependencies found by Safety No Semgrep results found. ✅ No vulnerabilities found by npm audit Report generated automatically by security review workflow |
## [1.5.1](v1.5.0...v1.5.1) (2025-07-16) ### Bug Fixes * correct AI.md copying when running installer from npm package ([#18](#18)) ([29f8a97](29f8a97))
|
🎉 This PR is included in version 1.5.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Fixes the issue where
AI.mdwasn't being copied when users rannpx @stillrivercode/information-dense-keywords.Problem
When running the installer from the npm package, the
AI.mdfile wasn't being copied to the user's project because the script was trying to copy from the package directory to the same location.Solution
Changed AI.md installation location from user's current directory to the installation directory:
$INSTALL_DIR/AI.md(e.g.,docs/AI.md)Benefits
information-dense-keywords.md,dictionary/, andAI.mdall go to the same locationExamples
Before:
information-dense-keywords.md→./docs/dictionary/→./docs/AI.md→./(project root - often failed with npx)After:
information-dense-keywords.md→./docs/dictionary/→./docs/AI.md→./docs/(same location - consistent and reliable)Test plan
Technical Details
The key change replaces copying AI.md to the user's working directory with copying it to the installation directory:
This ensures the file gets copied to the specified installation directory (e.g.,
docs/) alongside the other dictionary files, providing better organization and fixing the npx installation issue.🤖 Generated with Claude Code