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
4 changes: 3 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@
"Bash(open http://localhost:5176)",
"Bash(VITE_PORT=5175 pnpm dev)",
"Bash(open http://localhost:5175/tools/change-color-to-red)",
"WebFetch(domain:modelcontextprotocol.io)"
"WebFetch(domain:modelcontextprotocol.io)",
"Bash(npm run coverage:*)",
"WebFetch(domain:debrief.github.io)"
]
}
}
122 changes: 0 additions & 122 deletions .github/workflows/ci.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/deploy-pages.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,5 @@ __marimo__/
client/coverage/
client/test-results/
client/playwright-report/
examples/javascript-bundle/node_modules/
examples/javascript-bundle/coverage/
172 changes: 100 additions & 72 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,113 +4,141 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

ToolVault is a portable, self-contained service that delivers curated collections of analysis tools for scientists, analysts, and developers. It provides an interactive browser-based interface for discovering, running, and understanding tools with history tracking, version awareness, and spatial output visualization.
ToolVault is a portable, self-contained service that delivers curated collections of analysis tools for scientists, analysts, and developers. It provides an interactive browser-based interface for discovering, running, and understanding tools version awareness, and spatial output visualization.

## Project Structure

### Current Structure
### Current Implementation
```
/docs # Documentation including software requirements
/docs/ADRs # Architecture Decision Records
/prompts # APM (Agentic Project Management) framework guides
/tasks # Task tracking directory
/docs # Documentation including software requirements
/docs/ADRs # Architecture Decision Records
/prompts # APM (Agentic Project Management) framework guides
/prompts/tasks # Task Assignment Prompts for Phase 0 implementation
/examples/javascript-bundle # Mock JavaScript tool implementation (ACTIVE)
├── tools/ # JavaScript tool implementations using IIFE pattern
├── data/ # Sample GeoJSON data files
├── tests/ # Jest test files
├── index.json # Tool metadata for UI generation
└── package.json # Jest testing configuration
```

### Planned Structure
```
/client # SPA frontend (to be created)
/server # Flask/FastAPI backend (to be created)
/indexer # Bundle creation scripts (to be created)
/examples # Example tool bundles (to be created)
/client # React/TypeScript SPA frontend (Phase 1)
/server # Flask/FastAPI backend (Phase 3)
/indexer # Bundle creation scripts (Phase 2)
```

## Key Technologies
## Current Development Phase

### Frontend (Planned)
- Single Page Application (SPA)
- LeafletJS for spatial data visualization
- Metadata-driven UI from `index.json`

### Backend (Planned)
- Flask or FastAPI for REST API
- Embedded Jupyter server for notebooks
- Python-based tool execution
**Phase 0: JavaScript Mock Tools** (ACTIVE)
- Complete JavaScript tool bundle with 12 tools across 5 categories
- Tools use IIFE pattern and register in `window.ToolVault.tools` namespace
- Full Jest test suite with 100% coverage requirement
- Comprehensive `index.json` metadata for frontend integration

## Architecture Decisions

### Key Constraints
- **Offline capability**: All dependencies must be packaged in bundles
- **50 MB cap** for initial bundles
- **No authentication** in early phases
- **LeafletJS** preferred for spatial rendering

## APM Framework

This project uses an Agentic Project Management (APM) framework for AI-assisted development. Key APM assets include:
- Implementation plans
- Memory banks for tracking decisions
- Task assignment prompts
- Handover protocols for context transfer

When working with APM artifacts, refer to guides in `/prompts/01_Manager_Agent_Core_Guides/`.
### Key Architectural Patterns
- **Metadata-driven UI**: All interfaces generated from `index.json` (ADR-001)
- **Bundle-based distribution**: Self-contained tool packages (ADR-003)
- **IIFE tool pattern**: JavaScript tools use Immediately Invoked Function Expression pattern (ADR-013)
- **Offline-first**: All dependencies packaged in bundles
- **LeafletJS for spatial**: Preferred for GeoJSON visualization (ADR-005)

