Glean 拾遗
← All issues
#005 Latest 6/22–6/28 Published Jun 28

The Loop Designer: When Coding Becomes Designing Closed Circuits

This week's edition is dominated by a single, powerful theme: the shift from one-shot prompting to autonomous loops in AI-assisted coding. The community produced a complete spectrum of content around Loop Engineering—from conceptual frameworks and technical breakdowns to real-world case studies. The clear signal is that the most effective AI workflows aren't about crafting a perfect prompt, but about designing closed-loop systems that discover, execute, verify, and iterate on their own. Alongside this main thread, we've curated deep dives into design specs, resource budgeting, and code review—all addressing a common question: when AI becomes abundant, what becomes the scarce human skill? By the end of this issue, you'll see that prompt writing is just the beginning—designing loops is the real threshold under the new normal.

30 picks 7 sections ~8 hr
Section 01

The Age of the Loop Designer

6 / 30
addyosmani.com · 14 min
01

Loop Engineering不再手动提示AI:设计循环,让智能体自主迭代

Loop Engineering proposes a shift from hand-prompting coding agents to designing autonomous loops: a system with five components (scheduled automations for discovery, worktrees for parallel isolation, skills to codify project context, plugins/connectors via MCP, and verifier sub-agents) that lets agents iterate without manual intervention. The post maps these primitives across Codex and Claude Code, noting that memory persisted outside the conversation (via AGENTS.md or Linear) is the critical sixth piece. The core insight is that loop design is harder than prompt engineering—the engineer's role moves from operator to system architect, while verification burden, comprehension debt, and cognitive surrender remain unresolved challenges that the loop itself cannot eliminate.

x.com · 15 min
02

From Prompting Agents to Loop Engineering从写提示词到设计循环:Agent Loop 工程实战指南

The AI coding community is shifting from prompting agents manually to designing loops that prompt agents for you. This is the most practical, production-oriented guide available: what an agent loop is, why it matters, and what one looks like in the real world. The author breaks down the six mandatory components (trigger, isolation, written-down context, tool reach, second-agent checker, on-disk state), then illustrates with two concrete examples: a PR babysitter that checks every 15 minutes and auto-fixes CI failures, and Claude Code's /goal command. It also covers where cost actually goes (iterations, not tokens), when not to loop (one-shot edits, unbounded exploration), and predictable failure modes (verification burden stays human, comprehension debt, silent drift).

x.com · 12 min
03

Loop Engineering: The AI skill every builder needs in 2026循环工程:2026年AI构建者必备的新技能

This community-authored article introduces 'Loop Engineering,' arguing that the most effective AI builders are shifting from one-shot prompting to designing automated feedback loops for AI agents. Rather than crafting a perfect prompt, engineers should build systems that discover, plan, execute, verify, and iterate until a verified outcome is reached. It covers six building blocks (automations, worktrees, skills, plugins/connectors, subagents, memory), two loop scales (single-agent vs. fleet), and two types (open vs. closed), while frankly addressing the critical hidden cost of tokens. A practical primer for engineering teams turning AI agents from experiments into production workflows.

x.com · 23 min
04

Loop engineering: the 14-step roadmap from prompter to loop designer从提示者到循环设计师:14步走向智能体工程新范式

This post from @0xCodez on X provides a comprehensive 14-step roadmap for transitioning from manual prompting to designing autonomous loop systems in AI-assisted coding. Based on Anthropic engineering docs, Addy Osmani's essay, and recent studies, it's structured in three tiers: first, a 4-condition test to decide if a loop is warranted; second, five building blocks (automations, worktrees, skills, connectors via MCP, sub-agents with maker-checker split); third, building the minimal viable loop and avoiding failure modes like the 'Ralph Wiggum loop', comprehension debt, and security tax. The author emphasizes that loops are not universal—they only earn their cost when tasks repeat, verification is automated, the token budget can absorb waste, and the agent has senior engineer tools. Ideal for engineers already using coding agents who want to orchestrate them into batched, automated workflows.

