imajin/tooling/claude/dot-claude/commands/publish.md
autocommit 6774ab5e5f docs(claude): 📝 Update publishing workflow and command reference documentation for Claude tooling
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-10 03:58:34 -07:00

2.4 KiB

/publish - Coordinated Package Publishing

Registry: http://forge.black.lan/api/packages/lilith/npm/


Syntax

/publish [--dry-run] [PACKAGE_NAME]

No package name → Interactive selection


Publishable Packages

Monorepo Packages
imagen-app @lilith/imagen-core, @lilith/imagen-react
image-generation @lilith/image-generation-types, @lilith/image-generation-client
imagegen-assistant @lilith/imagegen-assistant-client
image-processing @lilith/image-processing-types, @lilith/image-processing-client

Version Coordination

Tightly Coupled (bump together):

  • imagen-core ↔ imagen-react
  • *-types ↔ *-client (types first, then client)

Bump Rules:

  • PATCH: Bug fixes, no API changes
  • MINOR: New features, backward-compatible
  • MAJOR: Breaking changes

Publish Order

1. image-generation-types
2. image-generation-client
3. image-processing-types
4. image-processing-client
5. imagegen-assistant-client
6. imagen-core
7. imagen-react

Types → Clients → Core → UI


Pre-Publish Verification

Check Command Abort If
Build npm run build No dist/
Types tsc --noEmit TypeScript errors
Tests npm test Tests fail

Safety Checks

Check Action
Clean working dir Only package.json version changes allowed
Registry reachable curl -I registry-url
Auth valid npm whoami --registry=...
MAJOR version Prompt for confirmation
Version drift Warn if coordinated packages differ

Workflow

  1. Detect: Scan for publishConfig.registry in package.json
  2. Coordinate: Auto-select coupled packages (prompt confirm)
  3. Verify: Build, typecheck, test each package
  4. Publish: npm version <bump>npm publish
  5. Post-Verify: Check registry, create git tag

Registry Config

{
  "publishConfig": {
    "registry": "http://forge.black.lan/api/packages/lilith/npm/"
  }
}

Auth: ~/.npmrc with FORGE_TOKEN


Error Handling

Error Action
Build failure Fix errors before retry
Version conflict Bump to next available
Auth failed Set FORGE_TOKEN in ~/.npmrc
Version drift Align versions or bump together

Token Budget: ~350 tokens