Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 21 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ A curated collection of action-oriented keywords organized in a modular structur

## πŸ“¦ Installation & Usage

### πŸ€– AI Assistant Configuration

When you run the installer, a file named `AI.md` is copied to your project's root directory. This file contains shared instructions and context for any AI assistant you use, ensuring it understands the project's conventions and the "Information Dense Keywords" command set.

You are encouraged to customize this file with project-specific details.

### For Individual Users

#### Option 1: NPX Install (Recommended)
Expand All @@ -38,17 +44,7 @@ npx @stillrivercode/information-dense-keywords /path/to/custom/docs

### For Teams & Organizations

#### Option 1: Git Submodule

```bash
# Add as a submodule to your project
git submodule add https://github.com/stillriver/idk.git docs/idk

# Reference in your project documentation
echo "See [IDK Dictionary](information-dense-keywords.md) for AI command reference" >> README.md
```bash

#### Option 2: Fork & Customize
#### Fork & Customize

```bash
# Fork the repository on GitHub
Expand All @@ -60,7 +56,7 @@ cd idk
mkdir dictionary/custom
# Add your team-specific commands to dictionary/custom/
# Update information-dense-keywords.md with links to your custom commands
```bash
```

### For AI Assistant Developers

Expand All @@ -80,7 +76,7 @@ SELECT the authentication logic from auth.py
CREATE a React login component
FIX the validation error in user registration
DELETE the unused styling files
```bash
```

### Advanced Commands

Expand All @@ -90,18 +86,18 @@ debug this memory leak in the payment processor
optimize this query that's taking 10 seconds
test this user service with comprehensive unit tests
review this pull request for security vulnerabilities
```bash
```

### Command Chaining

```bash
research this OAuth2 patterns then spec this authentication system then plan this implementation
analyze this API performance then optimize this bottleneck then test this solution
```bash
```

## πŸ“ Dictionary Structure

```bash
```text
information-dense-keywords.md # Main index with links to all commands
dictionary/
β”œβ”€β”€ core/ # SELECT, CREATE, DELETE, FIX
Expand All @@ -110,7 +106,7 @@ dictionary/
β”œβ”€β”€ quality-assurance/ # test this, review this
β”œβ”€β”€ workflow/ # plan this, spec this
└── git/ # commit, push, pr, gh, comment
```bash
```

## πŸŽ“ Learning Path

Expand Down Expand Up @@ -139,14 +135,14 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.

## πŸ“‹ Command Categories

| Category | Commands | Purpose |
|----------|----------|---------|
| **Core** | SELECT, CREATE, DELETE, FIX | Basic operations |
| **Development** | analyze this, debug this, optimize this | Code analysis & improvement |
| **Documentation** | document this, explain this, research this | Knowledge creation |
| **Quality Assurance** | test this, review this | Testing & validation |
| **Workflow** | plan this, spec this | Project planning |
| **Git** | commit, push, pr, gh, comment | Version control |
| Category | Commands | Purpose |
|-----------------------|---------------------------------------------|------------------------------|
| **Core** | SELECT, CREATE, DELETE, FIX | Basic operations |
| **Development** | analyze this, debug this, optimize this | Code analysis & improvement |
| **Documentation** | document this, explain this, research this | Knowledge creation |
| **Quality Assurance** | test this, review this | Testing & validation |
| **Workflow** | plan this, spec this | Project planning |
| **Git** | commit, push, pr, gh, comment | Version control |

## πŸ”— Related Resources

Expand Down
6 changes: 5 additions & 1 deletion dictionary/documentation/document-this.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Category**: Documentation Commands

**Definition**: When a user issues a `document this` command, they are asking you to create comprehensive documentation including purpose, usage, examples, and API references where applicable.
**Definition**: When a user issues a `document this` command, they are asking you to create comprehensive documentation including purpose, usage, examples, and API references where applicable. The documentation should be saved as a markdown file in the `docs/` directory with a descriptive filename.

## Example Prompts

Expand Down Expand Up @@ -83,6 +83,10 @@ Brief description of purpose and functionality.
- Use consistent formatting and terminology
- Add diagrams or screenshots when helpful
- Keep documentation close to the code it describes
- Save documentation as `.md` files in `docs/` directory
- Use descriptive filenames (e.g., `api-authentication-guide.md`)
- Organize into subdirectories for complex projects (e.g., `docs/api/`, `docs/components/`)
- Create the `docs/` directory if it doesn't exist

