SShortSingh.
Back to feed

Why AI coding tools ignore your project rules and how to fix them

0
·1 views

Popular AI coding assistants like Cursor, Claude Code, and OpenAI Codex each support project rules files, but teams frequently find their instructions being ignored due to how each tool loads and prioritizes those files. Cursor uses .mdc files with frontmatter that controls four distinct attachment modes, meaning vaguely described rules with no file globs may never be loaded at all. Claude Code reads CLAUDE.md at every session start, making bloated or unfocused files a liability that dilutes the model's attention across an entire session. Codex merges AGENTS.md files hierarchically from home config down to subdirectories, where a nested file can silently override root-level rules without any warning. Across all three tools, the core fix is the same: write specific, imperative instructions scoped precisely to where they apply, rather than broad guidance intended for a human reader.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer Builds Telegram Bot to Fix Claude Code's Silent Blocking Problem

A developer working across multiple parallel projects noticed significant time being lost when Claude Code sessions stalled waiting for input, with no way to know without manually checking each window. To solve this, they built an open-source tool called claude-code-notify that sends Telegram alerts when a Claude Code session finishes a task or needs user approval. An initial attempt using Claude Code's built-in Stop hook failed because background Bash commands return an immediate acknowledgment rather than a completion signal, causing premature notifications. The developer resolved this by tracking each background task's tool_use_id in the session transcript and only sending a notification once every launched task had a confirmed result. The project also exposed gaps in Claude Code's native SubagentStop hook, which the developer noted are open issues in the platform itself rather than problems specific to their setup.

0
ProgrammingDEV Community ·

Developer builds pixel-perfect portfolio using React 19, Next.js, and custom GitHub graph fix

A developer has shared how they built a premium personal portfolio using React 19, Next.js 16 with App Router, and Tailwind CSS v4, focusing on clean animations and micro-interactions. A key challenge was fixing the GitHub contribution graph, where dynamically computed cell sizes caused month labels to misalign across screen sizes; the solution was switching to a fixed-coordinate SVG with a viewBox attribute, allowing the browser to scale it natively. The portfolio also features an audio click sound on dark mode toggle, implemented via a pre-loaded HTML5 audio element to ensure compatibility with both desktop browsers and iOS Safari. On the SEO front, the developer integrated JSON-LD structured data schemas, a dynamic sitemap with stable modified dates to protect crawl budget, and an IndexNow API route to automatically notify Bing and Yandex upon new content publication. The project highlights how thoughtful technical decisions in layout, interactivity, and discoverability can elevate a developer portfolio beyond standard templates.

0
ProgrammingDEV Community ·

Developer Builds Lens, an Open-Source Transparent Proxy in Rust for Local Debugging

A developer has created Lens, an open-source transparent proxy tool built in Rust, aimed at simplifying the debugging of distributed applications running locally. The tool is designed to observe requests and responses between services without requiring any instrumentation in individual applications. Lens currently supports HTTP/1.1, PostgreSQL protocol decoding, secret redaction, and a cross-platform architecture, with an interactive terminal UI under development. It leverages Rust's Tokio async runtime and Cargo workspace structure to keep the codebase modular and performant. The project is publicly available on GitHub, and the developer is seeking feedback while working toward broader protocol support in upcoming milestones.

0
ProgrammingDEV Community ·

Software Engineer Boosts Lighthouse Score by Disabling JavaScript on Personal Site

Faran Aiki, a software engineer and ITB student, conducted a performance audit of his personal portfolio website faranaiki.id and identified several bottlenecks hurting its Lighthouse score. He resolved layout thrashing issues caused by synchronous DOM measurement calls by deferring them with setTimeout, requestAnimationFrame, and ResizeObserver. Oversized images on mobile were fixed by using viewport-based size hints, prompting Next.js to serve smaller image variants and reducing Largest Contentful Paint. A heavy D3-powered interactive graph was lazy-loaded with dynamic imports and server-side rendering disabled, cutting Total Blocking Time significantly. Ultimately, disabling JavaScript on certain parts of the site proved to be the most impactful single change for improving overall performance metrics.