unix-goto Development Expert
Comprehensive development expertise for the unix-goto shell navigation system - a high-performance Unix navigation tool with natural language support, sub-100ms cached navigation, and 100% test coverage.
When to Use This Skill
Use this skill when:
- Developing new features for unix-goto shell navigation system
- Implementing cache-based navigation optimizations
- Adding bookmarks, history, or navigation commands
- Following the standard 9-step feature addition workflow
- Integrating with Linear project management
- Writing comprehensive test suites (100% coverage required)
- Optimizing performance to meet <100ms targets
- Creating API documentation for shell modules
- Debugging navigation or cache issues
Do NOT use this skill for:
- General bash scripting (use generic bash skills)
- Non-navigation shell tools
- Projects without performance requirements
- Simple one-off shell scripts
Project Overview
unix-goto System Architecture
unix-goto is a high-performance Unix navigation system designed with five core principles:
- Simple - ONE-line loading (
source goto.sh), minimal configuration - Fast - Sub-100ms navigation performance
- Lean - No bloat, no unnecessary dependencies
- Tested - 100% test coverage for core features
- Documented - Clear, comprehensive documentation
Key Performance Metrics
System Architecture
Module Dependencies
Critical Load Order (dependencies must load before dependents):
Core Knowledge
The 9-Step Feature Addition Workflow
This is the STANDARD process for adding any feature to unix-goto. Follow ALL nine steps.
Step 1: Plan Your Feature
Before writing ANY code, answer these questions:
Planning Questions:
- What problem does this solve?
- What's the user interface (commands/flags)?
- What's the expected performance?
- What dependencies exist?
- What tests are needed?
- What documentation is required?
Planning Template:
Example - Recent Directories Feature (CET-77):
Step 2: Create Module (if needed)
Module Template:
Key Module Patterns:
-
Function Naming:
- Public functions: no prefix (
goto,bookmark,recent) - Internal functions: double underscore (
__goto_navigate_to,__goto_cache_lookup) - Variables: UPPERCASE for globals, lowercase for locals
- Public functions: no prefix (
-
Environment Variables:
-
Return Codes:
0- Success1- General error (not found, invalid input)2- Multiple matches found (cache lookup only)
Step 3: Add to Loader
Edit goto.sh to load your module in the correct dependency order:
Dependency Rules:
- Modules with no dependencies load first
- Modules depending on others load AFTER dependencies
- Main goto-function.sh loads LAST (depends on everything)
Step 4: Integrate with Main Function
Edit lib/goto-function.sh to route commands to your module:
Step 5: Add Tests (100% Coverage Required)
Test File Template:
Test Categories (ALL Required):
- Unit Tests - Test individual functions
- Integration Tests - Test module interaction
- Edge Cases - Test boundary conditions
- Performance Tests - Validate speed requirements
Example from CET-77 (Recent Directories):
Step 6: Document API
Add to docs/API.md:
Subcommands:
list- [Description]add- [Description]
Performance: [Target metrics]
Examples:
Return Codes:
- 0 - Success
- 1 - Error
Implementation: lib/module.sh
Parameters:
n- Optional number of recent directories to display (default: all)
Performance: <10ms for history retrieval
Examples:
Implementation: lib/recent-command.sh
Performance Targets:
- Cached navigation: <100ms
- Bookmark lookup: <10ms
- Cache speedup: >20x
- Cache hit rate: >90%
- Cache build: <5s
Step 9: Linear Issue Update & Commit
Update Linear Issue:
- Add implementation comment
- Include test results
- Include performance metrics
- Link to commit
- Move to "Complete"
Commit Format:
Commit Types:
feat:- New featurefix:- Bug fixperf:- Performance improvementrefactor:- Code refactoringtest:- Add or update testsdocs:- Documentation onlychore:- Build, dependencies, or tooling
Example Commit from CET-85:
Feature Checklist
Before submitting ANY feature:
- Implementation complete
- Loaded in
goto.sh - Integrated with main
gotofunction - Tests written and passing (100% coverage)
- API documented in
docs/API.md - User documentation updated in
README.md - Performance validated (if applicable)
- Linear issue updated with results
- Committed with proper message format
Cache System Architecture
Purpose: O(1) folder lookup with automatic refresh
Implementation: lib/cache-index.sh
Key Components:
__goto_cache_build- O(n) index building__goto_cache_lookup- O(1) hash table lookup__goto_cache_is_valid- TTL-based validation- Auto-refresh on stale cache (24-hour TTL)
Cache File Format:
Performance:
- Build time: O(n) - 3-5s for 1200+ folders
- Lookup time: O(1) - <100ms target, 26ms actual
- Storage: ~42KB for 487 folders
Cache Lookup Return Codes:
Navigation Data Flow
Bookmark System Architecture
Storage: ~/.goto_bookmarks
Format:
Key Functions:
__goto_bookmark_add- Add with validation__goto_bookmark_remove- Remove by name__goto_bookmark_get- Retrieve path (O(1) grep)__goto_bookmark_goto- Navigate to bookmark
Performance Target: <10ms lookup time
Usage:
History Tracking Architecture
Storage: ~/.goto_history
Format:
Key Functions:
__goto_track- Append with auto-trim (max 100 entries)__goto_get_history- Retrieve full history__goto_recent_dirs- Get unique directories in reverse chronological order__goto_stack_push/pop- Stack-based back navigation
Example Usage:
Examples
Example 1: Adding a Recent Directories Feature (CET-77)
Step 1: Plan
Step 2: Create Module (lib/recent-command.sh)
Step 3: Add to Loader (goto.sh)
Step 4: Integrate (lib/goto-function.sh)
Step 5: Add Tests (test-recent.sh)
Step 6: Document API (docs/API.md)
Step 9: Commit
Example 2: Adding Benchmark Suite (CET-85)
Complete benchmark implementation with helpers, workspace, and CSV storage.
Benchmark Structure (benchmarks/bench-cached-vs-uncached.sh)
Benchmark Helpers (benchmarks/bench-helpers.sh)
Best Practices
Code Style Standards
Function Structure:
Error Handling:
Comments:
Data File Format Pattern
Standard format: Pipe-delimited with metadata header
Performance Optimization Tips
Cache System:
- Use cache for all lookups
- Limit recursive search depth
- Avoid redundant filesystem operations
- Use
grepfor fast text matching
Memory:
- Cache file: <100KB for 500 folders
- Memory usage: Minimal (shell functions only)
- No persistent processes
Debugging Tips
Enable Bash Tracing:
Check Function Existence:
Debug Cache Issues:
Linear Workflow Integration
Linear Project Details:
- Team: Ceti-luxor
- Project: unix-goto - Shell Navigation Tool
- Project ID: 7232cafe-cb71-4310-856a-0d584e6f3df0
Issue Lifecycle:
Standard Workflow:
- Pick an issue from Phase 3 backlog
- Move to "In Progress" in Linear
- Create feature branch:
feature/CET-XX-feature-name - Implement following 9-step workflow
- Test thoroughly (100% coverage)
- Commit with proper format
- Update Linear issue with results
- Move to "Complete"
Linear Issue Template:
Quick Reference
Essential Commands
File Locations
Performance Targets Summary
Skill Version: 1.0 Last Updated: October 2025 Maintained By: Manu Tej + Claude Code Source Repository: https://github.com/manutej/unix-goto