## Related Commands

Expand Down
6 changes: 5 additions & 1 deletion dictionary/documentation/research-this.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

**Definition**: When a user issues a `research this` command, they are asking you to investigate and gather comprehensive
information about a topic, technology, pattern, or concept. This includes collecting information from multiple sources,
analyzing current best practices, and providing a thorough research summary.
analyzing current best practices, and providing a thorough research summary. The research should be saved as a markdown
file in the `docs/research/` directory with a descriptive filename.

## Example Prompts

Expand Down Expand Up @@ -105,6 +106,9 @@ Summary of key takeaways and next steps for implementation.
- Include practical implementation considerations
- Provide balanced analysis of pros and cons
- Consider the specific context and requirements
- Save research as `.md` files in `docs/research/` directory
- Use descriptive filenames (e.g., `oauth2-microservices-patterns.md`)
- Create the `docs/research/` directory if it doesn't exist

## Related Commands

Expand Down
19 changes: 17 additions & 2 deletions docs/roadmaps/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This roadmap reflects the current state of the Information Dense Keywords Dictio

- **Implementation:** `AI.md`, `CLAUDE.md`, `GEMINI.md` for assistant-specific guidance
- **Integration:** Cross-platform support for any AI assistant
- **Enhanced Deployment:** Installer automatically copies `AI.md` to project root for seamless AI assistant integration

βœ… **Automated Quality Assurance:**

Expand Down Expand Up @@ -185,9 +186,23 @@ productivity and consistency across the industry.

---

## Recent Progress (2025-07-14)
## Recent Progress (2025-07-16)

βœ… **Completed Modular Dictionary Architecture:**
βœ… **Enhanced Documentation Commands & Installer:**

- **Updated "research this" command** to create `.md` files in `docs/research/` directory
- **Updated "document this" command** to create `.md` files in `docs/` directory
- **Enhanced installer with AI.md integration** - copies `AI.md` to project root for AI assistant reference
- **Added comprehensive AI Assistant Configuration** documentation in README.md
- **Implemented robust security checks** in installer to prevent system directory installations
- **Added 8 comprehensive test scenarios** covering all installation edge cases:
- Default installation, custom directory, file structure validation
- Overwrite functionality, paths with spaces, AI.md content validation
- System directory protection, top-level directory installation
- **Fixed markdown formatting issues** in README.md and improved table alignment
- **Removed outdated Git submodule installation** option for simplified setup

βœ… **Previous Progress (2025-07-14):**

- **Restructured to modular architecture** with organized `dictionary/` subdirectories
- **Converted main file to index** with direct links to detailed command definitions
Expand Down
22 changes: 21 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ DEFAULT_INSTALL_DIR="./docs"
# Parse command line arguments
INSTALL_DIR="${1:-$DEFAULT_INSTALL_DIR}"

# Prevent installation in sensitive system directories
if [[ "$INSTALL_DIR" == "/" || "$INSTALL_DIR" == "/etc" || "$INSTALL_DIR" == "/usr"* || "$INSTALL_DIR" == "/var"* || "$INSTALL_DIR" == "/bin"* || "$INSTALL_DIR" == "/sbin"* ]]; then
echo -e "${RED}Error: Installation in system directory '$INSTALL_DIR' is not allowed${NC}"
echo "Please choose a different directory for installation."
exit 1
fi

echo -e "${GREEN}Information Dense Keywords Dictionary Installer${NC}"
echo "================================================"
echo ""
Expand All @@ -32,6 +39,11 @@ if [ ! -d "dictionary" ]; then
exit 1
fi

if [ ! -f "AI.md" ]; then
echo -e "${RED}Error: AI.md not found in current directory${NC}"
exit 1
fi

# Create docs directory if it doesn't exist
echo -e "${YELLOW}Installing to: ${INSTALL_DIR}${NC}"
mkdir -p "$INSTALL_DIR"
Expand All @@ -43,14 +55,22 @@ cp "information-dense-keywords.md" "$INSTALL_DIR/"
echo "Copying dictionary directory..."
cp -r "dictionary" "$INSTALL_DIR/"

