Claude Code in Practice: Structuring Projects, Rules, and Agent Workflows
Terminal-native AI coding agents that modify files directly and follow team conventions through plain Markdown configs lower the barrier to consistent, automated development workflows. The CLAUDE.md and .claude/ directory pattern gives teams a version-controlled, shareable way to encode coding standards that every AI session respects, reducing style drift across contributors.
Claude Code operates inside the terminal, not a browser chat window. It scans the full project tree, understands file relationships, and executes a think-act-verify loop that mirrors how a human programmer works. Built-in tools handle file operations, shell commands, regex search, and LSP integration, while Sonnet and Opus models cover daily coding and complex architecture respectively.
The real leverage comes from project-level configuration. Running /init generates a CLAUDE.md file that acts as persistent context — tech stack, build commands, code style, and architectural conventions. A .claude/ directory then layers on modular rules, custom slash commands, reusable skills that auto-trigger on matching tasks, and sub-agents with scoped permissions for multi-role workflows like frontend review or backend analysis.
MCP servers extend Claude Code beyond the codebase, connecting it to GitHub, databases, Slack, and browsers through HTTP or local stdio transports. Configuration lives in .mcp.json at the project level and ~/.claude.json globally, with three permission modes — normal, plan, and auto-accept — controlling how autonomously the agent edits files.
Encoding team conventions in Markdown files rather than prompt templates makes AI behavior reproducible, auditable, and shareable across a Git repository — a lightweight alternative to heavier policy-as-code approaches.
The sub-agent pattern solves a real bottleneck: single-session context windows get overloaded on complex projects. Delegating to specialized agents with scoped permissions mirrors how human teams split work.
CLAUDE.md functions as a form of prompt-engineering-as-infrastructure. The quality of AI output becomes a function of how well the project's conventions are documented, not how clever the individual prompt is.
Running AI coding agents directly in the terminal with file-write access shifts the trust model from suggestion to execution. The permission modes and deny lists are not optional polish — they are the safety boundary.