### Tool Implementation Pattern (JavaScript Bundle)
```javascript
(function() {
window.ToolVault = window.ToolVault || {};
window.ToolVault.tools = window.ToolVault.tools || {};

window.ToolVault.tools.toolName = function(input, params) {
// Tool implementation
return result;
};
})();
```

## Development Commands

Since no implementation exists yet, here are the anticipated commands for each component:

### Frontend (Future)
### JavaScript Bundle Testing
```bash
cd examples/javascript-bundle

# Install dependencies
npm install

# Development server
npm run dev
# Run all tests
npm test

# Build for production
npm run build
# Run tests in watch mode
npm run test:watch

# Run tests
npm test
# Run specific test file
npx jest tests/transform/translate.test.js

# Lint code
npm run lint
# Generate coverage report
npx jest --coverage
```

### Backend (Future)
```bash
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
### APM Framework Usage
The project uses an Agentic Project Management (APM) framework with specialized agents:
- **Agent_JS_Dev**: JavaScript tool implementation
- **Agent_Test_Specialist**: Comprehensive testing with 100% coverage
- **Agent_Frontend_Lead**: React/TypeScript frontend (Phase 1)

# Install dependencies
pip install -r requirements.txt
Task Assignment Prompts (TAPs) are in `/prompts/tasks/` and follow the pattern `Task_X.Y_Description.md`.

# Run development server
python app.py # or: uvicorn main:app --reload
## Tool Categories and Metadata

# Run tests
pytest
The JavaScript bundle implements 12 tools across 5 categories:

# Format code
black .
1. **Transform**: `translate-features`, `flip-horizontal`, `flip-vertical`
2. **Analysis**: `calculate-speed-series`, `calculate-direction-series`
3. **Statistics**: `average-speed`, `speed-histogram`
4. **Processing**: `smooth-polyline`
5. **I/O**: `import-rep`, `export-rep`, `export-csv`

# Lint code
ruff check .
```
All tools are defined in `examples/javascript-bundle/index.json` with complete metadata including:
- Input/output specifications
- Parameter schemas with defaults and validation
- Runtime type ("javascript")
- Category and tag classifications

### Indexer (Future)
```bash
# Generate bundle from repository
python indexer.py --repo /path/to/tools --output bundle.zip
## Testing Strategy

# Validate index.json
python validate_index.py index.json
### Coverage Requirements
- **100% code coverage** across all tool implementations
- Mathematical validation against reference data
- Edge case handling for coordinate systems, temporal data
- Integration testing for IIFE pattern tool loading
- Performance benchmarks for large datasets

### Test File Organization
```
/tests
├── transform/ # Geometric transformation tests
├── analysis/ # Temporal analysis tests
├── statistics/ # Statistical calculation tests
├── processing/ # Data processing tests
├── io/ # Import/export tests
└── integration/ # Cross-tool integration tests
```

## Key Files and Their Purposes

- `Implementation_Plan.md`: 12-week development roadmap across 4 phases
- `examples/javascript-bundle/index.json`: Complete tool metadata for Phase 1 UI generation
- `prompts/tasks/Task_0.X_*.md`: Detailed task assignments for Phase 0 completion
- `Memory_Bank.md`: Centralized logging for all agent work and decisions (if exists)
- `docs/ADRs/ADR-013-mock-javascript-toolset.md`: JavaScript tool implementation specification

## Important Notes

- The project uses Python for backend development with Flask/FastAPI preference
- Frontend should be framework-agnostic initially but production-ready
- All code should support offline operation without internet connectivity
- Spatial outputs should be rendered using LeafletJS
- The VS Code extension will integrate with the Debrief themed distribution
- Frontend will be React/TypeScript SPA with metadata-driven UI generation
- All code supports offline operation without internet connectivity
- Spatial outputs are rendered using LeafletJS
- In the future ToolVault will be consumed by Debrief, delivered as VS Code extensions
- JavaScript tools in Phase 0 use spherical geometry for accurate GPS calculations
- All temporal analysis tools support multiple timestamp formats (ISO 8601, Unix epoch)
Loading