# Copy AI.md to project root (parent of install directory)
echo "Copying AI.md to project root..."
# Use realpath to resolve the absolute path of the parent directory ('project root').
# This robustly handles cases like relative paths (e.g., './docs') or nested paths.
PROJECT_ROOT=$(realpath "$INSTALL_DIR/..")
cp "AI.md" "$PROJECT_ROOT/"

# Verify installation
if [ -f "$INSTALL_DIR/information-dense-keywords.md" ] && [ -d "$INSTALL_DIR/dictionary" ]; then
if [ -f "$INSTALL_DIR/information-dense-keywords.md" ] && [ -d "$INSTALL_DIR/dictionary" ] && [ -f "$PROJECT_ROOT/AI.md" ]; then
echo ""
echo -e "${GREEN}βœ“ Installation completed successfully!${NC}"
echo ""
echo "Installed files:"
echo " - $INSTALL_DIR/information-dense-keywords.md"
echo " - $INSTALL_DIR/dictionary/"
echo " - $PROJECT_ROOT/AI.md"
echo ""
echo "Dictionary structure:"
find "$INSTALL_DIR/dictionary" -name "*.md" | sort | sed 's/^/ /'
Expand Down
88 changes: 85 additions & 3 deletions test-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ CUSTOM_DIR="test-custom-docs"
cleanup() {
echo -e "${YELLOW}Cleaning up test directories...${NC}"
rm -rf "$TEST_DIR" "$CUSTOM_DIR"
# The final installation in ./docs is not removed by cleanup
}

# Set trap to cleanup on exit
Expand All @@ -31,23 +32,43 @@ trap cleanup EXIT
echo "Test 1: Default installation to ./docs"
echo "--------------------------------------"
rm -rf docs # Clean any existing docs
rm -f AI.md # Clean any existing AI.md
./install.sh
if [ -f "docs/information-dense-keywords.md" ] && [ -d "docs/dictionary" ]; then
if [ -f "docs/information-dense-keywords.md" ] && [ -d "docs/dictionary" ] && [ -f "AI.md" ]; then
echo -e "${GREEN}βœ“ Test 1 passed: Default installation successful${NC}"
else
echo -e "${RED}βœ— Test 1 failed: Default installation failed${NC}"
if [ ! -f "docs/information-dense-keywords.md" ]; then
echo -e "${RED} Missing: docs/information-dense-keywords.md${NC}"
fi
if [ ! -d "docs/dictionary" ]; then
echo -e "${RED} Missing: docs/dictionary${NC}"
fi
if [ ! -f "AI.md" ]; then
echo -e "${RED} Missing: AI.md in project root${NC}"
fi
exit 1
fi

echo ""
echo "Test 2: Custom directory installation"
echo "------------------------------------"
mkdir -p "$TEST_DIR"
rm -f "$TEST_DIR/AI.md" # Clean any existing AI.md
./install.sh "$TEST_DIR/my-docs"
if [ -f "$TEST_DIR/my-docs/information-dense-keywords.md" ] && [ -d "$TEST_DIR/my-docs/dictionary" ]; then
if [ -f "$TEST_DIR/my-docs/information-dense-keywords.md" ] && [ -d "$TEST_DIR/my-docs/dictionary" ] && [ -f "$TEST_DIR/AI.md" ]; then
echo -e "${GREEN}βœ“ Test 2 passed: Custom directory installation successful${NC}"
else
echo -e "${RED}βœ— Test 2 failed: Custom directory installation failed${NC}"
if [ ! -f "$TEST_DIR/my-docs/information-dense-keywords.md" ]; then
echo -e "${RED} Missing: $TEST_DIR/my-docs/information-dense-keywords.md${NC}"
fi
if [ ! -d "$TEST_DIR/my-docs/dictionary" ]; then
echo -e "${RED} Missing: $TEST_DIR/my-docs/dictionary${NC}"
fi
if [ ! -f "$TEST_DIR/AI.md" ]; then
echo -e "${RED} Missing: $TEST_DIR/AI.md in project root${NC}"
fi
exit 1
fi

