# Milestone Roadmap

## Milestone 1 — Foundation (Publishing `0.1.0`)

**Goal:** Core string, array, and error modules are complete and published to crates.io.

- [x] `str/case.rs` — all 12 case conversion functions with doctests
- [x] `str/transform.rs` — 25+ transform functions (slug, truncate, excerpt, squish, wrap…)
- [x] `str/inspect.rs` — 15+ inspection functions
- [x] `str/fluent.rs` — `Str::of()` builder with 30+ chainable methods and `when*` conditionals
- [x] `arr/ops.rs`, `arr/query.rs`, `arr/set.rs` — full collection API
- [x] `errors/kinds.rs` — `RokError` enum with AdonisJS-style codes + HTTP status
- [x] `errors/context.rs` — `ResultExt` trait and `wrap_error`
- [x] `fp/compose.rs` — `pipe`, `tap`, `compose`, `retry`
- [x] CI green: fmt + clippy + tests + doctests
- [x] Code coverage ≥ 90%
- [x] All files ≤ 400 lines

---

## Milestone 2 — Feature Modules (`0.2.0`)

**Goal:** Optional modules enabled via feature flags are ready for production.

- [x] `data/numbers.rs` — `format_number`, `format_currency`, `format_percentage`
- [x] `data/dates.rs` — chrono-backed date helpers (feature = "dates")
- [x] `data/ids.rs` — UUID v4/v7, ULID (feature = "ids")
- [x] `data/hashing.rs` — SHA-256, tokens (feature = "crypto")
- [x] `str/random.rs` — cryptographically secure `random()` and `password()` (feature = "random")
- [x] `str/plural.rs` — pluralize, singular, is_plural (feature = "unicode")
- [x] `fp/lazy.rs` — `Lazy<T>`, `memoize`, `once`
- [x] `types/guards.rs` — JSON type guards and dot-path access

---

## Milestone 3 — Stable API & Docs Site (`1.0.0`)

**Goal:** Public API is frozen and fully documented.

- [x] `cargo doc --all-features --no-deps` generates complete API reference
- [x] Deploy to GitHub Pages via CI
- [x] Add `#[non_exhaustive]` to `RokError` enum
- [x] Write migration guide from `0.x` to `1.0`
- [x] All public types implement `Debug + Clone + Send + Sync` where applicable
- [x] Minimum Supported Rust Version (MSRV) pinned to stable - 2 releases

---

## Milestone 4 — Comprehensive Documentation (`1.1.0`)

**Goal:** Provide extensive usage examples and guides for all modules.

- [x] Create `docs/examples.md` with comprehensive usage examples
- [x] Add module-level guides (README in each module folder)
- [x] Add "Recipes" section for common patterns (URL slugging, validation, etc.)
- [x] Add CONTRIBUTING.md guide
- [x] Add API comparison table (Laravel/AdonisJS/rok-utils)
- [ ] Host interactive playground on docs site

---

## Summary

This plan delivers a `rok-utils` crate that:

1. **Mirrors battle-tested APIs** — Laravel's `Str` and AdonisJS's `string` helpers are the benchmark; every function name and behavior maps to a known analogue
2. **Ergonomic by default** — the fluent `Str::of()` builder makes complex transformations readable and composable without intermediate variables
3. **Error-first design** — AdonisJS-style typed error codes (`E_NOT_FOUND`, `E_VALIDATION_FAILURE`) with HTTP status semantics baked in from day one
4. **Zero-bloat** — feature flags ensure consumers pay only for what they use
5. **Production-ready** — proptest invariants, criterion benchmarks, and ≥90% coverage before any milestone ships
