- Add optional globalDir parameter to resolveProject(), getDefaultProject(), setDefaultProject(), and clearDefaultProject() for test isolation - Remove ESLint suppression by using void operator for intentionally unused var - Update all tests to use isolated globalDir parameter - Complete tests for default project resolution
8.3 KiB
Task: KB-331 - Rename Published Package from @dustinbyrne/kb to @gsxdsm/fusion
Created: 2026-03-31 Size: M
Review Level: 2 (Plan and Code)
Assessment: This is a mechanical refactor with medium blast radius. The change pattern is simple (search/replace package name), but affects 156+ changeset files, package metadata, documentation, and root workspace scripts. Full test suite must pass as quality gate. Score: 4/8 — Blast radius: 2, Pattern novelty: 0, Security: 0, Reversibility: 2
Mission
Rename the published npm package from @dustinbyrne/kb to @gsxdsm/fusion. This is the user-facing package that developers install globally with npm i -g @gsxdsm/fusion. The CLI binary name remains fn (already renamed). Update all package metadata, workspace references, changeset files, and documentation that reference the old package name.
Dependencies
- Task: KB-330 (Rename internal packages from @kb/* to @fusion/) — must be complete so internal package imports are already using @fusion/ namespace
Context to Read First
Read these files to understand current package structure and references:
packages/cli/package.json— Current@dustinbyrne/kbpackage definitionpackage.json(root) — Workspace scripts that filter by package nameRELEASING.md— Release documentation with package name referencesREADME.md— Installation instructions and package references
Optional context (to understand scope):
# Count changeset files that need updating
grep -l "@dustinbyrne/kb" /Users/eclipxe/Projects/kb/.changeset/*.md | wc -l
# Find all non-changeset references
grep -r "@dustinbyrne/kb" /Users/eclipxe/Projects/kb --include="*.json" --include="*.ts" --include="*.tsx" --include="*.md" --include="*.yaml" 2>/dev/null | grep -v node_modules | grep -v ".worktrees" | grep -v ".changeset"
File Scope
Package metadata (must update):
packages/cli/package.json— name field, repository.urlpackage.json(root) — scripts with--filter @dustinbyrne/kbpackages/cli/README.md— link to repository
Documentation (must update):
README.md— installation commandnpm i -g @dustinbyrne/kbRELEASING.md— filter references in script examples
Changeset files (bulk update):
.changeset/*.md— All files containing"@dustinbyrne/kb":frontmatter (156+ files)
Test files (check and update if needed):
packages/cli/src/__tests__/package-config.test.ts— may reference package name- Any test files that assert on package metadata
Excluded from changes:
.worktrees/directories (ephemeral)node_modules/directoriesdist/directories (rebuilt)- Historical task data in
.kb/tasks/(preserved as-is)
Steps
Step 1: Update Package Metadata
Update the published package's metadata to use the new name.
packages/cli/package.json: Change"name": "@dustinbyrne/kb"to"name": "@gsxdsm/fusion"packages/cli/package.json: Update repository URL fromhttps://github.com/dustinbyrne/kbtohttps://github.com/gsxdsm/fusion(if this is a repo move; if keeping same repo, skip this sub-item)packages/cli/README.md: Update repository link fromhttps://github.com/dustinbyrne/kb#readmetohttps://github.com/gsxdsm/fusion#readme
Artifacts:
packages/cli/package.json(modified)packages/cli/README.md(modified)
Step 2: Update Root Workspace Scripts
Update root package.json scripts that reference the old package name.
package.json: Changepnpm --filter @dustinbyrne/kb build:exetopnpm --filter @gsxdsm/fusion build:exepackage.json: Changepnpm --filter @dustinbyrne/kb build:exe:alltopnpm --filter @gsxdsm/fusion build:exe:all
Artifacts:
package.json(modified)
Step 3: Update Documentation
Update user-facing documentation with the new package name.
README.md: Changenpm i -g @dustinbyrne/kbtonpm i -g @gsxdsm/fusionREADME.md: Update any other package name references (check for "@dustinbyrne/kb" in the file)RELEASING.md: Change allpnpm --filter @dustinbyrne/kbtopnpm --filter @gsxdsm/fusion(3 occurrences in script examples)
Artifacts:
README.md(modified)RELEASING.md(modified)
Step 4: Update All Changeset Files
Bulk update all changeset files to use the new package name in their frontmatter.
- Find all
.changeset/*.mdfiles containing@dustinbyrne/kb - Replace
"@dustinbyrne/kb":with"@gsxdsm/fusion":in each file
Verification command:
# Should return 0 after updates
grep -r '"@dustinbyrne/kb":' /Users/eclipxe/Projects/kb/.changeset/*.md 2>/dev/null | wc -l
Artifacts:
- All updated
.changeset/*.mdfiles (modified)
Step 5: Update Test Files (If Needed)
Check and update any test files that reference the package name.
- Check
packages/cli/src/__tests__/package-config.test.tsfor@dustinbyrne/kbreferences - Check
packages/cli/src/__tests__/extension.test.tsfor any package name assertions - Update any hardcoded package name strings in tests
Artifacts:
- Any modified test files
Step 6: Testing & Verification
ZERO test failures allowed. Full test suite as quality gate.
- Run
pnpm installto update lockfile with new package name - Run
pnpm buildto verify all packages compile successfully - Run
pnpm testto verify all tests pass - Verify no
@dustinbyrne/kbreferences remain (excluding historical task data and archived files):grep -r "@dustinbyrne/kb" /Users/eclipxe/Projects/kb --include="*.json" --include="*.ts" --include="*.tsx" --include="*.md" --include="*.yaml" 2>/dev/null | grep -v node_modules | grep -v ".worktrees" | grep -v ".kb/tasks/" | wc -l # Expected result: 0
Common issues to watch for:
- Test files that mock or assert on package name
- Any dynamic package name resolution
- Changeset frontmatter syntax errors after replacement
Artifacts:
pnpm-lock.yaml(auto-updated)- All builds pass
- All tests pass
Step 7: Documentation & Delivery
- Create changeset for this rename:
cat > .changeset/rename-published-package.md << 'EOF'
---
"@gsxdsm/fusion": minor
---
Rename published package from @dustinbyrne/kb to @gsxdsm/fusion
EOF
- Verify the changeset uses the NEW package name (
@gsxdsm/fusion) - Document any out-of-scope findings: If you discover references that should be handled by other tasks (KB-332 through KB-335), do NOT modify them — document them in the task log
Artifacts:
.changeset/rename-published-package.md(new)
Completion Criteria
packages/cli/package.jsonupdated with new name@gsxdsm/fusion- Root
package.jsonscripts updated to use--filter @gsxdsm/fusion README.mdinstallation instructions updatedRELEASING.mdscript examples updated- All 156+
.changeset/*.mdfiles updated - Test files updated (if any had hardcoded references)
pnpm installcompletes successfullypnpm buildpasses for all packagespnpm testpasses with zero failures- Changeset file created for the rename
- Zero remaining
@dustinbyrne/kbreferences in active codebase (excluding historical.kb/tasks/data)
Git Commit Convention
Commits at step boundaries. All commits include the task ID:
- Step 1:
feat(KB-331): rename package metadata to @gsxdsm/fusion - Step 2:
feat(KB-331): update root workspace scripts - Step 3:
docs(KB-331): update README and RELEASING with new package name - Step 4:
chore(KB-331): update changeset files to @gsxdsm/fusion - Step 5:
test(KB-331): update test file references - Step 6:
test(KB-331): verify build and tests pass - Step 7:
chore(KB-331): add changeset for package rename
Do NOT
- Change the CLI binary name — it remains
fn(already correct) - Rename the data directory from
.kbto.fusion(handled in KB-334) - Rename task ID prefixes from KB-XXX (handled in KB-332)
- Rename environment variables from KB_* (handled in KB-333)
- Modify files in
.worktrees/directories (ephemeral) - Modify historical task data in
.kb/tasks/(preserve as-is) - Skip running the full test suite
- Commit lockfile or changeset without the task ID prefix
- Update repository URL unless confirmed the repo is actually moving to gsxdsm organization