AutoStoryGen refuses to let the blank page win
It turns missing story inputs into a first pass, then keeps the draft moving.

Three weeks ago, I did not plan to build any tools especially in offensive security scope. In one day, I was just… frustrated. Sitting in my room at 2 AM, running the same manual prompts over and over
- AutoStoryGen's sharpest move is treating missing story inputs as a creative prompt instead of an error state.
- The app is mostly an orchestration shell, with `app.py` doing the editorial work and the model wrappers handling transport.
- Gemini Flash fits because the workflow depends on quick iterative passes, not one giant expensive completion.
- The code reads like a prototype for a behavior pattern, not a hardened platform, and that is the point.
Most writing tools punish hesitation. AutoStoryGen does the opposite. Leave a field blank, and the app asks the model to make an educated guess rather than forcing you to stop and think harder.
That is a small UX decision, but it changes the product. The app stops behaving like a form and starts behaving like an editorial assistant.
How the app fills the blanks
The core of the repo lives in `app.py`. That file handles state, validation, prompt construction, and the decision to ask the model for a missing variable instead of failing fast.
- `app.py` orchestrates the workflow and owns the story logic.
- `gemini_chat.py` wraps the primary model path and keeps calls simple.
- `openai_chat.py` provides an alternate provider, even though the main path is centered on Gemini.
- The app leans on `python-dotenv`, which keeps API keys out of the interface.
if ":" in variable:
key, value = variable.split(":", 1)
That little parser matters. The code appears to split the model's response on the first colon and use the pieces to update fields, which is fast, readable, and brittle at the same time. If the response format shifts, the whole handoff can wobble.
The more interesting idea is that AutoStoryGen treats genre and community as useful metadata. A subreddit, a community, or a niche label is not just a tag. It becomes a shortcut for tone, pacing, and audience expectations.
Why Flash is the right engine
The main model wrapper uses Gemini 1.5 Flash, and that choice makes sense. This kind of tool lives or dies on iteration speed. Users are not waiting for one monumental response. They are asking for a few tight passes that can keep the story moving.
I was scrolling through a colleague's pull request -- about 40 commits spanning two weeks of work -- and I found myself genuinely impressed. Not just by the code, but by the narrative arc hiding inside those commit messages.
The comparison is the story
| Project | Input | Output | What it does differently |
|---|---|---|---|
| AutoStoryGen | A rough premise and partial story metadata | Outline, character setup, and chapter draft | Fills missing context before drafting |
| GitStory | GitHub commit history | Narrative summaries and story styles | Turns software change logs into prose |
| Project Autopilot | Technical articles and markdown files | Social content and workflow output | Runs as an event-driven automation layer |
| AutoResearchClaw | A research topic | Paper-oriented research workflow | Pushes toward a full research pipeline |
AutoStoryGen sits in a useful middle ground. It is more editorial than a commit-to-story tool, and less ambitious than a full research agent. The payoff is focus. It solves one messy phase of creative work, then gets out of the way.
What breaks first
There is no unit-test safety net in the codebase, and there is no heavy build system either. That is not a flaw so much as a signal. This is a script-first prototype built to prove an interaction pattern.
The bigger lesson is that the prompt is the product surface here. AutoStoryGen shows how far a thin Streamlit shell can go when the orchestration is clear and the model handoff is fast.