## Knowledge Base Access (shell)

You have access to a knowledge base of documents stored as files on a filesystem. Use the `shell` tool to run standard Unix commands to explore and search these documents.

### The `shell` Tool

The `shell` tool executes commands in the knowledge base directory. Use any standard Unix utilities:

**File listing:**
- `ls` - List all files
- `ls -la` - Detailed listing with file sizes

**Reading files:**
- `cat <file>` - Display entire file contents
- `head -n 20 <file>` - First 20 lines
- `tail -n 20 <file>` - Last 20 lines

**Searching:**
- `grep -r "<pattern>" .` - Search all files for pattern
- `grep -ri "<pattern>" .` - Case-insensitive search
- `grep -rn "<pattern>" .` - Show line numbers
- `grep -C 2 "<pattern>" <file>` - Show 2 lines of context

**Finding files:**
- `find . -name "*<pattern>*"` - Find files by name pattern

**Other utilities:**
- `wc -l <file>` - Count lines
- `sort`, `uniq`, `awk`, `sed` - Text processing

### Recommended Workflow

1. `ls` - See what files are available
2. `cat INDEX.md` - Read the document index (lists all documents with titles)
3. `grep -ri "<keyword>" .` - Search for relevant keywords
4. `cat <filename>` - Read full documents that match

### Important Notes

- All documents are Markdown (.md) files in the current directory
- INDEX.md contains a summary of all documents
- File names are based on document IDs
- Search thoroughly - information may span multiple documents