x.com · 7 min
05

Loop Engineering for Beginners: From Concept to Minimal Loop小白也能上手的Loop Engineering:从概念到最小闭环实践

This article is a beginner-friendly tutorial that demystifies Loop Engineering: it's not a buzzword but a structured framework for human-AI collaboration, formalizing repetitive actions like goal-setting, stepwise execution, quality checks, feedback loops, and stop conditions. It clearly distinguishes between ordinary prompting (one-shot) and looping (sustained closure), then walks through a minimal viable example—building a personal knowledge base using the LLM Wiki approach. The author stresses that the 'check' step is the heart of any loop, and that without inspection criteria, automation just generates garbage. It also warns against common beginner mistakes such as mistaking long prompts for loops, overly ambitious goals, vague standards, lack of human sign-off, and granting excessive permissions. The article is instructional rather than deep, but it provides a ready-to-use template and the seven-element checklist (goal, input, execute, check, feedback, record, stop). It's best suited for engineers new to agentic workflows who want a structured starting point.

x.com · 9 min
06

Stop Being the Loop: How to Make Claude Work While You Sleep把 Claude 从对话工具变成自动化工人:循环工程入门

Boris Cherny, who built Claude Code at Anthropic, no longer writes prompts by hand—he writes loops. This guide explains what a real loop is: a small system that runs Claude repeatedly until a job is done, complete with self-checking, state persistence, and automatic stopping. Unlike cron jobs, loops contain a decision-maker (Claude) that can adapt mid-stream. The article covers Claude Code's /goal (loop until done) and /loop (repeat on a schedule) commands, and provides a paste-ready charter template with sections for goals, work sources, work instructions, self-verification, memory, and stop conditions. Ideal for engineers transitioning from prompting to building persistent, autonomous AI workflows.

Section 02

The Stop Condition is the Real Art

4 / 30
x.com · 12 min
07

Agent Loops for PMs: The Hard Part Is the Stop ConditionAgent 循环最难的部分:定义停止条件

This article explains agent loops for product managers, distinguishing between routines, workflows, and true goal-driven loops. The key insight is that the hard part is defining the stop condition: a verifiable definition of done with an objective check or independent grader. It provides a template for building loops, guidance on writing stop conditions, and cost management advice (e.g., tracking cost per accepted change). Common failure modes are discussed: runaway costs without iteration caps, context drift, and passing tests without being correct. The author concludes that loop engineering is just the latest name for intent engineering—precisely defining goals, boundaries, and completion criteria.

x.com · 12 min
08

Agent Loops for PMs: The Hard Part Is the Stop ConditionAgent 循环最难的部分:定义停止条件

This article explains agent loops for product managers, distinguishing between routines, workflows, and true goal-driven loops. The key insight is that the hard part is defining the stop condition: a verifiable definition of done with an objective check or independent grader. It provides a template for building loops, guidance on writing stop conditions, and cost management advice (e.g., tracking cost per accepted change). Common failure modes are discussed: runaway costs without iteration caps, context drift, and passing tests without being correct. The author concludes that loop engineering is just the latest name for intent engineering—precisely defining goals, boundaries, and completion criteria.

x.com · 7 min
09

The Debug Loop: How Claude Code Finds the Bug in 6 Steps Instead of 60调试循环:6步而非60步,用Claude Code定位根因

Most developers debug with Claude Code by pasting errors and accepting speculative fixes, leading to a 40-60 message death spiral. This post proposes a six-step loop: first establish a reliable repro (failing test), isolate the search area in plan mode, dispatch read-only subagents to trace root causes from multiple angles, fix only the root cause (not symptoms), verify with an automatic hook (e.g., PostToolUse running the test), and keep the repro as a permanent regression test. The key insight is that Claude Code was always capable; the failure mode is skipping straight to 'fix' before understanding the bug.

x.com · 24 min
10

30 Core Agentic Engineering Concepts Every Developer Should KnowAI 智能体工程的 20 个核心概念

