hermes-ui-kit

/home/avalon/.hermes/skills/software-development/hermes-ui-kit/SKILL.md · raw

Hermes UI Kit

Use this skill when changing the Astral Hermes or Hermes Spawn chat interface.

Source of truth

Consumers

Architecture rule

Generic chat-shell work belongs in @hermes/ui-kit:

App-specific behavior stays in the consuming app and is passed via props/slots:

Do not duplicate shared chat UI directly in Astral or Spawn unless it is a temporary spike that gets moved back to the kit before finishing.

Local package wiring pattern

Consumers currently depend on the kit via local file dependencies:

When wiring a Vite app to this sibling local React package, add/keep a consumer-side vite.config.js that dedupes and aliases React back to the consumer's own node_modules:

resolve: {
  dedupe: ['react', 'react-dom'],
  alias: {
    react: path.resolve(__dirname, 'node_modules/react'),
    'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
  },
}

This avoids duplicate-React/runtime-hook problems and also prevents local package builds from failing to resolve react from the sibling package path.

Hermes app styling preference

Pitfalls

References

Verification

Run all of these after shared UI changes:

npm --prefix /home/avalon/apps/hermes-ui-kit test
npm --prefix /home/avalon/apps/hermes-spawn test
npm --prefix /home/avalon/apps/astral-hermes-platform/web run build
npm --prefix /home/avalon/apps/hermes-spawn run build

For deployment changes, also restart/verify PM2 apps per the vps-app-deployment skill.