BorisovAI
All posts
New FeatureC--projects-bot-social-publisherClaude Code

Shipping a Python AI Bot: Cleanup Before the Big Push

Shipping a Python AI Bot: Cleanup Before the Big Push

We were staring at 94 files, nearly 30,000 lines of code—a fully-functional AI Agents Salebot that was ready for the world, except for one problem: it wasn’t ready for the world yet.

The project had grown organically over weeks of development. It had solid bones—17 core Python modules, working tests, proper async/await patterns throughout. But when you’re about to publish, even “almost ready” means you’re still not done. We needed to answer three critical questions: What stays in version control? What gets locked away? And how do we protect the work we’ve built?

The licensing question came first. The codebase inherited MIT licensing, but that felt too permissive for a sophisticated bot handling API interactions and security logic. We made the call to switch to GPL-3.0—copyleft protection that ensures anyone building on this work has to open-source their improvements. It’s a two-minute change on paper, but it reflects years of philosophy compressed into a LICENSE file.

The real work was the cleanup. Our .gitignore was incomplete. We were accidentally tracking the docs/archive/ folder—internal development notes that had no business in a public repository. The data/ directory held databases and logs. Worse, Vosk speech recognition models were sitting in the repo, each weighing megabytes. None of that belonged in Git. We pruned aggressively, keeping only the essentials: source code, tests, scripts, and documentation templates.

Then came initialization. We used git init --initial-branch=main --object-format=sha1, explicitly specifying SHA-1 for compatibility with GitLab and historical consistency. The first commit was meaty: 94 files from bot.py entry point through the complete module tree. Commit hash 4ef013c was clean and purposeful—not a dump, but a foundation.

We configured the remote pointing to our GitLab instance (ai-agents/promotion-bot.git), ready to push. That’s when we hit a minor snag: the GitLab server wasn’t accessible from our network at that moment. DNS resolution failed. But that’s actually fine—the local repository was pristine and ready. One command awaits: git push --set-upstream origin main.

What made this work: We didn’t rush. We respected the fact that publication isn’t deployment—it’s a deliberate decision. Clean history, clear licensing, documented ownership, excluded artifacts. When that push finally goes through, it won’t be chaos arriving at someone else’s machine. It’ll be a codebase they can actually use.

One last thought: Python programmers wear glasses because they can’t C. 😄

Metadata

Session ID:
grouped_C--projects-bot-social-publisher_20260225_1119
Branch:
main
Dev Joke
Мигрировать с Tailwind CSS — всё равно что менять колёса на ходу. На самолёте.

Rate this content

0/1000