STORYAI
Tech BlogSTORYAIHow To

AI-Driven Development at STORYAI: What We Delegate to AI vs. What Humans Retain

PdM Letter

2026.10.20

Share

A record of AI-driven development practices at STORYAI. We share our journey from establishing a workflow where humans retain specifications, decisions, and approvals while AI agents handle implementation, verification, and logging, to selectively using Claude, GPT, and Gemini across development and internal product features, and replacing attention-dependent rules with automated checks, shared guidelines, CI, and weekly metrics.

At STORYAI, an AI agent (Claude Code) writes the vast majority of our code. When we first started, our approach was close to what people call "vibe coding," accepting changes proposed by the AI without thoroughly reading through them. However, when you are shipping updates daily to a production service, that quickly breaks down. After several months of trial and error, we settled into a structure where humans retain specifications, decisions, and approvals, while AI drives implementation, verification, and logging.

In this article, I will share our workflow and how we systematized our practices as we re-evaluated our AI-driven development.

Agreeing on Specifications Upfront Keeps AI Output from Drifting

For new features or major refactors, we never have the AI write code right off the bat. We first have the AI draft the requirements definition and detailed design; only after a human reviews and agrees do we proceed to implementation. The agreed-upon details are documented in the Issue or PR description. This allows us to point out exactly where it deviated from our agreement whenever the AI introduces its own interpretations mid-implementation.

When there is a reference implementation or asset, we take an extra precautionary step. Once, we asked the AI to port a landing page animation exactly as shown in a provided demo. What came back included an extra translucent layer of color not in the demo, causing the colors to look muddy when rotated. Since then, whenever a task has a reference point, we first have the AI generate a table showing the "diff between reference and current state." For visual choices, we line up previews side by side, and resolve questions in batches all at once.

AI Documentation: One Entry Point and Domain-Specific Rulebooks

We place a single overall guideline at the repository root containing only universal rules common to all tasks—such as Git conventions, verification standards, and operations requiring human approval. Rules for frontend, API, database, design, and security are split into their respective domain documents. For each task, we only have the AI read the relevant documents.

We also enforce a rule against duplicating content across multiple documents, because duplication leads to one document being updated while the other goes stale, creating discrepancies.

Choosing the Right Model Based on Roles and Conditions

Running every single step on the top-tier model quickly drives up costs. This applies equally to development agents and features embedded inside STORYAI. Therefore, across both development and the product itself, we selectively use Claude, GPT, and Gemini based on steps and specific criteria.

First, on the development side, we segregated models by role within our agent workflow.

AssignmentModelTasks Handled
Main AgentTop-tier (Opus)Requirements structuring, design decisions, authorization for production-impacting operations, synthesizing results
Implementation, testing, investigation, UI verification, PR creationSonnet 5.5Executing defined tasks
Code ReviewOpus 5.5Detecting regressions and permission leaks
Routine formatting and data collectionSonnet 5.5 / Haiku 5.5Formatting lists, drafting issue descriptions

We assign Opus to reviews because oversight is the costliest failure in that stage. Instructions for each role are organized in dedicated definition files, and whenever a sub-agent is launched, the model must be explicitly specified. Additionally, we use OpenAI's Codex alongside, using it strategically for design comparisons and incremental step-by-step implementation tasks.

Not everything went smoothly at first. When we handed an implementation spanning over 20 files to Sonnet all at once, it stopped partway through while leaving tests unfinished. Also, during a period when our environment configuration resolved to an older model generation, it reported "complete" even while tests were not passing. Now, we pin model selection strictly to the current generation, and for large-scale tasks, we either use Opus from the start or slice the task into smaller requests.

Similarly, for product features and CMS operations, we do not rely on a single model. We switch models according to criteria such as accuracy, speed, unit cost, and media types handled (text, images, audio, video).

