Skip to content

feat: add OCX registry support#66

Merged
marcusrbrown merged 12 commits into
mainfrom
feat/add-ocx-support
Feb 12, 2026
Merged

feat: add OCX registry support#66
marcusrbrown merged 12 commits into
mainfrom
feat/add-ocx-support

Conversation

@marcusrbrown
Copy link
Copy Markdown
Owner

Summary

  • Add OCX registry support with build script, registry source, profiles, and documentation
  • Include comprehensive test suite (21 tests, 452 assertions) for registry validation
  • Integrate registry build into CI/CD docs deployment pipeline

What's New

OCX Registry (registry/)

  • Registry source (registry.jsonc): 48 components — 11 skills, 24 agents, 9 commands, 2 bundles, 2 profiles
  • Build script (scripts/build-registry.ts): Validates and produces OCX Registry Protocol v1 output with semver validation, git tag version resolution, and file read error handling
  • Profiles: Standalone and OMO (Oh My OpenCode) configurations with AGENTS.md guides
  • Discovery: .well-known/ocx.json at docs site root

Documentation (docs/)

  • OCX Registry Guide: Installation, components, bundles, profiles, npm vs OCX comparison, dual installation, updating components, and troubleshooting
  • Solution doc: docs/solutions/code-quality/ocx-registry-review-fixes.md documenting the review fixes

CI/CD (.github/workflows/)

  • Registry build integrated into docs deployment (docs.yaml)
  • Registry validation added to PR checks (main.yaml)
  • Version resolved via git tags (no jq dependency)

Tests (tests/unit/registry.test.ts)

  • 21 tests validating: JSONC parsing, component existence, file integrity, bundle dependencies, profile completeness, unique naming, and manifest structure
  • 452 assertions with 0 lint warnings

Code Quality

Post-review fixes applied:

  1. Test complexity: Extracted 4 helpers to eliminate 5 cognitive complexity warnings
  2. Semver validation: Regex-based validation for --version flag with clear error messages
  3. Git tag fallback: Version resolution chain: CLI flag → git tag → package.json → 0.0.0-dev
  4. URL consistency: All registry URLs unified to canonical fro.bot/systematic
  5. CI simplification: Removed jq dependency, added fetch-tags: true

Verification

bun run lint        → 0 warnings, 4 infos
bun test            → 21 pass, 0 fail, 452 assertions
bun run typecheck   → clean
bun run docs:build  → 55 pages built

No changes to src/ directory. No new npm dependencies.

- Create registry.jsonc with 48 components (11 skills, 24 agents, 9 commands, 3 bundles, 1 plugin)
- Add standalone profile (Systematic only) at registry/files/profiles/standalone/
- Add OMO profile (Systematic + Oh My OpenCode) at registry/files/profiles/omo/
- Configure docs site to serve registry via .well-known/ocx.json discovery file
- Symlink registry/files/ to existing bundled assets (skills/, agents/, commands/)

All components follow OCX Registry Protocol v1 with proper namespacing and install targets.
Task 3: Registry build/validation script
- Create scripts/build-registry.ts with OCX Registry Protocol v1 compliance
- Validate all component files exist and match expected patterns
- Generate dist/registry/ output with index.json and packuments
- Compute SHA-256 hashes for all files
- Support --version flag for version injection
- Support --validate-only flag for CI checks
- Add registry:build and registry:validate npm scripts

Task 6: OCX documentation
- Add comprehensive OCX Registry Guide at docs/src/content/docs/guides/ocx-registry.mdx
- Document individual component installation (skills, agents, commands)
- Document bundle installation (all skills, all agents, all commands)
- Document profile usage (standalone and OMO profiles)
- Add npm vs OCX comparison table
- Update README.md with OCX installation alternative
- Note dual-installation behavior and bootstrap dependency
- Add registry/** and scripts/build-registry.ts to docs.yaml trigger paths
- Build registry after docs:generate with version from package.json
- Copy dist/registry/ to docs/dist/registry/ before gh-pages deploy
- Add registry validation job to main.yaml CI pipeline
- Validate registry on all PRs and pushes to ensure integrity
- Create tests/unit/registry.test.ts with 21 tests across 8 suites
- Validate JSONC parsing and structure
- Validate component types are valid OCX types
- Validate all component files exist on disk
- Validate multi-file skills list ALL files (no missing, no .DS_Store)
- Validate bundle dependencies resolve correctly
- Validate profile structure (required files present)
- Validate no duplicate component names
- Validate component naming conventions (agent-, cmd- prefixes)

All 349 tests pass including 21 new registry tests.
- Add semver validation for explicit --version flag
- Add git tag fallback to version resolution chain
- Add try-catch around file reads in buildPackument()
- Resolution order: CLI --version → git tag → package.json → 0.0.0-dev
CI workflow:
- Add fetch-tags: true to checkout for git describe support
- Remove jq dependency from registry build step
- Let build script handle version resolution automatically

Documentation:
- Add Updating Components section with ocx update workflows
- Add Troubleshooting section for common registry issues
- Extract validateComponentFiles helper for file existence checks
- Extract assertAllFilesExist helper for path resolution validation
- Extract collectDiskFiles helper for normalized file collection
- Extract getComponentsByType helper for component filtering
- Fix unused variable warning (noUnusedVariables)
- Eliminate 5 cognitive complexity warnings (noExcessiveCognitiveComplexity)
- Maintain 21 tests, 452 assertions (no logic changes)
- Update omo/ocx.jsonc registry URL
- Update standalone/ocx.jsonc registry URL
- Update standalone/AGENTS.md configuration example
- Remove incorrect registry.fro.bot subdomain references
Add solution documentation for the 5 code review findings addressed
on this branch: test complexity, semver validation, URL consistency,
CI simplification, and documentation gaps.
@marcusrbrown marcusrbrown self-assigned this Feb 12, 2026
…g concatenation

- Add "Registry" to required status checks in .github/settings.yml
- Convert string concatenation to template literals in build-registry.ts
@marcusrbrown marcusrbrown enabled auto-merge (squash) February 12, 2026 04:28
@marcusrbrown marcusrbrown enabled auto-merge (squash) February 12, 2026 04:43
@marcusrbrown marcusrbrown merged commit 14b2f28 into main Feb 12, 2026
10 checks passed
@marcusrbrown marcusrbrown deleted the feat/add-ocx-support branch February 12, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant