RFC: Production Patterns from Months of Claude Code Usage

Resolved 💬 3 comments Opened Jun 11, 2025 by creatorrr Closed Jan 6, 2026

Context:
I've been using Claude Code heavily at Julep (AI workflow orchestration platform) and wrote up our learnings: https://diwank.space/field-notes-from-shipping-real-code-with-claude

The post was on HN front page, and got ~50k+ unique views. I think developers are hungry for real production patterns. Figured the Claude Code team might find some of these patterns worth exploring as potential features or best practices.

New Patterns We Found Useful:

1. Anchor Comments

We use special comments (AIDEV-NOTE:, AIDEV-TODO:, AIDEV-QUESTION:) that Claude maintains and updates. These act as persistent waypoints in large codebases. Esp, while scanning files, and navigating large dirs. claude can just grep for AIDEV-* now. Example:

# AIDEV-NOTE: Critical performance path - 100k req/sec
# DO NOT add database queries here

Snippet from our repo's ([julep-ai/julep](/julep-ai/julep)) implementation:

# CLAUDE.md

### Anchor comments

Add specially formatted comments throughout the codebase, where appropriate, for yourself as inline knowledge that can be easily `grep`ped for.

- Use `AIDEV-NOTE:`, `AIDEV-TODO:`, or `AIDEV-QUESTION:` as prefix as appropriate.

- *Important:* Before scanning files, always first try to grep for existing `AIDEV-…`.

- Update relevant anchors, after finishing any task.

- Make sure to add relevant anchor comments, whenever a file or piece of code is:

  * too complex, or  
  * very important, or  
  * could have a bug 

2. Mode-Based Operations

We've identified three distinct modes that need different guardrails:

  1. Playground Mode: Weekend hacks, zero ceremony
  2. Pair Programming Mode: <5k LOC projects, needs structure
  3. Production Mode: Monorepos, requires strict boundaries

We found claude-composer really useful for mode 1.

3. Sacred Rule: Claude never _modifies_ tests

Some files should NEVER be touched by AI (tests, migrations, security code). Would love a .claudeignore or similar mechanism. Especially, in mode 3.

Concrete Feature Ideas:

  1. Project Templates: Ship starter CLAUDE.md templates for common stacks
  2. Anchor Comment Support: Recognize and preserve AIDEV-* comments
  3. Mode Switching: Let users declare which mode they're in
  4. Safety Rails: Built-in warnings for modifying tests/migrations
  5. Token Economics Dashboard: Show cost implications of context choices

Happy to elaborate on any of these patterns or jump on a call to discuss. We're pushing 1k+ AI-assisted commits monthly, so have plenty of battle scars to share.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