traverse-framework / traverse-framework/registry
Publish small capability: text.normalize-whitespace (first-contributor friendly)
- Dominant language
- Rust
- Stars
- 1
- Forks
- 1
- Avg merge
- 1h 17m
- Merged PRs (30d)
- 217
Description
## Why
Registry already has a few `text.*` helpers (`text.detect-language`, `text.detect-entities`, `text.redact-entities`) and first-contributor tickets for [`text.slugify`](https://github.com/traverse-framework/registry/issues/485) / [`text.truncate`](https://github.com/traverse-framework/registry/issues/486). A tiny **normalize-whitespace** capability is another useful on-ramp: deterministic, no domain model, full publish path through coverage + signature gates.
## One-PR ask
Publish **`text.normalize-whitespace@1.0.0`**:
- Input: `{ "text": string, "collapse"?: boolean, "trim"?: boolean }`
- default `collapse` = `true` (any run of Unicode whitespace → a single ASCII space `U+0020`)
- default `trim` = `true` (strip leading/trailing whitespace after collapse)
- Output: `{ "text": string, "changed": boolean }`
- `changed` is `true` iff the output string differs from the input
- Include `capability-src/` with real Rust tests meeting registry coverage gates (`functions` 100%, lines/regions ≥ 95%)
- Use `traverse-cli capability publish` (or the documented scaffold) so `artifact.digest` / `artifact.url` survive
- Run `bash scripts/ci/pre_pr_check.sh ` before opening
Follow [`CONTRIBUTING.md`](https://github.com/traverse-framework/registry/blob/main/CONTRIBUTING.md) and existing `text.*` contracts for shape (`use_cases` persona/user-story format if required by FR-011). Keep this **separate** from #485 / #486 — one capability per PR.
## Out of scope
- Locale-specific whitespace folding beyond Unicode White_Space
- HTML entity decoding / markdown cleanup
- Changing registry CI gates
- Shipping slugify, truncate, or URL extraction in the same PR
## Done when
- CI green on the publish PR
- Capability appears in the next index release after merge
- Contract `use_cases` follow the current persona/user-story format if required
## Labels
`help wanted` · `good first issue` · `enhancement` · `no-spec-needed`
Contributor guide
Research direction
Start with CONTRIBUTING.md, the existing text.* contracts, and the documented capability scaffold or traverse-cli capability publish entry point. Add capability-src/ with the specified input/output behavior and Rust tests, then run bash scripts/ci/pre_pr_check.sh . Done means coverage and signature gates pass, artifact.digest and artifact.url survive publishing, CI is green, and the capability is included in the next index release.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- backend-api-design, release
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100