Files
2026-05-27 23:29:53 +01:00

2.8 KiB

Tasks: enterprise-bytes

Plan reference: docs/superpowers/plans/2026-04-20-utils-migration.md

Task 1.1 — OpenSpec + scaffold

  • Create openspec/changes/enterprise-bytes/proposal.md
  • Create openspec/changes/enterprise-bytes/tasks.md
  • Create package directory universal/primitives/bytes/ with all config files
  • Run bun install to register workspace
  • Commit: chore(bytes): scaffold package

Task 1.2 — Error class + types

  • src/errors/bytes-error.ts — BytesError, BYTES_CODES, BytesCode
  • src/errors/index.ts — barrel
  • src/types/types.ts — InputFormat, OutputFormat, BytesInput
  • src/types/index.ts — barrel
  • src/index.ts — root barrel
  • Commit: feat(bytes): add error class and types

Task 1.3 — encoding module (TDD)

  • Write tests in src/encoding/encoding.test.ts → confirm FAIL
  • Implement src/encoding/encoding.ts
  • Confirm tests PASS
  • Create src/encoding/encoding.schemas.ts
  • Create src/encoding/encoding.md (≥200 words, 6 sections)
  • Create src/encoding/index.ts barrel
  • Commit: feat(bytes): add encoding module (hex/base64/utf8)

Task 1.4 — uint8 module (TDD)

  • Write tests in src/uint8/uint8.test.ts → confirm FAIL
  • Implement src/uint8/uint8.ts
  • Confirm tests PASS
  • Create src/uint8/uint8.schemas.ts
  • Create src/uint8/uint8.md (≥200 words, 6 sections)
  • Create src/uint8/index.ts barrel
  • Commit: feat(bytes): add uint8 module

Task 1.5 — uuid module (TDD)

  • Write tests in src/uuid/uuid.test.ts → confirm FAIL
  • Implement src/uuid/uuid.ts
  • Confirm tests PASS
  • Create src/uuid/uuid.schemas.ts
  • Create src/uuid/uuid.md (≥200 words, 6 sections)
  • Create src/uuid/index.ts barrel
  • Commit: feat(bytes): add uuid module

Task 1.6 — Property tests (fast-check)

  • Add fast-check tests to encoding.test.ts and uint8.test.ts
  • Confirm all PASS
  • Commit: test(bytes): add fast-check property tests

Task 1.7 — Benchmarks

  • Create src/__benchmarks__/encoding.bench.ts
  • Run benchmark and capture output
  • Commit: bench(bytes): add encoding benchmarks

Task 1.8 — README + docs check

  • Create README.md at package root
  • Run bun run docs:check --filter=@suaveplan/bytes — must pass 100%
  • Commit: docs(bytes): add README

Task 1.9 — Pre-publish gate + publish

  • bunx turbo lint typecheck test --filter=@suaveplan/bytes — green
  • bunx turbo test:coverage --filter=@suaveplan/bytes — 100% all thresholds
  • bun scripts/publish.ts --package @suaveplan/bytes
  • Archive openspec change
  • Create openspec/specs/bytes/spec.md
  • Commit: release(bytes): v0.0.0 — publish to Verdaccio