今日已更新 412 条资讯 | 累计 19972 条内容
关于我们

标签:#plan

找到 14 篇相关文章

AI 资讯

The Right Way to Pair AI With Terraform Plans

terraform plan is honest about what it's going to do. The problem is it's also verbose, repetitive, and full of cosmetic changes (like recomputed tags) mixed in with real ones (like a database instance scheduled for -/+ replace ). On a 400-line plan, the dangerous changes hide. This is the kind of task AI is actually good at: skimming structured text, flagging the entries that matter, ignoring the rest. But "paste plan into Claude" is not the workflow. There's a specific shape to this that works. Why people get this wrong The natural instinct is to copy the plan output and paste it into a chat: Terraform will perform the following actions : # aws_instance.web will be updated in-place ~ resource "aws_instance" "web" { id = "i-0abc123def456" ~ instance_type = "t3.small" - > "t3.medium" ... The model will respond with a sentence about each line. You'll scroll. You'll skim. You'll miss the -/+ replace on the database because it's in the middle of 30 routine updates. This is the same failure mode as pasting a wall of logs and asking "is anything wrong?" The model is too polite to skip things. You need to tell it to. The format that actually works: JSON terraform show -json tfplan outputs a structured representation of the plan that's much easier to reason about than the text format. Two reasons: The "actions" field is explicit. Each resource_change has a change.actions array — ["create"] , ["delete"] , ["update"] , or ["delete", "create"] for replace. No ambiguity. You can filter before pasting. With jq , you can extract only the dangerous changes, drop the noise, and feed a 20-line summary into the AI instead of a 400-line plan. Try this: terraform plan -out = tfplan terraform show -json tfplan > plan.json # Get just the dangerous changes jq '[.resource_changes[] | select(.change.actions | contains(["delete"])) | {address, type, actions: .change.actions}]' plan.json That's the AI's input. Compact, unambiguous, and pre-filtered to the changes that need a human decision.

2026-07-04 原文 →
AI 资讯

AI Skipped Class - Turns Out It Didn't Need To Go

What happens when a machine no longer needs to be trained to see something new? That's the quiet question sitting underneath this week's news, buried next to a less invasive brain implant and a handful of robots getting tougher for the real world. Neuralink says it's completed its first "transdural" brain implant, a surgical approach built to reduce trauma during the procedure. As someone who spends a lot of time thinking about how you get sensors close to a human eye without hurting anyone, I find these less-invasive-implant strategies worth watching, because the surgical-risk problem is basically the same one we wrestle with in ophthalmic hardware. Vision is getting less invasive too, in its own way. Roboflow rolled out text-prompt object detection built on SAM3 (Meta's latest segmentation model): you type the class of object you want "forklift," "cracked tile," whatever, and it returns boxes and masks without you collecting a single training image first. That's a real shift. For most of computer vision's history, teaching a model to recognize something new meant labeling hundreds of examples before you could even start; this collapses that step into a sentence. The same week brought several applied builds using the same detect-then-orchestrate pattern: a drone system that patrols for intrusions, a pipeline that inspects transmission lines for damaged cables, and an airport tool that spots foreign debris on the tarmac. The Robot Report's roundup of June's biggest robotics stories leaned heavily on humanoid robots companies going public, new deployments, and production milestones stacking up faster than would have seemed plausible a few years ago. Apptronik unveiled its Apollo 2 humanoid alongside a dedicated data-collection facility built so the robot keeps learning after it's deployed, not just during initial training which quietly answers one of the harder questions in robotics: how do you keep a system improving once it's out of the lab? X Square Robot raised e

2026-07-02 原文 →
AI 资讯

I Replaced Image AI for Technical Diagrams with an 8-Tool Code-First Matrix