This article distills 20 foundational concepts in agentic engineering, covering building blocks (Agent loop, Think-Act-Observe, state, patterns), configuration (config files, workflow files, prompt caching, context rot), capability (MCP, live document retrieval, persistent memory), orchestration (subagents, agent loops), guardrails (sandboxing, permissions, hooks, prompt injection defense, pre-commit gates), and observability (tracing, metrics). The author argues that frameworks change but these underlying ideas persist; understanding them makes any new tool familiar. Includes concrete config examples and practical advice (e.g., keep config files under 100 lines, distinguish proxy metrics from outcome metrics).

Section 03

Scaling Engineered Loops: Cost, Parallelism, and Failure Modes

6 / 30
x.com · 19 min
11

Loops explained: Claude, GPT, Mira and what actually worksLoops 解密:Claude、GPT、Mira 以及真正有效的方法

This article explains the core concept of AI loops—moving from single-request interactions to autonomous goal-driven iterations. It covers the five building blocks of a real loop (automation, skill, sub-agents, connectors, verifier), the hidden costs (context growth, token compounding, empty iterations), and provides a self-checking prompt you can paste into any LLM. It also introduces Mira as a free, no-code loop platform inside Telegram. For engineers evaluating agent infrastructure or anyone wanting to move beyond manual prompting.

x.com · 12 min
12

Loop Engineering: How One Loop Ships 259 PRs a Month一个工程师月提259个PR:循环工程实战指南

This article breaks down the engineering of AI-driven development loops, contrasting a single engineer shipping 259 PRs in a month with a runaway loop that burned $47,000. It dissects six essential components—state file, automation/scheduling commands (e.g., /loop, /schedule, /goal), git worktrees, skills, MCP connectors, and sub-agents (writer vs. checker)—with concrete configuration examples for both Claude Code and OpenAI Codex. The piece provides a brake configuration template (max_turns, max_budget_usd, scope, circuit_breaker), describes four failure modes, and offers low-cost starting strategies. Aimed at engineers building or evaluating AI agent workflows.

x.com · 10 min
13

How 1 Claude Agent Runs 10 Others · 9 Steps Swarm Loop9步编排Claude Code智能体集群:如何让1个主管Agent协调10个子Agent并行工作

This post breaks down a 9-step pattern for running multiple Claude Code subagents in parallel without chaos. The key insight is that launching many agents is easy and usually messy; the skill is in the orchestration loop: verify the task is splittable, have the lead agent decompose it into atomic subtasks with human approval, isolate each agent via Git worktrees to prevent file collisions, then fan out in parallel. A SubagentStop hook gates every result (tests + lint), a grader scores each against a rubric and automatically sends weak ones back for revision, and finally only the lead agent merges passing results in dependency order. The entire loop can be packaged as a reusable skill or slash command.

x.com · 4 min
14

Human in the /loop人类在循环中:如何设置能自主运行并通知你的AI编码循环

The author shares a practical workflow for coding with AI agents: define a verifiable 'definition of done' (model eval score, QA pass, green tests, performance benchmark), wrap it in a loop for the agent to iterate autonomously, and get notified via Slack when a decision is needed or the task completes. Loops run in the cloud, not on the local machine. The author runs 3-5 long loops concurrently plus shorter tasks. For engineers looking to level up from one-shot agent interactions to long-running autonomous optimization tasks.

addyosmani.com · 9 min
15

The Orchestration Tax: When Agents Parallelize but Your Attention Doesn't编排税:当AI智能体并行时,注意力的串行瓶颈

Starting agents is cheap, but closing the loop (review, merge, judgment) must route through a single serial processor: you. The author frames human attention as the GIL for AI agents — you can spawn 20 agents, but your throughput to main is bounded by your serial review rate. Amdahl's Law applies: the non-parallelizable judgment fraction caps any speedup. Strategies include: scaling agent count to review rate, not UI; sorting tasks into async-able vs. judgment-heavy; batching reviews; making agents prove correctness with tests/screenshots. The insight: busy ≠ productive. Unpaid orchestration tax accumulates both technical debt and cognitive debt, silently eroding your mental model of the system.

