Building remote company culture with AI
How I built a sarcastic Slackbot to lead by example in a company culture that celebrates builders
After six in the evening at our downtown Denver offices, over the sound of the white noise generators, quiet conversation, and keyboards clacking, you would sometimes hear something like, “Why the FUCK won’t you work!? GOD!”
These shouts of frustration were rarely met with responses, or if they were, it might be a sardonic, “Go home, Kurt. The machines won today.”
If you’ve worked in an office at a software company, this probably sounds familiar, and if you’ve transitioned to the remote workforce, there may be some small part of you that misses it. For developers, shouting our frustrations can be therapeutic, a way to release the built-up tension of hours of debugging or being stuck on a challenging problem. It's the coder's version of screaming into a pillow. And while it might startle a newcomer, those well-acquainted with the world of software development often see it as an endearing quirk, a shared experience that bonds us in the sometimes-solitary journey of coding.
When you’re working remotely, it’s just not quite as satisfying to shout to an empty room. And as much as some people have tried to use Twitter for this, it’s a bit too weird, especially now with Elon reading everyone’s tweets.
At Kelsus, we use Slack as our virtual office, and in an attempt to resurrect the ritual of coders shouting out their pain, I made a channel called #yelling where anyone in the company could type something that was making their day difficult.
Here is a typical entry from #yelling.
When people posted in yelling, they got the sense that other people could see their pain and participate in the collective experience of software developer agony, but as you can see, the responses were pretty sparse. No one is telling Jenks to give up and go home, not for the least reason that he is already at home.
So recently I decided to try to spice up the channel by adding a bot. I had specific outcomes I wanted for the bot. Firstly, I wanted it to reinforce that our collective suffering as developers that spend our days in our head fighting against obstinate computers doesn’t need to be borne alone. Secondly, I wanted to emphasize that we started building software because it’s fun, and making stuff for computers can still be fun, and finally, I wanted to lead by example. Maybe as the CEO of Kelsus I should be making sales calls or advising clients, but sometimes I still like to spend a few hours behind a screen of code.
The result of my quest was Gritobot, a sarcastic, nihlistic football fan that pokes fun at our struggles inside the #yelling channel. I used ChatGPT quite a bit to help me build the system and teach me AWS SAM, so that I could easily deploy it to our company AWS account. (I’ve added a link to a public repository with Gritobot’s code at the end of this post if you’d like to play with it yourself).
Building the bot ended up being like working with a partner with ChatGPT helping plan and debug the entire application. Here is ChatGPT’s very first response to my request for help building the bot:
At the end of that excerpt, it says “When you’re ready…” That’s because I prompted it to go in steps with, “You can give the instructions to me in pieces and parts and after each part I'll tell you when I'm ready for the next.”
And I didn’t build the whole bot in a single conversation with ChatGPT. At one point, I was fed up with uploading zip files to the AWS Console to update my bot whenever I made code changes, so I decided I wanted to use an AWS tool called SAM to make it easier for me to make updates. When I decided to do this, I started a new conversation with ChatGPT like this:
And once again, ChatGPT was able to walk me through the process with relative ease. Something important I do is that I ask ChatGPT to explain things to me that I don’t understand instead of bumbling forward in ignorance.
Once I had Gritobot working, it was a little too stupid and a little too mean.
To make it smarter, I had to solve a problem. The problem being that I was only sending the GPT API the single message that the user had written, and none of the conversation history in the channel. So in the messages above, Gritobot only got “I coded up @Gritobot myself…” and “What’s my name, @Gritobot.” It’s difficult for a bot to sound smart in a conversation if it only knows the last thing that was said and not what the conversation has been about. So, I updated my bot back end to request the last 15 messages from the #yelling channel to send to the GPT API.
The other thing I needed to do was a Slack-specific issue. In Slack you can converse in the main channel or in a thread, so I needed Gritobot to be able to get conversational context from either place. Here’s an example of me proving to myself that Gritobot could follow a conversation into a thread after I had made a few updates (again with ChatGPT’s help).
And, finally, I had to try to make it a little less heartless. When my first couple of tries to soften the bot’s demeanor by updating its initial prompt didn’t work, I asked ChatGPT for help and got a good suggestion:
The final result is a sarcastic but playful friend who sometimes tells us to go home and other times helps us remember that we’re all on the same team. We also love knowing we have this bot template to use for any other thing we might want in our Slack instance.
Now, I’ll share the URL to the public repository. I’m happy to accept PRs if there are improvements you think should be made, and I’ll also accept criticism that is sent with heart, but if you want to just tell me that my code sucks, you can just go shout it into the void.
Visit Gritobot’s public repository on Github!
https://github.com/Kelsus/gritobot
I’m curious if anyone reading has a similar bot or channel? Or even better if you’ve found a way to replicate some other niche element of the developer experience that used to be limited to in-person work?
Thanks for reading!
—Jon Christensen
This is hilarious