Use Case / ConditionsPrimary ModelReason for Selection / Fallback
Manga panel segmentationGPT 6.1 Sol (1st choice) → Gemini 4 ArgonIn our multi-LLM comparison, GPT 6.1 Sol was the most stable for complex panel layouts and extracting regions of off-panel dialogue. Falls back to Gemini 4 Argon on failure.
Knowledge extraction and factual grounding verificationExtraction: GPT 6 Luna → Verification: Claude Sonnet 5.5Full-text scanning extraction runs on GPT 6 Luna, which costs ~1/8 of Sonnet with comparable accuracy; after automated quote verification, Sonnet 5.5 handles only grounding judgment and entity reconciliation.
Studio conversational agentGPT 6 LunaSince message counts tend to be high, it is pinned to a lightweight model usable even on free plans.
Feature story reports / grounded QA for story detailsClaude Sonnet 5.5 (Haiku 5.5 for free plan summaries)Prioritizes long-form consistency and source-citation accuracy. Uses Haiku 5.5 strictly for free plan digests to keep costs down.
AI drafts for setting material books / bookletsGemini 4 Argon / Gemini 3.8 Flash / Claude Haiku 5.5Switched by subscription tier: higher tiers use highly expressive Gemini 4 Argon (3.8 Flash upon hitting monthly limits), Starter uses 3.8 Flash, free plan uses Haiku 5.5.
Automated analysis setting suggestions, trend analysis, video scripts, CMS auto-translationGemini 3.8 FlashWell-balanced between response speed and structured outputs, suited for high-frequency routine generations. Switched CMS multilingual translation (EN/ZH) from Opus to cut costs.
Main story analysis pipeline (emotions, timeline, character correlation charts)Text-only: Claude Sonnet 5.5 prioritized / With media: Gemini 3.8 Flash prioritizedChapters containing audio/video prioritize Gemini for its multimodal strengths; text chapters (or video chapters with transcripts ready) use Sonnet 5.5 as the first choice, falling back sequentially to backup models.

Instead of hardcoding model names throughout the codebase, we consolidated model selection into a mapping table between roles and models. When a new model is released or we want to optimize costs, we only need to update this single mapping table.

Furthermore, whether in development or in the product, we never take an AI's "Done" at face value. Once, we had a sub-agent summarize steps for a release check and passed that response directly along. It reported only 2 steps when there were actually nearly 10. For factual data that forms the core answer, the main agent must inspect the primary source directly.

If Running in Parallel, Separate the Workspaces

We run multiple chat sessions simultaneously on the same repository. Using git worktree, we isolate directories per task so branch switches only occur inside each dedicated workspace.

This rule was introduced to prevent cross-session mix-ups. Previously, a sub-agent tasked with implementation switched to the branch of a different chat session, mixing commits across tasks. Now, whenever we delegate work to a sub-agent, we prohibit branch switching or history-rewinding operations, instructing it to stop and report if it finds itself on an unexpected branch.

We also had a close call when cleaning up history. When summarizing history against a remote integration branch name, another chat session had synced and advanced the base, nearly bundling other team members' changes into our diff. Since then, we anchor the base to a fixed commit ID rather than a moving branch name, and verify before pushing that the diff touches only our intended scope.

We do not stack PRs; everything targets the integration branch directly. This prevents situations where only a parent PR is merged first while child changes are left behind.

Record Failures and Carry Them into the Next Session

AI agents do not remember past conversations once the session changes. To address this, we use the agent's memory feature to record each piece of feedback one by one, focusing on three points: what was pointed out, why it was a problem, and what to do next time.

The most effective record right now is "fix bugs you find." AI had a habit of fixing only the requested scope while leaving behind other defects discovered along the way, excusing them as "out of scope" or "pre-existing." After repeatedly reviewing this, we made it standard to fix them in a separate commit from the main task. Pre-existing lint and formatting warnings receive the same treatment.

Another key record is "slowness is also a quality issue." Once, heavy aggregation risked timing out. The AI initially proposed throttling concurrency just to avoid errors. Even if errors disappear, the screen becomes slow to load. The real solution was to replace the heavy aggregation itself with pre-aggregation; now, whenever performance issues arise, we require the AI to propose solutions that eliminate the root cause first.

