Skip to content

Commit 3dbc0dd

Browse files
adslatonclaude
andcommitted
feat: install AI.md in custom directory for better organization
- 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 <[email protected]>
1 parent f3805ca commit 3dbc0dd

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

install.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,25 @@ if [ -d "$INSTALL_DIR/dictionary" ]; then
6363
fi
6464
cp -r "dictionary" "$INSTALL_DIR/"
6565

66-
# Copy AI.md to user's working directory (where user ran the command)
67-
echo "Copying AI.md to current directory..."
68-
# Only copy if AI.md doesn't already exist in user's directory
69-
if [ ! -f "$USER_DIR/AI.md" ]; then
70-
echo "AI.md not found in current directory. Copying default version..."
71-
cp "AI.md" "$USER_DIR/AI.md"
66+
# Copy AI.md to installation directory (same location as other dictionary files)
67+
echo "Copying AI.md to installation directory..."
68+
# Only copy if AI.md doesn't already exist in installation directory
69+
if [ ! -f "$INSTALL_DIR/AI.md" ]; then
70+
echo "AI.md not found in installation directory. Copying default version..."
71+
cp "AI.md" "$INSTALL_DIR/AI.md"
7272
else
73-
echo "User's AI.md already exists in current directory, skipping copy."
73+
echo "User's AI.md already exists in installation directory, skipping copy."
7474
fi
7575

7676
# Verify installation
77-
if [ -f "$INSTALL_DIR/information-dense-keywords.md" ] && [ -d "$INSTALL_DIR/dictionary" ] && [ -f "$USER_DIR/AI.md" ]; then
77+
if [ -f "$INSTALL_DIR/information-dense-keywords.md" ] && [ -d "$INSTALL_DIR/dictionary" ] && [ -f "$INSTALL_DIR/AI.md" ]; then
7878
echo ""
7979
echo -e "${GREEN}✓ Installation completed successfully!${NC}"
8080
echo ""
8181
echo "Installed files:"
8282
echo " - $INSTALL_DIR/information-dense-keywords.md"
8383
echo " - $INSTALL_DIR/dictionary/"
84-
echo " - $USER_DIR/AI.md"
84+
echo " - $INSTALL_DIR/AI.md"
8585
echo ""
8686
echo "Dictionary structure:"
8787
find "$INSTALL_DIR/dictionary" -name "*.md" | sort | sed 's/^/ /'

tests/test-install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ else
197197
fi
198198

199199
echo ""
200-
echo "Test 9: AI.md copying when missing from project root"
200+
echo "Test 9: AI.md copying when missing from installation directory"
201201
echo "----------------------------------------------------"
202202
# Test in a clean subdirectory where AI.md doesn't exist in project root
203203
mkdir -p test-clean-project
@@ -208,11 +208,11 @@ cp ../information-dense-keywords.md .
208208
cp -r ../dictionary .
209209
cp ../AI.md .
210210
cp ../install.sh .
211-
# Note: AI.md exists in current directory (package) but not in project root
212-
# Since we're in test-clean-project, there's no AI.md in the project root initially
211+
# Note: AI.md exists in current directory (package) but not in installation directory
212+
# Since we're in test-clean-project, there's no AI.md in the installation directory initially
213213
./install.sh test-docs
214-
if [ -f "test-docs/information-dense-keywords.md" ] && [ -d "test-docs/dictionary" ] && [ -f "AI.md" ]; then
215-
echo -e "${GREEN}✓ Test 9 passed: AI.md copied to project root successfully${NC}"
214+
if [ -f "test-docs/information-dense-keywords.md" ] && [ -d "test-docs/dictionary" ] && [ -f "test-docs/AI.md" ]; then
215+
echo -e "${GREEN}✓ Test 9 passed: AI.md copied to installation directory successfully${NC}"
216216
else
217217
echo -e "${RED}✗ Test 9 failed: AI.md copying failed${NC}"
218218
if [ ! -f "test-docs/information-dense-keywords.md" ]; then
@@ -221,8 +221,8 @@ else
221221
if [ ! -d "test-docs/dictionary" ]; then
222222
echo -e "${RED} Missing: test-docs/dictionary${NC}"
223223
fi
224-
if [ ! -f "AI.md" ]; then
225-
echo -e "${RED} Missing: AI.md in project root${NC}"
224+
if [ ! -f "test-docs/AI.md" ]; then
225+
echo -e "${RED} Missing: test-docs/AI.md in installation directory${NC}"
226226
fi
227227
cd ..
228228
exit 1

0 commit comments

Comments
 (0)