I wanted to publish a short technical post in English every working day, on a concept from AI engineering, data or systems. Doing it by hand takes discipline; handing it entirely to a model gives repetitive or approximate posts.
So the project splits the roles: an AI routine writes the week's posts, the program checks that they follow the rules, a review lets them into the queue, and a workflow publishes them one by one.
Overall architecture
There is no server and no database. The git repository is the queue: one folder for upcoming posts, another for published posts, one file per post with its metadata. Every step leaves a trace in the history, and a Pull Request acts as the review screen.
On Sunday, an AI routine writes the week's batch. On weekdays, another routine triggers the publishing workflow at a fixed time; a backup scheduler runs later in case it did not.
Wide diagram: scroll it to the right.
Life of a post
The model never publishes directly. It writes a structured draft, then a script validates it: the mechanical rules are checked by the program, not left to the model. A rejected post is rewritten until it passes. For variety, the routine reads the list of concepts already published before writing.
Wide diagram: scroll it to the right.
Daily publishing
The workflow takes the oldest post in the queue, escapes the reserved characters of LinkedIn's text format, sends it to the API, then moves it to the published folder with its date and identifier. The move is committed by the workflow itself.
Idempotent. First of all, the script checks whether a post has already been published today, Paris time. So the routine and the backup scheduler can both run without a duplicate.
One run at a time. The workflow is serialized, so two triggers close together do not step on each other.
Failure without loss. If the API refuses, the post stays in the queue and is picked up on the next run. An expired token produces a message that says what to do.
Wide diagram: scroll it to the right.
Technical choices
Git as a queue: no infrastructure to maintain, a full history, and a natural review through Pull Requests.
A routine rather than a plain cron: scheduled CI jobs often start hours late; a manual trigger from a routine starts right away, and the cron stays as a backup.
The code stays in control of the model: length, format, sources and uniqueness are checked by the program, with tests.
Reference sources: every post is based on a concept taught in a closed list of recognized books and courses.
No secrets in the repository: credentials live in the CI secrets, and token renewal is documented.