AI Coding in Practice: From Tool Awareness to a Working Development Workflow

    This article turns AI coding from a collection of prompt tricks into a repeatable engineering workflow. It explains why AI-assisted development needs constraints and verification, how to set up a usable environment across local CLI, desktop, and containerized options, and how core modes such as planning, controlled auto-execution, permission management, version control, multimodal input, and session hygiene keep output reliable. It also covers project-level configuration, skills and hooks, standardized external context access, multi-agent division of labor, a three-stage pattern for building products from scratch, and common pitfalls to avoid.

    1. Why AI Coding Needs a Methodology, Not a Toy Mentality

    Over the past few years, the role of AI-assisted coding has shifted three times: it started with automatic completion of code snippets, moved into conversational Q&A, and has now evolved into an execution-oriented assistant that can understand repository structure, carry out multi-step operations, and take part in engineering workflows. The direct consequence is that prompt techniques alone are no longer enough for real projects. Developers need a stable workflow.

    When teams first try AI coding tools, they often fall into a cycle of “generate fast, rework more.” The cause is not model capability but a lack of constraints: vague goals, disorganized context, and changes without verification. The core of AI coding practice is therefore not “make the AI write more,” but “make the AI keep producing verifiable results within controlled boundaries.”

    2. A Usable Environment in 10 Minutes: Installation, Configuration, and Common Troubleshooting

    2.1 How to Choose Among Three Typical Installation Paths

    In general practice, AI coding tools are usually deployed in one of three ways: local command-line installation, desktop client installation, or containerized/remote environment installation. The trade-offs are straightforward:

    • Local command line suits developers who already have mature terminal habits and makes it easy to integrate with version control and scripting toolchains.
    • A desktop client suits users who are new to the command line and want to reduce mental overhead.
    • Containers or remote environments suit scenarios that need a unified team environment and want to avoid “it runs on my machine” problems.

    2.2 Platform Differences and Frequent Pitfalls

    The three most common cross-platform problems are: runtime version mismatches, incorrect permission and executable path configuration, and terminal encoding and line-ending differences. The recommended approach is to pin the runtime version first, verify a minimal runnable example, and only then connect a real repository.

    1. # Example: confirm runtime and basic environment
    2. runtime --version
    3. env-check --profile minimal

    2.3 Adaptation Advice for Five Usage Modes

    Common modes include single-shot Q&A, repository-level tasks, long sessions with continuous iteration, scripted batch processing, and integration with continuous integration workflows. There is only one selection principle: the more a task requires cross-file consistency, the more you should choose a mode with repository context; the more atomic a task is, the more you should shorten the session and reduce irrelevant context.

    3. Core Working Modes: Turning AI from “Chat” into “Productivity”

    3.1 Discuss First, Then Execute: The Value of Planning Mode

    The key role of planning mode is to “intercept mistakes before any action is taken.” A mature practice is to first have the AI output task breakdown, impact scope, risks, and verification methods, confirm them, and only then enter the implementation phase. This significantly reduces the chance of large-scale incorrect edits.

    A reusable planning prompt structure looks like this:

    1. Goal: <one sentence describing the acceptable result>
    2. Constraints: <files/interfaces/dependencies that must not change>
    3. Steps: <broken down into 3-7 verifiable steps>
    4. Verification: <how to prove the change is correct>
    5. Rollback: <how to recover if it fails>

    3.2 Controlled Auto-Execution: Safety Boundaries First

    “Autopilot”-style execution does not mean leaving things unattended; it means making permissions, scope, and checkpoints explicit. The recommended approach is to allow reading and local writes, forbid automatic approval of high-risk operations, run an automated check at the end of each stage, and keep manual confirmation for destructive commands.

    3.3 Permission Management: Humans Set the Rules

    The permission system should cover at least three layers: file read/write scope, a command execution allowlist, and external access restrictions. In team scenarios, auditing and traceability should be added on top, ensuring every change can be traced.

    3.4 Natural Fit with Version Control

    The best practice for combining AI coding with version control is “small-step commits”: each verifiable small change becomes its own commit, and the commit message states the intent and verification result. If a problem appears, the cost of locating it is very low.

    3.5 The Boundaries of Multimodal and Voice Interaction

    When tools have visual understanding and voice input, the main applicable scenarios are UI reproduction, error-screenshot analysis, and quickly shaping spoken requirements. However, when precise values, API fields, or permission configurations are involved, text specifications should still be the source of truth to avoid ambiguity.

    3.6 Session Management: Don’t Let Context Become a Dump

    The biggest risk of long sessions is context pollution: early failed attempts, irrelevant logs, and outdated conclusions keep interfering with judgment. It is recommended to organize work as “one goal, one session,” produce conclusion documents at each stage, and then start a new session that inherits the conclusions rather than the entire history.

    4. Advanced Capabilities: Configuration, Extensions, and Multi-Agent Collaboration

    4.1 The Role of Project-Level Configuration Files

    Using an instruction file in the project root to carry the “project constitution” is a fairly common industry practice. Recommended content includes: tech stack and versions, directory responsibilities, coding conventions, prohibited items, and common verification commands. Its value is turning verbal agreements into machine-readable, continuous constraints.

    4.2 Skills and Hooks: Solidifying Repeated Experience

    Skills encapsulate reusable task patterns (such as the standard process for adding a new API), while hooks automatically trigger checks at specific moments (such as auto-formatting after a write or running static checks before a commit). Together, they upgrade “individual experience” into “team assets.”

    4.3 Protocol-Based External Access

    Through a standardized context access protocol, AI can read external information such as requirements documents, monitoring alerts, and log services. In general categories, integration targets can include design files in object storage, task events in message queues, deployment status on container platforms, and troubleshooting information from log services and monitoring alerts, forming a closed loop from “symptom to diagnosis.”

    4.4 Division-of-Labor Principles for Multi-Agent Collaboration

    More agents is not better. Effective division of labor is usually designed around “role boundaries + single responsibility”: one handles solutions and breakdown, one handles implementation, and one handles review and verification. The key is to share the same acceptance criteria and set up an aggregator to make the final decision, avoiding conflicting conclusions.

    5. Abstract Patterns from Three Complete Cases

    No matter how the case forms change, building a real product from 0 to 1 can usually be abstracted into three stages:

    1. Requirement convergence: turn vague ideas into acceptable items with priorities.
    2. Skeleton first: get the minimal closed loop working (data, APIs, pages, deployment) before filling in details.
    3. Iterative hardening: use tests, logs, monitoring, and documentation to build engineering resilience.

    In general cloud environments such as Baidu AI Cloud, this pattern maps naturally to a standard combination of “object storage for static assets, a container platform for services, and log services plus monitoring alerts for observability,” and can be implemented without relying on any proprietary interfaces.

    6. Common Pitfalls and Mental Models

    • Pitfall 1: treating AI as a search engine. It is better suited to execution and refactoring than to replacing fact-checking.
    • Pitfall 2: delivering one huge task at once. The larger the task, the harder verification becomes and the more painful rollback is.
    • Pitfall 3: ignoring context hygiene. The dirtier the context, the more erratic the output.
    • Pitfall 4: skipping human review. Automation improves speed, but responsibility still lies with people.

    Three mental models worth reusing long term are: constraints over prompts, verification over generation, and context as an asset over session accumulation. Master these three, and even as tool forms keep changing, your AI coding efficiency and judgment will keep improving.