Sync Hypercerts SDK with latest lexicons from the develop branch. Use when updating SDK dependencies, comparing lexicon versions, or reconciling changes between SDK and lexicons repository. Always check the CHANGELOG.md and diffs first to see exactly what changed between versions.
Compare the Hypercerts lexicons repository changes between the version the SDK currently depends on and the latest develop branch, then update SDK files accordingly.
@hypercerts-org/lexicon dependency in SDKExtract current dependency: Read SDK's packages/sdk-core/package.json for current @hypercerts-org/lexicon
version
Fetch develop branch: Get latest from lexicons repo develop branch
Compare versions: Determine semantic version difference
Review CHANGELOG:
For changes between normal releases, inspect CHANGELOG.md in the lexicons repo to understand changes between the
two versions.
For changes with beta pre-releases, CHANGELOG.md is not updated in the lexicons repo, but it is in released
packages, so you can download the latest version via:
tgz=$(npm pack @hypercerts-org/lexicon) && tar zxO package/CHANGELOG.md <$tgz >CHANGELOG.md && rm $tgz
Generate git diff: Show changes between the two versions in lexicons repo
Update SDK files: Modify SDK source files to reflect new lexicon imports/exports
. (current working directory)packages/sdk-core/package.jsonpackages/sdk-core/src/lexicons.ts../hypercerts-lexiconOLD_VERSION=$(jq -r '.dependencies["@hypercerts-org/lexicon"] // empty' packages/sdk-core/package.json)
if [ -z "$OLD_VERSION" ]; then
echo "Error: @hypercerts-org/lexicon dependency not found in packages/sdk-core/package.json" >&2
echo "Please ensure @hypercerts-org/lexicon is listed under dependencies before running this script." >&2
exit 1
fi
echo "Current SDK dependency: @hypercerts-org/lexicon@${OLD_VERSION}"
Note: OLD_VERSION is extracted without the v prefix (e.g., 0.10.0-beta.4). When using with git commands,
prepend v to match git tag format. The OLD_VERSION variable should be captured and preserved for use in subsequent
steps (Step 5). These commands should be executed in the same shell session to maintain variable state, or the variable
should be saved to a file or environment variable that persists across command executions.
# Ensure the lexicons repository is present in the expected location
if [ ! -d "../hypercerts-lexicon" ]; then
echo "Error: Lexicons repository not found at ../hypercerts-lexicon" >&2
echo "Please ensure the repository is cloned in the expected location." >&2
exit 1
fi
git -C ../hypercerts-lexicon fetch --tags origin
# Get the latest version tag from the lexicons repo (strip 'v' prefix for package manager)
NEW_VERSION=$(git -C ../hypercerts-lexicon tag --list 'v*' --sort=-version:refname | head -1 | sed 's/^v//')
echo "Latest lexicon version: ${NEW_VERSION}"
# Update to exact version (no ^ operator) using pnpm add with --save-exact
pnpm --filter @hypercerts-org/sdk-core add --save-exact @hypercerts-org/lexicon@${NEW_VERSION}
Note: NEW_VERSION is now set without the v prefix (e.g., 0.10.0-beta.11) for use with package managers. When
using with git commands in subsequent steps, prepend v to match git tag format.
After updating the dependency, read the lexicons CHANGELOG to understand what changed:
cat packages/sdk-core/node_modules/@hypercerts-org/lexicon/CHANGELOG.md
Look for:
HELPER_WORK_SCOPE_VERSION_* → WORK_SCOPE_VERSION_*)# Use OLD_VERSION from Step 1 and NEW_VERSION from Step 3 (both without the 'v' prefix)
# If running Step 5 independently, re-extract NEW_VERSION:
# NEW_VERSION=$(jq -r '.dependencies["@hypercerts-org/lexicon"]' packages/sdk-core/package.json)
echo "Comparing ${OLD_VERSION} (previous) to ${NEW_VERSION} (updated)"
# Check if versions are identical
if [ "${OLD_VERSION}" = "${NEW_VERSION}" ]; then
echo "OLD_VERSION and NEW_VERSION are identical; no diff to show."
else
# Construct git tag names (tags are of the form vX.Y.Z)
OLD_TAG="v${OLD_VERSION}"
NEW_TAG="v${NEW_VERSION}"
# Show files that changed between old and new versions
git -C ../hypercerts-lexicon diff "${OLD_TAG}..${NEW_TAG}" --stat
# Show detailed changes in lexicon JSON files
# Note: `head -200` limits output for readability; remove `| head -200` to see the full diff if needed.
git -C ../hypercerts-lexicon diff "${OLD_TAG}..${NEW_TAG}" -- '*.json' | head -200
fi
CRITICAL: Do NOT proceed beyond this step without explicit user approval.
Based on the CHANGELOG and git diff analysis, create a detailed plan document
(specs/lexicon-sync/v{OLD_VERSION}-v{NEW_VERSION}.md) that:
Groups changes by logical feature (not by file or lexicon)
For each feature, document:
Order changes logically:
Write the plan to specs/lexicon-sync/v{OLD_VERSION}-v{NEW_VERSION}.md
specs/lexicon-sync/ directory if it doesn't existExample plan structure:
# Lexicon Sync Plan: v{OLD} → v{NEW}
## Current Status
- Old version: ...
- New version: ...
- Build status: ...
- Test status: ...
## Changes to Implement
### Change 1: [Feature Name] (beta.X)
**CHANGELOG Reference**: PR #XXX - ...
**What Changed**:
- Bullet points describing the lexicon changes
**SDK Tasks**:
- [ ] Add/update JSDoc documentation to methods (e.g., createX(), updateX())
- [ ] Add type exports for Y if needed
- [ ] Add usage examples in method documentation
- [ ] Add/update tests
- [ ] Build and test
- [ ] Create changeset (minor/major - reason)
**Validation**:
- [ ] Format check passes (`pnpm format:check`)
- [ ] Lint passes (`pnpm lint`)
- [ ] Typecheck passes (`pnpm typecheck`)
- [ ] Build passes (`pnpm build`)
- [ ] Tests pass (`pnpm test`)
- [ ] Types export correctly
**Status**: ⏳ Pending / � In Progress / ✅ Complete
---
### Change 2: [Next Feature] (beta.Y)
**CHANGELOG Reference**: PR #YYY - ...
**What Changed**:
- ...
**SDK Tasks**:
- [ ] Task 1
- [ ] Task 2
- [ ] ...
**Validation**:
- [ ] Format check passes (`pnpm format:check`)
- [ ] Lint passes (`pnpm lint`)
- [ ] Typecheck passes (`pnpm typecheck`)
- [ ] Build passes (`pnpm build`)
- [ ] Tests pass (`pnpm test`)
- [ ] Types export correctly
**Status**: ⏳ Pending
---
Present this plan to the user and ask:
"I've analyzed the changes between v{OLD_VERSION} and v{NEW_VERSION} and created a plan in
specs/lexicon-sync/v{OLD_VERSION}-v{NEW_VERSION}.md.The plan breaks down the sync into {N} logical changes that will be implemented one at a time.
Should I proceed with implementing Change 1: [Feature Name]?"
Present the structured plan to the user and explicitly ask whether to:
If the user approves the plan, proceed to the next steps in this skill.
If the user requests modifications, revise the plan based on their feedback, re-present it, and remain in this step until an updated plan is explicitly approved.
If the user declines approval or cancels the sync, stop the sync process, do not execute any further steps in this skill, and summarize the current state and reasons for cancellation.
Wait for explicit user confirmation before proceeding to Step 7.
IMPORTANT: Only work on ONE change from the plan at a time.
For the current change (e.g., "Change 1: Collection Item Weights"):
Update method documentation - Focus on documenting the methods users will call:
createCollection(), updateCollection())packages/sdk-core/src/repository/HypercertOperationsImpl.ts and interfacesAdd type exports if needed:
packages/sdk-core/src/services/hypercerts/types.tsUpdate SDK code if needed:
Validate changes:
pnpm --filter @hypercerts-org/sdk-core format:check
pnpm --filter @hypercerts-org/sdk-core lint
pnpm --filter @hypercerts-org/sdk-core typecheck
pnpm --filter @hypercerts-org/sdk-core build
pnpm --filter @hypercerts-org/sdk-core test
Create changeset for this specific change (only after all validation passes):
pnpm changeset
writing-changesets skill (see .claude/skills/writing-changesets/SKILL.md for detailed
instructions on creating and categorizing changesets)After completing these steps for the current change:
Ask the user:
"Change {N}: {Feature Name} is complete.
- Documentation added: ✅
- Types updated: ✅
- Format check passing: ✅
- Lint passing: ✅
- Typecheck passing: ✅
- Build passing: ✅
- Tests passing: ✅
- Changeset created: ✅
Should I proceed with Change {N+1}: {Next Feature Name}?"
Repeat Step 7 for each change in the plan, getting approval between each one.
After ALL changes are implemented:
Run full test suite:
pnpm test
pnpm build
Review all changesets:
Update any top-level documentation:
Mark plan as complete:
Present final summary to user with:
CHANGELOG.md first to see exactly what changed between versionsgit diff to see what actually changed in your codebasepnpm build to verify type compatibilityThe sync process focuses on making SDK changes visible and usable to developers. For each logical change:
IMPORTANT: Document methods, not types. Users call methods, not types.
createX(), updateX(), getX() methods in HypercertOperationsImpl.ts@example tags showing how to use new fieldsHypercertClaim = OrgHypercertsClaimActivity.Main)CreateClaimParams)ImageInput = string | Blob)New lexicons:
*_LEXICON_JSON imports from @hypercerts-org/lexiconHYPERCERT_LEXICONS arrayHYPERCERT_COLLECTIONS object if it's a record typeModified lexicons:
Removed lexicons:
Each change must pass:
pnpm format:check)pnpm lint)pnpm typecheck)pnpm build)pnpm test)Each logical change gets its own changeset:
Do:
Don't:
This ensures:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer