Two Hours a Day: A Practical Guide to AI Automation in Software Development

    This article explains how developers can move beyond one-off prompts and build a reliable AI automation pipeline. It covers using a project-level rules file to constrain model behavior, running a scheduled loop that picks up tickets, generates patches, and self-verifies before opening merge requests, and keeping humans in the review seat with guardrails such as least-privilege access, mandatory gates, risk-based escalation, and audit trails. It also clears up common misconceptions and outlines a step-by-step adoption path measured by success rate, rework rate, and review time.

    1. The Debate Is Missing the Point: Automation Is the Real Dividing Line

    For a while, two camps in the developer community have been arguing past each other. One worries that intelligent coding tools will replace developers; the other complains that the generated code is low quality and that fixing it takes longer than writing it by hand. Interestingly, before any consensus emerged, some practitioners had already handed roughly 80% of the repetitive parts of their daily work to automated pipelines. They spend only two to three hours a day on key decisions and final sign-off, while earning ongoing income from several small projects they maintain themselves.

    Cases like this get shared widely not because model capability suddenly leapt forward, but because they expose an easily overlooked fact: what usually makes you obsolete is not the tool itself, but peers who have already organized the tool into a stable pipeline. Tool capability is open to everyone; the gap comes from how the tool is used.

    The practical industry context is this: most developers now have some form of intelligent completion or conversational coding assistant in their editor, yet the vast majority still treat it as a smarter autocomplete. When something breaks, they paste in the log and ask it to fix the error; when they need a utility function, they hand over the requirement and let it generate the code. A human watches the whole time and remains accountable, and the workday still ends with eight hours of overtime. The problem is not the tool; it is that the usage pattern is still stuck in a one-question-one-answer mode.

    2. Step One: Give the Model a “Constitution” with a Project-Level Rules File

    2.1 Why long prompts are unreliable

    A common approach is to write a prompt of several hundred or even a thousand words, instructing the model to follow all kinds of conventions. This has three structural flaws. First, as the context grows, the weight of early constraints is diluted, and the model “forgets” them. Second, the prompt lives inside a conversation, so it stops working in a new session or on a different machine. Third, it depends on a person manually pasting it every time and cannot accumulate into a team asset.

    2.2 Put the constraints in the repository

    A more engineering-oriented approach is to place a project-level rules file in the repository root (a common industry practice is to agree on a fixed filename that the coding assistant reads automatically at the start of every session). The content does not need to be long; what matters is that it is executable and verifiable. Criticism of models writing code tends to focus on four points, each of which maps neatly to a rule:

    • Over-engineering: think before coding; solution complexity must match the scope of the requirement, with no abstractions reserved for “possible future use.”
    • Ignoring existing conventions: read nearby code before making changes, and follow the project’s existing naming, directory structure, error handling, and logging style.
    • Carelessly adding dependencies: prefer implementations already in the project; when a new dependency is genuinely needed, state the reason, size, and maintenance status, and raise it separately.
    • Rewriting unrelated files: make only the minimal, “surgical” change; no opportunistic reformatting, renaming, or upgrading of unrelated modules.

    An illustrative rules file can be very plain:

    1. # Project Rules
    2. 1. Analyze before coding: list the change points and impact surface first, then write code.
    3. 2. Simplicity first: no abstractions, config options, or extension points that the requirement does not call for.
    4. 3. Surgical changes: touch only the necessary lines; do not reformat unrelated code or files.
    5. 4. Goal-oriented: a runnable test is the definition of done.
    6. 5. No new dependencies unless the plan states the reason separately and gets confirmation.

    2.3 Why the effect is noticeable

    The essence of this approach is turning “negotiated ad hoc in every conversation” into “a long-term project-level constraint.” Once constraints move from the conversation context into version control, they gain three properties: reusable (they apply to everyone), reviewable (rule changes go through code review), and iterable (add a rule whenever a violation occurs). In practice, creating this file from scratch usually takes only a few minutes, and the rate at which the model violates project conventions drops by orders of magnitude. It is worth stressing that the specific numbers depend on project size and rule quality and should not be treated as universal metrics; what is genuinely reliable is the mechanism itself—only once rules are made explicit can they be measured and improved.

    3. Step Two: Turn the Development Workflow into a Scheduled, Autonomous Pipeline

    3.1 Overall shape

    The core of the original case is a minimal long-running console program that runs a round of tasks every ten-odd minutes. What makes this shape worth borrowing is that it relies on no special capability and uses only general-purpose technical components:

    1. Fetch tasks: through the open API of a code hosting platform, query the to-do items assigned to you (merge requests, bug tickets, technical debt entries).
    2. Prepare context: check out the repository into a separate working copy, read the project rules file and the task description, and pull in the relevant file contents.
    3. Generate and self-check: have the model produce the change, then automatically run formatting, static analysis, unit tests, and the build.
    4. Submit and annotate: once self-checks pass, create a branch and a merge request, describing the scope of the change, verification results, and uncovered risks in the description; on failure, log the reason and skip it rather than pushing it into a human queue.
    5. Loop and record: write a structured log each round to make it easy to track success rates and the distribution of failures.
    1. Every 15 minutes, one round:
    2. fetch(tickets) -> prepare(worktree) -> generate(patch)
    3. -> verify(fmt, lint, test, build)
    4. -> open(merge_request) | log(failure)

    3.2 Key design points

    • Idempotency and deduplication: each task must have a unique identifier and a state machine to avoid duplicate submissions; tasks already handled do not re-enter the queue.
    • Small commits: one round solves one small, verifiable problem, which lowers review cost and rollback cost.
    • Stop on failure: never submit when self-checks fail; keeping noise out of human view is the precondition for maintaining trust.
    • Observability: use logging services and monitoring alerts to track per-round duration, success rate, and failure types; this data is the only basis for later optimization.
    • Resource isolation: run tasks in separate working copies or containers to avoid cross-contamination; reuse build artifacts and caches via object storage or a caching service.

    4. Step Three: Move Humans to the Review Seat, Not out of the Accountability Chain

    Automation increases output speed; it does not remove responsibility. Practical guardrails include:

    • Least privilege: the automation identity can only create branches and merge requests; it is not granted permission to merge into the main branch, release to production, or change permission configurations.
    • Mandatory gates: main branch protection, required reviews, and all checks green before merging—the same rules apply to automation and to humans.
    • Risk tiers: changes involving authentication, data migration, payments, concurrency, and external interfaces always require line-by-line human review and never enter the automatic merge path.
    • Revertible changes: ship in small batches and frequently, with canary releases and fast rollback, to keep the blast radius of any single failure minimal.
    • Audit trail: who had the model change what and when, and who approved it, must all be traceable.

    5. Common Misconceptions and an Adoption Path

    Three misconceptions need clearing up. First, a rules file is not a magic switch: it lowers the probability of violations but does not eliminate them, so gates are still needed as a backstop. Second, a high degree of automation does not mean you can step away from context; cross-module refactoring, vague requirements, and deep judgments about performance and security still depend on humans. Third, the change in income structure comes from products and channels, not from the tool itself; treating automated output as equivalent to passive income reverses cause and effect.

    The suggested order of progression is: first fill in tests and static analysis so that “correct” can be judged by a machine; then write the project rules file to stabilize model behavior; then run a single-task semi-automatic flow on low-risk work (adding tests, fixing localized bugs, updating docs); finally connect scheduled polling and automatic submission, gradually widening the range of task types. At each step, use three metrics—success rate, rework rate, and review time—to decide whether to move on.

    In the end, what tools level out is execution efficiency; what is genuinely scarce is the person who can define a vague problem clearly and design quality constraints into a system capability. The people who know how to build systems with tools are the ones who buy their time back.