yusufaytas.com · 9 min
16

Old Software Was Fast Because It Had No Choice旧软件跑得飞快,因为它别无选择

The article argues that modern software has become bloated not because of any single bad decision, but because hardware is too easy to provision. Using the example of a Java component launching a Spark cluster, the author points out that engineers routinely add memory and CPU 'just in case,' and these temporary patches harden into defaults. The JVM reads an inflated container limit and grows its heap, GC gets lazier, and resources are silently wasted. The real problem is that cost moves from the decision-maker to someone else—the person adding a dependency today is not the one debugging it tomorrow. The solution is explicit resource budgets that force teams to justify any increase in footprint. Recommended for backend engineers, SREs, and platform teams running services in the cloud.

Section 04

The Trust Bottleneck: From Review to Executable Design

4 / 30
addyosmani.com · 29 min
17

Agentic Code ReviewAI生成代码泛滥后,代码审查才是真正的核心技能

When coding agents produce thousands of lines of often solid code in minutes, the engineering bottleneck shifts from writing to trusting, making review the most leveraged skill in software. Multi-source 2026 data (Faros AI, CodeRabbit, GitClear, GitHub) shows: AI users generate ~4x raw output but only ~12% more delivered value; code churn up 861%, defect rate from 9% to 54%, review duration up 441.5%, and zero-review merges up 31.3%. The article argues the fix is not to stop using AI but to tier review effort by blast radius: light for solo no-user projects, heavy for large enterprises. Specific advice: triage PRs upfront, require evidence before review, watch test rewrites, run two differently-structured AI reviewers in parallel, and upgrade humans from line-level review to spot-checking and auditing. The durable skill is understanding a system well enough to stand behind it.

addyosmani.com · 15 min
18

The New Software Lifecycle: From Writing Code to Judging ItAI 重塑软件生命周期:从编写代码到评判代码的转变

Key insights from a Google whitepaper on how AI transforms the software lifecycle. The core thesis: an agent is 10% model and 90% harness (instructions, tools, sandboxes, orchestration, observability). Context engineering is the primary cost lever, with a critical distinction between static context (loaded every turn, reliable but expensive) and dynamic context (loaded on demand, cost-efficient but needs careful design). Verification determines whether you're vibe coding or doing agentic engineering: tests for deterministic parts, evals for non-deterministic output and trajectory. Real data: one team moved a coding agent from outside top 30 to top 5 on Terminal Bench 2.0 by changing only the harness with the same model; LangChain added 13.7 points on the same benchmark by changing system prompt, tools, and middleware around a fixed model. Implementation collapses from weeks to hours, while specification and verification become the new bottlenecks. For engineers and tech leads adopting AI agents in production workflows.

x.com · 4 min
19

Vercel's AI Design Spec: A Textbook ExampleVercel 的 AI 设计规范:一份教科书级的参考

This article deeply analyzes Vercel's DESIGN.md, showcasing how to write an efficient and executable design specification for AI. It breaks down Vercel's approach across color, spacing, typography, motion, copy, and accessibility, revealing the thinking behind it. The color system uses a 100-1000 scale where each number corresponds to a fixed UI state (default, hover, click), eliminating AI guesswork. Spacing is limited to 9 values based on 4px increments, enforcing rhythmic consistency. Typography adopts role-based thinking (heading/label/copy/button) instead of pixel-based thinking. Motion design advocates 'no animation is often best' and gives precise durations per scenario. This piece is valuable for product managers, front-end engineers, and AI tool developers aiming to improve AI-generated UI consistency or build their own design specs.

raft.build · 11 min
20

A Comfortable AX for Agent Search为Agent设计搜索结果:给信息配上下一步动作

Raft CTO Tenny argues that returning raw IDs or full content to an agent doing a search is bad design. The correct approach mirrors web search results: return a highlighted snippet, context preview, and one explicit next action (e.g., 'read surrounding context'). Every token in the agent's context window has a cost, so results must be compact, immediately scannable, and paired with an actionable next step. This is UX design extended—but the user is now an agent reading tokens, not a person looking at a screen.

