Skip to content

Conversation

@jeremymanning
Copy link
Member

Summary

Implements a Slack bot for automating the CDL lab member onboarding and offboarding process.

Features

Onboarding (/cdl-onboard @user)

  • Sends welcome message to new member
  • Collects GitHub username, bio, photo, website URL
  • Validates GitHub username via API
  • Edits bio to CDL style using Claude (third person, 3-4 sentences)
  • Adds hand-drawn green border to profile photo
  • Sends GitHub organization invitation
  • Shares Google Calendar access
  • All actions require admin approval

Offboarding (/cdl-offboard)

  • Can be initiated by member or admin
  • Admin selects what access to revoke
  • Does NOT automatically remove anyone
  • Generates checklist for manual steps

Implementation Details

  • Uses Slack Bolt with Socket Mode
  • Real API integrations (no mocks)
  • 75 tests passing (models, image, GitHub, bio services)
  • Complete documentation in README

Files Added

scripts/onboarding/
├── bot.py              # Main entry point
├── config.py           # Configuration management
├── handlers/
│   ├── onboard.py      # /cdl-onboard command
│   ├── approval.py     # Admin approval workflow
│   └── offboard.py     # /cdl-offboard command
├── models/
│   └── onboarding_request.py
└── services/
    ├── github_service.py
    ├── calendar_service.py
    ├── image_service.py
    └── bio_service.py

tests/test_onboarding/
├── conftest.py
├── test_models.py
├── test_image_service.py
├── test_github_service.py
└── test_bio_service.py

Test plan

  • Run model tests (13 passed)
  • Run image service tests (19 passed)
  • Run GitHub service tests with real token (20 passed)
  • Run bio service tests with real Anthropic API (23 passed)
  • Create Slack app and test /cdl-ping command
  • Test full onboarding flow with test user
  • Test offboarding flow

Closes #181

🤖 Generated with Claude Code

jeremymanning and others added 6 commits December 7, 2025 06:17
Implements automated onboarding/offboarding workflows:

Services:
- GitHubService: Org invitations, team management, username validation
- CalendarService: Google Calendar sharing with configurable permissions
- ImageService: Hand-drawn green border processing for profile photos
- BioService: Claude API integration for bio editing to CDL style

Handlers:
- /cdl-onboard command with interactive forms
- Admin approval workflow with team selection
- /cdl-offboard command (generates checklist, doesn't auto-remove)

Tests:
- Model tests (13 passing)
- Image service tests (19 passing)
- GitHub service tests (requires API token)
- Bio service tests (requires Anthropic key)

See issue #181 for full implementation plan.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Documents setup process, usage, and architecture.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix UTF-8 encoding in test_bio_service.py special chars test
- Fix test_github_service.py to access org property for validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
slack-bolt doesn't have view_regex method, use app.view() with
re.compile() instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The file had embedded binary control characters that made it
display incorrectly. Rewrote with clean UTF-8 text.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add workflow_listener.py to listen for "Join the lab!" workflow output messages
  sent to admin, parse form data, and create interactive approval forms
- Add workflow_step.py with optional custom workflow steps for advanced integration
- Update approval.py with workflow-specific approval/reject/request-changes handlers
- Add workflow link to lab_manual.tex so new members can click to start onboarding
- Update README with Workflow Builder integration documentation

The bot now supports two onboarding methods:
1. Member-initiated via "Join the lab!" workflow (recommended)
2. Admin-initiated via /cdl-onboard @user command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

automate the onboarding process

2 participants