Expand Down Expand Up @@ -107,11 +128,69 @@ echo ""
echo "Test 5: Installation with spaces in path"
echo "---------------------------------------"
mkdir -p "$CUSTOM_DIR/my docs with spaces"
rm -f "$CUSTOM_DIR/AI.md" # Clean any existing AI.md
./install.sh "$CUSTOM_DIR/my docs with spaces"
if [ -f "$CUSTOM_DIR/my docs with spaces/information-dense-keywords.md" ] && [ -d "$CUSTOM_DIR/my docs with spaces/dictionary" ]; then
if [ -f "$CUSTOM_DIR/my docs with spaces/information-dense-keywords.md" ] && [ -d "$CUSTOM_DIR/my docs with spaces/dictionary" ] && [ -f "$CUSTOM_DIR/AI.md" ]; then
echo -e "${GREEN}βœ“ Test 5 passed: Installation with spaces in path successful${NC}"
else
echo -e "${RED}βœ— Test 5 failed: Installation with spaces in path failed${NC}"
if [ ! -f "$CUSTOM_DIR/my docs with spaces/information-dense-keywords.md" ]; then
echo -e "${RED} Missing: $CUSTOM_DIR/my docs with spaces/information-dense-keywords.md${NC}"
fi
if [ ! -d "$CUSTOM_DIR/my docs with spaces/dictionary" ]; then
echo -e "${RED} Missing: $CUSTOM_DIR/my docs with spaces/dictionary${NC}"
fi
if [ ! -f "$CUSTOM_DIR/AI.md" ]; then
echo -e "${RED} Missing: $CUSTOM_DIR/AI.md in project root${NC}"
fi
exit 1
fi

echo ""
echo "Test 6: AI.md content validation"
echo "--------------------------------"
if grep -q "# AI.md - Shared Instructions for All AI Assistants" AI.md && grep -q "Information Dense Keywords" AI.md; then
echo -e "${GREEN}βœ“ Test 6 passed: AI.md content is valid${NC}"
else
echo -e "${RED}βœ— Test 6 failed: AI.md content is invalid${NC}"
if ! grep -q "# AI.md - Shared Instructions for All AI Assistants" AI.md; then
echo -e "${RED} Missing: AI.md header${NC}"
fi
if ! grep -q "Information Dense Keywords" AI.md; then
echo -e "${RED} Missing: Information Dense Keywords content${NC}"
fi
exit 1
fi

echo ""
echo "Test 7: System directory protection"
echo "-----------------------------------"
if ./install.sh / 2>&1 | grep -q "Installation in system directory '/' is not allowed"; then
echo -e "${GREEN}βœ“ Test 7 passed: System directory protection works${NC}"
else
echo -e "${RED}βœ— Test 7 failed: System directory protection failed${NC}"
exit 1
fi

echo ""
echo "Test 8: Top-level directory installation"
echo "----------------------------------------"
mkdir -p "$CUSTOM_DIR/my-project"
rm -f "$CUSTOM_DIR/AI.md" # Clean any existing AI.md
./install.sh "$CUSTOM_DIR/my-project"
if [ -f "$CUSTOM_DIR/my-project/information-dense-keywords.md" ] && [ -d "$CUSTOM_DIR/my-project/dictionary" ] && [ -f "$CUSTOM_DIR/AI.md" ]; then
echo -e "${GREEN}βœ“ Test 8 passed: Top-level directory installation successful${NC}"
else
echo -e "${RED}βœ— Test 8 failed: Top-level directory installation failed${NC}"
if [ ! -f "$CUSTOM_DIR/my-project/information-dense-keywords.md" ]; then
echo -e "${RED} Missing: $CUSTOM_DIR/my-project/information-dense-keywords.md${NC}"
fi
if [ ! -d "$CUSTOM_DIR/my-project/dictionary" ]; then
echo -e "${RED} Missing: $CUSTOM_DIR/my-project/dictionary${NC}"
fi
if [ ! -f "$CUSTOM_DIR/AI.md" ]; then
echo -e "${RED} Missing: $CUSTOM_DIR/AI.md in project root${NC}"
fi
exit 1
fi

Expand All @@ -124,6 +203,9 @@ echo "- Custom directory: βœ“"
echo "- File structure: βœ“"
echo "- Overwrite: βœ“"
echo "- Spaces in path: βœ“"
echo "- AI.md content: βœ“"
echo "- System directory protection: βœ“"
echo "- Top-level directory installation: βœ“"

# Cleanup test directories (docs stays for user)
rm -rf "$TEST_DIR" "$CUSTOM_DIR"