Section 05

Models and Infrastructure

6 / 30
z.ai · 21 min
21

GLM-5.2: Built for Long-Horizon TasksGLM-5.2:面向长时程任务,落地百万 Token 上下文与开源推理栈

Zhipu AI introduces GLM-5.2, a flagship model for long-horizon tasks with a solid 1M-token context and an MIT license. Architecture innovations include IndexShare, which reuses the sparse attention indexer across four layers to cut per-token FLOPs by 2.9× at 1M context, and an improved MTP layer that raises speculative decoding acceptance length by 20% through IndexShare, KV sharing, rejection sampling, and end-to-end TV loss. Agentic RL post-training is backed by the slime framework, and an anti-hack module detects and blocks reward-hacking behaviors like fetching evaluation files or curl-downloading answers. GLM-5.2 ranks as the top open-source model on long-horizon benchmarks such as FrontierSWE (only 1% behind Opus 4.8) and Terminal-Bench 2.1 (81.0), making it relevant for engineers building coding agents and long-context inference systems.

x.com · 1 min
22

Cloudflare Workers Temporary Accounts: Deploy a Worker in SecondsCloudflare Workers 推出临时账户:代理秒级部署 Worker

Cloudflare introduces Temporary Accounts for Workers, allowing any agent to get a live Worker running in seconds by running `wrangler deploy --temporary`. This feature lowers the barrier for developers and AI agents to deploy without managing long-term accounts or credentials, ideal for quick tests, integration checks, or ephemeral tasks. The post is a product launch announcement with no deep technical details.

github.com · 94 min
23

ECC: Cross-Harness Agent Operating System for Claude Code, Cursor & Beyond跨 AI 编码助手的智能体增强操作系统——规则、技能与安全审计

ECC is a comprehensive agent harness operating system designed to enhance multiple AI coding assistants including Claude Code, Cursor, Codex, OpenCode, and GitHub Copilot. It's not a standalone AI tool but a collection of 260+ skills, 67+ agents, persistent memory, continuous learning, cost optimization, and security auditing features. By providing unified rules, hooks, and MCP configurations across platforms, it addresses issues of inconsistent agent behavior, context loss, and inadequate security. Ideal for professional developers deeply using AI coding assistants and teams seeking standardized agent engineering practices.

x.com · 15 min
24

15 AI Agent Design Patterns Every Engineer Must Know15种AI Agent设计模式:从单智能体到事件驱动,生产级系统的选择指南

This article outlines 15 AI agent design patterns—ranging from single agent, sequential/parallel multi-agent, review/refinement loops, coordinator, hierarchical decomposition, ReAct, human-in-the-loop, plan-and-execute, reflexion, custom logic, to event-driven agents. Each pattern comes with real-world examples, clear when-to-use and when-it-breaks heuristics, and a decision matrix based on the type of uncertainty. The author emphasizes starting with the simplest pattern, capping iterations and costs, logging full action traces, and keeping irreversible actions behind deterministic checks or human approval. A practical guide for engineers building production agentic systems.

github.com · 18 min
25

A local HTML editor built for human-AI collaboration本地 HTML 编辑器,专为 Agent 协作设计

Lavish-axi is a local CLI tool that opens AI-generated HTML artifacts in a local browser, allowing developers to annotate elements, select text, take screenshots, and send structured feedback directly back to the AI agent. It runs a local server with a browser chrome, supporting live reload, layout auditing (overflow, clipped text, overlapping text), feedback queuing, and long polling. Built as an AXI, it requires no setup beyond `npx` and can be integrated as a skill into agents like Claude Code. It's ideal for engineers who need to iterate on AI-generated visualizations, plans, or UI mockups with precise feedback.

github.com · 12 min
26

