npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@neolith/org-integration

v1.0.39

Published

Integration layer between Genesis App and @wundr/org-genesis package

Readme

@genesis/org-integration

Integration layer between Genesis App and @wundr/org-genesis package. This package provides utilities for migrating org-genesis results to Slack workspace resources (users and channels).

Installation

npm install @genesis/org-integration
# or
yarn add @genesis/org-integration
# or
pnpm add @genesis/org-integration

Note: This package has @wundr/org-genesis as a peer dependency. Make sure it's installed in your project.

Overview

The @genesis/org-integration package serves as the bridge between the organizational structure generated by @wundr/org-genesis and the Slack workspace where Orchestrator agents and discipline channels will be created.

Key Features

  • Type definitions mirroring @wundr/org-genesis output
  • VP-to-Slack-user mapping utilities
  • Discipline-to-Slack-channel mapping utilities
  • Slug generation for channel naming
  • Bidirectional ID mapping for cross-system references

Usage

Basic Migration

import { migrateOrgGenesisResult, MigrationOptions } from '@genesis/org-integration';

// Assuming you have a result from @wundr/org-genesis
const genesisResult = await runOrgGenesis(config);

// Configure migration options
const options: MigrationOptions = {
  workspaceId: 'T12345678',
  channelPrefix: 'genesis',
  privateChannels: false,
  verbose: true,
};

// Run the migration
const migrationResult = await migrateOrgGenesisResult(genesisResult, options);

console.log(
  `VPs created: ${migrationResult.orchestratorMappings.successful}/${migrationResult.orchestratorMappings.total}`
);
console.log(
  `Channels created: ${migrationResult.disciplineMappings.successful}/${migrationResult.disciplineMappings.total}`
);

Dry Run Mode

Test the migration without creating actual resources:

const options: MigrationOptions = {
  workspaceId: 'T12345678',
  dryRun: true, // No resources will be created
  verbose: true,
};

const result = await migrateOrgGenesisResult(genesisResult, options);

// Review what would be created
result.orchestratorMappings.mappings.forEach(mapping => {
  console.log(`Would create VP: ${mapping.slackDisplayName}`);
});

result.disciplineMappings.mappings.forEach(mapping => {
  console.log(`Would create channel: #${mapping.slackChannelName}`);
});

Using ID Mappers

Track relationships between genesis IDs and Slack IDs:

import { createVPMapper, createDisciplineMapper } from '@genesis/org-integration';

// Create mappers
const vpMapper = createVPMapper();
const disciplineMapper = createDisciplineMapper();

// Add mappings after creation
vpMapper.addMapping('orchestrator-engineering', 'U123ABC456');
disciplineMapper.addMapping('disc-backend', 'C789XYZ012');

// Look up IDs in either direction
const slackUserId = vpMapper.getTargetId('orchestrator-engineering'); // 'U123ABC456'
const genesisVpId = vpMapper.getSourceId('U123ABC456'); // 'orchestrator-engineering'

// Export for persistence
const mappingData = vpMapper.toJSON();
// { 'orchestrator-engineering': 'U123ABC456' }

// Import from saved data
const restoredMapper = IDMapper.fromJSON(mappingData);

Slug and Name Generation

import { generateSlug, generateChannelName, generateDisplayName } from '@genesis/org-integration';

// Generate slugs
generateSlug('Risk Management'); // 'risk-management'
generateSlug('VP of Engineering', { prefix: 'team' }); // 'team-engineering'

// Generate Slack channel names
generateChannelName('Backend Development', 'genesis'); // 'genesis-backend-development'

// Generate display names
generateDisplayName('VP of Engineering'); // 'Engineering'
generateDisplayName('Chief Technology Officer'); // 'Technology Officer'

Validation Utilities

import { isValidChannelName, isValidDisplayName } from '@genesis/org-integration';

isValidChannelName('my-channel'); // true
isValidChannelName('My Channel'); // false (uppercase not allowed)
isValidChannelName('a'.repeat(100)); // false (max 80 chars)

isValidDisplayName('John Doe'); // true
isValidDisplayName(''); // false (empty)

API Reference

Migration Functions

migrateOrgGenesisResult(genesisResult, options)

Main migration function that converts org-genesis output to Slack resources.

Parameters:

  • genesisResult: GenesisResult - The result from org-genesis
  • options: MigrationOptions - Migration configuration

Returns: Promise<MigrationResult>

createVPUsersFromManifest(vps, organizationId, options)

Create Slack users from Orchestrator definitions.

Parameters:

  • vps: VPDefinition[] - Array of Orchestrator definitions
  • organizationId: string - Organization ID
  • options: MigrationOptions - Migration configuration

Returns: Promise<Orchestrator MappingResult>

createChannelsFromDisciplines(disciplines, options)

Create Slack channels from discipline definitions.

Parameters:

  • disciplines: DisciplineDefinition[] - Array of discipline definitions
  • options: MigrationOptions - Migration configuration

Returns: Promise<DisciplineMappingResult>

Types

GenesisConfig

Input configuration for genesis generation:

interface GenesisConfig {
  organizationName: string;
  organizationType: string;
  description: string;
  strategy: string;
  targetAssets: string[];
  riskTolerance: 'conservative' | 'moderate' | 'aggressive';
  teamSize: 'small' | 'medium' | 'large';
  seed?: string;
  options?: GenesisConfigOptions;
}

GenesisResult

Output from org-genesis:

interface GenesisResult {
  manifest: OrganizationManifest;
  orchestrators: VPDefinition[];
  disciplines: DisciplineDefinition[];
  agents: AgentDefinition[];
  metadata: GenesisMetadata;
}

MigrationOptions

Options for the migration process:

interface MigrationOptions {
  workspaceId: string;
  dryRun?: boolean;
  skipVPs?: boolean;
  skipChannels?: boolean;
  channelPrefix?: string;
  privateChannels?: boolean;
  verbose?: boolean;
}

MigrationResult

Result of the migration:

interface MigrationResult {
  vpMappings: VPMappingResult;
  disciplineMappings: DisciplineMappingResult;
  status: 'complete' | 'partial' | 'failed';
  migratedAt: string;
  warnings: string[];
}

Utility Classes

IDMapper<TSourceId, TTargetId>

Bidirectional ID mapping utility:

const mapper = new IDMapper<string, string>();
mapper.addMapping('source-id', 'target-id');
mapper.getTargetId('source-id'); // 'target-id'
mapper.getSourceId('target-id'); // 'source-id'
mapper.hasSourceId('source-id'); // true
mapper.size; // 1
mapper.toJSON(); // { 'source-id': 'target-id' }

Integration with Genesis App

This package is designed to work within the Genesis App workflow:

[User Input] -> [Genesis App UI] -> [@wundr/org-genesis] -> [@genesis/org-integration] -> [Slack Workspace]
  1. User provides organization details through the Genesis App
  2. Genesis App invokes @wundr/org-genesis to generate the org structure
  3. @genesis/org-integration takes the result and creates Slack resources
  4. Orchestrator agents begin operating in their assigned channels

Development

Building

npm run build

Testing

npm test

Type Checking

npm run typecheck

License

MIT