Skip to content

Reorganize lexicons into semantic namespaces - #142

Closed
holkexyz wants to merge 1 commit into
developfrom
feat/reorganize-lexicon-folders
Closed

Reorganize lexicons into semantic namespaces#142
holkexyz wants to merge 1 commit into
developfrom
feat/reorganize-lexicon-folders

Conversation

@holkexyz

@holkexyz holkexyz commented Feb 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Restructures the lexicon folder hierarchy into purpose-driven semantic namespaces
  • Renames all affected lexicon IDs and updates cross-references in descriptions
  • Regenerates SCHEMAS.md and all TypeScript types

New namespace structure

org/hypercerts/
├── defs.json
├── ontology/        → shared meaning & classifications
│   └── workScopeTag.json
├── claim/           → impact statements (the work itself)
│   ├── activity.json
│   ├── contributionDetails.json
│   ├── contributorInformation.json
│   └── rights.json
├── context/         → evidence, updates & discourse
│   ├── attachment.json
│   ├── evaluation.json
│   └── measurement.json
├── graph/           → relationships & consent-based links
│   └── acknowledgement.json
├── curation/        → organization & discovery views
│   └── collection.json
└── funding/         → economic flows
    └── receipt.json

app/certified/
├── defs.json
├── actor/           → identities
│   └── profile.json
├── badge/           → recognition & reputation
│   ├── definition.json
│   ├── award.json
│   └── response.json
└── geo/             → geographic information
    └── location.json

ID changes

Old ID New ID
app.certified.location app.certified.geo.location
org.hypercerts.claim.attachment org.hypercerts.context.attachment
org.hypercerts.claim.evaluation org.hypercerts.context.evaluation
org.hypercerts.claim.measurement org.hypercerts.context.measurement
org.hypercerts.acknowledgement org.hypercerts.graph.acknowledgement
org.hypercerts.claim.collection org.hypercerts.curation.collection
org.hypercerts.helper.workScopeTag org.hypercerts.ontology.workScopeTag

Note on other branches

  • celExpression.json (on feat/cel-work-scope-expressions) will move to ontology/ when rebased
  • post.json (on feat/add-post-lexicon) will move to context/ when rebased
  • organization.json (on feat/add-org-metadata-lexicon) is already in actor/ — no change needed

Test plan

  • npm run check passes (gen-api, lint, typecheck, build, test)
  • node scripts/check-lexicon-style.js — 0 errors
  • SCHEMAS.md regenerated with correct new IDs
  • Verify other open PRs can rebase cleanly onto this

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Reorganized lexicon folder structure into semantic namespaces for improved organization, including:
      • Location → app.certified.geo
      • Attachment, evaluation, measurement → org.hypercerts.context
      • Acknowledgement → org.hypercerts.graph
      • Collection → org.hypercerts.curation
      • Work scope tag → org.hypercerts.ontology
    • Updated all namespace references and identifiers accordingly.

Restructure lexicons into purpose-driven namespaces:

- app.certified.location → app.certified.geo.location
- org.hypercerts.claim.{attachment,evaluation,measurement} → org.hypercerts.context.*
- org.hypercerts.acknowledgement → org.hypercerts.graph.acknowledgement
- org.hypercerts.claim.collection → org.hypercerts.curation.collection
- org.hypercerts.helper.workScopeTag → org.hypercerts.ontology.workScopeTag

Updated all description cross-references, ERD comments, and SCHEMAS.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Feb 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: df1f02f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hypercerts-org/lexicon Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@holkexyz

Copy link
Copy Markdown
Member Author

Let's first merge the other changes before reorganizing the folder structure

@holkexyz holkexyz closed this Feb 25, 2026
@coderabbitai

coderabbitai Bot commented Feb 25, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2bb200c and df1f02f.

📒 Files selected for processing (12)
  • .changeset/reorganize-lexicon-folders.md
  • ERD.puml
  • SCHEMAS.md
  • lexicons/app/certified/geo/location.json
  • lexicons/org/hypercerts/claim/activity.json
  • lexicons/org/hypercerts/context/attachment.json
  • lexicons/org/hypercerts/context/evaluation.json
  • lexicons/org/hypercerts/context/measurement.json
  • lexicons/org/hypercerts/curation/collection.json
  • lexicons/org/hypercerts/graph/acknowledgement.json
  • lexicons/org/hypercerts/ontology/workScopeTag.json
  • scripts/generate-schemas.js

📝 Walkthrough

Walkthrough

This pull request reorganizes the Hypercerts lexicon by moving entities into semantic namespaces: location → app.certified.geo, attachment/evaluation/measurement → org.hypercerts.context, acknowledgement → org.hypercerts.graph, collection → org.hypercerts.curation, and workScopeTag → org.hypercerts.ontology. All references and identifiers are updated accordingly.

Changes

Cohort / File(s) Summary
Changeset Documentation
.changeset/reorganize-lexicon-folders.md
Minor version bump documentation describing the semantic namespace reorganization strategy for the lexicon package.
Entity Relationship Diagram
ERD.puml
Updated dataclass namespace declarations for attachment, measurement, evaluation, location, collection, and acknowledgement to reflect new semantic namespaces.
Schema Generation
SCHEMAS.md
Auto-generated schema documentation reflecting all namespace migrations, entity renames, and updated property definitions across reorganized lexicons.
Lexicon File Updates
lexicons/app/certified/geo/location.json, lexicons/org/hypercerts/context/attachment.json, lexicons/org/hypercerts/context/evaluation.json, lexicons/org/hypercerts/context/measurement.json
Updated public identifiers and references from old namespaces (org.hypercerts.claim.*, app.certified.location) to new semantic namespaces (org.hypercerts.context.*, app.certified.geo.location).
Additional Lexicon Reorganization
lexicons/org/hypercerts/curation/collection.json, lexicons/org/hypercerts/graph/acknowledgement.json, lexicons/org/hypercerts/ontology/workScopeTag.json
Updated top-level identifiers and internal references to consolidate entities under appropriate semantic namespace groupings.
Activity References
lexicons/org/hypercerts/claim/activity.json
Updated workScope and locations field descriptions to reference new namespaces (org.hypercerts.ontology.workScopeTag, app.certified.geo.location).
Schema Generation Script
scripts/generate-schemas.js
Updated ordering key for certified lexicons category to use new namespace identifier.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • update measurement schema #120 — Modifies the measurement lexicon schema, directly related to the movement of measurement from org.hypercerts.claim to org.hypercerts.context namespace.
  • Unify project and collection schemas #75 — Touches the collection entity definition, directly related to the renaming and movement of collection from org.hypercerts.claim to org.hypercerts.curation.
  • add logic model for workScope #107 — Modifies workScope-related lexicons and activity references, related to the relocation of workScopeTag from org.hypercerts.helper to org.hypercerts.ontology namespace.

Suggested reviewers

  • aspiers
  • s-adamantine
  • bitbeckers

Poem

🐰 A rabbit hops through folders bright,
Reorganizing left and right!
To context, graph, and curation neat,
Each lexicon finds its perfect seat. ✨
Namespaces clean, the structure's sweet!

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/reorganize-lexicon-folders

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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