Ponytail: Lazy Senior Dev Inside Your AI Agent, Cuts Code Bloat by ~54%AI 代码生成懒人模式:自动砍掉无用代码、缩短输出至原规模一半

Ponytail is a rule plugin for 14+ AI coding agents (Claude Code, Codex, Copilot CLI, etc.) that injects a lazy-senior-dev mindset. Before generating code, it forces the agent to climb a ladder: does this need to exist? Can the standard library or native platform feature do it? Can it be one line? Only then writes the minimum viable solution. Benchmarked on real Claude Code sessions editing a real FastAPI + React repository across 12 feature tickets, it cuts lines of code by 54% (mean), tokens by 22%, cost by 20%, and time by 27% while keeping 100% safety on validation, error handling, security, and accessibility. Ideal for developers tired of AI bloat and over-engineering.

Section 06

Human-AI Symbiosis and Self-Evolution

3 / 30
x.com · 31 min
27

How to fix your entire life in 1 day用一天重新校准人生:一份基于心理挖掘与目标设定的操作协议

The author argues that most New Year's resolutions fail because people try to change actions without changing their underlying identity. Drawing on Adlerian psychology, Loevinger's stages of ego development, and cybernetics, he presents a one-day protocol: morning psychological excavation (define anti-vision and vision), daytime interrupt-based prompts to break autopilot, and evening synthesis into three-lens goals (year, month, day). The core thesis is that all behavior is goal-oriented at an unconscious level, and real change requires replacing the lens through which you perceive reality. For readers interested in self-development, behavior design, and goal-setting.

x.com · 11 min
28

How to Build an AI Second Brain With Claude and Obsidian That Gets Smarter Every Day (Full Guide)用 Claude 和 Obsidian 搭建每日进化的 AI 第二大脑完整指南

A step-by-step guide to building a persistent 'second brain' using Claude and Obsidian, based on Andrej Karpathy's LLM Wiki pattern. Obsidian stores all notes as local plain text files, while Claude (via MCP protocol) reads, organizes, and links the entire vault. Key steps: install Claude Desktop (paid plan), install Obsidian with Local REST API plugin, connect via MCP, create a CLAUDE.md profile via interview, structure projects with Inputs/Process/Outputs/Feedback folders, build reusable skills, wire in live data (calendar, email), and set up autopilot scheduling. The author stresses ownership (plain text, vendor-independent) and security ('keys, not prompts'). Aimed at engineers and knowledge workers tired of context loss.

x.com · 13 min
29

How To Use Loop Engineering To Build A Self-Improving Quant Trading System如何用循环工程构建自我进化的量化交易系统

Written by a backend developer working on quant trading systems, this article argues for moving beyond manual prompt-and-wait workflows to building self-running loops. It dissects six universal components of production loops: automation hooks, skill files (SKILL.md), state files (STATE.md), a separate verifier agent, Git worktrees for isolation, and MCP-based connectors. The author then wires these around the five-stage quant trading cycle (data ingestion, signal generation, verification, execution, risk monitoring), with a feedback mechanism that writes lessons back into the skill file for continuous improvement. Targeted at engineers building AI-driven or automated systems, especially in finance.

Section 07

More

1 / 30
x.com · 31 min
30

How to fix your entire life in 1 day用一天重置人生:反愿景与心理游戏化

This article by @thedankoe argues that New Year's resolutions fail because people try to achieve new goals with an old identity. It breaks down the psychology of behavior change: all behavior is goal-oriented (even unconsciously), identity forms through a cycle of goal → perception → repetition → defense, and real change requires breaking the link between habit and identity protection. The author provides a detailed one-day protocol: morning psychological excavation using 'anti-vision' (a vivid description of the life you don't want) to generate disgust energy; daytime auto-pilot interruption with random self-questions; evening synthesis of insights into yearly/monthly/daily goals. Finally, life is framed as a dual-purpose game (anti-vision as lose condition, vision as win condition, goals as missions/levels) to leverage flow state mechanics. Best for readers seeking deep behavioral change frameworks, but may feel abstract for engineers looking for concrete technical advice.