I needed faster edits for technical diagrams, and a lower recurring overhead for recurring visuals. I stopped asking for new images for everything. That change started the moment I replaced "generate now, tweak later" with a fixed 8-tool matrix. TL;DR: I moved recurring illustration work into seven scriptable stacks + one 3D stack and kept image-generation AI only as a fallback. Why I rewrote this workflow When I edited an article recently, I was spending too much time redoing the same visual shape in slightly different versions. The same chart logic should not need prompt guessing each time. I asked myself: Can this be represented as text or code? Can I regenerate it exactly when requirements change? Do I need raw design freedom, or do I need deterministic structure? If the answer was mostly "text/code + deterministic output," I did not open an image-generation model first. I also kept one practical boundary: this was not an academic tool roundup. This is a log of what I actually used and in what context. The number that changed my mind: an 8-tool decision matrix The number I now defend is exactly 8 . Instead of inventing synthetic savings, I evaluate every new illustration request against this matrix. Tool Best fit Why I pick it Mermaid flow, sequence, architecture notes fastest in markdown-native writing PlantUML UML-heavy docs strict structure when Mermaid gets too loose Markmap map-style summaries converts headings directly Graphviz dependency and direction graphs compact graph semantics matplotlib numeric visualizations source-of-truth from data tables Pillow labels, badges, annotations deterministic pixel edits in Python D3.js node/link or hierarchy interactions data-driven relationship rendering Blender 3D explanatory graphics stronger structural clarity for complex scenes This is the exact set I now reach for before any image-generation request. What happened first: practical snippets I am including small runnable snippets I can reuse. 1. Mermaid for determ

2026-06-30 原文 →
AI 资讯

Inside An AI Agent: Planning, Tool Use, Memory, Constraints, And Verification

Have you noticed how every demo of "an AI agent" looks impressive in the video and falls apart the moment you ask a sharper question? The agent confidently does the wrong thing. It forgets what it just decided. It tries to call a tool that doesn't exist. It loops forever rewriting the same file. It calmly tells you the deployment succeeded when it didn't. These aren't failures of the model. They're failures of the workflow around the model. Because that's all an agent really is: a software workflow where a language model can pick the next step and call tools. The "intelligence" sits in the prompt and the orchestration around it, not in some secret agent-flavoured fairy dust. Strip the word "agent" away and you've got five pieces of plumbing: planning, tool use, memory, constraints, verification. Every production-grade agent stands or falls on those five. This is a long walk through each one. Not the marketing version. The kind of detail you actually need before you ship something that talks to your database. The Loop You're Actually Building Before we touch any pillar individually, hold the whole loop in your head. A useful agent does roughly this on every turn: Read the goal (and whatever memory is relevant to it). Decide the next action: answer directly, call a tool, ask a clarifying question, or stop. If it called a tool, observe the tool's result and feed it back in. Update memory if anything is worth remembering. Check constraints: are we over budget, out of iterations, touching something off-limits? Verify the output before declaring success. Loop until done or stopped. That's it. Every framework (LangGraph, OpenAI Agents SDK, Claude Agent SDK, smolagents, whatever ships next month) is a different shape of the same loop with different defaults. agent-loop.ts async function runAgent ( goal : string , ctx : AgentContext ) { const state = ctx . startState ( goal ); for ( let step = 0 ; step < ctx . maxSteps ; step ++ ) { const decision = await ctx . model . decid

2026-06-28 原文 →
AI 资讯

1.4.10 Planner Hook: When It Fires, How to Use It

Everything from 1.4.1 through 1.4.9 happened inside a single function, standard_planner() . Building paths, costing them, searching for a join order, estimating cardinality from statistics: all of it runs inside that one function. Yet PostgreSQL does not call standard_planner() directly. It puts another function, planner() , one step ahead of it, and has planner() call standard_planner() . And planner() can be made to call some other function instead of standard_planner() . That replacement is what the planner hook enables. When pg_stat_statements measures per-query planning time, or pg_hint_plan rewrites a plan according to hints, it all goes through this hook. Let's look at how PostgreSQL provides a way to observe or change planning behavior without touching a single line of the core, and how external code plugs into it. All planner() does is check the hook The body of planner() is essentially this. if ( planner_hook ) result = ( * planner_hook ) ( parse , query_string , cursorOptions , boundParams ); else result = standard_planner ( parse , query_string , cursorOptions , boundParams ); planner_hook is a global function pointer. Its default value is NULL , in which case standard_planner() is called right away. A plain PostgreSQL build always takes this path: planner_hook is empty, so the incoming query goes straight to standard_planner() . The key here is the type of planner_hook . typedef PlannedStmt * ( * planner_hook_type ) ( Query * parse , const char * query_string , int cursorOptions , ParamListInfo boundParams ); This signature is identical, down to the character, to that of planner() and standard_planner() . It takes the same Query and returns the same PlannedStmt (the execution plan). So external code only has to write a planner function matching this type and store its address in planner_hook . Let's call this function, written by external code to register in planner_hook , a custom planner function. The moment its address is stored, every planning reque

2026-06-21 原文 →