Humans Retain Decisions on Production and Deletion

We never let the AI make decisions on production deployments, cloud resource deletions, database schema changes, or specification changes to authentication and billing. The AI can investigate and compile listings, but execution only happens after explicit human approval for each item. Secrets are never passed into the AI's context and are resolved at runtime instead. PRs are always reviewed by a human before merging.

The rules were helpful. However, evaluating them from an AI-driven development perspective, whether they were followed depended entirely on the AI's attention.

Specifying models, restricting git operations, not overlooking defects—all of these were merely communicated through documentation and memory, meaning they could occasionally slip through. In fact, even after recording "fix bugs you find," we had to point it out several more times. Furthermore, many of these rules lived solely inside a single developer's local memory, unshared with other team members or other AI tools.

Our verification foundation also relied too heavily on manual checks for a time. If automated test coverage has gaps or tests lag behind implementation changes, an AI reporting "All tests passed" does not provide sufficient assurance.

Replacing Rules with Guardrail Mechanisms

So, we transformed rules that relied on attention into mechanisms enforced automatically.

Block before execution automatically. Using Claude Code hooks (which allow running checks right before a tool executes), we configured automatic rejection for out-of-policy operations: launching a sub-agent without specifying a model, branch switching or committing by sub-agents, and force-pushing without safety options. Normal operations by the primary agent are not blocked—only out-of-policy calls from sub-agents. When a call is rejected, the check returns the reason and the proper approach, enabling the AI to read it and retry on its own.

Migrate rules to team documentation. Of the rules residing in personal memory, we moved those meant for the whole team into our shared repository guidelines: (1) fix discovered bugs in a separate commit, (2) do not stack PRs, (3) base history cleanups on a fixed commit ID, (4) verify answer rationale against primary sources, and (5) address slowness from the root cause. Rules enforced automatically are also listed in the guide so both stay aligned.

Shift pass/fail validation to CI. We expanded the scope of automated tests run in CI to cover the server side in addition to the frontend, alongside making CI checks a required gate before merging.

Generate weekly metrics. We set up automated weekly aggregation for the days from PR creation to merge and the list of PRs awaiting review. By cross-referencing this with estimates and actual human hours worked, we can continuously track how AI-assisted development is progressing.

Remaining Challenges

Our efforts to reduce human review overhead are still ongoing. Before opening a PR, we now have a top-tier model (Opus) review the AI-generated diff once and attach the review results and remediations to the PR. This lets humans focus on specification details and operational validity that AI cannot evaluate. Automating UI verification in the staging environment is a larger undertaking, so we are advancing it step by step.

Additionally, pre-execution checks can only block mechanically determinable rules. Practices that require judgment, such as "fix bugs you find," are still supported by guidelines and daily retrospectives.

In AI-Driven Development, What Remains for Humans Is Deciding and Stopping

The scope of what we delegate to AI has expanded significantly over recent months. AI now handles implementation, testing, investigation, UI checks, and PR creation. Even so, deciding what to build, deciding which model to use under which conditions, deciding whether to ship to production, and stopping dangerous operations have remained the job of humans.

And we are currently in the process of shifting that "stopping" from human vigilance to automated mechanisms.

Would you like to try using STORYAI?

STORYAI was developed with the goal of maximizing the effectiveness of content marketing. By providing highly accurate analysis and improvement suggestions through AI, it supports the creation of high-quality content. STORYAI can precisely identify and address issues that are often overlooked by traditional marketing methods, guiding you towards effective solutions.

First, please try it for free. For corporate clients, we offer a service that includes special support and consulting.

Additionally, we plan to hold YouTube seminars for individuals on how to read graphs and identify improvement points on their own.

Subscribe to the channel here. https://www.youtube.com/@storyai

If you are interested in integrating our service into your own platform or want to use only the AI component via API integration, please feel free to consult with us. A dedicated representative will provide appropriate planning tailored to your company's needs.

Tech BlogSTORYAIHow To

Share

Related articles