Skip to content

Latest commit

 

History

History
336 lines (241 loc) · 8.18 KB

File metadata and controls

336 lines (241 loc) · 8.18 KB

GSBot Roadmap

Project Status: Alpha

GSBot is a feature-complete Discord bot for garment sustainability education and tracking. The core functionality is implemented and ready for community testing.

Completed Features

Core Bot Infrastructure

Feature Description Status

poise/serenity Integration

Full Discord bot with async (tokio) prefix-command handling; one Rust module per former cog

Done

sqlx + SQLite

Complete data layer with row structs and SQL migrations applied at startup via sqlx::migrate! (SQLite only)

Done

Caching Layer

TTL and LRU caching for database queries and expensive operations

Done

Logging System

tracing console output with optional file logging (tracing-appender)

Done

Configuration

dotenvy environment-based settings with validation

Done

SPARK seam (src/domain.rs)

Pure, total scoring kernel exposing a stable C ABI in mod ffi so a formally-verified SPARK/Ada module can be substituted with no caller changes

Done

Sustainability Commands

Command Functionality Status

!sustainability

Calculate and display sustainability score for garments with water, carbon, energy metrics

Done

!alternatives

Find more sustainable alternatives in the same garment category

Done

!care

Generate material-specific care instructions to extend garment life

Done

!tips

Display random sustainability tips for conscious consumption

Done

Material Analysis

Command Functionality Status

!impact

Detailed environmental impact breakdown: water usage, carbon footprint, biodegradability, chemical usage, energy consumption

Done

!compare

Side-by-side comparison of two materials across all sustainability metrics

Done

!search

Search materials and garments by name, description, or category

Done

Brand Intelligence

Command Functionality Status

!brands

View top-rated sustainable brands with overall ratings

Done

!brands <name>

Detailed brand profile: environmental, labor, animal welfare ratings, certifications, transparency scores

Done

Gamification System

Feature Description Status

Points System

Earn points for sustainability queries (2-7 points per action)

Done

Leveling

Level progression every 100 points

Done

Ranks

5-tier rank system: Learner → Conscious Consumer → Enthusiast → Eco Warrior → Champion

Done

!profile

User statistics, rank, level, points, preferences

Done

!leaderboard

Top 10 sustainability champions

Done

!setpreference

Configure materials, budget, priority preferences

Done

Data Models

Model Attributes Status

Material

5 environmental scores, production metrics, biodegradability, recycling potential, care requirements

Done

Garment

Category, materials relationship, weight, lifespan, care instructions, calculated sustainability score

Done

Brand

3 rating dimensions, 5 certification flags, transparency score, Good On You rating

Done

User

Discord ID, points, level, queries count, preferences

Done

Testing

Type Coverage Status

Unit Tests

Model calculations, grade assignment, certification badges, point/leveling system

Done

Integration Tests

Bot command execution flows

Done

Test Infrastructure

cargo test --all-targets with tempfile / in-memory SQLite

Done

Phase 1: Production Readiness

Target: Prepare for public deployment

Database & Data

  • ❏ Curate initial material dataset (20+ common materials with verified metrics)

  • ❏ Curate garment dataset (50+ common garment types)

  • ❏ Integrate Good On You API or scrape verified brand data

  • ❏ Database backup and recovery procedures (see gsbot-backup-db)

Deployment

  • ❏ Container optimization (multi-stage build, minimal image)

  • ❏ Health check endpoints

  • ❏ Graceful shutdown handling

  • ❏ Kubernetes manifests or docker-compose production config

  • ❏ Secret management (Vault, SOPS, or sealed secrets)

Observability

  • ❏ Prometheus metrics endpoint

  • ❏ Grafana dashboard templates

  • ❏ Error tracking (Sentry integration)

  • ❏ Command usage analytics

Security

  • ❏ Rate limiting per user/guild

  • ❏ Input sanitization audit

  • ❏ Dependency vulnerability scanning in CI

  • ❏ Bot permission audit (minimal required permissions)

Phase 2: Data Enrichment

Target: Comprehensive sustainability intelligence

External Integrations

  • ❏ Good On You API integration for real-time brand ratings

  • ❏ Open Apparel Registry integration for supply chain transparency

  • ❏ Life Cycle Assessment (LCA) database connections

  • ❏ Fashion Revolution transparency index data

Enhanced Scoring

  • ❏ Multi-factor scoring with configurable weights

  • ❏ Regional impact variations (production location matters)

  • ❏ Seasonal recommendations

  • ❏ Price-per-wear calculations

New Commands

  • !lifecycle - Full garment lifecycle analysis

  • !certifications - Explain certification meanings (GOTS, OEKO-TEX, etc.)

  • !carbon - Carbon footprint calculator for wardrobe

  • !supply-chain - Brand supply chain transparency

Phase 3: Personalization

Target: Tailored sustainability guidance

User Features

  • ❏ Wardrobe tracking (what you own)

  • ❏ Purchase history logging

  • ❏ Personal sustainability dashboard

  • ❏ Goal setting and progress tracking

  • ❏ Achievement badges beyond ranks

Recommendations

  • ❏ Personalized alternative suggestions based on preferences

  • ❏ Budget-aware recommendations

  • ❏ Style-compatible sustainable swaps

  • ❏ Seasonal wardrobe planning

Notifications

  • ❏ Scheduled sustainability tips

  • ❏ New sustainable brand alerts

  • ❏ Certification updates for tracked brands

Phase 4: Community Features

Target: Social sustainability

Social Features

  • ❏ Clothing swap coordination

  • ❏ Guild leaderboards (per server)

  • ❏ Community challenges

  • ❏ Sustainability streaks

  • ❏ Share achievements

Content

  • ❏ User-submitted garment care tips

  • ❏ Community brand reviews

  • ❏ Sustainable find sharing

  • ❏ Local resource discovery

Phase 5: Platform Expansion

Target: Multi-platform presence

Additional Platforms

  • ❏ Slack workspace bot

  • ❏ Telegram bot

  • ❏ Web dashboard (readonly initially)

  • ❏ REST API for third-party integrations

Advanced Features

  • ❏ Image recognition for garment identification

  • ❏ Receipt/tag OCR for material composition

  • ❏ ML-powered recommendations

  • ❏ Natural language queries

Architecture Migration Notes

The Python → Rust/SPARK migration is complete. The current implementation uses:

  • poise 0.6 over serenity 0.12 (async Discord interactions via tokio)

  • sqlx 0.8 + SQLite (sqlx::migrate! applied at startup)

  • tracing / tracing-subscriber / tracing-appender (logging)

  • anyhow / thiserror (errors), dotenvy (config)

  • cargo test --all-targets (testing)

The Python prototype has been removed in full. Per the hyperpolymath estate Rust/SPARK standard (which governs over any generic template), no banned-language file may be reintroduced — the Hypatia scanner self-scans this repository and treats any such file as a CRITICAL finding.

Future verification path (the SPARK seam is already in place):

  1. src/domain.rs is the pure, total scoring kernel and exposes a stable C ABI in mod ffi.

  2. Specify and formally verify a SPARK/Ada implementation of that numeric core.

  3. Link it in place of the Rust bodies via the hyperpolymath Zig-FFI / Idris2-ABI pattern — callers go through the safe Rust wrappers, so the substitution is transparent and requires no caller changes.

Contributing

See CONTRIBUTING.md for development guidelines.

Priority areas for contribution:

  1. Data curation - Verified material and brand datasets

  2. Testing - Expand integration test coverage

  3. Documentation - User guides and command examples

  4. Localization - Multi-language support

License

MPL-2.0 - see LICENSE.txt