惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
I
InfoQ
博客园_首页
G
Google Developers Blog
爱范儿
爱范儿
Last Week in AI
Last Week in AI
量子位
阮一峰的网络日志
阮一峰的网络日志
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
月光博客
月光博客
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
La règle du jour-jeté-à-la-poubelle : lis le code avant d...
Michel Faure · 2026-05-17 · via DEV Community

Six heures du matin, devant la sortie

Vingt-neuf avril, six heures du matin. Le rendu sort à l'écran. A A A A A sur toute la matrice du document, illisible par construction. Je demande à mon agent pourquoi la sortie est incohérente. Il relit le code, descend dans le dossier voisin, et trouve un composant existant dont je n'avais jamais demandé l'inventaire. Le composant rend proprement le format attendu — signatures, en-tête, légende, bloc d'identification. Ce que mon agent venait de coder la veille était un doublon partiel d'un fichier qu'aucun de nous deux n'avait ouvert.

Le format que mon agent venait d'inventer la veille existait déjà dans le repo. Mieux fait. Dans un fichier nommable, qu'aucun de nous deux n'avait lu avant d'écrire.

Pourquoi un agent invente à côté de l'existant

Le fond du problème n'est pas l'agent. C'est moi. Quand je lance un chantier sur un domaine déjà couvert par du code, je décris la cible et je laisse l'agent générer. Lui n'a pas idée du voisinage du fichier qu'il va créer, parce que je ne lui ai pas demandé de le cartographier. Il code une solution plausible à un problème mal cadré, et la plausibilité du résultat masque la duplication tant que personne n'ouvre les autres fichiers du même dossier.

L'absence de Phase 0 grep n'est pas un défaut de l'agent. C'est un défaut du pilote qui a sauté l'étape la moins coûteuse de toute la chaîne.

Phase 0 — deux minutes, un fichier

# Phase 0 — avant tout nouveau composant dans un domaine existant
DOMAIN="invoices"   # le mot-clé du chantier

find app/api/$DOMAIN/ lib/$DOMAIN/ \
  -type f \( -name "*.ts" -o -name "*.tsx" \) | head -20

# Si un pattern attendu est nommable, vérifier qu'il n'existe pas déjà
grep -rl "ExistingPattern\|RenderPdf\|exportPdf" app/ lib/

Enter fullscreen mode Exit fullscreen mode

Deux minutes, à tout casser. Le résultat tient sur un écran. Si un composant existant traite le besoin, on le lit avant de proposer quoi que ce soit de neuf. Si rien n'existe, on a la preuve d'avoir cherché.

Le coût mesuré du shortcut est un jour-dev. Le composant qu'il aurait fallu lire tenait dans un seul fichier au nom évocateur, dans le dossier juste à côté. Deux minutes de find auraient suffi. Le jour reverted, c'est ce que coûte la confiance dans la plausibilité d'un brouillon que personne n'a relié à son voisinage.

Le signal métacognitif

Quand l'agent a relu son propre travail à la lumière du composant existant, il a proposé de reverter, pas de défendre. C'est un bon signal, et un agent qui s'enferme dans son design inventé serait beaucoup plus coûteux qu'un agent qui reconnaît avoir loupé du code. Mais le bon signal vient trop tard. La règle est de ne pas en arriver là.

La règle

Avant tout nouveau format, template ou composant dans un domaine déjà couvert, Phase 0 grep, lecture du voisinage, verbalisation de l'existant. Sinon, le jour suivant, tu reverts.


Script Phase 0 grep et checklist en 5 questions, pseudonymisés :
github.com/michelfaure/rembrandt-samples/tree/main/one-day-thrown-away-rule