Building with AI for public release: how I separate work records from what I publish
When you build something with AI, the records of your work pile up fast. Planning notes, prompts you gave the AI, ideas you tried and dropped, screenshots taken along the way, logs. You need these records to keep the wor
When you build something with AI, the records of your work pile up fast. Planning notes, prompts you gave the AI, ideas you tried and dropped, screenshots taken along the way, logs. You need these records to keep the work going, but not all of them are fit to share as they are.
When I build something that will be published in the end, such as a hackathon project, I keep the records of my work with AI and the deliverable I will publish in separate repositories. In this article I go through what goes where, how I protect those boundaries, and what I check before publishing, with real examples. The examples are mostly from hackathon projects, but the same thinking works for contributing to open source or writing articles.
The risk of publishing your work records with AI
Records of work with AI contain things that get written precisely because the work is still in progress. For example:
- Circumstances at your employer or clients that you wrote into prompts or planning notes
- Ideas you tried and dropped, and approaches that did not work
- Email addresses and account IDs that showed up in logs
- Screenshots taken in the middle of the work
If you handle these records in the same repository as the deliverable you will publish, you have to sort through all of them and remove what should not go out before publishing. On top of that, in a Git repository, deleting a file or editing a line still leaves the original content in the history. If you notice after publishing, undoing it together with the history is not easy.
If you separate where things live from the start, it is much easier to keep the public repository in a state where it only holds things that are fine to publish.
Separate repositories for work and for publishing
I keep my work records in one place, a private personal repository. For a hackathon, I create a folder for each project inside that repository.
As an example, here is the folder for Kokoroe, the project I entered in Built with Claude: Japan 2026. This was the first online hackathon Anthropic held in Japan, where participants built a project with Claude Code in about a week in November 2026.
https://cerebralvalley.ai/e/built-with-claude-japan2026
The working repository held files like these:
built-with-claude-japan-2026/
โโโ README.md # Entry point for the work (status and pointers to related files)
โโโ strategy.md # Which prize to aim for and how to present it
โโโ design.md # Design exploration for the project
โโโ world.md # Setting of the fictional world used in the demo
โโโ scenes.md # Structure of the demo scenes
โโโ seed-kokoroe.md # Material for demo data drawn from my own experience
โโโ kickoff-prompt.md # The first prompt I gave Claude Code
โโโ prompt.md # Handoff to Claude in the chat app
โโโ video-plan.md # Structure and narration script for the video
The project's code lives in a separate project repository. That repository is what I submitted to the hackathon.
https://github.com/ikenyal/kokoroe
You can see how the project works in this demo video.
At the top of some of the working files, I wrote "Do not copy into the submission repository." For example, seed-kokoroe.md collected material for the demo data, abstracted from my own work experience. Instead of putting it into the project repository as is, I rebuilt it as data rewritten for a fictional company. Design notes like world.md and scenes.md were handled the same way: the project repository only got data files rebuilt from them, not the design documents themselves. Keeping the raw material on hand separate from what was rebuilt for publishing prevents details of my real experience from slipping into the project.
To sum up, this is how I split things:
| Where | What goes there |
|---|---|
| Private working repository | Strategy, design exploration, prompts for AI, demo settings and scripts, article drafts, retrospectives |
| Public project repository | Project code, README, license, records that help people understand the project |
The project repository also stays private during development, and I switch it to public just before submitting. The working repository stays private to the end.
I assume this split when I hand work to AI as well. When AI writes the project's code, it works in the project repository. Strategy, prompts, and article drafts are written in the working repository.
Records I keep in the project repository too
I do not keep every work record private. Records needed to understand the project go into the project repository and are published with it.
The docs/ folder of Kokoroe's project repository holds records like these:
-
decisions.md: design decisions and the reasons behind them -
how-we-built.md: how I built it with Claude Code -
HANDOFF.md: a handoff for continuing the work - Logs of overnight work, and the report from the pre-publication check
When I measured Kokoroe's performance, I once got numbers that differed from what I expected. When I looked into it, the cause was a mistake in how things were counted. In that case too, I recorded not only the corrected numbers but also the numbers from before the fix, in both the decision record and the README. Showing how I made the call and how I fixed it explains the project better to the people looking at it than showing only the convenient numbers.
On the other hand, the strategy for which prize to aim for and how to present the project, the prompts I gave the AI themselves, and the demo script stayed in the working repository. I decide where something goes by whether it is a record for the people looking at the project or a record for me as the builder. Even among "work records," the decisions and how they came about go out with the project, and my playbook stays on hand.
That said, I published this much about decisions and their history partly because Kokoroe was a project to be judged. In hackathon judging, how you built something is also material that explains the project, in addition to what you built. If instead it were a tool meant for people to use rather than to be judged, what users want to know is how to use it and how it works, and they often do not need detailed records of the building process. In that case, I would keep only the decisions relevant to users in the project repository and leave the rest in the working repository. How much you keep in the project repository also depends on who you are publishing for.
Mechanisms that protect the boundaries
Even after deciding where things go, AI can end up writing into the project repository in the flow of the work. So instead of relying only on human attention, I stop it with mechanisms.
For Kokoroe, I used Claude Code's Hooks (processes that always run before or after specific operations). Before each commit, a hook checks for secrets such as API keys or passwords, and while working in the project repository, the MCP connections I normally use that are not needed for this project are blocked. The goal is to shut off, from the start, any path through which information unrelated to the project could get into the project repository via AI.
Tool configuration files need attention too. When you install a plugin or change settings in an AI tool, those settings are sometimes created as files inside the repository. In Claude Code, settings installed at the repository level are written to .claude/settings.json, and if you commit it, it is published as is. Settings for tools I installed for my own work, unrelated to the project, would go out as part of the project.
For Kokoroe, I used a Claude Code security plugin for the pre-publication scan. I installed this plugin not at the repository level but at a scope that is only active on my own machine. That way, the settings added for the scan do not remain in the repository's files and do not end up in the public repository.
More fundamentally, I avoid writing down information that does not need to go out. For spec-lantern, which I built for a Kiro hackathon, I did not write the AWS account ID of the deployment target into any file and read it from an environment variable instead. I introduced the project in this article:
There were also cases where I did not leave a value that must not go out even in the working repository's records. Kokoroe's public demo let anyone try it without logging in, and in exchange it had a daily usage cap so that the cost of AI usage would not balloon. For the judges, I prepared a separate cap, which switched on when they entered a judging access code on the screen. When I rebuilt the demo environment, I had Claude Code generate a new access code and show it only to me, once. I copied it into the submission form and passed it to the judges that way. The value itself is not written in the project repository, of course, and not in the working repository's records or decision records either. Even if the working repository is private, not writing down what you do not need to write is the more reliable option.
Five checks before making the project repository public
Even with mechanisms in place, there is no guarantee that nothing unfit to publish gets into the project repository. Code and settings written by AI during development, and the commit records themselves, can contain unintended information. So before switching the project repository to public, I check these five things:
- No secrets are included (scan the full history with Gitleaks)
- The email addresses recorded in commits are only GitHub's public address (noreply)
- My email address does not appear anywhere in the full history of file contents
- No proper nouns unrelated to the project remain, such as my employer or clients
- The repository size is what I expect
Email addresses recorded in commits are something you will not notice just by looking at the files. A repository freshly cloned for publishing does not inherit your git settings, so if you commit before setting your name and email again, the address you normally use goes in as is. In Standby, which I built after Kokoroe, I was careful not to leave my email address from the very first commit, and every commit was made with the public address.
The fifth check, repository size, looks unrelated to secrets, but it is a clue for finding things that were never meant to go out. Records like screenshots and logs from the middle of the work, or data created as an experiment, tend to come in large numbers of files, and if you look at them one by one, you miss things. If the repository is too large for what the project contains, that is a sign something has slipped in. For Kokoroe, this check found a problem.
After switching Kokoroe to public, I enabled GitHub's Secret scanning and Push protection (which blocks pushes that contain secrets), and prohibited force pushes to and deletion of main. This is to prevent things unfit to publish from getting in after the repository is public.
Problems found in the pre-publication check
For Kokoroe, the pre-publication check found two problems.
The first was that the repository had grown to 1.1 GB. I had put the screenshots taken to check behavior straight into the project repository. Before publishing, I removed them from the full history and reduced the colors of the ones I kept to make them smaller. I added one sentence to the README explaining what I rewrote in the history and why. If records like mid-work screenshots had been in the working repository from the start, rewriting the history would not have been necessary.
The second was that, in the repository I recreated for publishing, commits had been made with an email address that was not the public one. The cause was not where the records lived, but the git settings of the freshly cloned repository I mentioned above. I noticed before pushing and recreated it. Problems like this remain even when you separate where things live, so the pre-publication check is essential.
Applying this beyond hackathons
This split is not limited to hackathons.
It is the same when contributing to open source. When I found a bug in the development server of AWS Blocks (an OSS project now in the process of being renamed CDK Blocks), I gathered in the working repository how I investigated it with Claude, how I confirmed the cause, and a proposed fix, and handed that to Codex. Apart from commenting a reproduction report on an existing PR, I published nothing. The hypotheses from the middle of the investigation and the exchanges with AI stayed on hand.
I described the content of that handoff note, and how Codex acted on it, in another article.
Writing articles works the same way. Drafts of technical articles, including this one, are written in the working repository, and the history of revisions and the records of fact checks stay there too. Only the finished text goes to the place where it is published.
When you build something with AI, work records inevitably grow. If you plan to publish the result, separating the work records and where they live from the start greatly reduces the effort of telling apart what can and cannot be published when the time comes.
Honest records that feed improvement
Because the records in the working repository are not published, I can keep them honest, including what did not go well. After a hackathon ends, I write up a retrospective from those records on what worked and where I got stuck, in a form I can use for the next hackathon. The pre-publication checks above also came out of such a retrospective.
These records are also a primary source when I write articles. I can check when I decided what, and how many credits I spent where, against the records instead of my memory.
What I publish gets its contents fixed at milestones such as submission or release. For a hackathon project, to keep judging fair, I do not change it from its submitted state after the deadline until the results are out. Work records, on the other hand, keep growing in a private place. Separating where they live lets these two different natures stay as they are.
A first move made with publishing in mind
When you build with AI, work records grow faster than when you build alone. Those records mix the history of decisions that are essential to building the project with circumstances that should not go out.
The approach in this article comes down to three things:
- Keep work records and the deliverable you will publish in separate repositories from the start
- Protect those boundaries with mechanisms such as Hooks and how you install plugins, and do not write values that do not need to go out anywhere
- Before switching to public, go through the five checks
Each of these takes little effort if you decide on it before you start building. Rather than sorting through records one by one just before publishing to decide what is fine to share, separating where things live at the start lets you publish with confidence and keep your own records honest.
This is Day 4 of "A Year with AI," a 25-day advent calendar I am writing on my own. See Day 0 for what the series covers. The original Japanese version is on Zenn.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.